PageSourceSearch

https://www.shababalyola.ae/_next/static/immutable/chunks/07vh96ddc3tli.js

js shababalyola.ae collected 2026-10-08 11:39:54 UTC 86,329 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[997835,e=>{var t=e.i(669993),i=e.i(935),o=e.i(539113),r=e.i(336269),n=e.i(657472),a=e.i(666451),s=e.i(228538);let l={"--bg":"var(--background)","--bg-warm":"color-mix(in srgb, var(--background) 86%, var(--foreground) 14%)","--surface":"color-mix(in srgb, var(--background) 94%, white 6%)","--surface-card":"color-mix(in srgb, var(--background) 92%, var(--muted-foreground) 8%)","--surface-low":"color-mix(in srgb, var(--background) 90%, var(--foreground) 10%)","--surface-high":"color-mix(in srgb, var(--background) 84%, var(--foreground) 16%)","--accent":"var(--primary)","--accent-light":"color-mix(in srgb, var(--primary) 88%, black 12%)","--accent-soft":"color-mix(in srgb, var(--primary) 10%, transparent 90%)","--accent-ring":"color-mix(in srgb, var(--primary) 26%, transparent 74%)","--border":"var(--border)","--border-strong":"color-mix(in srgb, var(--foreground) 22%, transparent 78%)","--text":"var(--foreground)","--text-2":"var(--secondary)","--text-3":"color-mix(in srgb, var(--secondary) 78%, var(--background) 22%)","--success":"#2D6A4F","--error":"#B91C1C","--shadow-card":"none","--shadow-card-hover":"0 24px 56px color-mix(in srgb, var(--foreground) 6%, transparent 94%)","--shadow-float":"0 40px 60px color-mix(in srgb, var(--foreground) 5%, transparent 95%)","--shadow-glow":"0 0 0 3px var(--accent-ring)"},c=[.32,.72,0,1],d={fontSize:"1.35rem",fontWeight:650,letterSpacing:"-0.02em",color:"var(--text)",textAlign:"center",lineHeight:1.2},h={fontSize:"0.84rem",color:"var(--text-2)",textAlign:"center",marginTop:"8px",lineHeight:1.45},p={display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",width:"100%",padding:"14px 24px",background:"linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%)",color:"#fff",fontSize:"0.9rem",fontWeight:600,letterSpacing:"0.01em",border:"none",borderRadius:"999px",cursor:"pointer",position:"relative",overflow:"hidden"},u={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"10px 20px",background:"var(--surface-high)",color:"var(--text)",fontSize:"0.8125rem",fontWeight:500,border:"1px solid var(--border)",borderRadius:"999px",cursor:"pointer"},m={display:"flex",alignItems:"center",justifyContent:"center",width:"44px",height:"44px",borderRadius:"999px",border:"1px solid var(--border)",background:"var(--surface-high)",color:"var(--text)",cursor:"pointer"},x={display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"999px",border:"1px solid var(--border)",background:"var(--surface-high)",color:"var(--text-2)",cursor:"pointer"},g={background:"var(--surface-card)",borderRadius:"32px",border:"none",boxShadow:"var(--shadow-card)",overflow:"hidden",position:"relative"},f={display:"flex",flexDirection:"column",alignItems:"center",gap:"6px",position:"relative"},v={width:"64px",height:"64px",borderRadius:"999px",overflow:"hidden",border:"1px solid var(--border)",background:"var(--surface-high)",position:"relative"},y={position:"absolute",top:"-6px",right:"-6px",width:"20px",height:"20px",borderRadius:"50%",background:"var(--error)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",cursor:"pointer",border:"2px solid var(--bg)",zIndex:2},b={fontSize:"0.6875rem",fontWeight:500,color:"var(--text-2)",maxWidth:"72px",textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},w={color:"var(--text-3)",fontSize:"1.1rem",fontWeight:500,display:"flex",alignItems:"center",height:"64px"},j={width:"64px",height:"64px",borderRadius:"999px",background:"var(--accent-soft)",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px"},S={position:"fixed",inset:0,zIndex:40,background:"rgba(15, 15, 15, 0.4)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},C={position:"fixed",bottom:0,left:0,right:0,zIndex:50,background:"color-mix(in srgb, var(--surface) 82%, transparent 18%)",borderRadius:"32px 32px 0 0",boxShadow:"0 -28px 56px color-mix(in srgb, var(--foreground) 5%, transparent 95%)",maxHeight:"85dvh",overflowY:"auto",overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"}
1,k={width:"36px",height:"5px",borderRadius:"3px",background:"var(--border-strong)",margin:"10px auto 4px"},z={position:"absolute",bottom:0,left:0,right:0,padding:"30px 12px 12px",background:"linear-gradient(to top, rgba(15, 15, 15, 0.7) 0%, transparent 100%)",color:"#fff",fontSize:"0.8125rem",fontWeight:600,textAlign:"center",letterSpacing:"0.01em"},R={position:"absolute",inset:0,borderRadius:"inherit",background:"linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",pointerEvents:"none"},_=["image/jpeg","image/png","image/webp","image/jpg"];function N(e){let n,a,l,d,h,p,u,m,x,g,w,j,S,C,k,z,R,N,L,D,M,P,T,E,W,A,I=(0,i.c)(66),{croppedImage:O,onImageSelected:F,onRemove:H,labels:B}=e;I[0]!==B?(n=void 0===B?{}:B,I[0]=B,I[1]=n):n=I[1];let U=n,[Y,Z]=(0,o.useState)(!1),[G,q]=(0,o.useState)(null),K=(0,o.useRef)(null),{yourPhoto:V,uploadPhoto:$,dropPhoto:X,browseSubtitle:J,errorType:Q,errorSize:ee}=U,et=void 0===V?"Your Photo":V,ei=void 0===J?"Drag & drop or click to browse · Max 10 MB":J,eo=void 0===Q?"Please upload JPG, PNG, or WebP":Q,er=void 0===ee?"Image must be under 10 MB":ee;I[2]!==er||I[3]!==eo||I[4]!==F?(a=e=>{if(q(null),!_.includes(e.type))return void q(eo);if(e.size>0xa00000)return void q(er);let t=new FileReader;t.onload=e=>{let t=e.target?.result;t&&F(t)},t.readAsDataURL(e)},I[2]=er,I[3]=eo,I[4]=F,I[5]=a):a=I[5];let en=a;I[6]!==en?(l=e=>{e.preventDefault(),Z(!1);let t=e.dataTransfer.files[0];t&&en(t)},I[6]=en,I[7]=l):l=I[7];let ea=l;if(O){let e,i,o,n,a,l,d,h,p,u,m;return I[8]===Symbol.for("react.memo_cache_sentinel")?(e={scale:.92,opacity:0},i={scale:1,opacity:1},o={type:"spring",stiffness:300,damping:30},I[8]=e,I[9]=i,I[10]=o):(e=I[8],i=I[9],o=I[10]),I[11]!==O||I[12]!==et?(n=(0,t.jsx)(s.default,{src:O,alt:et,fill:!0,className:"object-cover"}),I[11]=O,I[12]=et,I[13]=n):n=I[13],I[14]!==H?(a=e=>{e.stopPropagation(),H()},I[14]=H,I[15]=a):a=I[15],I[16]===Symbol.for("react.memo_cache_sentinel")?(l={scale:1.15,transition:{duration:.15,ease:c}},I[16]=l):l=I[16],I[17]===Symbol.for("react.memo_cache_sentinel")?(d={scale:.95,transition:{duration:.1}},I[17]=d):d=I[17],I[18]!==a?(h=(0,t.jsx)(r.m.button,{style:y,onClick:a,"aria-label":"Remove photo",whileHover:l,whileTap:d,children:"×"}),I[18]=a,I[19]=h):h=I[19],I[20]!==n||I[21]!==h?(p=(0,t.jsxs)(r.m.div,{style:v,layout:!0,initial:e,animate:i,transition:o,children:[n,h]}),I[20]=n,I[21]=h,I[22]=p):p=I[22],I[23]!==et?(u=(0,t.jsx)("span",{style:b,children:et}),I[23]=et,I[24]=u):u=I[24],I[25]!==p||I[26]!==u?(m=(0,t.jsxs)("div",{style:f,children:[p,u]}),I[25]=p,I[26]=u,I[27]=m):m=I[27],m}if(I[28]===Symbol.for("react.memo_cache_sentinel")?(d={opacity:0},h={opacity:1},I[28]=d,I[29]=h):(d=I[28],h=I[29]),I[30]===Symbol.for("react.memo_cache_sentinel")?(p=[.32,.72,0,1],I[30]=p):p=I[30],I[31]===Symbol.for("react.memo_cache_sentinel")?(u={opacity:{duration:.5,ease:p},layout:{type:"spring",stiffness:300,damping:30}},I[31]=u):u=I[31],I[32]!==Y)m={border:`1px dashed ${Y?"var(--accent)":"var(--border)"}`,borderRadius:"28px",padding:"40px 24px",textAlign:"center",cursor:"pointer",background:Y?"var(--surface-low)":"var(--surface-high)",WebkitTapHighlightColor:"transparent"},I[32]=Y,I[33]=m;else m=I[33];I[34]===Symbol.for("react.memo_cache_sentinel")?(x=()=>K.current?.click(),I[34]=x):x=I[34],I[35]===Symbol.for("react.memo_cache_sentinel")?(g=e=>{e.preventDefault(),Z(!0)},w=e=>{e.preventDefault(),Z(!1)},I[35]=g,I[36]=w):(g=I[35],w=I[36]),I[37]===Symbol.for("react.memo_cache_sentinel")?(j={borderColor:"var(--accent)",background:"var(--surface-low)",y:-2,transition:{duration:.28,ease:c}},I[37]=j):j=I[37],I[38]===Symbol.for("react.memo_cache_sentinel")?(S={scale:.99,transition:{duration:.1}},I[38]=S):S=I[38],I[39]===Symbol.for("react.memo_cache_sentinel")?(C={background:"var(--surface-low)"},I[39]=C):C=I[39],I[40]!==Y?(k=Y?{scale:1.08,y:-4}:{scale:1,y:0},I[40]=Y,I[41]=k):k=I[41],I[42]===Symbol.for("react.memo_cache_sentinel")?(z={duration:.4,ease:c},I[42]=z):z=I[42],I[43]===Symbol.for("react.memo_cache_sentinel")?(R=(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,t.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,t.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),I[43]=R):R=I[43],I[44]!==k?(N=(0,t.jsx)(r.m.div,{className:"mx-auto mb-3 w-12 h-12 rounded-lg flex items-center justify-center",style:C,animate:k,transition:z,children:R}),I[44]=k,I[45]=N):N=I[45],I[46]===Symbol.for("react.memo_cache_sentinel")?(L={color:"var(--text)"},I[46]=L):L=I[46];let es=Y?void 0===X?"Drop your photo here":X:void 0===$?"Upload your photo":$;return I[47]!==es?(D=(0,t.jsx)("p",{className:"text-sm font-semibold",style:L,children:es}),I[47]=es,I[48]=D):D=I[48],I[49]===Symbol.for("react.memo_cache_sentinel")?(M={color:"var(--text-3)"},I[49]=M):M=I[49],I[50]!==ei?(P=(0,t.jsx)("p",{className:"text-xs mt-1",style:M,children:ei}),I[50]=ei,I[51]=P):P=I[51],I[52]!==ea||I[53]!==m||I[54]!==N||I[55]!==D||I[56]!==P?(T=(0,t.jsxs)(r.m.div,{style:m,onClick:x,onDrop:ea,onDragOver:g,onDragLeave:w,whileHover:j,whileTap:S,children:[N,D,P]}),I[52]=ea,I[53]=m,I[54]=N,I[55]=D,I[56]=P,I[57]=T):T=I[57],I[58]!==G?(E=G&&(0,t.jsx)(r.m.p,{className:"text-xs font-medium text-center mt-2",style:{color:"var(--error)"},initial:{opacity:0,y:-6}
1,animate:{opacity:1,y:0},transition:{duration:.4,ease:c},children:G}),I[58]=G,I[59]=E):E=I[59],I[60]!==en?(W=(0,t.jsx)("input",{ref:K,type:"file",accept:"image/jpeg,image/png,image/webp",onChange:e=>{let t=e.target.files?.[0];t&&en(t)},className:"hidden"}),I[60]=en,I[61]=W):W=I[61],I[62]!==T||I[63]!==E||I[64]!==W?(A=(0,t.jsxs)(r.m.div,{layout:!0,initial:d,animate:h,transition:u,children:[T,E,W]}),I[62]=T,I[63]=E,I[64]=W,I[65]=A):A=I[65],A}var L=e.i(477469),D=e.i(254376);function M(e,t,i,o,r){void 0===r&&(r=0);var n=O(t.width,t.height,r),a=n.width,s=n.height;return{x:P(e.x,a,i.width,o),y:P(e.y,s,i.height,o)}}function P(e,t,i,o){var r=Math.abs(t*o/2-i/2);return F(e,-r,r)}function T(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function E(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function W(e,t){return Math.min(e,Math.max(0,t))}function A(e,t){return t}function I(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function O(e,t,i){var o=i*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function F(e,t,i){return Math.min(Math.max(e,t),i)}function H(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return"string"==typeof e&&!!(e.length>0)}).join(" ").trim()}var B=function(e){function t(){var i=null!==e&&e.apply(this,arguments)||this;return i.cropperRef=o.createRef(),i.imageRef=o.createRef(),i.videoRef=o.createRef(),i.containerPosition={x:0,y:0},i.containerRef=null,i.styleRef=null,i.containerRect=null,i.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},i.dragStartPosition={x:0,y:0},i.dragStartCrop={x:0,y:0},i.gestureZoomStart=0,i.gestureRotationStart=0,i.isTouching=!1,i.lastPinchDistance=0,i.lastPinchRotation=0,i.rafDragTimeout=null,i.rafPinchTimeout=null,i.wheelTimer=null,i.currentDoc="u">typeof document?document:null,i.currentWindow="u">typeof window?window:null,i.resizeObserver=null,i.previousCropSize=null,i.isInitialized=!1,i.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},i.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&i.containerRef){var e=!0;i.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}i.computeSizes()}),i.resizeObserver.observe(i.containerRef)}},i.preventZoomSafari=function(e){return e.preventDefault()},i.cleanEvents=function(){i.currentDoc&&(i.currentDoc.removeEventListener("mousemove",i.onMouseMove),i.currentDoc.removeEventListener("mouseup",i.onDragStopped),i.currentDoc.removeEventListener("touchmove",i.onTouchMove),i.currentDoc.removeEventListener("touchend",i.onDragStopped),i.currentDoc.removeEventListener("gesturechange",i.onGestureChange),i.currentDoc.removeEventListener("gestureend",i.onGestureEnd),i.currentDoc.removeEventListener("scroll",i.onScroll))},i.clearScrollEvent=function(){i.containerRef&&i.containerRef.removeEventListener("wheel",i.onWheel),i.wheelTimer&&clearTimeout(i.wheelTimer)},i.onMediaLoad=function(){var e=i.computeSizes();e&&(i.previousCropSize=e,i.emitCropData(),i.setInitialCrop(e),i.isInitialized=!0),i.props.onMediaLoaded&&i.props.onMediaLoaded(i.mediaSize)},i.setInitialCrop=function(e){if(i.props.initialCroppedAreaPercentages){var t,o,r,n,a,s,l,c=(t=i.props.initialCroppedAreaPercentages,o=i.mediaSize,r=i.props.rotation,n=i.props.minZoom,a=i.props.maxZoom,s=O(o.width,o.height,r),{crop:{x:(l=F(e.width/s.width*(100/t.width),n,a))*s.width/2-e.width/2-s.width*l*(t.x/100),y:l*s.height/2-e.height/2-s.height*l*(t.y/100)},zoom:l}),d=c.crop,h=c.zoom;i.props.onCropChange(d),i.props.onZoomChange&&i.props.onZoomChange(h)}else if(i.props.initialCroppedAreaPixels){var p,u,m,x,g,f,v,y,b,w=(p=i.props.initialCroppedAreaPixels,u=i.mediaSize,m=i.props.rotation,x=i.props.minZoom,g=i.props.maxZoom,void 0===m&&(m=0),f=O(u.naturalWidth,u.naturalHeight,m),y=F((v=u.width>u.height?u.width/u.naturalWidth:u.height/u.naturalHeight,e.height>e.width?e.height/(p.height*v):e.width/(p.width*v)),x,g),b=e.height>e.width?e.height/p.height:e.width/p.width,{crop:{x:((f.width-p.width)/2-p.x)*b,y:((f.height-p.height)/2-p.y)*b},zoom:y}),d=w.crop,h=w.zoom;i.props.onCropChange(d),i.props.onZoomChange&&i.props.onZoomChange(h)}},i.computeSizes=function(){var e,t,o,r,n,a,s=i.imageRef.current||i.videoRef.current;if(s&&i.containerRef){i.containerRect=i.containerRef.getBoundingClientRect(),i.saveContainerPosition();var l,c,d,h,p,u,m,x,g,f,v,y=i.containerRect.width/i.containerRect.height,b=(null==(e=i.imageRef.current)?void 0:e.naturalWi
1dth)||(null==(t=i.videoRef.current)?void 0:t.videoWidth)||0,w=(null==(o=i.imageRef.current)?void 0:o.naturalHeight)||(null==(r=i.videoRef.current)?void 0:r.videoHeight)||0,j=s.offsetWidth<b||s.offsetHeight<w,S=b/w,C=void 0;if(j)switch(i.state.mediaObjectFit){default:case"contain":C=y>S?{width:i.containerRect.height*S,height:i.containerRect.height}:{width:i.containerRect.width,height:i.containerRect.width/S};break;case"horizontal-cover":C={width:i.containerRect.width,height:i.containerRect.width/S};break;case"vertical-cover":C={width:i.containerRect.height*S,height:i.containerRect.height}}else C={width:s.offsetWidth,height:s.offsetHeight};i.mediaSize=(0,L.u)((0,L.u)({},C),{naturalWidth:b,naturalHeight:w}),i.props.setMediaSize&&i.props.setMediaSize(i.mediaSize);var k=i.props.cropSize?i.props.cropSize:(l=i.mediaSize.width,c=i.mediaSize.height,d=i.containerRect.width,h=i.containerRect.height,p=i.props.aspect,void 0===(u=i.props.rotation)&&(u=0),x=(m=O(l,c,u)).width,g=m.height,(f=Math.min(x,d))>(v=Math.min(g,h))*p?{width:v*p,height:v}:{width:f,height:f/p});return((null==(n=i.state.cropSize)?void 0:n.height)!==k.height||(null==(a=i.state.cropSize)?void 0:a.width)!==k.width)&&i.props.onCropSizeChange&&i.props.onCropSizeChange(k),i.setState({cropSize:k},i.recomputeCropPosition),i.props.setCropSize&&i.props.setCropSize(k),k}},i.saveContainerPosition=function(){if(i.containerRef){var e=i.containerRef.getBoundingClientRect();i.containerPosition={x:e.left,y:e.top}}},i.onMouseDown=function(e){i.currentDoc&&(e.preventDefault(),i.currentDoc.addEventListener("mousemove",i.onMouseMove),i.currentDoc.addEventListener("mouseup",i.onDragStopped),i.saveContainerPosition(),i.onDragStart(t.getMousePoint(e)))},i.onMouseMove=function(e){return i.onDrag(t.getMousePoint(e))},i.onScroll=function(e){i.currentDoc&&(e.preventDefault(),i.saveContainerPosition())},i.onTouchStart=function(e){!i.currentDoc||(i.isTouching=!0,(!i.props.onTouchRequest||i.props.onTouchRequest(e))&&(i.currentDoc.addEventListener("touchmove",i.onTouchMove,{passive:!1}),i.currentDoc.addEventListener("touchend",i.onDragStopped),i.saveContainerPosition(),2===e.touches.length?i.onPinchStart(e):1===e.touches.length&&i.onDragStart(t.getTouchPoint(e.touches[0]))))},i.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?i.onPinchMove(e):1===e.touches.length&&i.onDrag(t.getTouchPoint(e.touches[0]))},i.onGestureStart=function(e){i.currentDoc&&(e.preventDefault(),i.currentDoc.addEventListener("gesturechange",i.onGestureChange),i.currentDoc.addEventListener("gestureend",i.onGestureEnd),i.gestureZoomStart=i.props.zoom,i.gestureRotationStart=i.props.rotation)},i.onGestureChange=function(e){if(e.preventDefault(),!i.isTouching){var o=t.getMousePoint(e),r=i.gestureZoomStart-1+e.scale;if(i.setNewZoom(r,o,{shouldUpdatePosition:!0}),i.props.onRotationChange){var n=i.gestureRotationStart+e.rotation;i.props.onRotationChange(n)}}},i.onGestureEnd=function(e){i.cleanEvents()},i.onDragStart=function(e){var t,o;i.dragStartPosition={x:e.x,y:e.y},i.dragStartCrop=(0,L.u)({},i.props.crop),null==(o=(t=i.props).onInteractionStart)||o.call(t)},i.onDrag=function(e){var t=e.x,o=e.y;i.currentWindow&&(i.rafDragTimeout&&i.currentWindow.cancelAnimationFrame(i.rafDragTimeout),i.rafDragTimeout=i.currentWindow.requestAnimationFrame(function(){if(i.state.cropSize&&void 0!==t&&void 0!==o){var e=t-i.dragStartPosition.x,r=o-i.dragStartPosition.y,n={x:i.dragStartCrop.x+e,y:i.dragStartCrop.y+r},a=i.props.restrictPosition?M(n,i.mediaSize,i.state.cropSize,i.props.zoom,i.props.rotation):n;i.props.onCropChange(a)}}))},i.onDragStopped=function(){var e,t;i.isTouching=!1,i.cleanEvents(),i.emitCropData(),null==(t=(e=i.props).onInteractionEnd)||t.call(e)},i.onWheel=function(e){if(i.currentWindow&&(!i.props.onWheelRequest||i.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=(0,D.default)(e).pixelY,n=i.props.zoom-r*i.props.zoomSpeed/200;i.setNewZoom(n,o,{shouldUpdatePosition:!0}),i.state.hasWheelJustStarted||i.setState({hasWheelJustStarted:!0},function(){var e,t;return null==(t=(e=i.props).onInteractionStart)?void 0:t.call(e)}),i.wheelTimer&&clearTimeout(i.wheelTimer),i.wheelTimer=i.currentWindow.setTimeout(function(){return i.setState({hasWheelJustStarted:!1},function(){var e,t;return null==(t=(e=i.props).onInteractionEnd)?void 0:t.call(e)})},250)}},i.getPointOnContainer=function(e,t){var o=e.x,r=e.y;if(!i.containerRect)throw Error("The Cropper is not mounted");return{x:i.containerRect.width/2-(o-t.x),y:i.containerRect.height/2-(r-t.y)}},i.getPointOnMedia=function(e){var t=e.x,o=e.y,r=i.props,n=r.crop,a=r.zoom;return{x:(t+n.x)/a,y:(o+n.y)/a}},i.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition;if(i.state.cropSize&&i.props.onZoomChange){var n=F(e,i.props.minZoom,i.props.maxZoom);if(void 0===r||r){var a=i.getPointOnContainer(t,i.containerPosition),s=i.getPointOnMedia(a),l={x:s.x*n-a.x,y:s.y*n-a.y},c=i.props.restrictPosition?M(l,i.mediaSize,i.state.cropSize,n,i.props.rotation):l;i.props.onCropChange(c)}i.props.onZoomChange(n)}},i.getCropData=function(){var e,t,o,r,n,a,s,l,c,d,h,p,u,m,x;return i.state.cropSize?(e=i.props.restrictPosition?M(i.props.crop,i.mediaSize,i.state.cropSize,i.props.zoom,i.props.rotation):i.props.crop,t=i.mediaSize,o=i.state.cropSize,r=i.getAspect(),n=i.props.zoom,a=i.props.rotation,s=i.props.restrictPosition,void 0===a&&(a=0),void 0===s&&(s=!0),l=s?W:A,c=O(t.width,t.height,a),d=O(t.naturalWi
1dth,t.naturalHeight,a),h={x:l(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:l(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:l(100,o.width/c.width*100/n),height:l(100,o.height/c.height*100/n)},p=Math.round(l(d.width,h.width*d.width/100)),u=Math.round(l(d.height,h.height*d.height/100)),m=d.width>=d.height*r?{width:Math.round(u*r),height:u}:{width:p,height:Math.round(p/r)},x=(0,L.u)((0,L.u)({},m),{x:Math.round(l(d.width-m.width,h.x*d.width/100)),y:Math.round(l(d.height-m.height,h.y*d.height/100))}),{croppedAreaPercentages:h,croppedAreaPixels:x}):null},i.emitCropData=function(){var e=i.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;i.props.onCropComplete&&i.props.onCropComplete(t,o),i.props.onCropAreaChange&&i.props.onCropAreaChange(t,o)}},i.emitCropAreaChange=function(){var e=i.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;i.props.onCropAreaChange&&i.props.onCropAreaChange(t,o)}},i.recomputeCropPosition=function(){if(i.state.cropSize){var e,t,o=i.props.crop;if(i.isInitialized&&(null==(e=i.previousCropSize)?void 0:e.width)&&(null==(t=i.previousCropSize)?void 0:t.height)&&(Math.abs(i.previousCropSize.width-i.state.cropSize.width)>1e-6||Math.abs(i.previousCropSize.height-i.state.cropSize.height)>1e-6)){var r=i.state.cropSize.width/i.previousCropSize.width,n=i.state.cropSize.height/i.previousCropSize.height;o={x:i.props.crop.x*r,y:i.props.crop.y*n}}var a=i.props.restrictPosition?M(o,i.mediaSize,i.state.cropSize,i.props.zoom,i.props.rotation):o;i.previousCropSize=i.state.cropSize,i.props.onCropChange(a),i.emitCropData()}},i.onKeyDown=function(e){var t,o,r=i.props,n=r.crop,a=r.onCropChange,s=r.keyboardStep,l=r.zoom,c=r.rotation,d=s;if(i.state.cropSize){e.shiftKey&&(d*=.2);var h=(0,L.u)({},n);switch(e.key){case"ArrowUp":h.y-=d,e.preventDefault();break;case"ArrowDown":h.y+=d,e.preventDefault();break;case"ArrowLeft":h.x-=d,e.preventDefault();break;case"ArrowRight":h.x+=d,e.preventDefault();break;default:return}i.props.restrictPosition&&(h=M(h,i.mediaSize,i.state.cropSize,l,c)),e.repeat||null==(o=(t=i.props).onInteractionStart)||o.call(t),a(h)}},i.onKeyUp=function(e){var t,o;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}i.emitCropData(),null==(o=(t=i.props).onInteractionEnd)||o.call(t)},i}return(0,L.w)(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  overflow: hidden;\n  user-select: none;\n  touch-action: none;\n  cursor: move;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n  max-width: 100%;\n  max-height: 100%;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n  width: 100%;\n  height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n  width: auto;\n  height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  box-sizing: border-box;\n  box-shadow: 0 0 0 9999em;\n  color: rgba(0, 0, 0, 0.5);\n  overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n  border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 0;\n  bottom: 0;\n  left: 33.33%;\n  right: 33.33%;\n  border-top: 0;\n  border-bottom: 0;\n}
1\n\n.reactEasyCrop_CropAreaGrid::after {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 33.33%;\n  bottom: 33.33%;\n  left: 0;\n  right: 0;\n  border-left: 0;\n  border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null==(e=this.resizeObserver)||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null==(t=this.styleRef.parentNode)||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null==(t=e.cropSize)?void 0:t.height)!==(null==(i=this.props.cropSize)?void 0:i.height)||(null==(o=e.cropSize)?void 0:o.width)!==(null==(r=this.props.cropSize)?void 0:r.width)?this.computeSizes():((null==(n=e.crop)?void 0:n.x)!==(null==(a=this.props.crop)?void 0:a.x)||(null==(s=e.crop)?void 0:s.y)!==(null==(l=this.props.crop)?void 0:l.y))&&this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null==(c=this.videoRef.current)||c.load());var t,i,o,r,n,a,s,l,c,d=this.getObjectFit();d!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:d},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,i=e.aspect;return t?t.width/t.height:i},t.prototype.getObjectFit=function(){var e,t,i,o;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null==(e=this.imageRef.current)?void 0:e.naturalWidth)||(null==(t=this.videoRef.current)?void 0:t.videoWidth)||0)/((null==(i=this.imageRef.current)?void 0:i.naturalHeight)||(null==(o=this.videoRef.current)?void 0:o.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var i=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=T(i,o),this.lastPinchRotation=E(i,o),this.onDragStart(I(i,o))},t.prototype.onPinchMove=function(e){var i=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),n=I(o,r);this.onDrag(n),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var e=T(o,r),t=i.props.zoom*(e/i.lastPinchDistance);i.setNewZoom(t,n,{shouldUpdatePosition:!1}),i.lastPinchDistance=e;var a=E(o,r),s=i.props.rotation+(a-i.lastPinchRotation);i.props.onRotationChange&&i.props.onRotationChange(s),i.lastPinchRotation=a})}},t.prototype.render=function(){var e,t=this,i=this.props,r=i.image,n=i.video,a=i.mediaProps,s=i.cropperProps,l=i.transform,c=i.crop,d=c.x,h=c.y,p=i.rotation,u=i.zoom,m=i.cropShape,x=i.showGrid,g=i.roundCropAreaPixels,f=i.style,v=f.containerStyle,y=f.cropAreaStyle,b=f.mediaStyle,w=i.classes,j=w.containerClassName,S=w.cropAreaClassName,C=w.mediaClassName,k=null!=(e=this.state.mediaObjectFit)?e:this.getObjectFit();return o.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef
1=e},"data-testid":"container",style:v,className:H("reactEasyCrop_Container",j)},r?o.createElement("img",(0,L.u)({alt:"",className:H("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",C)},a,{src:r,ref:this.imageRef,style:(0,L.u)((0,L.u)({},b),{transform:l||"translate(".concat(d,"px, ").concat(h,"px) rotate(").concat(p,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):n&&o.createElement("video",(0,L.u)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:H("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",C)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,L.u)((0,L.u)({},b),{transform:l||"translate(".concat(d,"px, ").concat(h,"px) rotate(").concat(p,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(n)?n:[{src:n}]).map(function(e){return o.createElement("source",(0,L.u)({key:e.src},e))})),this.state.cropSize&&o.createElement("div",(0,L.u)({ref:this.cropperRef,style:(0,L.u)((0,L.u)({},y),{width:g?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:g?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:H("reactEasyCrop_CropArea","round"===m&&"reactEasyCrop_CropAreaRound",x&&"reactEasyCrop_CropAreaGrid",S)},s)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(o.Component);async function U(e,t){var i;let o=await (i=e,new Promise((e,t)=>{let o=new Image;o.addEventListener("load",()=>e(o)),o.addEventListener("error",e=>t(e)),o.setAttribute("crossOrigin","anonymous"),o.src=i})),r=document.createElement("canvas"),n=r.getContext("2d");if(!n)throw Error("Canvas 2D context unavailable");return r.width=1024,r.height=1024,n.drawImage(o,t.x,t.y,t.width,t.height,0,0,1024,1024),r.toDataURL("image/jpeg",.92)}function Y({imageSrc:e,onDone:n,onCancel:a,labels:s={}}){let l,d,[h,m]=(0,o.useState)({x:0,y:0}),[x,g]=(0,o.useState)(1),[f,v]=(0,o.useState)(null),[y,b]=(0,o.useState)(!1),{getCroppedImage:w}=((d=(0,i.c)(1))[0]===Symbol.for("react.memo_cache_sentinel")?(l={getCroppedImage:U},d[0]=l):l=d[0],l),{title:j="Crop Your Photo",cancel:S="Cancel",confirm:C="Confirm",cropFailed:k="Crop failed"}=s,z=(0,o.useCallback)((e,t)=>{v(t)},[]),R=(0,o.useCallback)(async()=>{if(f){b(!0);try{let t=await w(e,f);n(t)}catch{console.error(k)}finally{b(!1)}}},[f,w,e,n,k]);return(0,t.jsxs)(r.m.div,{className:"fixed inset-0 z-50 flex items-center justify-center p-4",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.35,ease:c},children:[(0,t.jsx)(r.m.div,{className:"absolute inset-0",style:{background:"rgba(15, 15, 15, 0.55)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},onClick:a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4,ease:c}}),(0,t.jsxs)(r.m.div,{className:"relative z-10 w-full max-w-lg rounded-lg overflow-hidden",style:{background:"var(--surface)",boxShadow:"var(--shadow-float)"},initial:{opacity:0,scale:.92,y:24},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},transition:{type:"spring",stiffness:300,damping:30},children:[(0,t.jsxs)("div",{className:"px-5 py-3.5 flex items-center justify-between",style:{background:"var(--surface-high)"},children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",style:{color:"var(--text)"},children:j}),(0,t.jsx)("button",{onClick:a,className:"w-7 h-7 rounded-lg flex items-center justify-center hover:bg-[var(--accent-soft)] transition-colors duration-200",children:(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"var(--text-2)",strokeWidth:"2",strokeLinecap:"round",children:[(0,t.jsx)("line",{x1:"3",y1:"3",x2:"13",y2:"13"}),(0,t.jsx)("line",{x1:"13",y1:"3",x2:"3",y2:"13"})]})})]}),(0,t.jsx)("div",{className:"relative w-full",style:{aspectRatio:"1/1"},children:(0,t.jsx)(B,{image:e,crop:h,zoom:x,aspect:1,onCropChange:m,onZoomChange:g,onCropComplete:z,cropShape:"rect",showGrid:!1,style:{containerStyle:{background:"#0f0f0f"},cropAreaStyle:{border:"2px solid rgba(255,255,255,0.5)",borderRadius:"14px"}}})}),(0,t.jsxs)("div",{className:"px-5 py-4",style:{background:"var(--surface-high)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-3)",strokeWidth:"2",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,t.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,t.jsx)("input",{type:"range",min:1,max:3,step:.01,value:x,onChange:e=>g(Number(e.target.value)),className:"flex-1 h-1",style:{accentColor:"var(--accent)"}}),(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-3)",strokeWidth:"2",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,t.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),(0,t.jsx)("line",{x1:"8",y1:"11",x2:"14",y2:"11"}),(0,t.jsx)("line",{x1:"11",y1:"8",x2:"11",y2:"14"})]})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.m.button,{onClick:a,className:"flex-1 py-2.5",style:u,whileHover:{borderColor:"var(--accent)",background:"var(--accent-soft)",y:-2,transition:{duration:.28,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:S}),(0,t.jsx)(r.m.button,{onClick:R,disabled:y,className:"flex-1 py-2.5",style:{...p,opacity:y?.8:1,cursor:y?"not-allowed":"pointer"},whileHover:y?void 0:{y:-2,background:"linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%)",transition:{duration:.28,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:y?(0,t.jsx)(r.m.span,{animate:{rotate:360},transition:{duration:.8,repeat:1/0,ease:"linear"},className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full inline-block"}):C})]})]})]})]})}let Z={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.08,delayChildren:.05}}},G={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.5,ease:[.32,.72,0,1]}}};function q(e){let o,n,a,l,p,u,m,x,g=(0,i.c)(20),{selected:f,onSelect:v,title:y,description:b,styles:w}=e,j=void 0===y?"Choose Your Style":y,S=void 0===b?"Select from our signature traditional styles":b;if(g[0]===Symbol.for("react.memo_cache_sentinel")?(o={opacity:0},n={opacity:1},a={duration:.5,ease:c},g[0]=o,g[1]=n,g[2]=a):(o=g[0],n=g[1],a=g[2]),g[3]!==j?(l=(0,t.jsx)("h2",{style:d,children:j}),g[3]=j,g[4]=l):l=g[4],g[5]!==S?(p=(0,t.jsx)("p",{style:h,children:S}),g[5]=S,g[6]=p):p=g[6],g[7]!==v||g[8]!==f||g[9]!==w){let e;g[11]!==v||g[12]!==f?(e=e=>{let i=f===e.id;return(0,t.jsxs)(r.m.button,{onClick:()=>v(e.id),style:{position:"relative",borderRadius:"20px",overflow:"hidden",border:i?"1px solid var(--accent)":"1px solid var(--border)",cursor:"pointer",background:"var(--surface-high)",boxShadow:i?"var(--shadow-glow)":void 0,WebkitTapHighlightColor:"transparent",aspectRatio:"3/4"},variants:G,whileHover:{y:-2,borderColor:"var(--border-strong)",boxShadow:"0 20px 46px color-mix(in srgb, var(--foreground) 6%, transparent 94%)",transition:{duration:.35,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:[(0,t.jsx)(s.default,{src:e.image,alt:e.name,fill:!0,className:"object-cover",sizes:"(max-width: 640px) 33vw, 200px"}),(0,t.jsx)("span",{style:z,children:e.name}),i&&(0,t.jsx)(r.m.div,{className:"absolute top-2 right-2 w-6 h-6 rounded-full flex items-center justify-center",style:{background:"var(--accent)"},initial:{scale:.6,opacity:0}
1,animate:{scale:1,opacity:1},transition:{type:"spring",duration:.45,bounce:.15},children:(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:(0,t.jsx)("path",{d:"M2.5 7L5.5 10L11.5 4",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},e.id)},g[11]=v,g[12]=f,g[13]=e):e=g[13],u=w.map(e),g[7]=v,g[8]=f,g[9]=w,g[10]=u}else u=g[10];return g[14]!==u?(m=(0,t.jsx)(r.m.div,{className:"grid grid-cols-3 gap-3 mt-5",variants:Z,initial:"hidden",animate:"show",children:u}),g[14]=u,g[15]=m):m=g[15],g[16]!==l||g[17]!==p||g[18]!==m?(x=(0,t.jsxs)(r.m.div,{initial:o,animate:n,transition:a,children:[l,p,m]}),g[16]=l,g[17]=p,g[18]=m,g[19]=x):x=g[19],x}let K={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05,delayChildren:.04}}},V={hidden:{opacity:0,scale:.85},show:{opacity:1,scale:1,transition:{duration:.45,ease:[.32,.72,0,1]}}};function $(e){let o,n,l,p,u,m,x,g,f,v,y,b,w=(0,i.c)(33),{styleId:j,selected:S,onSelect:C,title:k,description:z,colors:_,styles:N}=e,L=void 0===z?"Select from our premium color collection":z;if(w[0]!==_||w[1]!==S){let e;w[3]!==S?(e=e=>e.id===S,w[3]=S,w[4]=e):e=w[4],o=_.find(e),w[0]=_,w[1]=S,w[2]=o}else o=w[2];let D=o;w[5]!==j||w[6]!==N?(n=N.find(e=>e.id===j)?.name||"Thobe",w[5]=j,w[6]=N,w[7]=n):n=w[7];let M=n,P=k||`Choose Your ${M} Color`;if(w[8]===Symbol.for("react.memo_cache_sentinel")?(l={opacity:0}
1,p={opacity:1},u={duration:.5,ease:c},w[8]=l,w[9]=p,w[10]=u):(l=w[8],p=w[9],u=w[10]),w[11]!==P?(m=(0,t.jsx)("h2",{style:d,children:P}),w[11]=P,w[12]=m):m=w[12],w[13]!==L?(x=(0,t.jsx)("p",{style:h,children:L}),w[13]=L,w[14]=x):x=w[14],w[15]!==_||w[16]!==C||w[17]!==S){let e;w[19]!==C||w[20]!==S?(e=e=>{let i=S===e.id;return(0,t.jsxs)(r.m.button,{onClick:()=>C(e.id),style:{...{width:"100%",height:"100%",borderRadius:"12px",cursor:"pointer",position:"relative",overflow:"hidden",border:e.isLight?"1px solid var(--border)":"none",boxShadow:i?"0 0 0 3px var(--bg), 0 0 0 5.5px var(--accent)":void 0,WebkitTapHighlightColor:"transparent"},background:e.hex},variants:V,whileHover:{scale:1.05,y:-2,boxShadow:"0 18px 36px color-mix(in srgb, var(--foreground) 7%, transparent 93%)",transition:{duration:.3,ease:c}},whileTap:{scale:.95,transition:{duration:.1}},title:e.name,"aria-label":`Select ${e.name}`,className:"aspect-square",children:[(0,t.jsx)(s.default,{src:e.image,alt:e.name,fill:!0,className:"object-cover",sizes:"64px"}),(0,t.jsx)("span",{style:R}),(0,t.jsx)(a.f,{children:i&&(0,t.jsx)(r.m.div,{className:"absolute inset-0 flex items-center justify-center z-10",initial:{scale:.6,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.6,opacity:0},transition:{type:"spring",duration:.45,bounce:.15},children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M3 8L6.5 11.5L13 5",stroke:e.isLight?"var(--accent)":"#fff",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]},e.id)},w[19]=C,w[20]=S,w[21]=e):e=w[21],g=_.map(e),w[15]=_,w[16]=C,w[17]=S,w[18]=g}else g=w[18];return w[22]!==g?(f=(0,t.jsx)(r.m.div,{className:"grid grid-cols-4 gap-3 sm:gap-4 mt-5 max-w-sm mx-auto",variants:K,initial:"hidden",animate:"show",children:g}),w[22]=g,w[23]=f):f=w[23],w[24]!==D?(v=D&&(0,t.jsx)(r.m.p,{className:"text-xs font-medium",style:{color:"var(--text-2)"},initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.35,ease:c},children:D.name},D.id),w[24]=D,w[25]=v):v=w[25],w[26]!==v?(y=(0,t.jsx)("div",{className:"text-center h-5 mt-3",children:(0,t.jsx)(a.f,{mode:"wait",children:v})}),w[26]=v,w[27]=y):y=w[27],w[28]!==f||w[29]!==y||w[30]!==m||w[31]!==x?(b=(0,t.jsxs)(r.m.div,{initial:l,animate:p,transition:u,children:[m,x,f,y]}),w[28]=f,w[29]=y,w[30]=m,w[31]=x,w[32]=b):b=w[32],b}function X(e){let o,n,l,c,d,h,p,u,m,x,g,j,S,C,k=(0,i.c)(38),{croppedImage:z,styleId:R,colorId:_,onRemovePhoto:N,onRemoveStyle:L,onRemoveColor:D,styles:M,colors:P}=e;if(k[0]!==R||k[1]!==M){let e;k[3]!==R?(e=e=>e.id===R,k[3]=R,k[4]=e):e=k[4],o=M.find(e),k[0]=R,k[1]=M,k[2]=o}else o=k[2];let T=o;if(k[5]!==_||k[6]!==P){let e;k[8]!==_?(e=e=>e.id===_,k[8]=_,k[9]=e):e=k[9],n=P.find(e),k[5]=_,k[6]=P,k[7]=n}else n=k[7];let E=n;k[10]!==z||k[11]!==N?(l=(0,t.jsx)("div",{style:v,children:(0,t.jsx)(a.f,{mode:"wait",children:z?(0,t.jsxs)(r.m.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"relative w-full h-full",children:[(0,t.jsx)(s.default,{src:z,alt:"Your Photo",fill:!0,className:"object-cover"}),(0,t.jsx)("button",{onClick:N,style:y,children:(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]},"photo"):(0,t.jsx)(r.m.div,{className:"w-full h-full flex items-center justify-center bg-var(--surface-high)",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-3)",strokeWidth:"2",children:[(0,t.jsx)("path",{d:"M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z"}),(0,t.jsx)("circle",{cx:"12",cy:"13",r:"4"})]})},"empty")})}),k[10]=z,k[11]=N,k[12]=l):l=k[12],k[13]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("span",{style:b,children:"Your Photo"}),k[13]=c):c=k[13],k[14]!==l?(d=(0,t.jsxs)("div",{style:f,children:[l,c]}),k[14]=l,k[15]=d):d=k[15],k[16]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)("div",{style:w,children:"+"}),k[16]=h):h=k[16],k[17]!==L||k[18]!==T?(p=(0,t.jsx)("div",{style:v,children:(0,t.jsx)(a.f,{mode:"wait",children:T?(0,t.jsxs)(r.m.div,{initial:{opacity:0,x:10}
1,animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"relative w-full h-full",children:[(0,t.jsx)(s.default,{src:T.image,alt:T.name,fill:!0,className:"object-cover"}),(0,t.jsx)("button",{onClick:L,style:y,children:(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]},T.id):(0,t.jsx)(r.m.div,{className:"w-full h-full flex items-center justify-center bg-var(--surface-high)",children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-3)",strokeWidth:"2",children:(0,t.jsx)("path",{d:"M20.38 3.46L16 2 12 5.5 8 2l-4.38 1.46a2 2 0 00-1.34 2.26l1.59 7.93c.17.85.69 1.57 1.41 1.97L12 19l6.72-3.88a2.5 2.5 0 001.41-1.97l1.59-7.93a2 2 0 00-1.34-2.26z"})})},"empty")})}),k[17]=L,k[18]=T,k[19]=p):p=k[19];let W=T?.name||"Style";k[20]!==W?(u=(0,t.jsx)("span",{style:b,children:W}),k[20]=W,k[21]=u):u=k[21],k[22]!==p||k[23]!==u?(m=(0,t.jsxs)("div",{style:f,children:[p,u]}),k[22]=p,k[23]=u,k[24]=m):m=k[24],k[25]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)("div",{style:w,children:"+"}),k[25]=x):x=k[25],k[26]!==D||k[27]!==E?(g=(0,t.jsx)("div",{style:v,children:(0,t.jsx)(a.f,{mode:"wait",children:E?(0,t.jsxs)(r.m.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},style:{background:E.hex},className:"relative w-full h-full",children:[(0,t.jsx)(s.default,{src:E.image,alt:E.name,fill:!0,className:"object-cover"}),(0,t.jsx)("button",{onClick:D,style:y,children:(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]},E.id):(0,t.jsx)(r.m.div,{className:"w-full h-full flex items-center justify-center bg-var(--surface-high)",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-3)",strokeWidth:"2",children:[(0,t.jsx)("circle",{cx:"13.5",cy:"6.5",r:"2.5"}),(0,t.jsx)("circle",{cx:"17.5",cy:"10.5",r:"2.5"}),(0,t.jsx)("circle",{cx:"8.5",cy:"7.5",r:"2.5"}),(0,t.jsx)("circle",{cx:"6.5",cy:"12.5",r:"2.5"}),(0,t.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 011.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"})]})},"empty")})}),k[26]=D,k[27]=E,k[28]=g):g=k[28];let A=E?.name||"Color";return k[29]!==A?(j=(0,t.jsx)("span",{style:b,children:A}),k[29]=A,k[30]=j):j=k[30],k[31]!==g||k[32]!==j?(S=(0,t.jsxs)("div",{style:f,children:[g,j]}),k[31]=g,k[32]=j,k[33]=S):S=k[33],k[34]!==m||k[35]!==S||k[36]!==d?(C=(0,t.jsxs)("div",{className:"flex items-start justify-center gap-6 sm:gap-10",children:[d,h,m,x,S]}),k[34]=m,k[35]=S,k[36]=d,k[37]=C):C=k[37],C}let J=["Preparing the canvas...","Draping the fabric...","Refining the final look...","Adding the finishing touches..."];function Q(e){let n,s,l,d,h,p,u,m,x,g,f,v,y,b,w,j,S,C,k,z=(0,i.c)(27),{selectedColor:R,labels:_}=e;z[0]!==_?(n=void 0===_?{}:_,z[0]=_,z[1]=n):n=z[1];let N=n.phrases||J,[L,D]=(0,o.useState)(0);z[2]!==N.length?(s=()=>{let e=setInterval(()=>{D(e=>(e+1)%N.length)},3e3);return()=>clearInterval(e)},l=[N.length],z[2]=N.length,z[3]=s,z[4]=l):(s=z[3],l=z[4]),(0,o.useEffect)(s,l),z[5]===Symbol.for("react.memo_cache_sentinel")?(d={opacity:0},h={opacity:1},p={opacity:0},u={duration:.6,ease:c},z[5]=d,z[6]=h,z[7]=p,z[8]=u):(d=z[5],h=z[6],p=z[7],u=z[8]),z[9]===Symbol.for("react.memo_cache_sentinel")?(m={maskImage:"radial-gradient(circle at center, black 30%, transparent 70%)",WebkitMaskImage:"radial-gradient(circle at center, black 30%, transparent 70%)"},z[9]=m):m=z[9];let M=R?`linear-gradient(45deg, ${R}, #06b6d4, var(--accent), ${R})`:"linear-gradient(45deg, #8b5cf6, #06b6d4, #ec4899, #8b5cf6)";z[10]!==M?(x={background:M,backgroundSize:"400% 400%",maskImage:"radial-gradient(circle at center, white 1.5px, transparent 1.5px)",WebkitMaskImage:"radial-gradient(circle at center, white 1.5px, transparent 1.5px)",maskSize:"24px 24px",WebkitMaskSize:"24px 24px"},z[10]=M,z[11]=x):x=z[11],z[12]===Symbol.for("react.memo_cache_sentinel")?(g={backgroundPosition:["0% 50%","100% 50%","0% 50%"],opacity:[.5,1,.5],scale:[.95,1.05,.95]},f={duration:10,repeat:1/0,ease:"easeInOut"},z[12]=g,z[13]=f):(g=z[12],f=z[13]),z[14]!==x?(v=(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:(0,t.jsx)("div",{className:"absolute inset-0",style:m,children:(0,t.jsx)(r.m.div,{className:"absolute inset-0",style:x,animate:g,transition:f})})}),z[14]=x,z[15]=v):v=z[15],z[16]===Symbol.for("react.memo_cache_sentinel")?(y={opacity:0,filter:"blur(4px)",y:4},b={opacity:1,filter:"blur(0px)",y:0},w={opacity:0,filter:"blur(4px)",y:-4},j={duration:.8,ease:"easeOut"},z[16]=y,z[17]=b,z[18]=w,z[19]=j):(y=z[16],b=z[17],w=z[18],j=z[19]),z[20]===Symbol.for("react.memo_cache_sentinel")?(S={color:"var(--text-2)"},z[20]=S):S=z[20];let P=N[L];return z[21]!==L||z[22]!==P?(C=(0,t.jsx)("div",{className:"relative z-10 w-full flex items-center justify-center",children:(0,t.jsx)(a.f,{mode:"wait",children:(0,t.jsx)(r.m.p,{initial:y,animate:b,exit:w,transition:j,className:"tracking-wide font-light text-base sm:text-lg text-center px-6",style:S,children:P},L)})}),z[21]=L,z[22]=P,z[23]=C):C=z[23],z[24]!==v||z[25]!==C?(k=(0,t.jsxs)(r.m.div,{className:"relative flex flex-col items-center justify-center w-full py-20 sm:py-28 min-h-[300px]",initial:d,animate:h,exit:p,transition:u,children:[v,C]}),z[24]=v,z[25]=C,z[26]=k):k=z[26],k}let ee={hidden:{opacity:0}
1,show:{opacity:1,transition:{staggerChildren:.1,delayChildren:.3}}},et={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.6,ease:[.16,1,.3,1]}}};function ei(e){let n,l,d,h,u,g,f,v,y,b,w,j,S,C,k,z,R,_,N,L=(0,i.c)(48),{imageUrl:D,remaining:M,labels:P}=e;L[0]!==P?(n=void 0===P?{}:P,L[0]=P,L[1]=n):n=L[1];let T=n,[E,W]=(0,o.useState)(!1),[A,I]=(0,o.useState)(!1),{download:O,share:F,shareCheck:H,shareTitle:B,shareText:U,twitter:Y,whatsapp:Z,facebook:G,generationsRemaining:q}=T,K=void 0===O?"Download":O,V=void 0===F?"Share":F,$=void 0===H?"Copied!":H,X=void 0===B?"My Virtual Try-On Look":B,J=void 0===U?"Check out my virtual try-on look! ✨":U,Q=void 0===Y?"Share on X":Y,ei=void 0===Z?"Share on WhatsApp":Z,er=void 0===G?"Share on Facebook":G,en=void 0===q?"{n} of 3 free generations remaining":q;L[2]!==D?(l=async()=>{try{let e=await fetch(D),t=await e.blob(),i=URL.createObjectURL(t),o=document.createElement("a");o.href=i,o.download=`virtual-tryon-${Date.now()}.png`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)}catch{window.open(D,"_blank")}},L[2]=D,L[3]=l):l=L[3];let ea=l;L[4]!==D||L[5]!==J||L[6]!==X?(d=async()=>{if(navigator.share)try{await navigator.share({title:X,text:J,url:window.location.href})}catch{}else await navigator.clipboard.writeText(D),I(!0),setTimeout(()=>I(!1),2e3)},L[4]=D,L[5]=J,L[6]=X,L[7]=d):d=L[7];let es=d;L[8]!==J?(h=()=>{let e=encodeURIComponent(J),t=encodeURIComponent(window.location.href);window.open(`https://twitter.com/intent/tweet?text=${e}&url=${t}`,"_blank")},L[8]=J,L[9]=h):h=L[9];let el=h;L[10]!==J?(u=()=>{let e=encodeURIComponent(J+" "+window.location.href);window.open(`https://wa.me/?text=${e}`,"_blank")},L[10]=J,L[11]=u):u=L[11];let ec=u;return L[12]===Symbol.for("react.memo_cache_sentinel")?(g={opacity:0},f={opacity:1},v={opacity:0},L[12]=g,L[13]=f,L[14]=v):(g=L[12],f=L[13],v=L[14]),L[15]===Symbol.for("react.memo_cache_sentinel")?(y={duration:.6,ease:[.16,1,.3,1]},L[15]=y):y=L[15],L[16]===Symbol.for("react.memo_cache_sentinel")?(b={aspectRatio:"2/3",background:"var(--surface-low)"},w={filter:"blur(24px)",scale:1.02,opacity:0},L[16]=b,L[17]=w):(b=L[16],w=L[17]),L[18]!==E?(j=E?{filter:"blur(0px)",scale:1,opacity:1}:{filter:"blur(24px)",scale:1.02,opacity:0},L[18]=E,L[19]=j):j=L[19],L[20]===Symbol.for("react.memo_cache_sentinel")?(S={duration:.8,ease:[.16,1,.3,1]},L[20]=S):S=L[20],L[21]===Symbol.for("react.memo_cache_sentinel")?(C=()=>W(!0),L[21]=C):C=L[21],L[22]!==D||L[23]!==X?(k=(0,t.jsx)(s.default,{src:D,alt:X,fill:!0,className:"object-cover",onLoad:C,unoptimized:!0}),L[22]=D,L[23]=X,L[24]=k):k=L[24],L[25]!==j||L[26]!==k?(z=(0,t.jsx)(r.m.div,{className:"relative w-full rounded-lg overflow-hidden",style:b,initial:w,animate:j,transition:S,children:k}),L[25]=j,L[26]=k,L[27]=z):z=L[27],L[28]!==A||L[29]!==K||L[30]!==er||L[31]!==en||L[32]!==ea||L[33]!==es||L[34]!==E||L[35]!==M||L[36]!==V||L[37]!==$||L[38]!==el||L[39]!==ec||L[40]!==Q||L[41]!==ei?(R=E&&(0,t.jsxs)(r.m.div,{className:"w-full flex flex-col gap-4 mt-6",variants:ee,initial:"hidden",animate:"show",exit:"hidden",children:[(0,t.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,t.jsxs)(r.m.button,{onClick:ea,className:"flex-1",style:p,variants:et,whileHover:{y:-2,background:"linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%)",transition:{duration:.28,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:[(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,t.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,t.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),K]}),(0,t.jsx)(r.m.button,{onClick:es,style:m,variants:et,whileHover:{y:-2,borderColor:"var(--accent)",background:"var(--accent-soft)",transition:{duration:.28,ease:c}},whileTap:{scale:.93,transition:{duration:.1}},title:A?$:V,children:(0,t.jsx)(a.f,{mode:"wait",children:A?(0,t.jsx)(r.m.svg,{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",initial:{scale:.6,opacity:0}
1,animate:{scale:1,opacity:1},exit:{scale:.6,opacity:0},transition:{type:"spring",duration:.35,bounce:.2},children:(0,t.jsx)("path",{d:"M3 8L6.5 11.5L13 5",stroke:"var(--success)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})},"check"):(0,t.jsxs)(r.m.svg,{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{scale:.6,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.6,opacity:0},transition:{type:"spring",duration:.35,bounce:.2},children:[(0,t.jsx)("circle",{cx:"18",cy:"5",r:"3"}),(0,t.jsx)("circle",{cx:"6",cy:"12",r:"3"}),(0,t.jsx)("circle",{cx:"18",cy:"19",r:"3"}),(0,t.jsx)("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),(0,t.jsx)("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]},"share")})})]}),(0,t.jsxs)(r.m.div,{className:"flex items-center justify-center gap-2 mt-3",variants:et,children:[(0,t.jsx)(r.m.button,{onClick:el,style:x,variants:et,whileHover:{y:-2,borderColor:"var(--accent)",background:"var(--accent-soft)",color:"var(--text)",transition:{duration:.28,ease:c}},whileTap:{scale:.9,transition:{duration:.1}},title:Q,"aria-label":Q,children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),(0,t.jsx)(r.m.button,{onClick:ec,style:x,variants:et,whileHover:{y:-2,borderColor:"var(--accent)",background:"var(--accent-soft)",color:"var(--text)",transition:{duration:.28,ease:c}},whileTap:{scale:.9,transition:{duration:.1}},title:ei,"aria-label":ei,children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}),(0,t.jsx)(r.m.button,{onClick:eo,style:x,variants:et,whileHover:{y:-2,borderColor:"var(--accent)",background:"var(--accent-soft)",color:"var(--text)",transition:{duration:.28,ease:c}},whileTap:{scale:.9,transition:{duration:.1}},title:er,"aria-label":er,children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})})]}),(0,t.jsx)(r.m.div,{className:"flex flex-col items-center gap-2 mt-0",variants:et,children:(0,t.jsx)("p",{className:"text-[10px]",style:{color:"var(--text-3)"},children:en.replace("{n}",M.toString())})})]}),L[28]=A,L[29]=K,L[30]=er,L[31]=en,L[32]=ea,L[33]=es,L[34]=E,L[35]=M,L[36]=V,L[37]=$,L[38]=el,L[39]=ec,L[40]=Q,L[41]=ei,L[42]=R):R=L[42],L[43]!==R?(_=(0,t.jsx)(a.f,{children:R}),L[43]=R,L[44]=_):_=L[44],L[45]!==z||L[46]!==_?(N=(0,t.jsxs)(r.m.div,{className:"flex flex-col items-center",initial:g,animate:f,exit:v,transition:y,children:[z,_]}
1),L[45]=z,L[46]=_,L[47]=N):N=L[47],N}function eo(){let e=encodeURIComponent(window.location.href);window.open(`https://www.facebook.com/sharer/sharer.php?u=${e}`,"_blank")}function er(e){let o,n,a,s,l,c,m,x,g,f,v,y,b,w,S,C,k,z,R,_,N,L=(0,i.c)(33),{onClose:D,title:M,description:P}=e,T=void 0===M?"Limit Reached":M,E=void 0===P?"You've reached the limit for guest generations.":P;return L[0]===Symbol.for("react.memo_cache_sentinel")?(o={opacity:0},n={opacity:1},a={opacity:0},L[0]=o,L[1]=n,L[2]=a):(o=L[0],n=L[1],a=L[2]),L[3]!==D?(s=(0,t.jsx)(r.m.div,{className:"absolute inset-0 bg-black/40 backdrop-blur-md",initial:o,animate:n,exit:a,onClick:D}),L[3]=D,L[4]=s):s=L[4],L[5]===Symbol.for("react.memo_cache_sentinel")?(c={opacity:0,scale:.9,y:20},m={opacity:1,scale:1,y:0},x={opacity:0,scale:.9,y:20},l={type:"spring",damping:25,stiffness:350},L[5]=l,L[6]=c,L[7]=m,L[8]=x):(l=L[5],c=L[6],m=L[7],x=L[8]),L[9]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)("div",{style:j,children:(0,t.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M12 2v4"}),(0,t.jsx)("path",{d:"M12 18v4"}),(0,t.jsx)("path",{d:"M4.93 4.93l2.83 2.83"}),(0,t.jsx)("path",{d:"M16.24 16.24l2.83 2.83"}),(0,t.jsx)("path",{d:"M2 12h4"}),(0,t.jsx)("path",{d:"M18 12h4"}),(0,t.jsx)("path",{d:"M4.93 19.07l2.83-2.83"}),(0,t.jsx)("path",{d:"M16.24 7.76l2.83-2.83"})]})}),f={...d,marginBottom:"8px"},L[9]=g,L[10]=f):(g=L[9],f=L[10]),L[11]!==T?(v=(0,t.jsx)("h2",{style:f,children:T}),L[11]=T,L[12]=v):v=L[12],L[13]===Symbol.for("react.memo_cache_sentinel")?(y={...h,marginBottom:"32px"},L[13]=y):y=L[13],L[14]!==E?(b=(0,t.jsx)("p",{style:y,children:E}),L[14]=E,L[15]=b):b=L[15],L[16]===Symbol.for("react.memo_cache_sentinel")?(w={y:-2},S={scale:.97},L[16]=w,L[17]=S):(w=L[16],S=L[17]),L[18]!==D?(C=(0,t.jsx)(r.m.button,{onClick:D,style:p,whileHover:w,whileTap:S,children:"I Understand"}),L[18]=D,L[19]=C):C=L[19],L[20]===Symbol.for("react.memo_cache_sentinel")?(k={...u,border:"none",background:"transparent"},L[20]=k):k=L[20],L[21]!==D?(z=(0,t.jsx)("button",{onClick:D,style:k,className:"text-xs font-medium opacity-60",children:"Maybe Later"}),L[21]=D,L[22]=z):z=L[22],L[23]!==C||L[24]!==z?(R=(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[C,z]}),L[23]=C,L[24]=z,L[25]=R):R=L[25],L[26]!==v||L[27]!==b||L[28]!==R?(_=(0,t.jsxs)(r.m.div,{className:"relative w-full max-w-sm bg-[var(--surface-card)] rounded-[32px] p-8 shadow-2xl overflow-hidden",initial:c,animate:m,exit:x,transition:l,children:[g,v,b,R]}),L[26]=v,L[27]=b,L[28]=R,L[29]=_):_=L[29],L[30]!==_||L[31]!==s?(N=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-6",children:[s,_]}),L[30]=_,L[31]=s,L[32]=N):N=L[32],N}let en={type:"spring",damping:30,stiffness:300};function ea(e){let n,s,l,d=(0,i.c)(10),{isOpen:h,onClose:p,children:u,title:m}=e,x=(0,o.useRef)(null);d[0]!==p?(n=(e,t)=>{(t.velocity.y>300||t.offset.y>100)&&p()},d[0]=p,d[1]=n):n=d[1];let g=n;return d[2]!==u||d[3]!==g||d[4]!==h||d[5]!==p||d[6]!==m?(s=h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.m.div,{style:S,onClick:p,initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.35,ease:c}}),(0,t.jsxs)(r.m.div,{ref:x,style:C,initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:en,drag:"y",dragConstraints:{top:0},dragElastic:.15,onDragEnd:g,children:[(0,t.jsx)("div",{style:k}),m&&(0,t.jsx)("div",{className:"px-5 pt-2 pb-3",style:{background:"var(--surface-high)"},children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-center",style:{color:"var(--text)"},children:m})}),(0,t.jsx)("div",{className:"px-5 py-5 pb-8",children:u})]})]}),d[2]=u,d[3]=g,d[4]=h,d[5]=p,d[6]=m,d[7]=s):s=d[7],d[8]!==s?(l=(0,t.jsx)(a.f,{children:s}),d[8]=s,d[9]=l):l=d[9],l}let es="tryon_guest_gen_count",el=[{id:"kandora",name:"Emirati Kandora",image:"/Tryon/styles/emirati-kandora.jpg"},{id:"saudi",name:"Saudi Thobe",image:"/Tryon/styles/saudi-thobe.jpg"},{id:"qatari",name:"Qatari Thobe",image:"/Tryon/styles/qatri-thobe.jpg"}],ec=[{id:"white",name:"White",hex:"#FFFFFF",image:"/Tryon/colors/white.webp",promptName:"pure white",isLight:!0},{id:"grey",name:"Grey",hex:"#9E9E9E",image:"/Tryon/colors/grey.webp",promptName:"medium grey",isLight:!1},{id:"cream",name:"Pale Cream",hex:"#F5F0E0",image:"/Tryon/colors/cream.webp",promptName:"pale cream ivory",isLight:!0},{id:"sky",name:"Light Sky",hex:"#B8D4E8",image:"/Tryon/colors/sky.webp",promptName:"light sky blue",isLight:!0},{id:"sage",name:"Sage Green",hex:"#8FA880",image:"/Tryon/colors/sage.webp",promptName:"sage green",isLight:!1},{id:"navy",name:"Dark Blue",hex:"#1B2A4A",image:"/Tryon/colors/navy.webp",promptName:"dark navy blue",isLight:!1},{id:"charcoal",name:"Charcoal Grey",hex:"#3D4046",image:"/Tryon/colors/charcoal.webp",promptName:"charcoal grey",isLight:!1},{id:"camel",name:"Warm Dark Camel",hex:"#8B6914",image:"/Tryon/colors/camel.webp",promptName:"warm dark camel brown",isLight:!1}],ed="tryon_gen_count",eh="tryon-count-change";function ep(e){try{document.cookie=`${ed}=${e}; max-age=31536000; path=/; SameSite=Lax`}catch{}}function eu(){let e=0;try{let t=localStorage.getItem(es);e=t&&parseInt(t,10)||0}catch{e=0}let t=function(){try{let e=document.cookie.match(RegExp(`(?:^|; )${ed}=([^;]*)`));return e&&parseInt(e[1],10)||0}catch{return 0}}(),i=Math.max(e,t);if(e<i)try{localStorage.setItem(es,String(i))}catch{}return t<i&&ep(i),i}function em(e){let t=()=>e();return window.addEventListener("storage",t),window.addEventListener(eh,t),()=>{window.removeEventListener("storage",t),window.removeEventListener(eh,t)}}function ex(){let e,t=(0,i.c)(4),r=(0,o.useSyncExternalStore)(em,eu,ef),n=Math.max(0,3-r),a=n>0;return t[0]!==a||t[1]!==r||t[2]!==n?(e={count:r,remaining:n,canGenerate:a,increment:eg,loaded:!0,reset:ev},t[0]=a,t[1]=r,t[2]=n,t[3]=e):e=t[3],e}function eg(){let e=eu()+1;try{localStorage.setItem(es,String(e))}catch{}ep(e),window.dispatchEvent(new Event(eh))}function ef(){return 0}function ev(){try{localStorage.removeItem(es),document.cookie=`${ed}=0; max-age=0; path=/`,window.dispatchEvent(new Event(eh)),setTimeout(()=>window.location.reload(),100)}catch{}}function ey(){return!1}let eb={uploadTitle:"Try It On",uploadSubtitle:"Upload a photo to see how our thobes look on you",chooseStyle:"Choose Your Style",chooseStyleDescription:"Select from our signature traditional styles",browseStyles:"Browse Styles",chooseColor:"Choose Your Color",chooseColorDescription:"Select from our premium color collection",browseColors:"Browse Colors",generateLook:"Generate Your Look",startOver:"Start Over",errorFallback:"Something went wrong.",loadingPhrases:["Preparing the canvas...","Draping the fabric...","Refining the final look...","Adding the finishing touches..."],resultTitle:"Your Virtual Try-On",limitReachedTitle:"Limit Reached",limitReachedDescription:"You've reached the limit for guest generations.",yourPhotoLabel:"Your Photo",styleLabel:"Style",colorLabel:"Color",downloadLabel:"Download",shareLabel:"Share",generationsRemainingLabel:"{n} of 3 free generations remaining",cropTitle:"Crop Your Photo",cancelLabel:"Cancel",confirmLabel:"Confirm"},ew={type:"spring",stiffness:300,damping:30},ej={duration:.5,ease:c},eS={initial:{opacity:0,y:16,scale:.97}
1,animate:{opacity:1,y:0,scale:1,transition:ej},exit:{opacity:0,y:-10,scale:.97,transition:{duration:.28,ease:c}}};function eC({apiEndpoint:e="/api/generate",labels:n,styles:s=el,colors:u=ec}){var m;let x,f,v,y,b,w=(0,o.useMemo)(()=>({...eb,...n}),[n]),[j,S]=(0,o.useState)(null),[C,k]=(0,o.useState)(!1),[z,R]=(0,o.useState)(null),[_,L]=(0,o.useState)(null),[D,M]=(0,o.useState)(null),[P,T]=(0,o.useState)("idle"),[E,W]=(0,o.useState)(null),[A,I]=(0,o.useState)(null),[O,F]=(0,o.useState)(!1),[H,B]=(0,o.useState)(!1),[U,Z]=(0,o.useState)(!1),[G,K]=(0,o.useState)(!1),{remaining:V,canGenerate:J,increment:ee}=ex(),et=(m="(max-width: 767px)",(v=(0,i.c)(4))[0]!==m?(x=e=>{let t=window.matchMedia(m),i=()=>e();return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},v[0]=m,v[1]=x):x=v[1],y=x,v[2]!==m?(f=()=>window.matchMedia(m).matches,v[2]=m,v[3]=f):f=v[3],b=f,(0,o.useSyncExternalStore)(y,b,ey)),eo=(0,o.useCallback)(e=>{S(e),k(!0)},[]),en=(0,o.useCallback)(e=>{R(e),k(!1)},[]),es=(0,o.useCallback)(()=>{k(!1),S(null)},[]),ed=(0,o.useCallback)(()=>{R(null),S(null)},[]),eh=(0,o.useCallback)(()=>{L(null),M(null)},[]),ep=(0,o.useCallback)(()=>{M(null)},[]),eu=(0,o.useCallback)(()=>{et&&Z(!0)},[et]),em=(0,o.useCallback)(e=>{L(e),et&&Z(!1)},[et]),eg=(0,o.useCallback)(e=>{M(e),et&&K(!1)},[et]),ef=(0,o.useCallback)(async()=>{if(!z||!_||!D)return;if(!J)return void F(!0);B(!0),T("loading"),I(null);let t=u.find(e=>e.id===D);try{let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image:z,style:_,color:t?.promptName||"white"})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.error||w.errorFallback)}let o=await i.json();W(o.imageUrl),ee(),T("result")}catch(e){I(e instanceof Error?e.message:w.errorFallback),T("idle")}finally{B(!1)}},[z,_,D,J,ee,u,e,w.errorFallback]),ev=(0,o.useCallback)(()=>{L(null),M(null),W(null),T("idle"),I(null)},[]),ek=(0,o.useCallback)(()=>{R(null),S(null),L(null),M(null),W(null),T("idle"),I(null)},[]),ez="loading"===P?"loading":"result"===P?"result":z?_?D?"generate":et?"color-prompt":"color":et?"style-prompt":"style":"upload",eR=z&&_&&D&&J;return(0,t.jsxs)("div",{style:l,children:[(0,t.jsx)(a.f,{children:C&&j&&(0,t.jsx)(Y,{imageSrc:j,onDone:en,onCancel:es,labels:{title:w.cropTitle,cancel:w.cancelLabel,confirm:w.confirmLabel}})}),(0,t.jsx)(a.f,{children:O&&(0,t.jsx)(er,{onClose:()=>F(!1),title:w.limitReachedTitle,description:w.limitReachedDescription})}),et&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ea,{isOpen:U,onClose:()=>Z(!1),title:w.chooseStyle,children:(0,t.jsx)(q,{selected:_,onSelect:em,title:w.chooseStyle,description:w.chooseStyleDescription,styles:s})}),(0,t.jsx)(ea,{isOpen:G,onClose:()=>K(!1),title:w.chooseColor,children:_&&(0,t.jsx)($,{styleId:_,selected:D,onSelect:eg,title:w.chooseColor,description:w.chooseColorDescription,colors:u,styles:s})})]}),(0,t.jsxs)(r.m.div,{className:"w-full max-w-[580px] mx-auto",style:g,layout:!0,layoutId:"atelier-card",initial:{opacity:0,y:20,scale:.96},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:300,damping:30,layout:ew},children:[(0,t.jsx)(r.m.div,{className:"p-5 sm:p-7",layout:!0,transition:ew,children:(0,t.jsxs)(a.f,{mode:"wait",initial:!1,children:["upload"===ez&&(0,t.jsx)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",children:(0,t.jsx)(N,{croppedImage:null,onImageSelected:eo,onRemove:ed,labels:{yourPhoto:w.yourPhotoLabel,uploadPhoto:w.uploadTitle,browseSubtitle:w.uploadSubtitle}})},"upload"),"style"===ez&&(0,t.jsx)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",children:(0,t.jsx)(q,{selected:_,onSelect:em,title:w.chooseStyle,description:w.chooseStyleDescription,styles:s})},"style"),"style-prompt"===ez&&(0,t.jsxs)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col items-center",children:[(0,t.jsx)("h2",{style:d,children:w.chooseStyle}),(0,t.jsx)("p",{style:h,children:w.chooseStyleDescription}),(0,t.jsxs)(r.m.button,{onClick:eu,className:"mt-5 w-full",style:p,whileHover:{y:-2,background:"linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%)",transition:{duration:.28,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:[(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20.38 3.46L16 2 12 5.5 8 2l-4.38 1.46a2 2 0 00-1.34 2.26l1.59 7.93c.17.85.69 1.57 1.41 1.97L12 19l6.72-3.88a2.5 2.5 0 001.41-1.97l1.59-7.93a2 2 0 00-1.34-2.26z"})}),w.browseStyles]})]},"style-prompt"),"color"===ez&&(0,t.jsx)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",children:(0,t.jsx)($,{styleId:_,selected:D,onSelect:eg,title:w.chooseColor,description:w.chooseColorDescription,colors:u,styles:s})},"color"),"color-prompt"===ez&&(0,t.jsxs)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col items-center",children:[(0,t.jsx)("h2",{style:d,children:w.
1chooseColor}),(0,t.jsx)("p",{style:h,children:w.chooseColorDescription}),(0,t.jsxs)(r.m.button,{onClick:()=>K(!0),className:"mt-5 w-full",style:p,whileHover:{y:-2,background:"linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%)",transition:{duration:.28,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:[(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"13.5",cy:"6.5",r:"2.5"}),(0,t.jsx)("circle",{cx:"17.5",cy:"10.5",r:"2.5"}),(0,t.jsx)("circle",{cx:"8.5",cy:"7.5",r:"2.5"}),(0,t.jsx)("circle",{cx:"6.5",cy:"12.5",r:"2.5"}),(0,t.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 011.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"})]}),w.browseColors]})]},"color-prompt"),"generate"===ez&&(0,t.jsxs)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col items-center",children:[(0,t.jsxs)(r.m.button,{onClick:ef,disabled:!eR||H,className:"w-full",style:{...p,opacity:!eR||H?.45:1,cursor:!eR||H?"not-allowed":"pointer"},whileHover:{background:!eR||H?"linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%)":"linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%)",scale:!eR||H?1:1.015,y:!eR||H?0:-2,transition:{duration:.3,ease:c}},whileTap:{scale:.97,transition:{duration:.1}},children:[(0,t.jsx)(r.m.span,{className:"absolute inset-0",style:{background:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%)",backgroundSize:"200% 100%"},animate:{backgroundPosition:["200% center","-200% center"]},transition:{duration:3,ease:"easeInOut",repeat:1/0}}),(0,t.jsx)(a.f,{mode:"wait",children:H?(0,t.jsx)(r.m.span,{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full inline-block",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1,rotate:360},exit:{opacity:0,scale:.8},transition:{opacity:{duration:.2},scale:{duration:.2},rotate:{duration:.8,repeat:1/0,ease:"linear"}}},"spinner"):(0,t.jsxs)(r.m.span,{className:"flex items-center gap-2.5",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},children:[(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})}),w.generateLook]},"text")})]}),A&&(0,t.jsx)(r.m.p,{className:"text-xs mt-3 font-medium",style:{color:"var(--error)"},initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.4,ease:c},children:A})]},"generate"),"loading"===ez&&(0,t.jsx)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",transition:ej,children:(0,t.jsx)(Q,{selectedColor:D?u.find(e=>e.id===D)?.hex:void 0,labels:{phrases:w.loadingPhrases}})},"loading"),"result"===ez&&E&&(0,t.jsx)(r.m.div,{variants:eS,initial:"initial",animate:"animate",exit:"exit",transition:ej,children:(0,t.jsx)(ei,{imageUrl:E,onTryAgain:ev,onStartOver:ek,canGenerate:J,remaining:V,labels:{download:w.downloadLabel,share:w.shareLabel,generationsRemaining:w.generationsRemainingLabel}})},"result")]})}),"idle"===P&&(z||_||D)&&(0,t.jsx)(r.m.div,{className:"px-5 sm:px-7 pb-5 sm:pb-7 pt-0",layout:!0,transition:ew,initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},children:(0,t.jsx)("div",{className:"pt-4",style:{background:"var(--surface-high)",borderRadius:"22px",paddingInline:"12px",paddingBlock:"12px"},children:(0,t.jsx)(X,{croppedImage:z,styleId:_,colorId:D,onRemovePhoto:ed,onRemoveStyle:eh,onRemoveColor:ep,styles:s,colors:u})})}),"idle"===P&&z&&(0,t.jsx)(r.m.div,{className:"px-5 sm:px-7 pb-4",initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.45,delay:.15,ease:c},children:(0,t.jsx)("div",{className:"flex items-center justify-center gap-1",children:(0,t.jsxs)("button",{onClick:ek,className:"text-xs font-medium flex items-center gap-1.5",style:{color:"var(--text-3)"},children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,t.jsx)("path",{d:"M20.49 15a9 9 0 11-2.12-9.36L23 10"})]}),w.startOver]})})})]})]})}var ek=e.i(74191),ez=e.i(931894),eR=e.i(346768);let e_=(0,eR.f)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),eN=(0,eR.f)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);var eL=e.i(469193),eD=e.i(436422),eM=e.i(887753),eP=e.i(592634);let eT=[.22,1,.36,1],eE={hidden:{opacity:0,y:12},visible:{opacity:1,y:0}},eW={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0}},eA={hidden:{opacity:0,x:20},visible:{opacity:1,x:0}},eI={hidden:{},visible:{transition:{staggerChildren:.06}}},eO=[{number:"01",title:"Upload Your Photo",desc:"Upload a clear front-facing photo of yourself. Once uploaded, use the crop tool to frame yourself perfectly for the best result.",icon:(0,t.jsx)(e_,{className:"size-5"})},{number:"02",title:"Pick Your Thobe Style",desc:"Choose the regional style that speaks to you. Each style carries its own distinct cut, collar, and silhouette. Try them all and see which one feels like you.",icon:(0,t.jsx)(eL.f,{className:"size-5"}),tags:["Emirati Kandora","Saudi Thobe","Kuwaiti Thobe","Qatari Thobe","Omani Dishdasha"]},{number:"03",title:"Choose Your Colour",desc:"Browse through our colour palette and select the shade you want to see on yourself. Classic white, rich earth tones, deep neutrals; the choice is yours.",icon:(0,t.jsx)(eN,{className:"size-5"})},{number:"04",title:"Hit Generate Look",desc:"Press the button and let our AI do the rest. Your personalised look appears in seconds.",icon:(0,t.jsx)(eL.f,{className:"size-5"})}];function eF(e,i){return(0,t.jsxs)(r.m.div,{variants:eE,transition:{duration:.5,ease:eT},className:"group grid grid-cols-1 md:grid-cols-[80px_1fr_1fr] gap-4 md:gap-12 py-10 md:py-14 border-t border-primary/10 last:border-b",children:[(0,t.jsx)("div",{className:"hidden md:flex items-start pt-1",children:(0,t.jsx)("span",{className:"font-heading font-medium text-primary/20 group-hover:text-primary/40 transition-colors duration-300",style:{fontSize:"clamp(2.5rem, 4vw, 4rem)",lineHeight:1},children:e.number})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3 md:mb-4",children:[(0,t.jsx)("div",{className:"w-9 h-9 rounded-xl bg-primary/10 text-primary flex items-center justify-center group-hover:scale-105 transition-transform duration-300",children:e.icon}),(0,t.jsx)("span",{className:"md:hidden font-sans text-xs font-bold text-primary/40 tracking-widest",children:e.number})]}),(0,t.jsx)("h3",{className:"font-heading font-medium text-foreground tracking-tight",style:{fontSize:"clamp(1.2rem, 2vw, 1.6rem)"},children:e.title})]}),(0,t.jsxs)("div",{className:"md:pt-0",children:[(0,t.jsx)("p",{className:"font-sans text-muted-foreground leading-relaxed",style:{fontSize:"clamp(0.92rem, 0.96vw, 1.02rem)"},children:e.desc}),e.tags&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-5",children:e.tags.map(eH)})]})]},e.number)}function eH(e){return(0,t.jsx)("span",{className:"px-3.5 py-1.5 rounded-full bg-[#E5DFD3] text-foreground text-xs font-sans font-medium",children:e},e)}e.s(["default",0,function(){let e,a,s,l,c,d,h,p,u,m,x,g,f,v,y,b,w,j,S,C,k,z,R,_,N,L,D,M,P,T,E,W=(0,i.c)(40);ex();let A=(0,o.useRef)(null),I=(0,o.useRef)(null),O=(0,o.useRef)(null);W[0]===Symbol.for("react.memo_cache_sentinel")?(e={once:!0,amount:.1,margin:"0px 0px -8% 0px"},W[0]=e):e=W[0];let F=(0,n.f)(A,e);W[1]===Symbol.for("react.memo_cache_sentinel")?(a={once:!0,amount:.12,margin:"0px 0px -8% 0px"},W[1]=a):a=W[1];let H=(0,n.f)(I,a);W[2]===Symbol.for("react.memo_cache_sentinel")?(s={once:!0,amount:.15,margin:"0px 0px -8% 0px"},W[2]=s):s=W[2];let B=(0,n.f)(O,s);W[3]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(eP.PageHero,{title:"See Yourself in a Kandora",description:"No guessing. No second thoughts. Upload your photo and see the result in seconds.",size:"md",className:"mb-10 md:mb-16"}),W[3]=l):l=W[3],W[4]===Symbol.for("react.memo_cache_sentinel")?(c={opacity:0,y:32},d={opacity:1,y:0},W[4]=c,W[5]=d):(c=W[4],d=W[5]),W[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)("section",{className:"pb-12 sm:pb-16 relative",children:(0,t.jsx)("div",{className:"relative z-10 px-4 sm:px-6 pb-8 sm:pb-12",children:(0,t.jsx)(r.m.div,{initial:c,animate:d,transition:{duration:1,delay:.15,ease:[.32,.72,0,1]},children:(0,t.jsx)(eC,{})})})}),W[6]=h):h=W[6];let U=F?"visible":"hidden";W[7]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(r.m.span,{variants:eE,transition:{duration:.4,ease:eT},className:"inline-block text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground mb-6",children:"How It Works"}
1),W[7]=p):p=W[7],W[8]===Symbol.for("react.memo_cache_sentinel")?(u={duration:.5,ease:eT},W[8]=u):u=W[8],W[9]===Symbol.for("react.memo_cache_sentinel")?(m={fontSize:"clamp(2rem, 4vw, 3.5rem)"},W[9]=m):m=W[9],W[10]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsxs)(r.m.h2,{variants:eE,transition:u,className:"font-heading font-medium tracking-tight text-foreground leading-[1.1] text-balance",style:m,children:["Four steps."," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"Under a minute."})]}),W[10]=x):x=W[10],W[11]!==U?(g=(0,t.jsxs)(r.m.div,{initial:"hidden",animate:U,variants:eI,className:"mb-16 md:mb-24 max-w-xl",children:[p,x]}),W[11]=U,W[12]=g):g=W[12];let Y=F?"visible":"hidden";W[13]===Symbol.for("react.memo_cache_sentinel")?(f=eO.map(eF),W[13]=f):f=W[13],W[14]!==Y?(v=(0,t.jsx)(r.m.div,{initial:"hidden",animate:Y,variants:eI,className:"space-y-0",children:f}),W[14]=Y,W[15]=v):v=W[15],W[16]!==g||W[17]!==v?(y=(0,t.jsx)("section",{ref:A,className:"py-20 sm:py-28 md:py-36 px-6 sm:px-8 bg-background",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto",children:[g,v]})}),W[16]=g,W[17]=v,W[18]=y):y=W[18];let Z=H?"visible":"hidden";W[19]===Symbol.for("react.memo_cache_sentinel")?(b={duration:.6,ease:eT},w=(0,t.jsx)("span",{className:"inline-block text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground mb-8",children:"Why This Changes Everything"}),W[19]=b,W[20]=w):(b=W[19],w=W[20]),W[21]===Symbol.for("react.memo_cache_sentinel")?(j={fontSize:"clamp(2rem, 3.5vw, 3rem)"},W[21]=j):j=W[21],W[22]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsxs)(r.m.div,{variants:eW,transition:b,children:[w,(0,t.jsxs)("blockquote",{className:"font-heading font-medium text-foreground leading-[1.15] tracking-tight mb-8",style:j,children:["“Will it actually look good on me?”",(0,t.jsx)("span",{className:"block text-muted-foreground mt-2",style:{fontSize:"clamp(1.4rem, 2.5vw, 2rem)"},children:"That question stops here."})]}),(0,t.jsx)("div",{className:"w-16 h-[3px] bg-primary rounded-full"})]}),W[22]=S):S=W[22],W[23]===Symbol.for("react.memo_cache_sentinel")?(C={duration:.6,delay:.15,ease:eT},W[23]=C):C=W[23],W[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(r.m.div,{variants:eA,transition:C,className:"lg:pt-8",children:(0,t.jsxs)("div",{className:"font-sans text-muted-foreground leading-[1.8] space-y-6",style:{fontSize:"clamp(0.95rem, 1vw, 1.1rem)"},children:[(0,t.jsx)("p",{children:"Shopping for a Thobe online has always come with one big question: will it actually look good on me?"}),(0,t.jsx)("p",{children:"Most men spend days going back and forth before placing an order. With AI Try On, you see the answer in under a minute. You walk into your order with full confidence, knowing exactly how your Thobe will look on your frame, in your chosen style, in your chosen colour."}),(0,t.jsx)("p",{className:"text-foreground font-medium leading-[1.7]",children:"No more size anxiety. No more style hesitation. Just a clear picture of you looking exactly how you want to look."})]})}),W[24]=k):k=W[24],W[25]!==Z?(z=(0,t.jsx)("section",{ref:I,className:"pb-20 sm:pb-28 md:pb-36 px-6 sm:px-8 bg-background",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,t.jsxs)(r.m.div,{initial:"hidden",animate:Z,variants:eI,className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-start",children:[S,k]})})}),W[25]=Z,W[26]=z):z=W[26];let G=B?"visible":"hidden";return W[27]===Symbol.for("react.memo_cache_sentinel")?(R={duration:.5,ease:eT},W[27]=R):R=W[27],W[28]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(r.m.h2,{variants:eE,transition:R,className:"font-heading font-medium tracking-tight text-foreground leading-[1.15] text-balance mb-3",style:{fontSize:"clamp(1.5rem, 2.5vw, 2.2rem)"},children:"Loved the Look? Order It Today."}),W[28]=_):_=W[28],W[29]===Symbol.for("react.memo_cache_sentinel")?(N={duration:.5,delay:.1,ease:eT},W[29]=N):N=W[29],W[30]===Symbol.for("react.memo_cache_sentinel")?(L=(0,t.jsxs)("div",{children:[_,(0,t.jsx)(r.m.p,{variants:eE,transition:N,className:"font-sans text-muted-foreground leading-relaxed max-w-lg",style:{fontSize:"clamp(0.9rem, 0.95vw, 1.05rem)"},children:"Once you find the style and colour that works for you, our team takes it from there. Precise measurements, premium fabric, and delivery straight to your door."})]}),W[30]=L):L=W[30],W[31]===Symbol.for("react.memo_cache_sentinel")?(D={duration:.5,delay:.15,ease:eT},W[31]=D):D=W[31],W[32]===Symbol.for("react.memo_cache_sentinel")?(M=(0,eM.a)("Hi there! I would like to order a thobe."),W[32]=M):M=W[32],W[33]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsx)(r.m.div,{variants:eE,transition:D,children:(0,t.jsx)(ez.default,{href:M,target:"_blank",rel:"noopener noreferrer",children:(0,t.jsxs)(ek.K,{size:"lg",className:"h-14 px-10 rounded-full font-heading font-semibold text-sm tracking-wide group whitespace-nowrap",children:["Order Your Thobe",(0,t.jsx)(eD.f,{className:"size-4 ml-2 transition-transform group-hover:translate-x-1"})]})})}),W[33]=P):P=W[33],W[34]!==G?(T=(0,t.jsx)("section",{ref:O,className:"pb-20 sm:pb-28 md:pb-36 px-6 sm:px-8 bg-background",children:(0,t.jsx)("div",{className:"max-w-5xl mx-auto",children:(0,t.jsxs)(r.m.div,{initial:"hidden",animate:G,variants:eI,className:"grid grid-cols-1 lg:grid-cols-[1fr_auto] gap-8 lg:gap-12 items-center rounded-[2.5rem] p-10 sm:p-14 bg-[#E5DFD3]",children:[L,P]})})}),W[34]=G,W[35]=T):T=W[35],W[36]!==y||W[37]!==z||W[38]!==T?(E=(0,t.jsxs)("main",{className:"min-h-dvh flex flex-col",children:[l,h,y,z,T]}
1),W[36]=y,W[37]=z,W[38]=T,W[39]=E):E=W[39],E}],997835)},41875,(e,t,i)=>{var o=!!("u">typeof window&&window.document&&window.document.createElement);t.exports={canUseDOM:o,canUseWorkers:"u">typeof Worker,canUseEventListeners:o&&!!(window.addEventListener||window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o}},218053,(e,t,i)=>{var o,r=e.r(41875);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var i="on"+e,n=i in document;if(!n){var a=document.createElement("div");a.setAttribute(i,"return;"),n="function"==typeof a[i]}return!n&&o&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}},685846,(e,t,i)=>{var o=e.r(91038),r=e.r(218053);function n(e){var t=0,i=0,o=0,r=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),o=10*t,r=10*i,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!i&&(i=r<1?-1:1),{spinX:t,spinY:i,pixelX:o,pixelY:r}}n.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},t.exports=n}],254376,(e,t,i)=>{t.exports=e.r(685846)},91038,(e,t,i)=>{var o,r,n,a,s,l,c,d,h,p,u,m,x,g,f,v=!1;function y(){if(!v){v=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
1weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),i=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),x=/\b(iP[ao]d)/.exec(e),p=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),f=/Mobile/i.exec(e),u=!!/Win64/.exec(e),t){(o=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):0/0)&&document&&document.documentMode&&(o=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);l=y?parseFloat(y[1])+4:o,r=t[2]?parseFloat(t[2]):0/0,n=t[3]?parseFloat(t[3]):0/0,s=(a=t[4]?parseFloat(t[4]):0/0)&&(t=/(?:Chrome\/(\d+\.\d+))/.exec(e))&&t[1]?parseFloat(t[1]):0/0}else o=r=n=s=a=0/0;if(i){if(i[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);c=!b||parseFloat(b[1].replace("_","."))}else c=!1;d=!!i[2],h=!!i[3]}else c=d=h=!1}}var b={ie:function(){return y()||o},ieCompatibilityMode:function(){return y()||l>o},ie64:function(){return b.ie()&&u},firefox:function(){return y()||r},opera:function(){return y()||n},webkit:function(){return y()||a},safari:function(){return b.webkit()},chrome:function(){return y()||s},windows:function(){return y()||d},osx:function(){return y()||c},linux:function(){return y()||h},iphone:function(){return y()||m},mobile:function(){return y()||m||x||p||f},nativeApp:function(){return y()||g},android:function(){return y()||p},ipad:function(){return y()||x}};t.exports=b}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.