PageSourceSearch

https://www.xreal.com/_next/static/chunks/0oadl~xelpep4.js?dpl=dpl_2H8ng9MYccJ4RcwsvDwM7uRKHj6g

js xreal.com collected 2026-10-02 02:40:36 UTC 33,324 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="80d209ed-9e21-20a0-e672-717fa74170dd")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,181995,e=>{"use strict";var t=e.i(328591),i=e.i(866093),s=e.i(395200),a=e.i(314425);e.i(330977);var l=e.i(557098),l=l,n=e.i(539949),n=n,r=e.i(645510),r=r,o=e.i(503259),o=o,d=e.i(908993),d=d,c=e.i(464991),c=c,p=e.i(819501),p=p,h=e.i(842284),h=h,m=e.i(29681),m=m,u=e.i(445314),u=u;e.i(480234);var x=e.i(608019),f=e.i(44551),f=f,m=m;function L(e,t){return e?"CN"===e?"amap":"google":"cn"===t?"amap":"google"}e.i(875284);let g=59.998/30.1974;function w(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}let b="xreal-pin-active-gradient";function C(e){let t=e?40:32,i=Math.round(t*g),s=e?`<defs><linearGradient id="${b}" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="#ff2929"/><stop offset="100%" stop-color="#ff5353"/></linearGradient></defs>`:"",a=e?`url(#${b})`:"#000000",l=`<svg width="${i}" height="${t}" viewBox="0 0 59.998 30.1974" fill="none" xmlns="http://www.w3.org/2000/svg">`+s+`<path d="M31.6309 29.5215C30.7297 30.4227 29.2684 30.4227 28.3672 29.5215L24.2295 25.3838H12.6914C5.68195 25.3837 0.000169639 19.7018 0 12.6924C0 5.6828 5.68185 9.50366e-05 12.6914 0H47.3066C54.3161 0.000170992 59.998 5.68285 59.998 12.6924C59.9979 19.7018 54.316 25.3836 47.3066 25.3838H35.7686L31.6309 29.5215Z" fill="${a}"/>`+'<path d="M9.23018 8.07677H11.5723L13.3534 11.4136H13.5245L15.3168 8.07677H17.6617L14.9381 12.6652L17.6617 17.3074H15.3168L13.5245 13.9169H13.3534L11.5723 17.3074H9.23018L11.9257 12.6652L9.23018 8.07677ZM19.0473 8.07677H23.2238C25.2377 8.07677 26.1549 9.42166 26.1549 11.0293C26.1549 12.1114 25.7482 13.2896 24.5842 13.7474L26.4046 17.3074H24.1382L22.5422 13.9451H21.064V17.3074H19.0473V8.07677ZM22.8704 12.3488C23.5884 12.3488 24.127 11.9278 24.127 11.0434C24.127 10.2665 23.695 9.75224 22.8311 9.75224H21.064V12.3488H22.8704ZM34.1573 8.07677H27.9865V17.3074H34.1769V15.6319H30.0144V13.3914H33.5093V11.795H30.0144V9.75224H34.1573V8.07677ZM40.9255 8.07677L44.0558 17.3074H41.8287L41.1499 15.0131H38.1038L37.4222 17.3074H35.1979L38.3394 8.07677H40.9255ZM40.6787 13.4168L39.6885 10.0687H39.5819L38.589 13.4168H40.6787ZM47.3767 8.07677H45.3432V17.3074H50.7679V15.6319H47.3767V8.07677Z" fill="white" fill-rule="evenodd" clip-rule="evenodd"/></svg>';return{svg:l,url:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(l)}`,width:i,height:t}}function v(e){return[...e].sort((e,t)=>(e.sort_order??0)-(t.sort_order??0)||e.name.localeCompare(t.name))}function k(e){let t=[];e.contact_number&&t.push(`<div style="display:flex;align-items:center;gap:10px;"><span style="flex-shrink:0;width:16px;height:16px;display:inline-flex;"><svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.96781 1.88474C5.5864 1.69436 6.22346 1.70448 6.84183 1.92478C7.53415 2.17151 8.15444 2.66342 8.69535 3.33103C9.43785 4.24752 9.91635 5.12309 9.98929 6.00388C10.0662 6.93271 9.68313 7.71414 9.04886 8.39548L9.04398 8.40134L8.93753 8.5117L8.98343 8.58396L9.11332 8.77341C9.44311 9.23124 9.95494 9.80634 10.6328 10.4795C11.4091 11.2486 12.0583 11.801 12.5479 12.1172L12.6319 12.1689L12.7481 12.0605L12.7549 12.0547C13.4422 11.4244 14.2265 11.0472 15.1563 11.123C16.0394 11.195 16.9194 11.6679 17.8438 12.4052L18.1035 12.6279C18.6797 13.1605 19.0509 13.7858 19.1895 14.4756C19.347 15.2603 19.1871 16.047 18.8145 16.7666L18.8125 16.7705C18.4822 17.3994 18.0303 17.9562 17.4854 18.4111L17.4287 18.4638C17.4225 18.4697 17.4157 18.4758 17.4092 18.4814C16.8017 19.0086 16.0012 19.2277 15.1631 19.248C14.3224 19.2683 13.3862 19.0917 12.4258 18.7627C10.5037 18.1042 8.37271 16.8004 6.50394 15.0039L6.49808 14.999L6.29984 14.8047L6.29691 14.8017C4.32763 12.8489 2.925 10.7702 2.23539 8.86521C1.55462 6.98438 1.51971 5.10619 2.58695 3.76658C3.27383 2.90552 3.83062 2.33081 4.70414 1.97849L4.96781 1.88474ZM6.33793 3.33787C5.98926 3.21368 5.63749 3.21903 5.26566 3.36912C4.76654 3.57039 4.41036 3.88564 3.7598 4.70115C3.16566 5.44703 3.04331 6.68918 3.64652 8.35545C4.24083 9.99685 5.49364 11.8921 7.34964 13.7334L7.543 13.9228L7.87015 14.2295C9.51647 15.7319 11.3266 16.7998 12.9112 17.3427C13.7567 17.6324 14.5113 17.7637 15.126 17.749C15.7319 17.7344 16.1477 17.5797 16.4102 17.3594C16.4289 17.3403 16.4497 17.323 16.4707 17.3056L16.4756 17.3008C16.8919 16.9645 17.2356 16.5469 17.4844 16.
20732C17.7316 15.5944 17.7961 15.1556 17.7188 14.7705C17.6419 14.388 17.4082 13.9768 16.9082 13.5781C16.0694 12.9091 15.4757 12.6541 15.0342 12.6181C14.6413 12.5862 14.2522 12.7191 13.7754 13.1543L13.6582 13.2636L13.3203 13.5976C13.1418 13.7745 12.8868 13.8508 12.6407 13.7998C12.4249 13.755 12.1892 13.6474 11.961 13.5166L11.7354 13.3789C11.1147 12.9782 10.3791 12.3385 9.57816 11.5449H9.57718C8.77968 10.7531 8.13289 10.023 7.72855 9.40525L7.72367 9.39744L7.65043 9.28318V9.2822C7.52639 9.08931 7.42482 8.88295 7.34769 8.66697C7.34142 8.64941 7.33506 8.63124 7.33011 8.61326L7.31253 8.54978C7.24061 8.28823 7.31592 8.00806 7.50882 7.81736L7.84867 7.48142L7.95609 7.36716C8.39495 6.89378 8.5258 6.51111 8.49418 6.12791C8.45832 5.69491 8.20461 5.10767 7.53031 4.27537C7.10896 3.75527 6.70076 3.46713 6.33793 3.33787Z" fill="black" fill-opacity="0.8"/></svg></span><span style="flex:1;font-size:14px;font-weight:400;line-height:1.2;letter-spacing:-0.02em;color:rgba(0,0,0,0.8);">${w(e.contact_number)}</span></div>`),e.address&&t.push(`<div style="display:flex;align-items:flex-start;gap:10px;"><span style="flex-shrink:0;width:16px;height:16px;display:inline-flex;margin-top:1px;"><svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.8486 2C15.1733 2.00021 18.6914 5.51916 18.6914 9.84863C18.6912 12.829 16.5457 14.7007 14.5635 16.7549C13.9011 17.4509 12.2878 18.9445 11.4238 19.7461C11.0975 20.0384 10.6036 20.0385 10.2773 19.7461C9.40374 18.9445 7.79033 17.4413 7.12793 16.7549C5.18893 14.7439 3.00023 12.8386 3 9.84863C3 5.51903 6.51903 2 10.8486 2ZM10.8389 3.4834C7.32047 3.4834 4.47868 6.32535 4.48828 9.84375C4.48846 12.1475 6.03912 13.7694 7.56543 15.2861C8.20853 15.9244 10.0317 17.614 10.6416 18.1807C10.7616 18.2863 10.9395 18.2863 11.0547 18.1807C11.6452 17.619 13.3917 16.0118 14.1406 15.2725C15.6717 13.7653 17.2077 12.1427 17.1982 9.84375C17.1982 6.32542 14.3572 3.48352 10.8389 3.4834ZM10.8486 6.21484C12.6581 6.21506 14.1319 7.68866 14.1367 9.50293C14.1365 11.317 12.6579 12.7908 10.8486 12.791C9.03436 12.791 7.56076 11.3124 7.56055 9.50293C7.56055 7.68853 9.03903 6.21484 10.8486 6.21484ZM10.8486 7.60156C9.80703 7.60156 8.96191 8.44668 8.96191 9.48828C8.96199 10.5298 9.80708 11.375 10.8486 11.375C11.89 11.3748 12.7343 10.5297 12.7344 9.48828C12.7344 8.44681 11.8901 7.60177 10.8486 7.60156Z" fill="black" fill-opacity="0.8"/></svg></span><div style="flex:1;font-size:14px;font-weight:400;line-height:1.2;letter-spacing:-0.02em;color:rgba(0,0,0,0.8);">${w(e.address)}</div></div>`),e.email&&t.push(`<div style="display:flex;align-items:center;gap:10px;"><span style="flex-shrink:0;width:16px;height:16px;display:inline-flex;"><svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.25 9.21289L12.0059 12.335C11.3725 12.6516 10.6275 12.6516 9.99414 12.335L3.75 9.21289V15.5C3.75 15.9142 4.08579 16.25 4.5 16.25H17.5C17.9142 16.25 18.25 15.9142 18.25 15.5V9.21289ZM18.25 6.5C18.25 6.08579 17.9142 5.75 17.5 5.75H4.5C4.08579 5.75 3.75 6.08579 3.75 6.5V7.53613L10.665 10.9941C10.8759 11.0994 11.1241 11.0994 11.335 10.9941L18.25 7.53613V6.5ZM19.75 15.5C19.75 16.7426 18.7426 17.75 17.5 17.75H4.5C3.25736 17.75 2.25 16.7426 2.25 15.5V6.5C2.25 5.25736 3.25736 4.25 4.5 4.25H17.5C18.7426 4.25 19.75 5.25736 19.75 6.5V15.5Z" fill="black" fill-opacity="0.8"/></svg></span><span style="flex:1;font-size:14px;font-weight:400;line-height:1.2;letter-spacing:-0.02em;color:rgba(0,0,0,0.8);word-break:break-all;">${w(e.email)}</span></div>`);let i=v(e.available_products??[]);if(i.length>0){let e=i.slice(0,10).map(e=>w(e.name)).join("、");t.push(`<div style="display:flex;align-items:flex-start;gap:10px;"><span style="flex-shrink:0;width:16px;height:16px;display:inline-flex;"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0963 5.96854C15.0902 5.88402 15.035 5.81247 14.958 5.78854L14.9578 5.78869L14.6404 5.69719L14.3213 5.6165L13.9587 5.53792L13.5935 5.47197L13.346 5.43492L13.0138 5.39433L12.6849 5.3646L12.3681 5.34509L12.0566 5.33448L11.6323 5.3335L11.324 5.34298L11.0982 5.35507L10.7355 5.38308L10.3223 5.42627L10.1787 5.44298L9.4687 5.53158L8.97537 5.58868L8.97598 5.5961L8.95851 5.59777L8.9579 5.59075L8.94604 5.59207L8.68613 5.61719L8.42922 5.63635L8.17735 5.64775L8.00006 5.65026L7.82282 5.64775L7.5709 5.63635L7.31403 5.61719L7.05394 5.59207L6.53142 5.53158L5.82124 5.44298L5.67791 5.42627L5.26444 5.38308L4.90179 5.35507L4.67593 5.34298L4.36783 5.3335L3.94334 5.33448L3.63192 5.34509L3.3
21513 5.3646L2.98638 5.39433L2.65404 5.43492L2.4066 5.47202L2.04129 5.53792L1.67873 5.61645L1.35979 5.69719L1.04216 5.78874V5.78859C0.964955 5.81252 0.909985 5.88412 0.903633 5.96859C0.884531 6.22633 0.884064 6.4854 0.901998 6.74334H0.902138C0.907416 6.8257 0.960565 6.89612 1.03571 6.92005L1.0762 6.93538L1.11525 6.95597L1.16671 6.99386L1.21748 7.04718L1.24532 7.08654L1.2697 7.12836L1.29954 7.19131L1.32467 7.25652L1.36679 7.39436L1.39542 7.50748L1.4212 7.62094L1.4956 7.96999L1.57677 8.32592L1.61909 8.49697L1.66654 8.67634L1.74346 8.93526L1.78381 9.05565L1.82841 9.17747L1.87222 9.28652L1.92042 9.39566L1.96843 9.49468L2.02097 9.59291L2.07351 9.68185L2.13058 9.76928L2.18887 9.85006L2.25183 9.92815L2.31838 10.0023L2.38965 10.073L2.49142 10.1614L2.60448 10.2449L2.72451 10.3197L2.85991 10.3901L3.00805 10.454L3.17716 10.5128L3.35062 10.5603L3.55364 10.6025L3.76021 10.6331L3.99289 10.6549L4.22496 10.6655L4.38487 10.6668L4.54507 10.6633L4.69008 10.6552L4.83463 10.6424L4.96503 10.6259L5.09453 10.6046L5.21017 10.5809L5.3245 10.5524L5.43169 10.5205L5.53696 10.4836L5.67114 10.4272L5.80065 10.3615L5.92502 10.2865L6.04537 10.2013L6.15966 10.107L6.27693 9.99463L6.38673 9.87311L6.50143 9.72736L6.62118 9.5537L6.73159 9.37212L6.84312 9.16617L6.95338 8.93728L7.05398 8.70228L7.11418 8.54744L7.21385 8.26149L7.29581 8.00306L7.40576 7.64399L7.45722 7.48242L7.50734 7.33716L7.5376 7.25809L7.57393 7.17917L7.59663 7.13991L7.6197 7.10742L7.64637 7.07755L7.68766 7.04497L7.71503 7.03057L7.77677 7.00806L7.84043 6.99524L7.89362 6.98983L8.00006 6.98732L8.10636 6.98983L8.15955 6.99524L8.22321 7.00806L8.28495 7.03057L8.31237 7.04497L8.35365 7.07755L8.38027 7.10738L8.40334 7.13991L8.42604 7.17917L8.46252 7.25809L8.49264 7.33716L8.54275 7.48242L8.59427 7.64399L8.70416 8.00306L8.78613 8.26149L8.88579 8.54744L8.94604 8.70228L9.04664 8.93728L9.15686 9.16617L9.26844 9.37212L9.37898 9.5537L9.49854 9.72736L9.61343 9.87311L9.72319 9.99463L9.84051 10.107L9.95465 10.2013L10.075 10.2865L10.1995 10.3615L10.329 10.4272L10.463 10.4836L10.5683 10.5205L10.6755 10.5524L10.7899 10.5809L10.9054 10.6046L11.035 10.6259L11.1655 10.6424L11.31 10.6552L11.4551 10.6633L11.6152 10.6668L11.7751 10.6655L12.0071 10.6549L12.2399 10.6331L12.4464 10.6025L12.6494 10.5603L12.823 10.5128L12.9919 10.454L13.1401 10.3901L13.2755 10.3197L13.3955 10.2449L13.5086 10.1614L13.6105 10.073L13.6816 10.0023L13.7483 9.9281L13.8111 9.85001L13.8695 9.76918L13.9265 9.68181L13.979 9.59286L14.0317 9.49463L14.0797 9.39561L14.1279 9.28642L14.1716 9.17743L14.2163 9.05561L14.2565 8.93516L14.3335 8.67624L14.3811 8.49693L14.4233 8.32582L14.5044 7.96989L14.5788 7.6209L14.6046 7.50738L14.6331 7.39431L14.6753 7.25647L14.7004 7.19121L14.7303 7.12831L14.7547 7.08649L14.7827 7.04713L14.8334 6.99381L14.8849 6.95587L14.9238 6.93533L14.9643 6.92C15.0394 6.89607 15.0926 6.82565 15.098 6.74329C15.1161 6.4854 15.1155 6.22633 15.0963 5.96854Z" stroke="black" stroke-opacity="0.8" stroke-width="0.888889" stroke-miterlimit="10"/></svg></span><span style="flex:1;font-size:14px;font-weight:400;line-height:1.2;letter-spacing:-0.02em;color:rgba(0,0,0,0.8);word-break:break-word;">${e}</span></div>`)}let s=t.join("");return`<div style="font-family:var(--font-geist-xreal-diatype),Arial,sans-serif;background:#fff;border-radius:20px;padding:30px;width:413px;box-sizing:border-box;box-shadow:0 8px 24px rgba(0,0,0,0.12);"><div style="font-size:18px;font-weight:500;line-height:1.2;letter-spacing:-0.02em;color:#000;word-break:break-word;">${w(e.name)}</div>`+(s?`<div style="margin-top:20px;display:flex;flex-direction:column;gap:10px;">${s}</div>`:"")+"</div>"}let y=Math.PI,M=1/298.3*2-1/298.3*(1/298.3);function j(e,t){var i,s,a,l;if(!(e>73.66&&e<135.05&&t>3.86&&t<53.55))return[e,t];let n=-100+2*(i=e-105)+3*(s=t-35)+.2*s*s+.1*i*s+.2*Math.sqrt(Math.abs(i))+(20*Math.sin(6*i*y)+20*Math.sin(2*i*y))*2/3+(20*Math.sin(s*y)+40*Math.sin(s/3*y))*2/3+(160*Math.sin(s/12*y)+320*Math.sin(s*y/30))*2/3,r=300+(a=e-105)+2*(l=t-35)+.1*a*a+.1*a*l+.1*Math.sqrt(Math.abs(a))+(20*Math.sin(6*a*y)+20*Math.sin(2*a*y))*2/3+(20*Math.sin(a*y)+40*Math.sin(a/3*y))*2/3+(150*Math.sin(a/12*y)+300*Math.sin(a/30*y))*2/3,o=t/180*y,d=Math.sin(o),c=Math.sqrt(d=1-M*d*d);return n=180*n/(6378245*(1-M)/(d*c)*y),[e+(r=180*r/(6378245/c*Math.cos(o)*y)),t+n]}let N="xreal-amap-js-api",S=[116.397428,39.90923];class F{map=null;markers=[];markerStores=[];markerClickCb=null;selectedStore=null;infoWindow=null;showInfoWindow=!0;async init(e,t){this.showInfoWindow=t?.showInfoWindow??!0;let i=await new Promise((e,t)=>
2{let i=()=>t(Error("AMap SDK load failed"));if(window.AMap)return void e(window.AMap);let s=document.getElementById(N);if(s&&"failed"!==s.dataset.state){s.addEventListener("load",()=>window.AMap?e(window.AMap):i(),{once:!0}),s.addEventListener("error",i,{once:!0});return}s&&s.remove(),window._AMapSecurityConfig={securityJsCode:"7eb7c4462bdc332b02957865d7aa5d45"};let a=document.createElement("script");a.id=N,a.src=`https://webapi.amap.com/maps?v=2.0&key=${encodeURIComponent("734c2772c8c0ab3161b335fab7e15cba")}`,a.async=!0,a.onload=()=>{window.AMap?e(window.AMap):(a.dataset.state="failed",i())},a.onerror=()=>{a.dataset.state="failed",i()},document.head.appendChild(a)});await this.waitForContainerSize(e),e.replaceChildren();let s=t?.initialView;this.map=new i.Map(e,{zoom:s?.zoom??11,center:s?j(s.lng,s.lat):S}),this.showInfoWindow&&(this.infoWindow=new i.InfoWindow({isCustom:!0,anchor:"bottom-center",offset:new i.Pixel(0,-48),autoMove:!0}))}waitForContainerSize(e,t=2e3){return new Promise(i=>{let s=Date.now()+t,a=()=>{if(e.clientWidth>0&&e.clientHeight>0||Date.now()>=s)return i();requestAnimationFrame(a)};a()})}setMarkers(e,t){let i=this.map;if(!i)return;this.clearMarkers();let s=window.AMap;s&&(this.markerStores=[],e.forEach((e,t)=>{if(!Number.isFinite(e.latitude)||!Number.isFinite(e.longitude))return;let[a,l]=j(e.longitude,e.latitude),n=new s.Marker({position:[a,l],anchor:"bottom-center",content:C(!1).svg});n.on("click",()=>this.markerClickCb?.(t)),n.setMap(i),this.markers.push(n),this.markerStores.push(e)}),this.markers.length>0&&!t?.skipFit&&i.setFitView(this.markers,!0,[80,80,80,80],15),this.applySelected(),this.updateInfoWindow(this.selectedStore))}setSelected(e){this.selectedStore=e,this.applySelected(),this.updateInfoWindow(e)}onMarkerClick(e){this.markerClickCb=e}panTo(e,t){if(!this.map||!Number.isFinite(e.latitude)||!Number.isFinite(e.longitude))return;let[i,s]=j(e.longitude,e.latitude),a=null;t?.zoomTo==="street"?a=17:t?.zoomTo==="city"&&(a=12),null!==a?this.map.setZoomAndCenter(a,[i,s]):this.map.panTo([i,s])}destroy(){this.infoWindow&&(this.infoWindow.close(),this.infoWindow=null),this.clearMarkers(),this.map&&(this.map.destroy(),this.map=null)}clearMarkers(){this.map&&this.markers.length>0&&this.markers.forEach(e=>e.setMap(null)),this.markers=[],this.markerStores=[]}applySelected(){this.map&&this.markers.forEach((e,t)=>{let i=this.markerStores[t],s=!!i&&this.selectedStore?.id===i.id;e.setContent(C(s).svg),e.setzIndex(s?1e3:100)})}updateInfoWindow(e){if(!this.map||!this.infoWindow)return;let t=!!e&&this.markerStores.some(t=>t.id===e.id);if(!e||!t)return void this.infoWindow.close();let[i,s]=j(e.longitude,e.latitude);this.infoWindow.setContent(k(e)),this.infoWindow.open(this.map,[i,s])}}let I="xreal-google-maps-js-api",H="__xrealGoogleMapsReady";class E{maps=null;map=null;markers=[];markerStores=[];markerClickCb=null;selectedStore=null;popup=null;showInfoWindow=!0;async init(e,t){this.showInfoWindow=t?.showInfoWindow??!0,this.maps=await (window.google?.maps?Promise.resolve(window.google.maps):new Promise((e,t)=>{let i=!1,s=e=>{i||(i=!0,e())};window.__xrealGoogleMapsReady=()=>s(()=>{let i=window.google?.maps;i?e(i):t(Error("Google Maps global missing after callback"))});let a=document.getElementById(I);if(a?.src.includes(`callback=${H}`))return;a&&a.remove();let l=document.createElement("script");l.id=I,l.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent("AIzaSyAxMlFudJsdp22Ob-ffTL7II3jOUCbvYOw")}&loading=async&v=weekly&callback=${H}`,l.async=!0,l.onerror=()=>{l.remove(),s(()=>t(Error("Google Maps SDK load failed")))},document.head.appendChild(l)})),await this.waitForContainerSize(e),e.replaceChildren();let i=t?.initialView;if(this.map=new this.maps.Map(e,{center:i?new this.maps.LatLng(i.lat,i.lng):new this.maps.LatLng(39.90923,116.397428),zoom:i?.zoom??11,disableDefaultUI:!0}),this.showInfoWindow){let e,t,i,s;this.popup=(e=new this.maps.OverlayView,t=null,i=null,s="",e.onAdd=()=>{(t=document.createElement("div")).style.position="absolute",t.style.pointerEvents="auto",s&&(t.innerHTML=s),e.getPanes().floatPane.appendChild(t)},e.draw=()=>
2{if(!t||!i)return;let s=e.getProjection().fromLatLngToDivPixel(i);s&&(t.style.left=`${s.x}px`,t.style.top=`${s.y}px`,t.style.transform="translate(-50%, calc(-100% - 48px))")},e.onRemove=()=>{t&&(t.remove(),t=null)},{setMap(t){e.setMap(t)},setPosition(t){i=t,e.draw()},setContent(e){s=e,t&&(t.innerHTML=e)},show(){t&&(t.style.display="")},hide(){t&&(t.style.display="none")}}),this.popup.setMap(this.map)}}waitForContainerSize(e,t=2e3){return new Promise(i=>{let s=Date.now()+t,a=()=>{if(e.clientWidth>0&&e.clientHeight>0||Date.now()>=s)return i();requestAnimationFrame(a)};a()})}setMarkers(e,t){let i=this.maps,s=this.map;if(i&&s){if(this.clearMarkers(),this.markerStores=[],e.forEach((e,t)=>{if(!Number.isFinite(e.latitude)||!Number.isFinite(e.longitude))return;let a=new i.Marker({position:new i.LatLng(e.latitude,e.longitude),map:s,icon:this.iconFor(C(!1),i),zIndex:100});a.addListener("click",()=>this.markerClickCb?.(t)),this.markers.push(a),this.markerStores.push(e)}),!t?.skipFit){if(1===this.markers.length){let e=this.markerStores[0],t=new i.LatLng(e.latitude,e.longitude);s.moveCamera({center:t,zoom:15})}else if(this.markers.length>1){var a,l;let e,t,n,r,o=new i.LatLngBounds;this.markerStores.forEach(e=>o.extend(new i.LatLng(e.latitude,e.longitude)));let d=s.getDiv(),c=Math.min((a=d.clientWidth,l=d.clientHeight,e=o.getNorthEast(),t=o.getSouthWest
2(),n=(Math.sin(e.lat()*Math.PI/180)-Math.sin(t.lat()*Math.PI/180))/Math.PI,(r=e.lng()-t.lng())<0&&(r+=360),Math.max(0,Math.min(Math.floor(Math.min(Math.log2(Math.max(1,l-160)/256/n),Math.log2(Math.max(1,a-160)/256/(r/360)))),21))),15);s.moveCamera({center:o.getCenter(),zoom:c})}}this.applySelected(),this.updateInfoWindow(this.selectedStore)}}setSelected(e){this.selectedStore=e,this.applySelected(),this.updateInfoWindow(e)}onMarkerClick(e){this.markerClickCb=e}panTo(e,t){let i=this.maps,s=this.map;i&&s&&Number.isFinite(e.latitude)&&Number.isFinite(e.longitude)&&(s.panTo(new i.LatLng(e.latitude,e.longitude)),t?.zoomTo==="street"?s.setZoom(17):t?.zoomTo==="city"&&s.setZoom(12))}destroy(){this.popup&&(this.popup.hide(),this.popup.setMap(null),this.popup=null),this.clearMarkers(),this.map=null,this.maps=null}clearMarkers(){this.markers.forEach(e=>e.setMap(null)),this.markers=[],this.markerStores=[]}applySelected(){let e=this.maps;e&&this.map&&this.markers.forEach((t,i)=>{let s=this.markerStores[i],a=!!s&&this.selectedStore?.id===s.id;t.setIcon(this.iconFor(C(a),e)),t.setZIndex(a?1e3:100)})}iconFor(e,t){return{url:e.url,size:new t.Size(e.width,e.height),scaledSize:new t.Size(e.width,e.height),anchor:new t.Point(Math.round(e.width/2),e.height)}}updateInfoWindow(e){let t=this.maps,i=this.popup;if(!t||!i)return;let s=e?this.markerStores.findIndex(t=>t.id===e.id):-1;!e||s<0?i.hide():(i.setContent(k(e)),i.setPosition(new t.LatLng(e.latitude,e.longitude)),i.show())}}function $({stores:e,selectedStore:s,onSelectStore:l,regionCode:n,ipCountry:r,className:o,enabled:d=!0,showInfoWindow:c=!0,zoomToStreetOnSelect:p=!1,zoomToCityOnAutoSelect:h=!1,userSelectRef:u}){let x=(0,a.useTranslations)("Stores"),f=(0,i.useRef)(null),g=(0,i.useRef)(null),[w,b]=(0,i.useState)("loading"),C=(0,i.useMemo)(()=>e.filter(e=>Number.isFinite(e.latitude)&&Number.isFinite(e.longitude)),[e]),v=(0,i.useMemo)(()=>L(r,n),[r,n]),k=(0,i.useRef)(C);k.current=C;let y=(0,i.useRef)(s);y.current=s;let M=(0,i.useRef)(l);M.current=l;let j=(0,i.useRef)(h);j.current=h;let N=(0,i.useRef)(null),S=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(!d)return;let e=!1,t=null;return b("loading"),(async()=>{try{t="amap"===v?new F:new E;let i=f.current;if(!i)throw Error("Map container is not mounted");let s=y.current,a=s&&j.current&&Number.isFinite(s.latitude)&&Number.isFinite(s.longitude)?{lng:s.longitude,lat:s.latitude,zoom:12}:null;if(await t.init(i,{showInfoWindow:c,initialView:a}),e)return void t.destroy();t.onMarkerClick(e=>M.current(k.current[e]??null)),t.setMarkers(k.current,{skipFit:!!a}),t.setSelected(y.current);let l=y.current;l&&j.current&&t.panTo(l,{zoomTo:"city"}),g.current=t,b("ready")}catch{e||(t?.destroy(),g.current=null,b("error"))}})(),()=>{e=!0,t?.destroy(),g.current=null}},[v,d,c]),(0,i.useEffect)(()=>{let e=C!==N.current;N.current=C;let t=s?.id!==S.current;if(S.current=s?.id??null,!e)return;let i=t&&(p||h);g.current?.setMarkers(C,{skipFit:i})},[C,s,p,h]),(0,i.useEffect)(()=>{let e=g.current;if(e&&(e.setSelected(s),s)){let t;p&&u?.current===!0?t="street":h&&(t="city"),e.panTo(s,{zoomTo:t})}},[s,p,h,u]),(0,t.jsxs)("div",{className:`relative ${o??""}`,children:[(0,t.jsx)("div",{ref:f,className:"h-full w-full"}),"loading"===w&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-[#EFEFEF]",children:(0,t.jsx)("div",{className:"h-[24px] w-[24px] animate-spin rounded-full border-2 border-black/20 border-t-black"})}),"error"===w&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center rounded-[20px] border border-dashed border-black/20 bg-white",children:(0,t.jsxs)("div",{className:"flex w-[300px] flex-col items-center gap-[20px]",children:[(0,t.jsx)(m.default,{className:"h-[32px] w-[32px]"}),(0,t.jsx)("p",{className:"w-full text-center text-[18px] font-medium leading-[1.2] tracking-[-0.02em] text-black/40",children:x("stores_map_load_failed")})]})})]})}var _=e.i(41112),z=e.i(742119);e.s(["default",0,function({whereToBuy:e}){let g=(0,a.useTranslations)("Stores"),w=(0,z.useRegion)(),[b,C]=(0,i.useState)(()=>(function(e,t,i){let s=e.filter(e=>e.stores.length>0).map(e=>e.country_ref.code),a=e=>!!e&&s.includes(e);if(a(t))return t;let l=i?function(e){if("uk"===e)return"GB";let t=e.replace(/-en$/,"");if("en"!==t)return t.toUpperCase()}(i):void 0;return a(l)?l:a("US")?"US":s[0]??""})(e,void 0,w)),[k,y]=(0,i.useState)([]),[M,N]=(0,i.useState)([]),[S,F]=(0,i.useState)(1),[I,H]=(0,i.useState)(null),[E,W]=(0,i.useState)(null),[A,V]=(0,i.useState)(void 0),T=(0,i.useRef)(!1),[Z,P]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),t=()=>P(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,i.useEffect)(()=>{let t=!1;
2return(0,_.getIp)().then(i=>{if(t||i?.code!==2e3)return;let s=i.data?.country?.toUpperCase();s&&V(s),s&&e.some(e=>e.stores.length>0&&e.country_ref.code===s)&&C(s)}).catch(()=>{}),()=>{t=!0}},[e]);let R=(0,i.useMemo)(()=>e.map(e=>({code:e.country_ref.code,name:e.country_ref.name})),[e]),U=(0,i.useMemo)(()=>e.find(e=>e.country_ref.code===b),[e,b]),B=(0,i.useMemo)(()=>U?[...new Set(U.stores.map(e=>e.province).filter(e=>!!e))].map(e=>({code:e,name:e})):[],[U]),D=(0,i.useMemo)(()=>{if(!U)return[];let e=new Map;for(let t of U.stores)for(let i of t.available_products??[])e.has(i.documentId)||e.set(i.documentId,i);return v([...e.values()]).map(e=>({code:e.documentId,name:e.name}))},[U]),O=(0,i.useMemo)(()=>U?U.stores.filter(e=>{let t=0===k.length||!!e.province&&k.includes(e.province),i=0===M.length||(e.available_products??[]).some(e=>M.includes(e.documentId));return t&&i}):[],[U,k,M]),G=Math.max(1,Math.ceil(O.length/5)),q=(0,i.useMemo)(()=>O.slice((S-1)*5,5*S),[O,S]),K=(0,i.useMemo)(()=>(function(e,t){let i;if(t<=5)return Array.from({length:t},(e,t)=>({key:`page-${t+1}`,value:t+1}));let s=new Set;if(e<=3)for(let e=1;e<=3;e+=1)s.add(e);else if(e>=t-2)for(let e=t-2;e<=t;e+=1)s.add(e);else s.add(e-1),s.add(e),s.add(e+1);s.add(1),s.add(t);let a=[...s].filter(e=>e>=1&&e<=t).sort((e,t)=>e-t),l=[];for(let e of a)void 0!==i&&e-i>1&&l.push({key:`ellipsis-after-${i}`,value:"..."}),l.push({key:`page-${e}`,value:e}),i=e;return l})(S,G),[S,G]);(0,i.useEffect)(()=>{F(1)},[b,k,M]),(0,i.useEffect)(()=>{T.current=!1,W(U?.stores[0]??null)},[U]);let J=(e,i,s)=>{let a=`${!i?"":E?.id===e.id?"bg-[#EFEFEF]":"bg-[#F7F7F7]"} ${i?"cursor-pointer":""} px-[10px] py-[20px] lg:p-[30px]`,n=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-[18px] font-medium leading-[1.2] tracking-[-0.02em] text-black",children:e.name}),(0,t.jsxs)("div",{className:"mt-[16px] lg:mt-[20px] flex flex-col gap-[10px]",children:[e.contact_number&&(0,t.jsxs)("div",{className:"flex items-center gap-[10px]",children:[(0,t.jsx)(u.default,{className:"w-[16px] h-[16px] shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-[14px] font-normal leading-[1.2] tracking-[-0.02em] text-black/80",children:e.contact_number})]}),(0,t.jsxs)("div",{className:"flex items-start gap-[10px]",children:[(0,t.jsx)(l.default,{className:"w-[16px] h-[16px] shrink-0"}),(0,t.jsx)("div",{className:"flex-1 text-[14px] font-normal leading-[1.2] tracking-[-0.02em] text-black/80",children:e.address})]}),e.email&&(0,t.jsxs)("div",{className:"flex items-center gap-[10px]",children:[(0,t.jsx)(o.default,{className:"w-[16px] h-[16px] shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-[14px] font-normal leading-[1.2] tracking-[-0.02em] text-black/80",children:e.email})]}),(e.available_products??[]).length>0&&(0,t.jsxs)("div",{className:"flex items-start gap-[10px]",children:[(0,t.jsx)(d.default,{className:"w-[16px] h-[16px] shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-[14px] font-normal leading-[1.2] tracking-[-0.02em] text-black/80",children:v(e.available_products??[]).slice(0,10).map(e=>e.name).join("、")})]})]}),!i&&(0,t.jsxs)("button",{type:"button",onClick:()=>H(e),className:"mt-[16px] inline-flex items-center gap-[2px] rounded-[14px] bg-black/5 pl-[10px] pr-[14px] py-[5px]",children:[(0,t.jsx)(c.default,{className:"w-[18px] h-[18px] shrink-0 -mt-[1px]"}),(0,t.jsx)("span",{className:"text-[14px] leading-[1.2] tracking-[-0.02em] text-black/80 whitespace-nowrap",children:g("stores_go_to_store")})]})]});return i?(0,t.jsx)("button",{type:"button",id:s,onClick:()=>{T.current=!0,W(e)},className:`w-full text-left ${a}`,children:n},s):(0,t.jsx)("div",{id:s,className:a,children:n},s)},Y=L(A,w),Q=I?function(e,t){let i=Number.isFinite(e.latitude)&&Number.isFinite(e.longitude),s=encodeURIComponent(e.name);if("amap"===t){if(!i)return null;let[t,a]=j(e.longitude,e.latitude);return`https://uri.amap.com/navigation?to=${t.toFixed(6)},${a.toFixed(6)},${s}&mode=car&coordinate=gaode&callnative=1&src=xreal-site`}return i?`https://www.google.com/maps/dir/?api=1&destination=${e.latitude},${e.longitude}`:e.address?`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(e.address)}`:null}(I,Y):null;return(0,t.jsxs)("div",{className:"mt-[20px] md:mt-[40px]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-[10px] md:gap-[20px] mb-[20px] md:mb-10",children:[(0,t.jsx)("div",{className:"w-full md:flex-1 md:min-w-0",children:(0,t.jsx)(x.FilterSelect,{value:b,onChange:e=>{C(e.target.value),y([]),N([])},options:R,placeholder:g("stores_subtitle1")})}),(0,t.jsx)("div",{className:"w-full md:flex-1 md:min-w-0",children:(0,t.jsx)(f.default,{value:k,onChange:y,options:B,placeholder:g("stores_subtitle2"),disabled:!b})}),(0,t.jsx)("div",{className:"w-full md:flex-1 md:min-w-0",children:(0,t.jsx)(f.default,{value:M,onChange:N,options:D,placeholder:g("stores_subtitle3"),disabled:!b})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-[20px]",children:[(0,t.jsx)("div",{className:"lg:col-span-1",children:0===O.length?(0,t.jsx)("div",{className:"flex h-[480px] items-center justify-center rounded-[20px] lg:h-[635px] lg:border lg:border-dashed lg:border-black/20",children:(0,t.jsxs)("div",{className:"flex w-[231px] flex-col items-center gap-[20px]",children:[(0,t.jsx)(m.default,{className:"h-[32px] w-[32px]"}),(0,t.jsx)("p",{className:"w-full text-center text-[18px] font-medium leading-[1.2] tracking-[-0.02em] text-black/40",children:g("stores_no_match")})]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"hidden lg:block relative",children:[(0,t.jsx)("div",{className:"relative h-[635px] bg-[#F7F7F7] rounded-[20px] overflow-y-auto",children:(0,t.jsx)("div",{className:"flex flex-col",children:O.map((e,t)=>J(e,!0,`store-card-${t}`))})}),(0,t.jsx)("div",{className:"absolute top-0 inset-x-0 h-[40px] rounded-t-[20px] bg-gradient-to-b from-[#F7F7F7] to-[#F7F7F7]/0 pointer-events-none"}),(0,t.jsx)("div",{className:"absolute bottom-0 inset-x-0 h-[40px] rounded-b-[20px] bg-gradient-to-b from-[#F7F7F7]/0 to-[#F7F7F7] pointer-events-none"})]}),(0,t.jsxs)("div",{className:"lg:hidden",children:[(0,t.jsx)("div",{className:"flex flex-col gap-[20px]",children:q.map((e,t)=>J(e,!1,`store-card-m-${t}`))}),G>1&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-[10px] pt-[20px] pb-[40px]",children:[(0,t.jsx)("button",{type:"button",onClick:()=>F(e=>Math.max(1,e-1)),disabled:S<=1,"aria-label":"Previous page",className:"disabled:opacity-20",children:(0,t.jsx)(n.default,{className:"w-[32px] h-[32px]"})}),K.map(e=>{let i=e.value;return"..."===i?(0,t.jsx)("span",{"aria-hidden":"true",className:"flex items-center justify-center w-[32px] h-[32px] text-[14px] font-medium leading-[16
2px] tracking-[-0.02em] text-black/20",children:"..."},e.key):(0,t.jsx)("button",{type:"button",onClick:()=>F(i),className:`flex items-center justify-center w-[32px] h-[32px] text-[14px] font-medium leading-[16px] tracking-[-0.02em] ${i===S?"text-black":"text-black/20"}`,children:i},e.key)}),(0,t.jsx)("button",{type:"button",onClick:()=>F(e=>Math.min(G,e+1)),disabled:S>=G,"aria-label":"Next page",className:"disabled:opacity-20",children:(0,t.jsx)(r.default,{className:"w-[32px] h-[32px]"})})]})]})]})}),(0,t.jsx)("div",{className:"hidden lg:block lg:col-span-2 h-[635px] overflow-hidden rounded-[20px]",children:(0,t.jsx)($,{stores:O,selectedStore:E,onSelectStore:e=>{if(!e)return;T.current=!0,W(e);let t=O.findIndex(t=>t.id===e.id);t>=0&&document.getElementById(`store-card-${t}`)?.scrollIntoView({behavior:"smooth",block:"nearest"})},regionCode:w,ipCountry:A,className:"h-[635px] w-full",enabled:Z,zoomToStreetOnSelect:!0,zoomToCityOnAutoSelect:!0,userSelectRef:T})})]}),I&&(0,s.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[1000] lg:hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0",children:(0,t.jsx)($,{stores:I?[I]:[],selectedStore:I,onSelectStore:()=>{},regionCode:w,ipCountry:A,className:"h-full w-full",showInfoWindow:!1})}),(0,t.jsx)("button",{type:"button","aria-label":"Close",onClick:()=>H(null),className:"absolute right-[20px] top-[20px]",children:(0,t.jsx)(h.default,{className:"h-[40px] w-[40px]"})}),(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between gap-[12px] rounded-t-[20px] bg-white p-[30px]",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-[6px]",children:[(0,t.jsx)("div",{className:"text-[18px] font-medium leading-[1.2] tracking-[-0.02em] text-black",children:I.name}),I.address&&(0,t.jsx)("div",{className:"text-[14px] font-normal leading-[1.2] tracking-[-0.02em] text-black/80",children:I.address})]}),Q?(0,t.jsx)("a",{href:Q,target:"_blank",rel:"noreferrer","aria-label":"Directions",className:"flex h-[40px] w-[40px] shrink-0 items-center justify-center rounded-[20px] bg-black p-[9px]",children:(0,t.jsx)(p.default,{className:"h-[24px] w-[24px]"})}):(0,t.jsx)("button",{type:"button",disabled:!0,"aria-label":"Directions",className:"flex h-[40px] w-[40px] shrink-0 items-center justify-center rounded-[20px] bg-black/40 p-[9px]",children:(0,t.jsx)(p.default,{className:"h-[24px] w-[24px]"})})]})]}),document.body)]})}],181995)}]);
3
4//# debugId=80d209ed-9e21-20a0-e672-717fa74170dd

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.