{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/1kPVCHEEg0BrtObiM14s/xNKFRgtuwKHtOHN5lF5R/Frameship.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{createPortal}from\"react-dom\";import{useEffect,useState}from\"react\";import{parseFrameshipInfo,useCartStore}from\"https://framerusercontent.com/modules/ibjYTPLnMMPhPLNCj4uG/UGA9L3AHjilsXHVJhwyT/Cart.js\";import{UPGRADE_LINK}from\"https://framerusercontent.com/modules/gd3dcT3w5rYoRy7ZcKte/0LoogzhD5NepnGDaL2Il/Shared.js\";import FrameshipUpgradeBanner from\"https://framerusercontent.com/modules/b6p2QQlcwhhLAA5Operm/q9t93k88yG1i00iu3f0n/LOQtD1uPa.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerDisableUnlink\n */export default function Frameship(props){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[portalContainer,setPortalContainer]=useState(null);const initializeCart=useCartStore(state=>state.initializeCart);useEffect(()=>{initializeCart===null||initializeCart===void 0?void 0:initializeCart();},[]);const attributes={};if(props.shopUrl){attributes[\"data-shop-url\"]=props.shopUrl;}if(props.shopifyAccessToken){attributes[\"data-shopify-access-token\"]=props.shopifyAccessToken;}if(props.projectId){attributes[\"data-project-id\"]=props.projectId;}if(props.productionDomain){attributes[\"data-production-domain\"]=props.productionDomain;}if(props.stagingDomain){attributes[\"data-staging-domain\"]=props.stagingDomain;}const{hasAccess}=parseFrameshipInfo(props.stagingDomain,props.productionDomain);useEffect(()=>{if(!isCanvas){const container=document.createElement(\"div\");document.body.appendChild(container);setPortalContainer(container);return()=>{document.body.removeChild(container);};}},[]);return /*#__PURE__*/_jsx(\"div\",{\"data-frameship-component\":true,...attributes,children:!isCanvas&&portalContainer&&!hasAccess&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{\"data-hello\":true,style:{position:\"fixed\",left:20,bottom:20},children:/*#__PURE__*/_jsx(FrameshipUpgradeBanner,{link:UPGRADE_LINK})}),portalContainer)});}Frameship.displayName=\"Frameship (Shopify)\";addPropertyControls(Frameship,{shopUrl:{type:ControlType.String,title:\"Shop URL\",preventLocalization:true,hidden:()=>true},shopifyAccessToken:{type:ControlType.String,preventLocalization:true,hidden:()=>true},projectId:{type:ControlType.String,preventLocalization:true,hidden:()=>true},productionDomain:{type:ControlType.String,preventLocalization:true,hidden:()=>true},stagingDomain:{type:ControlType.String,preventLocalization:true,hidden:()=>true},note:{type:ControlType.Enum,options:[\"IMPORTANT\"],displaySegmentedControl:true,description:\"*Do not delete this component.*\\n\\nThis component is managed by the [Frameship plugin](https://www.framer.com/marketplace/plugins/frameship--5sty6o8n22smpbcb4oypsggk6/)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Frameship\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "qNAIkB,SAARA,EAA2BC,EAAM,CAAC,IAAMC,EAASC,EAAa,QAAQ,IAAIA,EAAa,OAAY,CAACC,EAAgBC,CAAkB,EAAEC,EAAS,IAAI,EAAQC,EAAeC,EAAaC,GAAOA,EAAM,cAAc,EAAEC,EAAU,IAAI,CAAuDH,IAAe,CAAE,EAAE,CAAC,CAAC,EAAE,IAAMI,EAAW,CAAC,EAAKV,EAAM,UAASU,EAAW,eAAe,EAAEV,EAAM,SAAYA,EAAM,qBAAoBU,EAAW,2BAA2B,EAAEV,EAAM,oBAAuBA,EAAM,YAAWU,EAAW,iBAAiB,EAAEV,EAAM,WAAcA,EAAM,mBAAkBU,EAAW,wBAAwB,EAAEV,EAAM,kBAAqBA,EAAM,gBAAeU,EAAW,qBAAqB,EAAEV,EAAM,eAAe,GAAK,CAAC,UAAAW,CAAS,EAAEC,EAAmBZ,EAAM,cAAcA,EAAM,gBAAgB,EAAE,OAAAS,EAAU,IAAI,CAAC,GAAG,CAACR,EAAS,CAAC,IAAMY,EAAU,SAAS,cAAc,KAAK,EAAE,gBAAS,KAAK,YAAYA,CAAS,EAAET,EAAmBS,CAAS,EAAQ,IAAI,CAAC,SAAS,KAAK,YAAYA,CAAS,CAAE,CAAE,CAAC,EAAE,CAAC,CAAC,EAAsBC,EAAK,MAAM,CAAC,2BAA2B,GAAK,GAAGJ,EAAW,SAAS,CAACT,GAAUE,GAAiB,CAACQ,GAAwBI,EAA0BD,EAAK,MAAM,CAAC,aAAa,GAAK,MAAM,CAAC,SAAS,QAAQ,KAAK,GAAG,OAAO,EAAE,EAAE,SAAsBA,EAAKE,EAAuB,CAAC,KAAKC,CAAY,CAAC,CAAC,CAAC,EAAEd,CAAe,CAAC,CAAC,CAAE,CAACJ,EAAU,YAAY,sBAAsBmB,EAAoBnB,EAAU,CAAC,QAAQ,CAAC,KAAKoB,EAAY,OAAO,MAAM,WAAW,oBAAoB,GAAK,OAAO,IAAI,EAAI,EAAE,mBAAmB,CAAC,KAAKA,EAAY,OAAO,oBAAoB,GAAK,OAAO,IAAI,EAAI,EAAE,UAAU,CAAC,KAAKA,EAAY,OAAO,oBAAoB,GAAK,OAAO,IAAI,EAAI,EAAE,iBAAiB,CAAC,KAAKA,EAAY,OAAO,oBAAoB,GAAK,OAAO,IAAI,EAAI,EAAE,cAAc,CAAC,KAAKA,EAAY,OAAO,oBAAoB,GAAK,OAAO,IAAI,EAAI,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,QAAQ,CAAC,WAAW,EAAE,wBAAwB,GAAK,YAAY;AAAA;AAAA,sIAA0K,CAAC,CAAC",
  "names": ["Frameship", "props", "isCanvas", "RenderTarget", "portalContainer", "setPortalContainer", "ye", "initializeCart", "useCartStore", "state", "ue", "attributes", "hasAccess", "parseFrameshipInfo", "container", "p", "Ga", "LOQtD1uPa_default", "UPGRADE_LINK", "addPropertyControls", "ControlType"]
}
