1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2582],{7290:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var o=r(37876),a=r(14232),n=r(77328),i=r.n(n),s=r(89099),l=r(61052),d=r(11508),c=r(32972),h=r(38254),m=r.n(h),p=r(64670);let u=()=>{let e=(0,s.useRouter)(),{path:t}=e.query,[r,n]=(0,a.useState)(null),[h,u]=(0,a.useState)(!0),[_,f]=(0,a.useState)(null),x=(0,p.T)();return((0,a.useEffect)(()=>{t&&Array.isArray(t)&&(async()=>{try{u(!0),f(null);let[e,r]=t,o=new URLSearchParams(window.location.search),a=o.get("glb"),i=o.get("usdz");if(!a)throw Error("GLB model path not found in URL");let s=decodeURIComponent(a),l=i?decodeURIComponent(i):null,d=s.startsWith("http")?s:s.startsWith("3d/models/")||s.startsWith("shopify/")||s.startsWith("files/")?"https://cdn.shopify.com/".concat(s):"https://f003.backblazeb2.com/file/shopifymodels/".concat(s),c=l?l.startsWith("http")?l:"https://f003.backblazeb2.com/file/voxelwavear/".concat(l):null;console.log("GLB URL:",d),console.log("USDZ URL:",c),console.log("Original GLB path:",s),console.log("Original USDZ path:",l),n({product_id:r,store_id:e,product_title:"Product ".concat(r),store_name:"Store ".concat(e),store_domain:"unknown.myshopify.com",product_handle:"unknown",glb_path:d,shopify_glb_url:d,usdz_path:c})}catch(e){console.error("Error loading model:",e),f(e.message)}finally{u(!1)}})()},[t]),h||!x)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(i(),{children:[(0,o.jsx)("title",{children:"Loading 3D Model..."}),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"})]}),(0,o.jsxs)("div",{className:m().loadingContainer,children:[(0,o.jsx)(l.A,{className:m().spinner,size:48}),(0,o.jsx)("p",{children:"Loading 3D model..."})]})]}):_?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(i(),{children:[(0,o.jsx)("title",{children:"Model Not Found"}),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"})]}),(0,o.jsxs)("div",{className:m().errorContainer,children:[(0,o.jsx)(d.A,{size:48,color:"#ff6b6b"}),(0,o.jsx)("h2",{children:"Model Not Available"}),(0,o.jsx)("p",{children:_}),(0,o.jsx)("button",{onClick:()=>e.back(),className:"btn btn-outline-light",children:"Go Back"})]})]}):r?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(i(),{children:[(0,o.jsxs)("title",{children:[r.product_title," - View in AR"]}),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,o.jsx)("meta",{name:"description",content:"View ".concat(r.product_title," from ").concat(r.store_name," in augmented reality")})]}),(0,o.jsxs)("div",{className:m().modelViewerContainer,children:[(0,o.jsxs)("div",{className:m().header,children:[(0,o.jsxs)("div",{className:m().productInfo,children:[(0,o.jsx)("h1",{children:r.product_title}),(0,o.jsxs)("p",{children:["from ",r.store_name]})]}),(0,o.jsx)("button",{onClick:()=>e.back(),className:"btn btn-outline-light btn-sm",children:"Back"})]}),(0,o.jsx)("model-viewer",{src:r.glb_path,"ios-src":r.usdz_path||void 0,ar:!0,"ar-modes":"scene-viewer quick-look webxr","camera-controls":!0,"auto-rotate":!0,"shadow-intensity":"1",exposure:"1",alt:"3D model of ".concat(r.product_title),className:m().modelViewer,"camera-orbit":"0deg 75deg 105%","min-camera-orbit":"auto auto 50%","max-camera-orbit":"auto auto 150%","field-of-view":"45deg","min-field-of-view":"30deg","max-field-of-view":"90deg","interpolation-decay":"200","rotation-per-second":"15deg","auto-rotate-delay":"1000","interaction-prompt":"auto","interaction-prompt-style":"basic","interaction-prompt-threshold":"2000","touch-action":"pan-y",style:{width:"100%",height:"100%","--poster-color":"transparent","--progress-bar-color":"#000000","--progress-bar-height":"2px","--progress-mask":"none","--interaction-prompt-threshold":"2000","--interaction-prompt-style":"basic"},children:(0,o.jsxs)("button",{slot:"ar-button",className:"btn",style:{backgroundColor:"transparent",border:"1px solid #fff",color:"#fff",padding:"8px 16px",borderRadius:"4px",fontSize:"0.9rem",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"8px",fontWeight:"500"},onMouseOver:e=>{e.target.style.backgroundColor="rgba(255, 255, 255, 0.1)"},onMouseOut:e=>{e.target.style.backgroundColor="transparent"},children:[(0,o.jsx)(c.A,{size:16}),"View in your space"]})}),(0,o.jsx)("div",{className:m().footer,children:(0,o.jsxs)("p",{children:["Visit ",(0,o.jsx)("a",{href:"https://".concat(r.store_domain,"/products/").concat(r.product_handle),target:"_blank",rel:"noopener noreferrer",children:r.store_name})," to purchase this product"]})})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(i(),{children:[(0,o.jsx)("title",{children:"Model Not Found"}),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"})]}),(0,o.jsxs)("div",{className:m().errorContainer,children:[(0,o.jsx)(d.A,{size:48,color:"#ff6b6b"}),(0,o.jsx)("h2",{children:"Model Not Found"}),(0,o.jsx)("p",{children:"The requested 3D model could not be found."})]})]})}},11508:(e,t,r)=>{"use strict";r.d(t,{A:()=>
1o});let o=(0,r(17963).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},17963:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var o=r(14232);let a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,o.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:d="",children:c,iconNode:h,...m}=e;return(0,o.createElement)("svg",{ref:t,...i,width:a,height:a,stroke:r,strokeWidth:l?24*Number(s)/Number(a):s,className:n("lucide",d),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(m)&&{"aria-hidden":"true"},...m},[...h.map(e=>{let[t,r]=e;return(0,o.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),l=(e,t)=>{let r=(0,o.forwardRef)((r,i)=>{let{className:l,...d}=r;return(0,o.createElement)(s,{ref:i,iconNode:t,className:n("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...d})});return r.displayName=a(e),r}},32972:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let o=(0,r(17963).A)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]])},38254:e=>{e.exports={arContainer:"ar-demo_arContainer__Ib7i0",modelViewerContainer:"ar-demo_modelViewerContainer__XDsuf",modelViewer:"ar-demo_modelViewer__QofDb",header:"ar-demo_header__Acu5U",productInfo:"ar-demo_productInfo__YSUsI",footer:"ar-demo_footer__G9HVL",loadingContainer:"ar-demo_loadingContainer__AJ5ux",spinner:"ar-demo_spinner__udflu",spin:"ar-demo_spin__t_s7A",errorContainer:"ar-demo_errorContainer__6GLib",qrCodeContainer:"ar-demo_qrCodeContainer__KycPH",qrCodeLabel:"ar-demo_qrCodeLabel__kiY7U"}},61052:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let o=(0,r(17963).A)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},64670:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var o=r(14232);let a=!1,n=null,i=()=>{let[e,t]=(0,o.useState)(a);return(0,o.useEffect)(()=>{if(a)return void t(!0);n||(n=new Promise((e,r)=>{let o=document.createElement("script");o.type="module",o.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",o.onload=()=>{a=!0,t(!0),e()},o.onerror=r,document.head.appendChild(o)})),n.then(()=>t(!0))},[]),e}},76732:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/shopify/ar/[...path]",function(){return r(7290)}])}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=76732)),_N_E=e.O()}]);
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.