{"version":3,"file":"ProblemRotator.B_gMyDk3.mjs","names":["React.forwardRef"],"sources":["https:/framerusercontent.com/modules/pAY8Kz1jqvzrU9l6n30A/qYL3RkPLa7hg5Y5aigp2/hbSF9lnmB.js","https:/framerusercontent.com/modules/1a6WRFqg342Yqy9L6R9Q/2HjRuuCcMtZngYm9Pbtr/ProblemRotator.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 10 6.89 L 10.94 10 L 13.76 10 L 11.49 11.62 L 12.42 14.63 L 10 12.79 L 7.58 14.63 L 8.51 11.62 L 6.24 10 L 9.06 10 Z M 10 0 L 7.58 8 L 0 8 L 6.17 12.41 L 3.83 20 L 10 15.31 L 16.18 20 L 13.83 12.41 L 20 8 L 12.42 8 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"20px\" id=\"dGuJ2rr3m\" transform=\"translate(2 2)\" width=\"20px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,K5AAorpEW:fill??props.K5AAorpEW??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,K5AAorpEW,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-WFBZ6\",className),layoutId:layoutId,ref:ref,style:{\"--esondr\":K5AAorpEW,...style}});});const css=[`.framer-WFBZ6 { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--esondr); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"K5AAorpEW\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Star Rate\",\"color\":{\"type\":\"variable\",\"value\":\"esondr\"},\"set\":{\"localId\":\"vectorSet/DnLsXE00W\",\"id\":\"DnLsXE00W\",\"moduleId\":\"JIScivAkNLgXrcOUxHXD\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-WFBZ6\");Icon.displayName=\"Star Rate\";export default Icon;addPropertyControls(Icon,{K5AAorpEW:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"true\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerVector\":\"{\\\"name\\\":\\\"Star Rate\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"esondr\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/DnLsXE00W\\\",\\\"id\\\":\\\"DnLsXE00W\\\",\\\"moduleId\\\":\\\"JIScivAkNLgXrcOUxHXD\\\"}}\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\",\"framerVariables\":\"{\\\"K5AAorpEW\\\":\\\"fill\\\"}\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function parseVariants(raw){return raw.split(\"###\").map(block=>{const[headline,subtext,resolvedLead,card,chip1,chip2]=block.split(\"||\");return{headline,subtext,resolvedLead,card,chip1,chip2};}).filter(v=>v.headline);}function findTextLeaf(el){let node=el;while(node.children&&node.children.length===1){node=node.children[0];}if(node.children&&node.children.length>0){for(const child of Array.from(node.childNodes)){if(child.nodeType===Node.TEXT_NODE&&child.textContent&&child.textContent.trim()){return child;}}return node;}return node;}function setText(name,text){if(!name||!text)return;const els=document.querySelectorAll('[data-framer-name=\"'+name+'\"]');els.forEach(el=>{const leaf=findTextLeaf(el);leaf.textContent=text;});}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ProblemRotator({variants,headlineTarget,subtextTarget,resolvedLeadTarget,cardTarget,chip1Target,chip2Target}){useEffect(()=>{if(!variants)return;const options=parseVariants(variants);if(!options.length)return;const pick=options[Math.floor(Math.random()*options.length)];setText(headlineTarget,pick.headline);setText(subtextTarget,pick.subtext);setText(resolvedLeadTarget,pick.resolvedLead);setText(cardTarget,pick.card);setText(chip1Target,pick.chip1);setText(chip2Target,pick.chip2);},[variants,headlineTarget,subtextTarget,resolvedLeadTarget,cardTarget,chip1Target,chip2Target]);return /*#__PURE__*/_jsx(\"div\",{style:{width:0,height:0,overflow:\"hidden\"}});}ProblemRotator.defaultProps={variants:\"\",headlineTarget:\"\",subtextTarget:\"\",resolvedLeadTarget:\"\",cardTarget:\"\",chip1Target:\"\",chip2Target:\"\"};addPropertyControls(ProblemRotator,{variants:{type:ControlType.String,displayTextArea:true,defaultValue:\"\"},headlineTarget:{type:ControlType.String,defaultValue:\"\"},subtextTarget:{type:ControlType.String,defaultValue:\"\"},resolvedLeadTarget:{type:ControlType.String,defaultValue:\"\"},cardTarget:{type:ControlType.String,defaultValue:\"\"},chip1Target:{type:ControlType.String,defaultValue:\"\"},chip2Target:{type:ControlType.String,defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProblemRotator\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProblemRotator.map"],"mappings":"mQAC0C,IAAsE,IAA4B,EAAqC,EAAK,8iBAAsjB,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,KAAG,CAAC,EAAe,EAAK,MAAM,CAAC,GAAG,EAAS,KAAG,CAAC,CAAE,CAAC,EAAQ,GAAU,CAAC,OAAK,SAAO,KAAG,QAAM,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAM,EAAM,WAAW,cAAc,GAU/iC,EAAK,EAV2kCA,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,GAAG,GAAW,EAAS,CAAK,EAAE,OAAoB,EAAK,EAAI,CAAC,GAAG,EAAU,UAAU,EAAG,eAAe,CAAS,EAAW,WAAa,MAAI,MAAM,CAAC,WAAW,EAAU,GAAG,CAAK,CAAC,CAAC,CAAE,CAUn0C,EAAE,CAV+0C,iCAAiC,EAAK,4DAA4D,EAAK,iBAUp7C,EAAE,cAAc,EAAE,EAAK,YAAY,YAAgC,EAAoB,EAAK,CAAC,UAAU,CAAC,aAAa,eAAe,OAAO,GAAM,MAAM,OAAO,KAAK,EAAY,KAAK,CAAC,CAAC,KCX5F,SAAS,EAAc,EAAI,CAAC,OAAO,EAAI,MAAM,KAAK,CAAC,CAAC,IAAI,GAAO,CAAC,GAAK,CAAC,EAAS,EAAQ,EAAa,EAAK,EAAM,GAAO,EAAM,MAAM,IAAI,EAAE,MAAM,CAAC,WAAS,UAAQ,eAAa,OAAK,QAAM,OAAK,CAAE,CAAC,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