{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/4CCYDpWSCVlPfkSfh2UF/KLIWWwdc4A9JKWYxJorl/Examples.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return props=>{return /*#__PURE__*/ _jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/ _jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}export function withRouteRedirect(Component){return props=>{// load sheet\nconst[routes,setRoutes]=useState();useEffect(()=>{async function update(){const response=await fetch(\"https://sheet.spacet.me/1k98vD7qa59KUElVfOBinrywBHXkhohwDz9Xl5R890-Q/Sheet1.json\");let routes=await response.json();await setRoutes(routes.values);}update();},[]);console.log(\"routes\",routes);// on form submitted\nwindow.addEventListener(\"message\",e=>{var ref;if((ref=e.data)===null||ref===void 0?void 0:ref.eventName){var ref1;if(((ref1=e.data)===null||ref1===void 0?void 0:ref1.eventName)===\"onFormSubmitted\"){var ref2;// para: uni id\n// para: submitedPackageType\nconst selectedPackageType=(ref2=e.data.data.submissionValues)===null||ref2===void 0?void 0:ref2.package_type;//destination\nconst destination=routes.find(route=>selectedPackageType===route[1])[2];console.log(\"destination\",destination);window.location.href=destination;}}});return /*#__PURE__*/ _jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRouteRedirect\":{\"type\":\"reactHoc\",\"name\":\"withRouteRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],
  "mappings": "yIACA,IAAMA,EAASC,EAAY,CAAC,WAAW,SAAS,CAAC,EAAogB,SAASC,EAAkBC,EAAU,CAAC,OAAOC,GAAO,CACzmB,GAAK,CAACC,EAAOC,CAAS,EAAEC,EAAS,EAAE,OAAAC,EAAU,IAAI,CAAC,eAAeC,GAAQ,CAAgH,IAAIJ,EAAO,MAA3G,MAAM,MAAM,kFAAkF,GAA4B,KAAK,EAAE,MAAMC,EAAUD,EAAO,MAAM,CAAE,CAACI,EAAO,CAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,IAAI,SAASJ,CAAM,EACpSK,EAAO,iBAAiB,UAAUC,GAAG,CAAC,IAAIC,EAAI,GAAI,GAAAA,EAAID,EAAE,QAAQ,MAAMC,IAAM,SAAcA,EAAI,UAAU,CAAC,IAAIC,EAAK,KAAKA,EAAKF,EAAE,QAAQ,MAAME,IAAO,OAAO,OAAOA,EAAK,aAAa,kBAAkB,CAAC,IAAIC,EAE1M,IAAMC,GAAqBD,EAAKH,EAAE,KAAK,KAAK,oBAAoB,MAAMG,IAAO,OAAO,OAAOA,EAAK,aAC1FE,EAAYX,EAAO,KAAKY,GAAOF,IAAsBE,EAAM,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,IAAI,cAAcD,CAAW,EAAEN,EAAO,SAAS,KAAKM,CAAY,CAAC,CAAC,CAAC,EAAuBE,EAAKf,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE",
  "names": ["useStore", "createStore", "withRouteRedirect", "Component", "props", "routes", "setRoutes", "ye", "ue", "update", "window", "e", "ref", "ref1", "ref2", "selectedPackageType", "destination", "route", "p"]
}
