@neurodyn/ai-try-on 0.0.2 → 0.0.4
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.
|
@@ -5478,7 +5478,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
5478
5478
|
font-style: normal;
|
|
5479
5479
|
font-display: swap;
|
|
5480
5480
|
}
|
|
5481
|
-
`,""]);let s=i.toString()},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/api.js"(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&i[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js"(e){e.exports=function(e){return e[1]}}},oq={};function oK(e){var t=oq[e];if(void 0!==t)return t.exports;var r=oq[e]={id:e,exports:{}};return oW[e](r,r.exports,oK),r.exports}function oG(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function oX(...e){return t=>{let r=!1,n=e.map(e=>{let n=oG(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():oG(e[t],null)}}}}oK.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return oK.d(t,{a:t}),t},oK.d=(e,t)=>{for(var r in t)oK.o(t,r)&&!oK.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},oK.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var oY=Symbol.for("react.lazy"),oQ=L[" use ".trim().toString()];function oZ(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===oY&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var oJ=((g=A.forwardRef((e,t)=>{let{children:r,...n}=e;if(oZ(r)&&"function"==typeof oQ&&(r=oQ(r._payload)),A.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==A.Fragment&&(s.ref=t?oX(t,i):i),A.cloneElement(r,s)}return A.Children.count(r)>1?A.Children.only(null):null})).displayName="Slot.SlotClone",u=g,(c=A.forwardRef((e,t)=>{let{children:r,...n}=e;oZ(r)&&"function"==typeof oQ&&(r=oQ(r._payload));let a=A.Children.toArray(r),o=a.find(o1);if(o){let e=o.props.children,r=a.map(t=>t!==o?t:A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null);return(0,_.jsx)(u,{...n,ref:t,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,_.jsx)(u,{...n,ref:t,children:r})})).displayName="Slot.Slot",c),o0=Symbol("radix.slottable");function o1(e){return A.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o0}function o2(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}let o3=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),o5=[],o9=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],a=r.nextPart.get(n);if(a){let r=o9(e,t+1,a);if(r)return r}let o=r.validators;if(null===o)return;let i=0===t?e.join("-"):e.slice(t).join("-"),s=o.length;for(let e=0;e<s;e++){let t=o[e];if(t.validator(i))return t.classGroupId}},o4=(e,t)=>{let r=o3();for(let n in e)o6(e[n],r,n,t);return r},o6=(e,t,r,n)=>{let a=e.length;for(let o=0;o<a;o++)o8(e[o],t,r,n)},o8=(e,t,r,n)=>{"string"==typeof e?o7(e,t,r):"function"==typeof e?ie(e,t,r,n):it(e,t,r,n)},o7=(e,t,r)=>{(""===e?t:ir(t,e)).classGroupId=r},ie=(e,t,r,n)=>{ia(e)?o6(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},it=(e,t,r,n)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];o6(i,ir(t,o),r,n)}},ir=(e,t)=>{let r=e,n=t.split("-"),a=n.length;for(let e=0;e<a;e++){let t=n[e],a=r.nextPart.get(t);a||(a=o3(),r.nextPart.set(t,a)),r=a}return r},ia=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,io=[],ii=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),is=/\s+/,il=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=il(e[n]))&&(r&&(r+=" "),r+=t);return r},iu=[],ic=e=>{let t=t=>t[e]||iu;return t.isThemeGetter=!0,t},id=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ip=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ih=/^\d+\/\d+$/,ig=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,im=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ib=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,iw=e=>ih.test(e),ik=e=>!!e&&!Number.isNaN(Number(e)),ix=e=>!!e&&Number.isInteger(Number(e)),iS=e=>e.endsWith("%")&&ik(e.slice(0,-1)),iC=e=>ig.test(e),iP=()=>!0,iE=e=>im.test(e)&&!iv.test(e),iT=()=>!1,iR=e=>iy.test(e),iO=e=>ib.test(e),ij=e=>!iN(e)&&!iF(e),iz=e=>iW(e,iX,iT),iN=e=>id.test(e),i_=e=>iW(e,iY,iE),iA=e=>iW(e,iQ,ik),iL=e=>iW(e,iK,iT),iI=e=>iW(e,iG,iO),iM=e=>iW(e,iJ,iR),iF=e=>ip.test(e),iD=e=>iq(e,iY),iB=e=>iq(e,iZ),i$=e=>iq(e,iK),iV=e=>iq(e,iX),iU=e=>iq(e,iG),iH=e=>iq(e,iJ,!0),iW=(e,t,r)=>{let n=id.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},iq=(e,t,r=!1)=>{let n=ip.exec(e);return!!n&&(n[1]?t(n[1]):r)},iK=e=>"position"===e||"percentage"===e,iG=e=>"image"===e||"url"===e,iX=e=>"length"===e||"size"===e||"bg-size"===e,iY=e=>"length"===e,iQ=e=>"number"===e,iZ=e=>"family-name"===e,iJ=e=>"shadow"===e,i0=((e,...t)=>{let r,n,a,o,i=e=>{let t=n(e);if(t)return t;let o=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],s=e.trim().split(is),l="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:u,modifiers:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=r(t);if(u){l=t+(l.length>0?" "+l:l);continue}let f=!!h,g=n(f?p.substring(0,h):p);if(!g){if(!f||!(g=n(p))){l=t+(l.length>0?" "+l:l);continue}f=!1}let m=0===c.length?"":1===c.length?c[0]:o(c).join(":"),v=d?m+"!":m,y=v+g;if(i.indexOf(y)>-1)continue;i.push(y);let b=a(g,f);for(let e=0;e<b.length;++e){let t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,o),o};return o=s=>{var l;let u;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),a=(a,o)=>{r[a]=o,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,a=0,o=0,i=e.length;for(let s=0;s<i;s++){let i=e[s];if(0===n&&0===a){if(":"===i){r.push(e.slice(o,s)),o=s+1;continue}if("/"===i){t=s;continue}}"["===i?n++:"]"===i?n--:"("===i?a++:")"===i&&a--}let s=0===r.length?e:e.slice(o),l=s,u=!1;return s.endsWith("!")?(l=s.slice(0,-1),u=!0):s.startsWith("!")&&(l=s.slice(1),u=!0),ii(r,u,l,t&&t>o?t-o:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):ii(io,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(l),sortModifiers:(u=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{u.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let a=e[n],o="["===a[0],i=u.has(a);o||i?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(a)):r.push(a)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return o4(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,a;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(a=t.slice(0,n))?"arbitrary.."+a:void 0)}let n=e.split("-"),a=+(""===n[0]&&n.length>1);return o9(n,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],a=r[e];if(t){if(a){let e=Array(a.length+t.length);for(let t=0;t<a.length;t++)e[t]=a[t];for(let r=0;r<t.length;r++)e[a.length+r]=t[r];return e}return t}return a||o5}return r[e]||o5}}})(l)}).cache.get,a=r.cache.set,o=i,i(s)},(...e)=>o(((...e)=>{let t,r,n=0,a="";for(;n<e.length;)(t=e[n++])&&(r=il(t))&&(a&&(a+=" "),a+=r);return a})(...e))})(()=>{let e=ic("color"),t=ic("font"),r=ic("text"),n=ic("font-weight"),a=ic("tracking"),o=ic("leading"),i=ic("breakpoint"),s=ic("container"),l=ic("spacing"),u=ic("radius"),c=ic("shadow"),d=ic("inset-shadow"),p=ic("text-shadow"),h=ic("drop-shadow"),f=ic("blur"),g=ic("perspective"),m=ic("aspect"),v=ic("ease"),y=ic("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...w(),iF,iN],x=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[iF,iN,l],P=()=>[iw,"full","auto",...C()],E=()=>[ix,"none","subgrid",iF,iN],T=()=>["auto",{span:["full",ix,iF,iN]},ix,iF,iN],R=()=>[ix,"auto",iF,iN],O=()=>["auto","min","max","fr",iF,iN],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...C()],_=()=>[iw,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],A=()=>[e,iF,iN],L=()=>[...w(),i$,iL,{position:[iF,iN]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",iV,iz,{size:[iF,iN]}],F=()=>[iS,iD,i_],D=()=>["","none","full",u,iF,iN],B=()=>["",ik,iD,i_],$=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[ik,iS,i$,iL],H=()=>["","none",f,iF,iN],W=()=>["none",ik,iF,iN],q=()=>["none",ik,iF,iN],K=()=>[ik,iF,iN],G=()=>[iw,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[iC],breakpoint:[iC],color:[iP],container:[iC],"drop-shadow":[iC],ease:["in","out","in-out"],font:[ij],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[iC],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[iC],shadow:[iC],spacing:["px",ik],text:[iC],"text-shadow":[iC],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",iw,iN,iF,m]}],container:["container"],columns:[{columns:[ik,iN,iF,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ix,"auto",iF,iN]}],basis:[{basis:[iw,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ik,iw,"auto","initial","none",iN]}],grow:[{grow:["",ik,iF,iN]}],shrink:[{shrink:["",ik,iF,iN]}],order:[{order:[ix,"first","last","none",iF,iN]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[s,"screen",..._()]}],"min-w":[{"min-w":[s,"screen","none",..._()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",r,iD,i_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,iF,iA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iS,iN]}],"font-family":[{font:[iB,iN,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,iF,iN]}],"line-clamp":[{"line-clamp":[ik,"none",iF,iA]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",iF,iN]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",iF,iN]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[ik,"from-font","auto",iF,i_]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ik,"auto",iF,iN]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",iF,iN]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",iF,iN]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ix,iF,iN],radial:["",iF,iN],conic:[ix,iF,iN]},iU,iI]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ik,iF,iN]}],"outline-w":[{outline:["",ik,iD,i_]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,iH,iM]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,iH,iM]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ik,i_]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",p,iH,iM]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ik,iF,iN]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ik]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[iF,iN]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[ik]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",iF,iN]}],filter:[{filter:["","none",iF,iN]}],blur:[{blur:H()}],brightness:[{brightness:[ik,iF,iN]}],contrast:[{contrast:[ik,iF,iN]}],"drop-shadow":[{"drop-shadow":["","none",h,iH,iM]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ik,iF,iN]}],"hue-rotate":[{"hue-rotate":[ik,iF,iN]}],invert:[{invert:["",ik,iF,iN]}],saturate:[{saturate:[ik,iF,iN]}],sepia:[{sepia:["",ik,iF,iN]}],"backdrop-filter":[{"backdrop-filter":["","none",iF,iN]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[ik,iF,iN]}],"backdrop-contrast":[{"backdrop-contrast":[ik,iF,iN]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ik,iF,iN]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ik,iF,iN]}],"backdrop-invert":[{"backdrop-invert":["",ik,iF,iN]}],"backdrop-opacity":[{"backdrop-opacity":[ik,iF,iN]}],"backdrop-saturate":[{"backdrop-saturate":[ik,iF,iN]}],"backdrop-sepia":[{"backdrop-sepia":["",ik,iF,iN]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",iF,iN]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ik,"initial",iF,iN]}],ease:[{ease:["linear","initial",v,iF,iN]}],delay:[{delay:[ik,iF,iN]}],animate:[{animate:["none",y,iF,iN]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,iF,iN]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[iF,iN,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",iF,iN]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",iF,iN]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ik,iD,i_,iA]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function i1(...e){return i0(o2(e))}let i2=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i3=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return o2(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let i=i2(t)||i2(n);return a[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return o2(e,i,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...s}[t]):({...o,...s})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},i5=i3("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 i9({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,_.jsx)(n?oJ:"button",{"data-slot":"button",className:i1(i5({variant:t,size:r,className:e})),...a})}let i4=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},i6=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var i8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i7=(0,A.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:i,...s},l)=>(0,A.createElement)("svg",{ref:l,...i8,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:i6("lucide",a),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>(0,A.createElement)(e,t)),...Array.isArray(o)?o:[o]])),se=(T=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(d=(0,A.forwardRef)(({className:e,...t},r)=>(0,A.createElement)(i7,{ref:r,iconNode:T,className:i6(`lucide-${i4("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=i4("x"),d);function st({...e}){return(0,_.jsx)(tn,{"data-slot":"dialog",...e})}function sr({...e}){return(0,_.jsx)(tl,{"data-slot":"dialog-portal",...e})}function sn({className:e,...t}){return(0,_.jsx)(tc,{"data-slot":"dialog-overlay",className:i1("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),...t})}function sa({className:e,children:t,contentInsideOverlay:r=!1,showCloseButton:n=!0,portalContainer:a,...o}){let i=(0,_.jsxs)(tf,{"data-slot":"dialog-content",className:i1("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),...o,children:[t,n&&(0,_.jsxs)(tS,{"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,_.jsx)(se,{className:"size-6"}),(0,_.jsx)("span",{className:"sr-only",children:"Close"})]})]});return(0,_.jsx)(sr,{"data-slot":"dialog-portal",container:a,children:r?(0,_.jsx)(sn,{children:i}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(sn,{}),i]})})}function so({className:e,...t}){return(0,_.jsx)("div",{"data-slot":"dialog-header",className:i1("flex flex-col gap-2 text-left",e),...t})}function si({className:e,...t}){return(0,_.jsx)(tb,{"data-slot":"dialog-title",className:i1("typo-base-18 text-text-dark",e),...t})}function ss({className:e,...t}){return(0,_.jsx)(tk,{"data-slot":"dialog-description",className:i1("typo-base-16 text-text-light",e),...t})}let sl=(0,A.createContext)({theme:"system",setTheme:()=>null});function su({children:e,defaultTheme:t="system",storageKey:r="v-theme",root:n=window.document.documentElement,enableStorage:a=!1,...o}){let[i,s]=(0,A.useState)(()=>a&&localStorage.getItem(r)||t);return(0,A.useEffect)(()=>{if(n.classList.remove("light","dark"),"system"===i){let e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(e);return}n.classList.add(i)},[i,n]),(0,_.jsx)(sl,{...o,value:{theme:i,setTheme:e=>{a&&localStorage.setItem(r,e),s(e)}},children:e})}var sc=oK("../ui/src/styles/fonts.css?inline");function sd(e){return az.create({baseURL:e,timeout:3e4})}let sp=new Set(["common","delete","get","head","post","put","patch","options","purge","link","unlink"]);function sh(){return globalThis.process?.env?.NODE_ENV}function sf(e){if(void 0===e)return[];let t="function"==typeof e.toJSON?e.toJSON():e,r=[];return!function e(t,r){if(null!==t&&"object"==typeof t)for(let[n,a]of Object.entries(t)){if(null==a)continue;let t=n.toLowerCase();if("common"===t){e(a,r);continue}sp.has(t)||r.push([n,String(a)])}}(t,r),r}function sg(e){return!!("u">typeof FormData&&e instanceof FormData)||null!==e&&"object"==typeof e&&(e.constructor?.name==="FormData"||"function"==typeof e.getBoundary)}let sm=new Set(["authorization","cookie","set-cookie","x-xsrf-token"]);function sv(e){if(null==e)return;let t="function"==typeof e.toJSON?e.toJSON():e;if(null===t||"object"!=typeof t)return;let r={};for(let[e,n]of Object.entries(t))null!=n&&(r[e]=sm.has(e.toLowerCase())?"[redacted]":String(n));return r}function sy(e){if(null!=e){if("string"==typeof e)try{return JSON.parse(e)}catch{return e.length>2e3?`${e.slice(0,2e3)}… (${e.length} chars)`:e}return sg(e)?"[FormData]":e}}function sb(e){let t=(e.requestConfig.method??"GET").toUpperCase(),r=e.requestConfig.url??"",n=`[api:server] ${t} ${r} → ${e.status} (${e.durationMs}ms)`,a={requestId:e.requestId,...e.error?{error:e.error}:{},params:e.requestConfig.params,requestBody:sy(e.requestConfig.data),requestHeaders:sv(e.requestConfig.headers),responseHeaders:sv(e.responseHeaders),responseBody:sy(e.responseBody)};(e.status>=500||void 0!==e.error&&0===e.status?console.error:e.status>=400?console.warn:console.log)(n,a)}let sw=function({clientName:e,configureFunctionName:t,defaultBaseURL:r}){let n=sd(r),a=sd(r),o=null,i=null,s=null,l=null,u=null,c=null;async function d(e,t){let r=function(e,t){let r;if(void 0===t.data||sg(t.data))return t;let n=aU.from(t.headers);return n.has("Content-Type")||void 0!==(r=e.defaults.headers.common)&&aU.from(r).has("Content-Type")||n.set("Content-Type","application/json"),t.headers=n,t}(e,function(e){let t=aU.from(e.headers);if(null!==s){let e=s()?.trim();e&&!t.has("Authorization")&&t.set("Authorization",`Bearer ${e}`)}if(null!==c)for(let[r,n]of Object.entries(c({url:e.url,method:e.method})))n&&!t.has(r)&&t.set(r,n);return e.headers=t,e}({...t})),n=function(e){let t,r=aU.from(e.headers),n=r.get("x-request-id");if("string"==typeof n&&n.length>0)return n;let a=(t=globalThis.crypto,"function"==typeof t?.randomUUID?t.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`);return r.set("x-request-id",a),e.headers=r,a}(r),a=function(){if("u">typeof window)return!1;let e=sh(),t=globalThis.process;return t?.env?.DEBUG_API==="true"||"production"!==e&&"test"!==e&&"testing"!==e}(),o=a?Date.now():0;try{let t=await e.request(r);return a&&sb({requestConfig:r,requestId:n,status:t.status,durationMs:Date.now()-o,responseHeaders:t.headers,responseBody:t.data}),t}catch(e){throw a&&sb({requestConfig:r,requestId:n,status:e.response?.status??0,durationMs:Date.now()-o,responseHeaders:e.response?.headers,responseBody:e.response?.data,error:e.message}),e}}async function p(e){return d(e.skipUnauthorizedRecovery?a:n,function(e){let{skipUnauthorizedRecovery:t,...r}=e;return r}(e))}let h=async e=>p({...e,skipUnauthorizedRecovery:!0});function f(){return null!==o}return{configureClientRuntime:function(t){let r,i=(r=function(e){let t=sf(e);if(0===t.length)return;let r=new Map;for(let[e,n]of t)r.set(e.toLowerCase(),n);return Object.fromEntries(Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)))}(t.headers),JSON.stringify({...void 0!==t.baseURL?{baseURL:t.baseURL}:{},...void 0!==t.timeout?{timeout:t.timeout}:{},...void 0!==r?{headers:r}:{}}));if("{}"!==i){if(null!==o){if(o===i)return;let t=`${e} already configured. Existing: ${o}. New: ${i}.`;if("production"===sh())return void console.warn(t);throw Error(t)}for(let e of[n,a])void 0!==t.baseURL&&(e.defaults.baseURL=t.baseURL),void 0!==t.timeout&&(e.defaults.timeout=t.timeout),void 0!==t.headers&&function(e,t){let r=e.defaults.headers,n=r.common,a=aU.from(n);for(let[e,r]of sf(t))a.set(e,r);r.common=a.toJSON(),e.defaults.headers=r}(e,t.headers);o=i}},configureAccessTokenResolverRuntime:function(e){s=e},configureUnauthorizedHandlerRuntime:function(e){if(l=e,null===e){null!==i&&(n.interceptors.response.eject(i),i=null),u=null;return}null===i&&(i=n.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status!==401||null===l||void 0===t||t._apiRetried)return Promise.reject(e);if(null===u){let t=l;if(null===t)return Promise.reject(e);u=Promise.resolve().then(()=>t(e,{requestWithoutUnauthorizedRecovery:h})).finally(()=>{u=null})}try{if(!await u)return Promise.reject(e);t._apiRetried=!0;let r=aU.from(t.headers);return r.delete("Authorization"),t.headers=r,d(n,t)}catch{return Promise.reject(e)}}))},configureHeadersResolverRuntime:function(e){c=e},isClientConfiguredRuntime:f,assertClientConfiguredRuntime:function(){if(!f())throw Error(`${e} is not configured. Call ${t}(...) before making requests.`)},resetClientForTestsRuntime:function(){let e;if("test"!==(e=sh())&&"testing"!==e)throw Error("resetApiClientForTests() can only be called in test environment.");n=sd(r),a=sd(r),o=null,i=null,s=null,l=null,u=null,c=null},requestRuntime:p,requestWithoutUnauthorizedRecovery:h,addResponseInterceptorRuntime:function(e,t){return n.interceptors.response.use(e,t)}}}({clientName:"API node client",configureFunctionName:"configureNodeApiClient",defaultBaseURL:"https://api.vizbl.com"}),sk=sw.configureClientRuntime;sw.configureAccessTokenResolverRuntime,sw.configureHeadersResolverRuntime,sw.configureUnauthorizedHandlerRuntime,sw.isClientConfiguredRuntime,sw.assertClientConfiguredRuntime,sw.resetClientForTestsRuntime;let sx=sw.requestRuntime;async function sS(e){return sx(e)}async function sC(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/try-on/generate/sync",data:e,...n})).data}async function sP(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/upload/request",params:e,...n})).data}async function sE(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/widget/activate-try-on",params:e,...n})).data}async function sT(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/try-on/upload/request",params:e,...n})).data}async function sR(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/try-on/generate",data:e,...n})).data}async function sO(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/widget/token",data:e,...n})).data}async function sj(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/widget/events",data:e,...n})).data}async function sz(e={}){let{client:t=sS,...r}=e;return(await t({method:"POST",url:"/session/guest",...r})).data}function sN(e){return e?.trim()||void 0}sw.requestWithoutUnauthorizedRecovery,sw.addResponseInterceptorRuntime;let s_="x-guest-token";class sA{createGuestSession;guestTokenPromise=null;constructor({createGuestSession:e=sL}={}){this.createGuestSession=e}async requestUploadUrls(e){return this.withGuestAuth(t=>sP({count:e},{headers:t}))}async generateTryOn(e,t={}){return this.withGuestAuth(r=>sC(e,{headers:r,responseType:"blob",timeout:t.timeout??9e4}))}sendWidgetEvent(){}async withGuestAuth(e){let t=this.getGuestToken(),r=await t;try{return await e({[s_]:r})}catch(r){var n;if(n=r,n?.response?.status!==401&&n?.status!==401)throw r;return e({[s_]:await this.replaceGuestToken(t)})}}getGuestToken(){return this.guestTokenPromise||(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}replaceGuestToken(e){return(this.guestTokenPromise===e||null===this.guestTokenPromise)&&(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}async requestGuestToken(){var e,t=await this.createGuestSession();let r="string"==typeof(e=t?.token)?e.trim():"";if(!r)throw Error("AI try-on guest session response is missing a token");return r}forgetTokenOnFailure(e){e.catch(()=>{this.guestTokenPromise===e&&(this.guestTokenPromise=null)})}}function sL(e){return sz(e)}class sI{apiConfig;issueWidgetToken;now;refreshThresholdMs;refreshPromise=null;session;constructor(e,t={}){this.apiConfig=t.apiConfig,this.issueWidgetToken=t.issueWidgetToken??sO,this.now=t.now??Date.now,this.refreshThresholdMs=t.refreshThresholdMs??3e4,this.session=this.toSnapshot(e)}get snapshot(){return{...this.session}}async getTokenForRequest(){return this.isCloseToExpiry()?(await this.refresh()).token:this.session.token}async getApiConfigForRequest(e){let t=await this.getTokenForRequest();return{...this.apiConfig,...e,headers:{...this.apiConfig?.headers,...e?.headers,"x-widget-session-token":t}}}isCloseToExpiry(){return this.session.expiresAt-this.now()<=this.refreshThresholdMs}refresh(){return this.refreshPromise||(this.refreshPromise=this.issueWidgetToken({token:this.session.token},this.apiConfig).then(e=>(this.session=this.toSnapshot(e),this.snapshot)).finally(()=>{this.refreshPromise=null})),this.refreshPromise}toSnapshot(e){return{token:e.token,sid:e.sid,expiresAt:this.now()+1e3*e.expiresIn}}}let sM=(e,t)=>sj(e,t),sF=e=>sE.length>0?sE(void 0,e):sE(e);class sD{activateTryOn;apiConfig;createWidgetEvent;sessionPromise=null;constructor({activateTryOn:e=sF,createWidgetEvent:t=sM,apiKey:r}={}){this.activateTryOn=e,this.createWidgetEvent=t,this.apiConfig={headers:function(e){let t=e?.trim();return t?{"x-api-key":t}:{}}(r)}}async requestUploadUrls(e){return sT({count:e},await this.getApiConfigForRequest())}async generateTryOn(e,t={}){return sR(e,await this.getApiConfigForRequest({responseType:"blob",timeout:t.timeout??9e4}))}async getApiConfigForRequest(e={}){return(await this.getSession()).getApiConfigForRequest({...e,headers:{...this.apiConfig.headers,...e.headers}})}sendWidgetEvent(e){this.getApiConfigForRequest().then(t=>this.createWidgetEvent({event:e,timestamp:new Date().toISOString()},t)).catch(()=>{})}getSession(){if(this.sessionPromise)return this.sessionPromise;let e=this.activateTryOn(this.apiConfig).then(e=>{var t,r;let n=(t=function(e){let t=e?.widgetSession;if(null===t||"object"!=typeof t)throw Error("AI try-on activation response is missing Widget Session");return{expiresIn:Number(t.expiresIn),sid:sB(t.sid),token:sB(t.token)}}(e),r={apiConfig:this.apiConfig},t?.token&&t.sid&&Number.isFinite(t.expiresIn)?new sI(t,r):null);if(!n)throw Error("AI try-on activation response is missing Widget Session");return n});return this.sessionPromise=e,e.catch(()=>{this.sessionPromise===e&&(this.sessionPromise=null)}),e}}function sB(e){return"string"==typeof e?e.trim():""}function s$({apiKey:e}={}){let t=sN(e);return t?new sD({apiKey:t}):new sA(void 0)}let sV={en:{ns1:{back:"Back",badge:"Try it on",confirmBadge:"Almost there",close:"Close",comparisonSlider:"Comparison slider",comparisonTitle:"Compare before and after",confirmChangePhoto:"Change photo",confirmGenerate:"Generate my look",confirmSubtitle:"Hit Generate and see how it looks on you",confirmTitle:"Ready to try it on?",dialogDescription:"AI try-on widget dialog",dialogTitle:"AI Try-On",download:"Download",errorBadge:"Little error",errorDifferentPhoto:"Change photo",errorGuidance:"Try again with a different photo. Make sure it shows your full body.",errorRetry:"Try again",errorSubtitle:"It happens — let's try again",errorTitle:"Something went wrong",historyPhoto:"Previous photo",historySubtitle:"Use a previous photo or upload something new",historyTitle:"Your photos",historyUploadNew:"Upload new",bagIntroBadCropped:"Cropped photo",bagIntroBadHandsFull:"Both hands already full",bagIntroGoodAngle:"Slight angle",bagIntroGoodFullBody:"Full body, one hand free",bagIntroSubtitle:"A full-body shot with one shoulder or hand free",bagIntroTitle:"Strike a carrying pose",eyewearIntroBadFaceTurned:"Face turned away",eyewearIntroBadWearingGlasses:"Already wearing glasses",eyewearIntroGoodFacingCamera:"Facing camera, eyes visible",eyewearIntroGoodHairBack:"Hair back, good light",eyewearIntroSubtitle:"Straight-on photo works best.",eyewearIntroTitle:"Glasses go right on your face",fullBodyIntroBadCropped:"Cropped at the waist",fullBodyIntroBadSitting:"Sitting hides the fit",fullBodyIntroGoodAngle:"Slight angle, body visible",fullBodyIntroGoodHeadToToe:"Head to toe in frame",fullBodyIntroSubtitle:"Full-body photos work best — here's what to look for",fullBodyIntroTitle:"Better photo, better result",footwearIntroBadFeetHidden:"Feet hidden",footwearIntroBadOneFootCropped:"One foot out of frame",footwearIntroGoodKneesDown:"Knees-down on flat ground",footwearIntroGoodStanding:"Standing, both feet visible",footwearIntroSubtitle:"Both feet in the frame, standing on a plain floor.",footwearIntroTitle:"Down to your feet",headwearIntroBadCroppedHead:"Head cropped out",headwearIntroBadWearingHat:"Already wearing a hat",headwearIntroGoodAngle:"Slight angle, head in frame",headwearIntroGoodFront:"Head and shoulders, front on",headwearIntroSubtitle:"A head-and-shoulders shot with your whole head in view",headwearIntroTitle:"Heads up",introCta:"Got it, continue",introBadge:"Quick tip",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Top covers the waistline",lowerBodyIntroBadSitting:"Sitting bends the legs",lowerBodyIntroGoodFullBody:"Full body works too",lowerBodyIntroGoodWaistToFeet:"Waist to feet, standing",lowerBodyIntroSubtitle:"Stand up and show us everything from waist to feet.",lowerBodyIntroTitle:"It’s all about the legs",neckIntroBadHairCovering:"Hair covers neck and ears",neckIntroBadHighCollar:"High collar hides the neck",neckIntroGoodHairUp:"Hair up, neck visible",neckIntroGoodOpenNeckline:"Open neckline, chest up",neckIntroSubtitle:"Jewelry needs open skin — hair back, neckline clear.",neckIntroTitle:"Neck and ears, front and center",processingBadge:"Wait a second",processingProgress:"Reading your photo…",processingSubtitle:"Hang tight while we dress you up",processingTitle:"Working our magic…",reset:"Reset",resultBadge:"That’s the one",resultCompare:"Change photo",resultOpenComparison:"View before / after",resultProductLink:"View product",resultReset:"Save",resultShare:"Share",resultTitle:"Here's how it looks on you",resultTryAnother:"Add To Cart – $430",share:"Share",startHistory:"View previous results",startTitle:"Want to see it on you?",startUpload:"Choose your photo",termsJoiner:"&",termsLink:"Terms",termsPrefix:"By using this service, your agree to",privacyLink:"privacy Policy",upperBodyIntroBadArmsCrossed:"Arms crossed hide the fit",upperBodyIntroBadObjectBlockingTorso:"Object blocks the torso",upperBodyIntroGoodAngle:"Slight angle",upperBodyIntroGoodFacingCamera:"Hips up, facing camera",upperBodyIntroSubtitle:"From the hips up, arms relaxed — that’s all this one needs.",upperBodyIntroTitle:"Let’s see your top half",waistIntroBadOversizedTop:"Oversized top hides the waist",waistIntroBadSitting:"Sitting folds the waistline",waistIntroGoodFullBody:"Full body, waistline visible",waistIntroGoodTopTucked:"Top tucked in, waist visible",waistIntroSubtitle:"Tuck in your top so we can see exactly where the belt sits.",waistIntroTitle:"Show your waistline",wristIntroBadClenchedFist:"Clenched fist",wristIntroBadCovered:"Sleeve covers the wrist",wristIntroGoodCloseUp:"Wrist close-up, hand relaxed",wristIntroGoodSleeveBack:"Sleeve pulled back",wristIntroSubtitle:"A close-up of your wrist does the trick.",wristIntroTitle:"Give us a hand"}},ru:{ns1:{back:"Назад",badge:"Примерить",confirmBadge:"Почти готово",close:"Закрыть",comparisonSlider:"Слайдер сравнения",comparisonTitle:"Сравнение до и после",confirmChangePhoto:"Изменить фото",confirmGenerate:"Сгенерировать образ",confirmSubtitle:"Нажмите \xabСгенерировать\xbb, чтобы увидеть, как это выглядит на вас",confirmTitle:"Готовы примерить?",dialogDescription:"Диалог виджета AI-примерки",dialogTitle:"AI-примерка",download:"Скачать",errorBadge:"Небольшая ошибка",errorDifferentPhoto:"Изменить фото",errorGuidance:"Попробуйте другое фото. Убедитесь, что вы видны в полный рост.",errorRetry:"Попробовать снова",errorSubtitle:"Так бывает — попробуем еще раз",errorTitle:"Что-то пошло не так",historyPhoto:"Предыдущее фото",historySubtitle:"Используйте предыдущее фото или загрузите новое",historyTitle:"Ваши фото",historyUploadNew:"Загрузить новое",bagIntroBadCropped:"Слишком крупный план",bagIntroBadHandsFull:"Обе руки заняты",bagIntroGoodAngle:"По пояс, под небольшим углом",bagIntroGoodFullBody:"В полный рост, одна рука свободна",bagIntroSubtitle:"В кадре должен быть виден торс. Оставьте свободной одну руку или плечо.",bagIntroTitle:"Загрузите фото по пояс или в полный рост",eyewearIntroBadFaceTurned:"Лицо отвернуто от камеры",eyewearIntroBadWearingGlasses:"Очки уже надеты",eyewearIntroGoodFacingCamera:"Лицом к камере, глаза видны",eyewearIntroGoodHairBack:"Селфи под небольшим углом",eyewearIntroSubtitle:"В кадре должны быть хорошо видны лицо и глаза.",eyewearIntroTitle:"Загрузите фото лица",fullBodyIntroBadCropped:"Фото по пояс",fullBodyIntroBadSitting:"Сидячая поза",fullBodyIntroGoodAngle:"Селфи под небольшим углом",fullBodyIntroGoodHeadToToe:"Всё тело в кадре",fullBodyIntroSubtitle:"В кадре должно быть видно вас целиком.",fullBodyIntroTitle:"Загрузите фото в полный рост",footwearIntroBadFeetHidden:"Стопы не видны",footwearIntroBadOneFootCropped:"Одна стопа не попала в кадр",footwearIntroGoodKneesDown:"От колен до стоп, на ровном полу",footwearIntroGoodStanding:"В полный рост, обе стопы в кадре",footwearIntroSubtitle:"Встаньте на ровный пол. Обе стопы должны быть в кадре.",footwearIntroTitle:"Загрузите фото, где видны обе стопы",headwearIntroBadCroppedHead:"Часть головы не попала в кадр",headwearIntroBadWearingHat:"На фото уже есть головной убор",headwearIntroGoodAngle:"Селфи под небольшим углом",headwearIntroGoodFront:"Анфас, голова и плечи в кадре",headwearIntroSubtitle:"В кадре должны быть видны голова и плечи целиком.",headwearIntroTitle:"Загрузите фото головы и плеч",introCta:"Продолжить",introBadge:"Совет",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Свободная одежда скрывает линию талии",lowerBodyIntroBadSitting:"В сидячей позе ноги согнуты",lowerBodyIntroGoodFullBody:"Фото в полный рост",lowerBodyIntroGoodWaistToFeet:"От пояса до стоп, стоя",lowerBodyIntroSubtitle:"В кадре должны быть видны ноги целиком.",lowerBodyIntroTitle:"Загрузите фото от пояса до стоп",neckIntroBadHairCovering:"Волосы закрывают шею и уши",neckIntroBadHighCollar:"Одежда закрывает шею",neckIntroGoodHairUp:"Лицом к камере, волосы убраны",neckIntroGoodOpenNeckline:"Селфи под небольшим углом",neckIntroSubtitle:"В кадре должны быть видны шея и уши.",neckIntroTitle:"Загрузите фото головы и плеч",processingBadge:"Секунду",processingProgress:"Считываем ваше фото…",processingSubtitle:"Подождите, пока мы примеряем образ",processingTitle:"Творим магию…",reset:"Сбросить",resultBadge:"То, что нужно",resultCompare:"Изменить фото",resultOpenComparison:"До / после",resultProductLink:"Открыть товар",resultReset:"Сохранить",resultShare:"Поделиться",resultTitle:"Вот как это выглядит на вас",resultTryAnother:"Add To Cart – $430",share:"Поделиться",startHistory:"Смотреть прошлые результаты",startTitle:"Хотите увидеть это на себе?",startUpload:"Выбрать фото",termsJoiner:"и",termsLink:"Условиями",termsPrefix:"Используя сервис, вы соглашаетесь с",privacyLink:"Политикой конфиденциальности",upperBodyIntroBadArmsCrossed:"Скрещённые руки закрывают торс",upperBodyIntroBadObjectBlockingTorso:"Предмет в руках закрывает торс",upperBodyIntroGoodAngle:"Селфи под небольшим углом",upperBodyIntroGoodFacingCamera:"По пояс, лицом к камере",upperBodyIntroSubtitle:"В кадре должны быть видны торс и расслабленные руки.",upperBodyIntroTitle:"Загрузите фото по пояс",waistIntroBadOversizedTop:"Одежда закрывает линию талии",waistIntroBadSitting:"В сидячей позе линия талии искажается",waistIntroGoodFullBody:"В полный рост, талия видна",waistIntroGoodTopTucked:"По пояс, талия видна",waistIntroSubtitle:"Линия талии должна быть открыта и хорошо видна.",waistIntroTitle:"Загрузите фото, где видна талия",wristIntroBadClenchedFist:"Сжатый кулак исказит результат",wristIntroBadCovered:"Одежда закрывает запястье",wristIntroGoodCloseUp:"Расслабленная кисть",wristIntroGoodSleeveBack:"Запястье открыто",wristIntroSubtitle:"В кадре должны быть видны кисть и запястье.",wristIntroTitle:"Загрузите фото руки"}}},sU=/initial-value:([^;\n]+);/i,sH=(p=(R=oK("./src/style.css?inline").A).replace(/:root\s*,\s*:host|:root/g,":host"),(h=Array.from(R.matchAll(/@property\s+(--[^{\s]+)\s*\{([^}]*)\}/g)).map(([,e,t])=>{let r=t.match(sU);if(!r)return null;let n=r[1].trim();return` ${e}: ${n};`}).filter(e=>null!==e).join("\n"))?`:host {
|
|
5481
|
+
`,""]);let s=i.toString()},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/api.js"(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&i[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js"(e){e.exports=function(e){return e[1]}}},oq={};function oK(e){var t=oq[e];if(void 0!==t)return t.exports;var r=oq[e]={id:e,exports:{}};return oW[e](r,r.exports,oK),r.exports}function oG(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function oX(...e){return t=>{let r=!1,n=e.map(e=>{let n=oG(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():oG(e[t],null)}}}}oK.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return oK.d(t,{a:t}),t},oK.d=(e,t)=>{for(var r in t)oK.o(t,r)&&!oK.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},oK.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var oY=Symbol.for("react.lazy"),oQ=L[" use ".trim().toString()];function oZ(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===oY&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var oJ=((g=A.forwardRef((e,t)=>{let{children:r,...n}=e;if(oZ(r)&&"function"==typeof oQ&&(r=oQ(r._payload)),A.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==A.Fragment&&(s.ref=t?oX(t,i):i),A.cloneElement(r,s)}return A.Children.count(r)>1?A.Children.only(null):null})).displayName="Slot.SlotClone",u=g,(c=A.forwardRef((e,t)=>{let{children:r,...n}=e;oZ(r)&&"function"==typeof oQ&&(r=oQ(r._payload));let a=A.Children.toArray(r),o=a.find(o1);if(o){let e=o.props.children,r=a.map(t=>t!==o?t:A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null);return(0,_.jsx)(u,{...n,ref:t,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,_.jsx)(u,{...n,ref:t,children:r})})).displayName="Slot.Slot",c),o0=Symbol("radix.slottable");function o1(e){return A.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o0}function o2(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}let o3=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),o5=[],o9=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],a=r.nextPart.get(n);if(a){let r=o9(e,t+1,a);if(r)return r}let o=r.validators;if(null===o)return;let i=0===t?e.join("-"):e.slice(t).join("-"),s=o.length;for(let e=0;e<s;e++){let t=o[e];if(t.validator(i))return t.classGroupId}},o4=(e,t)=>{let r=o3();for(let n in e)o6(e[n],r,n,t);return r},o6=(e,t,r,n)=>{let a=e.length;for(let o=0;o<a;o++)o8(e[o],t,r,n)},o8=(e,t,r,n)=>{"string"==typeof e?o7(e,t,r):"function"==typeof e?ie(e,t,r,n):it(e,t,r,n)},o7=(e,t,r)=>{(""===e?t:ir(t,e)).classGroupId=r},ie=(e,t,r,n)=>{ia(e)?o6(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},it=(e,t,r,n)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];o6(i,ir(t,o),r,n)}},ir=(e,t)=>{let r=e,n=t.split("-"),a=n.length;for(let e=0;e<a;e++){let t=n[e],a=r.nextPart.get(t);a||(a=o3(),r.nextPart.set(t,a)),r=a}return r},ia=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,io=[],ii=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),is=/\s+/,il=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=il(e[n]))&&(r&&(r+=" "),r+=t);return r},iu=[],ic=e=>{let t=t=>t[e]||iu;return t.isThemeGetter=!0,t},id=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ip=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ih=/^\d+\/\d+$/,ig=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,im=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ib=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,iw=e=>ih.test(e),ik=e=>!!e&&!Number.isNaN(Number(e)),ix=e=>!!e&&Number.isInteger(Number(e)),iS=e=>e.endsWith("%")&&ik(e.slice(0,-1)),iC=e=>ig.test(e),iP=()=>!0,iE=e=>im.test(e)&&!iv.test(e),iT=()=>!1,iR=e=>iy.test(e),iO=e=>ib.test(e),ij=e=>!iN(e)&&!iF(e),iz=e=>iW(e,iX,iT),iN=e=>id.test(e),i_=e=>iW(e,iY,iE),iA=e=>iW(e,iQ,ik),iL=e=>iW(e,iK,iT),iI=e=>iW(e,iG,iO),iM=e=>iW(e,iJ,iR),iF=e=>ip.test(e),iD=e=>iq(e,iY),iB=e=>iq(e,iZ),i$=e=>iq(e,iK),iV=e=>iq(e,iX),iU=e=>iq(e,iG),iH=e=>iq(e,iJ,!0),iW=(e,t,r)=>{let n=id.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},iq=(e,t,r=!1)=>{let n=ip.exec(e);return!!n&&(n[1]?t(n[1]):r)},iK=e=>"position"===e||"percentage"===e,iG=e=>"image"===e||"url"===e,iX=e=>"length"===e||"size"===e||"bg-size"===e,iY=e=>"length"===e,iQ=e=>"number"===e,iZ=e=>"family-name"===e,iJ=e=>"shadow"===e,i0=((e,...t)=>{let r,n,a,o,i=e=>{let t=n(e);if(t)return t;let o=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],s=e.trim().split(is),l="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:u,modifiers:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=r(t);if(u){l=t+(l.length>0?" "+l:l);continue}let f=!!h,g=n(f?p.substring(0,h):p);if(!g){if(!f||!(g=n(p))){l=t+(l.length>0?" "+l:l);continue}f=!1}let m=0===c.length?"":1===c.length?c[0]:o(c).join(":"),v=d?m+"!":m,y=v+g;if(i.indexOf(y)>-1)continue;i.push(y);let b=a(g,f);for(let e=0;e<b.length;++e){let t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,o),o};return o=s=>{var l;let u;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),a=(a,o)=>{r[a]=o,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,a=0,o=0,i=e.length;for(let s=0;s<i;s++){let i=e[s];if(0===n&&0===a){if(":"===i){r.push(e.slice(o,s)),o=s+1;continue}if("/"===i){t=s;continue}}"["===i?n++:"]"===i?n--:"("===i?a++:")"===i&&a--}let s=0===r.length?e:e.slice(o),l=s,u=!1;return s.endsWith("!")?(l=s.slice(0,-1),u=!0):s.startsWith("!")&&(l=s.slice(1),u=!0),ii(r,u,l,t&&t>o?t-o:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):ii(io,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(l),sortModifiers:(u=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{u.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let a=e[n],o="["===a[0],i=u.has(a);o||i?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(a)):r.push(a)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return o4(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,a;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(a=t.slice(0,n))?"arbitrary.."+a:void 0)}let n=e.split("-"),a=+(""===n[0]&&n.length>1);return o9(n,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],a=r[e];if(t){if(a){let e=Array(a.length+t.length);for(let t=0;t<a.length;t++)e[t]=a[t];for(let r=0;r<t.length;r++)e[a.length+r]=t[r];return e}return t}return a||o5}return r[e]||o5}}})(l)}).cache.get,a=r.cache.set,o=i,i(s)},(...e)=>o(((...e)=>{let t,r,n=0,a="";for(;n<e.length;)(t=e[n++])&&(r=il(t))&&(a&&(a+=" "),a+=r);return a})(...e))})(()=>{let e=ic("color"),t=ic("font"),r=ic("text"),n=ic("font-weight"),a=ic("tracking"),o=ic("leading"),i=ic("breakpoint"),s=ic("container"),l=ic("spacing"),u=ic("radius"),c=ic("shadow"),d=ic("inset-shadow"),p=ic("text-shadow"),h=ic("drop-shadow"),f=ic("blur"),g=ic("perspective"),m=ic("aspect"),v=ic("ease"),y=ic("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...w(),iF,iN],x=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[iF,iN,l],P=()=>[iw,"full","auto",...C()],E=()=>[ix,"none","subgrid",iF,iN],T=()=>["auto",{span:["full",ix,iF,iN]},ix,iF,iN],R=()=>[ix,"auto",iF,iN],O=()=>["auto","min","max","fr",iF,iN],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...C()],_=()=>[iw,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],A=()=>[e,iF,iN],L=()=>[...w(),i$,iL,{position:[iF,iN]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",iV,iz,{size:[iF,iN]}],F=()=>[iS,iD,i_],D=()=>["","none","full",u,iF,iN],B=()=>["",ik,iD,i_],$=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[ik,iS,i$,iL],H=()=>["","none",f,iF,iN],W=()=>["none",ik,iF,iN],q=()=>["none",ik,iF,iN],K=()=>[ik,iF,iN],G=()=>[iw,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[iC],breakpoint:[iC],color:[iP],container:[iC],"drop-shadow":[iC],ease:["in","out","in-out"],font:[ij],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[iC],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[iC],shadow:[iC],spacing:["px",ik],text:[iC],"text-shadow":[iC],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",iw,iN,iF,m]}],container:["container"],columns:[{columns:[ik,iN,iF,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ix,"auto",iF,iN]}],basis:[{basis:[iw,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ik,iw,"auto","initial","none",iN]}],grow:[{grow:["",ik,iF,iN]}],shrink:[{shrink:["",ik,iF,iN]}],order:[{order:[ix,"first","last","none",iF,iN]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[s,"screen",..._()]}],"min-w":[{"min-w":[s,"screen","none",..._()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",r,iD,i_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,iF,iA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iS,iN]}],"font-family":[{font:[iB,iN,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,iF,iN]}],"line-clamp":[{"line-clamp":[ik,"none",iF,iA]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",iF,iN]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",iF,iN]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[ik,"from-font","auto",iF,i_]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ik,"auto",iF,iN]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",iF,iN]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",iF,iN]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ix,iF,iN],radial:["",iF,iN],conic:[ix,iF,iN]},iU,iI]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ik,iF,iN]}],"outline-w":[{outline:["",ik,iD,i_]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,iH,iM]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,iH,iM]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ik,i_]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",p,iH,iM]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ik,iF,iN]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ik]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[iF,iN]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[ik]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",iF,iN]}],filter:[{filter:["","none",iF,iN]}],blur:[{blur:H()}],brightness:[{brightness:[ik,iF,iN]}],contrast:[{contrast:[ik,iF,iN]}],"drop-shadow":[{"drop-shadow":["","none",h,iH,iM]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ik,iF,iN]}],"hue-rotate":[{"hue-rotate":[ik,iF,iN]}],invert:[{invert:["",ik,iF,iN]}],saturate:[{saturate:[ik,iF,iN]}],sepia:[{sepia:["",ik,iF,iN]}],"backdrop-filter":[{"backdrop-filter":["","none",iF,iN]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[ik,iF,iN]}],"backdrop-contrast":[{"backdrop-contrast":[ik,iF,iN]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ik,iF,iN]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ik,iF,iN]}],"backdrop-invert":[{"backdrop-invert":["",ik,iF,iN]}],"backdrop-opacity":[{"backdrop-opacity":[ik,iF,iN]}],"backdrop-saturate":[{"backdrop-saturate":[ik,iF,iN]}],"backdrop-sepia":[{"backdrop-sepia":["",ik,iF,iN]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",iF,iN]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ik,"initial",iF,iN]}],ease:[{ease:["linear","initial",v,iF,iN]}],delay:[{delay:[ik,iF,iN]}],animate:[{animate:["none",y,iF,iN]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,iF,iN]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[iF,iN,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",iF,iN]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",iF,iN]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ik,iD,i_,iA]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function i1(...e){return i0(o2(e))}let i2=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i3=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return o2(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let i=i2(t)||i2(n);return a[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return o2(e,i,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...s}[t]):({...o,...s})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},i5=i3("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 i9({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,_.jsx)(n?oJ:"button",{"data-slot":"button",className:i1(i5({variant:t,size:r,className:e})),...a})}let i4=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},i6=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var i8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i7=(0,A.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:i,...s},l)=>(0,A.createElement)("svg",{ref:l,...i8,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:i6("lucide",a),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>(0,A.createElement)(e,t)),...Array.isArray(o)?o:[o]])),se=(T=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(d=(0,A.forwardRef)(({className:e,...t},r)=>(0,A.createElement)(i7,{ref:r,iconNode:T,className:i6(`lucide-${i4("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=i4("x"),d);function st({...e}){return(0,_.jsx)(tn,{"data-slot":"dialog",...e})}function sr({...e}){return(0,_.jsx)(tl,{"data-slot":"dialog-portal",...e})}function sn({className:e,...t}){return(0,_.jsx)(tc,{"data-slot":"dialog-overlay",className:i1("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),...t})}function sa({className:e,children:t,contentInsideOverlay:r=!1,showCloseButton:n=!0,portalContainer:a,...o}){let i=(0,_.jsxs)(tf,{"data-slot":"dialog-content",className:i1("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),...o,children:[t,n&&(0,_.jsxs)(tS,{"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,_.jsx)(se,{className:"size-6"}),(0,_.jsx)("span",{className:"sr-only",children:"Close"})]})]});return(0,_.jsx)(sr,{"data-slot":"dialog-portal",container:a,children:r?(0,_.jsx)(sn,{children:i}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(sn,{}),i]})})}function so({className:e,...t}){return(0,_.jsx)("div",{"data-slot":"dialog-header",className:i1("flex flex-col gap-2 text-left",e),...t})}function si({className:e,...t}){return(0,_.jsx)(tb,{"data-slot":"dialog-title",className:i1("typo-base-18 text-text-dark",e),...t})}function ss({className:e,...t}){return(0,_.jsx)(tk,{"data-slot":"dialog-description",className:i1("typo-base-16 text-text-light",e),...t})}let sl=(0,A.createContext)({theme:"system",setTheme:()=>null});function su({children:e,defaultTheme:t="system",storageKey:r="v-theme",root:n=window.document.documentElement,enableStorage:a=!1,...o}){let[i,s]=(0,A.useState)(()=>a&&localStorage.getItem(r)||t);return(0,A.useEffect)(()=>{if(n.classList.remove("light","dark"),"system"===i){let e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(e);return}n.classList.add(i)},[i,n]),(0,_.jsx)(sl,{...o,value:{theme:i,setTheme:e=>{a&&localStorage.setItem(r,e),s(e)}},children:e})}var sc=oK("../ui/src/styles/fonts.css?inline");function sd(e){return az.create({baseURL:e,timeout:3e4})}let sp=new Set(["common","delete","get","head","post","put","patch","options","purge","link","unlink"]);function sh(){return globalThis.process?.env?.NODE_ENV}function sf(e){if(void 0===e)return[];let t="function"==typeof e.toJSON?e.toJSON():e,r=[];return!function e(t,r){if(null!==t&&"object"==typeof t)for(let[n,a]of Object.entries(t)){if(null==a)continue;let t=n.toLowerCase();if("common"===t){e(a,r);continue}sp.has(t)||r.push([n,String(a)])}}(t,r),r}function sg(e){return!!("u">typeof FormData&&e instanceof FormData)||null!==e&&"object"==typeof e&&(e.constructor?.name==="FormData"||"function"==typeof e.getBoundary)}let sm=new Set(["authorization","cookie","set-cookie","x-xsrf-token"]);function sv(e){if(null==e)return;let t="function"==typeof e.toJSON?e.toJSON():e;if(null===t||"object"!=typeof t)return;let r={};for(let[e,n]of Object.entries(t))null!=n&&(r[e]=sm.has(e.toLowerCase())?"[redacted]":String(n));return r}function sy(e){if(null!=e){if("string"==typeof e)try{return JSON.parse(e)}catch{return e.length>2e3?`${e.slice(0,2e3)}… (${e.length} chars)`:e}return sg(e)?"[FormData]":e}}function sb(e){let t=(e.requestConfig.method??"GET").toUpperCase(),r=e.requestConfig.url??"",n=`[api:server] ${t} ${r} → ${e.status} (${e.durationMs}ms)`,a={requestId:e.requestId,...e.error?{error:e.error}:{},params:e.requestConfig.params,requestBody:sy(e.requestConfig.data),requestHeaders:sv(e.requestConfig.headers),responseHeaders:sv(e.responseHeaders),responseBody:sy(e.responseBody)};(e.status>=500||void 0!==e.error&&0===e.status?console.error:e.status>=400?console.warn:console.log)(n,a)}let sw=function({clientName:e,configureFunctionName:t,defaultBaseURL:r}){let n=sd(r),a=sd(r),o=null,i=null,s=null,l=null,u=null,c=null;async function d(e,t){let r=function(e,t){let r;if(void 0===t.data||sg(t.data))return t;let n=aU.from(t.headers);return n.has("Content-Type")||void 0!==(r=e.defaults.headers.common)&&aU.from(r).has("Content-Type")||n.set("Content-Type","application/json"),t.headers=n,t}(e,function(e){let t=aU.from(e.headers);if(null!==s){let e=s()?.trim();e&&!t.has("Authorization")&&t.set("Authorization",`Bearer ${e}`)}if(null!==c)for(let[r,n]of Object.entries(c({url:e.url,method:e.method})))n&&!t.has(r)&&t.set(r,n);return e.headers=t,e}({...t})),n=function(e){let t,r=aU.from(e.headers),n=r.get("x-request-id");if("string"==typeof n&&n.length>0)return n;let a=(t=globalThis.crypto,"function"==typeof t?.randomUUID?t.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`);return r.set("x-request-id",a),e.headers=r,a}(r),a=function(){if("u">typeof window)return!1;let e=sh(),t=globalThis.process;return t?.env?.DEBUG_API==="true"||"production"!==e&&"test"!==e&&"testing"!==e}(),o=a?Date.now():0;try{let t=await e.request(r);return a&&sb({requestConfig:r,requestId:n,status:t.status,durationMs:Date.now()-o,responseHeaders:t.headers,responseBody:t.data}),t}catch(e){throw a&&sb({requestConfig:r,requestId:n,status:e.response?.status??0,durationMs:Date.now()-o,responseHeaders:e.response?.headers,responseBody:e.response?.data,error:e.message}),e}}async function p(e){return d(e.skipUnauthorizedRecovery?a:n,function(e){let{skipUnauthorizedRecovery:t,...r}=e;return r}(e))}let h=async e=>p({...e,skipUnauthorizedRecovery:!0});function f(){return null!==o}return{configureClientRuntime:function(t){let r,i=(r=function(e){let t=sf(e);if(0===t.length)return;let r=new Map;for(let[e,n]of t)r.set(e.toLowerCase(),n);return Object.fromEntries(Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)))}(t.headers),JSON.stringify({...void 0!==t.baseURL?{baseURL:t.baseURL}:{},...void 0!==t.timeout?{timeout:t.timeout}:{},...void 0!==r?{headers:r}:{}}));if("{}"!==i){if(null!==o){if(o===i)return;let t=`${e} already configured. Existing: ${o}. New: ${i}.`;if("production"===sh())return void console.warn(t);throw Error(t)}for(let e of[n,a])void 0!==t.baseURL&&(e.defaults.baseURL=t.baseURL),void 0!==t.timeout&&(e.defaults.timeout=t.timeout),void 0!==t.headers&&function(e,t){let r=e.defaults.headers,n=r.common,a=aU.from(n);for(let[e,r]of sf(t))a.set(e,r);r.common=a.toJSON(),e.defaults.headers=r}(e,t.headers);o=i}},configureAccessTokenResolverRuntime:function(e){s=e},configureUnauthorizedHandlerRuntime:function(e){if(l=e,null===e){null!==i&&(n.interceptors.response.eject(i),i=null),u=null;return}null===i&&(i=n.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status!==401||null===l||void 0===t||t._apiRetried)return Promise.reject(e);if(null===u){let t=l;if(null===t)return Promise.reject(e);u=Promise.resolve().then(()=>t(e,{requestWithoutUnauthorizedRecovery:h})).finally(()=>{u=null})}try{if(!await u)return Promise.reject(e);t._apiRetried=!0;let r=aU.from(t.headers);return r.delete("Authorization"),t.headers=r,d(n,t)}catch{return Promise.reject(e)}}))},configureHeadersResolverRuntime:function(e){c=e},isClientConfiguredRuntime:f,assertClientConfiguredRuntime:function(){if(!f())throw Error(`${e} is not configured. Call ${t}(...) before making requests.`)},resetClientForTestsRuntime:function(){let e;if("test"!==(e=sh())&&"testing"!==e)throw Error("resetApiClientForTests() can only be called in test environment.");n=sd(r),a=sd(r),o=null,i=null,s=null,l=null,u=null,c=null},requestRuntime:p,requestWithoutUnauthorizedRecovery:h,addResponseInterceptorRuntime:function(e,t){return n.interceptors.response.use(e,t)}}}({clientName:"API node client",configureFunctionName:"configureNodeApiClient",defaultBaseURL:"https://api.vizbl.com"}),sk=sw.configureClientRuntime;sw.configureAccessTokenResolverRuntime,sw.configureHeadersResolverRuntime,sw.configureUnauthorizedHandlerRuntime,sw.isClientConfiguredRuntime,sw.assertClientConfiguredRuntime,sw.resetClientForTestsRuntime;let sx=sw.requestRuntime;async function sS(e){return sx(e)}async function sC(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/try-on/generate/sync",data:e,...n})).data}async function sP(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/upload/request",params:e,...n})).data}async function sE(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/widget/activate-try-on",params:e,...n})).data}async function sT(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/try-on/upload/request",params:e,...n})).data}async function sR(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/try-on/generate",data:e,...n})).data}async function sO(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/widget/token",data:e,...n})).data}async function sj(e,t={}){let{client:r=sS,...n}=t;return(await r({method:"POST",url:"/public/widget/events",data:e,...n})).data}async function sz(e={}){let{client:t=sS,...r}=e;return(await t({method:"POST",url:"/session/guest",...r})).data}function sN(e){return e?.trim()||void 0}sw.requestWithoutUnauthorizedRecovery,sw.addResponseInterceptorRuntime;let s_="x-guest-token";class sA{createGuestSession;guestTokenPromise=null;constructor({createGuestSession:e=sL}={}){this.createGuestSession=e}async requestUploadUrls(e){return this.withGuestAuth(t=>sP({count:e},{headers:t}))}async generateTryOn(e,t={}){return this.withGuestAuth(r=>sC(e,{headers:r,responseType:"blob",timeout:t.timeout??9e4}))}sendWidgetEvent(){}async withGuestAuth(e){let t=this.getGuestToken(),r=await t;try{return await e({[s_]:r})}catch(r){var n;if(n=r,n?.response?.status!==401&&n?.status!==401)throw r;return e({[s_]:await this.replaceGuestToken(t)})}}getGuestToken(){return this.guestTokenPromise||(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}replaceGuestToken(e){return(this.guestTokenPromise===e||null===this.guestTokenPromise)&&(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}async requestGuestToken(){var e,t=await this.createGuestSession();let r="string"==typeof(e=t?.token)?e.trim():"";if(!r)throw Error("AI try-on guest session response is missing a token");return r}forgetTokenOnFailure(e){e.catch(()=>{this.guestTokenPromise===e&&(this.guestTokenPromise=null)})}}function sL(e){return sz(e)}class sI{apiConfig;issueWidgetToken;now;refreshThresholdMs;refreshPromise=null;session;constructor(e,t={}){this.apiConfig=t.apiConfig,this.issueWidgetToken=t.issueWidgetToken??sO,this.now=t.now??Date.now,this.refreshThresholdMs=t.refreshThresholdMs??3e4,this.session=this.toSnapshot(e)}get snapshot(){return{...this.session}}async getTokenForRequest(){return this.isCloseToExpiry()?(await this.refresh()).token:this.session.token}async getApiConfigForRequest(e){let t=await this.getTokenForRequest();return{...this.apiConfig,...e,headers:{...this.apiConfig?.headers,...e?.headers,"x-widget-session-token":t}}}isCloseToExpiry(){return this.session.expiresAt-this.now()<=this.refreshThresholdMs}refresh(){return this.refreshPromise||(this.refreshPromise=this.issueWidgetToken({token:this.session.token},this.apiConfig).then(e=>(this.session=this.toSnapshot(e),this.snapshot)).finally(()=>{this.refreshPromise=null})),this.refreshPromise}toSnapshot(e){return{token:e.token,sid:e.sid,expiresAt:this.now()+1e3*e.expiresIn}}}let sM=(e,t)=>sj(e,t),sF=e=>sE.length>0?sE(void 0,e):sE(e);class sD{activateTryOn;apiConfig;createWidgetEvent;sessionPromise=null;constructor({activateTryOn:e=sF,createWidgetEvent:t=sM,apiKey:r}={}){this.activateTryOn=e,this.createWidgetEvent=t,this.apiConfig={headers:function(e){let t=e?.trim();return t?{"x-api-key":t}:{}}(r)}}async requestUploadUrls(e){return sT({count:e},await this.getApiConfigForRequest())}async generateTryOn(e,t={}){return sR(e,await this.getApiConfigForRequest({responseType:"blob",timeout:t.timeout??9e4}))}async getApiConfigForRequest(e={}){return(await this.getSession()).getApiConfigForRequest({...e,headers:{...this.apiConfig.headers,...e.headers}})}sendWidgetEvent(e){this.getApiConfigForRequest().then(t=>this.createWidgetEvent({event:e,timestamp:new Date().toISOString()},t)).catch(()=>{})}getSession(){if(this.sessionPromise)return this.sessionPromise;let e=this.activateTryOn(this.apiConfig).then(e=>{var t,r;let n=(t=function(e){let t=e?.widgetSession;if(null===t||"object"!=typeof t)throw Error("AI try-on activation response is missing Widget Session");return{expiresIn:Number(t.expiresIn),sid:sB(t.sid),token:sB(t.token)}}(e),r={apiConfig:this.apiConfig},t?.token&&t.sid&&Number.isFinite(t.expiresIn)?new sI(t,r):null);if(!n)throw Error("AI try-on activation response is missing Widget Session");return n});return this.sessionPromise=e,e.catch(()=>{this.sessionPromise===e&&(this.sessionPromise=null)}),e}}function sB(e){return"string"==typeof e?e.trim():""}function s$({apiKey:e}={}){let t=sN(e);return t?new sD({apiKey:t}):new sA(void 0)}let sV={en:{ns1:{back:"Back",badge:"Try it on",confirmBadge:"Almost there",close:"Close",comparisonSlider:"Comparison slider",comparisonTitle:"Compare before and after",confirmChangePhoto:"Change photo",confirmGenerate:"Generate my look",confirmSubtitle:"Hit Generate and see how it looks on you",confirmTitle:"Ready to try it on?",dialogDescription:"AI try-on widget dialog",dialogTitle:"AI Try-On",download:"Download",errorBadge:"Little error",errorDifferentPhoto:"Change photo",errorFileTooLarge:"File is too large. Maximum file size is 10 MB",errorGuidance:"Try again with a different photo. Make sure it shows your full body.",errorRetry:"Try again",errorSubtitle:"It happens — let's try again",errorTitle:"Something went wrong",historyPhoto:"Previous photo",historySubtitle:"Use a previous photo or upload something new",historyTitle:"Your photos",historyUploadNew:"Upload new",bagIntroBadCropped:"Cropped photo",bagIntroBadHandsFull:"Both hands already full",bagIntroGoodAngle:"Slight angle",bagIntroGoodFullBody:"Full body, one hand free",bagIntroSubtitle:"A full-body shot with one shoulder or hand free",bagIntroTitle:"Strike a carrying pose",eyewearIntroBadFaceTurned:"Face turned away",eyewearIntroBadWearingGlasses:"Already wearing glasses",eyewearIntroGoodFacingCamera:"Facing camera, eyes visible",eyewearIntroGoodHairBack:"Hair back, good light",eyewearIntroSubtitle:"Straight-on photo works best.",eyewearIntroTitle:"Glasses go right on your face",fullBodyIntroBadCropped:"Cropped at the waist",fullBodyIntroBadSitting:"Sitting hides the fit",fullBodyIntroGoodAngle:"Slight angle, body visible",fullBodyIntroGoodHeadToToe:"Head to toe in frame",fullBodyIntroSubtitle:"Full-body photos work best — here's what to look for",fullBodyIntroTitle:"Better photo, better result",footwearIntroBadFeetHidden:"Feet hidden",footwearIntroBadOneFootCropped:"One foot out of frame",footwearIntroGoodKneesDown:"Knees-down on flat ground",footwearIntroGoodStanding:"Standing, both feet visible",footwearIntroSubtitle:"Both feet in the frame, standing on a plain floor.",footwearIntroTitle:"Down to your feet",headwearIntroBadCroppedHead:"Head cropped out",headwearIntroBadWearingHat:"Already wearing a hat",headwearIntroGoodAngle:"Slight angle, head in frame",headwearIntroGoodFront:"Head and shoulders, front on",headwearIntroSubtitle:"A head-and-shoulders shot with your whole head in view",headwearIntroTitle:"Heads up",introCta:"Got it, continue",introBadge:"Quick tip",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Top covers the waistline",lowerBodyIntroBadSitting:"Sitting bends the legs",lowerBodyIntroGoodFullBody:"Full body works too",lowerBodyIntroGoodWaistToFeet:"Waist to feet, standing",lowerBodyIntroSubtitle:"Stand up and show us everything from waist to feet.",lowerBodyIntroTitle:"It’s all about the legs",neckIntroBadHairCovering:"Hair covers neck and ears",neckIntroBadHighCollar:"High collar hides the neck",neckIntroGoodHairUp:"Hair up, neck visible",neckIntroGoodOpenNeckline:"Open neckline, chest up",neckIntroSubtitle:"Jewelry needs open skin — hair back, neckline clear.",neckIntroTitle:"Neck and ears, front and center",processingBadge:"Wait a second",processingProgress:"Reading your photo…",processingSubtitle:"Hang tight while we dress you up",processingTitle:"Working our magic…",reset:"Reset",resultBadge:"That’s the one",resultCompare:"Change photo",resultOpenComparison:"View before / after",resultProductLink:"View product",resultReset:"Save",resultShare:"Share",resultTitle:"Here's how it looks on you",resultTryAnother:"Add To Cart",resultTryAnotherWithPrice:"Add To Cart – {{price}}",share:"Share",startHistory:"View previous results",startTitle:"Want to see it on you?",startUpload:"Choose your photo",termsJoiner:"&",termsLink:"Terms",termsPrefix:"By using this service, your agree to",privacyLink:"privacy Policy",upperBodyIntroBadArmsCrossed:"Arms crossed hide the fit",upperBodyIntroBadObjectBlockingTorso:"Object blocks the torso",upperBodyIntroGoodAngle:"Slight angle",upperBodyIntroGoodFacingCamera:"Hips up, facing camera",upperBodyIntroSubtitle:"From the hips up, arms relaxed — that’s all this one needs.",upperBodyIntroTitle:"Let’s see your top half",waistIntroBadOversizedTop:"Oversized top hides the waist",waistIntroBadSitting:"Sitting folds the waistline",waistIntroGoodFullBody:"Full body, waistline visible",waistIntroGoodTopTucked:"Top tucked in, waist visible",waistIntroSubtitle:"Tuck in your top so we can see exactly where the belt sits.",waistIntroTitle:"Show your waistline",wristIntroBadClenchedFist:"Clenched fist",wristIntroBadCovered:"Sleeve covers the wrist",wristIntroGoodCloseUp:"Wrist close-up, hand relaxed",wristIntroGoodSleeveBack:"Sleeve pulled back",wristIntroSubtitle:"A close-up of your wrist does the trick.",wristIntroTitle:"Give us a hand"}},ru:{ns1:{back:"Назад",badge:"Примерить",confirmBadge:"Почти готово",close:"Закрыть",comparisonSlider:"Слайдер сравнения",comparisonTitle:"Сравнение до и после",confirmChangePhoto:"Изменить фото",confirmGenerate:"Сгенерировать образ",confirmSubtitle:"Нажмите \xabСгенерировать\xbb, чтобы увидеть, как это выглядит на вас",confirmTitle:"Готовы примерить?",dialogDescription:"Диалог виджета AI-примерки",dialogTitle:"AI-примерка",download:"Скачать",errorBadge:"Небольшая ошибка",errorDifferentPhoto:"Изменить фото",errorFileTooLarge:"Файл слишком большой. Максимальный размер файла — 10 МБ",errorGuidance:"Попробуйте другое фото. Убедитесь, что вы видны в полный рост.",errorRetry:"Попробовать снова",errorSubtitle:"Так бывает — попробуем еще раз",errorTitle:"Что-то пошло не так",historyPhoto:"Предыдущее фото",historySubtitle:"Используйте предыдущее фото или загрузите новое",historyTitle:"Ваши фото",historyUploadNew:"Загрузить новое",bagIntroBadCropped:"Слишком крупный план",bagIntroBadHandsFull:"Обе руки заняты",bagIntroGoodAngle:"По пояс, под небольшим углом",bagIntroGoodFullBody:"В полный рост, одна рука свободна",bagIntroSubtitle:"В кадре должен быть виден торс. Оставьте свободной одну руку или плечо.",bagIntroTitle:"Загрузите фото по пояс или в полный рост",eyewearIntroBadFaceTurned:"Лицо отвернуто от камеры",eyewearIntroBadWearingGlasses:"Очки уже надеты",eyewearIntroGoodFacingCamera:"Лицом к камере, глаза видны",eyewearIntroGoodHairBack:"Селфи под небольшим углом",eyewearIntroSubtitle:"В кадре должны быть хорошо видны лицо и глаза.",eyewearIntroTitle:"Загрузите фото лица",fullBodyIntroBadCropped:"Фото по пояс",fullBodyIntroBadSitting:"Сидячая поза",fullBodyIntroGoodAngle:"Селфи под небольшим углом",fullBodyIntroGoodHeadToToe:"Всё тело в кадре",fullBodyIntroSubtitle:"В кадре должно быть видно вас целиком.",fullBodyIntroTitle:"Загрузите фото в полный рост",footwearIntroBadFeetHidden:"Стопы не видны",footwearIntroBadOneFootCropped:"Одна стопа не попала в кадр",footwearIntroGoodKneesDown:"От колен до стоп, на ровном полу",footwearIntroGoodStanding:"В полный рост, обе стопы в кадре",footwearIntroSubtitle:"Встаньте на ровный пол. Обе стопы должны быть в кадре.",footwearIntroTitle:"Загрузите фото, где видны обе стопы",headwearIntroBadCroppedHead:"Часть головы не попала в кадр",headwearIntroBadWearingHat:"На фото уже есть головной убор",headwearIntroGoodAngle:"Селфи под небольшим углом",headwearIntroGoodFront:"Анфас, голова и плечи в кадре",headwearIntroSubtitle:"В кадре должны быть видны голова и плечи целиком.",headwearIntroTitle:"Загрузите фото головы и плеч",introCta:"Продолжить",introBadge:"Совет",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Свободная одежда скрывает линию талии",lowerBodyIntroBadSitting:"В сидячей позе ноги согнуты",lowerBodyIntroGoodFullBody:"Фото в полный рост",lowerBodyIntroGoodWaistToFeet:"От пояса до стоп, стоя",lowerBodyIntroSubtitle:"В кадре должны быть видны ноги целиком.",lowerBodyIntroTitle:"Загрузите фото от пояса до стоп",neckIntroBadHairCovering:"Волосы закрывают шею и уши",neckIntroBadHighCollar:"Одежда закрывает шею",neckIntroGoodHairUp:"Лицом к камере, волосы убраны",neckIntroGoodOpenNeckline:"Селфи под небольшим углом",neckIntroSubtitle:"В кадре должны быть видны шея и уши.",neckIntroTitle:"Загрузите фото головы и плеч",processingBadge:"Секунду",processingProgress:"Считываем ваше фото…",processingSubtitle:"Подождите, пока мы примеряем образ",processingTitle:"Творим магию…",reset:"Сбросить",resultBadge:"То, что нужно",resultCompare:"Изменить фото",resultOpenComparison:"До / после",resultProductLink:"Открыть товар",resultReset:"Сохранить",resultShare:"Поделиться",resultTitle:"Вот как это выглядит на вас",resultTryAnother:"Add To Cart",resultTryAnotherWithPrice:"Add To Cart – {{price}}",share:"Поделиться",startHistory:"Смотреть прошлые результаты",startTitle:"Хотите увидеть это на себе?",startUpload:"Выбрать фото",termsJoiner:"и",termsLink:"Условиями",termsPrefix:"Используя сервис, вы соглашаетесь с",privacyLink:"Политикой конфиденциальности",upperBodyIntroBadArmsCrossed:"Скрещённые руки закрывают торс",upperBodyIntroBadObjectBlockingTorso:"Предмет в руках закрывает торс",upperBodyIntroGoodAngle:"Селфи под небольшим углом",upperBodyIntroGoodFacingCamera:"По пояс, лицом к камере",upperBodyIntroSubtitle:"В кадре должны быть видны торс и расслабленные руки.",upperBodyIntroTitle:"Загрузите фото по пояс",waistIntroBadOversizedTop:"Одежда закрывает линию талии",waistIntroBadSitting:"В сидячей позе линия талии искажается",waistIntroGoodFullBody:"В полный рост, талия видна",waistIntroGoodTopTucked:"По пояс, талия видна",waistIntroSubtitle:"Линия талии должна быть открыта и хорошо видна.",waistIntroTitle:"Загрузите фото, где видна талия",wristIntroBadClenchedFist:"Сжатый кулак исказит результат",wristIntroBadCovered:"Одежда закрывает запястье",wristIntroGoodCloseUp:"Расслабленная кисть",wristIntroGoodSleeveBack:"Запястье открыто",wristIntroSubtitle:"В кадре должны быть видны кисть и запястье.",wristIntroTitle:"Загрузите фото руки"}}},sU=/initial-value:([^;\n]+);/i,sH=(p=(R=oK("./src/style.css?inline").A).replace(/:root\s*,\s*:host|:root/g,":host"),(h=Array.from(R.matchAll(/@property\s+(--[^{\s]+)\s*\{([^}]*)\}/g)).map(([,e,t])=>{let r=t.match(sU);if(!r)return null;let n=r[1].trim();return` ${e}: ${n};`}).filter(e=>null!==e).join("\n"))?`:host {
|
|
5482
5482
|
${h}
|
|
5483
5483
|
}
|
|
5484
5484
|
|
|
@@ -5487,4 +5487,4 @@ ${p}`:p),sW=["full-body","upper-body","lower-body","footwear","headwear","eyewea
|
|
|
5487
5487
|
- less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
|
|
5488
5488
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5489
5489
|
|
|
5490
|
-
Defaulting to \`null\`.`));let c=fb(o,u)?o:null,d=fv(c)?s(c,u):void 0;return(0,_.jsx)(fc,{scope:a,value:c,max:u,children:(0,_.jsx)(fi.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":fv(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":fm(c,u),"data-value":c??void 0,"data-max":u,...l,ref:t})})});fp.displayName=fs;var fh="ProgressIndicator",ff=A.forwardRef((e,t)=>{let{__scopeProgress:r,...n}=e,a=fd(fh,r);return(0,_.jsx)(fi.div,{"data-state":fm(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});function fg(e,t){return`${Math.round(e/t*100)}%`}function fm(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function fv(e){return"number"==typeof e}function fy(e){return fv(e)&&!isNaN(e)&&e>0}function fb(e,t){return fv(e)&&!isNaN(e)&&e<=t&&e>=0}function fw({className:e,value:t,max:r=100,...n}){let a=r>0?r:100,o="number"==typeof t?Math.min(Math.max(t/a*100,0),100):0;return(0,_.jsx)(fp,{"data-slot":"progress",className:i1("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),value:t,max:a,...n,children:(0,_.jsx)(ff,{"data-slot":"progress-indicator",className:"h-full bg-primary transition-[width]",style:{width:`${o}%`}})})}function fk(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:(0,_.jsx)("path",{d:"M8.21723 14.9975C8.10298 14.997 7.99004 14.9731 7.8854 14.9272C7.78077 14.8814 7.68665 14.8145 7.60889 14.7308L3.55889 10.4225C3.4075 10.2611 3.3264 10.0463 3.33343 9.82513C3.34046 9.604 3.43505 9.39471 3.59639 9.24332C3.75773 9.09192 3.97261 9.01082 4.19374 9.01785C4.41488 9.02489 4.62417 9.11948 4.77556 9.28082L8.20889 12.9392L15.2172 5.27248C15.2883 5.18392 15.3768 5.11083 15.4772 5.0577C15.5776 5.00458 15.6878 4.97254 15.8011 4.96355C15.9143 4.95456 16.0282 4.96882 16.1357 5.00544C16.2432 5.04207 16.3421 5.10029 16.4263 5.17652C16.5105 5.25276 16.5782 5.3454 16.6253 5.44877C16.6724 5.55213 16.6979 5.66403 16.7001 5.7776C16.7024 5.89116 16.6815 6.00399 16.6385 6.10916C16.5956 6.21433 16.5316 6.30961 16.4506 6.38915L8.83389 14.7225C8.75686 14.8077 8.66308 14.8761 8.55841 14.9234C8.45373 14.9707 8.34042 14.996 8.22556 14.9975H8.21723Z",fill:"currentColor"})})}function fx(e){return(0,_.jsxs)("svg",{fill:"none",viewBox:"0 0 19.9993 19.9996",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,_.jsx)("path",{d:"M16 9C16 7.14348 15.2629 5.36256 13.9502 4.0498C12.6374 2.73705 10.8565 2 9 2C7.14348 2 5.36256 2.73705 4.0498 4.0498C2.73705 5.36256 2 7.14348 2 9C2 10.8565 2.73705 12.6374 4.0498 13.9502C5.36256 15.2629 7.14348 16 9 16C10.8565 16 12.6374 15.2629 13.9502 13.9502C15.2629 12.6374 16 10.8565 16 9ZM18 9C18 11.3869 17.0521 13.6764 15.3643 15.3643C13.6764 17.0521 11.3869 18 9 18C6.61305 18 4.32357 17.0521 2.63574 15.3643C0.947915 13.6764 0 11.3869 0 9C0 6.61305 0.947915 4.32357 2.63574 2.63574C4.32357 0.947915 6.61305 0 9 0C11.3869 0 13.6764 0.947915 15.3643 2.63574C17.0521 4.32357 18 6.61305 18 9Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M13.9428 13.943C14.3333 13.5525 14.9663 13.5525 15.3568 13.943L19.7064 18.2926C20.097 18.6832 20.097 19.3162 19.7064 19.7067C19.3159 20.0972 18.6829 20.0972 18.2924 19.7067L13.9428 15.3571C13.5522 14.9666 13.5522 14.3335 13.9428 13.943Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M7.99983 12.0001V6.00008C7.99983 5.4478 8.44755 5.00008 8.99983 5.00008C9.55211 5.00008 9.99983 5.4478 9.99983 6.00008V12.0001C9.99983 12.5524 9.55211 13.0001 8.99983 13.0001C8.44755 13.0001 7.99983 12.5524 7.99983 12.0001Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M11.9998 8.00008C12.5521 8.00008 12.9998 8.4478 12.9998 9.00008C12.9998 9.55237 12.5521 10.0001 11.9998 10.0001H5.99983C5.44755 10.0001 4.99983 9.55237 4.99983 9.00008C4.99983 8.4478 5.44755 8.00008 5.99983 8.00008H11.9998Z",fill:"currentColor"})]})}function fS({children:e,className:t,...r}){return(0,_.jsx)("div",{className:i1("relative h-82 w-full overflow-hidden rounded-xl bg-background-base sm:h-100",t),...r,children:e})}function fC({className:e,src:t}){return(0,_.jsxs)(_.Fragment,{children:[t&&(0,_.jsx)("img",{"aria-hidden":"true",className:i1("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:t}),(0,_.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"})]})}function fP({backdropClassName:e,className:t,fallbackSrc:r,imageClassName:n,photo:a}){let o=a?.src??r;function i(e){r&&(e.currentTarget.src=r)}return(0,_.jsxs)(_.Fragment,{children:[o&&(0,_.jsx)("img",{"aria-hidden":"true",className:i1("absolute inset-0 size-full scale-125 object-cover blur-3xl",t,e),src:o,onError:i}),(0,_.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"}),o&&(0,_.jsx)("img",{alt:a?.name??"",className:i1("absolute inset-0 size-full object-contain",t,n),src:o,onError:i})]})}function fE({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return(0,_.jsxs)(_.Fragment,{children:[n&&(0,_.jsx)("img",{"aria-hidden":"true",className:i1("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}),(0,_.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/20"})]})}function fT({className:e,...t}){let r=(0,A.useId)().replace(/:/g,""),n=`${r}-loading-texture-gradient`,a=`${r}-loading-texture-pattern`,o=`${r}-loading-texture-mask`;return(0,_.jsxs)("svg",{className:i1("text-constant-white",e),fill:"none",focusable:"false",viewBox:"0 0 776 992",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,_.jsxs)("defs",{children:[(0,_.jsxs)("radialGradient",{id:n,cx:"0",cy:"0",gradientTransform:"translate(388 496) rotate(90) scale(1021)",gradientUnits:"userSpaceOnUse",r:"1",children:[(0,_.jsx)("stop",{stopColor:"currentColor",stopOpacity:"0.7"}),(0,_.jsx)("stop",{offset:"0.586538",stopColor:"currentColor",stopOpacity:"0"})]}),(0,_.jsx)("pattern",{id:a,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:(0,_.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"currentColor"})}),(0,_.jsx)("mask",{id:o,children:(0,_.jsx)("rect",{width:"776",height:"992",fill:`url(#${a})`})})]}),(0,_.jsx)("rect",{width:"776",height:"992",fill:`url(#${n})`,mask:`url(#${o})`})]})}function fR({animated:e=!1,className:t,...r}){return(0,_.jsxs)("div",{"aria-hidden":"true",className:i1("absolute h-133 w-104 max-w-none",t),...r,children:[!e&&(0,_.jsx)(fT,{className:"absolute inset-0 size-full opacity-30"}),e&&(0,_.jsx)("span",{className:"absolute inset-0 [mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [mask-position:center] [mask-repeat:no-repeat] [mask-size:18%_18%] [-webkit-mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [-webkit-mask-position:center] [-webkit-mask-repeat:no-repeat] [-webkit-mask-size:18%_18%] animate-[ai-try-on-loading-texture-pulse_2.6s_linear_infinite] motion-reduce:animate-none motion-reduce:[mask-size:220%_220%] motion-reduce:[-webkit-mask-size:220%_220%]",children:(0,_.jsx)(fT,{className:"absolute inset-0 size-full opacity-70"})})]})}function fO({badge:e,className:t,fallbackSrc:r,photo:n,selected:a,...o}){return(0,_.jsxs)("button",{className:i1("group relative aspect-square w-full overflow-hidden rounded-xl bg-background-base-2 text-left ring-offset-2 transition","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground",a?"ring-2 ring-foreground":null,t),type:"button",...o,children:[n?.src?(0,_.jsx)("img",{alt:n.name??"",className:"size-full object-cover",src:n.src}):r?(0,_.jsx)("img",{alt:"",className:"size-full object-cover",src:r}):null,a&&(0,_.jsx)("span",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full bg-foreground text-background-containers",children:(0,_.jsx)(fk,{className:"size-4"})}),e&&(0,_.jsx)("span",{className:"absolute right-2 top-2",children:e})]})}function fj({className:e,label:t,progress:r=0,...n}){let a=Math.min(Math.max(r,0),100);return(0,_.jsxs)("div",{className:i1("rounded-xl bg-background-base px-6 py-8",e),...n,children:[(0,_.jsxs)("div",{className:"mb-2 flex items-center justify-between text-sm font-medium text-text-sub",children:[(0,_.jsx)("span",{children:t}),(0,_.jsxs)("span",{children:[Math.round(a),"%"]})]}),(0,_.jsx)(fw,{className:"h-1 bg-background-base-3 [&_[data-slot=progress-indicator]]:bg-background-dark",value:a})]})}function fz({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return n?(0,_.jsx)("img",{alt:r?.name??"",className:i1("absolute left-1/2 top-0 h-full w-69 -translate-x-1/2 object-cover",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}):null}function fN({className:e,imageSrc:t,name:r}){return t?(0,_.jsx)("img",{alt:r??"",className:i1("absolute bottom-2 left-2 h-30 w-auto rounded-xl border border-background-containers bg-background-containers object-contain shadow-md",e),src:t}):null}function f_({good:e,imageSrc:t,label:r}){return(0,_.jsxs)("figure",{className:"flex min-w-0 flex-col items-start gap-2",children:[(0,_.jsxs)("div",{className:"relative aspect-square w-full overflow-hidden rounded-xl border border-border-light bg-background-base",children:[(0,_.jsx)("img",{alt:r,className:"size-full object-cover",src:t}),(0,_.jsx)("span",{className:i1("absolute right-2 top-2 flex size-7 items-center justify-center rounded-full",e?"bg-background-green":"bg-background-red"),children:e?(0,_.jsx)(fk,{className:"size-5 text-background-containers"}):(0,_.jsx)(h7,{className:"size-5 text-background-containers"})})]}),(0,_.jsx)("figcaption",{className:"w-[90%] break-words text-xs font-medium leading-[1.6] tracking-[0.02em] text-text-base",children:r})]})}function fA({className:e,onOpenComparison:t,productLabel:r,productUrl:n,result:a,zoomLabel:o}){let i="inline-flex h-8 min-w-0 max-w-52 flex-1 items-center justify-center gap-1.5 rounded-xl bg-button-light px-3 text-xs font-semibold text-text-dark";return(0,_.jsxs)(fS,{"aria-label":o,className:i1("block cursor-pointer text-left",e),role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},children:[(0,_.jsx)(fP,{photo:a?.after}),(0,_.jsxs)("div",{className:"absolute bottom-2 left-2 right-2 flex items-center justify-between gap-2",children:[n?(0,_.jsxs)("a",{className:i,href:n,onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(fr,{"aria-hidden":"true",className:"size-4"}),(0,_.jsx)("span",{className:"truncate",children:r})]}):(0,_.jsxs)("span",{className:i,children:[(0,_.jsx)(fr,{"aria-hidden":"true",className:"size-4"}),(0,_.jsx)("span",{className:"truncate",children:r})]}),(0,_.jsx)("button",{"aria-label":o,className:"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full bg-button-light text-text-dark",type:"button",onClick:e=>{e.stopPropagation(),t()},children:(0,_.jsx)(fx,{"aria-hidden":"true",className:"size-3.5"})})]})]})}function fL({onAddToCart:e,onClose:t,onDeleteResult:r,onSaveResult:n,onShareResult:a,portalContainer:o,productName:i,productUrl:s,result:l}){let{t:u}=rE(),c=i??u("resultProductLink");return(0,_.jsx)(st,{open:!0,onOpenChange:e=>!e&&t(),children:(0,_.jsxs)(sa,{className:"dark fixed inset-0 left-0 top-0 flex h-svh max-h-none w-svw max-w-none translate-x-0 translate-y-0 flex-col rounded-none bg-[#212124E5] p-0 text-text-dark duration-200 sm:max-w-none sm:p-0",portalContainer:o,showCloseButton:!1,children:[(0,_.jsxs)(so,{className:"sr-only",children:[(0,_.jsx)(si,{children:u("comparisonTitle")}),(0,_.jsx)(ss,{children:u("comparisonSlider")})]}),(0,_.jsxs)("div",{className:"flex h-23 shrink-0 items-center justify-between px-8 py-6",children:[s?(0,_.jsx)(i9,{asChild:!0,className:"max-w-80",size:"lg",variant:"outline",children:(0,_.jsxs)("a",{href:s,children:[(0,_.jsx)(fr,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:c})]})}):(0,_.jsxs)(i9,{className:"max-w-80",size:"lg",type:"button",variant:"outline",children:[(0,_.jsx)(fr,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:c})]}),(0,_.jsx)(i9,{"aria-label":u("close"),size:"icon-lg",type:"button",variant:"outline",onClick:t,children:(0,_.jsx)(h7,{className:"!size-3","data-icon":"inline-start"})})]}),(0,_.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center px-8",children:(0,_.jsxs)(h9,{"aria-label":u("comparisonSlider"),className:"h-full max-h-179 w-full max-w-143 bg-background-base-2",children:[(0,_.jsx)(h4,{position:"right",children:(0,_.jsx)(fz,{className:"w-full object-contain",photo:l?.after})}),(0,_.jsx)(h4,{position:"left",children:(0,_.jsx)(fz,{className:"w-full object-contain",photo:l?.before})}),(0,_.jsxs)(h6,{className:"w-11",children:[(0,_.jsx)("div",{className:"absolute left-1/2 h-full w-0.5 -translate-x-1/2 bg-constant-white"}),(0,_.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-constant-white text-constant-black shadow-lg",children:(0,_.jsx)("span",{className:"h-5 w-0.5 rounded-full bg-current"})})]})]})}),(0,_.jsx)("div",{className:"flex h-23 shrink-0 items-center justify-center px-8 pb-6 pt-3",children:(0,_.jsxs)("div",{className:"flex w-full max-w-104 items-start gap-2",children:[(0,_.jsxs)(i9,{className:"min-w-0 flex-1",size:"lg",type:"button",variant:"contrast",onClick:e,children:[(0,_.jsx)(h8,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:u("resultTryAnother")})]}),(0,_.jsx)(i9,{"aria-label":u("share"),size:"icon-lg",type:"button",variant:"outline",onClick:a,children:(0,_.jsx)(fn,{"data-icon":"inline-start"})}),(0,_.jsx)(i9,{"aria-label":u("download"),size:"icon-lg",type:"button",variant:"outline",onClick:n,children:(0,_.jsx)(fe,{"data-icon":"inline-start"})}),(0,_.jsx)(i9,{"aria-label":u("reset"),size:"icon-lg",type:"button",variant:"outline",onClick:function(){r()},children:(0,_.jsx)(ft,{"data-icon":"inline-start"})})]})})]})})}ff.displayName=fh;let fI=i3("inline-flex w-fit items-center justify-center overflow-hidden rounded-full whitespace-nowrap",{variants:{variant:{default:"bg-contrast text-contrast-foreground",secondary:"bg-[var(--color-background-gray-transparent)] text-text-base",positive:"bg-[var(--color-background-green-transparent)] text-text-green",negative:"bg-[var(--color-background-red-transparent)] text-text-red",standard:"bg-[var(--color-background-blue-transparent)] text-text-blue"},size:{sm:"h-6 px-2 typo-button-small",md:"h-[30px] px-3 typo-button-normal"}},defaultVariants:{variant:"default",size:"sm"}});function fM({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,_.jsx)(n?oJ:"span",{"data-slot":"badge",className:i1(fI({variant:t,size:r,className:e})),...a})}function fF({className:e,...t}){return(0,_.jsx)("div",{className:i1("flex max-h-svh w-svw flex-col overflow-hidden rounded-t-3xl rounded-b-none bg-background-containers text-foreground shadow-2xl sm:max-h-[min(calc(100svh-var(--spacing)*8),--spacing(176))] sm:w-120 sm:rounded-3xl",e),...t})}function fD({badge:e,badgeTone:t="gray",className:r,closeLabel:n,leftSlot:a,middleSlot:o,onClose:i,preferMiddleSlotFirst:s=!1,showCloseButton:l=!1,...u}){let c=e?(0,_.jsx)(fB,{tone:t,children:e}):null;return(0,_.jsxs)("div",{className:i1("flex h-17 items-center justify-between p-4",r),...u,children:[(0,_.jsxs)("div",{className:"flex items-center gap-2",children:[a,s?o:c,s?c:o]}),l&&(0,_.jsx)(i9,{"aria-label":n,size:"icon",type:"button",variant:"outline",onClick:i,children:(0,_.jsx)(h7,{"data-icon":"inline-start"})})]})}function fB({className:e,tone:t="gray",...r}){return(0,_.jsx)(fM,{className:e,size:"md",variant:"blue"===t?"standard":"green"===t?"positive":"red"===t?"negative":"secondary",...r})}function f$({className:e,...t}){return(0,_.jsx)("div",{className:i1("flex min-h-0 flex-1 flex-col animate-in fade-in-0 duration-100 motion-reduce:animate-none",e),...t})}function fV(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,_.jsx)("path",{d:"M21.1667 8.4C21.1667 8.16131 21.07 7.93245 20.8981 7.76367C20.7262 7.59489 20.4931 7.5 20.25 7.5H16.5833C16.2768 7.5 15.9906 7.3496 15.8206 7.09922L14.2594 4.8H9.74056L8.17936 7.09922C8.00935 7.3496 7.72316 7.5 7.41667 7.5H3.75C3.50688 7.5 3.2738 7.59489 3.10189 7.76367C2.92998 7.93245 2.83333 8.16131 2.83333 8.4V18.3C2.83333 18.5387 2.92998 18.7675 3.10189 18.9363C3.2738 19.1051 3.50689 19.2 3.75 19.2H20.25C20.4931 19.2 20.7262 19.1051 20.8981 18.9363C21.07 18.7675 21.1667 18.5387 21.1667 18.3V8.4ZM14.75 12.9C14.75 12.184 14.46 11.4973 13.9443 10.991C13.4287 10.4847 12.7292 10.2001 12 10.2C11.2707 10.2 10.5705 10.4847 10.0548 10.991C9.53923 11.4973 9.25 12.1841 9.25 12.9C9.25 13.6159 9.53923 14.3027 10.0548 14.809C10.5705 15.3153 11.2707 15.6 12 15.6C12.7292 15.5999 13.4287 15.3153 13.9443 14.809C14.46 14.3027 14.75 13.616 14.75 12.9ZM16.5833 12.9C16.5833 14.0934 16.1 15.2377 15.2406 16.0816C14.3811 16.9255 13.2155 17.3999 12 17.4C10.7844 17.4 9.61809 16.9256 8.75854 16.0816C7.89919 15.2378 7.41667 14.0933 7.41667 12.9C7.41667 11.7067 7.89919 10.5622 8.75854 9.71836C9.61809 8.87445 10.7844 8.4 12 8.4C13.2155 8.40008 14.3811 8.87452 15.2406 9.71836C16.1 10.5623 16.5833 11.7066 16.5833 12.9ZM23 18.3C23 19.0161 22.7101 19.7026 22.1943 20.209C21.6786 20.7153 20.9793 21 20.25 21H3.75C3.02065 21 2.32139 20.7153 1.80566 20.209C1.28994 19.7026 1 19.0161 1 18.3V8.4C1 7.68392 1.28994 6.99736 1.80566 6.49102C2.32139 5.98467 3.02065 5.7 3.75 5.7H6.92611L8.4873 3.40078L8.55623 3.31201C8.72911 3.11535 8.98172 3 9.25 3H14.75L14.8637 3.00703C15.1262 3.03922 15.3639 3.18167 15.5127 3.40078L17.0739 5.7H20.25C20.9793 5.7 21.6786 5.98467 22.1943 6.49102C22.7101 6.99736 23 7.68392 23 8.4V18.3Z",fill:"currentColor"})})}function fU(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5.00342 8.37303",fill:"none",...e,children:(0,_.jsx)("path",{d:"M1 1L4.00342 4.18652L1 7.37303",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function fH(e){return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,_.jsx)("path",{d:"M18 3H6C5.20435 3 4.44129 3.31607 3.87868 3.87868C3.31607 4.44129 3 5.20435 3 6V18C3 18.7956 3.31607 19.5587 3.87868 20.1213C4.44129 20.6839 5.20435 21 6 21H18C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18V6C21 5.20435 20.6839 4.44129 20.1213 3.87868C19.5587 3.31607 18.7956 3 18 3ZM6 5H18C18.2652 5 18.5196 5.10536 18.7071 5.29289C18.8946 5.48043 19 5.73478 19 6V14.36L15.8 11.63C15.3042 11.222 14.6821 10.999 14.04 10.999C13.3979 10.999 12.7758 11.222 12.28 11.63L5 17.7V6C5 5.73478 5.10536 5.48043 5.29289 5.29289C5.48043 5.10536 5.73478 5 6 5ZM18 19H6.56L13.56 13.16C13.6945 13.0602 13.8575 13.0062 14.025 13.0062C14.1925 13.0062 14.3555 13.0602 14.49 13.16L19 17V18C19 18.2652 18.8946 18.5196 18.7071 18.7071C18.5196 18.8946 18.2652 19 18 19Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M7.99983 9.99992C8.39766 9.99992 8.77919 9.84188 9.06049 9.56058C9.34179 9.27927 9.49983 8.89774 9.49983 8.49992C9.49983 8.10209 9.34179 7.72056 9.06049 7.43925C8.77919 7.15795 8.39766 6.99992 7.99983 6.99992C7.60201 6.99992 7.22047 7.15795 6.93917 7.43925C6.65787 7.72056 6.49983 8.10209 6.49983 8.49992C6.49983 8.89774 6.65787 9.27927 6.93917 9.56058C7.22047 9.84188 7.60201 9.99992 7.99983 9.99992Z",fill:"currentColor"})]})}function fW(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 3C18.7956 3 19.5585 3.3163 20.1211 3.87891C20.6837 4.44152 21 5.20435 21 6V18C21 18.7956 20.6837 19.5585 20.1211 20.1211C19.5585 20.6837 18.7956 21 18 21H6C5.20435 21 4.44152 20.6837 3.87891 20.1211C3.3163 19.5585 3 18.7956 3 18V6C3 5.20435 3.3163 4.44152 3.87891 3.87891C4.44152 3.3163 5.20435 3 6 3H18ZM14.0352 12C13.8633 12 13.6974 12.0639 13.5703 12.1797L6 19H18C18.2876 18.977 18.5547 18.8414 18.7422 18.6221C18.9296 18.4028 19.0221 18.1177 19 17.8301V16.6602L14.5 12.1797C14.3729 12.0639 14.2071 12 14.0352 12ZM8 7C7.60218 7 7.22076 7.15815 6.93945 7.43945C6.65815 7.72076 6.5 8.10218 6.5 8.5C6.5 8.89782 6.65815 9.27924 6.93945 9.56055C7.22076 9.84185 7.60218 10 8 10C8.39782 10 8.77924 9.84185 9.06055 9.56055C9.34185 9.27924 9.5 8.89782 9.5 8.5C9.5 8.10218 9.34185 7.72076 9.06055 7.43945C8.77924 7.15815 8.39782 7 8 7Z",fill:"currentColor"})})}function fq(e){return(0,_.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,_.jsx)("path",{d:"M6.05944 11.1406C6.47507 8.23438 8.97819 6 12.0001 6C13.6563 6 15.1563 6.67187 16.2438 7.75625L16.2626 7.775L16.5001 8H15.0032C14.4501 8 14.0032 8.44687 14.0032 9C14.0032 9.55313 14.4501 10 15.0032 10H19.0032C19.5563 10 20.0032 9.55313 20.0032 9V5C20.0032 4.44688 19.5563 4 19.0032 4C18.4501 4 18.0032 4.44688 18.0032 5V6.66875L17.6501 6.33437C16.2032 4.89375 14.2032 4 12.0001 4C7.96882 4 4.63444 6.98125 4.08132 10.8594C4.00319 11.4062 4.38132 11.9125 4.92819 11.9906C5.47507 12.0688 5.98132 11.6875 6.05944 11.1438V11.1406ZM19.9188 13.1406C19.9969 12.5938 19.6157 12.0875 19.0719 12.0094C18.5282 11.9312 18.0188 12.3125 17.9407 12.8562C17.5251 15.7625 15.0219 17.9969 12.0001 17.9969C10.3438 17.9969 8.84382 17.325 7.75632 16.2406L7.73757 16.2219L7.50007 15.9969H8.99694C9.55007 15.9969 9.99694 15.55 9.99694 14.9969C9.99694 14.4437 9.55007 13.9969 8.99694 13.9969L5.00007 14C4.73444 14 4.47819 14.1063 4.29069 14.2969C4.10319 14.4875 3.99694 14.7406 4.00007 15.0094L4.03132 18.9781C4.03444 19.5312 4.48757 19.975 5.04069 19.9688C5.59382 19.9625 6.03757 19.5125 6.03132 18.9594L6.01882 17.35L6.35319 17.6656C7.80007 19.1062 9.79694 20 12.0001 20C16.0313 20 19.3657 17.0187 19.9188 13.1406Z",fill:"currentColor"})})}function fK({className:e,...t}){return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:i1("size-6",e),...t,children:[(0,_.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,_.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 fG={privacy:"https://vizbl.com/legal/privacy-policy",terms:"https://vizbl.com/legal/terms-of-use"},fX={privacy:"https://arizo.ru/privacy-policy/",terms:"https://arizo.ru/terms-of-use/"},fY={bag:{cards:[{good:!0,imageSrc:ol,labelKey:"bagIntroGoodFullBody"},{good:!0,imageSrc:os,labelKey:"bagIntroGoodAngle"},{good:!1,imageSrc:oi,labelKey:"bagIntroBadHandsFull"},{good:!1,imageSrc:oo,labelKey:"bagIntroBadCropped"}],subtitleKey:"bagIntroSubtitle",titleKey:"bagIntroTitle"},eyewear:{cards:[{good:!0,imageSrc:od,labelKey:"eyewearIntroGoodFacingCamera"},{good:!0,imageSrc:op,labelKey:"eyewearIntroGoodHairBack"},{good:!1,imageSrc:oc,labelKey:"eyewearIntroBadWearingGlasses"},{good:!1,imageSrc:ou,labelKey:"eyewearIntroBadFaceTurned"}],subtitleKey:"eyewearIntroSubtitle",titleKey:"eyewearIntroTitle"},footwear:{cards:[{good:!0,imageSrc:om,labelKey:"footwearIntroGoodStanding"},{good:!0,imageSrc:og,labelKey:"footwearIntroGoodKneesDown"},{good:!1,imageSrc:of,labelKey:"footwearIntroBadOneFootCropped"},{good:!1,imageSrc:oh,labelKey:"footwearIntroBadFeetHidden"}],subtitleKey:"footwearIntroSubtitle",titleKey:"footwearIntroTitle"},"full-body":{cards:[{good:!0,imageSrc:ow,labelKey:"fullBodyIntroGoodHeadToToe"},{good:!0,imageSrc:ob,labelKey:"fullBodyIntroGoodAngle"},{good:!1,imageSrc:ov,labelKey:"fullBodyIntroBadCropped"},{good:!1,imageSrc:oy,labelKey:"fullBodyIntroBadSitting"}],subtitleKey:"fullBodyIntroSubtitle",titleKey:"fullBodyIntroTitle"},headwear:{cards:[{good:!0,imageSrc:oC,labelKey:"headwearIntroGoodFront"},{good:!0,imageSrc:oS,labelKey:"headwearIntroGoodAngle"},{good:!1,imageSrc:ox,labelKey:"headwearIntroBadWearingHat"},{good:!1,imageSrc:ok,labelKey:"headwearIntroBadCroppedHead"}],subtitleKey:"headwearIntroSubtitle",titleKey:"headwearIntroTitle"},"lower-body":{cards:[{good:!0,imageSrc:oR,labelKey:"lowerBodyIntroGoodWaistToFeet"},{good:!0,imageSrc:oT,labelKey:"lowerBodyIntroGoodFullBody"},{good:!1,imageSrc:oE,labelKey:"lowerBodyIntroBadSitting"},{good:!1,imageSrc:oP,labelKey:"lowerBodyIntroBadCoveredWaist"}],subtitleKey:"lowerBodyIntroSubtitle",titleKey:"lowerBodyIntroTitle"},neck:{cards:[{good:!0,imageSrc:oz,labelKey:"neckIntroGoodHairUp"},{good:!0,imageSrc:oN,labelKey:"neckIntroGoodOpenNeckline"},{good:!1,imageSrc:oO,labelKey:"neckIntroBadHairCovering"},{good:!1,imageSrc:oj,labelKey:"neckIntroBadHighCollar"}],subtitleKey:"neckIntroSubtitle",titleKey:"neckIntroTitle"},"upper-body":{cards:[{good:!0,imageSrc:oI,labelKey:"upperBodyIntroGoodFacingCamera"},{good:!0,imageSrc:oL,labelKey:"upperBodyIntroGoodAngle"},{good:!1,imageSrc:o_,labelKey:"upperBodyIntroBadArmsCrossed"},{good:!1,imageSrc:oA,labelKey:"upperBodyIntroBadObjectBlockingTorso"}],subtitleKey:"upperBodyIntroSubtitle",titleKey:"upperBodyIntroTitle"},waist:{cards:[{good:!0,imageSrc:oD,labelKey:"waistIntroGoodFullBody"},{good:!0,imageSrc:oB,labelKey:"waistIntroGoodTopTucked"},{good:!1,imageSrc:oM,labelKey:"waistIntroBadOversizedTop"},{good:!1,imageSrc:oF,labelKey:"waistIntroBadSitting"}],subtitleKey:"waistIntroSubtitle",titleKey:"waistIntroTitle"},wrist:{cards:[{good:!0,imageSrc:oU,labelKey:"wristIntroGoodCloseUp"},{good:!0,imageSrc:oH,labelKey:"wristIntroGoodSleeveBack"},{good:!1,imageSrc:o$,labelKey:"wristIntroBadClenchedFist"},{good:!1,imageSrc:oV,labelKey:"wristIntroBadCovered"}],subtitleKey:"wristIntroSubtitle",titleKey:"wristIntroTitle"}};function fQ({view:e}){let{t}=rE(),r=fY[e.productType];return(0,_.jsxs)(f4,{title:t("startTitle"),subtitle:t(r.titleKey),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fC,{src:e.productImageSrc}),(0,_.jsx)(fz,{fallbackSrc:e.productImageSrc})]}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.choosePhoto,children:[(0,_.jsx)(fV,{"data-icon":"inline-start"}),t("startUpload")]}),(0,_.jsxs)(i9,{className:"w-full",disabled:!e.canOpenHistory,size:"lg",type:"button",variant:"outline",onClick:e.openHistory,children:[(0,_.jsx)(fW,{"data-icon":"inline-start"}),t("startHistory")]}),(0,_.jsx)(f8,{})]})]})}function fZ({view:e}){let{t}=rE(),r=fY[e.productType];return(0,_.jsxs)(f4,{title:t(r.titleKey),subtitle:t(r.subtitleKey),children:[(0,_.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:gap-4",children:r.cards.map(e=>(0,_.jsx)(f_,{good:e.good,imageSrc:e.imageSrc,label:t(e.labelKey)},e.labelKey))}),(0,_.jsx)("div",{className:"mt-4",children:(0,_.jsx)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.continueIntro,children:t("introCta")})})]})}function fJ({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("historyTitle"),subtitle:t("historySubtitle"),children:[(0,_.jsx)("div",{className:"mt-3 grid min-h-104 flex-1 grid-cols-3 content-start gap-x-3 gap-y-4 overflow-x-hidden overflow-y-auto overscroll-contain pb-2 sm:gap-4",children:e.history.map(r=>(0,_.jsx)(fO,{"aria-label":r.after.name??t("historyPhoto"),photo:r.after,onClick:()=>e.selectResult(r.id)},r.id))}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.chooseNew,children:[(0,_.jsx)(fH,{"data-icon":"inline-start"}),t("historyUploadNew")]}),(0,_.jsx)(f8,{})]})]})}function f0({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("confirmTitle"),subtitle:t("confirmSubtitle"),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fP,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,_.jsx)(fN,{className:"bottom-2 left-2",imageSrc:e.productImageSrc,name:e.productName})]}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.generate,children:[(0,_.jsx)(fK,{"data-icon":"inline-start"}),t("confirmGenerate")]}),(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,_.jsx)(fq,{"data-icon":"inline-start"}),t("confirmChangePhoto")]}),(0,_.jsx)(f8,{})]})]})}function f1({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("processingTitle"),subtitle:t("processingSubtitle"),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fE,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,_.jsx)(fR,{animated:!0,className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,_.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2",children:[(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white shadow-md sm:size-37.5",children:(0,_.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,_.jsx)("img",{alt:"",className:"size-full object-cover",src:e.photo.src}):null})]})]}),(0,_.jsx)(fj,{className:"mt-4",label:t("processingProgress"),progress:e.processingProgress})]})}function f2({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("errorTitle"),subtitle:t("errorSubtitle"),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fE,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,_.jsx)(fR,{className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,_.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-6 px-6 sm:px-12",children:[(0,_.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white bg-background-containers shadow-md sm:size-37.5",children:(0,_.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,_.jsx)("img",{alt:e.photo.name??"",className:"size-full object-cover",src:e.photo.src,onError:t=>{t.currentTarget.src=e.productImageSrc}}):null})]}),(0,_.jsx)("p",{className:"w-56 text-center text-xs font-medium tracking-wider text-constant-white",children:t("errorGuidance")})]})]}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.retry,children:[(0,_.jsx)(fK,{"data-icon":"inline-start"}),t("errorRetry")]}),(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.chooseDifferentPhoto,children:[(0,_.jsx)(fq,{"data-icon":"inline-start"}),t("errorDifferentPhoto")]}),(0,_.jsx)(f8,{className:"text-text-sub"})]})]})}function f3({view:e}){let{t}=rE();return e.myFitsOpen?(0,_.jsx)("div",{className:"min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain pb-4",children:(0,_.jsx)("div",{className:"flex flex-col gap-4 px-6 pb-2 pt-4 sm:px-8",children:e.resultHistory.map((t,r)=>(0,_.jsx)(f5,{compact:r>0,onAddToCart:e.addToCart,productName:t.productName??e.productName,productUrl:t.productUrl??e.productUrl,result:t,onDeleteResult:e.deleteResult,onOpenComparison:e.openComparison,onSaveResult:e.saveResult,onShareResult:e.shareResult},t.id??t.after.id))})}):(0,_.jsxs)(f4,{className:"pb-6",subtitle:void 0,title:t("resultTitle"),children:[(0,_.jsx)(fA,{className:"mt-6",productLabel:e.productName??t("resultProductLink"),productUrl:e.productUrl,zoomLabel:t("resultOpenComparison"),result:e.result,onOpenComparison:()=>e.openComparison(e.result?.id)}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.addToCart,children:[(0,_.jsx)(h8,{"data-icon":"inline-start"}),t("resultTryAnother")]}),(0,_.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,_.jsxs)(i9,{type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,_.jsx)(fq,{"data-icon":"inline-start"}),t("resultCompare")]}),(0,_.jsxs)(i9,{type:"button",variant:"outline",onClick:()=>e.shareResult(e.result?.id),children:[(0,_.jsx)(fn,{"data-icon":"inline-start"}),t("resultShare")]}),(0,_.jsxs)(i9,{type:"button",variant:"outline",onClick:()=>e.saveResult(e.result?.id),children:[(0,_.jsx)(fe,{"data-icon":"inline-start"}),t("resultReset")]})]})]})]})}function f5({compact:e=!1,onAddToCart:t,onDeleteResult:r,onOpenComparison:n,onSaveResult:a,onShareResult:o,productName:i,productUrl:s,result:l}){let{t:u}=rE(),c=i??u("resultProductLink");return(0,_.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,_.jsx)(fA,{productLabel:c,productUrl:s,zoomLabel:u("resultOpenComparison"),result:l,onOpenComparison:()=>n(l.id)}),(0,_.jsxs)("div",{className:"flex gap-2",children:[(0,_.jsxs)(i9,{className:"min-w-0 flex-1",size:"default",type:"button",variant:"contrast",onClick:t,children:[(0,_.jsx)(h8,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:u("resultTryAnother")})]}),(0,_.jsx)(i9,{"aria-label":u("share"),size:"icon",type:"button",variant:"outline",onClick:()=>o(l.id),children:(0,_.jsx)(fn,{"data-icon":"inline-start"})}),(0,_.jsx)(i9,{"aria-label":u("download"),size:"icon",type:"button",variant:"outline",onClick:()=>a(l.id),children:(0,_.jsx)(fe,{"data-icon":"inline-start"})}),!e&&(0,_.jsx)(i9,{"aria-label":u("reset"),size:"icon",type:"button",variant:"outline",onClick:()=>r(l.id),children:(0,_.jsx)(ft,{"data-icon":"inline-start"})})]})]})}function f9({label:e,onClick:t}){return(0,_.jsx)(i9,{"aria-label":e,size:"icon",type:"button",variant:"outline",onClick:t,children:(0,_.jsx)(fU,{className:"rotate-180 !size-3","data-icon":"inline-start"})})}function f4({children:e,className:t,subtitle:r,title:n}){return(0,_.jsxs)("div",{className:i1("flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain px-6 pb-5 sm:px-8",t),children:[(0,_.jsxs)("div",{className:"mb-1 flex flex-col gap-1",children:[(0,_.jsx)("h2",{className:"text-2xl font-medium tracking-tight text-text-dark",children:n}),r&&(0,_.jsx)("p",{className:"text-sm font-medium text-text-base",children:r})]}),e]})}function f6({children:e,className:t}){return(0,_.jsx)("div",{className:i1("flex flex-col gap-2",t),children:e})}function f8({className:e}){var t;let{i18n:r,t:n}=rE(),a=(t=r.resolvedLanguage??r.language,t?.startsWith("ru")?fX:fG);return(0,_.jsxs)("p",{className:i1("pt-1 text-center text-xs font-medium text-text-base",e),children:[n("termsPrefix")," ",(0,_.jsx)("a",{className:"underline underline-offset-2",href:a.terms,rel:"noopener noreferrer",target:"_blank",children:n("termsLink")})," ",n("termsJoiner")," ",(0,_.jsx)("a",{className:"underline underline-offset-2",href:a.privacy,rel:"noopener noreferrer",target:"_blank",children:n("privacyLink")})]})}function f7(e){return"string"==typeof e?e.trim():""}function ge(e){if(e)return e;if("function"==typeof fetch)return fetch;throw Error("Fetch API is not available for AI try-on image upload")}async function gt(e,t,r){let n=await ge(r)(e,{body:t,method:"PUT"});if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`Nano Banana image upload failed with status ${n.status}${e?`: ${e}`:""}`)}}async function gr(e,t){let r=e?.trim();return r?ga(r,t,"AI try-on product image fetch failed"):null}async function gn(e,t){return e.blob?e.blob:e.file?e.file:e.src?ga(e.src,t,"AI try-on source photo fetch failed"):null}async function ga(e,t,r){let n=await ge(t)(e);if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`${r} with status ${n.status}${e?`: ${e}`:""}`)}return n.blob()}async function go(e){if(e instanceof Blob)return e.type?e:new Blob([e],{type:"image/jpeg"});if(e instanceof ArrayBuffer||"string"==typeof e)return new Blob([e],{type:"image/jpeg"});throw Error("AI try-on generation did not return an image")}let gi="ai-try-on-result";async function gs(e,t={}){let r=await gu(e,t.fetch),n=t.document??globalThis.document;if(!r||!n?.body)return!1;let a=t.createObjectUrl??gd,o=t.revokeObjectUrl??gp,i=a(r);if(!i)return!1;let s=n.createElement("a");return s.href=i,s.download=gc(r,e,t.filename),s.style.display="none",n.body.appendChild(s),s.click(),s.remove(),o(i),!0}async function gl(e,t={}){let r=await gu(e,t.fetch),n=t.navigator??globalThis.navigator;if(!r)return!1;if("function"==typeof File&&"function"==typeof n?.share){let a={files:[new File([r],gc(r,e,t.filename),{type:r.type||e?.type||"image/png"})]};if("function"!=typeof n.canShare||n.canShare(a))try{return await n.share(a),!0}catch(e){if("u">typeof DOMException&&e instanceof DOMException&&"AbortError"===e.name)return!1}}return gs(e,t)}async function gu(e,t=globalThis.fetch){if(!e)return null;if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof t)return null;try{let r=await t(e.src);if(!r.ok)return null;return r.blob()}catch{return null}}function gc(e,t,r=gi){var n;let a=function(e){switch(e){case"image/jpeg":return"jpg";case"image/png":return"png";case"image/webp":return"webp";case"image/gif":return"gif";case"image/svg+xml":return"svg";default:return null}}(e.type||t?.type)??(n=t?.name,n?.match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()??null)??"png",o=r.replace(/\.[a-z0-9]+$/i,"").replace(/[^\w-]+/g,"-").replace(/^-+|-+$/g,"")||gi;return`${o}.${a}`}function gd(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""}function gp(e){"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}let gh="results";function gf(){return void 0===globalThis.indexedDB?null:globalThis.indexedDB}function gg(e){return new Promise((t,r)=>{let n=e.open("neurodyn-ai-try-on",1);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(gh)||e.createObjectStore(gh,{keyPath:"id"}).createIndex("createdAt","createdAt")},n.onerror=()=>r(n.error),n.onsuccess=()=>t(n.result)})}function gm(e){return new Promise((t,r)=>{e.onabort=()=>r(e.error),e.onerror=()=>r(e.error),e.oncomplete=()=>t()})}async function gv(e){return{after:await gy(e.after),before:await gy(e.before),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productUrl:e.productUrl}}async function gy(e){let t=await gb(e);if(!t)throw Error("AI try-on photo cannot be persisted without image data");return{blob:t,id:e.id,lastModified:e.file?.lastModified??e.lastModified,name:e.name,size:t.size,type:t.type||e.type}}async function gb(e){if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof fetch)return null;try{let t=await fetch(e.src);return t.ok?t.blob():null}catch{return null}}function gw(e){return`neurodyn_ai_try_on_seen_tip:${e}`}function gk(e,t=gx()){if(t)try{t.setItem(gw(e),"true")}catch{}}function gx(){try{return void 0===globalThis.localStorage?null:globalThis.localStorage}catch{return null}}let gS={delete:async function e(e){let t=gf();if(!t)return!1;try{let r=await gg(t),n=r.transaction(gh,"readwrite"),a=gm(n);return n.objectStore(gh).delete(e),await a,r.close(),!0}catch(e){throw Error("AI try-on result could not be removed from history",{cause:e})}},list:async function e(){let e=gf();if(!e)return[];try{var t;let r=await gg(e),n=r.transaction(gh,"readonly"),a=gm(n),o=await (t=n.objectStore(gh).getAll(),new Promise((e,r)=>{t.onerror=()=>r(t.error),t.onsuccess=()=>e(t.result)}));return await a,r.close(),o.sort((e,t)=>t.createdAt-e.createdAt)}catch(e){throw Error("AI try-on history could not be loaded",{cause:e})}},save:async function e(e){let t=gf();if(!t)return!1;try{let r=await gv(e),n=await gg(t),a=n.transaction(gh,"readwrite"),o=gm(a);return a.objectStore(gh).put(r),await o,n.close(),!0}catch(e){throw Error("AI try-on result could not be saved to history",{cause:e})}}},gC={save:gs,share:gl},gP={consumeFirstView:function(e,t=gx()){return!function(e,t=gx()){if(!t)return!1;try{return"true"===t.getItem(gw(e))}catch{return!1}}(e,t)&&(gk(e,t),!0)},markSeen:gk},gE={createObjectUrl:e=>"function"==typeof URL.createObjectURL?URL.createObjectURL(e):"",revokeObjectUrl:e=>{"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}},gT=["image/jpeg","image/png"];class gR{createObjectUrl;tipStore;state;constructor({createObjectUrl:e,productImageSrc:t,productName:r,productType:n,productUrl:a,tipStore:o}){this.createObjectUrl=e,this.tipStore=o,this.state={comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:[],myFitsOpen:!1,processingProgress:0,productImageSrc:t,productName:r,productType:n,productUrl:a,result:null,selectedPhoto:null,stage:"start"}}get view(){switch(this.state.stage){case"intro":return{productType:this.state.productType,stage:"intro"};case"history":return{history:this.state.history,stage:"history"};case"confirm":return{photo:this.state.selectedPhoto,productImageSrc:this.state.productImageSrc,productName:this.state.productName,stage:"confirm"};case"processing":return this.createProcessingView();case"error":return this.createErrorView();case"result":return{canOpenMyFits:this.state.history.length>0,myFitsOpen:this.state.myFitsOpen,productName:this.state.result?.productName??this.state.productName,productUrl:this.state.result?.productUrl??this.state.productUrl,result:this.state.result,resultHistory:function(e,t){if(!e)return[];let r=[e,...t.filter(t=>t.id!==e.id)];return r.filter((e,t)=>{let n=e.id??e.after.id;return r.findIndex(e=>(e.id??e.after.id)===n)===t})}(this.state.result,this.state.history),stage:"result"};default:return{canOpenHistory:this.state.history.length>0,productImageSrc:this.state.productImageSrc,productName:this.state.productName,productType:this.state.productType,productUrl:this.state.productUrl,stage:"start"}}}get comparison(){let e=this.getComparisonResult();return{open:this.state.comparisonOpen&&null!==e,productName:e?.productName??this.state.productName,productUrl:e?.productUrl??this.state.productUrl,result:e}}get selectedPhoto(){return this.state.selectedPhoto}get history(){return this.state.history}updateProduct({productImageSrc:e,productName:t,productType:r,productUrl:n}){this.state={...this.state,productImageSrc:e,productName:t,productType:r,productUrl:n}}hydrateHistory(e){this.state={...this.state,error:null,history:[...e,...this.state.history].reduce((e,t)=>gO(e,t),[])}}failHistory(e,t){this.state={...this.state,error:{kind:"hydrate-history"===e?"history-load":"save-result"===e?"history-save":"history-delete",message:t}}}choosePhoto(){return this.tipStore.consumeFirstView(this.state.productType)?(this.state={...this.state,stage:"intro"},null):{type:"request-file-input"}}continueIntro(){return this.tipStore.markSeen(this.state.productType),{type:"request-file-input"}}requestClose(){return"intro"===this.state.stage?(this.tipStore.markSeen(this.state.productType),this.goBack(),null):{type:"close-dialog"}}openHistory(){0!==this.state.history.length&&(this.state={...this.state,stage:"history"})}goBack(){switch(this.state.stage){case"intro":case"history":this.state={...this.state,stage:"start"};return;case"confirm":this.state={...this.state,stage:this.state.history.length>0?"history":"start"};return;case"processing":case"error":case"result":this.state={...this.state,stage:"confirm"}}}reset(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"}}selectHistoryResult(e){let t=this.state.history.find(t=>t.id===e);t&&(this.state={...this.state,error:null,myFitsOpen:!1,result:t,selectedPhoto:t.before,stage:"result"})}selectFile(e){var t,r;let n=(t=e,gT.includes(t.type)||""===t.type&&/\.(?:jpe?g|png)$/i.test(t.name)?t.size>0xa00000?"file-too-large":null:"unsupported-file-format");if(n)return this.state={...this.state,error:{code:n,kind:"upload-validation"},myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"error"},null;let a=this.createObjectUrl(e),o={blob:e,file:e,id:(r=e,`${r.name}-${r.size}-${r.lastModified}`),lastModified:e.lastModified,name:e.name,size:e.size,src:a,type:e.type};return this.selectPhoto(o),o}selectPhoto(e){this.state={...this.state,error:null,myFitsOpen:!1,processingProgress:0,selectedPhoto:e,stage:"confirm"}}startGeneration(){return!!this.state.selectedPhoto&&(this.state={...this.state,error:null,generationProduct:this.getProductMetadata(),myFitsOpen:!1,processingProgress:0,result:null,stage:"processing"},!0)}reportGenerationProgress(e){var t;"processing"===this.state.stage&&(this.state={...this.state,processingProgress:Math.max(this.state.processingProgress,Number.isFinite(t=e)?Math.min(Math.max(t,0),100):0)})}completeGeneration(e,t=Date.now()){let r=function(e,t,r=Date.now()){return{...e,...t,createdAt:r,id:`${e.before.id}-result-${r}`}}(e,this.state.generationProduct??this.getProductMetadata(),t);return this.state={...this.state,error:null,generationProduct:null,history:gO(this.state.history,r),myFitsOpen:!1,processingProgress:100,result:r,selectedPhoto:r.before,stage:"result"},r}failGeneration(e){this.state={...this.state,error:{kind:"generation",message:e},generationProduct:null,stage:"error"}}toggleMyFits(){"result"===this.state.stage&&0!==this.state.history.length&&(this.state={...this.state,myFitsOpen:!this.state.myFitsOpen})}closeMyFits(){this.state={...this.state,myFitsOpen:!1}}openComparison(e){let t=e?this.findResult(e):this.state.result;t&&(this.state={...this.state,comparisonOpen:!0,comparisonResultId:t.id})}closeComparison(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null}}deleteResult(e){let t=this.findResult(e),r=this.state.history.filter(t=>!gj(t,e)),n=this.state.result?.id??this.state.result?.after.id,a=this.getComparisonResult()?.id===e;if(n!==e)return this.state={...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,history:r},t;let o=r[0]??null;return this.state=o?{...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,error:null,generationProduct:null,history:r,myFitsOpen:r.length>0&&this.state.myFitsOpen,result:o,selectedPhoto:o.before,stage:"result"}:{...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:r,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"},t}resolveResultActionPhoto(e){let t=e?this.findResult(e):this.comparison.open?this.comparison.result:this.state.result;return t?.after??null}findResult(e){return this.state.history.find(t=>gj(t,e))??null}createProcessingView(){let e=this.state.generationProduct??this.getProductMetadata();return{photo:this.state.selectedPhoto,processingProgress:this.state.processingProgress,productImageSrc:e.productImageSrc,productName:e.productName,stage:"processing"}}createErrorView(){let e=this.state.generationProduct??this.getProductMetadata();return{error:this.state.error??{kind:"generation"},photo:this.state.selectedPhoto,productImageSrc:e.productImageSrc,productName:e.productName,stage:"error"}}getProductMetadata(){return{productImageSrc:this.state.productImageSrc,productName:this.state.productName,productUrl:this.state.productUrl}}getComparisonResult(){return this.state.comparisonOpen?this.state.comparisonResultId?this.findResult(this.state.comparisonResultId):this.state.result:null}}function gO(e,t){return[t,...e.filter(e=>e.id!==t.id)].sort((e,t)=>t.createdAt-e.createdAt)}function gj(e,t){return e.id===t||e.after.id===t}function gz(e,t){return{blob:e.blob,id:e.id,lastModified:e.lastModified,name:e.name,size:e.size,src:t(e.blob),type:e.type}}function gN(e,t){t&&(g_(e,t.before),g_(e,t.after))}function g_(e,t){gA(t)?.forEach(t=>e.add(t))}function gA(e){return e?.src?.startsWith("blob:")?[e.src]:null}function gL(e){return function(e=5e3){return new Promise(t=>setTimeout(t,e))}(function(e,t=Date.now()){return Math.max(0,5e3-(t-e))}(e))}function gI({dialogPortalContainer:e,language:t,onClose:r,processPhoto:n,productImageSrc:a,productName:o,productType:i,productUrl:s,tryOnClient:l,apiKey:u,showDialogCloseButton:c=!1}){sG(i);let{i18n:d,t:p}=rE(),h=(0,A.useRef)(null),f=sN(u),g=(0,A.useMemo)(()=>l??s$({apiKey:f}),[l,f]);(0,A.useEffect)(()=>{"string"==typeof t&&d.changeLanguage(t)},[d,t]);let m=function({historyStore:e=gS,objectUrls:t=gE,onRequestClose:r,onRequestFileInput:n,processPhoto:a,productImageSrc:o,productName:i,productType:s,productUrl:l,tryOnClient:u,resultActions:c=gC,tipStore:d=gP}){var p;let[,h]=(0,A.useReducer)(e=>e+1,0),f=(0,A.useRef)(new Set),g=(0,A.useCallback)(e=>{let r=t.createObjectUrl(e);return r&&f.current.add(r),r},[t]),m=(0,A.useRef)(null);m.current||(m.current=new gR({createObjectUrl:g,productImageSrc:o,productName:i,productType:s,productUrl:l,tipStore:d}));let v=m.current;v.updateProduct({productImageSrc:o,productName:i,productType:s,productUrl:l});let y=(0,A.useMemo)(()=>a??function({createObjectUrl:e=function(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""},fetch:t,productImageSrc:r,productType:n,tryOnClient:a,apiKey:o}){sG(n);let i=a??s$({apiKey:o});return async function(a,o){let s;o?.reportProgress(4);let l=await gn(a,t);if(!l||l.size<=0)throw Error("AI try-on source photo is empty");o?.reportProgress(12);let u=await gr(r,t);if(!u||u.size<=0)throw Error("AI try-on product image is missing");o?.reportProgress(22),o?.reportProgress(32);let[c,d]=function(e,t){let r=e?.uploads;if(!Array.isArray(r)||r.length<2)throw Error("Nano Banana upload URL response is missing uploads");return r.slice(0,2).map(e=>{if(null===e||"object"!=typeof e)throw Error("Nano Banana upload URL response is missing uploads");let t=f7(e.key),r=f7(e.uploadUrl);if(!t||!r)throw Error("Nano Banana upload URL response is missing key or uploadUrl");return{key:t,uploadUrl:r}})}(await i.requestUploadUrls(2),2);o?.reportProgress(44),await Promise.all([gt(c.uploadUrl,l,t),gt(d.uploadUrl,u,t)]),o?.reportProgress(62);let p=function(e){if(!e)return()=>{};e(70);let t=Date.now(),r=globalThis.setInterval(()=>{e(70+24*(1-(1-Math.min((Date.now()-t)/45e3,1))**3))},750);return()=>globalThis.clearInterval(r)}(o?.reportProgress);try{s=await i.generateTryOn({category:n,personImage:c.key,productImages:[d.key]},{timeout:9e4})}finally{p()}o?.reportProgress(96);let h=await go(s);if(h.size<=0)throw Error("AI try-on generation returned an empty image");o?.reportProgress(98);let f=e(h);if(!f)throw Error("AI try-on result image URL cannot be created");return{before:a,after:{blob:h,id:`${a.id}-nano-banana-result`,name:a.name?`${a.name} result`:"AI try-on result",size:h.size,src:f,type:h.type||"image/jpeg"}}}}({createObjectUrl:g,productImageSrc:o,productType:s,tryOnClient:u}),[g,a,o,s,u]),b=(0,A.useCallback)(e=>{if(e){if("request-file-input"===e.type)return void n();r?.()}},[r,n]),w=(0,A.useCallback)(()=>h(),[]),k=(0,A.useCallback)(e=>{let t=e()??null;w(),b(t)},[b,w]),x=(0,A.useCallback)(e=>{v.failHistory(e),w()},[v,w]),S=(0,A.useCallback)(t=>{e.save(t).catch(()=>{x("save-result")})},[e,x]),C=(0,A.useCallback)(t=>{e.delete(t).catch(()=>{x("delete-result")})},[e,x]),P=(0,A.useCallback)(()=>{k(()=>v.choosePhoto())},[k,v]),E=(0,A.useCallback)(async()=>{let e=v.selectedPhoto;if(!e||!v.startGeneration())return;w();let t=Date.now();try{var r;let n=await y(e,{reportProgress:e=>{v.reportGenerationProgress(e),w()}});await gL(t);let a=v.completeGeneration(n);r=f.current,gA(a.before)?.forEach(e=>r.add(e)),gA(a.after)?.forEach(e=>r.add(e)),S(a),w()}catch(e){await gL(t),v.failGeneration(e instanceof Error?e.message:void 0),w()}},[S,y,v,w]),T=(0,A.useCallback)(e=>{let t=v.deleteResult(e);t&&C(t.id),w()},[C,v,w]),R=(0,A.useCallback)(e=>{c.save(v.resolveResultActionPhoto(e))},[c,v]),O=(0,A.useCallback)(e=>{c.share(v.resolveResultActionPhoto(e))},[c,v]),j=(0,A.useCallback)(()=>{u.sendWidgetEvent("add_to_cart_from_widget")},[u]);(0,A.useEffect)(()=>{let t=!1;return async function(){try{let r=await e.list();if(t)return;v.hydrateHistory(r.map(e=>({after:gz(e.after,g),before:gz(e.before,g),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productUrl:e.productUrl}))),w()}catch{t||x("hydrate-history")}}(),()=>{t=!0}},[g,e,x,v,w]),(0,A.useEffect)(()=>()=>{var e,r;e=f.current,r=t.revokeObjectUrl,e.forEach(e=>r(e)),e.clear()},[t]),(0,A.useEffect)(()=>{var e,r,n,a,o;let i;a=f.current,e=v.view,r=v.comparison.result,n=v.history,i=new Set,"photo"in e&&g_(i,e.photo),"result"===e.stage&&(gN(i,e.result),e.resultHistory.forEach(e=>gN(i,e))),n.forEach(e=>gN(i,e)),gN(i,r),o=t.revokeObjectUrl,a.forEach(e=>{i.has(e)||(o(e),a.delete(e))})},[t,v.view,v.comparison.result,v.history]);let z=(0,A.useMemo)(()=>(function(e,{addToCart:t,choosePhoto:r,deleteResult:n,generate:a,runSessionCommand:o,saveResult:i,shareResult:s,sync:l}){let u=e.view;switch(u.stage){case"start":return{...u,choosePhoto:r,openHistory:()=>o(()=>e.openHistory())};case"intro":return{...u,continueIntro:()=>o(()=>e.continueIntro())};case"history":return{...u,chooseNew:r,selectResult:t=>o(()=>e.selectHistoryResult(t))};case"confirm":return{...u,changePhoto:r,generate:a};case"error":return{...u,chooseDifferentPhoto:r,retry:u.photo?a:r};case"result":return{...u,addToCart:t,changePhoto:()=>{e.closeMyFits(),l(),r()},deleteResult:n,openComparison:t=>o(()=>e.openComparison(t)),reset:()=>o(()=>e.reset()),saveResult:i,shareResult:s,toggleMyFits:()=>o(()=>e.toggleMyFits())};default:return u}})(v,{addToCart:j,choosePhoto:P,deleteResult:T,generate:()=>void E(),runSessionCommand:k,saveResult:R,shareResult:O,sync:w}),[j,P,T,E,k,R,v,O,w]);return{canGoBack:"start"!==(p=v.view.stage)&&"intro"!==p&&"processing"!==p&&"error"!==p&&"result"!==p,comparison:function(e,{addToCart:t,deleteResult:r,runSessionCommand:n,saveResult:a,shareResult:o}){let i=e.comparison;return{...i,addToCart:t,close:()=>n(()=>e.closeComparison()),deleteResult:()=>{let e=i.result?.id??i.result?.after.id;e&&r(e)},saveResult:()=>a(i.result?.id??i.result?.after.id),shareResult:()=>o(i.result?.id??i.result?.after.id)}}(v,{addToCart:j,deleteResult:T,runSessionCommand:k,saveResult:R,shareResult:O}),goBack:()=>k(()=>v.goBack()),requestClose:()=>k(()=>v.requestClose()),selectFile:e=>k(()=>{v.selectFile(e)}),view:z}}({onRequestClose:r,onRequestFileInput:()=>h.current?.click(),processPhoto:n,productImageSrc:a,productName:o,productType:i,productUrl:s,tryOnClient:g}),v=m.view.stage,y="result"===m.view.stage&&m.view.myFitsOpen,b=m.canGoBack?(0,_.jsx)(f9,{label:p("back"),onClick:m.goBack}):null,w="result"===m.view.stage&&m.view.canOpenMyFits?(0,_.jsxs)(i9,{"aria-expanded":y,className:"h-9 px-3.5",type:"button",variant:"outline",onClick:m.view.toggleMyFits,children:[p("myFits"),(0,_.jsx)(sX,{className:i1("!size-3 transition-transform",y&&"rotate-180"),"data-icon":"inline-end"})]}):null;return(0,_.jsxs)(fF,{className:y?"h-svh max-h-svh sm:h-230 sm:max-h-[calc(100svh-var(--spacing)*8)]":void 0,"data-ai-try-on-stage":v,children:[(0,_.jsx)(fD,{badge:"history"===v?null:p(function(e){switch(e){case"intro":return"introBadge";case"confirm":return"confirmBadge";case"processing":return"processingBadge";case"error":return"errorBadge";case"result":return"resultBadge";default:return"badge"}}(v)),badgeTone:function(e){switch(e){case"confirm":return"blue";case"result":return"green";case"error":return"red";default:return"gray"}}(v),closeLabel:p("close"),leftSlot:b,middleSlot:w,preferMiddleSlotFirst:"result"===v,showCloseButton:c,onClose:m.requestClose}),(0,_.jsx)("input",{ref:h,accept:"image/jpeg,image/png",className:"hidden",type:"file",onChange:function(e){let t=e.currentTarget.files?.[0];t&&m.selectFile(t),e.currentTarget.value=""}}),(0,_.jsxs)(f$,{children:["start"===m.view.stage?(0,_.jsx)(fQ,{view:m.view}):null,"intro"===m.view.stage?(0,_.jsx)(fZ,{view:m.view}):null,"history"===m.view.stage?(0,_.jsx)(fJ,{view:m.view}):null,"confirm"===m.view.stage?(0,_.jsx)(f0,{view:m.view}):null,"processing"===m.view.stage?(0,_.jsx)(f1,{view:m.view}):null,"error"===m.view.stage?(0,_.jsx)(f2,{view:m.view}):null,"result"===m.view.stage?(0,_.jsx)(f3,{view:m.view}):null]},v),m.comparison.open&&(0,_.jsx)(fL,{productName:m.comparison.productName,productUrl:m.comparison.productUrl,portalContainer:e??void 0,result:m.comparison.result,onAddToCart:m.comparison.addToCart,onClose:m.comparison.close,onDeleteResult:m.comparison.deleteResult,onSaveResult:m.comparison.saveResult,onShareResult:m.comparison.shareResult})]})}function gM({defaultOpen:e=!1,language:t,onOpenChange:r,open:n,productImageSrc:a,productName:o,productType:i,productUrl:s,apiKey:l,...u}){sG(i);let c=(0,A.useMemo)(()=>{let e;return(e=rs.createInstance()).use(oa).use(rR).init({defaultNS:"ns1",fallbackLng:"en",interpolation:{escapeValue:!1},lng:t,resources:sV}),e},[t]),[d,p]=(0,A.useState)(null),[h,f]=(0,A.useState)(e),g=(0,A.useRef)(!1),m=void 0!==n,v=m?n:h,y=sN(l),b=(0,A.useMemo)(()=>s$({apiKey:y}),[y]);function w(e){m||f(e),r?.(e)}return(0,A.useEffect)(()=>{if(!v){g.current=!1;return}g.current||(g.current=!0,b.sendWidgetEvent("widget_opened"))},[v,b]),(0,_.jsxs)(_.Fragment,{children:[(0,W.createPortal)((0,_.jsx)("style",{children:sc.A}),document.head),(0,W.createPortal)((0,_.jsxs)(rK.div,{className:"fixed inset-x-0 bottom-0 w-svw tracking-normal sm:inset-x-auto sm:right-4 sm:bottom-4 sm:w-120",style:{zIndex:0x7fffffff},children:[(0,_.jsx)("style",{children:sH}),(0,_.jsx)("div",{ref:p}),d&&(0,_.jsx)(su,{defaultTheme:"light",root:d,storageKey:"neurodyn-ai-try-on-theme",children:(0,_.jsx)(rT,{i18n:c,children:(0,_.jsx)(gF,{language:t,open:v,portalContainer:d,productImageSrc:a,productName:o,productType:i,productUrl:s,tryOnClient:b,onRequestClose:()=>w(!1),onOpenChange:w,...u})})})]}),document.body)]})}function gF({language:e,onRequestClose:t,portalContainer:r,productImageSrc:n,productName:a,productType:o,productUrl:i,tryOnClient:s,...l}){let{t:u}=rE();return(0,_.jsx)(st,{...l,children:(0,_.jsxs)(sa,{className:"inset-x-0 bottom-0 top-auto block max-h-svh w-svw max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-t-3xl rounded-b-none p-0 sm:inset-x-auto sm:right-4 sm:bottom-4 sm:left-auto sm:max-h-230 sm:w-120 sm:max-w-120 sm:rounded-3xl sm:p-0",contentInsideOverlay:!0,portalContainer:r,showCloseButton:!1,onInteractOutside:e=>{e.preventDefault()},children:[(0,_.jsxs)(so,{className:"sr-only",children:[(0,_.jsx)(si,{children:u("dialogTitle")}),(0,_.jsx)(ss,{children:u("dialogDescription")})]}),(0,_.jsx)(gI,{dialogPortalContainer:r,language:e,productImageSrc:n,productName:a,productType:o,productUrl:i,tryOnClient:s,showDialogCloseButton:!0,onClose:t})]})})}sk({baseURL:"https://api.neurodyn.ai/"});var gD=r("../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js");let gB=0;class g${container=null;openState=!1;props=null;root=null;destroy(){this.root?.unmount(),this.root=null,this.container?.remove(),this.container=null,this.props=null,this.openState=!1}open(e){this.props=e,this.openState=!0,this.render()}handleOpenChange=e=>{this.openState=e,this.render()};ensureRoot(){return this.root||(this.container=document.createElement("div"),this.container.id=`neurodyn-ai-try-on-dialog-root-${gB++}`,document.body.appendChild(this.container),this.root=(0,gD.createRoot)(this.container)),this.root}render(){let e=this.ensureRoot();this.props&&this.openState?e.render((0,A.createElement)(gM,{...this.props,open:!0,onOpenChange:this.handleOpenChange})):e.render(null)}}let gV="data-neurodyn-ai-try-on-product-type";function gU(e,t){let r=e.getAttribute(t);return r&&r.trim().length>0?r:void 0}function gH(e,t){let r=gU(e,t);if(!r)throw Error(`AI try-on dialog trigger is missing ${t}`);return r}class gW{destroyed=!1;props;renderer=new g$;triggers;constructor(e,t={}){for(const r of(this.triggers="string"==typeof e?Array.from(document.querySelectorAll(e)):[e],this.props=t,this.triggers))r.addEventListener("click",this.handleClick)}destroy(){if(!this.destroyed){for(let e of(this.destroyed=!0,this.triggers))e.removeEventListener("click",this.handleClick);this.renderer.destroy()}}handleClick=e=>{!this.destroyed&&e.currentTarget instanceof Element&&this.renderer.open(function(e,t={}){var r,n;let a;return{language:void 0!==t.language?t.language:(r="data-neurodyn-ai-try-on-language","en"===(a=e.getAttribute(r))||"ru"===a?a:void 0),productImageSrc:void 0!==t.productImageSrc?t.productImageSrc:gH(e,"data-neurodyn-ai-try-on-product-image-src"),productName:void 0!==t.productName?t.productName:gH(e,"data-neurodyn-ai-try-on-product-name"),productUrl:void 0!==t.productUrl?t.productUrl:gU(e,"data-neurodyn-ai-try-on-product-url"),productType:function(e){if(!sK(e)){let t="string"==typeof e&&e.length>0?` "${e}"`:"";throw Error(`AI try-on product type from ${gV} must be one of: ${sW.join(", ")}; received${t||" no value"}`)}return e}(void 0!==t.productType?t.productType:e.getAttribute(gV)),apiKey:(n=void 0!==t.apiKey?t.apiKey:e.getAttribute("data-neurodyn-ai-try-on-api-key"),n?.trim()||void 0)}}(e.currentTarget,this.props))}}window.AiTryOnDialog=gW})()})();
|
|
5490
|
+
Defaulting to \`null\`.`));let c=fb(o,u)?o:null,d=fv(c)?s(c,u):void 0;return(0,_.jsx)(fc,{scope:a,value:c,max:u,children:(0,_.jsx)(fi.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":fv(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":fm(c,u),"data-value":c??void 0,"data-max":u,...l,ref:t})})});fp.displayName=fs;var fh="ProgressIndicator",ff=A.forwardRef((e,t)=>{let{__scopeProgress:r,...n}=e,a=fd(fh,r);return(0,_.jsx)(fi.div,{"data-state":fm(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});function fg(e,t){return`${Math.round(e/t*100)}%`}function fm(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function fv(e){return"number"==typeof e}function fy(e){return fv(e)&&!isNaN(e)&&e>0}function fb(e,t){return fv(e)&&!isNaN(e)&&e<=t&&e>=0}function fw({className:e,value:t,max:r=100,...n}){let a=r>0?r:100,o="number"==typeof t?Math.min(Math.max(t/a*100,0),100):0;return(0,_.jsx)(fp,{"data-slot":"progress",className:i1("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),value:t,max:a,...n,children:(0,_.jsx)(ff,{"data-slot":"progress-indicator",className:"h-full bg-primary transition-[width]",style:{width:`${o}%`}})})}function fk(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:(0,_.jsx)("path",{d:"M8.21723 14.9975C8.10298 14.997 7.99004 14.9731 7.8854 14.9272C7.78077 14.8814 7.68665 14.8145 7.60889 14.7308L3.55889 10.4225C3.4075 10.2611 3.3264 10.0463 3.33343 9.82513C3.34046 9.604 3.43505 9.39471 3.59639 9.24332C3.75773 9.09192 3.97261 9.01082 4.19374 9.01785C4.41488 9.02489 4.62417 9.11948 4.77556 9.28082L8.20889 12.9392L15.2172 5.27248C15.2883 5.18392 15.3768 5.11083 15.4772 5.0577C15.5776 5.00458 15.6878 4.97254 15.8011 4.96355C15.9143 4.95456 16.0282 4.96882 16.1357 5.00544C16.2432 5.04207 16.3421 5.10029 16.4263 5.17652C16.5105 5.25276 16.5782 5.3454 16.6253 5.44877C16.6724 5.55213 16.6979 5.66403 16.7001 5.7776C16.7024 5.89116 16.6815 6.00399 16.6385 6.10916C16.5956 6.21433 16.5316 6.30961 16.4506 6.38915L8.83389 14.7225C8.75686 14.8077 8.66308 14.8761 8.55841 14.9234C8.45373 14.9707 8.34042 14.996 8.22556 14.9975H8.21723Z",fill:"currentColor"})})}function fx(e){return(0,_.jsxs)("svg",{fill:"none",viewBox:"0 0 19.9993 19.9996",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,_.jsx)("path",{d:"M16 9C16 7.14348 15.2629 5.36256 13.9502 4.0498C12.6374 2.73705 10.8565 2 9 2C7.14348 2 5.36256 2.73705 4.0498 4.0498C2.73705 5.36256 2 7.14348 2 9C2 10.8565 2.73705 12.6374 4.0498 13.9502C5.36256 15.2629 7.14348 16 9 16C10.8565 16 12.6374 15.2629 13.9502 13.9502C15.2629 12.6374 16 10.8565 16 9ZM18 9C18 11.3869 17.0521 13.6764 15.3643 15.3643C13.6764 17.0521 11.3869 18 9 18C6.61305 18 4.32357 17.0521 2.63574 15.3643C0.947915 13.6764 0 11.3869 0 9C0 6.61305 0.947915 4.32357 2.63574 2.63574C4.32357 0.947915 6.61305 0 9 0C11.3869 0 13.6764 0.947915 15.3643 2.63574C17.0521 4.32357 18 6.61305 18 9Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M13.9428 13.943C14.3333 13.5525 14.9663 13.5525 15.3568 13.943L19.7064 18.2926C20.097 18.6832 20.097 19.3162 19.7064 19.7067C19.3159 20.0972 18.6829 20.0972 18.2924 19.7067L13.9428 15.3571C13.5522 14.9666 13.5522 14.3335 13.9428 13.943Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M7.99983 12.0001V6.00008C7.99983 5.4478 8.44755 5.00008 8.99983 5.00008C9.55211 5.00008 9.99983 5.4478 9.99983 6.00008V12.0001C9.99983 12.5524 9.55211 13.0001 8.99983 13.0001C8.44755 13.0001 7.99983 12.5524 7.99983 12.0001Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M11.9998 8.00008C12.5521 8.00008 12.9998 8.4478 12.9998 9.00008C12.9998 9.55237 12.5521 10.0001 11.9998 10.0001H5.99983C5.44755 10.0001 4.99983 9.55237 4.99983 9.00008C4.99983 8.4478 5.44755 8.00008 5.99983 8.00008H11.9998Z",fill:"currentColor"})]})}function fS({children:e,className:t,...r}){return(0,_.jsx)("div",{className:i1("relative h-82 w-full overflow-hidden rounded-xl bg-background-base sm:h-100",t),...r,children:e})}function fC({className:e,src:t}){return(0,_.jsxs)(_.Fragment,{children:[t&&(0,_.jsx)("img",{"aria-hidden":"true",className:i1("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:t}),(0,_.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"})]})}function fP({backdropClassName:e,className:t,fallbackSrc:r,imageClassName:n,photo:a}){let o=a?.src??r;function i(e){r&&(e.currentTarget.src=r)}return(0,_.jsxs)(_.Fragment,{children:[o&&(0,_.jsx)("img",{"aria-hidden":"true",className:i1("absolute inset-0 size-full scale-125 object-cover blur-3xl",t,e),src:o,onError:i}),(0,_.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"}),o&&(0,_.jsx)("img",{alt:a?.name??"",className:i1("absolute inset-0 size-full object-contain",t,n),src:o,onError:i})]})}function fE({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return(0,_.jsxs)(_.Fragment,{children:[n&&(0,_.jsx)("img",{"aria-hidden":"true",className:i1("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}),(0,_.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/20"})]})}function fT({className:e,...t}){let r=(0,A.useId)().replace(/:/g,""),n=`${r}-loading-texture-gradient`,a=`${r}-loading-texture-pattern`,o=`${r}-loading-texture-mask`;return(0,_.jsxs)("svg",{className:i1("text-constant-white",e),fill:"none",focusable:"false",viewBox:"0 0 776 992",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,_.jsxs)("defs",{children:[(0,_.jsxs)("radialGradient",{id:n,cx:"0",cy:"0",gradientTransform:"translate(388 496) rotate(90) scale(1021)",gradientUnits:"userSpaceOnUse",r:"1",children:[(0,_.jsx)("stop",{stopColor:"currentColor",stopOpacity:"0.7"}),(0,_.jsx)("stop",{offset:"0.586538",stopColor:"currentColor",stopOpacity:"0"})]}),(0,_.jsx)("pattern",{id:a,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:(0,_.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"currentColor"})}),(0,_.jsx)("mask",{id:o,children:(0,_.jsx)("rect",{width:"776",height:"992",fill:`url(#${a})`})})]}),(0,_.jsx)("rect",{width:"776",height:"992",fill:`url(#${n})`,mask:`url(#${o})`})]})}function fR({animated:e=!1,className:t,...r}){return(0,_.jsxs)("div",{"aria-hidden":"true",className:i1("absolute h-133 w-104 max-w-none",t),...r,children:[!e&&(0,_.jsx)(fT,{className:"absolute inset-0 size-full opacity-30"}),e&&(0,_.jsx)("span",{className:"absolute inset-0 [mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [mask-position:center] [mask-repeat:no-repeat] [mask-size:18%_18%] [-webkit-mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [-webkit-mask-position:center] [-webkit-mask-repeat:no-repeat] [-webkit-mask-size:18%_18%] animate-[ai-try-on-loading-texture-pulse_2.6s_linear_infinite] motion-reduce:animate-none motion-reduce:[mask-size:220%_220%] motion-reduce:[-webkit-mask-size:220%_220%]",children:(0,_.jsx)(fT,{className:"absolute inset-0 size-full opacity-70"})})]})}function fO({badge:e,className:t,fallbackSrc:r,photo:n,selected:a,...o}){return(0,_.jsxs)("button",{className:i1("group relative aspect-square w-full overflow-hidden rounded-xl bg-background-base-2 text-left ring-offset-2 transition","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground",a?"ring-2 ring-foreground":null,t),type:"button",...o,children:[n?.src?(0,_.jsx)("img",{alt:n.name??"",className:"size-full object-cover",src:n.src}):r?(0,_.jsx)("img",{alt:"",className:"size-full object-cover",src:r}):null,a&&(0,_.jsx)("span",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full bg-foreground text-background-containers",children:(0,_.jsx)(fk,{className:"size-4"})}),e&&(0,_.jsx)("span",{className:"absolute right-2 top-2",children:e})]})}function fj({className:e,label:t,progress:r=0,...n}){let a=Math.min(Math.max(r,0),100);return(0,_.jsxs)("div",{className:i1("rounded-xl bg-background-base px-6 py-8",e),...n,children:[(0,_.jsxs)("div",{className:"mb-2 flex items-center justify-between text-sm font-medium text-text-sub",children:[(0,_.jsx)("span",{children:t}),(0,_.jsxs)("span",{children:[Math.round(a),"%"]})]}),(0,_.jsx)(fw,{className:"h-1 bg-background-base-3 [&_[data-slot=progress-indicator]]:bg-background-dark",value:a})]})}function fz({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return n?(0,_.jsx)("img",{alt:r?.name??"",className:i1("absolute left-1/2 top-0 h-full w-69 -translate-x-1/2 object-cover",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}):null}function fN({className:e,imageSrc:t,name:r}){return t?(0,_.jsx)("img",{alt:r??"",className:i1("absolute bottom-2 left-2 h-30 w-auto rounded-xl border border-background-containers bg-background-containers object-contain shadow-md",e),src:t}):null}function f_({good:e,imageSrc:t,label:r}){return(0,_.jsxs)("figure",{className:"flex min-w-0 flex-col items-start gap-2",children:[(0,_.jsxs)("div",{className:"relative aspect-square w-full overflow-hidden rounded-xl border border-border-light bg-background-base",children:[(0,_.jsx)("img",{alt:r,className:"size-full object-cover",src:t}),(0,_.jsx)("span",{className:i1("absolute right-2 top-2 flex size-7 items-center justify-center rounded-full",e?"bg-background-green":"bg-background-red"),children:e?(0,_.jsx)(fk,{className:"size-5 text-background-containers"}):(0,_.jsx)(h7,{className:"size-5 text-background-containers"})})]}),(0,_.jsx)("figcaption",{className:"w-[90%] break-words text-xs font-medium leading-[1.6] tracking-[0.02em] text-text-base",children:r})]})}function fA({className:e,onOpenComparison:t,productLabel:r,productUrl:n,result:a,zoomLabel:o}){let i="inline-flex h-8 min-w-0 max-w-52 flex-1 items-center justify-center gap-1.5 rounded-xl bg-button-light px-3 text-xs font-semibold text-text-dark";return(0,_.jsxs)(fS,{"aria-label":o,className:i1("block cursor-pointer text-left",e),role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},children:[(0,_.jsx)(fP,{photo:a?.after}),(0,_.jsxs)("div",{className:"absolute bottom-2 left-2 right-2 flex items-center justify-between gap-2",children:[n?(0,_.jsxs)("a",{className:i,href:n,onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(fr,{"aria-hidden":"true",className:"size-4"}),(0,_.jsx)("span",{className:"truncate",children:r})]}):(0,_.jsxs)("span",{className:i,children:[(0,_.jsx)(fr,{"aria-hidden":"true",className:"size-4"}),(0,_.jsx)("span",{className:"truncate",children:r})]}),(0,_.jsx)("button",{"aria-label":o,className:"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full bg-button-light text-text-dark",type:"button",onClick:e=>{e.stopPropagation(),t()},children:(0,_.jsx)(fx,{"aria-hidden":"true",className:"size-3.5"})})]})]})}function fL({onAddToCart:e,onClose:t,onDeleteResult:r,onSaveResult:n,onShareResult:a,portalContainer:o,productName:i,productPrice:s,productUrl:l,result:u}){var c;let{t:d}=rE(),p=i??d("resultProductLink"),h=(c=s,c?.trim()||void 0),f=h?d("resultTryAnotherWithPrice",{price:h}):d("resultTryAnother");return(0,_.jsx)(st,{open:!0,onOpenChange:e=>!e&&t(),children:(0,_.jsxs)(sa,{className:"dark fixed inset-0 left-0 top-0 flex h-svh max-h-none w-svw max-w-none translate-x-0 translate-y-0 flex-col rounded-none bg-[#212124E5] p-0 text-text-dark duration-200 sm:max-w-none sm:p-0",portalContainer:o,showCloseButton:!1,children:[(0,_.jsxs)(so,{className:"sr-only",children:[(0,_.jsx)(si,{children:d("comparisonTitle")}),(0,_.jsx)(ss,{children:d("comparisonSlider")})]}),(0,_.jsxs)("div",{className:"flex h-23 shrink-0 items-center justify-between px-8 py-6",children:[l?(0,_.jsx)(i9,{asChild:!0,className:"max-w-80",size:"lg",variant:"outline",children:(0,_.jsxs)("a",{href:l,children:[(0,_.jsx)(fr,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:p})]})}):(0,_.jsxs)(i9,{className:"max-w-80",size:"lg",type:"button",variant:"outline",children:[(0,_.jsx)(fr,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:p})]}),(0,_.jsx)(i9,{"aria-label":d("close"),size:"icon-lg",type:"button",variant:"outline",onClick:t,children:(0,_.jsx)(h7,{className:"!size-3","data-icon":"inline-start"})})]}),(0,_.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center px-8",children:(0,_.jsxs)(h9,{"aria-label":d("comparisonSlider"),className:"h-full max-h-179 w-full max-w-143 bg-background-base-2",children:[(0,_.jsx)(h4,{position:"right",children:(0,_.jsx)(fz,{className:"w-full object-contain",photo:u?.after})}),(0,_.jsx)(h4,{position:"left",children:(0,_.jsx)(fz,{className:"w-full object-contain",photo:u?.before})}),(0,_.jsxs)(h6,{className:"w-11",children:[(0,_.jsx)("div",{className:"absolute left-1/2 h-full w-0.5 -translate-x-1/2 bg-constant-white"}),(0,_.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-constant-white text-constant-black shadow-lg",children:(0,_.jsx)("span",{className:"h-5 w-0.5 rounded-full bg-current"})})]})]})}),(0,_.jsx)("div",{className:"flex h-23 shrink-0 items-center justify-center px-8 pb-6 pt-3",children:(0,_.jsxs)("div",{className:"flex w-full max-w-104 items-start gap-2",children:[(0,_.jsxs)(i9,{className:"min-w-0 flex-1",size:"lg",type:"button",variant:"contrast",onClick:e,children:[(0,_.jsx)(h8,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:f})]}),(0,_.jsx)(i9,{"aria-label":d("share"),size:"icon-lg",type:"button",variant:"outline",onClick:a,children:(0,_.jsx)(fn,{"data-icon":"inline-start"})}),(0,_.jsx)(i9,{"aria-label":d("download"),size:"icon-lg",type:"button",variant:"outline",onClick:n,children:(0,_.jsx)(fe,{"data-icon":"inline-start"})}),(0,_.jsx)(i9,{"aria-label":d("reset"),size:"icon-lg",type:"button",variant:"outline",onClick:function(){r()},children:(0,_.jsx)(ft,{"data-icon":"inline-start"})})]})})]})})}ff.displayName=fh;let fI=i3("inline-flex w-fit items-center justify-center overflow-hidden rounded-full whitespace-nowrap",{variants:{variant:{default:"bg-contrast text-contrast-foreground",secondary:"bg-[var(--color-background-gray-transparent)] text-text-base",positive:"bg-[var(--color-background-green-transparent)] text-text-green",negative:"bg-[var(--color-background-red-transparent)] text-text-red",standard:"bg-[var(--color-background-blue-transparent)] text-text-blue"},size:{sm:"h-6 px-2 typo-button-small",md:"h-[30px] px-3 typo-button-normal"}},defaultVariants:{variant:"default",size:"sm"}});function fM({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,_.jsx)(n?oJ:"span",{"data-slot":"badge",className:i1(fI({variant:t,size:r,className:e})),...a})}function fF({className:e,...t}){return(0,_.jsx)("div",{className:i1("flex max-h-svh w-svw flex-col overflow-hidden rounded-t-3xl rounded-b-none bg-background-containers text-foreground shadow-2xl sm:max-h-[min(calc(100svh-var(--spacing)*8),--spacing(176))] sm:w-120 sm:rounded-3xl",e),...t})}function fD({badge:e,badgeTone:t="gray",className:r,closeLabel:n,leftSlot:a,middleSlot:o,onClose:i,preferMiddleSlotFirst:s=!1,showCloseButton:l=!1,...u}){let c=e?(0,_.jsx)(fB,{tone:t,children:e}):null;return(0,_.jsxs)("div",{className:i1("flex h-17 items-center justify-between p-4",r),...u,children:[(0,_.jsxs)("div",{className:"flex items-center gap-2",children:[a,s?o:c,s?c:o]}),l&&(0,_.jsx)(i9,{"aria-label":n,size:"icon",type:"button",variant:"outline",onClick:i,children:(0,_.jsx)(h7,{"data-icon":"inline-start"})})]})}function fB({className:e,tone:t="gray",...r}){return(0,_.jsx)(fM,{className:e,size:"md",variant:"blue"===t?"standard":"green"===t?"positive":"red"===t?"negative":"secondary",...r})}function f$({className:e,...t}){return(0,_.jsx)("div",{className:i1("flex min-h-0 flex-1 flex-col animate-in fade-in-0 duration-100 motion-reduce:animate-none",e),...t})}function fV(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,_.jsx)("path",{d:"M21.1667 8.4C21.1667 8.16131 21.07 7.93245 20.8981 7.76367C20.7262 7.59489 20.4931 7.5 20.25 7.5H16.5833C16.2768 7.5 15.9906 7.3496 15.8206 7.09922L14.2594 4.8H9.74056L8.17936 7.09922C8.00935 7.3496 7.72316 7.5 7.41667 7.5H3.75C3.50688 7.5 3.2738 7.59489 3.10189 7.76367C2.92998 7.93245 2.83333 8.16131 2.83333 8.4V18.3C2.83333 18.5387 2.92998 18.7675 3.10189 18.9363C3.2738 19.1051 3.50689 19.2 3.75 19.2H20.25C20.4931 19.2 20.7262 19.1051 20.8981 18.9363C21.07 18.7675 21.1667 18.5387 21.1667 18.3V8.4ZM14.75 12.9C14.75 12.184 14.46 11.4973 13.9443 10.991C13.4287 10.4847 12.7292 10.2001 12 10.2C11.2707 10.2 10.5705 10.4847 10.0548 10.991C9.53923 11.4973 9.25 12.1841 9.25 12.9C9.25 13.6159 9.53923 14.3027 10.0548 14.809C10.5705 15.3153 11.2707 15.6 12 15.6C12.7292 15.5999 13.4287 15.3153 13.9443 14.809C14.46 14.3027 14.75 13.616 14.75 12.9ZM16.5833 12.9C16.5833 14.0934 16.1 15.2377 15.2406 16.0816C14.3811 16.9255 13.2155 17.3999 12 17.4C10.7844 17.4 9.61809 16.9256 8.75854 16.0816C7.89919 15.2378 7.41667 14.0933 7.41667 12.9C7.41667 11.7067 7.89919 10.5622 8.75854 9.71836C9.61809 8.87445 10.7844 8.4 12 8.4C13.2155 8.40008 14.3811 8.87452 15.2406 9.71836C16.1 10.5623 16.5833 11.7066 16.5833 12.9ZM23 18.3C23 19.0161 22.7101 19.7026 22.1943 20.209C21.6786 20.7153 20.9793 21 20.25 21H3.75C3.02065 21 2.32139 20.7153 1.80566 20.209C1.28994 19.7026 1 19.0161 1 18.3V8.4C1 7.68392 1.28994 6.99736 1.80566 6.49102C2.32139 5.98467 3.02065 5.7 3.75 5.7H6.92611L8.4873 3.40078L8.55623 3.31201C8.72911 3.11535 8.98172 3 9.25 3H14.75L14.8637 3.00703C15.1262 3.03922 15.3639 3.18167 15.5127 3.40078L17.0739 5.7H20.25C20.9793 5.7 21.6786 5.98467 22.1943 6.49102C22.7101 6.99736 23 7.68392 23 8.4V18.3Z",fill:"currentColor"})})}function fU(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5.00342 8.37303",fill:"none",...e,children:(0,_.jsx)("path",{d:"M1 1L4.00342 4.18652L1 7.37303",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function fH(e){return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,_.jsx)("path",{d:"M18 3H6C5.20435 3 4.44129 3.31607 3.87868 3.87868C3.31607 4.44129 3 5.20435 3 6V18C3 18.7956 3.31607 19.5587 3.87868 20.1213C4.44129 20.6839 5.20435 21 6 21H18C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18V6C21 5.20435 20.6839 4.44129 20.1213 3.87868C19.5587 3.31607 18.7956 3 18 3ZM6 5H18C18.2652 5 18.5196 5.10536 18.7071 5.29289C18.8946 5.48043 19 5.73478 19 6V14.36L15.8 11.63C15.3042 11.222 14.6821 10.999 14.04 10.999C13.3979 10.999 12.7758 11.222 12.28 11.63L5 17.7V6C5 5.73478 5.10536 5.48043 5.29289 5.29289C5.48043 5.10536 5.73478 5 6 5ZM18 19H6.56L13.56 13.16C13.6945 13.0602 13.8575 13.0062 14.025 13.0062C14.1925 13.0062 14.3555 13.0602 14.49 13.16L19 17V18C19 18.2652 18.8946 18.5196 18.7071 18.7071C18.5196 18.8946 18.2652 19 18 19Z",fill:"currentColor"}),(0,_.jsx)("path",{d:"M7.99983 9.99992C8.39766 9.99992 8.77919 9.84188 9.06049 9.56058C9.34179 9.27927 9.49983 8.89774 9.49983 8.49992C9.49983 8.10209 9.34179 7.72056 9.06049 7.43925C8.77919 7.15795 8.39766 6.99992 7.99983 6.99992C7.60201 6.99992 7.22047 7.15795 6.93917 7.43925C6.65787 7.72056 6.49983 8.10209 6.49983 8.49992C6.49983 8.89774 6.65787 9.27927 6.93917 9.56058C7.22047 9.84188 7.60201 9.99992 7.99983 9.99992Z",fill:"currentColor"})]})}function fW(e){return(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 3C18.7956 3 19.5585 3.3163 20.1211 3.87891C20.6837 4.44152 21 5.20435 21 6V18C21 18.7956 20.6837 19.5585 20.1211 20.1211C19.5585 20.6837 18.7956 21 18 21H6C5.20435 21 4.44152 20.6837 3.87891 20.1211C3.3163 19.5585 3 18.7956 3 18V6C3 5.20435 3.3163 4.44152 3.87891 3.87891C4.44152 3.3163 5.20435 3 6 3H18ZM14.0352 12C13.8633 12 13.6974 12.0639 13.5703 12.1797L6 19H18C18.2876 18.977 18.5547 18.8414 18.7422 18.6221C18.9296 18.4028 19.0221 18.1177 19 17.8301V16.6602L14.5 12.1797C14.3729 12.0639 14.2071 12 14.0352 12ZM8 7C7.60218 7 7.22076 7.15815 6.93945 7.43945C6.65815 7.72076 6.5 8.10218 6.5 8.5C6.5 8.89782 6.65815 9.27924 6.93945 9.56055C7.22076 9.84185 7.60218 10 8 10C8.39782 10 8.77924 9.84185 9.06055 9.56055C9.34185 9.27924 9.5 8.89782 9.5 8.5C9.5 8.10218 9.34185 7.72076 9.06055 7.43945C8.77924 7.15815 8.39782 7 8 7Z",fill:"currentColor"})})}function fq(e){return(0,_.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,_.jsx)("path",{d:"M6.05944 11.1406C6.47507 8.23438 8.97819 6 12.0001 6C13.6563 6 15.1563 6.67187 16.2438 7.75625L16.2626 7.775L16.5001 8H15.0032C14.4501 8 14.0032 8.44687 14.0032 9C14.0032 9.55313 14.4501 10 15.0032 10H19.0032C19.5563 10 20.0032 9.55313 20.0032 9V5C20.0032 4.44688 19.5563 4 19.0032 4C18.4501 4 18.0032 4.44688 18.0032 5V6.66875L17.6501 6.33437C16.2032 4.89375 14.2032 4 12.0001 4C7.96882 4 4.63444 6.98125 4.08132 10.8594C4.00319 11.4062 4.38132 11.9125 4.92819 11.9906C5.47507 12.0688 5.98132 11.6875 6.05944 11.1438V11.1406ZM19.9188 13.1406C19.9969 12.5938 19.6157 12.0875 19.0719 12.0094C18.5282 11.9312 18.0188 12.3125 17.9407 12.8562C17.5251 15.7625 15.0219 17.9969 12.0001 17.9969C10.3438 17.9969 8.84382 17.325 7.75632 16.2406L7.73757 16.2219L7.50007 15.9969H8.99694C9.55007 15.9969 9.99694 15.55 9.99694 14.9969C9.99694 14.4437 9.55007 13.9969 8.99694 13.9969L5.00007 14C4.73444 14 4.47819 14.1063 4.29069 14.2969C4.10319 14.4875 3.99694 14.7406 4.00007 15.0094L4.03132 18.9781C4.03444 19.5312 4.48757 19.975 5.04069 19.9688C5.59382 19.9625 6.03757 19.5125 6.03132 18.9594L6.01882 17.35L6.35319 17.6656C7.80007 19.1062 9.79694 20 12.0001 20C16.0313 20 19.3657 17.0187 19.9188 13.1406Z",fill:"currentColor"})})}function fK({className:e,...t}){return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:i1("size-6",e),...t,children:[(0,_.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,_.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 fG={privacy:"https://vizbl.com/legal/privacy-policy",terms:"https://vizbl.com/legal/terms-of-use"},fX={privacy:"https://arizo.ru/privacy-policy/",terms:"https://arizo.ru/terms-of-use/"},fY={bag:{cards:[{good:!0,imageSrc:ol,labelKey:"bagIntroGoodFullBody"},{good:!0,imageSrc:os,labelKey:"bagIntroGoodAngle"},{good:!1,imageSrc:oi,labelKey:"bagIntroBadHandsFull"},{good:!1,imageSrc:oo,labelKey:"bagIntroBadCropped"}],subtitleKey:"bagIntroSubtitle",titleKey:"bagIntroTitle"},eyewear:{cards:[{good:!0,imageSrc:od,labelKey:"eyewearIntroGoodFacingCamera"},{good:!0,imageSrc:op,labelKey:"eyewearIntroGoodHairBack"},{good:!1,imageSrc:oc,labelKey:"eyewearIntroBadWearingGlasses"},{good:!1,imageSrc:ou,labelKey:"eyewearIntroBadFaceTurned"}],subtitleKey:"eyewearIntroSubtitle",titleKey:"eyewearIntroTitle"},footwear:{cards:[{good:!0,imageSrc:om,labelKey:"footwearIntroGoodStanding"},{good:!0,imageSrc:og,labelKey:"footwearIntroGoodKneesDown"},{good:!1,imageSrc:of,labelKey:"footwearIntroBadOneFootCropped"},{good:!1,imageSrc:oh,labelKey:"footwearIntroBadFeetHidden"}],subtitleKey:"footwearIntroSubtitle",titleKey:"footwearIntroTitle"},"full-body":{cards:[{good:!0,imageSrc:ow,labelKey:"fullBodyIntroGoodHeadToToe"},{good:!0,imageSrc:ob,labelKey:"fullBodyIntroGoodAngle"},{good:!1,imageSrc:ov,labelKey:"fullBodyIntroBadCropped"},{good:!1,imageSrc:oy,labelKey:"fullBodyIntroBadSitting"}],subtitleKey:"fullBodyIntroSubtitle",titleKey:"fullBodyIntroTitle"},headwear:{cards:[{good:!0,imageSrc:oC,labelKey:"headwearIntroGoodFront"},{good:!0,imageSrc:oS,labelKey:"headwearIntroGoodAngle"},{good:!1,imageSrc:ox,labelKey:"headwearIntroBadWearingHat"},{good:!1,imageSrc:ok,labelKey:"headwearIntroBadCroppedHead"}],subtitleKey:"headwearIntroSubtitle",titleKey:"headwearIntroTitle"},"lower-body":{cards:[{good:!0,imageSrc:oR,labelKey:"lowerBodyIntroGoodWaistToFeet"},{good:!0,imageSrc:oT,labelKey:"lowerBodyIntroGoodFullBody"},{good:!1,imageSrc:oE,labelKey:"lowerBodyIntroBadSitting"},{good:!1,imageSrc:oP,labelKey:"lowerBodyIntroBadCoveredWaist"}],subtitleKey:"lowerBodyIntroSubtitle",titleKey:"lowerBodyIntroTitle"},neck:{cards:[{good:!0,imageSrc:oz,labelKey:"neckIntroGoodHairUp"},{good:!0,imageSrc:oN,labelKey:"neckIntroGoodOpenNeckline"},{good:!1,imageSrc:oO,labelKey:"neckIntroBadHairCovering"},{good:!1,imageSrc:oj,labelKey:"neckIntroBadHighCollar"}],subtitleKey:"neckIntroSubtitle",titleKey:"neckIntroTitle"},"upper-body":{cards:[{good:!0,imageSrc:oI,labelKey:"upperBodyIntroGoodFacingCamera"},{good:!0,imageSrc:oL,labelKey:"upperBodyIntroGoodAngle"},{good:!1,imageSrc:o_,labelKey:"upperBodyIntroBadArmsCrossed"},{good:!1,imageSrc:oA,labelKey:"upperBodyIntroBadObjectBlockingTorso"}],subtitleKey:"upperBodyIntroSubtitle",titleKey:"upperBodyIntroTitle"},waist:{cards:[{good:!0,imageSrc:oD,labelKey:"waistIntroGoodFullBody"},{good:!0,imageSrc:oB,labelKey:"waistIntroGoodTopTucked"},{good:!1,imageSrc:oM,labelKey:"waistIntroBadOversizedTop"},{good:!1,imageSrc:oF,labelKey:"waistIntroBadSitting"}],subtitleKey:"waistIntroSubtitle",titleKey:"waistIntroTitle"},wrist:{cards:[{good:!0,imageSrc:oU,labelKey:"wristIntroGoodCloseUp"},{good:!0,imageSrc:oH,labelKey:"wristIntroGoodSleeveBack"},{good:!1,imageSrc:o$,labelKey:"wristIntroBadClenchedFist"},{good:!1,imageSrc:oV,labelKey:"wristIntroBadCovered"}],subtitleKey:"wristIntroSubtitle",titleKey:"wristIntroTitle"}};function fQ({view:e}){let{t}=rE(),r=fY[e.productType];return(0,_.jsxs)(f4,{title:t("startTitle"),subtitle:t(r.titleKey),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fC,{src:e.productImageSrc}),(0,_.jsx)(fz,{fallbackSrc:e.productImageSrc})]}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.choosePhoto,children:[(0,_.jsx)(fV,{"data-icon":"inline-start"}),t("startUpload")]}),(0,_.jsxs)(i9,{className:"w-full",disabled:!e.canOpenHistory,size:"lg",type:"button",variant:"outline",onClick:e.openHistory,children:[(0,_.jsx)(fW,{"data-icon":"inline-start"}),t("startHistory")]}),(0,_.jsx)(f8,{})]})]})}function fZ({view:e}){let{t}=rE(),r=fY[e.productType];return(0,_.jsxs)(f4,{title:t(r.titleKey),subtitle:t(r.subtitleKey),children:[(0,_.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:gap-4",children:r.cards.map(e=>(0,_.jsx)(f_,{good:e.good,imageSrc:e.imageSrc,label:t(e.labelKey)},e.labelKey))}),(0,_.jsx)("div",{className:"mt-4",children:(0,_.jsx)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.continueIntro,children:t("introCta")})})]})}function fJ({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("historyTitle"),subtitle:t("historySubtitle"),children:[(0,_.jsx)("div",{className:"mt-3 grid min-h-104 flex-1 grid-cols-3 content-start gap-x-3 gap-y-4 overflow-x-hidden overflow-y-auto overscroll-contain pb-2 sm:gap-4",children:e.history.map(r=>(0,_.jsx)(fO,{"aria-label":r.after.name??t("historyPhoto"),photo:r.after,onClick:()=>e.selectResult(r.id)},r.id))}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.chooseNew,children:[(0,_.jsx)(fH,{"data-icon":"inline-start"}),t("historyUploadNew")]}),(0,_.jsx)(f8,{})]})]})}function f0({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("confirmTitle"),subtitle:t("confirmSubtitle"),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fP,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,_.jsx)(fN,{className:"bottom-2 left-2",imageSrc:e.productImageSrc,name:e.productName})]}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.generate,children:[(0,_.jsx)(fK,{"data-icon":"inline-start"}),t("confirmGenerate")]}),(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,_.jsx)(fq,{"data-icon":"inline-start"}),t("confirmChangePhoto")]}),(0,_.jsx)(f8,{})]})]})}function f1({view:e}){let{t}=rE();return(0,_.jsxs)(f4,{title:t("processingTitle"),subtitle:t("processingSubtitle"),children:[(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fE,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,_.jsx)(fR,{animated:!0,className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,_.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2",children:[(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white shadow-md sm:size-37.5",children:(0,_.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,_.jsx)("img",{alt:"",className:"size-full object-cover",src:e.photo.src}):null})]})]}),(0,_.jsx)(fj,{className:"mt-4",label:t("processingProgress"),progress:e.processingProgress})]})}function f2({view:e}){let{t}=rE(),r="upload-validation"===e.error.kind&&"file-too-large"===e.error.code;return(0,_.jsxs)(f4,{title:t(r?"errorFileTooLarge":"errorTitle"),subtitle:r?void 0:t("errorSubtitle"),children:[!r&&(0,_.jsxs)(fS,{className:"mt-3",children:[(0,_.jsx)(fE,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,_.jsx)(fR,{className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,_.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-6 px-6 sm:px-12",children:[(0,_.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white bg-background-containers shadow-md sm:size-37.5",children:(0,_.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,_.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,_.jsx)("img",{alt:e.photo.name??"",className:"size-full object-cover",src:e.photo.src,onError:t=>{t.currentTarget.src=e.productImageSrc}}):null})]}),(0,_.jsx)("p",{className:"w-56 text-center text-xs font-medium tracking-wider text-constant-white",children:t("errorGuidance")})]})]}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.retry,children:[(0,_.jsx)(fK,{"data-icon":"inline-start"}),t("errorRetry")]}),(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.chooseDifferentPhoto,children:[(0,_.jsx)(fq,{"data-icon":"inline-start"}),t("errorDifferentPhoto")]}),(0,_.jsx)(f8,{className:"text-text-sub"})]})]})}function f3({view:e}){let{t}=rE(),r=f7(e.productPrice),n=r?t("resultTryAnotherWithPrice",{price:r}):t("resultTryAnother");return e.myFitsOpen?(0,_.jsx)("div",{className:"min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain pb-4",children:(0,_.jsx)("div",{className:"flex flex-col gap-4 px-6 pb-2 pt-4 sm:px-8",children:e.resultHistory.map((t,r)=>(0,_.jsx)(f5,{compact:r>0,onAddToCart:e.addToCart,productName:t.productName??e.productName,productPrice:t.productPrice,productUrl:t.productUrl??e.productUrl,result:t,onDeleteResult:e.deleteResult,onOpenComparison:e.openComparison,onSaveResult:e.saveResult,onShareResult:e.shareResult},t.id??t.after.id))})}):(0,_.jsxs)(f4,{className:"pb-6",subtitle:void 0,title:t("resultTitle"),children:[(0,_.jsx)(fA,{className:"mt-6",productLabel:e.productName??t("resultProductLink"),productUrl:e.productUrl,zoomLabel:t("resultOpenComparison"),result:e.result,onOpenComparison:()=>e.openComparison(e.result?.id)}),(0,_.jsxs)(f6,{className:"mt-4",children:[(0,_.jsxs)(i9,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.addToCart,children:[(0,_.jsx)(h8,{"data-icon":"inline-start"}),n]}),(0,_.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,_.jsxs)(i9,{type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,_.jsx)(fq,{"data-icon":"inline-start"}),t("resultCompare")]}),(0,_.jsxs)(i9,{type:"button",variant:"outline",onClick:()=>e.shareResult(e.result?.id),children:[(0,_.jsx)(fn,{"data-icon":"inline-start"}),t("resultShare")]}),(0,_.jsxs)(i9,{type:"button",variant:"outline",onClick:()=>e.saveResult(e.result?.id),children:[(0,_.jsx)(fe,{"data-icon":"inline-start"}),t("resultReset")]})]})]})]})}function f5({compact:e=!1,onAddToCart:t,onDeleteResult:r,onOpenComparison:n,onSaveResult:a,onShareResult:o,productName:i,productPrice:s,productUrl:l,result:u}){let{t:c}=rE(),d=i??c("resultProductLink"),p=f7(s),h=p?c("resultTryAnotherWithPrice",{price:p}):c("resultTryAnother");return(0,_.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,_.jsx)(fA,{productLabel:d,productUrl:l,zoomLabel:c("resultOpenComparison"),result:u,onOpenComparison:()=>n(u.id)}),(0,_.jsxs)("div",{className:"flex gap-2",children:[(0,_.jsxs)(i9,{className:"min-w-0 flex-1",size:"default",type:"button",variant:"contrast",onClick:t,children:[(0,_.jsx)(h8,{"data-icon":"inline-start"}),(0,_.jsx)("span",{className:"truncate",children:h})]}),(0,_.jsx)(i9,{"aria-label":c("share"),size:"icon",type:"button",variant:"outline",onClick:()=>o(u.id),children:(0,_.jsx)(fn,{"data-icon":"inline-start"})}),(0,_.jsx)(i9,{"aria-label":c("download"),size:"icon",type:"button",variant:"outline",onClick:()=>a(u.id),children:(0,_.jsx)(fe,{"data-icon":"inline-start"})}),!e&&(0,_.jsx)(i9,{"aria-label":c("reset"),size:"icon",type:"button",variant:"outline",onClick:()=>r(u.id),children:(0,_.jsx)(ft,{"data-icon":"inline-start"})})]})]})}function f9({label:e,onClick:t}){return(0,_.jsx)(i9,{"aria-label":e,size:"icon",type:"button",variant:"outline",onClick:t,children:(0,_.jsx)(fU,{className:"rotate-180 !size-3","data-icon":"inline-start"})})}function f4({children:e,className:t,subtitle:r,title:n}){return(0,_.jsxs)("div",{className:i1("flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain px-6 pb-5 sm:px-8",t),children:[(0,_.jsxs)("div",{className:"mb-1 flex flex-col gap-1",children:[(0,_.jsx)("h2",{className:"text-2xl font-medium tracking-tight text-text-dark",children:n}),r&&(0,_.jsx)("p",{className:"text-sm font-medium text-text-base",children:r})]}),e]})}function f6({children:e,className:t}){return(0,_.jsx)("div",{className:i1("flex flex-col gap-2",t),children:e})}function f8({className:e}){var t;let{i18n:r,t:n}=rE(),a=(t=r.resolvedLanguage??r.language,t?.startsWith("ru")?fX:fG);return(0,_.jsxs)("p",{className:i1("pt-1 text-center text-xs font-medium text-text-base",e),children:[n("termsPrefix")," ",(0,_.jsx)("a",{className:"underline underline-offset-2",href:a.terms,rel:"noopener noreferrer",target:"_blank",children:n("termsLink")})," ",n("termsJoiner")," ",(0,_.jsx)("a",{className:"underline underline-offset-2",href:a.privacy,rel:"noopener noreferrer",target:"_blank",children:n("privacyLink")})]})}function f7(e){return e?.trim()||void 0}function ge(e){return"string"==typeof e?e.trim():""}function gt(e){if(e)return e;if("function"==typeof fetch)return fetch;throw Error("Fetch API is not available for AI try-on image upload")}async function gr(e,t,r){let n=await gt(r)(e,{body:t,method:"PUT"});if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`Nano Banana image upload failed with status ${n.status}${e?`: ${e}`:""}`)}}async function gn(e,t){let r=e?.trim();return r?go(r,t,"AI try-on product image fetch failed"):null}async function ga(e,t){return e.blob?e.blob:e.file?e.file:e.src?go(e.src,t,"AI try-on source photo fetch failed"):null}async function go(e,t,r){let n=await gt(t)(e);if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`${r} with status ${n.status}${e?`: ${e}`:""}`)}return n.blob()}async function gi(e){if(e instanceof Blob)return e.type?e:new Blob([e],{type:"image/jpeg"});if(e instanceof ArrayBuffer||"string"==typeof e)return new Blob([e],{type:"image/jpeg"});throw Error("AI try-on generation did not return an image")}let gs="ai-try-on-result";async function gl(e,t={}){let r=await gc(e,t.fetch),n=t.document??globalThis.document;if(!r||!n?.body)return!1;let a=t.createObjectUrl??gp,o=t.revokeObjectUrl??gh,i=a(r);if(!i)return!1;let s=n.createElement("a");return s.href=i,s.download=gd(r,e,t.filename),s.style.display="none",n.body.appendChild(s),s.click(),s.remove(),o(i),!0}async function gu(e,t={}){let r=await gc(e,t.fetch),n=t.navigator??globalThis.navigator;if(!r)return!1;if("function"==typeof File&&"function"==typeof n?.share){let a={files:[new File([r],gd(r,e,t.filename),{type:r.type||e?.type||"image/png"})]};if("function"!=typeof n.canShare||n.canShare(a))try{return await n.share(a),!0}catch(e){if("u">typeof DOMException&&e instanceof DOMException&&"AbortError"===e.name)return!1}}return gl(e,t)}async function gc(e,t=globalThis.fetch){if(!e)return null;if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof t)return null;try{let r=await t(e.src);if(!r.ok)return null;return r.blob()}catch{return null}}function gd(e,t,r=gs){var n;let a=function(e){switch(e){case"image/jpeg":return"jpg";case"image/png":return"png";case"image/webp":return"webp";case"image/gif":return"gif";case"image/svg+xml":return"svg";default:return null}}(e.type||t?.type)??(n=t?.name,n?.match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()??null)??"png",o=r.replace(/\.[a-z0-9]+$/i,"").replace(/[^\w-]+/g,"-").replace(/^-+|-+$/g,"")||gs;return`${o}.${a}`}function gp(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""}function gh(e){"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}let gf="results";function gg(){return void 0===globalThis.indexedDB?null:globalThis.indexedDB}function gm(e){return new Promise((t,r)=>{let n=e.open("neurodyn-ai-try-on",1);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(gf)||e.createObjectStore(gf,{keyPath:"id"}).createIndex("createdAt","createdAt")},n.onerror=()=>r(n.error),n.onsuccess=()=>t(n.result)})}function gv(e){return new Promise((t,r)=>{e.onabort=()=>r(e.error),e.onerror=()=>r(e.error),e.oncomplete=()=>t()})}async function gy(e){return{after:await gb(e.after),before:await gb(e.before),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productPrice:e.productPrice,productUrl:e.productUrl}}async function gb(e){let t=await gw(e);if(!t)throw Error("AI try-on photo cannot be persisted without image data");return{blob:t,id:e.id,lastModified:e.file?.lastModified??e.lastModified,name:e.name,size:t.size,type:t.type||e.type}}async function gw(e){if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof fetch)return null;try{let t=await fetch(e.src);return t.ok?t.blob():null}catch{return null}}function gk(e){return`neurodyn_ai_try_on_seen_tip:${e}`}function gx(e,t=gS()){if(t)try{t.setItem(gk(e),"true")}catch{}}function gS(){try{return void 0===globalThis.localStorage?null:globalThis.localStorage}catch{return null}}let gC={delete:async function e(e){let t=gg();if(!t)return!1;try{let r=await gm(t),n=r.transaction(gf,"readwrite"),a=gv(n);return n.objectStore(gf).delete(e),await a,r.close(),!0}catch(e){throw Error("AI try-on result could not be removed from history",{cause:e})}},list:async function e(){let e=gg();if(!e)return[];try{var t;let r=await gm(e),n=r.transaction(gf,"readonly"),a=gv(n),o=await (t=n.objectStore(gf).getAll(),new Promise((e,r)=>{t.onerror=()=>r(t.error),t.onsuccess=()=>e(t.result)}));return await a,r.close(),o.sort((e,t)=>t.createdAt-e.createdAt)}catch(e){throw Error("AI try-on history could not be loaded",{cause:e})}},save:async function e(e){let t=gg();if(!t)return!1;try{let r=await gy(e),n=await gm(t),a=n.transaction(gf,"readwrite"),o=gv(a);return a.objectStore(gf).put(r),await o,n.close(),!0}catch(e){throw Error("AI try-on result could not be saved to history",{cause:e})}}},gP={save:gl,share:gu},gE={consumeFirstView:function(e,t=gS()){return!function(e,t=gS()){if(!t)return!1;try{return"true"===t.getItem(gk(e))}catch{return!1}}(e,t)&&(gx(e,t),!0)},markSeen:gx},gT={createObjectUrl:e=>"function"==typeof URL.createObjectURL?URL.createObjectURL(e):"",revokeObjectUrl:e=>{"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}},gR=["image/jpeg","image/png"];class gO{createObjectUrl;tipStore;state;constructor({createObjectUrl:e,productImageSrc:t,productName:r,productPrice:n,productType:a,productUrl:o,tipStore:i}){this.createObjectUrl=e,this.tipStore=i,this.state={comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:[],myFitsOpen:!1,processingProgress:0,productImageSrc:t,productName:r,productPrice:gj(n),productType:a,productUrl:o,result:null,selectedPhoto:null,stage:"start"}}get view(){switch(this.state.stage){case"intro":return{productType:this.state.productType,stage:"intro"};case"history":return{history:this.state.history,stage:"history"};case"confirm":return{photo:this.state.selectedPhoto,productImageSrc:this.state.productImageSrc,productName:this.state.productName,stage:"confirm"};case"processing":return this.createProcessingView();case"error":return this.createErrorView();case"result":return{canOpenMyFits:this.state.history.length>0,myFitsOpen:this.state.myFitsOpen,productName:this.state.result?.productName??this.state.productName,productPrice:this.state.result?gj(this.state.result.productPrice):this.state.productPrice,productUrl:this.state.result?.productUrl??this.state.productUrl,result:this.state.result,resultHistory:function(e,t){if(!e)return[];let r=[e,...t.filter(t=>t.id!==e.id)];return r.filter((e,t)=>{let n=e.id??e.after.id;return r.findIndex(e=>(e.id??e.after.id)===n)===t})}(this.state.result,this.state.history),stage:"result"};default:return{canOpenHistory:this.state.history.length>0,productImageSrc:this.state.productImageSrc,productName:this.state.productName,productType:this.state.productType,productUrl:this.state.productUrl,stage:"start"}}}get comparison(){let e=this.getComparisonResult();return{open:this.state.comparisonOpen&&null!==e,productName:e?.productName??this.state.productName,productPrice:e?gj(e.productPrice):this.state.productPrice,productUrl:e?.productUrl??this.state.productUrl,result:e}}get selectedPhoto(){return this.state.selectedPhoto}get history(){return this.state.history}updateProduct({productImageSrc:e,productName:t,productPrice:r,productType:n,productUrl:a}){this.state={...this.state,productImageSrc:e,productName:t,productPrice:gj(r),productType:n,productUrl:a}}hydrateHistory(e){this.state={...this.state,error:null,history:[...e,...this.state.history].reduce((e,t)=>gz(e,t),[])}}failHistory(e,t){this.state={...this.state,error:{kind:"hydrate-history"===e?"history-load":"save-result"===e?"history-save":"history-delete",message:t}}}choosePhoto(){return this.tipStore.consumeFirstView(this.state.productType)?(this.state={...this.state,stage:"intro"},null):{type:"request-file-input"}}continueIntro(){return this.tipStore.markSeen(this.state.productType),{type:"request-file-input"}}requestClose(){return"intro"===this.state.stage?(this.tipStore.markSeen(this.state.productType),this.goBack(),null):{type:"close-dialog"}}openHistory(){0!==this.state.history.length&&(this.state={...this.state,stage:"history"})}goBack(){switch(this.state.stage){case"intro":case"history":this.state={...this.state,stage:"start"};return;case"confirm":this.state={...this.state,stage:this.state.history.length>0?"history":"start"};return;case"processing":case"error":case"result":this.state={...this.state,stage:"confirm"}}}reset(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"}}selectHistoryResult(e){let t=this.state.history.find(t=>t.id===e);t&&(this.state={...this.state,error:null,myFitsOpen:!1,result:t,selectedPhoto:t.before,stage:"result"})}selectFile(e){var t,r;let n=(t=e,gR.includes(t.type)||""===t.type&&/\.(?:jpe?g|png)$/i.test(t.name)?t.size>0xa00000?"file-too-large":null:"unsupported-file-format");if(n)return this.state={...this.state,error:{code:n,kind:"upload-validation"},myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"error"},null;let a=this.createObjectUrl(e),o={blob:e,file:e,id:(r=e,`${r.name}-${r.size}-${r.lastModified}`),lastModified:e.lastModified,name:e.name,size:e.size,src:a,type:e.type};return this.selectPhoto(o),o}selectPhoto(e){this.state={...this.state,error:null,myFitsOpen:!1,processingProgress:0,selectedPhoto:e,stage:"confirm"}}startGeneration(){return!!this.state.selectedPhoto&&(this.state={...this.state,error:null,generationProduct:this.getProductMetadata(),myFitsOpen:!1,processingProgress:0,result:null,stage:"processing"},!0)}reportGenerationProgress(e){var t;"processing"===this.state.stage&&(this.state={...this.state,processingProgress:Math.max(this.state.processingProgress,Number.isFinite(t=e)?Math.min(Math.max(t,0),100):0)})}completeGeneration(e,t=Date.now()){let r=function(e,t,r=Date.now()){return{...e,...t,productPrice:gj(t.productPrice),createdAt:r,id:`${e.before.id}-result-${r}`}}(e,this.state.generationProduct??this.getProductMetadata(),t);return this.state={...this.state,error:null,generationProduct:null,history:gz(this.state.history,r),myFitsOpen:!1,processingProgress:100,result:r,selectedPhoto:r.before,stage:"result"},r}failGeneration(e){this.state={...this.state,error:{kind:"generation",message:e},generationProduct:null,stage:"error"}}toggleMyFits(){"result"===this.state.stage&&0!==this.state.history.length&&(this.state={...this.state,myFitsOpen:!this.state.myFitsOpen})}closeMyFits(){this.state={...this.state,myFitsOpen:!1}}openComparison(e){let t=e?this.findResult(e):this.state.result;t&&(this.state={...this.state,comparisonOpen:!0,comparisonResultId:t.id})}closeComparison(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null}}deleteResult(e){let t=this.findResult(e),r=this.state.history.filter(t=>!gN(t,e)),n=this.state.result?.id??this.state.result?.after.id,a=this.getComparisonResult()?.id===e;if(n!==e)return this.state={...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,history:r},t;let o=r[0]??null;return this.state=o?{...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,error:null,generationProduct:null,history:r,myFitsOpen:r.length>0&&this.state.myFitsOpen,result:o,selectedPhoto:o.before,stage:"result"}:{...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:r,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"},t}resolveResultActionPhoto(e){let t=e?this.findResult(e):this.comparison.open?this.comparison.result:this.state.result;return t?.after??null}findResult(e){return this.state.history.find(t=>gN(t,e))??null}createProcessingView(){let e=this.state.generationProduct??this.getProductMetadata();return{photo:this.state.selectedPhoto,processingProgress:this.state.processingProgress,productImageSrc:e.productImageSrc,productName:e.productName,stage:"processing"}}createErrorView(){let e=this.state.generationProduct??this.getProductMetadata();return{error:this.state.error??{kind:"generation"},photo:this.state.selectedPhoto,productImageSrc:e.productImageSrc,productName:e.productName,stage:"error"}}getProductMetadata(){return{productImageSrc:this.state.productImageSrc,productName:this.state.productName,productPrice:this.state.productPrice,productUrl:this.state.productUrl}}getComparisonResult(){return this.state.comparisonOpen?this.state.comparisonResultId?this.findResult(this.state.comparisonResultId):this.state.result:null}}function gj(e){return e?.trim()||void 0}function gz(e,t){return[t,...e.filter(e=>e.id!==t.id)].sort((e,t)=>t.createdAt-e.createdAt)}function gN(e,t){return e.id===t||e.after.id===t}function g_(e,t){return{blob:e.blob,id:e.id,lastModified:e.lastModified,name:e.name,size:e.size,src:t(e.blob),type:e.type}}function gA(e,t){t&&(gL(e,t.before),gL(e,t.after))}function gL(e,t){gI(t)?.forEach(t=>e.add(t))}function gI(e){return e?.src?.startsWith("blob:")?[e.src]:null}function gM(e){return function(e=5e3){return new Promise(t=>setTimeout(t,e))}(function(e,t=Date.now()){return Math.max(0,5e3-(t-e))}(e))}function gF({dialogPortalContainer:e,language:t,onClose:r,processPhoto:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:u,apiKey:c,showDialogCloseButton:d=!1}){sG(s);let{i18n:p,t:h}=rE(),f=(0,A.useRef)(null),g=sN(c),m=(0,A.useMemo)(()=>u??s$({apiKey:g}),[u,g]);(0,A.useEffect)(()=>{"string"==typeof t&&p.changeLanguage(t)},[p,t]);let v=function({historyStore:e=gC,objectUrls:t=gT,onRequestClose:r,onRequestFileInput:n,processPhoto:a,productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u,tryOnClient:c,resultActions:d=gP,tipStore:p=gE}){var h;let[,f]=(0,A.useReducer)(e=>e+1,0),g=(0,A.useRef)(new Set),m=(0,A.useCallback)(e=>{let r=t.createObjectUrl(e);return r&&g.current.add(r),r},[t]),v=(0,A.useRef)(null);v.current||(v.current=new gO({createObjectUrl:m,productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u,tipStore:p}));let y=v.current;y.updateProduct({productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u});let b=(0,A.useMemo)(()=>a??function({createObjectUrl:e=function(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""},fetch:t,productImageSrc:r,productType:n,tryOnClient:a,apiKey:o}){sG(n);let i=a??s$({apiKey:o});return async function(a,o){let s;o?.reportProgress(4);let l=await ga(a,t);if(!l||l.size<=0)throw Error("AI try-on source photo is empty");o?.reportProgress(12);let u=await gn(r,t);if(!u||u.size<=0)throw Error("AI try-on product image is missing");o?.reportProgress(22),o?.reportProgress(32);let[c,d]=function(e,t){let r=e?.uploads;if(!Array.isArray(r)||r.length<2)throw Error("Nano Banana upload URL response is missing uploads");return r.slice(0,2).map(e=>{if(null===e||"object"!=typeof e)throw Error("Nano Banana upload URL response is missing uploads");let t=ge(e.key),r=ge(e.uploadUrl);if(!t||!r)throw Error("Nano Banana upload URL response is missing key or uploadUrl");return{key:t,uploadUrl:r}})}(await i.requestUploadUrls(2),2);o?.reportProgress(44),await Promise.all([gr(c.uploadUrl,l,t),gr(d.uploadUrl,u,t)]),o?.reportProgress(62);let p=function(e){if(!e)return()=>{};e(70);let t=Date.now(),r=globalThis.setInterval(()=>{e(70+24*(1-(1-Math.min((Date.now()-t)/45e3,1))**3))},750);return()=>globalThis.clearInterval(r)}(o?.reportProgress);try{s=await i.generateTryOn({category:n,personImage:c.key,productImages:[d.key]},{timeout:9e4})}finally{p()}o?.reportProgress(96);let h=await gi(s);if(h.size<=0)throw Error("AI try-on generation returned an empty image");o?.reportProgress(98);let f=e(h);if(!f)throw Error("AI try-on result image URL cannot be created");return{before:a,after:{blob:h,id:`${a.id}-nano-banana-result`,name:a.name?`${a.name} result`:"AI try-on result",size:h.size,src:f,type:h.type||"image/jpeg"}}}}({createObjectUrl:m,productImageSrc:o,productType:l,tryOnClient:c}),[m,a,o,l,c]),w=(0,A.useCallback)(e=>{if(e){if("request-file-input"===e.type)return void n();r?.()}},[r,n]),k=(0,A.useCallback)(()=>f(),[]),x=(0,A.useCallback)(e=>{let t=e()??null;k(),w(t)},[w,k]),S=(0,A.useCallback)(e=>{y.failHistory(e),k()},[y,k]),C=(0,A.useCallback)(t=>{e.save(t).catch(()=>{S("save-result")})},[e,S]),P=(0,A.useCallback)(t=>{e.delete(t).catch(()=>{S("delete-result")})},[e,S]),E=(0,A.useCallback)(()=>{x(()=>y.choosePhoto())},[x,y]),T=(0,A.useCallback)(async()=>{let e=y.selectedPhoto;if(!e||!y.startGeneration())return;k();let t=Date.now();try{var r;let n=await b(e,{reportProgress:e=>{y.reportGenerationProgress(e),k()}});await gM(t);let a=y.completeGeneration(n);r=g.current,gI(a.before)?.forEach(e=>r.add(e)),gI(a.after)?.forEach(e=>r.add(e)),C(a),k()}catch(e){await gM(t),y.failGeneration(e instanceof Error?e.message:void 0),k()}},[C,b,y,k]),R=(0,A.useCallback)(e=>{let t=y.deleteResult(e);t&&P(t.id),k()},[P,y,k]),O=(0,A.useCallback)(e=>{d.save(y.resolveResultActionPhoto(e))},[d,y]),j=(0,A.useCallback)(e=>{d.share(y.resolveResultActionPhoto(e))},[d,y]),z=(0,A.useCallback)(()=>{c.sendWidgetEvent("add_to_cart_from_widget")},[c]);(0,A.useEffect)(()=>{let t=!1;return async function(){try{let r=await e.list();if(t)return;y.hydrateHistory(r.map(e=>({after:g_(e.after,m),before:g_(e.before,m),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productPrice:e.productPrice,productUrl:e.productUrl}))),k()}catch{t||S("hydrate-history")}}(),()=>{t=!0}},[m,e,S,y,k]),(0,A.useEffect)(()=>()=>{var e,r;e=g.current,r=t.revokeObjectUrl,e.forEach(e=>r(e)),e.clear()},[t]),(0,A.useEffect)(()=>{var e,r,n,a,o;let i;a=g.current,e=y.view,r=y.comparison.result,n=y.history,i=new Set,"photo"in e&&gL(i,e.photo),"result"===e.stage&&(gA(i,e.result),e.resultHistory.forEach(e=>gA(i,e))),n.forEach(e=>gA(i,e)),gA(i,r),o=t.revokeObjectUrl,a.forEach(e=>{i.has(e)||(o(e),a.delete(e))})},[t,y.view,y.comparison.result,y.history]);let N=(0,A.useMemo)(()=>(function(e,{addToCart:t,choosePhoto:r,deleteResult:n,generate:a,runSessionCommand:o,saveResult:i,shareResult:s,sync:l}){let u=e.view;switch(u.stage){case"start":return{...u,choosePhoto:r,openHistory:()=>o(()=>e.openHistory())};case"intro":return{...u,continueIntro:()=>o(()=>e.continueIntro())};case"history":return{...u,chooseNew:r,selectResult:t=>o(()=>e.selectHistoryResult(t))};case"confirm":return{...u,changePhoto:r,generate:a};case"error":return{...u,chooseDifferentPhoto:r,retry:u.photo?a:r};case"result":return{...u,addToCart:t,changePhoto:()=>{e.closeMyFits(),l(),r()},deleteResult:n,openComparison:t=>o(()=>e.openComparison(t)),reset:()=>o(()=>e.reset()),saveResult:i,shareResult:s,toggleMyFits:()=>o(()=>e.toggleMyFits())};default:return u}})(y,{addToCart:z,choosePhoto:E,deleteResult:R,generate:()=>void T(),runSessionCommand:x,saveResult:O,shareResult:j,sync:k}),[z,E,R,T,x,O,y,j,k]);return{canGoBack:"start"!==(h=y.view.stage)&&"intro"!==h&&"processing"!==h&&"error"!==h&&"result"!==h,comparison:function(e,{addToCart:t,deleteResult:r,runSessionCommand:n,saveResult:a,shareResult:o}){let i=e.comparison;return{...i,addToCart:t,close:()=>n(()=>e.closeComparison()),deleteResult:()=>{let e=i.result?.id??i.result?.after.id;e&&r(e)},saveResult:()=>a(i.result?.id??i.result?.after.id),shareResult:()=>o(i.result?.id??i.result?.after.id)}}(y,{addToCart:z,deleteResult:R,runSessionCommand:x,saveResult:O,shareResult:j}),goBack:()=>x(()=>y.goBack()),requestClose:()=>x(()=>y.requestClose()),selectFile:e=>x(()=>{y.selectFile(e)}),view:N}}({onRequestClose:r,onRequestFileInput:()=>f.current?.click(),processPhoto:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:m}),y=v.view.stage,b="result"===v.view.stage&&v.view.myFitsOpen,w=v.canGoBack?(0,_.jsx)(f9,{label:h("back"),onClick:v.goBack}):null,k="result"===v.view.stage&&v.view.canOpenMyFits?(0,_.jsxs)(i9,{"aria-expanded":b,className:"h-9 px-3.5",type:"button",variant:"outline",onClick:v.view.toggleMyFits,children:[h("myFits"),(0,_.jsx)(sX,{className:i1("!size-3 transition-transform",b&&"rotate-180"),"data-icon":"inline-end"})]}):null;return(0,_.jsxs)(fF,{className:b?"h-svh max-h-svh sm:h-230 sm:max-h-[calc(100svh-var(--spacing)*8)]":void 0,"data-ai-try-on-stage":y,children:[(0,_.jsx)(fD,{badge:"history"===y?null:h(function(e){switch(e){case"intro":return"introBadge";case"confirm":return"confirmBadge";case"processing":return"processingBadge";case"error":return"errorBadge";case"result":return"resultBadge";default:return"badge"}}(y)),badgeTone:function(e){switch(e){case"confirm":return"blue";case"result":return"green";case"error":return"red";default:return"gray"}}(y),closeLabel:h("close"),leftSlot:w,middleSlot:k,preferMiddleSlotFirst:"result"===y,showCloseButton:d,onClose:v.requestClose}),(0,_.jsx)("input",{ref:f,accept:"image/jpeg,image/png",className:"hidden",type:"file",onChange:function(e){let t=e.currentTarget.files?.[0];t&&v.selectFile(t),e.currentTarget.value=""}}),(0,_.jsxs)(f$,{children:["start"===v.view.stage?(0,_.jsx)(fQ,{view:v.view}):null,"intro"===v.view.stage?(0,_.jsx)(fZ,{view:v.view}):null,"history"===v.view.stage?(0,_.jsx)(fJ,{view:v.view}):null,"confirm"===v.view.stage?(0,_.jsx)(f0,{view:v.view}):null,"processing"===v.view.stage?(0,_.jsx)(f1,{view:v.view}):null,"error"===v.view.stage?(0,_.jsx)(f2,{view:v.view}):null,"result"===v.view.stage?(0,_.jsx)(f3,{view:v.view}):null]},y),v.comparison.open&&(0,_.jsx)(fL,{productName:v.comparison.productName,productPrice:v.comparison.productPrice,productUrl:v.comparison.productUrl,portalContainer:e??void 0,result:v.comparison.result,onAddToCart:v.comparison.addToCart,onClose:v.comparison.close,onDeleteResult:v.comparison.deleteResult,onSaveResult:v.comparison.saveResult,onShareResult:v.comparison.shareResult})]})}function gD({defaultOpen:e=!1,language:t,onOpenChange:r,open:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,apiKey:u,...c}){sG(s);let d=(0,A.useMemo)(()=>{let e;return(e=rs.createInstance()).use(oa).use(rR).init({defaultNS:"ns1",fallbackLng:"en",interpolation:{escapeValue:!1},lng:t,resources:sV}),e},[t]),[p,h]=(0,A.useState)(null),[f,g]=(0,A.useState)(e),m=(0,A.useRef)(!1),v=void 0!==n,y=v?n:f,b=sN(u),w=(0,A.useMemo)(()=>s$({apiKey:b}),[b]);function k(e){v||g(e),r?.(e)}return(0,A.useEffect)(()=>{if(!y){m.current=!1;return}m.current||(m.current=!0,w.sendWidgetEvent("widget_opened"))},[y,w]),(0,_.jsxs)(_.Fragment,{children:[(0,W.createPortal)((0,_.jsx)("style",{children:sc.A}),document.head),(0,W.createPortal)((0,_.jsxs)(rK.div,{className:"fixed inset-x-0 bottom-0 w-svw tracking-normal sm:inset-x-auto sm:right-4 sm:bottom-4 sm:w-120",style:{zIndex:0x7fffffff},children:[(0,_.jsx)("style",{children:sH}),(0,_.jsx)("div",{ref:h}),p&&(0,_.jsx)(su,{defaultTheme:"light",root:p,storageKey:"neurodyn-ai-try-on-theme",children:(0,_.jsx)(rT,{i18n:d,children:(0,_.jsx)(gB,{language:t,open:y,portalContainer:p,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:w,onRequestClose:()=>k(!1),onOpenChange:k,...c})})})]}),document.body)]})}function gB({language:e,onRequestClose:t,portalContainer:r,productImageSrc:n,productName:a,productPrice:o,productType:i,productUrl:s,tryOnClient:l,...u}){let{t:c}=rE();return(0,_.jsx)(st,{...u,children:(0,_.jsxs)(sa,{className:"inset-x-0 bottom-0 top-auto block max-h-svh w-svw max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-t-3xl rounded-b-none p-0 sm:inset-x-auto sm:right-4 sm:bottom-4 sm:left-auto sm:max-h-230 sm:w-120 sm:max-w-120 sm:rounded-3xl sm:p-0",contentInsideOverlay:!0,portalContainer:r,showCloseButton:!1,onInteractOutside:e=>{e.preventDefault()},children:[(0,_.jsxs)(so,{className:"sr-only",children:[(0,_.jsx)(si,{children:c("dialogTitle")}),(0,_.jsx)(ss,{children:c("dialogDescription")})]}),(0,_.jsx)(gF,{dialogPortalContainer:r,language:e,productImageSrc:n,productName:a,productPrice:o,productType:i,productUrl:s,tryOnClient:l,showDialogCloseButton:!0,onClose:t})]})})}sk({baseURL:"https://api.neurodyn.ai/"});var g$=r("../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js");let gV=0;class gU{container=null;openState=!1;props=null;root=null;destroy(){this.root?.unmount(),this.root=null,this.container?.remove(),this.container=null,this.props=null,this.openState=!1}open(e){this.props=e,this.openState=!0,this.render()}handleOpenChange=e=>{this.openState=e,this.render()};ensureRoot(){return this.root||(this.container=document.createElement("div"),this.container.id=`neurodyn-ai-try-on-dialog-root-${gV++}`,document.body.appendChild(this.container),this.root=(0,g$.createRoot)(this.container)),this.root}render(){let e=this.ensureRoot();this.props&&this.openState?e.render((0,A.createElement)(gD,{...this.props,open:!0,onOpenChange:this.handleOpenChange})):e.render(null)}}let gH="data-neurodyn-ai-try-on-product-type";function gW(e,t){return gq(e.getAttribute(t))}function gq(e){return e?.trim()||void 0}function gK(e,t){let r=gW(e,t);if(!r)throw Error(`AI try-on dialog trigger is missing ${t}`);return r}class gG{destroyed=!1;props;renderer=new gU;triggers;constructor(e,t={}){for(const r of(this.triggers="string"==typeof e?Array.from(document.querySelectorAll(e)):[e],this.props=t,this.triggers))r.addEventListener("click",this.handleClick)}destroy(){if(!this.destroyed){for(let e of(this.destroyed=!0,this.triggers))e.removeEventListener("click",this.handleClick);this.renderer.destroy()}}handleClick=e=>{!this.destroyed&&e.currentTarget instanceof Element&&this.renderer.open(function(e,t={}){var r,n;let a;return{language:void 0!==t.language?t.language:(r="data-neurodyn-ai-try-on-language","en"===(a=e.getAttribute(r))||"ru"===a?a:void 0),productImageSrc:void 0!==t.productImageSrc?t.productImageSrc:gK(e,"data-neurodyn-ai-try-on-product-image-src"),productName:void 0!==t.productName?t.productName:gK(e,"data-neurodyn-ai-try-on-product-name"),productPrice:void 0!==t.productPrice?gq(t.productPrice):gW(e,"data-neurodyn-ai-try-on-product-price"),productUrl:void 0!==t.productUrl?t.productUrl:gW(e,"data-neurodyn-ai-try-on-product-url"),productType:function(e){if(!sK(e)){let t="string"==typeof e&&e.length>0?` "${e}"`:"";throw Error(`AI try-on product type from ${gH} must be one of: ${sW.join(", ")}; received${t||" no value"}`)}return e}(void 0!==t.productType?t.productType:e.getAttribute(gH)),apiKey:(n=void 0!==t.apiKey?t.apiKey:e.getAttribute("data-neurodyn-ai-try-on-api-key"),n?.trim()||void 0)}}(e.currentTarget,this.props))}}window.AiTryOnDialog=gG})()})();
|