{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/WylfEYWOY0XEYWwdb2nt/bSlh4COe3FcXGa5PLrsk/TextWithDisclosure.js"],
  "sourcesContent": ["/**\n * For any website & code related support, contact Sam from wealthisteps.com at wealthistep@gmail.com\n * Linkedin - https://www.linkedin.com/in/samagramishra/\n * */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function TextDisclosure(props){const{content,symbols,mainFont,symbolFont,mainColor,symbolColor,from,to,prefix,underlineLinks,symbolPosition,// New link URL properties\nlink1,link2,link3,link4,link5}=props;// Keep the original ScrollLink functionality\nconst handleClick=()=>{sessionStorage.setItem(\"scroll-return-to\",from);const target=document.getElementById(to);if(target){target.scrollIntoView({behavior:\"smooth\"});}};// Replace the placeholder (inverted commas) with the disclosure symbol\n// and handle links in square brackets\nconst renderContent=()=>{if(!content)return null;// Process the content to handle both quotes and square brackets\nlet processedContent=content;let elements=[];// Track the current placeholder index to assign the correct symbol\nlet placeholderIndex=0;// Track the current link index to assign the correct URL\nlet linkIndex=0;// Store link URLs in an array for easier access\nconst linkUrls=[link1,link2,link3,link4,link5].filter(link=>link&&link.trim()!==\"\");// Add prefix if provided\nif(prefix){elements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor,whiteSpace:\"pre\",display:\"inline\"},children:prefix},\"prefix\"));}// First, find all link sections (in square brackets) and regular text sections\nconst linkRegex=/\\[([^\\]]*)\\]|([^\\[]+)/g;let linkMatch;let linkParts=[];while((linkMatch=linkRegex.exec(processedContent))!==null){if(linkMatch[1]!==undefined){// This is link text (inside brackets)\nlinkParts.push({text:linkMatch[1],isLink:true});}else if(linkMatch[2]!==undefined){// This is regular text (outside brackets)\nlinkParts.push({text:linkMatch[2],isLink:false});}}// Now process each part for quotes and links\nlinkParts.forEach((part,partIndex)=>{if(part.isLink){// This is a link - create an anchor tag\nconst href=linkUrls[linkIndex]||\"#\"// Use # as default if no URL provided\n;// Increment link index for next link, but only if we have a valid URL\nif(linkUrls[linkIndex]){linkIndex=(linkIndex+1)%linkUrls.length// Cycle through available URLs\n;}elements.push(/*#__PURE__*/_jsx(\"a\",{href:href,target:\"_blank\",rel:\"noopener noreferrer\",style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor,textDecoration:props.underlineLinks?\"underline\":\"none\",cursor:\"pointer\"},children:part.text},`link-${partIndex}`));}else{// This is regular text - process it for quotes\nconst quoteRegex=/\"([^\"]*)\"|([^\"]+)/g;let quoteMatch;let lastQuoteIndex=0;while((quoteMatch=quoteRegex.exec(part.text))!==null){// Add text before the quote if any\nif(quoteMatch.index>lastQuoteIndex){const beforeText=part.text.substring(lastQuoteIndex,quoteMatch.index);elements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor},children:beforeText},`text-${partIndex}-${lastQuoteIndex}`));}if(quoteMatch[1]!==undefined){// This is quoted text - add the symbol as superscript with onClick handler\n// Determine which symbol to use based on the placeholder index\nlet currentSymbol=\"*\"// Default symbol if none provided\n;// If symbols array exists and has items, use it\nif(symbols&&symbols.length>0){// Use modulo to cycle through available symbols if there are more placeholders than symbols\nconst symbolIndex=placeholderIndex%symbols.length;currentSymbol=symbols[symbolIndex];placeholderIndex++// Increment placeholder counter\n;}elements.push(/*#__PURE__*/_jsx(\"sup\",{style:{fontFamily:symbolFont?.fontFamily,fontSize:symbolFont?.fontSize,color:symbolColor,position:\"relative\",top:symbolPosition?`${symbolPosition}px`:\"-0.5em\",verticalAlign:\"top\",cursor:\"pointer\",display:\"inline-block\",lineHeight:\"0\",marginRight:\"1px\"},onClick:handleClick,children:currentSymbol},`symbol-${partIndex}-${quoteMatch.index}`));}else if(quoteMatch[2]!==undefined){// This is regular text between quotes\nelements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor},children:quoteMatch[2]},`text-${partIndex}-${quoteMatch.index}`));}lastQuoteIndex=quoteRegex.lastIndex;}// Add any remaining text after the last quote\nif(lastQuoteIndex<part.text.length){elements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor},children:part.text.substring(lastQuoteIndex)},`text-${partIndex}-${lastQuoteIndex}`));}}});return elements;};return /*#__PURE__*/_jsxs(\"div\",{id:from,style:{display:\"inline-block\",width:\"100%\",textAlign:mainFont?.textAlign||\"center\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .btn-style {\n                    width: auto;\n                    height: auto;\n                }\n                `}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"inline\",whiteSpace:\"pre-wrap\",textAlign:mainFont?.textAlign||\"inherit\"},children:renderContent()})]});}addPropertyControls(TextDisclosure,{content:{type:ControlType.String,defaultValue:'This is sample text with \"disclosure\" placeholder and [link text] that will become a clickable link.',displayTextArea:true},from:{type:ControlType.String},to:{type:ControlType.String},offset:{type:ControlType.Number,title:\"Offset (px)\",defaultValue:0},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},symbols:{type:ControlType.Array,propertyControl:{type:ControlType.String},defaultValue:[\"*\"],title:\"Symbols\",description:\"Symbols to use for placeholders in sequence\"},mainFont:{type:ControlType.Font,controls:\"extended\",title:\"Main Text Font\"},symbolFont:{type:ControlType.Font,controls:\"extended\",title:\"Symbol Font\"},mainColor:{type:ControlType.Color,title:\"Main Text Color\"},symbolColor:{type:ControlType.Color,title:\"Symbol Color\"},underlineLinks:{type:ControlType.Boolean,title:\"Underline Links\",defaultValue:true,description:\"Toggle link underline on or off\"},symbolPosition:{type:ControlType.Number,title:\"Symbol Position\",defaultValue:-5,step:1},// Add 5 text fields for link URLs\nlink1:{type:ControlType.String,title:\"Link 1 URL\",defaultValue:\"\",description:\"URL for the first link\"},link2:{type:ControlType.String,title:\"Link 2 URL\",defaultValue:\"\",description:\"URL for the second link\"},link3:{type:ControlType.String,title:\"Link 3 URL\",defaultValue:\"\",description:\"URL for the third link\"},link4:{type:ControlType.String,title:\"Link 4 URL\",defaultValue:\"\",description:\"URL for the fourth link\"},link5:{type:ControlType.String,title:\"Link 5 URL\",defaultValue:\"\",description:\"URL for the fifth link\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextDisclosure\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextWithDisclosure.map"],
  "mappings": "2FAMkB,SAARA,EAAgCC,EAAM,CAAC,GAAK,CAAC,QAAAC,EAAQ,QAAAC,EAAQ,SAAAC,EAAS,WAAAC,EAAW,UAAAC,EAAU,YAAAC,EAAY,KAAAC,EAAK,GAAAC,EAAG,OAAAC,EAAO,eAAAC,EAAe,eAAAC,EAC/I,MAAAC,EAAM,MAAAC,EAAM,MAAAC,EAAM,MAAAC,EAAM,MAAAC,CAAK,EAAEhB,EACzBiB,EAAY,IAAI,CAAC,eAAe,QAAQ,mBAAmBV,CAAI,EAAE,IAAMW,EAAO,SAAS,eAAeV,CAAE,EAAKU,GAAQA,EAAO,eAAe,CAAC,SAAS,QAAQ,CAAC,CAAG,EAEjKC,EAAc,IAAI,CAAC,GAAG,CAAClB,EAAQ,OAAO,K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,kBAAkB,aAAa,GAAG,KAAK,CAAC,EAC/rC,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,YAAY,wBAAwB,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,YAAY,yBAAyB,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,YAAY,wBAAwB,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,YAAY,yBAAyB,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,YAAY,wBAAwB,CAAC,CAAC",
  "names": ["TextDisclosure", "props", "content", "symbols", "mainFont", "symbolFont", "mainColor", "symbolColor", "from", "to", "prefix", "underlineLinks", "symbolPosition", "link1", "link2", "link3", "link4", "link5", "handleClick", "target", "renderContent", "processedContent", "elements", "placeholderIndex", "linkIndex", "linkUrls", "link", "p", "linkRegex", "linkMatch", "linkParts", "part", "partIndex", "href", "quoteRegex", "quoteMatch", "lastQuoteIndex", "beforeText", "currentSymbol", "symbolIndex", "u", "addPropertyControls", "ControlType"]
}
