PageSourceSearch

http://www.123doctors.kr/_/fo-shopping/assets/cart-error-boundary-B25HJQQ_.js

js 123doctors.kr collected 2026-10-07 19:30:40 UTC 11,773 bytes, 2 lines download raw bytes

1import{j as d,b,r as A}from"./client-BLZHgAOY.js";import{I as S}from"./icon-base-CFPnSwGa.js";import{h as X}from"./queryOptions-Cb5y-593.js";function U({ref:e,...t}){return d.jsx(S,{ref:e,...t,children:d.jsx("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:"1.2",vectorEffect:"non-scaling-stroke",strokeLinecap:"round",strokeLinejoin:"round"})})}function W({ref:e,...t}){return d.jsx(S,{ref:e,...t,children:d.jsx("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"1.2",vectorEffect:"non-scaling-stroke",strokeLinecap:"round",strokeLinejoin:"round"})})}const M=[/\b[\w.+-]+@[\w-]+\.[\w.]+\b/g,/\b\d{2,3}[-.\s]?\d{3,4}[-.\s]?\d{4}\b/g,/\b\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}\b/g];function f(e){let t=e;for(const r of M)t=t.replace(r,"[REDACTED]");return t}function w(e){return e instanceof Error?{message:f(e.message),name:e.name,stack:e.stack}:{message:f(typeof e=="string"?e:String(e))}}const C=e=>typeof CSS<"u"&&CSS.escape?CSS.escape(e):e;function T(e,t="data-dd-action-name"){const r=e.closest(`[${C(t)}]`);if(r){const u=r.getAttribute(t)?.trim();if(u)return u}const s=e.closest('button, a, input, select, textarea, [role="button"]')??e,o=s.getAttribute("aria-labelledby")?.trim();if(o){const u=s.getRootNode(),y=o.split(/\s+/).filter(Boolean).map(h=>{try{return u.querySelector?.(`#${C(h)}`)??document.getElementById(h)}catch{return document.getElementById(h)}}).map(h=>h?.textContent?.trim()).filter(h=>!!h).join(" ").trim();if(y)return y.substring(0,100)}const a=s.getAttribute("aria-label")?.trim();if(a)return a;const i=s.getAttribute("alt")?.trim();if(i)return i;const n=s.textContent?.trim();if(n)return n.substring(0,100);const m=s.getAttribute("title")?.trim();if(m)return m;const g=s.getAttribute("placeholder")?.trim();return g||""}function x(e){return{tagName:e.tagName.toLowerCase(),id:e.id,className:e.className,textContent:f((e.textContent??"").slice(0,100)),accessibleName:f(T(e))}}var R=class{constructor(e){this.config=e,this.clickAbortController=null,this.handleAutoClick=t=>{try{const r=t.composedPath()[0]??t.target;if(!r||!(r instanceof Element))return;const s=r instanceof HTMLElement?r:r.closest('[data-dd-action-name], button, a, input, select, textarea, [role="button"]');if(!(s instanceof HTMLElement)||(this.config.ignoreSelectors??[]).some(o=>{try{return s.matches(o)||s.closest(o)!==null}catch{return!1}})||!s.matches('button, a, input, select, textarea, [role="button"]')&&!s.closest("[data-dd-action-name]"))return;this.trackClick(s)}catch{}},e.trackClicks&&this.startClickTracking()}destroy(){this.clickAbortController?.abort(),this.clickAbortController=null}startClickTracking(){this.clickAbortController=new AbortController,window.addEventListener("click",this.handleAutoClick,{passive:!0,signal:this.clickAbortController.signal})}},L=class{constructor(){this.listeners=new Map}on(e,t){const r=this.createHandler(e,t),s={callback:t,handler:r};let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(s),this.subscribe(e,r),()=>this.off(e,t)}off(e,t){const r=this.listeners.get(e);if(r){for(const s of r)if(s.callback===t){this.unsubscribe(e,s.handler),r.delete(s),r.size===0&&this.listeners.delete(e);return}}}once(e,t){let r;const s=()=>{const n=this.listeners.get(e);n&&(n.delete(r),n.size===0&&this.listeners.delete(e))},o=n=>{try{t(n)}finally{this.unsubscribe(e,r.handler),s()}},a=this.createOnceHandler(e,o);r={callback:t,handler:a};let i=this.listeners.get(e);return i||(i=new Set,this.listeners.set(e,i)),i.add(r),this.subscribe(e,a),()=>{this.unsubscribe(e,a),s()}}clear(e){if(e){const t=this.listeners.get(e);if(t){for(const r of t)this.unsubscribe(e,r.handler);t.clear(),this.listeners.delete(e)}}else{for(const[t,r]of this.listeners){for(const s of r)this.unsubscribe(t,s.handler);r.clear()}this.listeners.clear()}}getEvents(){return Array.from(this.listeners.keys())}createOnceHandler(e,t){return this.createHandler(e,t)}},H=class extends L{constructor(e){super(),this.target=e??(typeof window<"u"?window:new EventTarget)}subscribe(e,t){this.target.addEventListener(e,t)}unsubscribe(e,t){this.target.removeEventListener(e,t)}createHandler(e,t){return r=>{try{t(r.detail)}catch(s){console.error(`Error in event handler for "${String(e)}":`,s)}}}createOnceHandler(e,t){return s=>{try{t(s.detail)}catch(o){console.error(`Error in event handler for "${String(e)}":`,o)}}}emit(e,...t){const r=t[0];this.target.dispatchEvent(new CustomEvent(e,{detail:r}))}};function D(e){return typeof e=="object"&&e!==null&&"__event"in e&&"detail"in e}var O=class extends L{constructor(e){super(),this.target=e.target,this.origin=e.origin}subscribe(e,t){window.addEventListener("message",t)}unsubscribe(e,t){window.removeEventListener("message",t)}createHandler(e,t){return r=>{if(!(this.origin!=="*"&&r.origin!==this.origin)&&!(!D(r.data)||r.data.__event!==e))try{t(r.data.detail)}catch(s){console.error(`Error in event handler for "${String(e)}":`,s)}}}emit(e,...t){const r=t[0];this.target.postMessage({__event:e,detail:r},this.origin)}},l,I=(l=class extends R{static resolveTarget(){try{if(window.self!==window.parent)return window.parent}catch{}return window}
1get mfeContext(){return{mfe:{name:this.config.name,version:this.config.version}}}trackEvent(t,r){l.emitter.emit("imdog:track-event",{name:t,payload:{...r,...this.mfeContext}})}trackError(t,r){l.emitter.emit("imdog:track-error",{error:t,context:{...r,...this.mfeContext}})}trackAction(t,r){l.emitter.emit("imdog:track-action",{name:t,payload:{...r,...this.mfeContext}})}trackClick(t,r){l.emitter.emit("imdog:track-click",{element:t?x(t):void 0,payload:{...r,...this.mfeContext}})}trackScroll(t){l.emitter.emit("imdog:track-scroll",{payload:{...t,...this.mfeContext}})}startView(t){l.emitter.emit("imdog:start-view",{name:t,...this.mfeContext})}},l.emitter=new H(l.resolveTarget()),l);let E=0;function p(){return E+=1,`res_${Date.now()}_${E}`}var j=class{constructor(e){this.originalFetch=null,this.originalXhrOpen=null,this.originalXhrSend=null,this.observer=null,this.destroyed=!1,this.config=e,this.patchFetch(),this.patchXHR(),this.observeScripts()}patchFetch(){const e=globalThis.fetch;if(typeof e!="function")return;this.originalFetch=e;const t=this;globalThis.fetch=function(r,s){if(t.destroyed)return e.call(this,r,s);const o=typeof r=="string"?r:r instanceof URL?r.href:r.url,a=s?.method??(r instanceof Request?r.method:"GET"),i=p();try{t.config.onStart({resourceKey:i,url:o,method:a,type:"fetch"})}catch{}return e.call(this,r,s).then(n=>{try{t.config.onStop({resourceKey:i,url:o,statusCode:n.status})}catch{}return n},n=>{try{t.config.onStop({resourceKey:i,url:o,statusCode:0})}catch{}throw n})}}patchXHR(){this.originalXhrOpen=XMLHttpRequest.prototype.open,this.originalXhrSend=XMLHttpRequest.prototype.send;const e=this.originalXhrOpen,t=this.originalXhrSend,r=this;XMLHttpRequest.prototype.open=function(s,o,a,i,n){return this.imdogMethod=s,this.imdogUrl=typeof o=="string"?o:o.href,e.call(this,s,o,a??!0,i,n)},XMLHttpRequest.prototype.send=function(s){if(r.destroyed)return t.call(this,s);const o=this,a=o.imdogUrl??"",i=o.imdogMethod??"GET",n=p();try{r.config.onStart({resourceKey:n,url:a,method:i,type:"xhr"})}catch{}return this.addEventListener("loadend",()=>{try{r.config.onStop({resourceKey:n,url:a,statusCode:this.status})}catch{}},{once:!0}),t.call(this,s)}}observeScripts(){if(!(typeof PerformanceObserver>"u"))try{this.observer=new PerformanceObserver(e=>{if(!this.destroyed){for(const t of e.getEntries())if(t.initiatorType==="script"){const r=p(),s=t.name;try{this.config.onStart({resourceKey:r,url:s,type:"script"}),this.config.onStop({resourceKey:r,url:s})}catch{}}}}),this.observer.observe({type:"resource",buffered:!1})}catch{}}destroy(){this.destroyed=!0,this.originalXhrOpen&&(XMLHttpRequest.prototype.open=this.originalXhrOpen,this.originalXhrOpen=null),this.originalXhrSend&&(XMLHttpRequest.prototype.send=this.originalXhrSend,this.originalXhrSend=null),this.originalFetch&&(globalThis.fetch=this.originalFetch,this.originalFetch=null),this.observer?.disconnect(),this.observer=null}};const k=5e3,P=50;var c,B=(c=class extends R{constructor(t){super({...t,trackClicks:!0}),this.errorAbortController=null,this.viewCleanup=null,this.resourceInterceptor=null,this.recentErrors=new Map,this.setupErrorCapture(),this.setupViewCapture(),t.trackResources&&this.setupResourceCapture()}static get emitter(){return c._emitter||(c._emitter=new O({target:window.parent,origin:"*"})),c._emitter}get mfeContext(){return{mfe:{name:this.config.name,version:this.config.version}}}setupErrorCapture(){this.errorAbortController=new AbortController;const t=this.errorAbortController.signal;window.addEventListener("error",r=>{const s=w(r.error??r.message);this.isDuplicateError(s)||this.trackError(s,{source:"auto-capture",handling:"unhandled",filename:r.filename,lineno:r.lineno,colno:r.colno})},{signal:t}),window.addEventListener("unhandledrejection",r=>{const s=w(r.reason);this.isDuplicateError(s)||this.trackError(s,{source:"auto-capture",handling:"unhandled"})},{signal:t})}isDuplicateError(t){const r=`${t.message}
2${(t.stack??"").slice(0,200)}`,s=Date.now(),o=this.recentErrors.get(r);if(o!==void 0&&s-o<k)return!0;if(this.recentErrors.size>=P)for(const[a,i]of this.recentErrors)s-i>=k&&this.recentErrors.delete(a);return this.recentErrors.set(r,s),!1}setupViewCapture(){let t=location.href;const r=()=>{location.href!==t&&(t=location.href,this.startView(location.pathname+location.search+location.hash))},s=history.pushState.bind(history),o=history.replaceState.bind(history),a=(...n)=>{s(...n),r()},i=(...n)=>{o(...n),r()};history.pushState=a,history.replaceState=i,window.addEventListener("popstate",r),window.addEventListener("hashchange",r),this.startView(location.pathname+location.search+location.hash),this.viewCleanup=()=>{history.pushState===a&&(history.pushState=s),history.replaceState===i&&(history.replaceState=o),window.removeEventListener("popstate",r),window.removeEventListener("hashchange",r)}}
2setupResourceCapture(){const t=c.emitter,r=this.mfeContext;this.resourceInterceptor=new j({onStart:s=>t.emit("imdog:start-resource",{...s,...r}),onStop:s=>t.emit("imdog:stop-resource",{...s,...r})})}trackEvent(t,r){c.emitter.emit("imdog:track-event",{name:t,payload:{...r,...this.mfeContext}})}trackError(t,r){c.emitter.emit("imdog:track-error",{error:t,context:{...r,...this.mfeContext}})}trackAction(t,r){c.emitter.emit("imdog:track-action",{name:t,payload:{...r,...this.mfeContext}})}trackClick(t,r){c.emitter.emit("imdog:track-click",{element:t?x(t):void 0,payload:{...r,...this.mfeContext}})}trackScroll(t){c.emitter.emit("imdog:track-scroll",{payload:{...t,...this.mfeContext}})}startView(t){c.emitter.emit("imdog:start-view",{name:t,...this.mfeContext})}destroy(){super.destroy(),this.errorAbortController?.abort(),this.errorAbortController=null,this.viewCleanup?.(),this.viewCleanup=null,this.resourceInterceptor?.destroy(),this.resourceInterceptor=null,this.recentErrors.clear()}},c._emitter=null,c);const N=(()=>{if(window===window.parent)return!1;try{return window.parent.document,!1}catch{return!0}})(),v={name:"fo-shopping",version:"fo-shopping_1791346634716"},F=(()=>{try{return N?new B(v):new I(v)}catch{return null}})();function $(e,t){try{F?.trackError(e,t)}catch{}}class q extends A.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){$(t,{feature:"cart",componentStack:r.componentStack,url:window.location.href})}reset=()=>{this.props.onReset?.(),this.setState({error:null})};render(){return this.state.error!==null?this.props.fallback(this.state.error,this.reset):this.props.children}}function _({children:e,fallback:t}){return b(X,{children:({reset:r})=>b(q,{fallback:t,onReset:r,children:e})})}export{W as C,U as a,_ as b};

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.