{"version":3,"file":"Breadcrumb.CsRhfB5C.mjs","names":["useMemo","items"],"sources":["https:/framerusercontent.com/modules/GgtwtWUtHo7JCNYeF9FQ/aCHUAFh47HB82YvGqy2i/Breadcrumb.js"],"sourcesContent":["// @ts-nocheck\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useMemo,useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerDisableUnlink\n */export default function Breadcrumb({useDynamic=true,includeHome=true,homeLabel=\"Home\",customItems=[],enableStructuredData=true,baseUrl=\"\",separator=\"→\",customSeparatorImage={src:\"\",size:14},gap=12,font={fontSize:14,fontWeight:500,fontFamily:\"system-ui, -apple-system, sans-serif\"},textTransform=\"none\",preserveHyphens=\"real-time, co-author, state-of-the-art, one-on-one, step-by-step, up-to-date\",linkColor=\"#64748b\",currentColor=\"#0f172a\",separatorColor=\"#94a3b8\",hover={color:\"#334155\",underline:false,transition:{type:\"tween\",duration:.15,ease:\"easeOut\"}}}){const segments=useMemo(()=>{if(!useDynamic){return customItems?.length?customItems:[];}const isCanvas=RenderTarget.current()===RenderTarget.canvas;if(isCanvas){// Mock breadcrumb for canvas preview\nconst items=[];if(includeHome){items.push({label:homeLabel,href:\"/\"});}items.push({label:\"Products\",href:\"/products\"},{label:\"Category\",href:\"/products/category\"},{label:\"Current Page\"});return items;}if(typeof window===\"undefined\")return[];const path=window.location?.pathname||\"/\";const rawSegments=path.split(\"/\").filter(Boolean).map(s=>decodeURIComponent(s));const toTitle=s=>{// Parse the comma-separated list of terms to preserve hyphens\nconst preserveTerms=preserveHyphens?.split(\",\").map(term=>term.trim().toLowerCase()).filter(Boolean)||[];// Check if the current segment matches any term to preserve\nconst shouldPreserveHyphens=preserveTerms.some(term=>s.toLowerCase()===term||s.toLowerCase().includes(term));let processed;if(shouldPreserveHyphens){// For preserved terms, only clean up multiple separators and underscores\nprocessed=s.replace(/[-_]{2,}/g,\" \")// Convert multiple hyphens/underscores to spaces\n.replace(/[_]/g,\" \")// Convert underscores to spaces\n.replace(/\\s+/g,\" \")// Normalize multiple spaces\n.trim();}else{// For regular terms, convert all hyphens and underscores to spaces\nprocessed=s.replace(/[-_]+/g,\" \")// Convert all hyphens/underscores to spaces\n.replace(/\\s+/g,\" \")// Normalize multiple spaces\n.trim();}// Apply text transformation based on textTransform setting\nif(textTransform===\"sentence\"){// Sentence case: capitalize first letter only\nreturn processed.charAt(0).toUpperCase()+processed.slice(1).toLowerCase();}else{// Default title case behavior for backward compatibility\nreturn processed.replace(/\\b\\w/g,c=>c.toUpperCase());}};const items=[];if(includeHome){items.push({label:homeLabel,href:\"/\"});}let acc=includeHome?\"\":\"\";rawSegments.forEach((seg,idx)=>{acc+=`/${rawSegments[idx]}`;items.push({label:toTitle(seg),href:idx<rawSegments.length-1?acc:undefined});});return items;},[useDynamic,includeHome,homeLabel,customItems]);// NEW: Generate and inject Schema.org JSON-LD structured data\nuseEffect(()=>{if(!enableStructuredData||segments.length===0)return;// Base URL\nlet siteBaseUrl=baseUrl;if(!siteBaseUrl&&typeof window!==\"undefined\"){siteBaseUrl=`${window.location.protocol}//${window.location.host}`;}if(!siteBaseUrl)return;// Generate BreadcrumbList\nconst structuredData={\"@context\":\"https://schema.org\",\"@type\":\"BreadcrumbList\",itemListElement:segments.map((item,index)=>({\"@type\":\"ListItem\",position:index+1,name:item.label,...item.href?{item:`${siteBaseUrl}${item.href}`}:{}}))};// Make and inject script tag\nconst scriptId=\"breadcrumb-structured-data\";// Remove existing script if it exists\nconst existingScript=document.getElementById(scriptId);if(existingScript){existingScript.remove();}// Create new script tag\nconst script=document.createElement(\"script\");script.id=scriptId;script.type=\"application/ld+json\";script.textContent=JSON.stringify(structuredData,null,2);// Inject into head\ndocument.head.appendChild(script);// Cleanup function\nreturn()=>{const scriptToRemove=document.getElementById(scriptId);if(scriptToRemove){scriptToRemove.remove();}};},[segments,enableStructuredData,baseUrl]);const listStyle={display:\"flex\",flexWrap:\"wrap\",alignItems:\"center\",margin:0,padding:0,listStyle:\"none\",...font||{},textTransform};const linkStyle={color:linkColor,textDecoration:\"none\",cursor:\"pointer\"};const currentStyle={color:currentColor,cursor:\"default\"};return /*#__PURE__*/_jsx(\"nav\",{\"aria-label\":\"Breadcrumb\",children:/*#__PURE__*/_jsx(\"ol\",{style:listStyle,children:segments.map((item,idx)=>{const isLast=idx===segments.length-1;return /*#__PURE__*/_jsxs(\"li\",{style:{display:\"flex\",alignItems:\"center\"},children:[isLast||!item.href?/*#__PURE__*/_jsx(\"span\",{style:currentStyle,\"aria-current\":isLast?\"page\":undefined,children:item.label}):/*#__PURE__*/_jsx(motion.a,{href:item.href,style:linkStyle,initial:{color:linkColor},whileHover:{color:hover?.color||linkColor,textDecoration:hover?.underline?\"underline\":\"none\"},transition:hover?.transition,children:item.label}),!isLast&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{marginLeft:gap,marginRight:gap,color:separatorColor},children:separator===\"custom\"?customSeparatorImage?.src?/*#__PURE__*/_jsx(\"img\",{src:customSeparatorImage.src,alt:\"separator\",style:{width:customSeparatorImage.size||16,height:customSeparatorImage.size||16,display:\"inline-block\",verticalAlign:\"middle\"}}):\"/\":separator})]},`${item.label}-${idx}`);})})});}Breadcrumb.defaultProps={useDynamic:true,includeHome:true,homeLabel:\"Home\",customItems:[{label:\"Home\",href:\"/\"},{label:\"Products\",href:\"/products\"},{label:\"Shoes\"}],enableStructuredData:true,baseUrl:\"\",separator:\"→\",customSeparatorImage:{src:\"\",size:14},gap:12,font:{fontSize:14,fontWeight:500,fontFamily:\"system-ui, -apple-system, sans-serif\"},textTransform:\"none\",preserveHyphens:\"real-time, co-author, state-of-the-art, one-on-one, step-by-step, up-to-date\",linkColor:\"#64748b\",currentColor:\"#0f172a\",separatorColor:\"#94a3b8\",hover:{color:\"#334155\",underline:false,transition:{type:\"tween\",duration:.15,ease:\"easeOut\"}}};addPropertyControls(Breadcrumb,{useDynamic:{type:ControlType.Boolean,title:\"Dynamic URL\",defaultValue:true,description:\"Build items from the current URL path\"},includeHome:{type:ControlType.Boolean,title:\"Include Home\",defaultValue:true,hidden(props){return props.useDynamic===false;}},homeLabel:{type:ControlType.String,title:\"Home Label\",defaultValue:\"Home\",hidden(props){return props.useDynamic===false||props.includeHome===false;}},customItems:{type:ControlType.Array,title:\"Items\",description:\"Shown when Dynamic URL is off\",hidden(props){return props.useDynamic!==false;},control:{type:ControlType.Object,controls:{label:{type:ControlType.String,defaultValue:\"Item\"},href:{type:ControlType.Link,title:\"Link\",optional:true}}},defaultValue:[{label:\"Home\",href:\"/\"},{label:\"Section\",href:\"/section\"},{label:\"Page\"}]},enableStructuredData:{type:ControlType.Boolean,title:\"Enable SEO Structured Data\",defaultValue:true,description:\"Automatically generates Schema.org JSON-LD for search engines\"},baseUrl:{type:ControlType.String,title:\"Base URL\",defaultValue:\"\",placeholder:\"https://yoursite.com\",description:\"Base URL for structured data (auto-detected if empty)\",hidden(props){return!props.enableStructuredData;}},separator:{type:ControlType.Enum,title:\"Separator\",options:[\"/\",\">\",\"•\",\"|\",\"→\",\"custom\"],optionTitles:[\"Slash\",\"Arrow\",\"Bullet\",\"Pipe\",\"Right Arrow\",\"Custom\"],defaultValue:\">\"},customSeparatorImage:{type:ControlType.Object,title:\"Separator Image\",controls:{src:{type:ControlType.Image,title:\"Image\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:14,min:8,max:32,step:1}},hidden(props){return props.separator!==\"custom\";}},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:48,step:1},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},textTransform:{type:ControlType.Enum,title:\"Case\",options:[\"none\",\"capitalize\",\"uppercase\",\"lowercase\",\"sentence\"],optionTitles:[\"None\",\"Capitalize\",\"Upper\",\"Lower\",\"Sentence\"],defaultValue:\"none\"},preserveHyphens:{type:ControlType.String,title:\"Preserve Hyphens\",displayTextArea:true,defaultValue:\"real-time, co-author, state-of-the-art, one-on-one, step-by-step, up-to-date\",description:\"Comma-separated list of terms that should keep their hyphens (e.g., 'real-time, co-author')\"},linkColor:{type:ControlType.Color,title:\"Link Color\",defaultValue:\"#64748b\"},currentColor:{type:ControlType.Color,title:\"Current Color\",defaultValue:\"#0f172a\"},separatorColor:{type:ControlType.Color,title:\"Separator Color\",defaultValue:\"#94a3b8\"},hover:{type:ControlType.Object,title:\"Hover Effects\",description:\"\\n\\nDiscover premium Framer components at [Interface](https://interface.supply)\",controls:{color:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#334155\"},underline:{type:ControlType.Boolean,title:\"Underline on Hover\",defaultValue:false},transition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"tween\",duration:.15,ease:\"easeOut\"}}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Breadcrumb\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Breadcrumb.map"],"mappings":"yPAGG,SAAwB,EAAW,CAAC,aAAW,GAAK,cAAY,GAAK,YAAU,OAAO,cAAY,EAAE,CAAC,uBAAqB,GAAK,UAAQ,GAAG,YAAU,IAAI,uBAAqB,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,MAAI,GAAG,OAAK,CAAC,SAAS,GAAG,WAAW,IAAI,WAAW,uCAAuC,CAAC,gBAAc,OAAO,kBAAgB,+EAA+E,YAAU,UAAU,eAAa,UAAU,iBAAe,UAAU,QAAM,CAAC,MAAM,UAAU,UAAU,GAAM,WAAW,CAAC,KAAK,QAAQ,SAAS,IAAI,KAAK,UAAU,CAAC,EAAE,CAAC,IAAM,EAASA,MAAY,CAAC,GAAG,CAAC,EAAY,OAAO,GAAa,OAAO,EAAY,EAAE,CAA8D,GAA7C,EAAa,SAAS,GAAG,EAAa,OAAmB,CACntB,IAAMC,EAAM,EAAE,CAA6K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