PageSourceSearch

https://uriweb.kr/_/fo-shopping/assets/index-DICYwk_a.js

js uriweb.kr collected 2026-09-24 09:40:17 UTC 4,558 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/modal-app-BAgUhzdR.js","assets/preload-helper-0WjokmmD.js","assets/client-BLZHgAOY.js","assets/QueryClientProvider-bRoAus1h.js","assets/format-currency-vS79YReB.js"])))=>i.map(i=>d[i]);
2import{_ as b}from"./preload-helper-0WjokmmD.js";import{M as y}from"./magnet-node-webcomponent-LRwfbqOh.js";import{a as T}from"./accent-palette-Cem6D2nc.js";const c="#add-to-cart-",l="#restock-notification-",u="#open-notification-",E=/^od\d{8}[0-9a-f]{13}$/i;function r(n){if(!/^\d+$/.test(n))return null;const t=Number(n);return Number.isSafeInteger(t)&&t>0?t:null}function O(n){return n.startsWith(c)?r(n.slice(c.length)):null}function C(n){if(!n.startsWith(l))return null;const[t,...e]=n.slice(l.length).split("-"),o=r(t);if(o===null)return null;if(e.length===0)return{prodIdx:o,optionDetailCode:null};const s=e.join("-");return E.test(s)?{prodIdx:o,optionDetailCode:s}:null}function _(n){return n.startsWith(u)?r(n.slice(u.length)):null}function h(n){const t=O(n);if(t!==null)return{kind:"add-to-cart",prodIdx:t};const e=C(n);if(e!==null)return{kind:"notification",type:"RESTOCK",...e};const o=_(n);return o!==null?{kind:"notification",type:"OPEN",prodIdx:o,optionDetailCode:null}:null}function k(){const{pathname:n,search:t}=globalThis.location;history.replaceState(null,"",n+t)}function d({useLoginPopup:n,flow:t}){const e=globalThis.location.href,o=globalThis,i=(o.base64Encode??(g=>btoa(unescape(encodeURIComponent(g)))))(e),a=o.SITE_MEMBER?.openLogin;if(n&&typeof a=="function"){t==="checkout"?a(encodeURIComponent(i),"payment",()=>globalThis.location.reload(),"N","payment"):a(i,"null",null,"Y");return}const{pathname:m,search:f}=globalThis.location;history.replaceState(null,"",m+f),globalThis.location.href=`/login?back_url=${encodeURIComponent(i)}`}function v(n){const t=n("data-currency-format-text");if(!t?.includes("%s"))return null;const e=Number(n("data-currency-decimal-count")??"0");return{currency:n("data-currency")??void 0,formatTemplate:t,decimalCount:Number.isFinite(e)?e:0,decimalChar:n("data-currency-decimal-char")??void 0,thousandChar:n("data-currency-thousand-char")??void 0}}class p extends y{reactRoot;elem;mountOptions;hashListener;useLoginPopup=!1;mounting=!1;generation=0;async connectedCallback(){const t=++this.generation;if(await super.connectedCallback(),t!==this.generation)return;const e=this.shadowRoot;if(!e)throw new Error("shadow root이 없습니다.");const o=e.querySelector("[data-root]");if(!o)throw new Error("data-root이 없습니다.");o.setAttribute("data-clay-theme","light-only"),T(o);const s=this.closest("magnet-shell"),i=a=>this.getAttribute(a)??s?.getAttribute(a)??null;this.elem=o,this.mountOptions={container:e,viewStockCount:i("data-view-stock-count")==="Y",currency:v(i),relativeOptionPrice:i("data-relative-option-price")==="Y",isGuest:globalThis.IS_GUEST===!0,guestBlocked:i("data-price-view-permission")==="N"},this.useLoginPopup=i("data-use-login-popup")!=="N",this.hashListener=()=>this.handleHashOpen(),globalThis.addEventListener("hashchange",this.hashListener),this.handleHashOpen()}handleHashOpen(){const t=h(globalThis.location.hash);if(t===null||!this.mountOptions)return;const{isGuest:e,guestBlocked:o}=this.mountOptions;if(t.kind==="add-to-cart"&&o&&e){d({useLoginPopup:this.useLoginPopup,flow:"checkout"});return}if(t.kind==="notification"&&e){d({useLoginPopup:this.useLoginPopup,flow:"plain"});return}this.ensureMounted()}async ensureMounted(){if(this.reactRoot||this.mounting||!this.elem||!this.mountOptions)return;const t=this.generation;this.mounting=!0;try{const{mount:e}=await b(async()=>{const{mount:o}=await import("./modal-app-BAgUhzdR.js").then(s=>s.m);return{mount:o}},__vite__mapDeps([0,1,2,3,4]));if(t!==this.generation||!this.elem||!this.mountOptions)return;this.reactRoot=e(this.elem,this.mountOptions)}catch(e){console.error("[modal] 모듈 로드 실패:",e),k()}finally{this.mounting=!1,t!==this.generation&&!this.reactRoot&&this.elem&&this.mountOptions&&h(globalThis.location.hash)!==null&&this.ensureMounted()}}async disconnectedCallback(){this.generation++;const{hashListener:t,reactRoot:e}=this;this.hashListener=void 0,this.reactRoot=void 0,this.elem=void 0,this.mountOptions=void 0,t&&globalThis.removeEventListener("hashchange",t),e?.unmount(),await super.disconnectedCallback()}}customElements.get("fo-shopping-modal")||customElements.define("fo-shopping-modal",p);customElements.get("fo-shopping-add-to-cart")||customElements.define("fo-shopping-add-to-cart",class extends p{});export{k as c,h as p};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.