{"version":3,"file":"Shared.XPSccjcv.mjs","names":[],"sources":["https:/framerusercontent.com/modules/wzF1aUkHoslINE1PWbP0/pud8aXQ40ffzFv6s5hLJ/Shared.js"],"sourcesContent":["import{addPropertyControls,ControlType}from\"framer\";import{fillProp}from\"https://framerusercontent.com/modules/FZjYlw33eNo8pxLbSFLX/9cz7ek89fMdNfYUyPOlg/SuperfieldsShared.js\";const MODE_CONTROL={mode:{type:ControlType.Enum,defaultValue:\"basic\",options:[\"basic\",\"advanced\"],optionTitles:[\"Basic\",\"Advanced\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"}};const SUPPORT_CONTROL={needHelp:{type:ControlType.Object,title:\"Need help?\",buttonTitle:\"Get Support\",icon:\"interaction\",controls:{info:{type:ControlType.Enum,defaultValue:\"info\",options:[\"info\"],optionTitles:[\"Support 🛟\"],displaySegmentedControl:true,title:\"Get Support\",description:\"We're here to help! The best place to get support is to visit our documentation to find your answers. We're also available on live chat.\\n\\n[Visit Superfields docs](https://insertframe.io/docs/superfields)\"}}}};export function addPropertyControlsV2(component,controls){let showModeControl=false;for(const id of Object.keys(controls)){const control=controls[id];if(control.advanced){showModeControl=true;if(control.hidden){control.hidden=props=>props.mode!==\"advanced\"||control.hidden(props);}else{control.hidden=props=>props.mode!==\"advanced\";}}}addPropertyControls(component,{...showModeControl?MODE_CONTROL:{},...controls,...SUPPORT_CONTROL});}export function buttonPropertyControlsV2({text=\"\",stylingDescription=\"Update the button styling.\",showAppearance=true,stylingPropsStart={},stylingPropsEnd={}}){const hiddenAppearance=showAppearance?props=>props.appearance!==\"default\":undefined;const hiddenAppearanceOutside=showAppearance?props=>props.styling.appearance===\"default\":undefined;return{styling:{type:ControlType.Object,title:\"Styling 🎨\",buttonTitle:\"Options\",description:stylingDescription,controls:{...showAppearance?{appearance:{type:ControlType.Enum,defaultValue:\"default\",options:[\"default\",\"custom\"],optionTitles:[\"Default\",\"Custom\"],displaySegmentedControl:true}}:{},text:{type:ControlType.String,defaultValue:text,hidden:hiddenAppearance},...stylingPropsStart,fill:fillProp({color:\"#000\",gradientColorA:\"#8C8C8C\",gradientColorB:\"#000\",hidden:hiddenAppearance}),font:{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:14,lineHeight:1.4},hidden:hiddenAppearance},fontColor:{type:ControlType.Color,defaultValue:\"#FFF\",hidden:hiddenAppearance},padding:{type:ControlType.Padding,defaultValue:\"10px 16px 10px 16px\",hidden:hiddenAppearance},radius:{type:ControlType.BorderRadius,defaultValue:\"8px\",hidden:hiddenAppearance},border:{type:ControlType.Border,optional:true,hidden:hiddenAppearance},shadows:{type:ControlType.BoxShadow,hidden:hiddenAppearance},bgBlur:{type:ControlType.Number,min:0,max:100,step:1,displayStepper:true,title:\"BG Blur\",hidden:hiddenAppearance},...stylingPropsEnd}},...showAppearance?{customLayer:{type:ControlType.ComponentInstance,title:\"Layer\",description:\"Connect a custom layer from outside the breakpoint\",hidden:hiddenAppearanceOutside}}:{}};}export function parseButtonPropertyControlsV2(props){const{styling,customLayer}=props;const{radius,padding,text,...otherStyling}=styling;return{...otherStyling,...parsePadding(padding),...parseRadius(radius),text,customLayer};}export const idControl={type:ControlType.Number,defaultValue:0,step:1,min:0,displayStepper:true,title:\"ID\",description:\"If using multiple collections on the same page, set a specific ID to match.\"};export function parsePadding(padding,property=\"padding\"){if(padding&&typeof padding===\"string\"){// Split the input string by spaces and convert each to an integer\nconst values=padding.trim().split(/\\s+/).map(val=>parseInt(val,10));// If only one value is provided, replicate it four times\nif(values.length===1){return{[property]:values[0],[`${property}IsMixed`]:false};}else if(values.length===4){return{[property]:null,[`${property}IsMixed`]:true,[`${property}Top`]:values[0],[`${property}Right`]:values[1],[`${property}Bottom`]:values[2],[`${property}Left`]:values[3]};}}return{[property]:0,[`${property}IsMixed`]:false};}export function parseRadius(radius,property=\"radius\"){if(radius&&typeof radius===\"string\"){// Split the input string by spaces and convert each to an integer\nconst values=radius.trim().split(/\\s+/).map(val=>parseInt(val,10));// If only one value is provided, replicate it four times\nif(values.length===1){return{[property]:values[0],[`${property}IsMixed`]:false};}else if(values.length===4){return{[property]:null,[`${property}IsMixed`]:true,[`${property}TopLeft`]:values[0],[`${property}TopRight`]:values[1],[`${property}BottomRight`]:values[2],[`${property}BottomLeft`]:values[3]};}}return{[property]:0,[`${property}IsMixed`]:false};}\nexport const __FramerMetadata__ = {\"exports\":{\"idControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parsePadding\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"buttonPropertyControlsV2\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseRadius\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addPropertyControlsV2\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseButtonPropertyControlsV2\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"kKAAw2B,SAAgB,EAAsB,EAAU,EAAS,CAAC,IAAI,EAAgB,GAAM,IAAI,IAAM,KAAM,OAAO,KAAK,CAAQ,EAAE,CAAC,IAAM,EAAQ,EAAS,GAAO,EAAQ,WAAU,EAAgB,GAAQ,EAAQ,OAAQ,EAAQ,OAAO,GAAO,EAAM,OAAO,YAAY,EAAQ,OAAO,CAAK,EAAQ,EAAQ,OAAO,GAAO,EAAM,OAAO,WAAa,CAAC,EAAoB,EAAU,CAAC,GAAG,EAAgB,EAAa,CAAC,EAAE,GAAG,EAAS,GAAG,CAAe,CAAC,CAAE,CAAmjE,SAAgB,EAAa,EAAQ,EAAS,UAAU,CAAC,GAAG,GAAS,OAAO,GAAU,SAAS,CAC56G,IAAM,EAAO,EAAQ,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,GAAK,SAAS,EAAI,EAAE,CAAC,EAClE,GAAG,EAAO,SAAS,EAAG,M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