{"version":3,"file":"Arc.Bq1er0hy.mjs","names":["e","m","l","u","i","o","a"],"sources":["https:/framerusercontent.com/modules/4S4SnR1GdEzX95H1h5mT/XOOqlsrUApK7c1r3bqGB/Arc.js"],"sourcesContent":["import{jsx as e,jsxs as t}from\"react/jsx-runtime\";import{Children as i}from\"react\";import{addPropertyControls as n,ControlType as a,RenderTarget as l,withCSS as r}from\"framer\";import{motion as o}from\"framer-motion\";import p from\"@emotion/hash\";import{renderToString as s}from\"react-dom/server\";/**\n * ARC TEXT\n * By Adam and Benjamin\n *\n * @framerIntrinsicWidth 150\n * @framerIntrinsicHeight 150\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */let m=r(function(n){let a,r,m;// Checks\nlet x=i.count(n.slots)>0,b=l.current()===l.canvas,$=x&&\"graphic\"===n.type,v=\"circle\"===n.type,w=\"ellipse\"===n.type,C=w?n.cylinderHeight/2:0,V=f(n.flip,C);// If graphic is connected\nif($){let i=d(n.slots),l=d(i.props.svg),o=d(i.props.children);// Show placeholder on canvas if connected layer isn’t a graphic\nif(b&&!o.props.frame)return /*#__PURE__*/t(\"div\",{style:u,children:[/*#__PURE__*/e(\"div\",{style:h,children:\"💎\"}),/*#__PURE__*/e(\"p\",{style:g,children:\"Please connect to Graphic\"}),/*#__PURE__*/e(\"p\",{style:y,children:\"You can only connect the Arc to a Graphic with a single path.\"})]});// Grab the react element from the canvas and turn it into SVG\nif(b&&o){let e=s(o),t=o.props.frame;for(let i of(r=`0 0 ${t.width} ${t.height}`,e.match(/[\\w-]+=\"[^\"]*\"/g)))i.includes(\"d=\")&&(a=c(i));}// On the preview/deploy we already get the SVG string\nif(!b&&l){let e=l.match(/[\\w-]+=\"[^\"]*\"/g);for(let t of(r=(r=(r=l.split(\"viewBox=\")[1]).split(\">\")[0]).replace(/^\"(.+(?=\"$))\"$/,\"$1\"),e))t.includes(\"d=\")&&(a=c(t));}}// Unique IDs to avoid multiple instances on the canvas sharing a single path\nlet A=`curve-${p(a||V)}`;return\"top\"===n.alignmentBaseline&&(m=\"Text Top\"),\"center\"===n.alignmentBaseline&&(m=\"Central\"),\"bottom\"===n.alignmentBaseline&&(m=\"Hanging\"),/*#__PURE__*/e(o.div,{style:{width:\"100%\",height:\"100%\",// userSelect: \"none\",\n// pointerEvents: \"none\",\nposition:\"relative\"},draggable:\"false\",children:/*#__PURE__*/t(o.svg,{className:\"transform-origin-center-center\",style:{width:\"100%\",height:\"100%\",position:\"absolute\",inset:0,transformOrigin:\"center\",willChange:n.rotate&&\"transform\"},viewBox:$?r:\"0 0 100 100\",overflow:\"visible\",animate:v&&n.rotate&&{rotate:360},transition:v&&n.rotate&&{duration:100/n.rotateSpeed,repeat:1/0,ease:\"linear\"},children:[/*#__PURE__*/e(\"path\",{id:A,d:$?a:V,strokeWidth:\"none\",fill:\"transparent\"}),/*#__PURE__*/e(\"text\",{children:/*#__PURE__*/t(\"textPath\",{href:`#${A}`,startOffset:n.startOffset,dominantBaseline:m,style:{...n.font,fill:n.color},children:[n.text,!b&&n.animate&&/*#__PURE__*/e(\"animate\",{attributeName:\"startOffset\",from:`${n.animateStart}%`,to:`${n.animateEnd}%`,begin:\"0s\",dur:`${n.animateDuration}s`,repeatCount:\"indefinite\"})]})})]})});},// Work around a bug with framer-motion that calculates a px origin when animating SVG elements.\n[\".transform-origin-center-center { transform-origin: center center !important; }\"]);export default m;/* Method to get the first child */function d(e){let t;return i.map(e,e=>{void 0===t&&(t=e);}),t;}m.defaultProps={height:50,width:50},n(m,{text:{title:\"Content\",type:a.String,defaultValue:\"✦ THANK YOU ✦ FOR VISITING\",displayTextArea:!0},type:{title:\"Type\",type:a.Enum,options:[\"circle\",\"ellipse\",\"graphic\"],optionTitles:[\"Circle\",\"Ellipse\",\"Graphic\"],defaultValue:!0},cylinderHeight:{title:\"Height\",type:a.Number,unit:\"px\",min:0,max:1e3,hidden:({type:e})=>\"ellipse\"!==e},rotate:{type:a.Boolean,title:\"Rotate\",defaultValue:!1,hidden:({type:e})=>\"circle\"!==e},rotateSpeed:{type:a.Number,title:\"Speed\",min:0,max:50,defaultValue:5,displayStepper:!0,step:1,hidden:({type:e,rotate:t})=>\"circle\"!==e||!t},slots:{type:a.ComponentInstance,title:\"Graphic\",hidden:({type:e})=>\"graphic\"!==e},alignmentBaseline:{title:\"Align\",type:a.Enum,options:[\"top\",\"center\",\"bottom\"],optionIcons:[\"align-top\",\"align-middle\",\"align-bottom\"],defaultValue:\"bottom\",displaySegmentedControl:!0},flip:{type:a.Boolean,defaultValue:!1,title:\"Direction\",enabledTitle:\"CW\",disabledTitle:\"CCW\",hidden:({type:e})=>\"graphic\"===e},startOffset:{title:\"Offset\",type:a.Number,defaultValue:0,max:360,unit:\"\\xb0\",step:.5},color:{title:\"Color\",type:a.Color,defaultValue:\"#999\"},font:{type:a.Font,title:\"Font\",controls:\"extended\",displayTextAlignment:!1},animate:{type:a.Boolean,defaultValue:!1,title:\"Animate\"},animateStart:{type:a.Number,min:-200,max:200,step:.1,defaultValue:-50,title:\"From\",unit:\"%\",hidden:e=>!e.animate},animateEnd:{type:a.Number,min:-200,max:200,step:.1,defaultValue:150,title:\"To\",unit:\"%\",hidden:e=>!e.animate},animateDuration:{type:a.Number,min:0,max:50,defaultValue:5,title:\"Time\",unit:\"s\",displayStepper:!0,hidden:e=>!e.animate}});/* Method to get stringless attributes */let c=e=>e.split(\"=\")[1].replace(/['\"]+/g,\"\"),f=(e,t)=>{let i=50-t,n=50+t;return e?`M 0 50 L 0 ${n} A 1 1 0 1 0 100 ${n} L 100 ${i} A 1 1 0 1 0 0 ${i} L 0 50`:`M 0 50 L 0 ${i} A 1 1 0 0 1 100 ${i} L 100 50 L 100 ${n} A 1 1 0 0 1 0 ${n} L 0 ${i}`;},u={display:\"flex\",width:\"100%\",height:\"100%\",placeContent:\"center\",placeItems:\"center\",flexDirection:\"column\",color:\"#96F\",background:\"rgba(136, 85, 255, 0.1)\",fontSize:11,overflow:\"hidden\"},h={fontSize:32,marginBottom:10},g={margin:0,marginBottom:10,fontWeight:600,textAlign:\"center\"},y={margin:0,opacity:.7,maxWidth:160,lineHeight:1.5,textAlign:\"center\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Arc\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"150\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"150\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Arc.map"],"mappings":"2eAmByI,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,MAAO,GAAE,IAAI,EAAE,GAAG,CAAC,AAAS,QAAJ,KAAQ,EAAEA,EAAI,EAAC,CAAC,CAAG,8BAA4nD,AAnBp0D,GAAkD,IAAiC,IAA6F,IAAuC,IAA6B,IAAkD,CAU/R,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,EAAEC,EAC3B,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,SAAS,GAAGC,EAAE,OAAO,EAAE,GAAe,EAAE,OAAd,UAAmB,EAAa,EAAE,OAAb,SAAkB,EAAc,EAAE,OAAd,UAAmB,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CACzJ,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,SAAS,CAC7D,GAAG,IAAI,EAAE,MAAM,MAAM,MAAoB,GAAE,MAAM,CAAC,MAAMC,EAAE,SAAS,CAAc,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,IAAK,EAAC,CAAc,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,2BAA4B,EAAC,CAAc,EAAE,I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