{"version":3,"file":"LicenseModule.DabLXnyA.mjs","names":["useSyncExternalStore","store"],"sources":["https:/framerusercontent.com/modules/V9XnaTlf0cEsCcafN4QP/NKFOyXkwK6yFl8NY1CYq/aKzJ5oXhS.js","https:/framerusercontent.com/modules/E9OeV8ghjPWhZ6DMC5cd/sKvXXbzcfADTBUaKuOM0/LicenseModule.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 0 L 0 1.5\" fill=\"transparent\" height=\"1.5px\" id=\"YyHeAaNlB\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(12 4.75)\" width=\"1px\"/><path d=\"M 1.061 0 L 0 1.061\" fill=\"transparent\" height=\"1.0606599999999995px\" id=\"FonMUagq_\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(16.066 6.873)\" width=\"1.0607000000000006px\"/><path d=\"M 1.5 0 L 0 0\" fill=\"transparent\" height=\"1px\" id=\"W7GXwCAxD\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(17.75 12)\" width=\"1.5px\"/><path d=\"M 1.061 1.061 L 0 0\" fill=\"transparent\" height=\"1.0606000000000009px\" id=\"UUThurTIO\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(16.066 16.066)\" width=\"1.0607000000000006px\"/><path d=\"M 0 0 L 0 1.5\" fill=\"transparent\" height=\"1.5px\" id=\"gKu852wZ3\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(12 17.75)\" width=\"1px\"/><path d=\"M 1.061 0 L 0 1.061\" fill=\"transparent\" height=\"1.0606000000000009px\" id=\"p0aO8gvM0\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(6.874 16.066)\" width=\"1.0606599999999995px\"/><path d=\"M 1.5 0 L 0 0\" fill=\"transparent\" height=\"1px\" id=\"W4FpmtkIF\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(4.75 12)\" width=\"1.5px\"/><path d=\"M 1.061 1.061 L 0 0\" fill=\"transparent\" height=\"1.0606599999999995px\" id=\"CBXDqcz5S\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(6.874 6.873)\" width=\"1.0606599999999995px\"/></svg>';const getProps=({dots,height,id,stroke,width,width1,...props})=>{return{...props,BKVe8Pgvw:dots??props.BKVe8Pgvw??1,fICyAUQY1:stroke??props.fICyAUQY1??\"rgb(0, 0, 0)\",lKf_CQTz5:width1??props.lKf_CQTz5??1.5};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,fICyAUQY1,lKf_CQTz5,BKVe8Pgvw,...restProps}=getProps(props);const href=useSVGTemplate(\"193453423\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-ljbVm\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1335ju\":lKf_CQTz5,\"--18mrqx2\":fICyAUQY1,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-ljbVm { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; 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 {\"fICyAUQY1\":\"stroke\",\"lKf_CQTz5\":\"width1\",\"BKVe8Pgvw\":\"dots\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Spinner\",\"color\":{\"type\":\"variable\",\"value\":\"18mrqx2\"},\"set\":{\"localId\":\"vectorSet/SuYHhKUZG\",\"id\":\"SuYHhKUZG\",\"moduleId\":\"EqX8thWQjdZcOB1c6p5N\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-ljbVm\");Icon.displayName=\"Spinner\";export default Icon;addPropertyControls(Icon,{fICyAUQY1:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color},lKf_CQTz5:{defaultValue:1.5,displayStepper:true,hidden:false,max:4,min:0,step:.5,title:\"Width\",type:ControlType.Number},BKVe8Pgvw:{defaultValue:1,displayStepper:true,hidden:true,max:4,min:1,title:\"Dots\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"24\",\"framerDisableUnlink\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"Spinner\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"18mrqx2\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/SuYHhKUZG\\\",\\\"id\\\":\\\"SuYHhKUZG\\\",\\\"moduleId\\\":\\\"EqX8thWQjdZcOB1c6p5N\\\"}}\",\"framerVariables\":\"{\\\"fICyAUQY1\\\":\\\"stroke\\\",\\\"lKf_CQTz5\\\":\\\"width1\\\",\\\"BKVe8Pgvw\\\":\\\"dots\\\"}\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{useEffect,useSyncExternalStore}from\"react\";const apiUrl=\"https://licensing-api.milaboratories.com\";export const store=(()=>{let snapshot={};const listeners=new Set;function notifyListeners(){for(const listener of listeners){listener();}}function subscibe(listener){listeners.add(listener);return()=>{listeners.delete(listener);};}function getSnapshot(){return snapshot;}function update(patch){snapshot={...snapshot,...patch};notifyListeners();}return{subscibe,getSnapshot,update};})();function _useStore(){return useSyncExternalStore(store.subscibe,store.getSnapshot,store.getSnapshot);}export function useStore(){const store=_useStore();useEffect(()=>{if(!store.email)confirmEmail();},[store.email]);return store;}export async function confirmEmail(){const hash=new URL(location.toString()).searchParams.get(\"hash\");const res=await fetch(new URL(\"/confirm-email\",apiUrl),{method:\"POST\",body:JSON.stringify({hash}),headers:{\"content-type\":\"application/json\"}});if(!res.ok)return;const json=await res.json();const{type,email}=json;store.update({resposeType:type,email});}export async function updateLicenseCode(){const hash=new URL(location.toString()).searchParams.get(\"hash\");const res=await fetch(new URL(\"/get-license-code\",apiUrl),{method:\"POST\",body:JSON.stringify({hash}),headers:{\"content-type\":\"application/json\"}});if(res.ok){store.update({license:await res.json()});}else{store.update({error:await res.text()});}}\nexport const __FramerMetadata__ = {\"exports\":{\"store\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updateLicenseCode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"confirmEmail\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"License\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Store\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LicenseModule.map"],"mappings":"0RAC2C,IAAqF,IAA4B,CAAoC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,SAAS,CAAC,EAAG,CAAO,EAAU,EAAO,OAAO,EAAK,CAAO,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,MAAa,WAAS,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAa,WAAS,CAAC,EAAG,CAAO,EAAI,uxEAA6xE,GAAU,CAAC,OAAK,SAAO,KAAG,SAAO,QAAM,SAAO,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAM,EAAM,WAAW,EAAE,UAAU,GAAQ,EAAM,WAAW,eAAe,UAAU,GAAQ,EAAM,WAAW,IAAI,EAUhnG,EAAK,EAV2oG,EAAiB,SAAS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