@neurodyn/ar 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5562,4 +5562,4 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
5562
5562
  ::file-selector-button {
5563
5563
  ${i}
5564
5564
  }
5565
- }`:r);function I(){for(var t=arguments.length,e=Array(t),a=0;a<t;a++)e[a]=arguments[a];return(0,w.QP)((0,h.$)(e))}let B=(0,f.F)("cursor-pointer inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-xl transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary--hover active:bg-primary--pressed disabled:bg-primary--disabled disabled:opacity-20",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary--hover active:bg-secondary--pressed disabled:bg-secondary--disabled disabled:opacity-20",outline:"border border-button-outline bg-transparent text-foreground hover:border-button-outline-hover active:bg-button-outline-pressed disabled:border-border-dark disabled:opacity-20",ghost:"hover:bg-accent hover:text-accent-foreground active:bg-accent--pressed",contrast:"bg-contrast text-contrast-foreground hover:bg-contrast--hover active:bg-contrast--pressed disabled:bg-contrast--disabled disabled:opacity-30"},size:{default:"h-9 px-3.5 typo-button-normal [&_svg]:size-5",sm:"h-8 px-3 typo-button-small [&_svg]:size-4",lg:"h-11 px-4 typo-button-big [&_svg]:size-6",icon:"size-9 rounded-full [&_svg]:size-5","icon-sm":"size-8 rounded-full [&_svg]:size-4","icon-lg":"size-11 rounded-full [&_svg]:size-6"}},defaultVariants:{variant:"default",size:"default"}});function Z(t){let{className:e,variant:a,size:r,asChild:i=!1,...o}=t,n=i?v.DX:"button";return(0,s.jsx)(n,{"data-slot":"button",className:I(B({variant:a,size:r,className:e})),...o})}function q(t){return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...t,children:[(0,s.jsx)("path",{d:"M22.5601 16.3031L14.8901 3.58311C14.58 3.09793 14.1526 2.69864 13.6476 2.42205C13.1425 2.14546 12.5759 2.00049 12.0001 2.00049C11.4243 2.00049 10.8577 2.14546 10.3526 2.42205C9.84755 2.69864 9.42024 3.09793 9.1101 3.58311L1.4401 16.3031C1.16915 16.7548 1.02189 17.2698 1.01311 17.7964C1.00434 18.323 1.13436 18.8427 1.3901 19.3031C1.68578 19.8214 2.11376 20.2518 2.6303 20.5505C3.14684 20.8492 3.73343 21.0054 4.3301 21.0031H19.6701C20.2629 21.0094 20.8468 20.8593 21.363 20.5678C21.8792 20.2764 22.3093 19.8539 22.6101 19.3431C22.8734 18.8779 23.0075 18.3508 22.9987 17.8163C22.9899 17.2818 22.8385 16.7594 22.5601 16.3031ZM20.8601 18.3531C20.7399 18.5597 20.5655 18.7295 20.3557 18.8441C20.146 18.9586 19.9089 19.0136 19.6701 19.0031H4.3301C4.09132 19.0136 3.85422 18.9586 3.64446 18.8441C3.4347 18.7295 3.26029 18.5597 3.1401 18.3531C3.05233 18.2011 3.00613 18.0286 3.00613 17.8531C3.00613 17.6776 3.05233 17.5051 3.1401 17.3531L10.8201 4.62311C10.9581 4.44082 11.1365 4.29298 11.3412 4.19119C11.5459 4.08939 11.7715 4.03642 12.0001 4.03642C12.2287 4.03642 12.4543 4.08939 12.659 4.19119C12.8637 4.29298 13.0421 4.44082 13.1801 4.62311L20.8501 17.3431C20.9413 17.4954 20.9902 17.6693 20.992 17.8468C20.9937 18.0243 20.9482 18.199 20.8601 18.3531Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12.0001 17.0001C12.2653 17.0001 12.5197 16.8948 12.7072 16.7073C12.8948 16.5197 13.0001 16.2654 13.0001 16.0001C13.0001 15.7349 12.8948 15.4806 12.7072 15.293C12.5197 15.1055 12.2653 15.0001 12.0001 15.0001C11.7349 15.0001 11.4806 15.1055 11.293 15.293C11.1055 15.4806 11.0001 15.7349 11.0001 16.0001C11.0001 16.2654 11.1055 16.5197 11.293 16.7073C11.4806 16.8948 11.7349 17.0001 12.0001 17.0001Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12.0001 8.00023C11.7349 8.00023 11.4806 8.10559 11.293 8.29313C11.1055 8.48066 11.0001 8.73502 11.0001 9.00023V13.0002C11.0001 13.2655 11.1055 13.5198 11.293 13.7073C11.4806 13.8949 11.7349 14.0002 12.0001 14.0002C12.2653 14.0002 12.5197 13.8949 12.7072 13.7073C12.8948 13.5198 13.0001 13.2655 13.0001 13.0002V9.00023C13.0001 8.73502 12.8948 8.48066 12.7072 8.29313C12.5197 8.10559 12.2653 8.00023 12.0001 8.00023Z",fill:"currentColor"})]})}function H(t){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,s.jsx)("path",{d:"M21.8701 11.496C21.2301 10.386 17.7101 4.81597 11.7301 4.99597C6.20007 5.13597 3.00007 9.99597 2.13007 11.496C2.0423 11.648 1.99609 11.8204 1.99609 11.996C1.99609 12.1715 2.0423 12.3439 2.13007 12.496C2.76007 13.586 6.13007 18.996 12.0201 18.996H12.2701C17.8001 18.856 21.0101 13.996 21.8701 12.496C21.9577 12.3439 22.0039 12.1715 22.0039 11.996C22.0039 11.8204 21.9577 11.648 21.8701 11.496ZM12.2201 16.996C7.91007 17.096 5.10007 13.406 4.22007 11.996C5.22007 10.386 7.83007 7.09597 11.8301 6.99597C16.1201 6.88597 18.9401 10.586 19.8301 11.996C18.8001 13.606 16.2201 16.896 12.2201 16.996Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12 8.49994C11.5404 8.49994 11.0852 8.59047 10.6606 8.76636C10.236 8.94225 9.85013 9.20006 9.52513 9.52506C9.20012 9.85007 8.94231 10.2359 8.76642 10.6605C8.59053 11.0852 8.5 11.5403 8.5 11.9999C8.5 12.4596 8.59053 12.9147 8.76642 13.3393C8.94231 13.764 9.20012 14.1498 9.52513 14.4748C9.85013 14.7998 10.236 15.0576 10.6606 15.2335C11.0852 15.4094 11.5404 15.4999 12 15.4999C12.9283 15.4999 13.8185 15.1312 14.4749 14.4748C15.1313 13.8184 15.5 12.9282 15.5 11.9999C15.5 11.0717 15.1313 10.1814 14.4749 9.52506C13.8185 8.86869 12.9283 8.49994 12 8.49994ZM12 13.4999C11.6022 13.4999 11.2206 13.3419 10.9393 13.0606C10.658 12.7793 10.5 12.3978 10.5 11.9999C10.5 11.6021 10.658 11.2206 10.9393 10.9393C11.2206 10.658 11.6022 10.4999 12 10.4999C12.3978 10.4999 12.7794 10.658 13.0607 10.9393C13.342 11.2206 13.5 11.6021 13.5 11.9999C13.5 12.3978 13.342 12.7793 13.0607 13.0606C12.7794 13.3419 12.3978 13.4999 12 13.4999Z",fill:"currentColor"})]})}function $(t){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,s.jsx)("path",{d:"M4.70985 3.28579C4.61661 3.19255 4.50592 3.11859 4.3841 3.06813C4.26227 3.01767 4.13171 2.9917 3.99985 2.9917C3.86799 2.9917 3.73742 3.01767 3.6156 3.06813C3.49377 3.11859 3.38308 3.19255 3.28985 3.28579C3.10154 3.47409 2.99575 3.72949 2.99575 3.99579C2.99575 4.26209 3.10154 4.51749 3.28985 4.70579L8.91985 10.3358C8.56365 10.9984 8.43043 11.7582 8.53993 12.5024C8.64944 13.2467 8.99583 13.9359 9.52778 14.4679C10.0597 14.9998 10.7489 15.3462 11.4932 15.4557C12.2375 15.5652 12.9972 15.432 13.6598 15.0758L19.2898 20.7058C19.3828 20.7995 19.4934 20.8739 19.6153 20.9247C19.7371 20.9754 19.8678 21.0016 19.9998 21.0016C20.1319 21.0016 20.2626 20.9754 20.3844 20.9247C20.5063 20.8739 20.6169 20.7995 20.7098 20.7058C20.8033 20.6127 20.8775 20.502 20.9281 20.3802C20.9788 20.2584 21.0048 20.1277 21.0048 19.9958C21.0048 19.8639 20.9788 19.7332 20.9281 19.6114C20.8775 19.4895 20.8033 19.3789 20.7098 19.2858L4.70985 3.28579ZM11.9998 13.4958C11.602 13.4958 11.2205 13.3378 10.9392 13.0565C10.6579 12.7751 10.4998 12.3936 10.4998 11.9958V11.9258L12.0598 13.4858L11.9998 13.4958Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12.2201 16.997C7.92007 17.097 5.10007 13.407 4.22007 11.997C4.84707 10.997 5.60007 10.084 6.46007 9.27695L5.00007 7.86695C3.87139 8.93042 2.90448 10.1534 2.13007 11.497C2.0423 11.649 1.99609 11.8214 1.99609 11.997C1.99609 12.1725 2.0423 12.3449 2.13007 12.497C2.76007 13.587 6.13007 18.997 12.0201 18.997H12.2701C13.3776 18.9641 14.4708 18.7373 15.5001 18.327L13.9201 16.747C13.3644 16.8931 12.7943 16.977 12.2201 16.997Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M21.87 11.4958C21.23 10.3858 17.7 4.8158 11.73 4.9958C10.6225 5.02865 9.52924 5.25541 8.5 5.6658L10.08 7.2458C10.6356 7.09963 11.2058 7.01578 11.78 6.9958C16.07 6.8858 18.89 10.5858 19.78 11.9958C19.138 12.9981 18.3682 13.9124 17.49 14.7158L19 16.1258C20.1428 15.0651 21.1234 13.842 21.91 12.4958C21.9918 12.3403 22.0311 12.166 22.0241 11.9904C22.0171 11.8149 21.9639 11.6443 21.87 11.4958Z",fill:"currentColor"})]})}function O(t){return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...t,children:[(0,s.jsx)("path",{d:"M12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5C11 5.26522 11.1054 5.51957 11.2929 5.70711C11.4804 5.89464 11.7348 6 12 6C12.2652 6 12.5196 5.89464 12.7071 5.70711C12.8946 5.51957 13 5.26522 13 5V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M21.0002 11H19.0002C18.735 11 18.4806 11.1054 18.2931 11.2929C18.1055 11.4804 18.0002 11.7348 18.0002 12C18.0002 12.2652 18.1055 12.5196 18.2931 12.7071C18.4806 12.8946 18.735 13 19.0002 13H21.0002C21.2654 13 21.5197 12.8946 21.7073 12.7071C21.8948 12.5196 22.0002 12.2652 22.0002 12C22.0002 11.7348 21.8948 11.4804 21.7073 11.2929C21.5197 11.1054 21.2654 11 21.0002 11Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M6 12C6 11.7348 5.89464 11.4804 5.70711 11.2929C5.51957 11.1054 5.26522 11 5 11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5C5.26522 13 5.51957 12.8946 5.70711 12.7071C5.89464 12.5196 6 12.2652 6 12Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M6.22009 5.00298C6.02357 4.82786 5.76656 4.7362 5.50358 4.74744C5.2406 4.75869 4.99234 4.87196 4.8115 5.06322C4.63065 5.25447 4.53143 5.50867 4.5349 5.77187C4.53838 6.03507 4.64426 6.28656 4.83009 6.47298L6.27009 7.86298C6.36673 7.95629 6.48117 8.02917 6.60659 8.07728C6.73201 8.12538 6.86584 8.14773 7.00009 8.14298C7.1348 8.14246 7.26801 8.11474 7.39173 8.06147C7.51546 8.0082 7.62714 7.93048 7.72009 7.83298C7.90634 7.64561 8.01088 7.39216 8.01088 7.12798C8.01088 6.86379 7.90634 6.61034 7.72009 6.42298L6.22009 5.00298Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M17 8.14285C17.2575 8.14182 17.5047 8.04153 17.69 7.86285L19.13 6.47285C19.3057 6.2893 19.4049 6.04577 19.4075 5.79172C19.4102 5.53767 19.316 5.29214 19.1441 5.10502C18.9723 4.91789 18.7356 4.80319 18.4823 4.78421C18.2289 4.76524 17.9779 4.84341 17.78 5.00285L16.34 6.42285C16.1538 6.61021 16.0493 6.86366 16.0493 7.12785C16.0493 7.39203 16.1538 7.64548 16.34 7.83285C16.5132 8.01557 16.7489 8.12627 17 8.14285Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12 17.9999C11.7348 17.9999 11.4804 18.1053 11.2929 18.2928C11.1054 18.4803 11 18.7347 11 18.9999V20.9999C11 21.2651 11.1054 21.5195 11.2929 21.707C11.4804 21.8946 11.7348 21.9999 12 21.9999C12.2652 21.9999 12.5196 21.8946 12.7071 21.707C12.8946 21.5195 13 21.2651 13 20.9999V18.9999C13 18.7347 12.8946 18.4803 12.7071 18.2928C12.5196 18.1053 12.2652 17.9999 12 17.9999Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M17.7302 16.1399C17.5392 15.9556 17.2829 15.8547 17.0175 15.8594C16.7521 15.864 16.4995 15.974 16.3152 16.1649C16.1309 16.3559 16.0299 16.6122 16.0346 16.8776C16.0393 17.143 16.1492 17.3956 16.3402 17.5799L17.7802 18.9999C17.9702 19.1835 18.2251 19.2845 18.4893 19.2808C18.7535 19.277 19.0055 19.1688 19.1902 18.9799C19.2837 18.8868 19.3579 18.7762 19.4085 18.6543C19.4591 18.5325 19.4851 18.4019 19.4851 18.2699C19.4851 18.138 19.4591 18.0073 19.4085 17.8855C19.3579 17.7637 19.2837 17.653 19.1902 17.5599L17.7302 16.1399Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M6.27011 16.141L4.83011 17.531C4.73638 17.624 4.66198 17.7346 4.61121 17.8564C4.56045 17.9783 4.53431 18.109 4.53431 18.241C4.53431 18.373 4.56045 18.5037 4.61121 18.6256C4.66198 18.7474 4.73638 18.858 4.83011 18.951C4.9239 19.0467 5.03596 19.1226 5.15965 19.1741C5.28333 19.2256 5.41612 19.2518 5.55011 19.251C5.79662 19.2531 6.03522 19.1641 6.22011 19.001L7.66011 17.611C7.75466 17.5197 7.83031 17.4107 7.88273 17.2902C7.93516 17.1697 7.96334 17.0401 7.96566 16.9087C7.96798 16.7773 7.9444 16.6467 7.89626 16.5244C7.84813 16.4022 7.77637 16.2905 7.68511 16.196C7.59384 16.1014 7.48484 16.0258 7.36433 15.9734C7.24383 15.9209 7.11418 15.8928 6.98278 15.8904C6.85139 15.8881 6.72082 15.9117 6.59854 15.9598C6.47626 16.008 6.36466 16.0797 6.27011 16.171V16.141Z",fill:"currentColor"})]})}function F(t){let{className:e,...a}=t;return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:I("size-6",e),...a,children:[(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0625 1.70412C12.1393 1.70359 12.2136 1.7151 12.2842 1.73439C12.6576 1.76978 13.0261 1.88527 13.3604 2.08303L19.7012 5.84084L19.7031 5.84181C20.1036 6.08032 20.4348 6.42322 20.665 6.83498C20.8952 7.24671 21.0168 7.71415 21.0166 8.19142V8.19338L20.998 15.7403C20.9979 16.1352 20.9124 16.526 20.751 16.8848C20.7319 16.9557 20.7049 17.026 20.667 17.0928C20.6355 17.1482 20.5983 17.1987 20.5576 17.2442C20.3296 17.6 20.023 17.8979 19.6631 18.1133L13.2998 21.9072C12.4738 22.3996 11.4611 22.4004 10.6436 21.917L10.6416 21.916L4.30078 18.1582L4.29883 18.1572C3.91023 17.9258 3.58764 17.5957 3.3584 17.2002C3.35105 17.1885 3.34181 17.1773 3.33496 17.1651C3.32803 17.1526 3.32268 17.1387 3.31641 17.126C3.09976 16.7236 2.98517 16.2703 2.98535 15.8076V15.8057L3.00391 8.25588C3.00603 7.28279 3.51293 6.37777 4.33984 5.88478L10.7021 2.09181C11.0682 1.87369 11.4708 1.75231 11.877 1.72658C11.9365 1.71245 11.999 1.70462 12.0625 1.70412ZM5.16895 7.36818C4.87108 7.54583 4.6844 7.87497 4.68359 8.23635L4.66602 15.3838L9.45801 12.5254C9.51085 12.7718 9.60256 13.0142 9.73535 13.2442C9.90127 13.5315 10.1161 13.7727 10.3633 13.9639L5.49512 16.8662L11.499 20.4248C11.8036 20.6044 12.1738 20.6008 12.4707 20.4238L18.5107 16.8233L13.4971 13.877C13.9543 13.482 14.2391 12.9423 14.3242 12.3672L19.3193 15.3037L19.3379 8.21291L19.3369 8.21388C19.3369 8.03517 19.2923 7.85955 19.2061 7.7051C19.1196 7.55056 18.9947 7.42151 18.8447 7.33205L12.8887 3.80275L12.8535 9.73439C12.3304 9.51037 11.7366 9.46806 11.1738 9.63576L11.21 3.76662L5.16895 7.36818Z",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91641 8.60885C11.7928 7.52595 14.1912 8.16845 15.2748 10.0444C16.3582 11.9209 15.7156 14.3211 13.8393 15.4047C11.9627 16.4879 9.56339 15.8446 8.47989 13.9682C7.39671 12.0916 8.03987 9.69227 9.91641 8.60885ZM13.8031 10.894C13.189 9.83118 11.8293 9.46704 10.766 10.0805C9.7026 10.6945 9.33693 12.0551 9.95059 13.1186C10.5646 14.1821 11.9261 14.5469 12.9897 13.9331C14.0529 13.3189 14.4171 11.9575 13.8031 10.894Z",fill:"currentColor"})]})}let V="var(--v-borders-medium)";function D(t){let{className:e,variant:a="default",size:r="default",state:i="loading",role:o,"aria-live":n,"aria-label":l,...d}=t;switch(a){case"logo":{let t="sm"===r?4:5;return(0,s.jsxs)("svg",{...d,role:o??"status","aria-live":n??"polite","aria-label":l??("success"===i?"Success":"error"===i?"Error":"Loading"),width:"93",height:"91",viewBox:"0 0 93 91",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-slot":"spinner","data-size":r,"data-state":i,className:I("spinner-logo shrink-0","sm"===r?"size-9":"size-22",e),children:[(0,s.jsx)("g",{className:"spinner-logo__intro-shell",children:(0,s.jsx)("path",{d:"M15.7495 62.7798L46.4936 45.0297M46.4936 45.0297L77.2661 62.5451M46.4936 45.0297L46.7111 9.62225M49.9213 79.4237L74.5719 65.1917C75.6436 64.5705 76.5344 63.6811 77.1541 62.6137C77.7738 61.5462 78.1003 60.3385 78.1007 59.1129L78.1729 30.7811C78.1734 29.5494 77.851 28.3427 77.2373 27.2798C76.6236 26.2169 75.7398 25.3343 74.6729 24.7189L50.1007 10.6155C47.926 9.3694 45.2455 9.37719 43.0689 10.6339L18.4183 24.8659C16.2385 26.1244 14.8946 28.4401 14.8895 30.9447L14.8173 59.2766C14.8168 60.5082 15.1392 61.7149 15.7529 62.7778C16.3666 63.8408 17.2504 64.7233 18.3173 65.3387L42.8895 79.4421C45.0642 80.6882 47.7447 80.6805 49.9213 79.4237Z",className:"spinner-logo__outline spinner-logo__outline--intro",vectorEffect:"sm"===r?void 0:"non-scaling-stroke"})}),(0,s.jsx)("circle",{className:"spinner-logo__intro-orb",cx:"46.27",cy:"45.8",r:"11.18",fill:"white",stroke:V,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("circle",{className:"spinner-logo__result-ring",cx:"46.5",cy:"45.5",r:"33.46",fill:"white",stroke:V,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("g",{transform:"translate(27.786 31.4489)",children:(0,s.jsx)("g",{className:"spinner-logo__result-glyph spinner-logo__result-glyph--success",children:(0,s.jsx)("path",{d:"M13.6758 28.1023C13.3559 28.101 13.0397 28.0341 12.7467 27.9057C12.4537 27.7772 12.1902 27.59 11.9725 27.3557L0.632479 15.2923C0.208575 14.8406 -0.0185097 14.2389 0.00118164 13.6198C0.020873 13.0006 0.285727 12.4146 0.737479 11.9907C1.18923 11.5668 1.79088 11.3397 2.41006 11.3594C3.02924 11.3791 3.61524 11.6439 4.03915 12.0957L13.6525 22.339L33.2758 0.87233C33.475 0.624349 33.7227 0.419696 34.0038 0.270944C34.2849 0.122191 34.5935 0.0324784 34.9105 0.00731496C35.2276 -0.0178485 35.5464 0.0220682 35.8475 0.124615C36.1485 0.227162 36.4254 0.390174 36.6612 0.603637C36.897 0.8171 37.0866 1.07651 37.2185 1.36593C37.3503 1.65535 37.4216 1.96867 37.428 2.28665C37.4344 2.60463 37.3756 2.92056 37.2555 3.21502C37.1353 3.50949 36.9562 3.77627 36.7291 3.999L15.4025 27.3323C15.1868 27.5709 14.9242 27.7625 14.6311 27.895C14.338 28.0275 14.0208 28.0981 13.6991 28.1023H13.6758Z",fill:V})})}),(0,s.jsx)("g",{transform:"translate(32.4879 31.4885)",children:(0,s.jsx)("g",{className:"spinner-logo__result-glyph spinner-logo__result-glyph--error",children:(0,s.jsx)("path",{d:"M17.3045 14.0095L27.3378 3.99955C27.5554 3.78199 27.728 3.52371 27.8457 3.23946C27.9635 2.95521 28.0241 2.65055 28.0241 2.34288C28.0241 2.03521 27.9635 1.73055 27.8457 1.4463C27.728 1.16205 27.5554 0.903769 27.3378 0.686213C27.1203 0.468656 26.862 0.296082 26.5778 0.178341C26.2935 0.0606 25.9889 -4.58466e-09 25.6812 0C25.3735 4.58466e-09 25.0689 0.0606 24.7846 0.178341C24.5003 0.296082 24.2421 0.468656 24.0245 0.686213L14.0145 10.7195L4.00451 0.686213C3.56514 0.246838 2.96921 -4.62957e-09 2.34784 0C1.72647 4.62957e-09 1.13055 0.246838 0.691177 0.686213C0.251802 1.12559 0.0049634 1.72151 0.0049634 2.34288C0.00496339 2.96425 0.251802 3.56017 0.691177 3.99955L10.7245 14.0095L0.691177 24.0195C0.472196 24.2363 0.29836 24.4943 0.179723 24.7787C0.0610849 25.063 0 25.3681 0 25.6762C0 25.9843 0.0610849 26.2894 0.179723 26.5737C0.29836 26.8581 0.472196 27.1161 0.691177 27.3329C0.908091 27.5516 1.16616 27.7252 1.4505 27.8436C1.73484 27.9621 2.03982 28.0231 2.34784 28.0231C2.65587 28.0231 2.96085 27.9621 3.24519 27.8436C3.52953 27.7252 3.7876 27.5516 4.00451 27.3329L14.0145 17.2995L24.0245 27.3329C24.296 27.6078 24.6314 27.8111 25.0007 27.9245C25.3701 28.0379 25.7618 28.0579 26.1407 27.9828C26.5197 27.9077 26.8741 27.7397 27.1722 27.4939C27.4703 27.2481 27.7028 26.9322 27.8488 26.5745C28.0272 26.1459 28.0736 25.6738 27.9821 25.2187C27.8907 24.7636 27.6655 24.346 27.3355 24.0195L17.3045 14.0095Z",fill:V})})})]})}case"default":return(0,s.jsx)(O,{...d,role:o??"status","aria-live":n??"polite","aria-label":l??"Loading","data-slot":"spinner",className:I("size-4 animate-spin",e)});default:return a}}function X(t){let{...e}=t;return(0,s.jsx)(b.bL,{"data-slot":"dialog",...e})}function Y(t){let{...e}=t;return(0,s.jsx)(b.ZL,{"data-slot":"dialog-portal",...e})}function W(t){let{...e}=t;return(0,s.jsx)(b.bm,{"data-slot":"dialog-close",...e})}function K(t){let{className:e,...a}=t;return(0,s.jsx)(b.hJ,{"data-slot":"dialog-overlay",className:I("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function J(t){let{className:e,children:a,contentInsideOverlay:r=!1,showCloseButton:i=!0,portalContainer:o,...n}=t,l=(0,s.jsxs)(b.UC,{"data-slot":"dialog-content",className:I("bg-background-containers data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-3xl border-0 p-6 shadow-[var(--shadow-login)] duration-200 outline-none sm:max-w-120 sm:p-10",e),...n,children:[a,i&&(0,s.jsxs)(b.bm,{"data-slot":"dialog-close",className:"focus-visible:ring-ring/30 absolute top-4 right-4 inline-flex size-6 cursor-pointer items-center justify-center rounded-full text-icons-light transition-colors hover:text-icons-normal focus-visible:text-icons-dark focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,s.jsx)(m.A,{className:"size-6"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]});return(0,s.jsx)(Y,{"data-slot":"dialog-portal",container:o,children:r?(0,s.jsx)(K,{children:l}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(K,{}),l]})})}let G=/oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)/;function Q(t,e){let a=t.match(G);return a?{l:Number.parseFloat(a[1]),c:Number.parseFloat(a[2]),h:Number.parseFloat(a[3])}:{l:e[0],c:e[1],h:e[2]}}function tt(t){let{data:e,foreground:a,background:r,robustness:i="M",className:o,...n}=t,[d,c]=(0,l.useState)(null);return((0,l.useEffect)(()=>{(async()=>{try{let t=getComputedStyle(document.documentElement),o=a??t.getPropertyValue("--foreground"),n=r??t.getPropertyValue("--background"),s=Q(o,[.21,.006,285.885]),l=Q(n,[.985,0,0]),d=await z.toString(e,{type:"svg",color:{dark:(0,k.NNP)((0,k.yLC)({mode:"oklch",...s})),light:(0,k.NNP)((0,k.yLC)({mode:"oklch",...l}))},width:200,errorCorrectionLevel:i,margin:0});c(d)}catch(t){console.error(t)}})()},[e,a,r,i]),d)?(0,s.jsx)("div",{className:I("size-full","[&_svg]:size-full",o),dangerouslySetInnerHTML:{__html:d},...n}):null}function te(t){return C.A.create({baseURL:t,timeout:3e4})}let ta=new Set(["common","delete","get","head","post","put","patch","options","purge","link","unlink"]);function tr(){var t,e;return null==(e=globalThis.process)||null==(t=e.env)?void 0:t.NODE_ENV}function ti(t){if(void 0===t)return[];let e="function"==typeof t.toJSON?t.toJSON():t,a=[];return!function t(e,a){if(null!==e&&"object"==typeof e)for(let[r,i]of Object.entries(e)){if(null==i)continue;let e=r.toLowerCase();if("common"===e){t(i,a);continue}ta.has(e)||a.push([r,String(i)])}}(e,a),a}function to(t){var e;return!!("u">typeof FormData&&t instanceof FormData)||null!==t&&"object"==typeof t&&((null==(e=t.constructor)?void 0:e.name)==="FormData"||"function"==typeof t.getBoundary)}let tn=new Set(["authorization","cookie","set-cookie","x-xsrf-token"]);function ts(t){if(null==t)return;let e="function"==typeof t.toJSON?t.toJSON():t;if(null===e||"object"!=typeof e)return;let a={};for(let[t,r]of Object.entries(e))null!=r&&(a[t]=tn.has(t.toLowerCase())?"[redacted]":String(r));return a}function tl(t){if(null!=t){if("string"==typeof t)try{return JSON.parse(t)}catch{return t.length>2e3?`${t.slice(0,2e3)}… (${t.length} chars)`:t}return to(t)?"[FormData]":t}}function td(t){let e=(t.requestConfig.method??"GET").toUpperCase(),a=t.requestConfig.url??"",r=`[api:server] ${e} ${a} → ${t.status} (${t.durationMs}ms)`,i={requestId:t.requestId,...t.error?{error:t.error}:{},params:t.requestConfig.params,requestBody:tl(t.requestConfig.data),requestHeaders:ts(t.requestConfig.headers),responseHeaders:ts(t.responseHeaders),responseBody:tl(t.responseBody)};(t.status>=500||void 0!==t.error&&0===t.status?console.error:t.status>=400?console.warn:console.log)(r,i)}function tc(t){let{clientName:e,configureFunctionName:a,defaultBaseURL:r}=t,i=te(r),o=te(r),n=null,s=null,l=null,d=null,c=null,u=null;async function p(t,e){let a=function(t,e){let a;if(void 0===e.data||to(e.data))return e;let r=j.$t.from(e.headers);return r.has("Content-Type")||void 0!==(a=t.defaults.headers.common)&&j.$t.from(a).has("Content-Type")||r.set("Content-Type","application/json"),e.headers=r,e}(t,function(t){let e=j.$t.from(t.headers);if(null!==l){var a;let t=null==(a=l())?void 0:a.trim();t&&!e.has("Authorization")&&e.set("Authorization",`Bearer ${t}`)}if(null!==u)for(let[a,r]of Object.entries(u({url:t.url,method:t.method})))r&&!e.has(a)&&e.set(a,r);return t.headers=e,t}({...e})),r=function(t){let e,a=j.$t.from(t.headers),r=a.get("x-request-id");if("string"==typeof r&&r.length>0)return r;let i="function"==typeof(null==(e=globalThis.crypto)?void 0:e.randomUUID)?e.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`;return a.set("x-request-id",i),t.headers=a,i}(a),i=function(){var t;if("u">typeof window)return!1;let e=tr(),a=globalThis.process;return(null==a||null==(t=a.env)?void 0:t.DEBUG_API)==="true"||"production"!==e&&"test"!==e&&"testing"!==e}(),o=i?Date.now():0;try{let e=await t.request(a);return i&&td({requestConfig:a,requestId:r,status:e.status,durationMs:Date.now()-o,responseHeaders:e.headers,responseBody:e.data}),e}catch(t){var n,s,d;throw i&&td({requestConfig:a,requestId:r,status:(null==(n=t.response)?void 0:n.status)??0,durationMs:Date.now()-o,responseHeaders:null==(s=t.response)?void 0:s.headers,responseBody:null==(d=t.response)?void 0:d.data,error:t.message}),t}}async function g(t){return p(t.skipUnauthorizedRecovery?o:i,function(t){let{skipUnauthorizedRecovery:e,...a}=t;return a}(t))}let v=async t=>g({...t,skipUnauthorizedRecovery:!0});function h(){return null!==n}return{configureClientRuntime:function(t){let a,r=(a=function(t){let e=ti(t);if(0===e.length)return;let a=new Map;for(let[t,r]of e)a.set(t.toLowerCase(),r);return Object.fromEntries(Array.from(a.entries()).sort((t,e)=>{let[a]=t,[r]=e;return a.localeCompare(r)}))}(t.headers),JSON.stringify({...void 0!==t.baseURL?{baseURL:t.baseURL}:{},...void 0!==t.timeout?{timeout:t.timeout}:{},...void 0!==a?{headers:a}:{}}));if("{}"!==r){if(null!==n){if(n===r)return;let t=`${e} already configured. Existing: ${n}. New: ${r}.`;if("production"===tr())return void console.warn(t);throw Error(t)}for(let e of[i,o])void 0!==t.baseURL&&(e.defaults.baseURL=t.baseURL),void 0!==t.timeout&&(e.defaults.timeout=t.timeout),void 0!==t.headers&&function(t,e){let a=t.defaults.headers,r=a.common,i=j.$t.from(r);for(let[t,a]of ti(e))i.set(t,a);a.common=i.toJSON(),t.defaults.headers=a}(e,t.headers);n=r}},configureAccessTokenResolverRuntime:function(t){l=t},configureUnauthorizedHandlerRuntime:function(t){if(d=t,null===t){null!==s&&(i.interceptors.response.eject(s),s=null),c=null;return}null===s&&(s=i.interceptors.response.use(t=>t,async t=>{var e;let a=t.config;if((null==(e=t.response)?void 0:e.status)!==401||null===d||void 0===a||a._apiRetried)return Promise.reject(t);if(null===c){let e=d;if(null===e)return Promise.reject(t);c=Promise.resolve().then(()=>e(t,{requestWithoutUnauthorizedRecovery:v})).finally(()=>{c=null})}try{if(!await c)return Promise.reject(t);a._apiRetried=!0;let e=j.$t.from(a.headers);return e.delete("Authorization"),a.headers=e,p(i,a)}catch{return Promise.reject(t)}}))},configureHeadersResolverRuntime:function(t){u=t},isClientConfiguredRuntime:h,assertClientConfiguredRuntime:function(){if(!h())throw Error(`${e} is not configured. Call ${a}(...) before making requests.`)},resetClientForTestsRuntime:function(){let t;if("test"!==(t=tr())&&"testing"!==t)throw Error("resetApiClientForTests() can only be called in test environment.");i=te(r),o=te(r),n=null,s=null,l=null,d=null,c=null,u=null},requestRuntime:g,requestWithoutUnauthorizedRecovery:v,addResponseInterceptorRuntime:function(t,e){return i.interceptors.response.use(t,e)}}}let tu=tc({clientName:"API node client",configureFunctionName:"configureNodeApiClient",defaultBaseURL:"https://api.vizbl.com"});tu.configureClientRuntime,tu.configureAccessTokenResolverRuntime,tu.configureHeadersResolverRuntime,tu.configureUnauthorizedHandlerRuntime,tu.isClientConfiguredRuntime,tu.assertClientConfiguredRuntime,tu.resetClientForTestsRuntime;let tp=tu.requestRuntime;async function tg(t){return tp(t)}async function tv(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{client:a=tg,...r}=e;return(await a({method:"POST",url:"/public/widget/activate-core",params:t,...r})).data}async function th(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{client:a=tg,...r}=e;return(await a({method:"POST",url:"/public/widget/token",data:t,...r})).data}async function tw(t,e){let{tinuuid:a}=t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{client:i=tg,...o}=r;return(await i({method:"GET",url:`/public/objects/by-tinuuid/${a}`,params:e,...o})).data}function tf(t){var e;if((0,j.F0)(t))return null==(e=t.response)?void 0:e.status}tu.requestWithoutUnauthorizedRecovery,tu.addResponseInterceptorRuntime;let tb=new Set(["core-ar","core-ar-shopify"]);async function tm(t,e){let a=await tv({mode:t},e);if("string"!=typeof a.productType||!tb.has(a.productType))throw TypeError("The API key is not enabled for Core AR");return tj(a.widgetSession)}class tx{get token(){return this.session.token}get sid(){return this.session.sid}get snapshot(){return{...this.session}}async getTokenForRequest(){return this.session.expiresAt-this.now()>this.refreshThresholdMs?this.session.token:(await this.refresh()).token}async getRequestConfig(t){return{baseURL:this.apiBaseUrl,headers:{"x-widget-session-token":await this.getTokenForRequest()},signal:t}}async recoverFromExpiry(t){try{await this.refresh()}catch{this.session=this.toSnapshot(await tm(this.mode,{baseURL:this.apiBaseUrl,headers:{"x-api-key":this.apiKey},signal:t}))}}refresh(){return this.refreshPromise||(this.refreshPromise=this.issueWidgetToken({mode:this.mode,token:this.session.token},{baseURL:this.apiBaseUrl,headers:{"x-api-key":this.apiKey}}).then(t=>this.toSnapshot(tj(t))).then(t=>(this.session=t,this.snapshot)).finally(()=>{this.refreshPromise=null})),this.refreshPromise}toSnapshot(t){return{...t,expiresAt:this.now()+1e3*t.expiresIn}}constructor(t,e){(0,n._)(this,"apiBaseUrl",void 0),(0,n._)(this,"apiKey",void 0),(0,n._)(this,"issueWidgetToken",void 0),(0,n._)(this,"mode",void 0),(0,n._)(this,"now",void 0),(0,n._)(this,"refreshThresholdMs",void 0),(0,n._)(this,"refreshPromise",null),(0,n._)(this,"session",void 0),this.apiBaseUrl=e.apiBaseUrl,this.apiKey=e.apiKey,this.issueWidgetToken=e.issueWidgetToken??th,this.mode=e.mode,this.now=e.now??Date.now,this.refreshThresholdMs=e.refreshThresholdMs??3e4,this.session=this.toSnapshot(t)}}async function ty(t){let{apiBaseUrl:e,apiKey:a,initialWidgetSessionToken:r,mode:i,signal:o}=t;return r?new tx({expiresIn:900,sid:r,token:r},{apiBaseUrl:e,apiKey:a,mode:i}):new tx(await tm(i,{baseURL:e,headers:{"x-api-key":a},signal:o}),{apiBaseUrl:e,apiKey:a,mode:i})}async function tk(t,e,a,r){try{return await tz(t,e,a,r)}catch(i){if(401!==tf(i))throw i;return await a.recoverFromExpiry(r),tz(t,e,a,r)}}async function tz(t,e,a,r){return tw({tinuuid:t},{productType:"core-ar",variantId:e??void 0},await a.getRequestConfig(r))}async function tC(t,e){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)try{let r=await t.getRequestConfig(),i=new URL("/public/widget/events",r.baseURL??window.location.origin),o=await fetch(i,{body:JSON.stringify({event:e,objectId:a.objectId??void 0,timestamp:new Date().toISOString(),variantId:a.variantId??void 0}),headers:{"Content-Type":"application/json",...r.headers},keepalive:!0,method:"POST"});if(!o.ok)throw Error(`Widget event request failed with ${o.status}`)}catch{}}function tj(t){if(!t||"object"!=typeof t||"string"!=typeof t.token||!t.token.trim()||"string"!=typeof t.sid||!t.sid.trim()||"number"!=typeof t.expiresIn||!Number.isFinite(t.expiresIn)||t.expiresIn<=0)throw TypeError("Invalid widget session response");return t}let t_=tc({clientName:"API client",configureFunctionName:"configureApiClient",defaultBaseURL:"https://api.vizbl.com/v1"});t_.configureClientRuntime,t_.configureAccessTokenResolverRuntime,t_.configureHeadersResolverRuntime,t_.configureUnauthorizedHandlerRuntime,t_.isClientConfiguredRuntime,t_.assertClientConfiguredRuntime,t_.resetClientForTestsRuntime;let tL=t_.requestRuntime;async function tN(t){return tL(t)}async function tS(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{client:a=tN,...r}=e;return(await a({method:"POST",url:"/obj/Fetch",data:t,...r})).data}t_.requestWithoutUnauthorizedRecovery,t_.addResponseInterceptorRuntime;let tM="vizbl-model-viewer-blank-canvas-recovery",tR=(0,l.createContext)(null);function tU(t){var e,a,r,i;let{children:o,tinuuid:n,apiKey:d,appClipBundleId:c,arExperience:p,apiBaseUrl:g,legacyApiBaseUrl:v,mode:h,initialWidgetSessionToken:w,handoffUrl:f,hid:b,launchAr:m,layout:x,background:y,sizeType:k,dimensionAxes:z,cameraOrbit:C,minCameraOrbit:_,maxCameraOrbit:L,viewerSurface:N}=t,{object:S,material:M,error:R,isLoading:U,setMaterialHid:A,widgetSession:T}=function(t,e,a){let[r,i]=(0,l.useState)(e??null),{data:o=null,error:n,isLoading:s}=(0,u.I)({queryKey:["modelViewer","object",{apiBaseUrl:a.apiBaseUrl??null,apiKey:a.apiKey,initialHid:e??null,initialWidgetSessionToken:a.initialWidgetSessionToken??null,legacyApiBaseUrl:a.legacyApiBaseUrl??null,mode:a.mode,tinuuid:t}],enabled:!!t,gcTime:0,refetchOnMount:"always",queryFn:async r=>{let{signal:i}=r;if(!a.apiKey)return{object:await tS({tinuuid:t},{baseURL:a.legacyApiBaseUrl,signal:i}),widgetSession:null};let o=await ty({apiBaseUrl:a.apiBaseUrl,apiKey:a.apiKey,initialWidgetSessionToken:a.initialWidgetSessionToken,mode:a.mode,signal:i});return{object:await tk(t,e,o,i),widgetSession:o}}}),d=(null==o?void 0:o.object)??null,c=(0,l.useMemo)(()=>{var t,e;return(null==d||null==(t=d.materials)?void 0:t.length)?r?d.materials.find(t=>t.hid===r)||d.materials[0]:(null==(e=d.materials)?void 0:e[0])??null:null},[r,d]);return(0,l.useEffect)(()=>{i(e??null)},[e,t]),{object:d,material:c,error:n,isLoading:s,setMaterialHid:i,widgetSession:(null==o?void 0:o.widgetSession)??null}}(n,b,{apiBaseUrl:g,apiKey:d,initialWidgetSessionToken:w,legacyApiBaseUrl:v,mode:h}),[E,P]=(0,l.useState)(!0),[I,B]=(0,l.useState)(null),[Z,q]=(0,l.useState)(null),H=(0,l.useRef)(null),$=(0,l.useRef)(null),O=(null==M||null==(e=M.native)?void 0:e.glbUrl)??null,F=(null==M||null==(a=M.native)?void 0:a.usdzUrl)??null,V=(null==M||null==(i=M.previews)||null==(r=i[0])?void 0:r.url)??null,D=(0,l.useMemo)(()=>{var t,e;if(U)return"loading";let a=function(t){var e;if(!(0,j.F0)(t))return null;let a=null==(e=t.response)?void 0:e.status;return 401===a?"unauthorized":403===a?"forbidden":402===a?"payment-required":null}(R);if(a)return a;let r="ar-view"===h||"qr-code"===h&&"standard"===p,i="advanced-ar-view"===h||"qr-code"===h&&"advanced"===p;return r&&(null==S||null==(t=S.policy)?void 0:t.instantArView)===!1||(i||"ar-viewer"===h)&&(null==S||null==(e=S.policy)?void 0:e.appClip)===!1?"forbidden":null==R&&S&&M&&O?"ready":"not-found"},[p,R,O,U,M,h,S]),X=(0,l.useCallback)(t=>tC(T,t,{objectId:null==S?void 0:S.uuid,variantId:null==M?void 0:M.hid}),[null==M?void 0:M.hid,null==S?void 0:S.uuid,T]),Y=(0,l.useCallback)(t=>{t!==(null==M?void 0:M.hid)&&(A(t),tC(T,"interacted",{objectId:null==S?void 0:S.uuid,variantId:t}))},[null==M?void 0:M.hid,null==S?void 0:S.uuid,A,T]);(0,l.useEffect)(()=>{"inline"!==N&&"ready"===D&&T&&$.current!==T.sid&&(X("widget_opened"),$.current=T.sid)},[D,X,N,T]),(0,l.useEffect)(()=>{H.current=null},[null==T?void 0:T.sid]),(0,l.useEffect)(()=>{P("ready"===D&&!!O)},[O,D]),(0,l.useEffect)(()=>{if(!Z)return;let t=t=>{var e;let a=null==(e=t.detail)?void 0:e.totalProgress;void 0!==a&&P(a<1)},e=()=>{P(!1),window.setTimeout(()=>{(function(t){var e;let a=null==(e=t.shadowRoot)?void 0:e.querySelector("canvas.show");if(!a||0===a.width||0===a.height)return!1;let r=a.getContext("webgl2")??a.getContext("webgl");if(!r)return!1;let i=Math.min(64,a.width,a.height),o=Math.max(0,Math.floor((a.width-i)/2)),n=Math.max(0,Math.floor((a.height-i)/2)),s=new Uint8Array(i*i*4);r.readPixels(o,n,i,i,r.RGBA,r.UNSIGNED_BYTE,s);for(let t=0;t<s.length;t+=4)if(s[t]>8||s[t+1]>8||s[t+2]>8||s[t+3]>8)return!1;return!0})(Z)&&!function(){try{return"1"===window.sessionStorage.getItem(tM)}catch{return!1}}()&&(function(){try{window.sessionStorage.setItem(tM,"1")}catch{}}(),window.location.reload())},2e3)},a=()=>{P(!1)},r=t=>{var e;"user-interaction"===(null==(e=t.detail)?void 0:e.source)&&T&&H.current!==T.sid&&(X("interacted"),H.current=T.sid)};return Z.addEventListener("progress",t),Z.addEventListener("load",e),Z.addEventListener("error",a),Z.addEventListener("camera-change",r),()=>{Z.removeEventListener("progress",t),Z.removeEventListener("load",e),Z.removeEventListener("error",a),Z.removeEventListener("camera-change",r)}},[Z,X,T]);let W=(0,l.useMemo)(()=>({apiKey:d,appClipBundleId:c,arExperience:p,tinuuid:n,object:S,material:M,glbUrl:O,usdzUrl:F,previewUrl:V,handoffUrl:f,launchAr:m,layout:x,background:y,mode:h,sizeType:k,dimensionAxes:z,cameraOrbit:C,minCameraOrbit:_,maxCameraOrbit:L,isLoading:U,isModelLoading:E,state:D,modelViewerEl:Z,containerEl:I,widgetSession:T,setMaterialHid:Y,setContainerEl:B,setModelViewerEl:q,trackEvent:X}),[d,c,p,n,S,M,O,F,V,f,m,x,y,h,k,z,C,_,L,U,E,D,Z,I,T,Y,X]);return(0,s.jsx)(tR,{value:W,children:o})}function tA(){let t=(0,l.use)(tR);if(!t)throw Error("useModelViewer must be used within a ModelViewerProvider");return t}function tT(){return"u"<typeof navigator?"":navigator.userAgent||navigator.vendor||""}function tE(){if("u"<typeof window||"u"<typeof navigator)return!1;let t="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return(/iPad|iPhone|iPod/.test(tT())||t)&&!("MSStream"in window)}function tP(){var t,e;if("u"<typeof window||"u"<typeof navigator)return!1;let a=/Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(tT()),r=(null==(t=(e=window).matchMedia)?void 0:t.call(e,"(pointer: coarse)").matches)??!1;return navigator.maxTouchPoints>1&&r&&(a||tE())}function tI(){var t,e;if(!tE())return!1;let a=(null==(t=tT().match(/\bOS (\d+)/))?void 0:t[1])??(null==(e=tT().match(/Version\/(\d+)/))?void 0:e[1]);return!!a&&Number.parseInt(a,10)>=18}function tB(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("advanced"===t.experience&&tI()){var a,r,i,o;let n,s=(a=t.appClipBundleId,r=t.tinuuid,i=t.hostname,o=t.hid,(n=new URL("https://appclip.apple.com/id")).searchParams.set("p",a),n.searchParams.set("tinuuid",r),o&&n.searchParams.set("hid",o),n.searchParams.set("region",i.endsWith("arizo.ru")?"ru":"en"),n.toString());e?window.open(s,"_blank"):window.location.assign(s);return}let n=document.createElement("a"),s=document.createElement("img");n.rel="ar",n.href=function(t,e,a){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:tE();return r?`${new URL(e).toString()}#allowsContentScaling=0`:`intent://arvr.google.com/scene-viewer/1.0?file=${encodeURIComponent(new URL(t).toString())}&resizable=false${"wall"===a||"ceiling"===a?"&enable_vertical_placement=true":""}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;end;`}(t.glbUrl,t.usdzUrl,t.objectType),n.hidden=!0,s.alt="",s.hidden=!0,n.appendChild(s),document.body.appendChild(n),n.click(),n.remove()}async function tZ(t,e){if(!t||!e.tinuuid)return!1;try{return await t(e)}catch{return!1}}async function tq(t){await new Promise(e=>{let a=window.setTimeout(e,300);t.finally(()=>{window.clearTimeout(a),e()})})}function tH(t){let{disabled:e,onClick:a,onBeforeActivateAr:r,size:i="lg",...o}=t,{apiKey:n,appClipBundleId:d,arExperience:c,containerEl:u,handoffUrl:p,isLoading:g,isModelLoading:v,launchAr:h,material:w,mode:f,modelViewerEl:b,object:m,tinuuid:x,trackEvent:y,widgetSession:k}=tA(),[z,C]=(0,l.useState)(null),[j,_]=(0,l.useState)(!1),L=(0,l.useRef)(null),N=null==k?void 0:k.sid,S=null==k?void 0:k.token,M=g||v||null===w,R=(0,l.useMemo)(()=>({hid:null==w?void 0:w.hid,tinuuid:(null==m?void 0:m.tinuuid)??x}),[null==w?void 0:w.hid,null==m?void 0:m.tinuuid,x]),U="ar-view"===f?"standard":"advanced-ar-view"===f||"ar-viewer"===f||"embedded-3d-viewer"===f?"advanced":"qr-code"===f?c:void 0,A=(0,l.useMemo)(()=>{let t=null==w?void 0:w.native;return!U||!m||!(null==t?void 0:t.glbUrl)||!t.usdzUrl||"u"<typeof window?null:{appClipBundleId:d,experience:U,glbUrl:t.glbUrl,hid:null==w?void 0:w.hid,hostname:window.location.hostname,objectType:m.type,tinuuid:m.tinuuid??x,usdzUrl:t.usdzUrl}},[d,U,null==w?void 0:w.hid,null==w?void 0:w.native,m,x]),T=(0,l.useMemo)(()=>(function(t){let e,{apiKey:a,arExperience:r,baseUrl:i,hid:o,mode:n,tinuuid:s,widgetSessionToken:l}=t;if(!i||!s)return null;try{e=new URL(i)}catch{return null}e.searchParams.set("tinuuid",s),e.searchParams.set("mode",n),r?e.searchParams.set("ar-experience",r):e.searchParams.delete("ar-experience"),o?e.searchParams.set("hid",o):e.searchParams.delete("hid");let d=new URLSearchParams(e.hash.slice(1));return a?d.set("api-key",a):d.delete("api-key"),l?d.set("widget-session-token",l):d.delete("widget-session-token"),e.hash=d.toString(),e.toString()})({apiKey:n,arExperience:c,baseUrl:p||"https://integrations.vizbl.com/model-viewer",hid:null==w?void 0:w.hid,mode:f,tinuuid:(null==m?void 0:m.tinuuid)??x,widgetSessionToken:z&&z.sid===N?z.token:S}),[n,c,z,p,null==w?void 0:w.hid,f,null==m?void 0:m.tinuuid,x,N,S]);(0,l.useEffect)(()=>{if(!A||g||!tP())return;let t=[N??"legacy",A.tinuuid,null==w?void 0:w.hid,A.experience].join(":");if(L.current===t)return;L.current=t;let e=window.setTimeout(()=>{(async()=>{L.current!==t||await tZ(h,R)||(await tq(y("ar_launched")),L.current===t&&tB(A))})()},0);return()=>{window.clearTimeout(e),L.current===t&&(L.current=null)}},[R,A,g,h,null==w?void 0:w.hid,y,N]);let E=async()=>{if(b&&!M){if(await tZ(h,R))return void(null==r||r());if(A&&tP()){if(null==r||r(),"advanced"===A.experience&&tI()){tB(A,!0),y("ar_launched");return}await tq(y("ar_launched")),tB(A)}else if(b.canActivateAR)null==r||r(),await tq(y("ar_launched")),await b.activateAR();else if(T){let t=await (null==k?void 0:k.getTokenForRequest().catch(()=>k.token));C(k&&t?{sid:k.sid,token:t}:null),y("interacted"),_(!0)}}},P=async t=>{null==a||a(t),t.defaultPrevented||await E()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Z,{...o,size:i,disabled:e||M,onClick:P,children:"View in place"}),T&&(0,s.jsx)(X,{open:j,onOpenChange:_,children:(0,s.jsxs)(J,{showCloseButton:!1,portalContainer:u,children:[(0,s.jsx)("div",{className:"flex items-center justify-center rounded-2xl bg-constant-white p-10",children:(0,s.jsx)(tt,{className:"size-48",robustness:"H",data:T})}),(0,s.jsx)("p",{className:"text-center text-lg font-medium text-text-sub",children:"Scan the QR code with your phone or tablet to view the object in your interior."}),(0,s.jsx)("p",{className:"text-center text-xs text-text-light",children:"*Requires AR-supported device and browser. We recommend iOS 12 or later with Safari, or Android 7.0 or later with Chrome."}),(0,s.jsx)(W,{asChild:!0,children:(0,s.jsx)(Z,{size:"lg",children:"Close"})})]})})]})}function t$(t){let{lines:e}=t;return(0,s.jsx)("svg",{className:"absolute inset-0 block pointer-events-none",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",children:e.map((t,e)=>(0,s.jsx)("line",{className:I("stroke-primary stroke-2 [stroke-dasharray:2] transition-opacity duration-200",0===t.opacity&&"opacity-0"),style:{opacity:t.opacity},x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},e))})}function tO(t){let{isVisible:e,lines:a}=t;return e?(0,s.jsx)(t$,{lines:a}):null}let tF=[{slot:"hotspot-dot+X-Y+Z",position:"1 -1 1",normal:"1 0 0"},{slot:"hotspot-dot+X-Y-Z",position:"1 -1 -1",normal:"1 0 0"},{slot:"hotspot-dot+X+Y-Z",position:"1 1 -1",normal:"0 1 0"},{slot:"hotspot-dot-X+Y-Z",position:"-1 1 -1",normal:"0 1 0"},{slot:"hotspot-dot-X-Y-Z",position:"-1 -1 -1",normal:"-1 0 0"},{slot:"hotspot-dot-X-Y+Z",position:"-1 -1 1",normal:"-1 0 0"},{slot:"hotspot-dim+X-Y",position:"1 -1 0",normal:"1 0 0",isDimensionLabel:!0},{slot:"hotspot-dim+X-Z",position:"1 0 -1",normal:"1 0 0",isDimensionLabel:!0},{slot:"hotspot-dim+Y-Z",position:"0 1 -1",normal:"0 1 0",isDimensionLabel:!0},{slot:"hotspot-dim-X-Z",position:"-1 0 -1",normal:"-1 0 0",isDimensionLabel:!0},{slot:"hotspot-dim-X-Y",position:"-1 -1 0",normal:"-1 0 0",isDimensionLabel:!0}],tV=new Map(tF.map(t=>[t.slot,t])),tD=[{slot:"hotspot-dim+X-Y",sizeAxis:"z",offsetMultiplier:{x:1.2,y:1.1}},{slot:"hotspot-dim+X-Z",sizeAxis:"y",offsetMultiplier:{x:1.2,z:1.2}},{slot:"hotspot-dim+Y-Z",sizeAxis:"x",offsetMultiplier:{y:1.1,z:1.1}},{slot:"hotspot-dim-X-Z",sizeAxis:"y",offsetMultiplier:{x:1.2,z:1.2}},{slot:"hotspot-dim-X-Y",sizeAxis:"z",offsetMultiplier:{x:1.2,y:1.1}}],tX=tD.map(t=>t.slot),tY=new Map(tD.map(t=>[t.slot,t.sizeAxis])),tW=[{lineIndex:0,hotspot1:"hotspot-dot+X-Y+Z",hotspot2:"hotspot-dot+X-Y-Z",dimensionHotspot:"hotspot-dim+X-Y"},{lineIndex:1,hotspot1:"hotspot-dot+X-Y-Z",hotspot2:"hotspot-dot+X+Y-Z",dimensionHotspot:"hotspot-dim+X-Z"},{lineIndex:2,hotspot1:"hotspot-dot+X+Y-Z",hotspot2:"hotspot-dot-X+Y-Z",dimensionHotspot:"hotspot-dim+Y-Z"},{lineIndex:3,hotspot1:"hotspot-dot-X+Y-Z",hotspot2:"hotspot-dot-X-Y-Z",dimensionHotspot:"hotspot-dim-X-Z"},{lineIndex:4,hotspot1:"hotspot-dot-X-Y-Z",hotspot2:"hotspot-dot-X-Y+Z",dimensionHotspot:"hotspot-dim-X-Y"}],tK=(0,l.memo)(t=>{let{hiddenHotspots:e,isVisible:a,labels:r}=t,i=(0,l.useMemo)(()=>new Map(r.map(t=>[t.slot,t])),[r]);return(0,s.jsx)(s.Fragment,{children:tF.map(t=>{let r=t.isDimensionLabel,o=i.get(t.slot),n=!a||!r||!o||e.has(t.slot);return(0,s.jsx)(Z,{slot:t.slot,"data-position":t.position,"data-normal":t.normal,className:I("absolute box-border pointer-events-none h-auto min-h-9 w-max -translate-x-1/2 -translate-y-1/2 whitespace-nowrap py-2 text-center [--min-hotspot-opacity:0] transition-opacity duration-200 @max-xl:px-3 @max-xl:py-1.5 @max-xl:typo-button-small",n&&"opacity-0",!r&&"hidden"),variant:"secondary",children:r&&o?o.text:""},t.slot)})})});function tJ(t){let{className:e,...a}=t;return(0,s.jsxs)("div",{className:I("group inline-flex gap-2 text-sm text-muted-foreground transition-colors duration-200 ease-in-out hover:text-text-dark",e),...a,children:[(0,s.jsx)("div",{className:"flex size-5 items-center justify-center rounded-full bg-icons-light transition-colors duration-200 ease-in-out group-hover:bg-icons-red",children:(0,s.jsx)(F,{className:"size-4.25 text-icons-white"})}),"Powered by Vizbl"]})}function tG(t){let{className:e,...a}=t,{object:r}=tA();return(0,s.jsxs)("div",{className:I("grid h-16 items-center gap-5 px-6 sm:grid-cols-3",e),...a,children:[(0,s.jsx)("div",{className:"truncate",children:null==r?void 0:r.name}),(0,s.jsx)("div",{className:"hidden justify-center sm:flex",children:(0,s.jsx)(tJ,{})}),(0,s.jsx)("div",{className:"hidden sm:block"})]})}function tQ(t){let{className:e,...a}=t;return(0,s.jsx)("div",{"data-slot":"card",className:I("bg-card text-card-foreground relative flex flex-col overflow-hidden rounded-3xl px-8 py-10",e),...a})}function t1(t){let{className:e,...a}=t;return(0,s.jsx)("div",{"data-slot":"card-content",className:I("px-5",e),...a})}function t0(t){let{className:e,...a}=t;return(0,s.jsx)(_.b,{"data-slot":"label",className:I("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}let t2=(0,f.F)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function t5(t){let{className:e,orientation:a="vertical",...r}=t;return(0,s.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:I(t2({orientation:a}),e),...r})}function t3(t){let{className:e,...a}=t;return(0,s.jsx)("div",{"data-slot":"field-content",className:I("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",e),...a})}function t9(t){let{className:e,...a}=t;return(0,s.jsx)(t0,{"data-slot":"field-label",className:I("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),...a})}function t4(t){let{className:e,...a}=t;return(0,s.jsx)(L.bL,{"data-slot":"radio-group",className:I("grid gap-3",e),...a})}function t8(t){let{checked:e,className:a,...r}=t;return(0,s.jsx)("div",{className:I("absolute top-1/2 left-1/2 size-6 -translate-x-1/2 -translate-y-1/2","flex items-center justify-center rounded-full",e?"bg-lime-400":"bg-background-base-2",a),...r,children:(0,s.jsx)(x.A,{className:"text-constant-white size-3.5",strokeWidth:4})})}function t7(t){let{className:e,variant:a="default",...r}=t;return(0,s.jsxs)(L.q7,{"data-slot":"radio-group-item",className:I("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50","check"===a&&"size-6","inverted"===a&&"size-5 border-button-outline data-[state=checked]:border-border-red data-[state=checked]:border-4 data-[state=checked]:bg-constant-white cursor-pointer transition-all",e),...r,children:["check"===a&&(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)(t8,{})}),"inverted"!==a&&(0,s.jsx)(L.C1,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:"check"===a?(0,s.jsx)(t8,{checked:!0}):(0,s.jsx)(y.A,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})]})}function t6(){let{object:t,material:e,setMaterialHid:a}=tA(),r=(null==t?void 0:t.materials)??[];return!t||r.length<2?null:(0,s.jsx)(tQ,{className:"w-fit max-w-full overflow-hidden px-4 py-4 @max-xl:rounded-2xl @max-xl:px-2 @max-xl:py-2",children:(0,s.jsx)(t1,{className:"px-0",children:(0,s.jsx)(t4,{className:"flex w-max min-w-full gap-2 overflow-x-auto",value:(null==e?void 0:e.hid)??void 0,onValueChange:t=>a(t),children:r.map(e=>{var a,r,i,o,n;return(0,s.jsx)(t9,{htmlFor:e.hid,className:"cursor-pointer has-data-[state=checked]:bg-transparent has-data-[state=checked]:border-primary p-0",children:(0,s.jsxs)(t5,{className:"p-0! overflow-hidden rounded-md",children:[(0,s.jsx)(t3,{className:"shrink-0",children:(0,s.jsx)("img",{src:(null==(i=e.previews)||null==(r=i[0])||null==(a=r.subRes)?void 0:a.small)??(null==(n=e.previews)||null==(o=n[0])?void 0:o.url),width:80,height:80,alt:e.name??t.name??"Material preview",className:"size-20 object-cover @max-xl:size-12"})}),(0,s.jsx)(t7,{className:"sr-only",value:e.hid,id:e.hid})]})},e.hid)})})})})}let et={forbidden:"Viewer unavailable for this domain","not-found":"Object not found",unauthorized:"Invalid API key","payment-required":"Viewer temporarily unavailable"};function ee(t){let{variant:e,showDialogCloseButton:a=!1}=t;return(0,s.jsxs)("div",{className:"relative z-30 flex size-full flex-col items-center justify-center gap-4 bg-radial from-background-containers to-background-base-2 p-4 text-center",children:[(0,s.jsx)(q,{className:"size-8 text-icons-light"}),(0,s.jsx)("h2",{className:"typo-base-16 font-medium text-text-dark",children:et[e]}),a&&(0,s.jsx)(W,{asChild:!0,children:(0,s.jsx)(Z,{variant:"secondary",children:"Close"})})]})}function ea(t){let e=t.getBoundingBoxCenter(),a=t.getDimensions();return{center:e,size:a,halfSize:{x:a.x/2,y:a.y/2,z:a.z/2}}}function er(t){var e;let{showDialogCloseButton:a=!1}=t,{glbUrl:r,isModelLoading:i,object:o,previewUrl:n,state:d,setContainerEl:c,setModelViewerEl:u,usdzUrl:p,layout:g,background:v,dimensionAxes:h,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,trackEvent:m}=tA(),[x,y]=(0,l.useState)(!1),k="model"===g,z="loading"===d||"ready"===d&&i,C="ready"===d,j=((null==o||null==(e=o.materials)?void 0:e.length)??0)>1,_=C&&!k&&!i,L=x&&_,{lines:N,labels:S,hiddenHotspots:M}=function(t){let{isVisible:e,axes:a}=t,{glbUrl:r,isModelLoading:i,modelViewerEl:o,sizeType:n}=tA(),[s,d]=(0,l.useState)([]),[c,u]=(0,l.useState)([]),[p,g]=(0,l.useState)(()=>new Set),[v,h]=(0,l.useState)(null),w=!i;(0,l.useEffect)(()=>{h(null),d([]),u([]),g(new Set)},[o,r]);let f=(0,l.useCallback)(()=>{let t;if(!o)return[];let e=(t=ea(o),tD.filter(t=>{let{sizeAxis:e}=t;return a.includes(e)}).map(e=>{var a;let r,{slot:i,sizeAxis:o,offsetMultiplier:s}=e,l=function(t){let e=tV.get(t);if(!e)throw Error(`Missing hotspot config for slot "${t}"`);return e}(i);return{name:i,position:function(t,e){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{center:r,halfSize:i}=t,[o,n,s]=e.position.split(" ").map(Number),l=a.x??1,d=a.y??1,c=a.z??1;return`${r.x+o*i.x*l} ${r.y+n*i.y*d} ${r.z+s*i.z*c}`}(t,l,s),text:(a=t.size[o],r=Number(a.toFixed(3)),"cm"===n?`${Math.round(100*r)} cm`:"inch"===n?`${Math.round(100*r/2.54*100)/100} in`:"")}}));return e.forEach(t=>{o.updateHotspot({name:t.name,position:t.position})}),e.map(t=>({slot:t.name,text:t.text||"",position:t.position}))},[o,n,a]),b=(0,l.useCallback)(()=>{if(!o)return;let t=[],e=new Set;tW.forEach(e=>{let r=e.dimensionHotspot?tY.get(e.dimensionHotspot):void 0;if(r&&!a.includes(r))return;let i=o.queryHotspot(e.hotspot1),n=o.queryHotspot(e.hotspot2),s=e.dimensionHotspot?o.queryHotspot(e.dimensionHotspot):null;if(i&&n){let e=s&&!s.facingCamera;t.push({x1:i.canvasPosition.x,y1:i.canvasPosition.y,x2:n.canvasPosition.x,y2:n.canvasPosition.y,opacity:+!e})}}),tX.forEach(t=>{let a=o.queryHotspot(t);a&&!a.facingCamera&&e.add(t)}),d(t),g(t=>!function(t,e){if(t.size!==e.size)return!1;for(let a of Array.from(t))if(!e.has(a))return!1;return!0}(t,e)?e:t)},[o,a]);return(0,l.useEffect)(()=>{if(!r||!e||!w||!o||v===r)return;let t=ea(o);tF.forEach(e=>{let a=function(t,e){let{center:a,halfSize:r}=t,[i,o,n]=e.position.split(" ").map(Number);return`${a.x+i*r.x} ${a.y+o*r.y} ${a.z+n*r.z}`}(t,e);o.updateHotspot({name:e.slot,position:a})}),u(f()),b(),h(r)},[r,e,w,o,v,f,b]),(0,l.useEffect)(()=>{if(o&&e&&w&&v===r)return o.addEventListener("camera-change",b),()=>{o.removeEventListener("camera-change",b)}},[o,e,w,v,r,b]),{lines:s,labels:c,hiddenHotspots:p}}({isVisible:L,axes:h}),R="forbidden"===d||"not-found"===d||"unauthorized"===d||"payment-required"===d?d:null;return R?(0,s.jsx)("div",{ref:c,className:I("relative size-full overflow-hidden text-foreground","default"===v&&"bg-background-layout"),children:(0,s.jsx)(ee,{variant:R,showDialogCloseButton:a})}):(0,s.jsxs)("div",{ref:c,className:I("@container relative size-full overflow-hidden text-foreground","default"===v&&"bg-background-layout"),children:["ready"===d&&!k&&(0,s.jsx)(tG,{className:"absolute top-0 right-0 left-0 z-2"}),"ready"===d&&(0,s.jsx)("div",{className:"relative size-full",children:(0,s.jsxs)("model-viewer",{ref:u,className:"size-full",src:r??void 0,iosSrc:p??void 0,poster:n??void 0,ar:!0,cameraControls:!0,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,arModes:"webxr scene-viewer quick-look",arScale:"fixed",shadowIntensity:1,interactionPromptThreshold:100,loading:"eager",children:[(0,s.jsx)("div",{slot:"progress-bar"}),(0,s.jsx)("div",{slot:"ar-button"}),(0,s.jsx)(tK,{isVisible:L,labels:S,hiddenHotspots:M})]})}),(0,s.jsx)("div",{"aria-hidden":!z,className:I("absolute inset-0 z-10 flex items-center justify-center bg-radial from-background-containers to-background-base-2 transition-opacity",z?"pointer-events-auto opacity-100 duration-0":"pointer-events-none opacity-0 duration-300 ease-in-out"),children:(0,s.jsx)(D,{variant:"logo"})}),(0,s.jsx)(tO,{isVisible:L,lines:N}),C&&!k&&(0,s.jsxs)("div",{className:I("pointer-events-none absolute inset-x-8 bottom-8 z-2 flex flex-wrap items-end gap-4 @max-xl:inset-x-6 @max-xl:bottom-4 @max-xl:flex-col @max-xl:items-stretch",j?"justify-between":"justify-center"),children:[j&&(0,s.jsx)("div",{className:"pointer-events-auto min-w-0 flex-1 @max-xl:w-full @max-xl:flex-none @max-xl:self-start",children:(0,s.jsx)(t6,{})}),(0,s.jsxs)("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 @max-xl:w-full",children:[(0,s.jsxs)(Z,{className:"@max-xl:h-9 @max-xl:px-3.5 @max-xl:typo-button-normal @max-xl:[&_svg]:size-5",size:"lg",variant:"secondary",disabled:!_,"aria-label":"Toggle dimensions","aria-pressed":x,onClick:()=>{y(t=>!t),m("interacted")},children:[x?(0,s.jsx)(H,{className:"size-6"}):(0,s.jsx)($,{className:"size-6"}),(0,s.jsx)("span",{children:"Dimensions"})]}),(0,s.jsx)(tH,{className:"@max-xl:h-9 @max-xl:w-full @max-xl:flex-1 @max-xl:px-3.5 @max-xl:typo-button-normal",onBeforeActivateAr:()=>y(!1),size:"lg"})]})]})]})}let ei=["x","y","z"],eo=new p.E({defaultOptions:{queries:{gcTime:1/0,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,retry:(t,e)=>{let a=tf(e);return(void 0===a||!(a>=400)||!(a<500))&&t<2}}}});function en(t){let{tinuuid:e,apiKey:a,appClipBundleId:r="com.us.vizbl.Clip",arExperience:i,hid:o,apiBaseUrl:n="https://api.vizbl.com",legacyApiBaseUrl:l="https://api.vizbl.com/v1",mode:d="embedded-3d-viewer",initialWidgetSessionToken:c,handoffUrl:u="https://integrations.vizbl.com/model-viewer",launchAr:p,sizeType:v="cm",dimensionAxes:h=ei,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,layout:m="default",background:x="default",showDialogCloseButton:y=!1,viewerSurface:k="inline"}=t,z=(null==a?void 0:a.trim())??"";return(0,s.jsx)(g.Ht,{client:eo,children:(0,s.jsx)(tU,{tinuuid:e,apiKey:z,appClipBundleId:r,arExperience:i,apiBaseUrl:n,legacyApiBaseUrl:l,mode:d,initialWidgetSessionToken:c,handoffUrl:u,hid:o,launchAr:p,layout:m,background:x,sizeType:v,dimensionAxes:h,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,viewerSurface:k,children:(0,s.jsx)(er,{showDialogCloseButton:y})})})}function es(t){let{tinuuid:e,apiKey:a,apiBaseUrl:r,legacyApiBaseUrl:i,initialWidgetSessionToken:o,handoffUrl:n,hid:u,sizeType:p,dimensionAxes:g,...v}=t,[h,w]=(0,l.useState)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,d.createPortal)((0,s.jsx)("style",{children:A.A}),document.head),h&&(0,s.jsx)(U,{root:h,storageKey:"neurodyn-theme",children:(0,s.jsx)(X,{...v,children:(0,s.jsxs)(J,{className:"min-w-full h-dvh p-0 rounded-none sm:p-0",portalContainer:h,showCloseButton:!1,onInteractOutside:t=>{t.preventDefault()},children:[(0,s.jsx)(W,{asChild:!0,children:(0,s.jsxs)(Z,{className:"absolute top-3 right-6 z-20",variant:"secondary",children:["Close",(0,s.jsx)(m.A,{})]})}),(0,s.jsx)(en,{tinuuid:e,apiKey:a,apiBaseUrl:r,legacyApiBaseUrl:i,mode:"ar-viewer",initialWidgetSessionToken:o,handoffUrl:n,hid:u,sizeType:p,dimensionAxes:g,showDialogCloseButton:!0,viewerSurface:"dialog"})]})})}),(0,d.createPortal)((0,s.jsxs)(c.Ay.div,{style:{display:"block",letterSpacing:"normal",zIndex:0x7fffffff},children:[(0,s.jsx)("style",{children:P}),(0,s.jsx)("div",{ref:w})]}),document.body)]})}function el(t){let{tinuuid:e,apiKey:a,appClipBundleId:r,arExperience:i,hid:o,apiBaseUrl:n,legacyApiBaseUrl:u,mode:p,initialWidgetSessionToken:g,handoffUrl:v,launchAr:h,sizeType:w,dimensionAxes:f,layout:b,background:m,viewerSurface:x,className:y,...k}=t,[z,C]=(0,l.useState)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,d.createPortal)((0,s.jsx)("style",{children:A.A}),document.head),(0,s.jsxs)(c.Ay.div,{className:y,style:{height:"100%",letterSpacing:"normal",width:"100%"},...k,children:[(0,s.jsx)("style",{children:P}),(0,s.jsx)("div",{ref:C,style:{height:"100%",width:"100%"},children:z&&(0,s.jsx)(U,{root:z,storageKey:"neurodyn-theme",children:(0,s.jsx)(en,{tinuuid:e,apiKey:a,appClipBundleId:r,arExperience:i,apiBaseUrl:n,legacyApiBaseUrl:u,mode:p,initialWidgetSessionToken:g,handoffUrl:v,hid:o,launchAr:h,sizeType:w,dimensionAxes:f,layout:b,background:m,viewerSurface:x})})})]})]})}}}]);
5565
+ }`:r);function I(){for(var t=arguments.length,e=Array(t),a=0;a<t;a++)e[a]=arguments[a];return(0,w.QP)((0,h.$)(e))}let B=(0,f.F)("cursor-pointer inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-xl transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary--hover active:bg-primary--pressed disabled:bg-primary--disabled disabled:opacity-20",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary--hover active:bg-secondary--pressed disabled:bg-secondary--disabled disabled:opacity-20",outline:"border border-button-outline bg-transparent text-foreground hover:border-button-outline-hover active:bg-button-outline-pressed disabled:border-border-dark disabled:opacity-20",ghost:"hover:bg-accent hover:text-accent-foreground active:bg-accent--pressed",contrast:"bg-contrast text-contrast-foreground hover:bg-contrast--hover active:bg-contrast--pressed disabled:bg-contrast--disabled disabled:opacity-30"},size:{default:"h-9 px-3.5 typo-button-normal [&_svg]:size-5",sm:"h-8 px-3 typo-button-small [&_svg]:size-4",lg:"h-11 px-4 typo-button-big [&_svg]:size-6",icon:"size-9 rounded-full [&_svg]:size-5","icon-sm":"size-8 rounded-full [&_svg]:size-4","icon-lg":"size-11 rounded-full [&_svg]:size-6"}},defaultVariants:{variant:"default",size:"default"}});function Z(t){let{className:e,variant:a,size:r,asChild:i=!1,...o}=t,n=i?v.DX:"button";return(0,s.jsx)(n,{"data-slot":"button",className:I(B({variant:a,size:r,className:e})),...o})}function q(t){return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...t,children:[(0,s.jsx)("path",{d:"M22.5601 16.3031L14.8901 3.58311C14.58 3.09793 14.1526 2.69864 13.6476 2.42205C13.1425 2.14546 12.5759 2.00049 12.0001 2.00049C11.4243 2.00049 10.8577 2.14546 10.3526 2.42205C9.84755 2.69864 9.42024 3.09793 9.1101 3.58311L1.4401 16.3031C1.16915 16.7548 1.02189 17.2698 1.01311 17.7964C1.00434 18.323 1.13436 18.8427 1.3901 19.3031C1.68578 19.8214 2.11376 20.2518 2.6303 20.5505C3.14684 20.8492 3.73343 21.0054 4.3301 21.0031H19.6701C20.2629 21.0094 20.8468 20.8593 21.363 20.5678C21.8792 20.2764 22.3093 19.8539 22.6101 19.3431C22.8734 18.8779 23.0075 18.3508 22.9987 17.8163C22.9899 17.2818 22.8385 16.7594 22.5601 16.3031ZM20.8601 18.3531C20.7399 18.5597 20.5655 18.7295 20.3557 18.8441C20.146 18.9586 19.9089 19.0136 19.6701 19.0031H4.3301C4.09132 19.0136 3.85422 18.9586 3.64446 18.8441C3.4347 18.7295 3.26029 18.5597 3.1401 18.3531C3.05233 18.2011 3.00613 18.0286 3.00613 17.8531C3.00613 17.6776 3.05233 17.5051 3.1401 17.3531L10.8201 4.62311C10.9581 4.44082 11.1365 4.29298 11.3412 4.19119C11.5459 4.08939 11.7715 4.03642 12.0001 4.03642C12.2287 4.03642 12.4543 4.08939 12.659 4.19119C12.8637 4.29298 13.0421 4.44082 13.1801 4.62311L20.8501 17.3431C20.9413 17.4954 20.9902 17.6693 20.992 17.8468C20.9937 18.0243 20.9482 18.199 20.8601 18.3531Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12.0001 17.0001C12.2653 17.0001 12.5197 16.8948 12.7072 16.7073C12.8948 16.5197 13.0001 16.2654 13.0001 16.0001C13.0001 15.7349 12.8948 15.4806 12.7072 15.293C12.5197 15.1055 12.2653 15.0001 12.0001 15.0001C11.7349 15.0001 11.4806 15.1055 11.293 15.293C11.1055 15.4806 11.0001 15.7349 11.0001 16.0001C11.0001 16.2654 11.1055 16.5197 11.293 16.7073C11.4806 16.8948 11.7349 17.0001 12.0001 17.0001Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12.0001 8.00023C11.7349 8.00023 11.4806 8.10559 11.293 8.29313C11.1055 8.48066 11.0001 8.73502 11.0001 9.00023V13.0002C11.0001 13.2655 11.1055 13.5198 11.293 13.7073C11.4806 13.8949 11.7349 14.0002 12.0001 14.0002C12.2653 14.0002 12.5197 13.8949 12.7072 13.7073C12.8948 13.5198 13.0001 13.2655 13.0001 13.0002V9.00023C13.0001 8.73502 12.8948 8.48066 12.7072 8.29313C12.5197 8.10559 12.2653 8.00023 12.0001 8.00023Z",fill:"currentColor"})]})}function O(t){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,s.jsx)("path",{d:"M21.8701 11.496C21.2301 10.386 17.7101 4.81597 11.7301 4.99597C6.20007 5.13597 3.00007 9.99597 2.13007 11.496C2.0423 11.648 1.99609 11.8204 1.99609 11.996C1.99609 12.1715 2.0423 12.3439 2.13007 12.496C2.76007 13.586 6.13007 18.996 12.0201 18.996H12.2701C17.8001 18.856 21.0101 13.996 21.8701 12.496C21.9577 12.3439 22.0039 12.1715 22.0039 11.996C22.0039 11.8204 21.9577 11.648 21.8701 11.496ZM12.2201 16.996C7.91007 17.096 5.10007 13.406 4.22007 11.996C5.22007 10.386 7.83007 7.09597 11.8301 6.99597C16.1201 6.88597 18.9401 10.586 19.8301 11.996C18.8001 13.606 16.2201 16.896 12.2201 16.996Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12 8.49994C11.5404 8.49994 11.0852 8.59047 10.6606 8.76636C10.236 8.94225 9.85013 9.20006 9.52513 9.52506C9.20012 9.85007 8.94231 10.2359 8.76642 10.6605C8.59053 11.0852 8.5 11.5403 8.5 11.9999C8.5 12.4596 8.59053 12.9147 8.76642 13.3393C8.94231 13.764 9.20012 14.1498 9.52513 14.4748C9.85013 14.7998 10.236 15.0576 10.6606 15.2335C11.0852 15.4094 11.5404 15.4999 12 15.4999C12.9283 15.4999 13.8185 15.1312 14.4749 14.4748C15.1313 13.8184 15.5 12.9282 15.5 11.9999C15.5 11.0717 15.1313 10.1814 14.4749 9.52506C13.8185 8.86869 12.9283 8.49994 12 8.49994ZM12 13.4999C11.6022 13.4999 11.2206 13.3419 10.9393 13.0606C10.658 12.7793 10.5 12.3978 10.5 11.9999C10.5 11.6021 10.658 11.2206 10.9393 10.9393C11.2206 10.658 11.6022 10.4999 12 10.4999C12.3978 10.4999 12.7794 10.658 13.0607 10.9393C13.342 11.2206 13.5 11.6021 13.5 11.9999C13.5 12.3978 13.342 12.7793 13.0607 13.0606C12.7794 13.3419 12.3978 13.4999 12 13.4999Z",fill:"currentColor"})]})}function H(t){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,s.jsx)("path",{d:"M4.70985 3.28579C4.61661 3.19255 4.50592 3.11859 4.3841 3.06813C4.26227 3.01767 4.13171 2.9917 3.99985 2.9917C3.86799 2.9917 3.73742 3.01767 3.6156 3.06813C3.49377 3.11859 3.38308 3.19255 3.28985 3.28579C3.10154 3.47409 2.99575 3.72949 2.99575 3.99579C2.99575 4.26209 3.10154 4.51749 3.28985 4.70579L8.91985 10.3358C8.56365 10.9984 8.43043 11.7582 8.53993 12.5024C8.64944 13.2467 8.99583 13.9359 9.52778 14.4679C10.0597 14.9998 10.7489 15.3462 11.4932 15.4557C12.2375 15.5652 12.9972 15.432 13.6598 15.0758L19.2898 20.7058C19.3828 20.7995 19.4934 20.8739 19.6153 20.9247C19.7371 20.9754 19.8678 21.0016 19.9998 21.0016C20.1319 21.0016 20.2626 20.9754 20.3844 20.9247C20.5063 20.8739 20.6169 20.7995 20.7098 20.7058C20.8033 20.6127 20.8775 20.502 20.9281 20.3802C20.9788 20.2584 21.0048 20.1277 21.0048 19.9958C21.0048 19.8639 20.9788 19.7332 20.9281 19.6114C20.8775 19.4895 20.8033 19.3789 20.7098 19.2858L4.70985 3.28579ZM11.9998 13.4958C11.602 13.4958 11.2205 13.3378 10.9392 13.0565C10.6579 12.7751 10.4998 12.3936 10.4998 11.9958V11.9258L12.0598 13.4858L11.9998 13.4958Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12.2201 16.997C7.92007 17.097 5.10007 13.407 4.22007 11.997C4.84707 10.997 5.60007 10.084 6.46007 9.27695L5.00007 7.86695C3.87139 8.93042 2.90448 10.1534 2.13007 11.497C2.0423 11.649 1.99609 11.8214 1.99609 11.997C1.99609 12.1725 2.0423 12.3449 2.13007 12.497C2.76007 13.587 6.13007 18.997 12.0201 18.997H12.2701C13.3776 18.9641 14.4708 18.7373 15.5001 18.327L13.9201 16.747C13.3644 16.8931 12.7943 16.977 12.2201 16.997Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M21.87 11.4958C21.23 10.3858 17.7 4.8158 11.73 4.9958C10.6225 5.02865 9.52924 5.25541 8.5 5.6658L10.08 7.2458C10.6356 7.09963 11.2058 7.01578 11.78 6.9958C16.07 6.8858 18.89 10.5858 19.78 11.9958C19.138 12.9981 18.3682 13.9124 17.49 14.7158L19 16.1258C20.1428 15.0651 21.1234 13.842 21.91 12.4958C21.9918 12.3403 22.0311 12.166 22.0241 11.9904C22.0171 11.8149 21.9639 11.6443 21.87 11.4958Z",fill:"currentColor"})]})}function $(t){return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...t,children:[(0,s.jsx)("path",{d:"M12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5C11 5.26522 11.1054 5.51957 11.2929 5.70711C11.4804 5.89464 11.7348 6 12 6C12.2652 6 12.5196 5.89464 12.7071 5.70711C12.8946 5.51957 13 5.26522 13 5V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M21.0002 11H19.0002C18.735 11 18.4806 11.1054 18.2931 11.2929C18.1055 11.4804 18.0002 11.7348 18.0002 12C18.0002 12.2652 18.1055 12.5196 18.2931 12.7071C18.4806 12.8946 18.735 13 19.0002 13H21.0002C21.2654 13 21.5197 12.8946 21.7073 12.7071C21.8948 12.5196 22.0002 12.2652 22.0002 12C22.0002 11.7348 21.8948 11.4804 21.7073 11.2929C21.5197 11.1054 21.2654 11 21.0002 11Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M6 12C6 11.7348 5.89464 11.4804 5.70711 11.2929C5.51957 11.1054 5.26522 11 5 11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5C5.26522 13 5.51957 12.8946 5.70711 12.7071C5.89464 12.5196 6 12.2652 6 12Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M6.22009 5.00298C6.02357 4.82786 5.76656 4.7362 5.50358 4.74744C5.2406 4.75869 4.99234 4.87196 4.8115 5.06322C4.63065 5.25447 4.53143 5.50867 4.5349 5.77187C4.53838 6.03507 4.64426 6.28656 4.83009 6.47298L6.27009 7.86298C6.36673 7.95629 6.48117 8.02917 6.60659 8.07728C6.73201 8.12538 6.86584 8.14773 7.00009 8.14298C7.1348 8.14246 7.26801 8.11474 7.39173 8.06147C7.51546 8.0082 7.62714 7.93048 7.72009 7.83298C7.90634 7.64561 8.01088 7.39216 8.01088 7.12798C8.01088 6.86379 7.90634 6.61034 7.72009 6.42298L6.22009 5.00298Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M17 8.14285C17.2575 8.14182 17.5047 8.04153 17.69 7.86285L19.13 6.47285C19.3057 6.2893 19.4049 6.04577 19.4075 5.79172C19.4102 5.53767 19.316 5.29214 19.1441 5.10502C18.9723 4.91789 18.7356 4.80319 18.4823 4.78421C18.2289 4.76524 17.9779 4.84341 17.78 5.00285L16.34 6.42285C16.1538 6.61021 16.0493 6.86366 16.0493 7.12785C16.0493 7.39203 16.1538 7.64548 16.34 7.83285C16.5132 8.01557 16.7489 8.12627 17 8.14285Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M12 17.9999C11.7348 17.9999 11.4804 18.1053 11.2929 18.2928C11.1054 18.4803 11 18.7347 11 18.9999V20.9999C11 21.2651 11.1054 21.5195 11.2929 21.707C11.4804 21.8946 11.7348 21.9999 12 21.9999C12.2652 21.9999 12.5196 21.8946 12.7071 21.707C12.8946 21.5195 13 21.2651 13 20.9999V18.9999C13 18.7347 12.8946 18.4803 12.7071 18.2928C12.5196 18.1053 12.2652 17.9999 12 17.9999Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M17.7302 16.1399C17.5392 15.9556 17.2829 15.8547 17.0175 15.8594C16.7521 15.864 16.4995 15.974 16.3152 16.1649C16.1309 16.3559 16.0299 16.6122 16.0346 16.8776C16.0393 17.143 16.1492 17.3956 16.3402 17.5799L17.7802 18.9999C17.9702 19.1835 18.2251 19.2845 18.4893 19.2808C18.7535 19.277 19.0055 19.1688 19.1902 18.9799C19.2837 18.8868 19.3579 18.7762 19.4085 18.6543C19.4591 18.5325 19.4851 18.4019 19.4851 18.2699C19.4851 18.138 19.4591 18.0073 19.4085 17.8855C19.3579 17.7637 19.2837 17.653 19.1902 17.5599L17.7302 16.1399Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M6.27011 16.141L4.83011 17.531C4.73638 17.624 4.66198 17.7346 4.61121 17.8564C4.56045 17.9783 4.53431 18.109 4.53431 18.241C4.53431 18.373 4.56045 18.5037 4.61121 18.6256C4.66198 18.7474 4.73638 18.858 4.83011 18.951C4.9239 19.0467 5.03596 19.1226 5.15965 19.1741C5.28333 19.2256 5.41612 19.2518 5.55011 19.251C5.79662 19.2531 6.03522 19.1641 6.22011 19.001L7.66011 17.611C7.75466 17.5197 7.83031 17.4107 7.88273 17.2902C7.93516 17.1697 7.96334 17.0401 7.96566 16.9087C7.96798 16.7773 7.9444 16.6467 7.89626 16.5244C7.84813 16.4022 7.77637 16.2905 7.68511 16.196C7.59384 16.1014 7.48484 16.0258 7.36433 15.9734C7.24383 15.9209 7.11418 15.8928 6.98278 15.8904C6.85139 15.8881 6.72082 15.9117 6.59854 15.9598C6.47626 16.008 6.36466 16.0797 6.27011 16.171V16.141Z",fill:"currentColor"})]})}function F(t){let{className:e,...a}=t;return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:I("size-6",e),...a,children:[(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0625 1.70412C12.1393 1.70359 12.2136 1.7151 12.2842 1.73439C12.6576 1.76978 13.0261 1.88527 13.3604 2.08303L19.7012 5.84084L19.7031 5.84181C20.1036 6.08032 20.4348 6.42322 20.665 6.83498C20.8952 7.24671 21.0168 7.71415 21.0166 8.19142V8.19338L20.998 15.7403C20.9979 16.1352 20.9124 16.526 20.751 16.8848C20.7319 16.9557 20.7049 17.026 20.667 17.0928C20.6355 17.1482 20.5983 17.1987 20.5576 17.2442C20.3296 17.6 20.023 17.8979 19.6631 18.1133L13.2998 21.9072C12.4738 22.3996 11.4611 22.4004 10.6436 21.917L10.6416 21.916L4.30078 18.1582L4.29883 18.1572C3.91023 17.9258 3.58764 17.5957 3.3584 17.2002C3.35105 17.1885 3.34181 17.1773 3.33496 17.1651C3.32803 17.1526 3.32268 17.1387 3.31641 17.126C3.09976 16.7236 2.98517 16.2703 2.98535 15.8076V15.8057L3.00391 8.25588C3.00603 7.28279 3.51293 6.37777 4.33984 5.88478L10.7021 2.09181C11.0682 1.87369 11.4708 1.75231 11.877 1.72658C11.9365 1.71245 11.999 1.70462 12.0625 1.70412ZM5.16895 7.36818C4.87108 7.54583 4.6844 7.87497 4.68359 8.23635L4.66602 15.3838L9.45801 12.5254C9.51085 12.7718 9.60256 13.0142 9.73535 13.2442C9.90127 13.5315 10.1161 13.7727 10.3633 13.9639L5.49512 16.8662L11.499 20.4248C11.8036 20.6044 12.1738 20.6008 12.4707 20.4238L18.5107 16.8233L13.4971 13.877C13.9543 13.482 14.2391 12.9423 14.3242 12.3672L19.3193 15.3037L19.3379 8.21291L19.3369 8.21388C19.3369 8.03517 19.2923 7.85955 19.2061 7.7051C19.1196 7.55056 18.9947 7.42151 18.8447 7.33205L12.8887 3.80275L12.8535 9.73439C12.3304 9.51037 11.7366 9.46806 11.1738 9.63576L11.21 3.76662L5.16895 7.36818Z",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91641 8.60885C11.7928 7.52595 14.1912 8.16845 15.2748 10.0444C16.3582 11.9209 15.7156 14.3211 13.8393 15.4047C11.9627 16.4879 9.56339 15.8446 8.47989 13.9682C7.39671 12.0916 8.03987 9.69227 9.91641 8.60885ZM13.8031 10.894C13.189 9.83118 11.8293 9.46704 10.766 10.0805C9.7026 10.6945 9.33693 12.0551 9.95059 13.1186C10.5646 14.1821 11.9261 14.5469 12.9897 13.9331C14.0529 13.3189 14.4171 11.9575 13.8031 10.894Z",fill:"currentColor"})]})}let V="var(--v-borders-medium)";function D(t){let{className:e,variant:a="default",size:r="default",state:i="loading",role:o,"aria-live":n,"aria-label":l,...d}=t;switch(a){case"logo":{let t="sm"===r?4:5;return(0,s.jsxs)("svg",{...d,role:o??"status","aria-live":n??"polite","aria-label":l??("success"===i?"Success":"error"===i?"Error":"Loading"),width:"93",height:"91",viewBox:"0 0 93 91",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-slot":"spinner","data-size":r,"data-state":i,className:I("spinner-logo shrink-0","sm"===r?"size-9":"size-22",e),children:[(0,s.jsx)("g",{className:"spinner-logo__intro-shell",children:(0,s.jsx)("path",{d:"M15.7495 62.7798L46.4936 45.0297M46.4936 45.0297L77.2661 62.5451M46.4936 45.0297L46.7111 9.62225M49.9213 79.4237L74.5719 65.1917C75.6436 64.5705 76.5344 63.6811 77.1541 62.6137C77.7738 61.5462 78.1003 60.3385 78.1007 59.1129L78.1729 30.7811C78.1734 29.5494 77.851 28.3427 77.2373 27.2798C76.6236 26.2169 75.7398 25.3343 74.6729 24.7189L50.1007 10.6155C47.926 9.3694 45.2455 9.37719 43.0689 10.6339L18.4183 24.8659C16.2385 26.1244 14.8946 28.4401 14.8895 30.9447L14.8173 59.2766C14.8168 60.5082 15.1392 61.7149 15.7529 62.7778C16.3666 63.8408 17.2504 64.7233 18.3173 65.3387L42.8895 79.4421C45.0642 80.6882 47.7447 80.6805 49.9213 79.4237Z",className:"spinner-logo__outline spinner-logo__outline--intro",vectorEffect:"sm"===r?void 0:"non-scaling-stroke"})}),(0,s.jsx)("circle",{className:"spinner-logo__intro-orb",cx:"46.27",cy:"45.8",r:"11.18",fill:"white",stroke:V,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("circle",{className:"spinner-logo__result-ring",cx:"46.5",cy:"45.5",r:"33.46",fill:"white",stroke:V,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("g",{transform:"translate(27.786 31.4489)",children:(0,s.jsx)("g",{className:"spinner-logo__result-glyph spinner-logo__result-glyph--success",children:(0,s.jsx)("path",{d:"M13.6758 28.1023C13.3559 28.101 13.0397 28.0341 12.7467 27.9057C12.4537 27.7772 12.1902 27.59 11.9725 27.3557L0.632479 15.2923C0.208575 14.8406 -0.0185097 14.2389 0.00118164 13.6198C0.020873 13.0006 0.285727 12.4146 0.737479 11.9907C1.18923 11.5668 1.79088 11.3397 2.41006 11.3594C3.02924 11.3791 3.61524 11.6439 4.03915 12.0957L13.6525 22.339L33.2758 0.87233C33.475 0.624349 33.7227 0.419696 34.0038 0.270944C34.2849 0.122191 34.5935 0.0324784 34.9105 0.00731496C35.2276 -0.0178485 35.5464 0.0220682 35.8475 0.124615C36.1485 0.227162 36.4254 0.390174 36.6612 0.603637C36.897 0.8171 37.0866 1.07651 37.2185 1.36593C37.3503 1.65535 37.4216 1.96867 37.428 2.28665C37.4344 2.60463 37.3756 2.92056 37.2555 3.21502C37.1353 3.50949 36.9562 3.77627 36.7291 3.999L15.4025 27.3323C15.1868 27.5709 14.9242 27.7625 14.6311 27.895C14.338 28.0275 14.0208 28.0981 13.6991 28.1023H13.6758Z",fill:V})})}),(0,s.jsx)("g",{transform:"translate(32.4879 31.4885)",children:(0,s.jsx)("g",{className:"spinner-logo__result-glyph spinner-logo__result-glyph--error",children:(0,s.jsx)("path",{d:"M17.3045 14.0095L27.3378 3.99955C27.5554 3.78199 27.728 3.52371 27.8457 3.23946C27.9635 2.95521 28.0241 2.65055 28.0241 2.34288C28.0241 2.03521 27.9635 1.73055 27.8457 1.4463C27.728 1.16205 27.5554 0.903769 27.3378 0.686213C27.1203 0.468656 26.862 0.296082 26.5778 0.178341C26.2935 0.0606 25.9889 -4.58466e-09 25.6812 0C25.3735 4.58466e-09 25.0689 0.0606 24.7846 0.178341C24.5003 0.296082 24.2421 0.468656 24.0245 0.686213L14.0145 10.7195L4.00451 0.686213C3.56514 0.246838 2.96921 -4.62957e-09 2.34784 0C1.72647 4.62957e-09 1.13055 0.246838 0.691177 0.686213C0.251802 1.12559 0.0049634 1.72151 0.0049634 2.34288C0.00496339 2.96425 0.251802 3.56017 0.691177 3.99955L10.7245 14.0095L0.691177 24.0195C0.472196 24.2363 0.29836 24.4943 0.179723 24.7787C0.0610849 25.063 0 25.3681 0 25.6762C0 25.9843 0.0610849 26.2894 0.179723 26.5737C0.29836 26.8581 0.472196 27.1161 0.691177 27.3329C0.908091 27.5516 1.16616 27.7252 1.4505 27.8436C1.73484 27.9621 2.03982 28.0231 2.34784 28.0231C2.65587 28.0231 2.96085 27.9621 3.24519 27.8436C3.52953 27.7252 3.7876 27.5516 4.00451 27.3329L14.0145 17.2995L24.0245 27.3329C24.296 27.6078 24.6314 27.8111 25.0007 27.9245C25.3701 28.0379 25.7618 28.0579 26.1407 27.9828C26.5197 27.9077 26.8741 27.7397 27.1722 27.4939C27.4703 27.2481 27.7028 26.9322 27.8488 26.5745C28.0272 26.1459 28.0736 25.6738 27.9821 25.2187C27.8907 24.7636 27.6655 24.346 27.3355 24.0195L17.3045 14.0095Z",fill:V})})})]})}case"default":return(0,s.jsx)($,{...d,role:o??"status","aria-live":n??"polite","aria-label":l??"Loading","data-slot":"spinner",className:I("size-4 animate-spin",e)});default:return a}}function X(t){let{...e}=t;return(0,s.jsx)(b.bL,{"data-slot":"dialog",...e})}function Y(t){let{...e}=t;return(0,s.jsx)(b.ZL,{"data-slot":"dialog-portal",...e})}function W(t){let{...e}=t;return(0,s.jsx)(b.bm,{"data-slot":"dialog-close",...e})}function K(t){let{className:e,...a}=t;return(0,s.jsx)(b.hJ,{"data-slot":"dialog-overlay",className:I("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function J(t){let{className:e,children:a,contentInsideOverlay:r=!1,showCloseButton:i=!0,portalContainer:o,...n}=t,l=(0,s.jsxs)(b.UC,{"data-slot":"dialog-content",className:I("bg-background-containers data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-3xl border-0 p-6 shadow-[var(--shadow-login)] duration-200 outline-none sm:max-w-120 sm:p-10",e),...n,children:[a,i&&(0,s.jsxs)(b.bm,{"data-slot":"dialog-close",className:"focus-visible:ring-ring/30 absolute top-4 right-4 inline-flex size-6 cursor-pointer items-center justify-center rounded-full text-icons-light transition-colors hover:text-icons-normal focus-visible:text-icons-dark focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,s.jsx)(m.A,{className:"size-6"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]});return(0,s.jsx)(Y,{"data-slot":"dialog-portal",container:o,children:r?(0,s.jsx)(K,{children:l}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(K,{}),l]})})}let G=/oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)/;function Q(t,e){let a=t.match(G);return a?{l:Number.parseFloat(a[1]),c:Number.parseFloat(a[2]),h:Number.parseFloat(a[3])}:{l:e[0],c:e[1],h:e[2]}}function tt(t){let{data:e,foreground:a,background:r,robustness:i="M",className:o,...n}=t,[d,c]=(0,l.useState)(null);return((0,l.useEffect)(()=>{(async()=>{try{let t=getComputedStyle(document.documentElement),o=a??t.getPropertyValue("--foreground"),n=r??t.getPropertyValue("--background"),s=Q(o,[.21,.006,285.885]),l=Q(n,[.985,0,0]),d=await z.toString(e,{type:"svg",color:{dark:(0,k.NNP)((0,k.yLC)({mode:"oklch",...s})),light:(0,k.NNP)((0,k.yLC)({mode:"oklch",...l}))},width:200,errorCorrectionLevel:i,margin:0});c(d)}catch(t){console.error(t)}})()},[e,a,r,i]),d)?(0,s.jsx)("div",{className:I("size-full","[&_svg]:size-full",o),dangerouslySetInnerHTML:{__html:d},...n}):null}function te(t){return C.A.create({baseURL:t,timeout:3e4})}let ta=new Set(["common","delete","get","head","post","put","patch","options","purge","link","unlink"]);function tr(){var t,e;return null==(e=globalThis.process)||null==(t=e.env)?void 0:t.NODE_ENV}function ti(t){if(void 0===t)return[];let e="function"==typeof t.toJSON?t.toJSON():t,a=[];return!function t(e,a){if(null!==e&&"object"==typeof e)for(let[r,i]of Object.entries(e)){if(null==i)continue;let e=r.toLowerCase();if("common"===e){t(i,a);continue}ta.has(e)||a.push([r,String(i)])}}(e,a),a}function to(t){var e;return!!("u">typeof FormData&&t instanceof FormData)||null!==t&&"object"==typeof t&&((null==(e=t.constructor)?void 0:e.name)==="FormData"||"function"==typeof t.getBoundary)}let tn=new Set(["authorization","cookie","set-cookie","x-xsrf-token"]);function ts(t){if(null==t)return;let e="function"==typeof t.toJSON?t.toJSON():t;if(null===e||"object"!=typeof e)return;let a={};for(let[t,r]of Object.entries(e))null!=r&&(a[t]=tn.has(t.toLowerCase())?"[redacted]":String(r));return a}function tl(t){if(null!=t){if("string"==typeof t)try{return JSON.parse(t)}catch{return t.length>2e3?`${t.slice(0,2e3)}… (${t.length} chars)`:t}return to(t)?"[FormData]":t}}function td(t){let e=(t.requestConfig.method??"GET").toUpperCase(),a=t.requestConfig.url??"",r=`[api:server] ${e} ${a} → ${t.status} (${t.durationMs}ms)`,i={requestId:t.requestId,...t.error?{error:t.error}:{},params:t.requestConfig.params,requestBody:tl(t.requestConfig.data),requestHeaders:ts(t.requestConfig.headers),responseHeaders:ts(t.responseHeaders),responseBody:tl(t.responseBody)};(t.status>=500||void 0!==t.error&&0===t.status?console.error:t.status>=400?console.warn:console.log)(r,i)}function tc(t){let{clientName:e,configureFunctionName:a,defaultBaseURL:r}=t,i=te(r),o=te(r),n=null,s=null,l=null,d=null,c=null,u=null;async function p(t,e){let a=function(t,e){let a;if(void 0===e.data||to(e.data))return e;let r=j.$t.from(e.headers);return r.has("Content-Type")||void 0!==(a=t.defaults.headers.common)&&j.$t.from(a).has("Content-Type")||r.set("Content-Type","application/json"),e.headers=r,e}(t,function(t){let e=j.$t.from(t.headers);if(null!==l){var a;let t=null==(a=l())?void 0:a.trim();t&&!e.has("Authorization")&&e.set("Authorization",`Bearer ${t}`)}if(null!==u)for(let[a,r]of Object.entries(u({url:t.url,method:t.method})))r&&!e.has(a)&&e.set(a,r);return t.headers=e,t}({...e})),r=function(t){let e,a=j.$t.from(t.headers),r=a.get("x-request-id");if("string"==typeof r&&r.length>0)return r;let i="function"==typeof(null==(e=globalThis.crypto)?void 0:e.randomUUID)?e.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`;return a.set("x-request-id",i),t.headers=a,i}(a),i=function(){var t;if("u">typeof window)return!1;let e=tr(),a=globalThis.process;return(null==a||null==(t=a.env)?void 0:t.DEBUG_API)==="true"||"production"!==e&&"test"!==e&&"testing"!==e}(),o=i?Date.now():0;try{let e=await t.request(a);return i&&td({requestConfig:a,requestId:r,status:e.status,durationMs:Date.now()-o,responseHeaders:e.headers,responseBody:e.data}),e}catch(t){var n,s,d;throw i&&td({requestConfig:a,requestId:r,status:(null==(n=t.response)?void 0:n.status)??0,durationMs:Date.now()-o,responseHeaders:null==(s=t.response)?void 0:s.headers,responseBody:null==(d=t.response)?void 0:d.data,error:t.message}),t}}async function g(t){return p(t.skipUnauthorizedRecovery?o:i,function(t){let{skipUnauthorizedRecovery:e,...a}=t;return a}(t))}let v=async t=>g({...t,skipUnauthorizedRecovery:!0});function h(){return null!==n}return{configureClientRuntime:function(t){let a,r=(a=function(t){let e=ti(t);if(0===e.length)return;let a=new Map;for(let[t,r]of e)a.set(t.toLowerCase(),r);return Object.fromEntries(Array.from(a.entries()).sort((t,e)=>{let[a]=t,[r]=e;return a.localeCompare(r)}))}(t.headers),JSON.stringify({...void 0!==t.baseURL?{baseURL:t.baseURL}:{},...void 0!==t.timeout?{timeout:t.timeout}:{},...void 0!==a?{headers:a}:{}}));if("{}"!==r){if(null!==n){if(n===r)return;let t=`${e} already configured. Existing: ${n}. New: ${r}.`;if("production"===tr())return void console.warn(t);throw Error(t)}for(let e of[i,o])void 0!==t.baseURL&&(e.defaults.baseURL=t.baseURL),void 0!==t.timeout&&(e.defaults.timeout=t.timeout),void 0!==t.headers&&function(t,e){let a=t.defaults.headers,r=a.common,i=j.$t.from(r);for(let[t,a]of ti(e))i.set(t,a);a.common=i.toJSON(),t.defaults.headers=a}(e,t.headers);n=r}},configureAccessTokenResolverRuntime:function(t){l=t},configureUnauthorizedHandlerRuntime:function(t){if(d=t,null===t){null!==s&&(i.interceptors.response.eject(s),s=null),c=null;return}null===s&&(s=i.interceptors.response.use(t=>t,async t=>{var e;let a=t.config;if((null==(e=t.response)?void 0:e.status)!==401||null===d||void 0===a||a._apiRetried)return Promise.reject(t);if(null===c){let e=d;if(null===e)return Promise.reject(t);c=Promise.resolve().then(()=>e(t,{requestWithoutUnauthorizedRecovery:v})).finally(()=>{c=null})}try{if(!await c)return Promise.reject(t);a._apiRetried=!0;let e=j.$t.from(a.headers);return e.delete("Authorization"),a.headers=e,p(i,a)}catch{return Promise.reject(t)}}))},configureHeadersResolverRuntime:function(t){u=t},isClientConfiguredRuntime:h,assertClientConfiguredRuntime:function(){if(!h())throw Error(`${e} is not configured. Call ${a}(...) before making requests.`)},resetClientForTestsRuntime:function(){let t;if("test"!==(t=tr())&&"testing"!==t)throw Error("resetApiClientForTests() can only be called in test environment.");i=te(r),o=te(r),n=null,s=null,l=null,d=null,c=null,u=null},requestRuntime:g,requestWithoutUnauthorizedRecovery:v,addResponseInterceptorRuntime:function(t,e){return i.interceptors.response.use(t,e)}}}let tu=tc({clientName:"API node client",configureFunctionName:"configureNodeApiClient",defaultBaseURL:"https://api.vizbl.com"});tu.configureClientRuntime,tu.configureAccessTokenResolverRuntime,tu.configureHeadersResolverRuntime,tu.configureUnauthorizedHandlerRuntime,tu.isClientConfiguredRuntime,tu.assertClientConfiguredRuntime,tu.resetClientForTestsRuntime;let tp=tu.requestRuntime;async function tg(t){return tp(t)}async function tv(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{client:a=tg,...r}=e;return(await a({method:"POST",url:"/public/widget/activate-core",params:t,...r})).data}async function th(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{client:a=tg,...r}=e;return(await a({method:"POST",url:"/public/widget/token",data:t,...r})).data}async function tw(t,e){let{tinuuid:a}=t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{client:i=tg,...o}=r;return(await i({method:"GET",url:`/public/objects/by-tinuuid/${a}`,params:e,...o})).data}function tf(t){var e;if((0,j.F0)(t))return null==(e=t.response)?void 0:e.status}tu.requestWithoutUnauthorizedRecovery,tu.addResponseInterceptorRuntime;let tb=new Set(["core-ar","core-ar-shopify"]);async function tm(t,e){let a=await tv({mode:t},e);if("string"!=typeof a.productType||!tb.has(a.productType))throw TypeError("The API key is not enabled for Core AR");return tj(a.widgetSession)}class tx{get token(){return this.session.token}get sid(){return this.session.sid}get snapshot(){return{...this.session}}async getTokenForRequest(){return this.session.expiresAt-this.now()>this.refreshThresholdMs?this.session.token:(await this.refresh()).token}async getRequestConfig(t){return{baseURL:this.apiBaseUrl,headers:{"x-widget-session-token":await this.getTokenForRequest()},signal:t}}async recoverFromExpiry(t){try{await this.refresh()}catch{this.session=this.toSnapshot(await tm(this.mode,{baseURL:this.apiBaseUrl,headers:{"x-api-key":this.apiKey},signal:t}))}}refresh(){return this.refreshPromise||(this.refreshPromise=this.issueWidgetToken({mode:this.mode,token:this.session.token},{baseURL:this.apiBaseUrl,headers:{"x-api-key":this.apiKey}}).then(t=>this.toSnapshot(tj(t))).then(t=>(this.session=t,this.snapshot)).finally(()=>{this.refreshPromise=null})),this.refreshPromise}toSnapshot(t){return{...t,expiresAt:this.now()+1e3*t.expiresIn}}constructor(t,e){(0,n._)(this,"apiBaseUrl",void 0),(0,n._)(this,"apiKey",void 0),(0,n._)(this,"issueWidgetToken",void 0),(0,n._)(this,"mode",void 0),(0,n._)(this,"now",void 0),(0,n._)(this,"refreshThresholdMs",void 0),(0,n._)(this,"refreshPromise",null),(0,n._)(this,"session",void 0),this.apiBaseUrl=e.apiBaseUrl,this.apiKey=e.apiKey,this.issueWidgetToken=e.issueWidgetToken??th,this.mode=e.mode,this.now=e.now??Date.now,this.refreshThresholdMs=e.refreshThresholdMs??3e4,this.session=this.toSnapshot(t)}}async function ty(t){let{apiBaseUrl:e,apiKey:a,initialWidgetSessionToken:r,mode:i,signal:o}=t;return r?new tx({expiresIn:900,sid:r,token:r},{apiBaseUrl:e,apiKey:a,mode:i}):new tx(await tm(i,{baseURL:e,headers:{"x-api-key":a},signal:o}),{apiBaseUrl:e,apiKey:a,mode:i})}async function tk(t,e,a,r){try{return await tz(t,e,a,r)}catch(i){if(401!==tf(i))throw i;return await a.recoverFromExpiry(r),tz(t,e,a,r)}}async function tz(t,e,a,r){return tw({tinuuid:t},{productType:"core-ar",variantId:e??void 0},await a.getRequestConfig(r))}async function tC(t,e){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)try{let r=await t.getRequestConfig(),i=new URL("/public/widget/events",r.baseURL??window.location.origin),o=await fetch(i,{body:JSON.stringify({event:e,objectId:a.objectId??void 0,timestamp:new Date().toISOString(),variantId:a.variantId??void 0}),headers:{"Content-Type":"application/json",...r.headers},keepalive:!0,method:"POST"});if(!o.ok)throw Error(`Widget event request failed with ${o.status}`)}catch{}}function tj(t){if(!t||"object"!=typeof t||"string"!=typeof t.token||!t.token.trim()||"string"!=typeof t.sid||!t.sid.trim()||"number"!=typeof t.expiresIn||!Number.isFinite(t.expiresIn)||t.expiresIn<=0)throw TypeError("Invalid widget session response");return t}let t_=tc({clientName:"API client",configureFunctionName:"configureApiClient",defaultBaseURL:"https://api.vizbl.com/v1"});t_.configureClientRuntime,t_.configureAccessTokenResolverRuntime,t_.configureHeadersResolverRuntime,t_.configureUnauthorizedHandlerRuntime,t_.isClientConfiguredRuntime,t_.assertClientConfiguredRuntime,t_.resetClientForTestsRuntime;let tL=t_.requestRuntime;async function tN(t){return tL(t)}async function tS(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{client:a=tN,...r}=e;return(await a({method:"POST",url:"/obj/Fetch",data:t,...r})).data}t_.requestWithoutUnauthorizedRecovery,t_.addResponseInterceptorRuntime;let tM="vizbl-model-viewer-blank-canvas-recovery",tR=(0,l.createContext)(null);function tU(t){var e,a,r,i;let{children:o,tinuuid:n,apiKey:d,appClipBundleId:c,arExperience:p,apiBaseUrl:g,legacyApiBaseUrl:v,mode:h,initialWidgetSessionToken:w,handoffUrl:f,hid:b,launchAr:m,layout:x,background:y,sizeType:k,dimensionAxes:z,cameraOrbit:C,minCameraOrbit:_,maxCameraOrbit:L,viewerSurface:N}=t,{object:S,material:M,error:R,isLoading:U,setMaterialHid:A,widgetSession:T}=function(t,e,a){let[r,i]=(0,l.useState)(e??null),{data:o=null,error:n,isLoading:s}=(0,u.I)({queryKey:["modelViewer","object",{apiBaseUrl:a.apiBaseUrl??null,apiKey:a.apiKey,initialHid:e??null,initialWidgetSessionToken:a.initialWidgetSessionToken??null,legacyApiBaseUrl:a.legacyApiBaseUrl??null,mode:a.mode,tinuuid:t}],enabled:!!t,gcTime:0,refetchOnMount:"always",queryFn:async r=>{let{signal:i}=r;if(!a.apiKey)return{object:await tS({tinuuid:t},{baseURL:a.legacyApiBaseUrl,signal:i}),widgetSession:null};let o=await ty({apiBaseUrl:a.apiBaseUrl,apiKey:a.apiKey,initialWidgetSessionToken:a.initialWidgetSessionToken,mode:a.mode,signal:i});return{object:await tk(t,e,o,i),widgetSession:o}}}),d=(null==o?void 0:o.object)??null,c=(0,l.useMemo)(()=>{var t,e;return(null==d||null==(t=d.materials)?void 0:t.length)?r?d.materials.find(t=>t.hid===r)||d.materials[0]:(null==(e=d.materials)?void 0:e[0])??null:null},[r,d]);return(0,l.useEffect)(()=>{i(e??null)},[e,t]),{object:d,material:c,error:n,isLoading:s,setMaterialHid:i,widgetSession:(null==o?void 0:o.widgetSession)??null}}(n,b,{apiBaseUrl:g,apiKey:d,initialWidgetSessionToken:w,legacyApiBaseUrl:v,mode:h}),[E,P]=(0,l.useState)(!0),[I,B]=(0,l.useState)(null),[Z,q]=(0,l.useState)(null),O=(0,l.useRef)(null),H=(0,l.useRef)(null),$=(null==M||null==(e=M.native)?void 0:e.glbUrl)??null,F=(null==M||null==(a=M.native)?void 0:a.usdzUrl)??null,V=(null==M||null==(i=M.previews)||null==(r=i[0])?void 0:r.url)??null,D=(0,l.useMemo)(()=>{var t;if(U)return"loading";let e=function(t){var e;if(!(0,j.F0)(t))return null;let a=null==(e=t.response)?void 0:e.status;return 401===a?"unauthorized":403===a?"forbidden":402===a?"payment-required":null}(R);return e||(("ar-view"===h||"qr-code"===h&&"standard"===p)&&(null==S||null==(t=S.policy)?void 0:t.instantArView)===!1?"forbidden":null==R&&S&&M&&$?"ready":"not-found")},[p,R,$,U,M,h,S]),X=(0,l.useCallback)(t=>tC(T,t,{objectId:null==S?void 0:S.uuid,variantId:null==M?void 0:M.hid}),[null==M?void 0:M.hid,null==S?void 0:S.uuid,T]),Y=(0,l.useCallback)(t=>{t!==(null==M?void 0:M.hid)&&(A(t),tC(T,"interacted",{objectId:null==S?void 0:S.uuid,variantId:t}))},[null==M?void 0:M.hid,null==S?void 0:S.uuid,A,T]);(0,l.useEffect)(()=>{"inline"!==N&&"ready"===D&&T&&H.current!==T.sid&&(X("widget_opened"),H.current=T.sid)},[D,X,N,T]),(0,l.useEffect)(()=>{O.current=null},[null==T?void 0:T.sid]),(0,l.useEffect)(()=>{P("ready"===D&&!!$)},[$,D]),(0,l.useEffect)(()=>{if(!Z)return;let t=t=>{var e;let a=null==(e=t.detail)?void 0:e.totalProgress;void 0!==a&&P(a<1)},e=()=>{P(!1),window.setTimeout(()=>{(function(t){var e;let a=null==(e=t.shadowRoot)?void 0:e.querySelector("canvas.show");if(!a||0===a.width||0===a.height)return!1;let r=a.getContext("webgl2")??a.getContext("webgl");if(!r)return!1;let i=Math.min(64,a.width,a.height),o=Math.max(0,Math.floor((a.width-i)/2)),n=Math.max(0,Math.floor((a.height-i)/2)),s=new Uint8Array(i*i*4);r.readPixels(o,n,i,i,r.RGBA,r.UNSIGNED_BYTE,s);for(let t=0;t<s.length;t+=4)if(s[t]>8||s[t+1]>8||s[t+2]>8||s[t+3]>8)return!1;return!0})(Z)&&!function(){try{return"1"===window.sessionStorage.getItem(tM)}catch{return!1}}()&&(function(){try{window.sessionStorage.setItem(tM,"1")}catch{}}(),window.location.reload())},2e3)},a=()=>{P(!1)},r=t=>{var e;"user-interaction"===(null==(e=t.detail)?void 0:e.source)&&T&&O.current!==T.sid&&(X("interacted"),O.current=T.sid)};return Z.addEventListener("progress",t),Z.addEventListener("load",e),Z.addEventListener("error",a),Z.addEventListener("camera-change",r),()=>{Z.removeEventListener("progress",t),Z.removeEventListener("load",e),Z.removeEventListener("error",a),Z.removeEventListener("camera-change",r)}},[Z,X,T]);let W=(0,l.useMemo)(()=>({apiKey:d,appClipBundleId:c,arExperience:p,tinuuid:n,object:S,material:M,glbUrl:$,usdzUrl:F,previewUrl:V,handoffUrl:f,launchAr:m,layout:x,background:y,mode:h,sizeType:k,dimensionAxes:z,cameraOrbit:C,minCameraOrbit:_,maxCameraOrbit:L,isLoading:U,isModelLoading:E,state:D,modelViewerEl:Z,containerEl:I,widgetSession:T,setMaterialHid:Y,setContainerEl:B,setModelViewerEl:q,trackEvent:X}),[d,c,p,n,S,M,$,F,V,f,m,x,y,h,k,z,C,_,L,U,E,D,Z,I,T,Y,X]);return(0,s.jsx)(tR,{value:W,children:o})}function tA(){let t=(0,l.use)(tR);if(!t)throw Error("useModelViewer must be used within a ModelViewerProvider");return t}function tT(){return"u"<typeof navigator?"":navigator.userAgent||navigator.vendor||""}function tE(){if("u"<typeof window||"u"<typeof navigator)return!1;let t="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return(/iPad|iPhone|iPod/.test(tT())||t)&&!("MSStream"in window)}function tP(){var t,e;if("u"<typeof window||"u"<typeof navigator)return!1;let a=/Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(tT()),r=(null==(t=(e=window).matchMedia)?void 0:t.call(e,"(pointer: coarse)").matches)??!1;return navigator.maxTouchPoints>1&&r&&(a||tE())}function tI(){var t,e;if(!tE())return!1;let a=(null==(t=tT().match(/\bOS (\d+)/))?void 0:t[1])??(null==(e=tT().match(/Version\/(\d+)/))?void 0:e[1]);return!!a&&Number.parseInt(a,10)>=18}function tB(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("advanced"===t.experience&&tI()){var a,r,i,o;let n,s=(a=t.appClipBundleId,r=t.tinuuid,i=t.hostname,o=t.hid,(n=new URL("https://appclip.apple.com/id")).searchParams.set("p",a),n.searchParams.set("tinuuid",r),o&&n.searchParams.set("hid",o),n.searchParams.set("region",i.endsWith("arizo.ru")?"ru":"en"),n.toString());e?window.open(s,"_blank"):window.location.assign(s);return}let n=document.createElement("a"),s=document.createElement("img");n.rel="ar",n.href=function(t,e,a){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:tE();return r?`${new URL(e).toString()}#allowsContentScaling=0`:`intent://arvr.google.com/scene-viewer/1.0?file=${encodeURIComponent(new URL(t).toString())}&resizable=false${"wall"===a||"ceiling"===a?"&enable_vertical_placement=true":""}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;end;`}(t.glbUrl,t.usdzUrl,t.objectType),n.hidden=!0,s.alt="",s.hidden=!0,n.appendChild(s),document.body.appendChild(n),n.click(),n.remove()}async function tZ(t,e){if(!t||!e.tinuuid)return!1;try{return await t(e)}catch{return!1}}async function tq(t){await new Promise(e=>{let a=window.setTimeout(e,300);t.finally(()=>{window.clearTimeout(a),e()})})}function tO(t){let{disabled:e,onClick:a,onBeforeActivateAr:r,size:i="lg",...o}=t,{apiKey:n,appClipBundleId:d,arExperience:c,containerEl:u,handoffUrl:p,isLoading:g,isModelLoading:v,launchAr:h,material:w,mode:f,modelViewerEl:b,object:m,tinuuid:x,trackEvent:y,widgetSession:k}=tA(),[z,C]=(0,l.useState)(null),[j,_]=(0,l.useState)(!1),L=(0,l.useRef)(null),N=null==k?void 0:k.sid,S=null==k?void 0:k.token,M=g||v||null===w,R=(0,l.useMemo)(()=>({hid:null==w?void 0:w.hid,tinuuid:(null==m?void 0:m.tinuuid)??x}),[null==w?void 0:w.hid,null==m?void 0:m.tinuuid,x]),U="ar-view"===f?"standard":"advanced-ar-view"===f||"ar-viewer"===f||"embedded-3d-viewer"===f?"advanced":"qr-code"===f?c:void 0,A=(0,l.useMemo)(()=>{let t=null==w?void 0:w.native;return!U||!m||!(null==t?void 0:t.glbUrl)||!t.usdzUrl||"u"<typeof window?null:{appClipBundleId:d,experience:U,glbUrl:t.glbUrl,hid:null==w?void 0:w.hid,hostname:window.location.hostname,objectType:m.type,tinuuid:m.tinuuid??x,usdzUrl:t.usdzUrl}},[d,U,null==w?void 0:w.hid,null==w?void 0:w.native,m,x]),T=(0,l.useMemo)(()=>(function(t){let e,{apiKey:a,arExperience:r,baseUrl:i,hid:o,mode:n,tinuuid:s,widgetSessionToken:l}=t;if(!i||!s)return null;try{e=new URL(i)}catch{return null}e.searchParams.set("tinuuid",s),e.searchParams.set("mode",n),r?e.searchParams.set("ar-experience",r):e.searchParams.delete("ar-experience"),o?e.searchParams.set("hid",o):e.searchParams.delete("hid");let d=new URLSearchParams(e.hash.slice(1));return a?d.set("api-key",a):d.delete("api-key"),l?d.set("widget-session-token",l):d.delete("widget-session-token"),e.hash=d.toString(),e.toString()})({apiKey:n,arExperience:c,baseUrl:p||"https://integrations.vizbl.com/model-viewer",hid:null==w?void 0:w.hid,mode:f,tinuuid:(null==m?void 0:m.tinuuid)??x,widgetSessionToken:z&&z.sid===N?z.token:S}),[n,c,z,p,null==w?void 0:w.hid,f,null==m?void 0:m.tinuuid,x,N,S]);(0,l.useEffect)(()=>{if(!A||g||!tP())return;let t=[N??"legacy",A.tinuuid,null==w?void 0:w.hid,A.experience].join(":");if(L.current===t)return;L.current=t;let e=window.setTimeout(()=>{(async()=>{L.current!==t||await tZ(h,R)||(await tq(y("ar_launched")),L.current===t&&tB(A))})()},0);return()=>{window.clearTimeout(e),L.current===t&&(L.current=null)}},[R,A,g,h,null==w?void 0:w.hid,y,N]);let E=async()=>{if(b&&!M){if(await tZ(h,R))return void(null==r||r());if(A&&tP()){if(null==r||r(),"advanced"===A.experience&&tI()){tB(A,!0),y("ar_launched");return}await tq(y("ar_launched")),tB(A)}else if(b.canActivateAR)null==r||r(),await tq(y("ar_launched")),await b.activateAR();else if(T){let t=await (null==k?void 0:k.getTokenForRequest().catch(()=>k.token));C(k&&t?{sid:k.sid,token:t}:null),y("interacted"),_(!0)}}},P=async t=>{null==a||a(t),t.defaultPrevented||await E()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Z,{...o,size:i,disabled:e||M,onClick:P,children:"View in place"}),T&&(0,s.jsx)(X,{open:j,onOpenChange:_,children:(0,s.jsxs)(J,{showCloseButton:!1,portalContainer:u,children:[(0,s.jsx)("div",{className:"flex items-center justify-center rounded-2xl bg-constant-white p-10",children:(0,s.jsx)(tt,{className:"size-48",robustness:"H",data:T})}),(0,s.jsx)("p",{className:"text-center text-lg font-medium text-text-sub",children:"Scan the QR code with your phone or tablet to view the object in your interior."}),(0,s.jsx)("p",{className:"text-center text-xs text-text-light",children:"*Requires AR-supported device and browser. We recommend iOS 12 or later with Safari, or Android 7.0 or later with Chrome."}),(0,s.jsx)(W,{asChild:!0,children:(0,s.jsx)(Z,{size:"lg",children:"Close"})})]})})]})}function tH(t){let{lines:e}=t;return(0,s.jsx)("svg",{className:"absolute inset-0 block pointer-events-none",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",children:e.map((t,e)=>(0,s.jsx)("line",{className:I("stroke-primary stroke-2 [stroke-dasharray:2] transition-opacity duration-200",0===t.opacity&&"opacity-0"),style:{opacity:t.opacity},x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},e))})}function t$(t){let{isVisible:e,lines:a}=t;return e?(0,s.jsx)(tH,{lines:a}):null}let tF=[{slot:"hotspot-dot+X-Y+Z",position:"1 -1 1",normal:"1 0 0"},{slot:"hotspot-dot+X-Y-Z",position:"1 -1 -1",normal:"1 0 0"},{slot:"hotspot-dot+X+Y-Z",position:"1 1 -1",normal:"0 1 0"},{slot:"hotspot-dot-X+Y-Z",position:"-1 1 -1",normal:"0 1 0"},{slot:"hotspot-dot-X-Y-Z",position:"-1 -1 -1",normal:"-1 0 0"},{slot:"hotspot-dot-X-Y+Z",position:"-1 -1 1",normal:"-1 0 0"},{slot:"hotspot-dim+X-Y",position:"1 -1 0",normal:"1 0 0",isDimensionLabel:!0},{slot:"hotspot-dim+X-Z",position:"1 0 -1",normal:"1 0 0",isDimensionLabel:!0},{slot:"hotspot-dim+Y-Z",position:"0 1 -1",normal:"0 1 0",isDimensionLabel:!0},{slot:"hotspot-dim-X-Z",position:"-1 0 -1",normal:"-1 0 0",isDimensionLabel:!0},{slot:"hotspot-dim-X-Y",position:"-1 -1 0",normal:"-1 0 0",isDimensionLabel:!0}],tV=new Map(tF.map(t=>[t.slot,t])),tD=[{slot:"hotspot-dim+X-Y",sizeAxis:"z",offsetMultiplier:{x:1.2,y:1.1}},{slot:"hotspot-dim+X-Z",sizeAxis:"y",offsetMultiplier:{x:1.2,z:1.2}},{slot:"hotspot-dim+Y-Z",sizeAxis:"x",offsetMultiplier:{y:1.1,z:1.1}},{slot:"hotspot-dim-X-Z",sizeAxis:"y",offsetMultiplier:{x:1.2,z:1.2}},{slot:"hotspot-dim-X-Y",sizeAxis:"z",offsetMultiplier:{x:1.2,y:1.1}}],tX=tD.map(t=>t.slot),tY=new Map(tD.map(t=>[t.slot,t.sizeAxis])),tW=[{lineIndex:0,hotspot1:"hotspot-dot+X-Y+Z",hotspot2:"hotspot-dot+X-Y-Z",dimensionHotspot:"hotspot-dim+X-Y"},{lineIndex:1,hotspot1:"hotspot-dot+X-Y-Z",hotspot2:"hotspot-dot+X+Y-Z",dimensionHotspot:"hotspot-dim+X-Z"},{lineIndex:2,hotspot1:"hotspot-dot+X+Y-Z",hotspot2:"hotspot-dot-X+Y-Z",dimensionHotspot:"hotspot-dim+Y-Z"},{lineIndex:3,hotspot1:"hotspot-dot-X+Y-Z",hotspot2:"hotspot-dot-X-Y-Z",dimensionHotspot:"hotspot-dim-X-Z"},{lineIndex:4,hotspot1:"hotspot-dot-X-Y-Z",hotspot2:"hotspot-dot-X-Y+Z",dimensionHotspot:"hotspot-dim-X-Y"}],tK=(0,l.memo)(t=>{let{hiddenHotspots:e,isVisible:a,labels:r}=t,i=(0,l.useMemo)(()=>new Map(r.map(t=>[t.slot,t])),[r]);return(0,s.jsx)(s.Fragment,{children:tF.map(t=>{let r=t.isDimensionLabel,o=i.get(t.slot),n=!a||!r||!o||e.has(t.slot);return(0,s.jsx)(Z,{slot:t.slot,"data-position":t.position,"data-normal":t.normal,className:I("absolute box-border pointer-events-none h-auto min-h-9 w-max -translate-x-1/2 -translate-y-1/2 whitespace-nowrap py-2 text-center [--min-hotspot-opacity:0] transition-opacity duration-200 @max-xl:px-3 @max-xl:py-1.5 @max-xl:typo-button-small",n&&"opacity-0",!r&&"hidden"),variant:"secondary",children:r&&o?o.text:""},t.slot)})})});function tJ(t){let{className:e,...a}=t;return(0,s.jsxs)("div",{className:I("group inline-flex gap-2 text-sm text-muted-foreground transition-colors duration-200 ease-in-out hover:text-text-dark",e),...a,children:[(0,s.jsx)("div",{className:"flex size-5 items-center justify-center rounded-full bg-icons-light transition-colors duration-200 ease-in-out group-hover:bg-icons-red",children:(0,s.jsx)(F,{className:"size-4.25 text-icons-white"})}),"Powered by Vizbl"]})}function tG(t){let{className:e,...a}=t,{object:r}=tA();return(0,s.jsxs)("div",{className:I("grid h-16 items-center gap-5 px-6 sm:grid-cols-3",e),...a,children:[(0,s.jsx)("div",{className:"truncate",children:null==r?void 0:r.name}),(0,s.jsx)("div",{className:"hidden justify-center sm:flex",children:(0,s.jsx)(tJ,{})}),(0,s.jsx)("div",{className:"hidden sm:block"})]})}function tQ(t){let{className:e,...a}=t;return(0,s.jsx)("div",{"data-slot":"card",className:I("bg-card text-card-foreground relative flex flex-col overflow-hidden rounded-3xl px-8 py-10",e),...a})}function t1(t){let{className:e,...a}=t;return(0,s.jsx)("div",{"data-slot":"card-content",className:I("px-5",e),...a})}function t0(t){let{className:e,...a}=t;return(0,s.jsx)(_.b,{"data-slot":"label",className:I("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}let t2=(0,f.F)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function t5(t){let{className:e,orientation:a="vertical",...r}=t;return(0,s.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:I(t2({orientation:a}),e),...r})}function t3(t){let{className:e,...a}=t;return(0,s.jsx)("div",{"data-slot":"field-content",className:I("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",e),...a})}function t9(t){let{className:e,...a}=t;return(0,s.jsx)(t0,{"data-slot":"field-label",className:I("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),...a})}function t4(t){let{className:e,...a}=t;return(0,s.jsx)(L.bL,{"data-slot":"radio-group",className:I("grid gap-3",e),...a})}function t8(t){let{checked:e,className:a,...r}=t;return(0,s.jsx)("div",{className:I("absolute top-1/2 left-1/2 size-6 -translate-x-1/2 -translate-y-1/2","flex items-center justify-center rounded-full",e?"bg-lime-400":"bg-background-base-2",a),...r,children:(0,s.jsx)(x.A,{className:"text-constant-white size-3.5",strokeWidth:4})})}function t7(t){let{className:e,variant:a="default",...r}=t;return(0,s.jsxs)(L.q7,{"data-slot":"radio-group-item",className:I("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50","check"===a&&"size-6","inverted"===a&&"size-5 border-button-outline data-[state=checked]:border-border-red data-[state=checked]:border-4 data-[state=checked]:bg-constant-white cursor-pointer transition-all",e),...r,children:["check"===a&&(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)(t8,{})}),"inverted"!==a&&(0,s.jsx)(L.C1,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:"check"===a?(0,s.jsx)(t8,{checked:!0}):(0,s.jsx)(y.A,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})]})}function t6(){let{object:t,material:e,setMaterialHid:a}=tA(),r=(null==t?void 0:t.materials)??[];return!t||r.length<2?null:(0,s.jsx)(tQ,{className:"w-fit max-w-full overflow-hidden px-4 py-4 @max-xl:rounded-2xl @max-xl:px-2 @max-xl:py-2",children:(0,s.jsx)(t1,{className:"px-0",children:(0,s.jsx)(t4,{className:"flex w-max min-w-full gap-2 overflow-x-auto",value:(null==e?void 0:e.hid)??void 0,onValueChange:t=>a(t),children:r.map(e=>{var a,r,i,o,n;return(0,s.jsx)(t9,{htmlFor:e.hid,className:"cursor-pointer has-data-[state=checked]:bg-transparent has-data-[state=checked]:border-primary p-0",children:(0,s.jsxs)(t5,{className:"p-0! overflow-hidden rounded-md",children:[(0,s.jsx)(t3,{className:"shrink-0",children:(0,s.jsx)("img",{src:(null==(i=e.previews)||null==(r=i[0])||null==(a=r.subRes)?void 0:a.small)??(null==(n=e.previews)||null==(o=n[0])?void 0:o.url),width:80,height:80,alt:e.name??t.name??"Material preview",className:"size-20 object-cover @max-xl:size-12"})}),(0,s.jsx)(t7,{className:"sr-only",value:e.hid,id:e.hid})]})},e.hid)})})})})}let et={forbidden:"Viewer unavailable for this domain","not-found":"Object not found",unauthorized:"Invalid API key","payment-required":"Viewer temporarily unavailable"};function ee(t){let{variant:e,showDialogCloseButton:a=!1}=t;return(0,s.jsxs)("div",{className:"relative z-30 flex size-full flex-col items-center justify-center gap-4 bg-radial from-background-containers to-background-base-2 p-4 text-center",children:[(0,s.jsx)(q,{className:"size-8 text-icons-light"}),(0,s.jsx)("h2",{className:"typo-base-16 font-medium text-text-dark",children:et[e]}),a&&(0,s.jsx)(W,{asChild:!0,children:(0,s.jsx)(Z,{variant:"secondary",children:"Close"})})]})}function ea(t){let e=t.getBoundingBoxCenter(),a=t.getDimensions();return{center:e,size:a,halfSize:{x:a.x/2,y:a.y/2,z:a.z/2}}}function er(t){var e;let{showDialogCloseButton:a=!1}=t,{glbUrl:r,isModelLoading:i,object:o,previewUrl:n,state:d,setContainerEl:c,setModelViewerEl:u,usdzUrl:p,layout:g,background:v,dimensionAxes:h,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,trackEvent:m}=tA(),[x,y]=(0,l.useState)(!1),k="model"===g,z="loading"===d||"ready"===d&&i,C="ready"===d,j=((null==o||null==(e=o.materials)?void 0:e.length)??0)>1,_=C&&!k&&!i,L=x&&_,{lines:N,labels:S,hiddenHotspots:M}=function(t){let{isVisible:e,axes:a}=t,{glbUrl:r,isModelLoading:i,modelViewerEl:o,sizeType:n}=tA(),[s,d]=(0,l.useState)([]),[c,u]=(0,l.useState)([]),[p,g]=(0,l.useState)(()=>new Set),[v,h]=(0,l.useState)(null),w=!i;(0,l.useEffect)(()=>{h(null),d([]),u([]),g(new Set)},[o,r]);let f=(0,l.useCallback)(()=>{let t;if(!o)return[];let e=(t=ea(o),tD.filter(t=>{let{sizeAxis:e}=t;return a.includes(e)}).map(e=>{var a;let r,{slot:i,sizeAxis:o,offsetMultiplier:s}=e,l=function(t){let e=tV.get(t);if(!e)throw Error(`Missing hotspot config for slot "${t}"`);return e}(i);return{name:i,position:function(t,e){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{center:r,halfSize:i}=t,[o,n,s]=e.position.split(" ").map(Number),l=a.x??1,d=a.y??1,c=a.z??1;return`${r.x+o*i.x*l} ${r.y+n*i.y*d} ${r.z+s*i.z*c}`}(t,l,s),text:(a=t.size[o],r=Number(a.toFixed(3)),"cm"===n?`${Math.round(100*r)} cm`:"inch"===n?`${Math.round(100*r/2.54*100)/100} in`:"")}}));return e.forEach(t=>{o.updateHotspot({name:t.name,position:t.position})}),e.map(t=>({slot:t.name,text:t.text||"",position:t.position}))},[o,n,a]),b=(0,l.useCallback)(()=>{if(!o)return;let t=[],e=new Set;tW.forEach(e=>{let r=e.dimensionHotspot?tY.get(e.dimensionHotspot):void 0;if(r&&!a.includes(r))return;let i=o.queryHotspot(e.hotspot1),n=o.queryHotspot(e.hotspot2),s=e.dimensionHotspot?o.queryHotspot(e.dimensionHotspot):null;if(i&&n){let e=s&&!s.facingCamera;t.push({x1:i.canvasPosition.x,y1:i.canvasPosition.y,x2:n.canvasPosition.x,y2:n.canvasPosition.y,opacity:+!e})}}),tX.forEach(t=>{let a=o.queryHotspot(t);a&&!a.facingCamera&&e.add(t)}),d(t),g(t=>!function(t,e){if(t.size!==e.size)return!1;for(let a of Array.from(t))if(!e.has(a))return!1;return!0}(t,e)?e:t)},[o,a]);return(0,l.useEffect)(()=>{if(!r||!e||!w||!o||v===r)return;let t=ea(o);tF.forEach(e=>{let a=function(t,e){let{center:a,halfSize:r}=t,[i,o,n]=e.position.split(" ").map(Number);return`${a.x+i*r.x} ${a.y+o*r.y} ${a.z+n*r.z}`}(t,e);o.updateHotspot({name:e.slot,position:a})}),u(f()),b(),h(r)},[r,e,w,o,v,f,b]),(0,l.useEffect)(()=>{if(o&&e&&w&&v===r)return o.addEventListener("camera-change",b),()=>{o.removeEventListener("camera-change",b)}},[o,e,w,v,r,b]),{lines:s,labels:c,hiddenHotspots:p}}({isVisible:L,axes:h}),R="forbidden"===d||"not-found"===d||"unauthorized"===d||"payment-required"===d?d:null;return R?(0,s.jsx)("div",{ref:c,className:I("relative size-full overflow-hidden text-foreground","default"===v&&"bg-background-layout"),children:(0,s.jsx)(ee,{variant:R,showDialogCloseButton:a})}):(0,s.jsxs)("div",{ref:c,className:I("@container relative size-full overflow-hidden text-foreground","default"===v&&"bg-background-layout"),children:["ready"===d&&!k&&(0,s.jsx)(tG,{className:"absolute top-0 right-0 left-0 z-2"}),"ready"===d&&(0,s.jsx)("div",{className:"relative size-full",children:(0,s.jsxs)("model-viewer",{ref:u,className:"size-full",src:r??void 0,iosSrc:p??void 0,poster:n??void 0,ar:!0,cameraControls:!0,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,arModes:"webxr scene-viewer quick-look",arScale:"fixed",shadowIntensity:1,interactionPromptThreshold:100,loading:"eager",children:[(0,s.jsx)("div",{slot:"progress-bar"}),(0,s.jsx)("div",{slot:"ar-button"}),(0,s.jsx)(tK,{isVisible:L,labels:S,hiddenHotspots:M})]})}),(0,s.jsx)("div",{"aria-hidden":!z,className:I("absolute inset-0 z-10 flex items-center justify-center bg-radial from-background-containers to-background-base-2 transition-opacity",z?"pointer-events-auto opacity-100 duration-0":"pointer-events-none opacity-0 duration-300 ease-in-out"),children:(0,s.jsx)(D,{variant:"logo"})}),(0,s.jsx)(t$,{isVisible:L,lines:N}),C&&!k&&(0,s.jsxs)("div",{className:I("pointer-events-none absolute inset-x-8 bottom-8 z-2 flex flex-wrap items-end gap-4 @max-xl:inset-x-6 @max-xl:bottom-4 @max-xl:flex-col @max-xl:items-stretch",j?"justify-between":"justify-center"),children:[j&&(0,s.jsx)("div",{className:"pointer-events-auto min-w-0 flex-1 @max-xl:w-full @max-xl:flex-none @max-xl:self-start",children:(0,s.jsx)(t6,{})}),(0,s.jsxs)("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 @max-xl:w-full",children:[(0,s.jsxs)(Z,{className:"@max-xl:h-9 @max-xl:px-3.5 @max-xl:typo-button-normal @max-xl:[&_svg]:size-5",size:"lg",variant:"secondary",disabled:!_,"aria-label":"Toggle dimensions","aria-pressed":x,onClick:()=>{y(t=>!t),m("interacted")},children:[x?(0,s.jsx)(O,{className:"size-6"}):(0,s.jsx)(H,{className:"size-6"}),(0,s.jsx)("span",{children:"Dimensions"})]}),(0,s.jsx)(tO,{className:"@max-xl:h-9 @max-xl:w-full @max-xl:flex-1 @max-xl:px-3.5 @max-xl:typo-button-normal",onBeforeActivateAr:()=>y(!1),size:"lg"})]})]})]})}let ei=["x","y","z"],eo=new p.E({defaultOptions:{queries:{gcTime:1/0,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,retry:(t,e)=>{let a=tf(e);return(void 0===a||!(a>=400)||!(a<500))&&t<2}}}});function en(t){let{tinuuid:e,apiKey:a,appClipBundleId:r="com.us.vizbl.Clip",arExperience:i,hid:o,apiBaseUrl:n="https://api.vizbl.com",legacyApiBaseUrl:l="https://api.vizbl.com/v1",mode:d="embedded-3d-viewer",initialWidgetSessionToken:c,handoffUrl:u="https://integrations.vizbl.com/model-viewer",launchAr:p,sizeType:v="cm",dimensionAxes:h=ei,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,layout:m="default",background:x="default",showDialogCloseButton:y=!1,viewerSurface:k="inline"}=t,z=(null==a?void 0:a.trim())??"";return(0,s.jsx)(g.Ht,{client:eo,children:(0,s.jsx)(tU,{tinuuid:e,apiKey:z,appClipBundleId:r,arExperience:i,apiBaseUrl:n,legacyApiBaseUrl:l,mode:d,initialWidgetSessionToken:c,handoffUrl:u,hid:o,launchAr:p,layout:m,background:x,sizeType:v,dimensionAxes:h,cameraOrbit:w,minCameraOrbit:f,maxCameraOrbit:b,viewerSurface:k,children:(0,s.jsx)(er,{showDialogCloseButton:y})})})}function es(t){let{tinuuid:e,apiKey:a,apiBaseUrl:r,legacyApiBaseUrl:i,initialWidgetSessionToken:o,handoffUrl:n,hid:u,sizeType:p,dimensionAxes:g,...v}=t,[h,w]=(0,l.useState)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,d.createPortal)((0,s.jsx)("style",{children:A.A}),document.head),h&&(0,s.jsx)(U,{root:h,storageKey:"neurodyn-theme",children:(0,s.jsx)(X,{...v,children:(0,s.jsxs)(J,{className:"min-w-full h-dvh p-0 rounded-none sm:p-0",portalContainer:h,showCloseButton:!1,onInteractOutside:t=>{t.preventDefault()},children:[(0,s.jsx)(W,{asChild:!0,children:(0,s.jsxs)(Z,{className:"absolute top-3 right-6 z-20",variant:"secondary",children:["Close",(0,s.jsx)(m.A,{})]})}),(0,s.jsx)(en,{tinuuid:e,apiKey:a,apiBaseUrl:r,legacyApiBaseUrl:i,mode:"ar-viewer",initialWidgetSessionToken:o,handoffUrl:n,hid:u,sizeType:p,dimensionAxes:g,showDialogCloseButton:!0,viewerSurface:"dialog"})]})})}),(0,d.createPortal)((0,s.jsxs)(c.Ay.div,{style:{display:"block",letterSpacing:"normal",zIndex:0x7fffffff},children:[(0,s.jsx)("style",{children:P}),(0,s.jsx)("div",{ref:w})]}),document.body)]})}function el(t){let{tinuuid:e,apiKey:a,appClipBundleId:r,arExperience:i,hid:o,apiBaseUrl:n,legacyApiBaseUrl:u,mode:p,initialWidgetSessionToken:g,handoffUrl:v,launchAr:h,sizeType:w,dimensionAxes:f,cameraOrbit:b,minCameraOrbit:m,maxCameraOrbit:x,layout:y,background:k,viewerSurface:z,className:C,...j}=t,[_,L]=(0,l.useState)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,d.createPortal)((0,s.jsx)("style",{children:A.A}),document.head),(0,s.jsxs)(c.Ay.div,{className:C,style:{height:"100%",letterSpacing:"normal",width:"100%"},...j,children:[(0,s.jsx)("style",{children:P}),(0,s.jsx)("div",{ref:L,style:{height:"100%",width:"100%"},children:_&&(0,s.jsx)(U,{root:_,storageKey:"neurodyn-theme",children:(0,s.jsx)(en,{tinuuid:e,apiKey:a,appClipBundleId:r,arExperience:i,apiBaseUrl:n,legacyApiBaseUrl:u,mode:p,initialWidgetSessionToken:g,handoffUrl:v,hid:o,launchAr:h,sizeType:w,dimensionAxes:f,cameraOrbit:b,minCameraOrbit:m,maxCameraOrbit:x,layout:y,background:k,viewerSurface:z})})})]})]})}}}]);