{"version":3,"file":"StorageOverrides.DbhaLowx.mjs","names":["_Fragment","useState","useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/hMIE5lGfOiW0WMeObJaH/GLEjGk0o2VpXreRT2N0a/PulsingDot.js","https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/sskw9f0PktKzp4HHWhUr/4kz0qSA1I9fjo2ADojfe/StorageOverrides.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function PulsingDot({size,color}){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,borderRadius:\"50%\",background:color,position:\"relative\",flexShrink:0},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,borderRadius:\"50%\",border:`1px solid ${color}`,boxSizing:\"border-box\",animation:\"pulsingDotAnimation 1.5s ease-out infinite\"}})}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @keyframes pulsingDotAnimation {\n                    0% {\n                        transform: scale(0.8);\n                        opacity: 1;\n                    }\n\n                    100% {\n                        transform: scale(2.8);\n                        opacity: 0;\n                    }\n                }\n            `})]});}addPropertyControls(PulsingDot,{size:{type:ControlType.Number,title:\"Size\",defaultValue:8,min:2,max:30},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#E32323\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PulsingDot\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PulsingDot.map","import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const KEY=\"selectedStorage\";const useStore=createStore({storage:\"128GB\"});function readSaved(){try{return sessionStorage.getItem(KEY)||\"128GB\";}catch(e){return\"128GB\";}}function save(setStore,value){try{sessionStorage.setItem(KEY,value);}catch(e){}setStore({storage:value});}// Product page: 128GB button instance (both variants)\nexport function withStorage128(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[,setStore]=useStore();return /*#__PURE__*/_jsx(\"div\",{style:{display:\"contents\"},onClickCapture:()=>save(setStore,\"128GB\"),children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}// Product page: 256GB button instance (both variants)\nexport function withStorage256(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[,setStore]=useStore();return /*#__PURE__*/_jsx(\"div\",{style:{display:\"contents\"},onClickCapture:()=>save(setStore,\"256GB\"),children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}// Checkout page: plain storage text layer.\n// Visible only if the title contains PSP, PS Vita or Nintendo.\n// PSP titles always show 128GB.\nexport function withStorageLabel(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();const[isPsp,setIsPsp]=useState(false);const[isKnown,setIsKnown]=useState(false);const marker=useRef(null);useEffect(()=>{const saved=readSaved();if(saved!==store.storage)setStore({storage:saved});},[]);useEffect(()=>{const parent=marker.current?.parentElement?.parentElement;if(!parent)return;const check=()=>{const text=parent.textContent||\"\";setIsPsp(/\\bpsp\\b/i.test(text));setIsKnown(/\\bpsp\\b|ps\\s?vita|nintendo/i.test(text));};check();const obs=new MutationObserver(check);obs.observe(parent,{childList:true,subtree:true,characterData:true});return()=>obs.disconnect();},[]);const value=isPsp?\"128GB\":store.storage;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"span\",{ref:marker,style:{display:\"none\"}}),/*#__PURE__*/_jsx(Component,{ref:ref,...props,text:value,style:{...props.style,display:isKnown?props.style?.display:\"none\"}})]});});}// Checkout page: component instance with a text variable\nexport function withStorageInstance(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();useEffect(()=>{const saved=readSaved();if(saved!==store.storage)setStore({storage:saved});},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:store.storage,storage:store.storage,label:store.storage});});}// Testing only\nexport function withStorageDebug(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:\"Store: \"+store.storage});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStorageDebug\":{\"type\":\"reactHoc\",\"name\":\"withStorageDebug\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStorageInstance\":{\"type\":\"reactHoc\",\"name\":\"withStorageInstance\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStorage128\":{\"type\":\"reactHoc\",\"name\":\"withStorage128\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStorage256\":{\"type\":\"reactHoc\",\"name\":\"withStorage256\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStorageLabel\":{\"type\":\"reactHoc\",\"name\":\"withStorageLabel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StorageOverrides.map"],"mappings":"4NAAmI,SAAwB,EAAW,CAAC,OAAK,SAAO,CAAC,OAAoB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,aAAa,MAAM,WAAW,EAAM,SAAS,WAAW,WAAW,CAAC,EAAE,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,MAAM,OAAO,aAAa,IAAQ,UAAU,aAAa,UAAU,4CAA4C,CAAC,CAAC,CAAC,CAAC,EAAe,EAAK,QAAQ,CAAC,SAAS;;;;;;;;;;;;aAY9lB,CAAC,CAAC,CAAC,CAAC,CAAE,iBAZ2D,IAAoD,EAY9G,EAAoB,EAAW,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,EAAE,IAAI,EAAE,I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