scenri 0.2.0 → 0.2.2
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.
- package/CHANGELOG.md +17 -0
- package/README.md +5 -13
- package/dist/serve.js +20 -0
- package/package.json +3 -3
- package/studio-dist/apple-touch-icon.png +0 -0
- package/studio-dist/assets/{index-anODr0h2.js → index-CZX6N9rq.js} +5 -5
- package/studio-dist/favicon.ico +0 -0
- package/studio-dist/favicon.svg +5 -5
- package/studio-dist/icon-192.png +0 -0
- package/studio-dist/icon-512.png +0 -0
- package/studio-dist/icon-maskable-512.png +0 -0
- package/studio-dist/index.html +1 -1
|
@@ -89,14 +89,14 @@ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}
|
|
|
89
89
|
`)},I4=function(){var e=parseInt(document.body.getAttribute(Wl)||"0",10);return isFinite(e)?e:0},tj=function(){r.useEffect(function(){return document.body.setAttribute(Wl,(I4()+1).toString()),function(){var e=I4()-1;e<=0?document.body.removeAttribute(Wl):document.body.setAttribute(Wl,e.toString())}},[])},nj=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;tj();var c=r.useMemo(function(){return QS(i)},[i]);return r.createElement(JS,{styles:ej(c,!t,i,n?"":"!important")})},X2=!1;if(typeof window<"u")try{var x0=Object.defineProperty({},"passive",{get:function(){return X2=!0,!0}});window.addEventListener("test",x0,x0),window.removeEventListener("test",x0,x0)}catch{X2=!1}var Rl=X2?{passive:!1}:!1,rj=function(e){return e.tagName==="TEXTAREA"},R3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rj(e)&&n[t]==="visible")},aj=function(e){return R3(e,"overflowY")},sj=function(e){return R3(e,"overflowX")},_4=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=P3(e,s);if(i){var c=L3(e,s),u=c[1],f=c[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},oj=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},lj=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},P3=function(e,t){return e==="v"?aj(t):sj(t)},L3=function(e,t){return e==="v"?oj(t):lj(t)},ij=function(e,t){return e==="h"&&t==="rtl"?-1:1},cj=function(e,t,n,s,i){var c=ij(e,window.getComputedStyle(t).direction),u=c*s,f=n.target,h=t.contains(f),m=!1,g=u>0,v=0,y=0;do{if(!f)break;var w=L3(e,f),E=w[0],C=w[1],b=w[2],N=C-b-c*E;(E||N)&&P3(e,f)&&(v+=N,y+=E);var j=f.parentNode;f=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(g&&Math.abs(v)<1||!g&&Math.abs(y)<1)&&(m=!0),m},w0=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},O4=function(e){return[e.deltaX,e.deltaY]},Z4=function(e){return e&&"current"in e?e.current:e},uj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dj=function(e){return`
|
|
90
90
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
91
91
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
92
|
-
`)},fj=0,Pl=[];function hj(e){var t=r.useRef([]),n=r.useRef([0,0]),s=r.useRef(),i=r.useState(fj++)[0],c=r.useState(M3)[0],u=r.useRef(e);r.useEffect(function(){u.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var C=HS([e.lockRef.current],(e.shards||[]).map(Z4),!0).filter(Boolean);return C.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=r.useCallback(function(C,b){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var N=w0(C),j=n.current,k="deltaX"in C?C.deltaX:j[0]-N[0],A="deltaY"in C?C.deltaY:j[1]-N[1],M,T=C.target,D=Math.abs(k)>Math.abs(A)?"h":"v";if("touches"in C&&D==="h"&&T.type==="range")return!1;var L=window.getSelection(),Y=L&&L.anchorNode,I=Y?Y===T||Y.contains(T):!1;if(I)return!1;var se=_4(D,T);if(!se)return!0;if(se?M=D:(M=D==="v"?"h":"v",se=_4(D,T)),!se)return!1;if(!s.current&&"changedTouches"in C&&(k||A)&&(s.current=M),!M)return!0;var U=s.current||M;return cj(U,b,C,U==="h"?k:A)},[]),h=r.useCallback(function(C){var b=C;if(!(!Pl.length||Pl[Pl.length-1]!==c)){var N="deltaY"in b?O4(b):w0(b),j=t.current.filter(function(M){return M.name===b.type&&(M.target===b.target||b.target===M.shadowParent)&&uj(M.delta,N)})[0];if(j&&j.should){b.cancelable&&b.preventDefault();return}if(!j){var k=(u.current.shards||[]).map(Z4).filter(Boolean).filter(function(M){return M.contains(b.target)}),A=k.length>0?f(b,k[0]):!u.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),m=r.useCallback(function(C,b,N,j){var k={name:C,delta:b,target:N,should:j,shadowParent:mj(N)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(A){return A!==k})},1)},[]),g=r.useCallback(function(C){n.current=w0(C),s.current=void 0},[]),v=r.useCallback(function(C){m(C.type,O4(C),C.target,f(C,e.lockRef.current))},[]),y=r.useCallback(function(C){m(C.type,w0(C),C.target,f(C,e.lockRef.current))},[]);r.useEffect(function(){return Pl.push(c),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:y}),document.addEventListener("wheel",h,Rl),document.addEventListener("touchmove",h,Rl),document.addEventListener("touchstart",g,Rl),function(){Pl=Pl.filter(function(C){return C!==c}),document.removeEventListener("wheel",h,Rl),document.removeEventListener("touchmove",h,Rl),document.removeEventListener("touchstart",g,Rl)}},[]);var w=e.removeScrollBar,E=e.inert;return r.createElement(r.Fragment,null,E?r.createElement(c,{styles:dj(i)}):null,w?r.createElement(nj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pj=zS(A3,hj);var Bc=r.forwardRef(function(e,t){return r.createElement(A1,La({},e,{ref:t,sideCar:pj}))});Bc.classNames=A1.classNames;var gj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ll=new WeakMap,b0=new WeakMap,E0={},r2=0,T3=function(e){return e&&(e.host||T3(e.parentNode))},vj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=T3(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},yj=function(e,t,n,s){var i=vj(t,Array.isArray(e)?e:[e]);E0[n]||(E0[n]=new WeakMap);var c=E0[n],u=[],f=new Set,h=new Set(i),m=function(v){!v||f.has(v)||(f.add(v),m(v.parentNode))};i.forEach(m);var g=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(y){if(f.has(y))g(y);else try{var w=y.getAttribute(s),E=w!==null&&w!=="false",C=(Ll.get(y)||0)+1,b=(c.get(y)||0)+1;Ll.set(y,C),c.set(y,b),u.push(y),C===1&&E&&b0.set(y,!0),b===1&&y.setAttribute(n,"true"),E||y.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return g(t),f.clear(),r2++,function(){u.forEach(function(v){var y=Ll.get(v)-1,w=c.get(v)-1;Ll.set(v,y),c.set(v,w),y||(b0.has(v)||v.removeAttribute(s),b0.delete(v)),w||v.removeAttribute(n)}),r2--,r2||(Ll=new WeakMap,Ll=new WeakMap,b0=new WeakMap,E0={})}},M1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=gj(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),yj(s,i,n,"aria-hidden")):function(){return null}},xj=Object.defineProperty,Zr=(e,t)=>xj(e,"name",{value:t,configurable:!0}),rm="Dialog",[H3,D3]=Sr(rm),[wj,ba]=H3(rm),ui=Zr(e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,f=r.useRef(null),h=r.useRef(null),[m,g]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:rm}),[v,y]=r.useState(0),[w,E]=r.useState(0);return o.jsx(wj,{scope:t,triggerRef:f,contentRef:h,contentId:pa(),titleId:pa(),descriptionId:pa(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:E,open:m,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(C=>!C),[g]),modal:u,children:n})},"Dialog"),bj="DialogTrigger",am=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(bj,s),u=vt(n,c.triggerRef);return o.jsx(yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":P1(c.open),...i,ref:u,onClick:De(t.onClick,c.onOpenToggle)})},"DialogTrigger")),$3="DialogPortal",[Ej,F3]=H3($3,{forceMount:void 0}),di=Zr(e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,c=ba($3,t);return o.jsx(Ej,{scope:t,forceMount:n,children:r.Children.map(s,u=>o.jsx(jr,{present:n||c.open,children:o.jsx(N1,{asChild:!0,container:i,children:u})}))})},"DialogPortal"),Q2="DialogOverlay",fi=r.forwardRef(Zr(function(t,n){const s=F3(Q2,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=ba(Q2,t.__scopeDialog);return u.modal?o.jsx(jr,{present:i||u.open,children:o.jsx(Sj,{...c,ref:n})}):null},"DialogOverlay")),Cj=ya("DialogOverlay.RemoveScroll"),Sj=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Q2,s),u=v3(),f=vt(n,u);return o.jsx(Bc,{as:Cj,allowPinchZoom:!0,shards:[c.contentRef],children:o.jsx(yt.div,{"data-state":P1(c.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),kc="DialogContent",hi=r.forwardRef(Zr(function(t,n){const s=F3(kc,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=ba(kc,t.__scopeDialog);return o.jsx(jr,{present:i||u.open,children:u.modal?o.jsx(jj,{...c,ref:n}):o.jsx(kj,{...c,ref:n})})},"DialogContent")),jj=r.forwardRef(Zr(function(t,n){const s=ba(kc,t.__scopeDialog),i=r.useRef(null),c=vt(n,s.contentRef,i);return r.useEffect(()=>{const u=i.current;if(u)return M1(u)},[]),o.jsx(I3,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:De(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),(f=s.triggerRef.current)==null||f.focus()}),onPointerDownOutside:De(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:De(t.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),kj=r.forwardRef(Zr(function(t,n){const s=ba(kc,t.__scopeDialog),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(I3,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var f,h;(f=t.onCloseAutoFocus)==null||f.call(t,u),u.defaultPrevented||(i.current||(h=s.triggerRef.current)==null||h.focus(),u.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:u=>{var m,g;(m=t.onInteractOutside)==null||m.call(t,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=u.target;((g=s.triggerRef.current)==null?void 0:g.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&c.current&&u.preventDefault()}})},"DialogContentNonModal")),I3=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,...f}=t,h=ba(kc,s);return ci(),o.jsx(o.Fragment,{children:o.jsx(zc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(k1,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":P1(h.open),...f,ref:n,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),Nj="DialogTitle",mi=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Nj,s),{setTitleCount:u}=c;return An(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(yt.h2,{id:c.titleId,...i,ref:n})},"DialogTitle")),Aj="DialogDescription",sm=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Aj,s),{setDescriptionCount:u}=c;return An(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(yt.p,{id:c.descriptionId,...i,ref:n})},"DialogDescription")),Mj="DialogClose",R1=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Mj,s);return o.jsx(yt.button,{type:"button",...i,ref:n,onClick:De(t.onClick,()=>c.onOpenChange(!1))})},"DialogClose"));function P1(e){return e?"open":"closed"}Zr(P1,"getState");var Rj=Object.defineProperty,ds=(e,t)=>Rj(e,"name",{value:t,configurable:!0}),Pj="AlertDialog",[Lj,GO]=Sr(Pj,[D3]),fs=D3(),Tj=ds(e=>{const{__scopeAlertDialog:t,...n}=e,s=fs(t);return o.jsx(ui,{...s,...n,modal:!0})},"AlertDialog"),Hj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(am,{...c,...i,ref:n})},"AlertDialogTrigger")),Dj=ds(e=>{const{__scopeAlertDialog:t,...n}=e,s=fs(t);return o.jsx(di,{...s,...n})},"AlertDialogPortal"),$j=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(fi,{...c,...i,ref:n})},"AlertDialogOverlay")),Fj="AlertDialogContent",[Ij,_j]=Lj(Fj),Oj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,children:i,...c}=t,u=fs(s),f=r.useRef(null),h=vt(n,f),m=r.useRef(null);return o.jsx(Ij,{scope:s,cancelRef:m,children:o.jsx(hi,{role:"alertdialog",...u,...c,ref:h,onOpenAutoFocus:De(c.onOpenAutoFocus,g=>{var v;g.preventDefault(),(v=m.current)==null||v.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:i})})},"AlertDialogContent")),Zj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(mi,{...c,...i,ref:n})},"AlertDialogTitle")),Vj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(sm,{...c,...i,ref:n})},"AlertDialogDescription")),zj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(R1,{...c,...i,ref:n})},"AlertDialogAction")),Bj="AlertDialogCancel",Uj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,{cancelRef:c}=_j(Bj,s),u=fs(s),f=vt(n,c);return o.jsx(R1,{...u,...i,ref:f})},"AlertDialogCancel")),Wj=Tj,Gj=Hj,Kj=Dj,Yj=$j,qj=Oj,Xj=zj,Qj=Uj,Jj=Zj,ek=Vj,tk=Object.defineProperty,nk=(e,t)=>tk(e,"name",{value:t,configurable:!0});function _3(e){const[t,n]=r.useState(void 0);return An(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,f;if("borderBoxSize"in c){const h=c.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;n({width:u,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}nk(_3,"useSize");const rk=["top","right","bottom","left"],Xs=Math.min,os=Math.max,q0=Math.round,C0=Math.floor,ls=e=>({x:e,y:e}),ak={left:"right",right:"left",bottom:"top",top:"bottom"};function O3(e,t,n){return os(e,Xs(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function Qs(e){return e.split("-")[0]}function pi(e){return e.split("-")[1]}function om(e){return e==="x"?"y":"x"}function lm(e){return e==="y"?"height":"width"}function Ta(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function im(e){return om(Ta(e))}function sk(e,t,n){n===void 0&&(n=!1);const s=pi(e),i=im(e),c=lm(i);let u=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=X0(u)),[u,X0(u)]}function ok(e){const t=X0(e);return[J2(e),t,J2(t)]}function J2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const V4=["left","right"],z4=["right","left"],lk=["top","bottom"],ik=["bottom","top"];function ck(e,t,n){switch(e){case"top":case"bottom":return n?t?z4:V4:t?V4:z4;case"left":case"right":return t?lk:ik;default:return[]}}function uk(e,t,n,s){const i=pi(e);let c=ck(Qs(e),n==="start",s);return i&&(c=c.map(u=>u+"-"+i),t&&(c=c.concat(c.map(J2)))),c}function X0(e){const t=Qs(e);return ak[t]+e.slice(t.length)}function dk(e){var t,n,s,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(s=e.bottom)!=null?s:0,left:(i=e.left)!=null?i:0}}function Z3(e){return typeof e!="number"?dk(e):{top:e,right:e,bottom:e,left:e}}function Q0(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function B4(e,t,n){let{reference:s,floating:i}=e;const c=Ta(t),u=im(t),f=lm(u),h=Qs(t),m=c==="y",g=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,y=s[f]/2-i[f]/2;let w;switch(h){case"top":w={x:g,y:s.y-i.height};break;case"bottom":w={x:g,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:v};break;case"left":w={x:s.x-i.width,y:v};break;default:w={x:s.x,y:s.y}}const E=pi(t);return E&&(w[u]+=y*(E==="end"?1:-1)*(n&&m?-1:1)),w}async function fk(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:c,rects:u,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:v="floating",altBoundary:y=!1,padding:w=0}=us(t,e),E=Z3(w),b=f[y?v==="floating"?"reference":"floating":v],N=Q0(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(b)))==null||n?b:b.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:m,rootBoundary:g,strategy:h})),j=v==="floating"?{x:s,y:i,width:u.floating.width,height:u.floating.height}:u.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),A=await(c.isElement==null?void 0:c.isElement(k))&&await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1},M=Q0(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:j,offsetParent:k,strategy:h}):j);return{top:(N.top-M.top+E.top)/A.y,bottom:(M.bottom-N.bottom+E.bottom)/A.y,left:(N.left-M.left+E.left)/A.x,right:(M.right-N.right+E.right)/A.x}}const hk=50,mk=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=n,f=u.detectOverflow?u:{...u,detectOverflow:fk},h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:v}=B4(m,s,h),y=s,w=0;const E={};for(let C=0;C<c.length;C++){const b=c[C];if(!b)continue;const{name:N,fn:j}=b,{x:k,y:A,data:M,reset:T}=await j({x:g,y:v,initialPlacement:s,placement:y,strategy:i,middlewareData:E,rects:m,platform:f,elements:{reference:e,floating:t}});g=k??g,v=A??v,E[N]={...E[N],...M},T&&w<hk&&(w++,typeof T=="object"&&(T.placement&&(y=T.placement),T.rects&&(m=T.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:g,y:v}=B4(m,y,h)),C=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:E}},pk=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:c,platform:u,elements:f,middlewareData:h}=t,{element:m,padding:g=0}=us(e,t)||{};if(m==null)return{};const v=Z3(g),y={x:n,y:s},w=im(i),E=lm(w),C=await u.getDimensions(m),b=w==="y",N=b?"top":"left",j=b?"bottom":"right",k=b?"clientHeight":"clientWidth",A=c.reference[E]+c.reference[w]-y[w]-c.floating[E],M=y[w]-c.reference[w],T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let D=T?T[k]:0;(!D||!await(u.isElement==null?void 0:u.isElement(T)))&&(D=f.floating[k]||c.floating[E]);const L=A/2-M/2,Y=D/2-C[E]/2-1,I=Xs(v[N],Y),se=Xs(v[j],Y),U=D-C[E]-se,te=D/2-C[E]/2+L,O=O3(I,te,U),ne=!h.arrow&&pi(i)!=null&&te!==O&&c.reference[E]/2-(te<I?I:se)-C[E]/2<0,Q=ne?te<I?te-I:te-U:0;return{[w]:y[w]+Q,data:{[w]:O,centerOffset:te-O-Q,...ne&&{alignmentOffset:Q}},reset:ne}}}),gk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:c,rects:u,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:g=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...b}=us(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const N=Qs(i),j=Ta(f),k=Qs(f)===f,A=await(h.isRTL==null?void 0:h.isRTL(m.floating)),M=y||(k||!C?[X0(f)]:ok(f)),T=E!=="none";!y&&T&&M.push(...uk(f,C,E,A));const D=[f,...M],L=await h.detectOverflow(t,b),Y=[];let I=((s=c.flip)==null?void 0:s.overflows)||[];if(g&&Y.push(L[N]),v){const O=sk(i,u,A);Y.push(L[O[0]],L[O[1]])}if(I=[...I,{placement:i,overflows:Y}],!Y.every(O=>O<=0)){var se,U;const O=(((se=c.flip)==null?void 0:se.index)||0)+1,ne=D[O];if(ne&&(!(v==="alignment"?j!==Ta(ne):!1)||I.every(K=>Ta(K.placement)===j?K.overflows[0]>0:!0)))return{data:{index:O,overflows:I},reset:{placement:ne}};let Q=(U=I.filter(H=>H.overflows[0]<=0).sort((H,K)=>H.overflows[1]-K.overflows[1])[0])==null?void 0:U.placement;if(!Q)switch(w){case"bestFit":{var te;const H=(te=I.filter(K=>{if(T){const X=Ta(K.placement);return X===j||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,W)=>X+W,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:te[0];H&&(Q=H);break}case"initialPlacement":Q=f;break}if(i!==Q)return{reset:{placement:Q}}}return{}}}};function U4(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W4(e){return rk.some(t=>e[t]>=0)}const vk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...c}=us(e,t);switch(i){case"referenceHidden":{const u=await s.detectOverflow(t,{...c,elementContext:"reference"}),f=U4(u,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:W4(f)}}}case"escaped":{const u=await s.detectOverflow(t,{...c,altBoundary:!0}),f=U4(u,n.floating);return{data:{escapedOffsets:f,escaped:W4(f)}}}default:return{}}}}},V3=new Set(["left","top"]);async function yk(e,t){const{placement:n,platform:s,elements:i}=e,c=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=Qs(n),f=pi(n),h=Ta(n)==="y",m=V3.has(u)?-1:1,g=c&&h?-1:1,v=us(t,e);let{mainAxis:y,crossAxis:w,alignmentAxis:E}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof E=="number"&&(w=f==="end"?E*-1:E),h?{x:w*g,y:y*m}:{x:y*m,y:w*g}}const xk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:c,placement:u,middlewareData:f}=t,h=await yk(t,e);return u===((n=f.offset)==null?void 0:n.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:c+h.y,data:{...h,placement:u}}}}},wk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:c}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:j=>{let{x:k,y:A}=j;return{x:k,y:A}}},...m}=us(e,t),g={x:n,y:s},v=await c.detectOverflow(t,m),y=Ta(i),w=om(y);let E=g[w],C=g[y];const b=(j,k)=>O3(k+v[j==="y"?"top":"left"],k,k-v[j==="y"?"bottom":"right"]);u&&(E=b(w,E)),f&&(C=b(y,C));const N=h.fn({...t,[w]:E,[y]:C});return{...N,data:{x:N.x-n,y:N.y-s,enabled:{[w]:u,[y]:f}}}}}},bk=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,s;const{x:i,y:c,placement:u,rects:f,middlewareData:h}=t,{offset:m=0,mainAxis:g=!0,crossAxis:v=!0}=us(e,t),y={x:i,y:c},w=Ta(u),E=om(w);let C=y[E],b=y[w];const N=us(m,t),j=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:(n=N.mainAxis)!=null?n:0,crossAxis:(s=N.crossAxis)!=null?s:0};if(g){const M=E==="y"?"height":"width",T=f.reference[E]-f.floating[M]+j.mainAxis,D=f.reference[E]+f.reference[M]-j.mainAxis;C<T?C=T:C>D&&(C=D)}if(v){var k,A;const M=E==="y"?"width":"height",T=V3.has(Qs(u)),D=f.reference[w]-f.floating[M]+(T&&((k=h.offset)==null?void 0:k[w])||0)+(T?0:j.crossAxis),L=f.reference[w]+f.reference[M]+(T?0:((A=h.offset)==null?void 0:A[w])||0)-(T?j.crossAxis:0);b<D?b=D:b>L&&(b=L)}return{[E]:C,[w]:b}}}},Ek=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...f}=us(e,t),h=await i.detectOverflow(t,f),m=Qs(n),g=pi(n),v=Ta(n)==="y",{width:y,height:w}=s.floating;let E,C;m==="top"||m==="bottom"?(E=m,C=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(C=m,E=g==="end"?"top":"bottom");const b=w-h.top-h.bottom,N=y-h.left-h.right,j=Xs(w-h[E],b),k=Xs(y-h[C],N),A=t.middlewareData.shift,M=!A;let T=j,D=k;A!=null&&A.enabled.x&&(D=N),A!=null&&A.enabled.y&&(T=b),M&&!g&&(v?D=y-2*os(h.left,h.right):T=w-2*os(h.top,h.bottom)),await u({...t,availableWidth:D,availableHeight:T});const L=await i.getDimensions(c.floating);return y!==L.width||w!==L.height?{reset:{rects:!0}}:{}}}};function L1(){return typeof window<"u"}function gi(e){return z3(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hs(e){var t;return(t=(z3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function z3(e){return L1()?e instanceof Node||e instanceof Cr(e).Node:!1}function $a(e){return L1()?e instanceof Element||e instanceof Cr(e).Element:!1}function no(e){return L1()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function G4(e){return!L1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}function T1(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=Fa(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function Ck(e){return/^(table|td|th)$/.test(gi(e))}function H1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Sk=/transform|translate|scale|rotate|perspective|filter/,jk=/paint|layout|strict|content/,bo=e=>!!e&&e!=="none";let a2;function cm(e){const t=$a(e)?Fa(e):e;return bo(t.transform)||bo(t.translate)||bo(t.scale)||bo(t.rotate)||bo(t.perspective)||!um()&&(bo(t.backdropFilter)||bo(t.filter))||Sk.test(t.willChange||"")||jk.test(t.contain||"")}function kk(e){let t=Ho(e);for(;no(t)&&!Nc(t);){if(cm(t))return t;if(H1(t))return null;t=Ho(t)}return null}function um(){return a2==null&&(a2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),a2}function Nc(e){return/^(html|body|#document)$/.test(gi(e))}function Fa(e){return Cr(e).getComputedStyle(e)}function D1(e){return $a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ho(e){if(gi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||G4(e)&&e.host||hs(e);return G4(t)?t.host:t}function B3(e){const t=Ho(e);return Nc(t)?(e.ownerDocument||e).body:no(t)&&T1(t)?t:B3(t)}function Ac(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=B3(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),u=Cr(i);if(c){const f=eh(u);return t.concat(u,u.visualViewport||[],T1(i)?i:[],f&&n?Ac(f):[])}else return t.concat(i,Ac(i,[],n))}function eh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U3(e){const t=Fa(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=no(e),c=i?e.offsetWidth:n,u=i?e.offsetHeight:s,f=q0(n)!==c||q0(s)!==u;return f&&(n=c,s=u),{width:n,height:s,$:f}}function dm(e){return $a(e)?e:e.contextElement}function Gl(e){const t=dm(e);if(!no(t))return ls(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:c}=U3(t);let u=(c?q0(n.width):n.width)/s,f=(c?q0(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const Nk=ls(0);function W3(e){const t=Cr(e);return!um()||!t.visualViewport?Nk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ak(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Cr(e)}function Do(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=dm(e);let u=ls(1);t&&(s?$a(s)&&(u=Gl(s)):u=Gl(e));const f=Ak(c,n,s)?W3(c):ls(0);let h=(i.left+f.x)/u.x,m=(i.top+f.y)/u.y,g=i.width/u.x,v=i.height/u.y;if(c&&s){const y=Cr(c),w=$a(s)?Cr(s):s;let E=y,C=eh(E);for(;C&&w!==E;){const b=Gl(C),N=C.getBoundingClientRect(),j=Fa(C),k=N.left+(C.clientLeft+parseFloat(j.paddingLeft))*b.x,A=N.top+(C.clientTop+parseFloat(j.paddingTop))*b.y;h*=b.x,m*=b.y,g*=b.x,v*=b.y,h+=k,m+=A,E=Cr(C),C=eh(E)}}return Q0({width:g,height:v,x:h,y:m})}function $1(e,t){const n=D1(e).scrollLeft;return t?t.left+n:Do(hs(e)).left+n}function G3(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-$1(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function Mk(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const c=i==="fixed",u=hs(s),f=t?H1(t.floating):!1;if(s===u||f&&c)return n;let h={scrollLeft:0,scrollTop:0},m=ls(1);const g=ls(0),v=no(s);if((v||!c)&&((gi(s)!=="body"||T1(u))&&(h=D1(s)),v)){const w=Do(s);m=Gl(s),g.x=w.x+s.clientLeft,g.y=w.y+s.clientTop}const y=u&&!v&&!c?G3(u,h):ls(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+g.x+y.x,y:n.y*m.y-h.scrollTop*m.y+g.y+y.y}}function Rk(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pk(e){const t=D1(e),n=e.ownerDocument.body,s=os(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=os(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let c=-t.scrollLeft+$1(e);const u=-t.scrollTop;return Fa(n).direction==="rtl"&&(c+=os(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:c,y:u}}const Lk=25;function Tk(e,t,n){n===void 0&&(n="viewport");const s=n==="layoutViewport",i=Cr(e),c=hs(e),u=i.visualViewport;let f=c.clientWidth,h=c.clientHeight,m=0,g=0;if(u){const y=!um()||t==="fixed";s?y||(m=-u.offsetLeft,g=-u.offsetTop):(f=u.width,h=u.height,y&&(m=u.offsetLeft,g=u.offsetTop))}if($1(c)<=0){const y=c.ownerDocument,w=y.body,E=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,b=Math.abs(c.clientWidth-w.clientWidth-C),N=getComputedStyle(c).scrollbarGutter==="stable both-edges"?b/2:b;N<=Lk&&(f-=N)}return{width:f,height:h,x:m,y:g}}function Hk(e,t){const n=Do(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,c=Gl(e),u=e.clientWidth*c.x,f=e.clientHeight*c.y,h=i*c.x,m=s*c.y;return{width:u,height:f,x:h,y:m}}function K4(e,t,n){let s;if(t==="viewport"||t==="layoutViewport")s=Tk(e,n,t);else if(t==="document")s=Pk(hs(e));else if($a(t))s=Hk(t,n);else{const i=W3(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Q0(s)}function Dk(e,t){const n=t.get(e);if(n)return n;let s=Ac(e,[],!1).filter(f=>$a(f)&&gi(f)!=="body"),i=null;const c=Fa(e).position==="fixed";let u=c?Ho(e):e;for(;$a(u)&&!Nc(u);){const f=Fa(u),h=cm(u),m=i?i.position:c?"fixed":"";!h&&(m==="fixed"||m==="absolute"&&f.position==="static")?s=s.filter(v=>v!==u):i=f,u=Ho(u)}return t.set(e,s),s}function $k(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const u=[...n==="clippingAncestors"?H1(t)?[]:Dk(t,this._c):[].concat(n),s],f=K4(t,u[0],i);let h=f.top,m=f.right,g=f.bottom,v=f.left;for(let y=1;y<u.length;y++){const w=K4(t,u[y],i);h=os(w.top,h),m=Xs(w.right,m),g=Xs(w.bottom,g),v=os(w.left,v)}return{width:m-v,height:g-h,x:v,y:h}}function Fk(e){const{width:t,height:n}=U3(e);return{width:t,height:n}}function Ik(e,t,n){const s=no(t),i=hs(t),c=n==="fixed",u=Do(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=ls(0);if((s||!c)&&((gi(t)!=="body"||T1(i))&&(f=D1(t)),s)){const y=Do(t,!0,c,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}!s&&i&&(h.x=$1(i));const m=i&&!s&&!c?G3(i,f):ls(0),g=u.left+f.scrollLeft-h.x-m.x,v=u.top+f.scrollTop-h.y-m.y;return{x:g,y:v,width:u.width,height:u.height}}function s2(e){return Fa(e).position==="static"}function Y4(e,t){if(!no(e)||Fa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return hs(e)===n&&(n=n.ownerDocument.body),n}function K3(e,t){const n=Cr(e);if(H1(e))return n;if(!no(e)){let i=Ho(e);for(;i&&!Nc(i);){if($a(i)&&!s2(i))return i;i=Ho(i)}return n}let s=Y4(e,t);for(;s&&Ck(s)&&s2(s);)s=Y4(s,t);return s&&Nc(s)&&s2(s)&&!cm(s)?n:s||kk(e)||n}const _k=async function(e){const t=this.getOffsetParent||K3,n=this.getDimensions,s=await n(e.floating);return{reference:Ik(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ok(e){return Fa(e).direction==="rtl"}const Zk={convertOffsetParentRelativeRectToViewportRelativeRect:Mk,getDocumentElement:hs,getClippingRect:$k,getOffsetParent:K3,getElementRects:_k,getClientRects:Rk,getDimensions:Fk,getScale:Gl,isElement:$a,isRTL:Ok};function Y3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vk(e,t,n){let s=null,i;const c=hs(e);function u(){var g;clearTimeout(i),(g=s)==null||g.disconnect(),s=null}function f(g,v){g===void 0&&(g=!1),v===void 0&&(v=1),u();const y=e.getBoundingClientRect(),{left:w,top:E,width:C,height:b}=y;if(g||t(),!C||!b)return;const N=C0(E),j=C0(c.clientWidth-(w+C)),k=C0(c.clientHeight-(E+b)),A=C0(w),T={rootMargin:-N+"px "+-j+"px "+-k+"px "+-A+"px",threshold:os(0,Xs(1,v))||1};let D=!0;function L(Y){const I=Y[0].intersectionRatio;if(!Y3(y,e.getBoundingClientRect()))return f();if(I!==v){if(!D)return f();I?f(!1,I):i=setTimeout(()=>{f(!1,1e-7)},1e3)}D=!1}try{s=new IntersectionObserver(L,{...T,root:c.ownerDocument})}catch{s=new IntersectionObserver(L,T)}s.observe(e)}const h=Cr(e),m=()=>f(n);return h.addEventListener("resize",m),f(!0),()=>{h.removeEventListener("resize",m),u()}}function zk(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=dm(e),g=i||c?[...m?Ac(m):[],...t?Ac(t):[]]:[];g.forEach(N=>{i&&N.addEventListener("scroll",n),c&&N.addEventListener("resize",n)});const v=m&&f?Vk(m,n,c):null;let y=-1,w=null;u&&(w=new ResizeObserver(N=>{let[j]=N;j&&j.target===m&&w&&t&&(w.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var k;(k=w)==null||k.observe(t)})),n()}),m&&!h&&w.observe(m),t&&w.observe(t));let E,C=h?Do(e):null;h&&b();function b(){const N=Do(e);C&&!Y3(C,N)&&n(),C=N,E=requestAnimationFrame(b)}return n(),()=>{var N;g.forEach(j=>{i&&j.removeEventListener("scroll",n),c&&j.removeEventListener("resize",n)}),v==null||v(),(N=w)==null||N.disconnect(),w=null,h&&cancelAnimationFrame(E)}}const Bk=xk,Uk=wk,Wk=gk,Gk=Ek,Kk=vk,q4=pk,Yk=bk,qk=(e,t,n)=>{const s=new Map,i=n??{},c={...Zk,...i.platform,_c:s};return mk(e,t,{...i,platform:c})};var Xk=typeof document<"u",Qk=function(){},V0=Xk?r.useLayoutEffect:Qk;function J0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!J0(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const c=i[s];if(!(c==="_owner"&&e.$$typeof)&&!J0(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function q3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function X4(e,t){const n=q3(e);return Math.round(t*n)/n}function o2(e){const t=r.useRef(e);return V0(()=>{t.current=e}),t}function Jk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[g,v]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,w]=r.useState(s);J0(y,s)||w(s);const[E,C]=r.useState(null),[b,N]=r.useState(null),j=r.useCallback(K=>{K!==T.current&&(T.current=K,C(K))},[]),k=r.useCallback(K=>{K!==D.current&&(D.current=K,N(K))},[]),A=c||E,M=u||b,T=r.useRef(null),D=r.useRef(null),L=r.useRef(g),Y=h!=null,I=o2(h),se=o2(i),U=o2(m),te=r.useCallback(()=>{if(!T.current||!D.current)return;const K={placement:t,strategy:n,middleware:y};se.current&&(K.platform=se.current),qk(T.current,D.current,K).then(X=>{const W={...X,isPositioned:U.current!==!1};O.current&&!J0(L.current,W)&&(L.current=W,na.flushSync(()=>{v(W)}))})},[y,t,n,se,U]);V0(()=>{m===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[m]);const O=r.useRef(!1);V0(()=>(O.current=!0,()=>{O.current=!1}),[]),V0(()=>{if(A&&(T.current=A),M&&(D.current=M),A&&M){if(I.current)return I.current(A,M,te);te()}},[A,M,te,I,Y]);const ne=r.useMemo(()=>({reference:T,floating:D,setReference:j,setFloating:k}),[j,k]),Q=r.useMemo(()=>({reference:A,floating:M}),[A,M]),H=r.useMemo(()=>{const K={position:n,left:0,top:0};if(!Q.floating)return K;const X=X4(Q.floating,g.x),W=X4(Q.floating,g.y);return f?{...K,transform:"translate("+X+"px, "+W+"px)",...q3(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:W}},[n,f,Q.floating,g.x,g.y]);return r.useMemo(()=>({...g,update:te,refs:ne,elements:Q,floatingStyles:H}),[g,te,ne,Q,H])}const eN=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?q4({element:s.current,padding:i}).fn(n):{}:s?q4({element:s,padding:i}).fn(n):{}}}},tN=(e,t)=>{const n=Bk(e);return{name:n.name,fn:n.fn,options:[e,t]}},nN=(e,t)=>{const n=Uk(e);return{name:n.name,fn:n.fn,options:[e,t]}},rN=(e,t)=>({fn:Yk(e).fn,options:[e,t]}),aN=(e,t)=>{const n=Wk(e);return{name:n.name,fn:n.fn,options:[e,t]}},sN=(e,t)=>{const n=Gk(e);return{name:n.name,fn:n.fn,options:[e,t]}},oN=(e,t)=>{const n=Kk(e);return{name:n.name,fn:n.fn,options:[e,t]}},lN=(e,t)=>{const n=eN(e);return{name:n.name,fn:n.fn,options:[e,t]}};var iN=Object.defineProperty,Ws=(e,t)=>iN(e,"name",{value:t,configurable:!0}),X3="Popper",[Q3,ro]=Sr(X3),[cN,J3]=Q3(X3),uN=Ws(e=>{const{__scopePopper:t,children:n}=e,[s,i]=r.useState(null),[c,u]=r.useState(void 0);return o.jsx(cN,{scope:t,anchor:s,onAnchorChange:i,placementState:c,setPlacementState:u,children:n})},"Popper"),dN="PopperAnchor",fN=r.forwardRef(Ws(function(t,n){const{__scopePopper:s,virtualRef:i,...c}=t,u=J3(dN,s),f=r.useRef(null),h=u.onAnchorChange,m=r.useCallback(C=>{f.current=C,C&&h(C)},[h]),g=vt(n,m),v=r.useRef(null);r.useEffect(()=>{if(!i)return;const C=v.current;v.current=i.current,C!==v.current&&h(v.current)});const y=u.placementState&&F1(u.placementState),w=y==null?void 0:y[0],E=y==null?void 0:y[1];return i?null:o.jsx(yt.div,{"data-radix-popper-side":w,"data-radix-popper-align":E,...c,ref:g})},"PopperAnchor")),ey="PopperContent",[hN,KO]=Q3(ey),mN=r.forwardRef(Ws(function(t,n){var ge,He,Qe,ye,ke,lt,jt;const{__scopePopper:s,side:i="bottom",sideOffset:c=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:w=!1,updatePositionStrategy:E="optimized",onPlaced:C,...b}=t,N=J3(ey,s),[j,k]=r.useState(null),A=vt(n,k),[M,T]=r.useState(null),D=_3(M),L=(D==null?void 0:D.width)??0,Y=(D==null?void 0:D.height)??0,I=i+(u!=="center"?"-"+u:""),se=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},U=Array.isArray(g)?g:[g],te=U.length>0,O={padding:se,boundary:U.filter(ty),altBoundary:te},{refs:ne,floatingStyles:Q,placement:H,isPositioned:K,middlewareData:X}=Jk({strategy:"fixed",placement:I,whileElementsMounted:Ws((...Pt)=>zk(...Pt,{animationFrame:E==="always"}),"whileElementsMounted"),elements:{reference:N.anchor},middleware:[tN({mainAxis:c+Y,alignmentAxis:f}),m&&nN({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?rN():void 0,...O}),m&&aN({...O}),sN({...O,apply:Ws(({elements:Pt,rects:Ne,availableWidth:Ae,availableHeight:Ee})=>{const{width:at,height:kt}=Ne.reference,Qt=Pt.floating.style;Qt.setProperty("--radix-popper-available-width",`${Ae}px`),Qt.setProperty("--radix-popper-available-height",`${Ee}px`),Qt.setProperty("--radix-popper-anchor-width",`${at}px`),Qt.setProperty("--radix-popper-anchor-height",`${kt}px`)},"apply")}),M&&lN({element:M,padding:h}),pN({arrowWidth:L,arrowHeight:Y}),w&&oN({strategy:"referenceHidden",...O,boundary:te?O.boundary:void 0})]}),W=N.setPlacementState;An(()=>(W(H),()=>{W(void 0)}),[H,W]);const[P,Z]=F1(H),ae=En(C);An(()=>{K&&(ae==null||ae())},[K,ae]);const G=(ge=X.arrow)==null?void 0:ge.x,fe=(He=X.arrow)==null?void 0:He.y,le=((Qe=X.arrow)==null?void 0:Qe.centerOffset)!==0,[me,J]=r.useState();return An(()=>{j&&J(window.getComputedStyle(j).zIndex)},[j]),o.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:K?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(ye=X.transformOrigin)==null?void 0:ye.x,(ke=X.transformOrigin)==null?void 0:ke.y].join(" "),...((lt=X.hide)==null?void 0:lt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(hN,{scope:s,placedSide:P,placedAlign:Z,onArrowChange:T,arrowX:G,arrowY:fe,shouldHideArrow:le,children:o.jsx(yt.div,{"data-side":P,"data-align":Z,...b,ref:A,style:{...b.style,animation:K?(jt=b.style)==null?void 0:jt.animation:"none"}})})})},"PopperContent"));function ty(e){return e!==null}Ws(ty,"isNotNull");var pN=Ws(e=>({name:"transformOrigin",options:e,fn(t){var b,N,j;const{placement:n,rects:s,middlewareData:i}=t,u=((b=i.arrow)==null?void 0:b.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=F1(n),v={start:"0%",center:"50%",end:"100%"}[g],y=(((N=i.arrow)==null?void 0:N.x)??0)+f/2,w=(((j=i.arrow)==null?void 0:j.y)??0)+h/2;let E="",C="";return m==="bottom"?(E=u?v:`${y}px`,C=`${-h}px`):m==="top"?(E=u?v:`${y}px`,C=`${s.floating.height+h}px`):m==="right"?(E=`${-h}px`,C=u?v:`${w}px`):m==="left"&&(E=`${s.floating.width+h}px`,C=u?v:`${w}px`),{data:{x:E,y:C}}}}),"transformOrigin");function F1(e){const[t,n="center"]=e.split("-");return[t,n]}Ws(F1,"getSideAndAlignFromPlacement");var fm=uN,I1=fN,hm=mN,gN=Object.defineProperty,mm=(e,t)=>gN(e,"name",{value:t,configurable:!0}),l2=!1;function ny(){const[e,t]=r.useState(l2);return r.useEffect(()=>{l2||(l2=!0,t(!0))},[]),e}mm(ny,"useIsHydrated");var ry=Bo[" useSyncExternalStore ".trim().toString()];function ay(){return()=>{}}mm(ay,"subscribe");function sy(){return ry(ay,()=>!0,()=>!1)}mm(sy,"useIsHydratedModern");var vN=typeof ry=="function"?sy:ny,yN=Object.defineProperty,Ko=(e,t)=>yN(e,"name",{value:t,configurable:!0}),i2="rovingFocusGroup.onEntryFocus",xN={bubbles:!1,cancelable:!0},_1="RovingFocusGroup",[th,oy,wN]=j1(_1),[bN,ly]=Sr(_1,[wN]),[EN,CN]=bN(_1),SN=r.forwardRef(Ko(function(t,n){return o.jsx(th.Provider,{scope:t.__scopeRovingFocusGroup,children:o.jsx(th.Slot,{scope:t.__scopeRovingFocusGroup,children:o.jsx(jN,{...t,ref:n})})})},"RovingFocusGroup")),jN=r.forwardRef(Ko(function(t,n){const{__scopeRovingFocusGroup:s,orientation:i,loop:c=!1,dir:u,currentTabStopId:f,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=t,w=r.useRef(null),E=vt(n,w),C=Vc(u),[b,N]=qs({prop:f,defaultProp:h??null,onChange:m,caller:_1}),[j,k]=r.useState(!1),A=En(g),M=oy(s),T=r.useRef(!1),[D,L]=r.useState(0);return r.useEffect(()=>{const Y=w.current;if(Y)return Y.addEventListener(i2,A),()=>Y.removeEventListener(i2,A)},[A]),o.jsx(EN,{scope:s,orientation:i,dir:C,loop:c,currentTabStopId:b,onItemFocus:r.useCallback(Y=>N(Y),[N]),onItemShiftTab:r.useCallback(()=>k(!0),[]),onFocusableItemAdd:r.useCallback(()=>L(Y=>Y+1),[]),onFocusableItemRemove:r.useCallback(()=>L(Y=>Y-1),[]),children:o.jsx(yt.div,{tabIndex:j||D===0?-1:0,"data-orientation":i,...y,ref:E,style:{outline:"none",...t.style},onMouseDown:De(t.onMouseDown,()=>{T.current=!0}),onFocus:De(t.onFocus,Y=>{const I=!T.current;if(Y.target===Y.currentTarget&&I&&!j){const se=new CustomEvent(i2,xN);if(Y.currentTarget.dispatchEvent(se),!se.defaultPrevented){const U=M().filter(H=>H.focusable),te=U.find(H=>H.active),O=U.find(H=>H.id===b),Q=[te,O,...U].filter(Boolean).map(H=>H.ref.current);pm(Q,v)}}T.current=!1}),onBlur:De(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),kN="RovingFocusGroupItem",NN=r.forwardRef(Ko(function(t,n){const{__scopeRovingFocusGroup:s,focusable:i=!0,active:c=!1,tabStopId:u,children:f,...h}=t,m=pa(),g=u||m,v=CN(kN,s),y=v.currentTabStopId===g,w=oy(s),{onFocusableItemAdd:E,onFocusableItemRemove:C,currentTabStopId:b}=v,N=vN();return An(()=>{if(!(!N||!i))return E(),()=>C()},[N,i,E,C]),r.useEffect(()=>{if(!(N||!i))return E(),()=>C()},[N,i,E,C]),o.jsx(th.ItemSlot,{scope:s,id:g,focusable:i,active:c,children:o.jsx(yt.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...h,ref:n,onMouseDown:De(t.onMouseDown,j=>{i?v.onItemFocus(g):j.preventDefault()}),onFocus:De(t.onFocus,()=>v.onItemFocus(g)),onKeyDown:De(t.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){v.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const k=cy(j,v.orientation,v.dir);if(k!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let M=w().filter(T=>T.focusable).map(T=>T.ref.current);if(k==="last")M.reverse();else if(k==="prev"||k==="next"){k==="prev"&&M.reverse();const T=M.indexOf(j.currentTarget);M=v.loop?uy(M,T+1):M.slice(T+1)}setTimeout(()=>pm(M))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:b!=null}):f})})},"RovingFocusGroupItem")),AN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ko(iy,"getDirectionAwareKey");function cy(e,t,n){const s=iy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return AN[s]}Ko(cy,"getFocusIntent");function pm(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}Ko(pm,"focusFirst");function uy(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Ko(uy,"wrapArray");var MN=SN,RN=NN,PN=Object.defineProperty,At=(e,t)=>PN(e,"name",{value:t,configurable:!0}),nh=["Enter"," "],LN=["ArrowDown","PageUp","Home"],dy=["ArrowUp","PageDown","End"],TN=[...LN,...dy],HN={ltr:[...nh,"ArrowRight"],rtl:[...nh,"ArrowLeft"]},DN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},O1="Menu",[Mc,$N,FN]=j1(O1),[Yo,Z1]=Sr(O1,[FN,ro,ly]),gm=ro(),fy=ly(),[IN,qo]=Yo(O1),[_N,Uc]=Yo(O1),ON=At(e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:i,onOpenChange:c,modal:u=!0}=e,f=gm(t),[h,m]=r.useState(null),g=r.useRef(!1),v=En(c),y=Vc(i);return r.useEffect(()=>{const w=At(()=>{g.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},"handleKeyDown"),E=At(()=>g.current=!1,"handlePointer");return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),r.useEffect(()=>{if(!n)return;const w=At(()=>v(!1),"handleBlur");return window.addEventListener("blur",w),()=>window.removeEventListener("blur",w)},[n,v]),o.jsx(fm,{...f,children:o.jsx(IN,{scope:t,open:n,onOpenChange:v,content:h,onContentChange:m,children:o.jsx(_N,{scope:t,onClose:r.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:g,dir:y,modal:u,children:s})})})},"Menu"),hy=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t,c=gm(s);return o.jsx(I1,{...c,...i,ref:n})},"MenuAnchor")),my="MenuPortal",[ZN,py]=Yo(my,{forceMount:void 0}),VN=At(e=>{const{__scopeMenu:t,forceMount:n,children:s,container:i}=e,c=qo(my,t);return o.jsx(ZN,{scope:t,forceMount:n,children:o.jsx(jr,{present:n||c.open,children:o.jsx(N1,{asChild:!0,container:i,children:s})})})},"MenuPortal"),ga="MenuContent",[zN,vm]=Yo(ga),BN=r.forwardRef(At(function(t,n){const s=py(ga,t.__scopeMenu),{forceMount:i=s.forceMount,...c}=t,u=qo(ga,t.__scopeMenu),f=Uc(ga,t.__scopeMenu);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(jr,{present:i||u.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:f.modal?o.jsx(UN,{...c,ref:n}):o.jsx(WN,{...c,ref:n})})})})},"MenuContent")),UN=r.forwardRef(At(function(t,n){const s=qo(ga,t.__scopeMenu),i=r.useRef(null),c=vt(n,i);return r.useEffect(()=>{const u=i.current;if(u)return M1(u)},[]),o.jsx(ym,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:De(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),WN=r.forwardRef(At(function(t,n){const s=qo(ga,t.__scopeMenu);return o.jsx(ym,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),GN=ya("MenuContent.ScrollLock"),ym=r.forwardRef(At(function(t,n){const{__scopeMenu:s,loop:i=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:f,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:E,disableOutsideScroll:C,...b}=t,N=qo(ga,s),j=Uc(ga,s),k=gm(s),A=fy(s),M=$N(s),[T,D]=r.useState(null),L=r.useRef(null),Y=vt(n,L,N.onContentChange),I=r.useRef(0),se=r.useRef(""),U=r.useRef(0),te=r.useRef(null),O=r.useRef("right"),ne=r.useRef(0),Q=C?Bc:r.Fragment,H=C?{as:GN,allowPinchZoom:!0}:void 0,K=At(W=>{var J,ge;const P=se.current+W,Z=M().filter(He=>!He.disabled),ae=document.activeElement,G=(J=Z.find(He=>He.ref.current===ae))==null?void 0:J.textValue,fe=Z.map(He=>He.textValue),le=Cy(fe,P,G),me=(ge=Z.find(He=>He.textValue===le))==null?void 0:ge.ref.current;At((function He(Qe){se.current=Qe,window.clearTimeout(I.current),Qe!==""&&(I.current=window.setTimeout(()=>He(""),1e3))}),"updateSearch")(P),me&&setTimeout(()=>me.focus())},"handleTypeaheadSearch");r.useEffect(()=>()=>window.clearTimeout(I.current),[]),ci();const X=r.useCallback(W=>{var Z,ae;return O.current===((Z=te.current)==null?void 0:Z.side)&&jy(W,(ae=te.current)==null?void 0:ae.area)},[]);return o.jsx(zN,{scope:s,searchRef:se,onItemEnter:r.useCallback(W=>{X(W)&&W.preventDefault()},[X]),onItemLeave:r.useCallback(W=>{var P;X(W)||((P=L.current)==null||P.focus(),D(null))},[X]),onTriggerLeave:r.useCallback(W=>{X(W)&&W.preventDefault()},[X]),pointerGraceTimerRef:U,onPointerGraceIntentChange:r.useCallback(W=>{te.current=W},[]),children:o.jsx(Q,{...H,children:o.jsx(zc,{asChild:!0,trapped:c,onMountAutoFocus:De(u,W=>{var P;W.preventDefault(),(P=L.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:o.jsx(k1,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:E,children:o.jsx(MN,{asChild:!0,...A,dir:j.dir,orientation:"vertical",loop:i,currentTabStopId:T,onCurrentTabStopIdChange:D,onEntryFocus:De(m,W=>{j.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(hm,{role:"menu","aria-orientation":"vertical","data-state":wm(N.open),"data-radix-menu-content":"",dir:j.dir,...k,...b,ref:Y,style:{outline:"none",...b.style},onKeyDown:De(b.onKeyDown,W=>{const Z=W.target.closest("[data-radix-menu-content]")===W.currentTarget,ae=W.ctrlKey||W.altKey||W.metaKey,G=W.key.length===1;Z&&(W.key==="Tab"&&W.preventDefault(),!ae&&G&&K(W.key));const fe=L.current;if(W.target!==fe||!TN.includes(W.key))return;W.preventDefault();const me=M().filter(J=>!J.disabled).map(J=>J.ref.current);dy.includes(W.key)&&me.reverse(),by(me)}),onBlur:De(t.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(I.current),se.current="")}),onPointerMove:De(t.onPointerMove,Jl(W=>{const P=W.target,Z=ne.current!==W.clientX;if(W.currentTarget.contains(P)&&Z){const ae=W.clientX>ne.current?"right":"left";O.current=ae,ne.current=W.clientX}}))})})})})})})},"MenuContentImpl")),gy=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(yt.div,{role:"group",...i,ref:n})},"MenuGroup")),KN=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(yt.div,{...i,ref:n})},"MenuLabel")),rh="MenuItem",Q4="menu.itemSelect",xm=r.forwardRef(At(function(t,n){const{disabled:s=!1,onSelect:i,...c}=t,u=r.useRef(null),f=Uc(rh,t.__scopeMenu),h=vm(rh,t.__scopeMenu),m=vt(n,u),g=r.useRef(!1),v=At(()=>{const y=u.current;if(!s&&y){const w=new CustomEvent(Q4,{bubbles:!0,cancelable:!0});y.addEventListener(Q4,E=>i==null?void 0:i(E),{once:!0}),Qh(y,w),w.defaultPrevented?g.current=!1:f.onClose()}},"handleSelect");return o.jsx(vy,{...c,ref:m,disabled:s,onClick:De(t.onClick,v),onPointerDown:y=>{var w;(w=t.onPointerDown)==null||w.call(t,y),g.current=!0},onPointerUp:De(t.onPointerUp,y=>{var w;g.current||(w=y.currentTarget)==null||w.click()}),onKeyDown:De(t.onKeyDown,y=>{s||y.target!==y.currentTarget||h.searchRef.current!==""&&y.key===" "||nh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})},"MenuItem")),vy=r.forwardRef(At(function(t,n){const{__scopeMenu:s,disabled:i=!1,textValue:c,...u}=t,f=vm(rh,s),h=fy(s),m=r.useRef(null),g=vt(n,m),[v,y]=r.useState(!1),[w,E]=r.useState("");return r.useEffect(()=>{const C=m.current;C&&E((C.textContent??"").trim())},[u.children]),o.jsx(Mc.ItemSlot,{scope:s,disabled:i,textValue:c??w,children:o.jsx(RN,{asChild:!0,...h,focusable:!i,children:o.jsx(yt.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:De(t.onPointerMove,Jl(C=>{i?f.onItemLeave(C):(f.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:De(t.onPointerLeave,Jl(C=>f.onItemLeave(C))),onFocus:De(t.onFocus,()=>y(!0)),onBlur:De(t.onBlur,()=>y(!1))})})})},"MenuItemImpl")),YN=r.forwardRef(At(function(t,n){const{checked:s=!1,onCheckedChange:i,...c}=t;return o.jsx(xy,{scope:t.__scopeMenu,checked:s,children:o.jsx(xm,{role:"menuitemcheckbox","aria-checked":Rc(s)?"mixed":s,...c,ref:n,"data-state":V1(s),onSelect:De(c.onSelect,()=>i==null?void 0:i(Rc(s)?!0:!s),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),qN="MenuRadioGroup",[XN,QN]=Yo(qN,{value:void 0,onValueChange:At(()=>{},"onValueChange")}),JN=r.forwardRef(At(function(t,n){const{value:s,onValueChange:i,...c}=t,u=En(i);return o.jsx(XN,{scope:t.__scopeMenu,value:s,onValueChange:u,children:o.jsx(gy,{...c,ref:n})})},"MenuRadioGroup")),eA="MenuRadioItem",tA=r.forwardRef(At(function(t,n){const{value:s,...i}=t,c=QN(eA,t.__scopeMenu),u=s===c.value;return o.jsx(xy,{scope:t.__scopeMenu,checked:u,children:o.jsx(xm,{role:"menuitemradio","aria-checked":u,...i,ref:n,"data-state":V1(u),onSelect:De(i.onSelect,()=>{var f;return(f=c.onValueChange)==null?void 0:f.call(c,s)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),yy="MenuItemIndicator",[xy,nA]=Yo(yy,{checked:!1}),rA=r.forwardRef(At(function(t,n){const{__scopeMenu:s,forceMount:i,...c}=t,u=nA(yy,s);return o.jsx(jr,{present:i||Rc(u.checked)||u.checked===!0,children:o.jsx(yt.span,{...c,ref:n,"data-state":V1(u.checked)})})},"MenuItemIndicator")),aA=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(yt.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})},"MenuSeparator")),sA="MenuSub",[YO,wy]=Yo(sA),S0="MenuSubTrigger",oA=r.forwardRef(At(function(t,n){const s=qo(S0,t.__scopeMenu),i=Uc(S0,t.__scopeMenu),c=wy(S0,t.__scopeMenu),u=vm(S0,t.__scopeMenu),f=r.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,g={__scopeMenu:t.__scopeMenu},v=r.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);r.useEffect(()=>v,[v]),r.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),m(null)}},[h,m]);const y=vt(n,c.onTriggerChange);return o.jsx(hy,{asChild:!0,...g,children:o.jsx(vy,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?c.contentId:void 0,"data-state":wm(s.open),...t,ref:y,onClick:w=>{var E;(E=t.onClick)==null||E.call(t,w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:De(t.onPointerMove,Jl(w=>{u.onItemEnter(w),!w.defaultPrevented&&!t.disabled&&!s.open&&!f.current&&(u.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{s.onOpenChange(!0),v()},100))})),onPointerLeave:De(t.onPointerLeave,Jl(w=>{var C,b;v();const E=(C=s.content)==null?void 0:C.getBoundingClientRect();if(E){const N=(b=s.content)==null?void 0:b.dataset.side,j=N==="right",k=j?-5:5,A=E[j?"left":"right"],M=E[j?"right":"left"];u.onPointerGraceIntentChange({area:[{x:w.clientX+k,y:w.clientY},{x:A,y:E.top},{x:M,y:E.top},{x:M,y:E.bottom},{x:A,y:E.bottom}],side:N}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(w),w.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:De(t.onKeyDown,w=>{var C;t.disabled||w.target!==w.currentTarget||u.searchRef.current!==""&&w.key===" "||HN[i.dir].includes(w.key)&&(s.onOpenChange(!0),(C=s.content)==null||C.focus(),w.preventDefault())})})})},"MenuSubTrigger")),lA="MenuSubContent",iA=r.forwardRef(At(function(t,n){const s=py(ga,t.__scopeMenu),{forceMount:i=s.forceMount,align:c="start",...u}=t,f=qo(ga,t.__scopeMenu),h=Uc(ga,t.__scopeMenu),m=wy(lA,t.__scopeMenu),g=r.useRef(null),v=vt(n,g);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(jr,{present:i||f.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:o.jsx(ym,{id:m.contentId,"aria-labelledby":m.triggerId,...u,ref:v,align:c,side:h.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{var w;h.isUsingKeyboardRef.current&&((w=g.current)==null||w.focus()),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:De(t.onFocusOutside,y=>{y.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:De(t.onEscapeKeyDown,y=>{h.onClose(),y.preventDefault()}),onKeyDown:De(t.onKeyDown,y=>{var C;const w=y.currentTarget.contains(y.target),E=DN[h.dir].includes(y.key);w&&E&&(f.onOpenChange(!1),(C=m.trigger)==null||C.focus(),y.preventDefault())})})})})})},"MenuSubContent"));function wm(e){return e?"open":"closed"}At(wm,"getOpenState");function Rc(e){return e==="indeterminate"}At(Rc,"isIndeterminate");function V1(e){return Rc(e)?"indeterminate":e?"checked":"unchecked"}At(V1,"getCheckedState");function by(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}At(by,"focusFirst");function Ey(e,t){return e.map((n,s)=>e[(t+s)%e.length])}At(Ey,"wrapArray");function Cy(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=Ey(e,Math.max(c,0));i.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}At(Cy,"getNextMatch");function Sy(e,t){const{x:n,y:s}=e;let i=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],m=f.x,g=f.y,v=h.x,y=h.y;g>s!=y>s&&n<(v-m)*(s-g)/(y-g)+m&&(i=!i)}return i}At(Sy,"isPointInPolygon");function jy(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Sy(n,t)}At(jy,"isPointerInGraceArea");function Jl(e){return t=>t.pointerType==="mouse"?e(t):void 0}At(Jl,"whenMouse");var ky=ON,Ny=hy,Ay=VN,My=BN,Ry=gy,Py=KN,Ly=xm,Ty=YN,Hy=JN,Dy=tA,$y=rA,Fy=aA,Iy=oA,_y=iA,cA=Object.defineProperty,Un=(e,t)=>cA(e,"name",{value:t,configurable:!0}),bm="ContextMenu",[uA,qO]=Sr(bm,[Z1]),kr=Z1(),[dA,Oy]=uA(bm),fA=Un(e=>{const{__scopeContextMenu:t,children:n,onOpenChange:s,open:i,dir:c,modal:u=!0}=e,f=r.useRef(!1),[h,m]=qs({prop:i,defaultProp:!1,onChange:s,caller:bm}),g=kr(t);return o.jsx(dA,{scope:t,open:h,onOpenChange:m,modal:u,hasInteractedRef:f,children:o.jsx(ky,{...g,dir:c,open:h,onOpenChange:m,modal:u,children:n})})},"ContextMenu"),hA="ContextMenuTrigger",mA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,disabled:i=!1,...c}=t,u=Oy(hA,s),f=kr(s),[h,m]=r.useState({x:0,y:0}),g=r.useMemo(()=>({current:{getBoundingClientRect:Un(()=>DOMRect.fromRect({width:0,height:0,...h}),"getBoundingClientRect")}}),[h]),v=r.useRef(0),y=r.useCallback(()=>window.clearTimeout(v.current),[]),w=Un(E=>{u.hasInteractedRef.current=!0,m({x:E.clientX,y:E.clientY}),u.onOpenChange(!0)},"handleOpen");return r.useEffect(()=>y,[y]),r.useEffect(()=>void(i&&y()),[i,y]),o.jsxs(o.Fragment,{children:[o.jsx(Ny,{...f,virtualRef:g}),o.jsx(yt.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:n,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:i?t.onContextMenu:De(t.onContextMenu,E=>{y(),w(E),E.preventDefault()}),onPointerDown:i?t.onPointerDown:De(t.onPointerDown,ic(E=>{y(),u.open&&u.onOpenChange(!1),v.current=window.setTimeout(()=>w(E),700)})),onPointerMove:i?t.onPointerMove:De(t.onPointerMove,ic(y)),onPointerCancel:i?t.onPointerCancel:De(t.onPointerCancel,ic(y)),onPointerUp:i?t.onPointerUp:De(t.onPointerUp,ic(y))})]})},"ContextMenuTrigger")),pA=Un(e=>{const{__scopeContextMenu:t,...n}=e,s=kr(t);return o.jsx(Ay,{...s,...n})},"ContextMenuPortal"),gA="ContextMenuContent",vA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=Oy(gA,s),u=kr(s),f=r.useRef(!1);return o.jsx(My,{...u,...i,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var m;(m=t.onCloseAutoFocus)==null||m.call(t,h),!h.defaultPrevented&&f.current&&h.preventDefault(),f.current=!1},onInteractOutside:h=>{var m;(m=t.onInteractOutside)==null||m.call(t,h),!h.defaultPrevented&&!c.modal&&(f.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuContent")),yA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Ry,{...c,...i,ref:n})},"ContextMenuGroup")),xA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Py,{...c,...i,ref:n})},"ContextMenuLabel")),wA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Ly,{...c,...i,ref:n})},"ContextMenuItem")),bA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Ty,{...c,...i,ref:n})},"ContextMenuCheckboxItem")),EA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Hy,{...c,...i,ref:n})},"ContextMenuRadioGroup")),CA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Dy,{...c,...i,ref:n})},"ContextMenuRadioItem")),SA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx($y,{...c,...i,ref:n})},"ContextMenuItemIndicator")),jA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Fy,{...c,...i,ref:n})},"ContextMenuSeparator")),kA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Iy,{...c,...i,ref:n})},"ContextMenuSubTrigger")),NA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(_y,{...c,...i,ref:n,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuSubContent"));function ic(e){return t=>t.pointerType!=="mouse"?e(t):void 0}Un(ic,"whenTouchOrPen");var AA=fA,MA=mA,Zy=pA,RA=vA,PA=yA,LA=xA,TA=wA,HA=bA,DA=EA,$A=CA,Vy=SA,FA=jA,IA=kA,_A=NA,OA=Object.defineProperty,Nr=(e,t)=>OA(e,"name",{value:t,configurable:!0}),Em="DropdownMenu",[ZA,XO]=Sr(Em,[Z1]),Ar=Z1(),[VA,zy]=ZA(Em),zA=Nr(e=>{const{__scopeDropdownMenu:t,children:n,dir:s,open:i,defaultOpen:c,onOpenChange:u,modal:f=!0}=e,h=Ar(t),m=r.useRef(null),[g,v]=qs({prop:i,defaultProp:c??!1,onChange:u,caller:Em});return o.jsx(VA,{scope:t,triggerId:pa(),triggerRef:m,contentId:pa(),open:g,onOpenChange:v,onOpenToggle:r.useCallback(()=>v(y=>!y),[v]),modal:f,children:o.jsx(ky,{...h,open:g,onOpenChange:v,dir:s,modal:f,children:n})})},"DropdownMenu"),BA="DropdownMenuTrigger",UA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,disabled:i=!1,...c}=t,u=zy(BA,s),f=Ar(s),h=vt(n,u.triggerRef);return o.jsx(Ny,{asChild:!0,...f,children:o.jsx(yt.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...c,ref:h,onPointerDown:De(t.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:De(t.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),WA=Nr(e=>{const{__scopeDropdownMenu:t,...n}=e,s=Ar(t);return o.jsx(Ay,{...s,...n})},"DropdownMenuPortal"),GA="DropdownMenuContent",KA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=zy(GA,s),u=Ar(s),f=r.useRef(!1);return o.jsx(My,{id:c.contentId,"aria-labelledby":c.triggerId,...u,...i,ref:n,onCloseAutoFocus:De(t.onCloseAutoFocus,h=>{var m;f.current||(m=c.triggerRef.current)==null||m.focus(),f.current=!1,h.preventDefault()}),onInteractOutside:De(t.onInteractOutside,h=>{const m=h.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,v=m.button===2||g;(!c.modal||v)&&(f.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),YA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ry,{...c,...i,ref:n})},"DropdownMenuGroup")),qA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Py,{...c,...i,ref:n})},"DropdownMenuLabel")),XA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ly,{...c,...i,ref:n})},"DropdownMenuItem")),QA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ty,{...c,...i,ref:n})},"DropdownMenuCheckboxItem")),JA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Hy,{...c,...i,ref:n})},"DropdownMenuRadioGroup")),eM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Dy,{...c,...i,ref:n})},"DropdownMenuRadioItem")),tM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx($y,{...c,...i,ref:n})},"DropdownMenuItemIndicator")),nM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Fy,{...c,...i,ref:n})},"DropdownMenuSeparator")),rM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Iy,{...c,...i,ref:n})},"DropdownMenuSubTrigger")),aM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(_y,{...c,...i,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),sM=zA,oM=UA,By=WA,lM=KA,iM=YA,cM=qA,uM=XA,dM=QA,fM=JA,hM=eM,Uy=tM,mM=nM,pM=rM,gM=aM,vM=Object.defineProperty,yM=(e,t)=>vM(e,"name",{value:t,configurable:!0});function Wy(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}yM(Wy,"usePrevious");var xM=Object.defineProperty,wM=(e,t)=>xM(e,"name",{value:t,configurable:!0});function e1(e,[t,n]){return Math.min(n,Math.max(t,e))}wM(e1,"clamp");var bM=Object.defineProperty,Ba=(e,t)=>bM(e,"name",{value:t,configurable:!0}),Cm="Popover",[Gy,QO]=Sr(Cm,[ro]),z1=ro(),[EM,ao]=Gy(Cm),CM=Ba(e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!1}=e,f=z1(t),h=r.useRef(null),[m,g]=r.useState(!1),[v,y]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:Cm});return o.jsx(fm,{...f,children:o.jsx(EM,{scope:t,contentId:pa(),triggerRef:h,open:v,onOpenChange:y,onOpenToggle:r.useCallback(()=>y(w=>!w),[y]),hasCustomAnchor:m,onCustomAnchorAdd:r.useCallback(()=>g(!0),[]),onCustomAnchorRemove:r.useCallback(()=>g(!1),[]),modal:u,children:n})})},"Popover"),SM="PopoverAnchor",jM=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,...i}=t,c=ao(SM,s),u=z1(s),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=c;return r.useEffect(()=>(f(),()=>h()),[f,h]),o.jsx(I1,{...u,...i,ref:n})},"PopoverAnchor")),kM="PopoverTrigger",NM=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,...i}=t,c=ao(kM,s),u=z1(s),f=vt(n,c.triggerRef),h=o.jsx(yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":Sm(c.open),...i,ref:f,onClick:De(t.onClick,c.onOpenToggle)});return c.hasCustomAnchor?h:o.jsx(I1,{asChild:!0,...u,children:h})},"PopoverTrigger")),Ky="PopoverPortal",[AM,MM]=Gy(Ky,{forceMount:void 0}),RM=Ba(e=>{const{__scopePopover:t,forceMount:n,children:s,container:i}=e,c=ao(Ky,t);return o.jsx(AM,{scope:t,forceMount:n,children:o.jsx(jr,{present:n||c.open,children:o.jsx(N1,{asChild:!0,container:i,children:s})})})},"PopoverPortal"),Pc="PopoverContent",PM=r.forwardRef(Ba(function(t,n){const s=MM(Pc,t.__scopePopover),{forceMount:i=s.forceMount,...c}=t,u=ao(Pc,t.__scopePopover);return o.jsx(jr,{present:i||u.open,children:u.modal?o.jsx(TM,{...c,ref:n}):o.jsx(HM,{...c,ref:n})})},"PopoverContent")),LM=ya("PopoverContent.RemoveScroll"),TM=r.forwardRef(Ba(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(null),c=vt(n,i),u=r.useRef(!1);return r.useEffect(()=>{const f=i.current;if(f)return M1(f)},[]),o.jsx(Bc,{as:LM,allowPinchZoom:!0,children:o.jsx(Yy,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(t.onCloseAutoFocus,f=>{var h;f.preventDefault(),u.current||(h=s.triggerRef.current)==null||h.focus()}),onPointerDownOutside:De(t.onPointerDownOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,g=h.button===2||m;u.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:De(t.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),HM=r.forwardRef(Ba(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(Yy,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var f,h;(f=t.onCloseAutoFocus)==null||f.call(t,u),u.defaultPrevented||(i.current||(h=s.triggerRef.current)==null||h.focus(),u.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:u=>{var m,g;(m=t.onInteractOutside)==null||m.call(t,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=u.target;((g=s.triggerRef.current)==null?void 0:g.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&c.current&&u.preventDefault()}})},"PopoverContentNonModal")),Yy=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:v,...y}=t,w=ao(Pc,s),E=z1(s);return ci(),o.jsx(zc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(k1,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onDismiss:()=>w.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(hm,{"data-state":Sm(w.open),role:"dialog",id:w.contentId,...E,...y,ref:n,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl")),DM="PopoverClose",$M=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,...i}=t,c=ao(DM,s);return o.jsx(yt.button,{type:"button",...i,ref:n,onClick:De(t.onClick,()=>c.onOpenChange(!1))})},"PopoverClose"));function Sm(e){return e?"open":"closed"}Ba(Sm,"getState");var FM=CM,IM=jM,_M=NM,OM=RM,ZM=PM,VM=$M,zM=Object.defineProperty,Et=(e,t)=>zM(e,"name",{value:t,configurable:!0});function qy(e,t){return r.useReducer((n,s)=>t[n][s]??n,e)}Et(qy,"useStateMachine");var Xy="ScrollArea",[Qy,JO]=Sr(Xy),[BM,ra]=Qy(Xy),UM=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,type:i="hover",dir:c,scrollHideDelay:u=600,...f}=t,[h,m]=r.useState(null),[g,v]=r.useState(null),[y,w]=r.useState(null),[E,C]=r.useState(null),[b,N]=r.useState(null),[j,k]=r.useState(0),[A,M]=r.useState(0),[T,D]=r.useState(!1),[L,Y]=r.useState(!1),I=vt(n,m),se=Vc(c);return o.jsx(BM,{scope:s,type:i,dir:se,scrollHideDelay:u,scrollArea:h,viewport:g,onViewportChange:v,content:y,onContentChange:w,scrollbarX:E,onScrollbarXChange:C,scrollbarXEnabled:T,onScrollbarXEnabledChange:D,scrollbarY:b,onScrollbarYChange:N,scrollbarYEnabled:L,onScrollbarYEnabledChange:Y,onCornerWidthChange:k,onCornerHeightChange:M,children:o.jsx(yt.div,{dir:se,...f,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":A+"px",...t.style}})})},"ScrollArea")),WM="ScrollAreaViewport",GM=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,children:i,nonce:c,...u}=t,f=ra(WM,s),h=r.useRef(null),m=vt(n,h,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(KM,{nonce:c}),o.jsx(yt.div,{"data-radix-scroll-area-viewport":"",...u,ref:m,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...t.style},children:o.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})},"ScrollAreaViewport")),KM=r.memo(Et(function({nonce:t}){return o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t})},"ScrollAreaViewportStyle"),(e,t)=>e.nonce===t.nonce),ms="ScrollAreaScrollbar",YM=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ms,t.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:f}=c,h=t.orientation==="horizontal";return r.useEffect(()=>(h?u(!0):f(!0),()=>{h?u(!1):f(!1)}),[h,u,f]),c.type==="hover"?o.jsx(qM,{...i,ref:n,forceMount:s}):c.type==="scroll"?o.jsx(XM,{...i,ref:n,forceMount:s}):c.type==="auto"?o.jsx(Jy,{...i,ref:n,forceMount:s}):c.type==="always"?o.jsx(jm,{...i,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),qM=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ms,t.__scopeScrollArea),[u,f]=r.useState(!1);return r.useEffect(()=>{const h=c.scrollArea;let m=0;if(h){const g=Et(()=>{window.clearTimeout(m),f(!0)},"handlePointerEnter"),v=Et(()=>{m=window.setTimeout(()=>f(!1),c.scrollHideDelay)},"handlePointerLeave");return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",v),()=>{window.clearTimeout(m),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",v)}}},[c.scrollArea,c.scrollHideDelay]),o.jsx(jr,{present:s||u,children:o.jsx(Jy,{"data-state":u?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarHover")),XM=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ms,t.__scopeScrollArea),u=t.orientation==="horizontal",f=Gc(()=>m("SCROLL_END"),100),[h,m]=qy("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return r.useEffect(()=>{if(h==="idle"){const g=window.setTimeout(()=>m("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(g)}},[h,c.scrollHideDelay,m]),r.useEffect(()=>{const g=c.viewport,v=u?"scrollLeft":"scrollTop";if(g){let y=g[v];const w=Et(()=>{const E=g[v];y!==E&&(m("SCROLL"),f()),y=E},"handleScroll");return g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[c.viewport,u,m,f]),o.jsx(jr,{present:s||h!=="hidden",children:o.jsx(jm,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:De(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:De(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Jy=r.forwardRef(Et(function(t,n){const s=ra(ms,t.__scopeScrollArea),{forceMount:i,...c}=t,[u,f]=r.useState(!1),h=t.orientation==="horizontal",m=Gc(()=>{if(s.viewport){const g=s.viewport.offsetWidth<s.viewport.scrollWidth,v=s.viewport.offsetHeight<s.viewport.scrollHeight;f(h?g:v)}},10);return $o(s.viewport,m),$o(s.content,m),o.jsx(jr,{present:i||u,children:o.jsx(jm,{"data-state":u?"visible":"hidden",...c,ref:n})})},"ScrollAreaScrollbarAuto")),jm=r.forwardRef(Et(function(t,n){const{orientation:s="vertical",...i}=t,c=ra(ms,t.__scopeScrollArea),u=r.useRef(null),f=r.useRef(0),[h,m]=r.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),g=km(h.viewport,h.content),v={...i,sizes:h,onSizesChange:m,hasThumb:g>0&&g<1,onThumbChange:Et(w=>u.current=w,"onThumbChange"),onThumbPointerUp:Et(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:Et(w=>f.current=w,"onThumbPointerDown")};function y(w,E){return r5(w,f.current,h,E)}return Et(y,"getScrollPosition"),s==="horizontal"?o.jsx(QM,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollLeft,E=sh(w,h,c.dir);u.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:w=>{c.viewport&&(c.viewport.scrollLeft=w)},onDragScroll:w=>{c.viewport&&(c.viewport.scrollLeft=y(w,c.dir))}}):s==="vertical"?o.jsx(JM,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollTop,E=sh(w,h);u.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:w=>{c.viewport&&(c.viewport.scrollTop=w)},onDragScroll:w=>{c.viewport&&(c.viewport.scrollTop=y(w))}}):null},"ScrollAreaScrollbarVisible")),QM=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ms,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=vt(n,m,u.onScrollbarXChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(t5,{"data-orientation":"horizontal",...c,ref:g,sizes:s,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wc(s)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.x),onDragScroll:v=>t.onDragScroll(v.x),onWheelScroll:(v,y)=>{if(u.viewport){const w=u.viewport.scrollLeft+v.deltaX;t.onWheelScroll(w),Am(w,y)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&f&&i({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Lc(f.paddingLeft),paddingEnd:Lc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),JM=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ms,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=vt(n,m,u.onScrollbarYChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(t5,{"data-orientation":"vertical",...c,ref:g,sizes:s,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wc(s)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.y),onDragScroll:v=>t.onDragScroll(v.y),onWheelScroll:(v,y)=>{if(u.viewport){const w=u.viewport.scrollTop+v.deltaY;t.onWheelScroll(w),Am(w,y)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&f&&i({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Lc(f.paddingTop),paddingEnd:Lc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[eR,e5]=Qy(ms),t5=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,sizes:i,hasThumb:c,onThumbChange:u,onThumbPointerUp:f,onThumbPointerDown:h,onThumbPositionChange:m,onDragScroll:g,onWheelScroll:v,onResize:y,...w}=t,E=ra(ms,s),[C,b]=r.useState(null),N=vt(n,b),j=r.useRef(null),k=r.useRef(""),A=E.viewport,M=i.content-i.viewport,T=En(v),D=En(m),L=Gc(y,10);function Y(I){if(j.current){const se=I.clientX-j.current.left,U=I.clientY-j.current.top;g({x:se,y:U})}}return Et(Y,"handleDragScroll"),r.useEffect(()=>{const I=Et(se=>{const U=se.target;(C==null?void 0:C.contains(U))&&T(se,M)},"handleWheel");return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[A,C,M,T]),r.useEffect(D,[i,D]),$o(C,L),$o(E.content,L),o.jsx(eR,{scope:s,scrollbar:C,hasThumb:c,onThumbChange:En(u),onThumbPointerUp:En(f),onThumbPositionChange:D,onThumbPointerDown:En(h),children:o.jsx(yt.div,{...w,ref:N,style:{position:"absolute",...w.style},onPointerDown:De(t.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),j.current=C.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),Y(I))}),onPointerMove:De(t.onPointerMove,Y),onPointerUp:De(t.onPointerUp,I=>{const se=I.target;se.hasPointerCapture(I.pointerId)&&se.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=k.current,E.viewport&&(E.viewport.style.scrollBehavior=""),j.current=null})})})},"ScrollAreaScrollbarImpl")),ah="ScrollAreaThumb",tR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=e5(ah,t.__scopeScrollArea);return o.jsx(jr,{present:s||c.hasThumb,children:o.jsx(nR,{ref:n,...i})})},"ScrollAreaThumb")),nR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,style:i,...c}=t,u=ra(ah,s),f=e5(ah,s),{onThumbPositionChange:h}=f,m=vt(n,f.onThumbChange),g=r.useRef(void 0),v=Gc(()=>{g.current&&(g.current(),g.current=void 0)},100);return r.useEffect(()=>{const y=u.viewport;if(y){const w=Et(()=>{if(v(),!g.current){const E=sR(y,h);g.current=E,h()}},"handleScroll");return h(),y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)}},[u.viewport,v,h]),o.jsx(yt.div,{"data-state":f.hasThumb?"visible":"hidden",...c,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:De(t.onPointerDownCapture,y=>{const E=y.target.getBoundingClientRect(),C=y.clientX-E.left,b=y.clientY-E.top;f.onThumbPointerDown({x:C,y:b})}),onPointerUp:De(t.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),n5="ScrollAreaCorner",rR=r.forwardRef(Et(function(t,n){const s=ra(n5,t.__scopeScrollArea),i=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&i?o.jsx(aR,{...t,ref:n}):null},"ScrollAreaCorner")),aR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,...i}=t,c=ra(n5,s),[u,f]=r.useState(0),[h,m]=r.useState(0),g=!!(u&&h),{onCornerWidthChange:v,onCornerHeightChange:y}=c;return $o(c.scrollbarX,()=>{var E;const w=((E=c.scrollbarX)==null?void 0:E.offsetHeight)||0;c.onCornerHeightChange(w),m(w)}),$o(c.scrollbarY,()=>{var E;const w=((E=c.scrollbarY)==null?void 0:E.offsetWidth)||0;c.onCornerWidthChange(w),f(w)}),r.useEffect(()=>()=>{v(0),y(0)},[v,y]),g?o.jsx(yt.div,{...i,ref:n,style:{width:u,height:h,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null},"ScrollAreaCornerImpl"));function Lc(e){return e?parseInt(e,10):0}Et(Lc,"toInt");function km(e,t){const n=e/t;return isNaN(n)?0:n}Et(km,"getThumbRatio");function Wc(e){const t=km(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}Et(Wc,"getThumbSize");function r5(e,t,n,s="ltr"){const i=Wc(n),c=i/2,u=t||c,f=i-u,h=n.scrollbar.paddingStart+u,m=n.scrollbar.size-n.scrollbar.paddingEnd-f,g=n.content-n.viewport,v=s==="ltr"?[0,g]:[g*-1,0];return Nm([h,m],v)(e)}Et(r5,"getScrollPositionFromPointer");function sh(e,t,n="ltr"){const s=Wc(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,c=t.scrollbar.size-i,u=t.content-t.viewport,f=c-s,h=n==="ltr"?[0,u]:[u*-1,0],m=e1(e,h);return Nm([0,u],[0,f])(m)}Et(sh,"getThumbOffsetFromScroll");function Nm(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}Et(Nm,"linearScale");function Am(e,t){return e>0&&e<t}Et(Am,"isScrollingWithinScrollbarBounds");var sR=Et((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},s=0;return Et((function i(){const c={left:e.scrollLeft,top:e.scrollTop},u=n.left!==c.left,f=n.top!==c.top;(u||f)&&t(),n=c,s=window.requestAnimationFrame(i)}),"loop")(),()=>window.cancelAnimationFrame(s)},"addUnlinkedScrollListener");function Gc(e,t){const n=En(e),s=r.useRef(0);return r.useEffect(()=>()=>window.clearTimeout(s.current),[]),r.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,t)},[n,t])}Et(Gc,"useDebounceCallback");function $o(e,t){const n=En(t);An(()=>{let s=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(s),i.unobserve(e)}}},[e,n])}Et($o,"useResizeObserver");var a5=UM,s5=GM,oh=YM,lh=tR,oR=rR,lR=Object.defineProperty,Tt=(e,t)=>lR(e,"name",{value:t,configurable:!0}),iR=[" ","Enter","ArrowUp","ArrowDown"],cR=[" ","Enter"],ei="Select",[B1,Mm,uR]=j1(ei),[Xo,eZ]=Sr(ei,[uR,ro]),Rm=ro(),[dR,so]=Xo(ei),[fR,hR]=Xo(ei);function o5(e){const{__scopeSelect:t,children:n,open:s,defaultOpen:i,onOpenChange:c,value:u,defaultValue:f,onValueChange:h,dir:m,name:g,autoComplete:v,disabled:y,required:w,form:E,internal_do_not_use_render:C}=e,b=Rm(t),[N,j]=r.useState(null),[k,A]=r.useState(null),[M,T]=r.useState(!1),D=Vc(m),[L,Y]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:ei}),[I,se]=qs({prop:u,defaultProp:f,onChange:h,caller:ei}),U=r.useRef(null),te=r.useRef(I);r.useEffect(()=>{const Z=E?N==null?void 0:N.ownerDocument.getElementById(E):N==null?void 0:N.form;if(Z instanceof HTMLFormElement){const ae=Tt(()=>se(te.current),"reset");return Z.addEventListener("reset",ae),()=>Z.removeEventListener("reset",ae)}},[E,N,se]);const O=N?!!E||!!N.closest("form"):!0,[ne,Q]=r.useState(new Set),H=pa(),K=Array.from(ne).map(Z=>Z.props.value).join(";"),X=r.useCallback(Z=>{Q(ae=>new Set(ae).add(Z))},[]),W=r.useCallback(Z=>{Q(ae=>{const G=new Set(ae);return G.delete(Z),G})},[]),P={required:w,trigger:N,onTriggerChange:j,valueNode:k,onValueNodeChange:A,valueNodeHasChildren:M,onValueNodeHasChildrenChange:T,contentId:H,value:I,onValueChange:se,open:L,onOpenChange:Y,dir:D,triggerPointerDownPosRef:U,disabled:y,name:g,autoComplete:v,form:E,nativeOptions:ne,nativeSelectKey:K,isFormControl:O};return o.jsx(fm,{...b,children:o.jsx(dR,{scope:t,...P,children:o.jsx(B1.Provider,{scope:t,children:o.jsx(fR,{scope:t,onNativeOptionAdd:X,onNativeOptionRemove:W,children:c5(C)?C(P):n})})})})}Tt(o5,"SelectProvider");var mR=Tt(e=>{const{__scopeSelect:t,children:n,...s}=e;return o.jsx(o5,{__scopeSelect:t,...s,internal_do_not_use_render:({isFormControl:i})=>o.jsxs(o.Fragment,{children:[n,i?o.jsx(UR,{__scopeSelect:t}):null]})})},"Select"),pR="SelectTrigger",gR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,disabled:i=!1,...c}=t,u=Rm(s),f=so(pR,s),h=f.disabled||i,m=vt(n,f.onTriggerChange),g=Mm(s),v=r.useRef("touch"),[y,w,E]=Pm(b=>{const N=g().filter(A=>!A.disabled),j=N.find(A=>A.value===f.value),k=Lm(N,b,j);k!==void 0&&f.onValueChange(k.value)}),C=Tt(b=>{h||(f.onOpenChange(!0),E()),b&&(f.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})},"handleOpen");return o.jsx(I1,{asChild:!0,...u,children:o.jsx(yt.button,{type:"button",role:"combobox","aria-controls":f.open?f.contentId:void 0,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":Kc(f.value)?"":void 0,...c,ref:m,onClick:De(c.onClick,b=>{b.currentTarget.focus(),v.current!=="mouse"&&C(b)}),onPointerDown:De(c.onPointerDown,b=>{v.current=b.pointerType;const N=b.target;N.hasPointerCapture(b.pointerId)&&N.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(C(b),b.preventDefault())}),onKeyDown:De(c.onKeyDown,b=>{const N=y.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&w(b.key),!(N&&b.key===" ")&&iR.includes(b.key)&&(C(),b.preventDefault())})})})},"SelectTrigger")),vR="SelectValue",yR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,className:i,style:c,children:u,placeholder:f="",...h}=t,m=so(vR,s),{onValueNodeHasChildrenChange:g}=m,v=u!==void 0,y=vt(n,m.onValueNodeChange);An(()=>{g(v)},[g,v]);const w=Kc(m.value);return o.jsx(yt.span,{...h,asChild:w?!1:h.asChild,ref:y,style:{pointerEvents:"none"},children:o.jsx(r.Fragment,{children:w?f:u},w?"placeholder":"value")})},"SelectValue")),xR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,children:i,...c}=t;return o.jsx(yt.span,{"aria-hidden":!0,...c,ref:n,children:i||"▼"})},"SelectIcon")),wR="SelectPortal",[bR,ER]=Xo(wR,{forceMount:void 0}),CR=Tt(e=>{const{__scopeSelect:t,forceMount:n,...s}=e;return o.jsx(bR,{scope:e.__scopeSelect,forceMount:n,children:o.jsx(N1,{asChild:!0,...s})})},"SelectPortal"),Fo="SelectContent",SR=r.forwardRef(Tt(function(t,n){const s=ER(Fo,t.__scopeSelect),{forceMount:i=s.forceMount,...c}=t,u=so(Fo,t.__scopeSelect),[f,h]=r.useState();return An(()=>{h(new DocumentFragment)},[]),o.jsx(jr,{present:i||u.open,children:({present:m})=>m?o.jsx(NR,{...c,ref:n}):o.jsx(jR,{...c,fragment:f})})},"SelectContent")),jR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,children:i,fragment:c}=t;return c?na.createPortal(o.jsx(l5,{scope:s,children:o.jsx(B1.Slot,{scope:s,children:o.jsx("div",{ref:n,children:i})})}),c):null},"SelectContentFragment")),fa=10,[l5,U1]=Xo(Fo),kR=ya("SelectContent.RemoveScroll"),NR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s}=t,{position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,side:h,sideOffset:m,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:w,collisionPadding:E,sticky:C,hideWhenDetached:b,avoidCollisions:N,...j}=t,k=so(Fo,s),[A,M]=r.useState(null),[T,D]=r.useState(null),L=vt(n,M),[Y,I]=r.useState(null),[se,U]=r.useState(null),te=Mm(s),[O,ne]=r.useState(!1),Q=r.useRef(!1);r.useEffect(()=>{if(A)return M1(A)},[A]),ci();const H=r.useCallback(J=>{const[ge,...He]=te().map(ke=>ke.ref.current),[Qe]=He.slice(-1),ye=document.activeElement;for(const ke of J)if(ke===ye||(ke==null||ke.scrollIntoView({block:"nearest"}),ke===ge&&T&&(T.scrollTop=0),ke===Qe&&T&&(T.scrollTop=T.scrollHeight),ke==null||ke.focus(),document.activeElement!==ye))return},[te,T]),K=r.useCallback(()=>H([Y,A]),[H,Y,A]);r.useEffect(()=>{O&&K()},[O,K]);const{onOpenChange:X,triggerPointerDownPosRef:W}=k;r.useEffect(()=>{if(A){let J={x:0,y:0};const ge=Tt(Qe=>{var ye,ke;J={x:Math.abs(Math.round(Qe.pageX)-(((ye=W.current)==null?void 0:ye.x)??0)),y:Math.abs(Math.round(Qe.pageY)-(((ke=W.current)==null?void 0:ke.y)??0))}},"handlePointerMove"),He=Tt(Qe=>{J.x<=10&&J.y<=10?Qe.preventDefault():Qe.composedPath().includes(A)||X(!1),document.removeEventListener("pointermove",ge),W.current=null},"handlePointerUp");return W.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",He,{capture:!0})}}},[A,X,W]),r.useEffect(()=>{const J=Tt(()=>X(!1),"close");return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[X]);const[P,Z]=Pm(J=>{const ge=te().filter(ye=>!ye.disabled),He=ge.find(ye=>ye.ref.current===document.activeElement),Qe=Lm(ge,J,He);Qe&&setTimeout(()=>{var ye;return(ye=Qe.ref.current)==null?void 0:ye.focus()})}),ae=r.useCallback((J,ge,He)=>{const Qe=!Q.current&&!He;(k.value!==void 0&&k.value===ge||Qe)&&(I(J),Qe&&(Q.current=!0))},[k.value]),G=r.useCallback(()=>A==null?void 0:A.focus(),[A]),fe=r.useCallback((J,ge,He)=>{const Qe=!Q.current&&!He;(k.value!==void 0&&k.value===ge||Qe)&&U(J)},[k.value]),le=i==="popper"?J4:AR,me=le===J4?{side:h,sideOffset:m,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:w,collisionPadding:E,sticky:C,hideWhenDetached:b,avoidCollisions:N}:{};return o.jsx(l5,{scope:s,content:A,viewport:T,onViewportChange:D,itemRefCallback:ae,selectedItem:Y,onItemLeave:G,itemTextRefCallback:fe,focusSelectedItem:K,selectedItemText:se,position:i,isPositioned:O,searchRef:P,children:o.jsx(Bc,{as:kR,allowPinchZoom:!0,children:o.jsx(zc,{asChild:!0,trapped:k.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:De(c,J=>{var ge;(ge=k.trigger)==null||ge.focus({preventScroll:!0}),J.preventDefault()}),children:o.jsx(k1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:o.jsx(le,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:J=>J.preventDefault(),...j,...me,onPlaced:()=>ne(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:De(j.onKeyDown,J=>{const ge=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!ge&&J.key.length===1&&Z(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let Qe=te().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);if(["ArrowUp","End"].includes(J.key)&&(Qe=Qe.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const ye=J.target,ke=Qe.indexOf(ye);Qe=Qe.slice(ke+1)}setTimeout(()=>H(Qe)),J.preventDefault()}})})})})})})},"SelectContentImpl")),AR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,onPlaced:i,...c}=t,u=so(Fo,s),f=U1(Fo,s),[h,m]=r.useState(null),[g,v]=r.useState(null),y=vt(n,v),w=Mm(s),E=r.useRef(!1),C=r.useRef(!0),{viewport:b,selectedItem:N,selectedItemText:j,focusSelectedItem:k}=f,A=r.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&g&&b&&N&&j){const L=u.trigger.getBoundingClientRect(),Y=g.getBoundingClientRect(),I=u.valueNode.getBoundingClientRect(),se=j.getBoundingClientRect();if(u.dir!=="rtl"){const ye=se.left-Y.left,ke=I.left-ye,lt=L.left-ke,jt=L.width+lt,Pt=Math.max(jt,Y.width),Ne=window.innerWidth-fa,Ae=e1(ke,[fa,Math.max(fa,Ne-Pt)]);h.style.minWidth=jt+"px",h.style.left=Ae+"px"}else{const ye=Y.right-se.right,ke=window.innerWidth-I.right-ye,lt=window.innerWidth-L.right-ke,jt=L.width+lt,Pt=Math.max(jt,Y.width),Ne=window.innerWidth-fa,Ae=e1(ke,[fa,Math.max(fa,Ne-Pt)]);h.style.minWidth=jt+"px",h.style.right=Ae+"px"}const U=w(),te=window.innerHeight-fa*2,O=b.scrollHeight,ne=window.getComputedStyle(g),Q=parseInt(ne.borderTopWidth,10),H=parseInt(ne.paddingTop,10),K=parseInt(ne.borderBottomWidth,10),X=parseInt(ne.paddingBottom,10),W=Q+H+O+X+K,P=Math.min(N.offsetHeight*5,W),Z=window.getComputedStyle(b),ae=parseInt(Z.paddingTop,10),G=parseInt(Z.paddingBottom,10),fe=L.top+L.height/2-fa,le=te-fe,me=N.offsetHeight/2,J=N.offsetTop+me,ge=Q+H+J,He=W-ge;if(ge<=fe){const ye=U.length>0&&N===U[U.length-1].ref.current;h.style.bottom="0px";const ke=g.clientHeight-b.offsetTop-b.offsetHeight,lt=Math.max(le,me+(ye?G:0)+ke+K),jt=ge+lt;h.style.height=jt+"px"}else{const ye=U.length>0&&N===U[0].ref.current;h.style.top="0px";const lt=Math.max(fe,Q+b.offsetTop+(ye?ae:0)+me)+He;h.style.height=lt+"px",b.scrollTop=ge-fe+b.offsetTop}h.style.margin=`${fa}px 0`,h.style.minHeight=P+"px",h.style.maxHeight=te+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[w,u.trigger,u.valueNode,h,g,b,N,j,u.dir,i]);An(()=>A(),[A]);const[M,T]=r.useState();An(()=>{g&&T(window.getComputedStyle(g).zIndex)},[g]);const D=r.useCallback(L=>{L&&C.current===!0&&(A(),k==null||k(),C.current=!1)},[A,k]);return o.jsx(MR,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:E,onScrollButtonChange:D,children:o.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:o.jsx(yt.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})},"SelectItemAlignedPosition")),J4=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,align:i="start",collisionPadding:c=fa,...u}=t,f=Rm(s);return o.jsx(hm,{...f,...u,ref:n,align:i,collisionPadding:c,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[MR,RR]=Xo(Fo,{}),eg="SelectViewport",PR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,nonce:i,...c}=t,u=U1(eg,s),f=RR(eg,s),h=vt(n,u.onViewportChange),m=r.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),o.jsx(B1.Slot,{scope:s,children:o.jsx(yt.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:De(c.onScroll,g=>{const v=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=f;if(w!=null&&w.current&&y){const E=Math.abs(m.current-v.scrollTop);if(E>0){const C=window.innerHeight-fa*2,b=parseFloat(y.style.minHeight),N=parseFloat(y.style.height),j=Math.max(b,N);if(j<C){const k=j+E,A=Math.min(C,k),M=k-A;y.style.height=A+"px",y.style.bottom==="0px"&&(v.scrollTop=M>0?M:0,y.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})},"SelectViewport")),LR="SelectGroup",[TR,HR]=Xo(LR),DR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t,c=pa();return o.jsx(TR,{scope:s,id:c,children:o.jsx(yt.div,{role:"group","aria-labelledby":c,...i,ref:n})})},"SelectGroup")),$R="SelectLabel",FR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t,c=HR($R,s);return o.jsx(yt.div,{id:c.id,...i,ref:n})},"SelectLabel")),ih="SelectItem",[IR,i5]=Xo(ih),_R=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,value:i,disabled:c=!1,textValue:u,...f}=t,h=so(ih,s),m=U1(ih,s),g=h.value===i,[v,y]=r.useState(u??""),[w,E]=r.useState(!1),C=En(A=>{var M;return(M=m.itemRefCallback)==null?void 0:M.call(m,A,i,c)}),b=vt(n,C),N=pa(),j=r.useRef("touch"),k=Tt(()=>{c||(h.onValueChange(i),h.onOpenChange(!1))},"handleSelect");return o.jsx(IR,{scope:s,value:i,disabled:c,textId:N,isSelected:g,onItemTextChange:r.useCallback(A=>{y(M=>M||((A==null?void 0:A.textContent)??"").trim())},[]),children:o.jsx(B1.ItemSlot,{scope:s,value:i,disabled:c,textValue:v,children:o.jsx(yt.div,{role:"option","aria-labelledby":N,"data-highlighted":w?"":void 0,"aria-selected":g&&w,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:b,onFocus:De(f.onFocus,()=>E(!0)),onBlur:De(f.onBlur,()=>E(!1)),onClick:De(f.onClick,()=>{j.current!=="mouse"&&k()}),onPointerUp:De(f.onPointerUp,()=>{j.current==="mouse"&&k()}),onPointerDown:De(f.onPointerDown,A=>{j.current=A.pointerType}),onPointerMove:De(f.onPointerMove,A=>{var M;j.current=A.pointerType,c?(M=m.onItemLeave)==null||M.call(m):j.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:De(f.onPointerLeave,A=>{var M;A.currentTarget===document.activeElement&&((M=m.onItemLeave)==null||M.call(m))}),onKeyDown:De(f.onKeyDown,A=>{var T;c||A.target!==A.currentTarget||((T=m.searchRef)==null?void 0:T.current)!==""&&A.key===" "||(cR.includes(A.key)&&k(),A.key===" "&&A.preventDefault())})})})})},"SelectItem")),j0="SelectItemText",OR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,className:i,style:c,...u}=t,f=so(j0,s),h=U1(j0,s),m=i5(j0,s),g=hR(j0,s),[v,y]=r.useState(null),w=En(k=>{var A;return(A=h.itemTextRefCallback)==null?void 0:A.call(h,k,m.value,m.disabled)}),E=vt(n,y,m.onItemTextChange,w),C=v==null?void 0:v.textContent,b=r.useMemo(()=>o.jsx("option",{value:m.value,disabled:m.disabled,children:C},m.value),[m.disabled,m.value,C]),{onNativeOptionAdd:N,onNativeOptionRemove:j}=g;return An(()=>(N(b),()=>j(b)),[N,j,b]),o.jsxs(o.Fragment,{children:[o.jsx(yt.span,{id:m.textId,...u,ref:E}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Kc(f.value)?na.createPortal(u.children,f.valueNode):null]})},"SelectItemText")),ZR="SelectItemIndicator",VR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t;return i5(ZR,s).isSelected?o.jsx(yt.span,{"aria-hidden":!0,...i,ref:n}):null},"SelectItemIndicator")),zR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t;return o.jsx(yt.div,{"aria-hidden":!0,...i,ref:n})},"SelectSeparator")),BR="SelectBubbleInput",UR=r.forwardRef(Tt(function({__scopeSelect:t,...n},s){const i=so(BR,t),{value:c,onValueChange:u,required:f,disabled:h,name:m,autoComplete:g,form:v}=i,{nativeOptions:y,nativeSelectKey:w}=i,E=r.useRef(null),C=vt(s,E),b=c??"",N=Wy(b),j=Array.from(y).some(k=>(k.props.value??"")==="");return r.useEffect(()=>{const k=E.current;if(!k)return;const A=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(A,"value").set;if(N!==b&&T){const D=new Event("change",{bubbles:!0});T.call(k,b),k.dispatchEvent(D)}},[N,b]),o.jsxs(yt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:m,autoComplete:g,disabled:h,form:v,onChange:k=>u(k.target.value),...n,style:{...Qv,...n.style},ref:C,defaultValue:b,children:[Kc(c)&&!j?o.jsx("option",{value:""}):null,Array.from(y)]},w)},"SelectBubbleInput"));function c5(e){return typeof e=="function"}Tt(c5,"isFunction");function Kc(e){return e===""||e===void 0}Tt(Kc,"shouldShowPlaceholder");function Pm(e){const t=En(e),n=r.useRef(""),s=r.useRef(0),i=r.useCallback(u=>{const f=n.current+u;t(f),Tt((function h(m){n.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(f)},[t]),c=r.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,i,c]}Tt(Pm,"useTypeaheadSearch");function Lm(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=u5(e,Math.max(c,0));i.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}Tt(Lm,"findNextItem");function u5(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Tt(u5,"wrapArray");var WR=Object.defineProperty,Qo=(e,t)=>WR(e,"name",{value:t,configurable:!0}),[Tm,tZ]=Sr("Tooltip",[ro]);ro();var GR="TooltipProvider",KR=700,[YR,nZ]=Tm(GR),qR=Qo(e=>{const{__scopeTooltip:t,delayDuration:n=KR,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:c}=e,u=r.useRef(!0),f=r.useRef(!1),h=r.useRef(0);return r.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),o.jsx(YR,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:r.useCallback(()=>{s<=0||(window.clearTimeout(h.current),u.current=!1)},[s]),onClose:r.useCallback(()=>{s<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,s))},[s]),isPointerInTransitRef:f,onPointerInTransitChange:r.useCallback(m=>{f.current=m},[]),disableHoverableContent:i,children:c})},"TooltipProvider"),XR="Tooltip",[rZ,aZ]=Tm(XR),QR="TooltipPortal",[sZ,oZ]=Tm(QR,{forceMount:void 0});function JR(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),c=Math.abs(t.left-e.x);switch(Math.min(n,s,i,c)){case c:return"left";case i:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}Qo(JR,"getExitSideFromRect");function eP(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}Qo(eP,"getPaddedExitPoints");function tP(e){const{top:t,right:n,bottom:s,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:s},{x:i,y:s}]}Qo(tP,"getPointsFromRect");function nP(e,t){const{x:n,y:s}=e;let i=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],m=f.x,g=f.y,v=h.x,y=h.y;g>s!=y>s&&n<(v-m)*(s-g)/(y-g)+m&&(i=!i)}return i}Qo(nP,"isPointInPolygon");function rP(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),d5(t)}Qo(rP,"getHull");function d5(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(;t.length>=2;){const c=t[t.length-1],u=t[t.length-2];if((c.x-u.x)*(i.y-u.y)>=(c.y-u.y)*(i.x-u.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const i=e[s];for(;n.length>=2;){const c=n[n.length-1],u=n[n.length-2];if((c.x-u.x)*(i.y-u.y)>=(c.y-u.y)*(i.x-u.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Qo(d5,"getHullPresorted");var aP=qR,c2={exports:{}};/*!
|
|
92
|
+
`)},fj=0,Pl=[];function hj(e){var t=r.useRef([]),n=r.useRef([0,0]),s=r.useRef(),i=r.useState(fj++)[0],c=r.useState(M3)[0],u=r.useRef(e);r.useEffect(function(){u.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var C=HS([e.lockRef.current],(e.shards||[]).map(Z4),!0).filter(Boolean);return C.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=r.useCallback(function(C,b){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var N=w0(C),j=n.current,k="deltaX"in C?C.deltaX:j[0]-N[0],A="deltaY"in C?C.deltaY:j[1]-N[1],M,T=C.target,D=Math.abs(k)>Math.abs(A)?"h":"v";if("touches"in C&&D==="h"&&T.type==="range")return!1;var L=window.getSelection(),Y=L&&L.anchorNode,I=Y?Y===T||Y.contains(T):!1;if(I)return!1;var se=_4(D,T);if(!se)return!0;if(se?M=D:(M=D==="v"?"h":"v",se=_4(D,T)),!se)return!1;if(!s.current&&"changedTouches"in C&&(k||A)&&(s.current=M),!M)return!0;var U=s.current||M;return cj(U,b,C,U==="h"?k:A)},[]),h=r.useCallback(function(C){var b=C;if(!(!Pl.length||Pl[Pl.length-1]!==c)){var N="deltaY"in b?O4(b):w0(b),j=t.current.filter(function(M){return M.name===b.type&&(M.target===b.target||b.target===M.shadowParent)&&uj(M.delta,N)})[0];if(j&&j.should){b.cancelable&&b.preventDefault();return}if(!j){var k=(u.current.shards||[]).map(Z4).filter(Boolean).filter(function(M){return M.contains(b.target)}),A=k.length>0?f(b,k[0]):!u.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),m=r.useCallback(function(C,b,N,j){var k={name:C,delta:b,target:N,should:j,shadowParent:mj(N)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(A){return A!==k})},1)},[]),g=r.useCallback(function(C){n.current=w0(C),s.current=void 0},[]),v=r.useCallback(function(C){m(C.type,O4(C),C.target,f(C,e.lockRef.current))},[]),y=r.useCallback(function(C){m(C.type,w0(C),C.target,f(C,e.lockRef.current))},[]);r.useEffect(function(){return Pl.push(c),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:y}),document.addEventListener("wheel",h,Rl),document.addEventListener("touchmove",h,Rl),document.addEventListener("touchstart",g,Rl),function(){Pl=Pl.filter(function(C){return C!==c}),document.removeEventListener("wheel",h,Rl),document.removeEventListener("touchmove",h,Rl),document.removeEventListener("touchstart",g,Rl)}},[]);var w=e.removeScrollBar,E=e.inert;return r.createElement(r.Fragment,null,E?r.createElement(c,{styles:dj(i)}):null,w?r.createElement(nj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pj=zS(A3,hj);var Bc=r.forwardRef(function(e,t){return r.createElement(A1,La({},e,{ref:t,sideCar:pj}))});Bc.classNames=A1.classNames;var gj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ll=new WeakMap,b0=new WeakMap,E0={},r2=0,T3=function(e){return e&&(e.host||T3(e.parentNode))},vj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=T3(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},yj=function(e,t,n,s){var i=vj(t,Array.isArray(e)?e:[e]);E0[n]||(E0[n]=new WeakMap);var c=E0[n],u=[],f=new Set,h=new Set(i),m=function(v){!v||f.has(v)||(f.add(v),m(v.parentNode))};i.forEach(m);var g=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(y){if(f.has(y))g(y);else try{var w=y.getAttribute(s),E=w!==null&&w!=="false",C=(Ll.get(y)||0)+1,b=(c.get(y)||0)+1;Ll.set(y,C),c.set(y,b),u.push(y),C===1&&E&&b0.set(y,!0),b===1&&y.setAttribute(n,"true"),E||y.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return g(t),f.clear(),r2++,function(){u.forEach(function(v){var y=Ll.get(v)-1,w=c.get(v)-1;Ll.set(v,y),c.set(v,w),y||(b0.has(v)||v.removeAttribute(s),b0.delete(v)),w||v.removeAttribute(n)}),r2--,r2||(Ll=new WeakMap,Ll=new WeakMap,b0=new WeakMap,E0={})}},M1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=gj(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),yj(s,i,n,"aria-hidden")):function(){return null}},xj=Object.defineProperty,Zr=(e,t)=>xj(e,"name",{value:t,configurable:!0}),rm="Dialog",[H3,D3]=Sr(rm),[wj,ba]=H3(rm),ui=Zr(e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,f=r.useRef(null),h=r.useRef(null),[m,g]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:rm}),[v,y]=r.useState(0),[w,E]=r.useState(0);return o.jsx(wj,{scope:t,triggerRef:f,contentRef:h,contentId:pa(),titleId:pa(),descriptionId:pa(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:E,open:m,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(C=>!C),[g]),modal:u,children:n})},"Dialog"),bj="DialogTrigger",am=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(bj,s),u=vt(n,c.triggerRef);return o.jsx(yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":P1(c.open),...i,ref:u,onClick:De(t.onClick,c.onOpenToggle)})},"DialogTrigger")),$3="DialogPortal",[Ej,F3]=H3($3,{forceMount:void 0}),di=Zr(e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,c=ba($3,t);return o.jsx(Ej,{scope:t,forceMount:n,children:r.Children.map(s,u=>o.jsx(jr,{present:n||c.open,children:o.jsx(N1,{asChild:!0,container:i,children:u})}))})},"DialogPortal"),Q2="DialogOverlay",fi=r.forwardRef(Zr(function(t,n){const s=F3(Q2,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=ba(Q2,t.__scopeDialog);return u.modal?o.jsx(jr,{present:i||u.open,children:o.jsx(Sj,{...c,ref:n})}):null},"DialogOverlay")),Cj=ya("DialogOverlay.RemoveScroll"),Sj=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Q2,s),u=v3(),f=vt(n,u);return o.jsx(Bc,{as:Cj,allowPinchZoom:!0,shards:[c.contentRef],children:o.jsx(yt.div,{"data-state":P1(c.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),kc="DialogContent",hi=r.forwardRef(Zr(function(t,n){const s=F3(kc,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=ba(kc,t.__scopeDialog);return o.jsx(jr,{present:i||u.open,children:u.modal?o.jsx(jj,{...c,ref:n}):o.jsx(kj,{...c,ref:n})})},"DialogContent")),jj=r.forwardRef(Zr(function(t,n){const s=ba(kc,t.__scopeDialog),i=r.useRef(null),c=vt(n,s.contentRef,i);return r.useEffect(()=>{const u=i.current;if(u)return M1(u)},[]),o.jsx(I3,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:De(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),(f=s.triggerRef.current)==null||f.focus()}),onPointerDownOutside:De(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:De(t.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),kj=r.forwardRef(Zr(function(t,n){const s=ba(kc,t.__scopeDialog),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(I3,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var f,h;(f=t.onCloseAutoFocus)==null||f.call(t,u),u.defaultPrevented||(i.current||(h=s.triggerRef.current)==null||h.focus(),u.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:u=>{var m,g;(m=t.onInteractOutside)==null||m.call(t,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=u.target;((g=s.triggerRef.current)==null?void 0:g.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&c.current&&u.preventDefault()}})},"DialogContentNonModal")),I3=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,...f}=t,h=ba(kc,s);return ci(),o.jsx(o.Fragment,{children:o.jsx(zc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(k1,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":P1(h.open),...f,ref:n,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),Nj="DialogTitle",mi=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Nj,s),{setTitleCount:u}=c;return An(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(yt.h2,{id:c.titleId,...i,ref:n})},"DialogTitle")),Aj="DialogDescription",sm=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Aj,s),{setDescriptionCount:u}=c;return An(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(yt.p,{id:c.descriptionId,...i,ref:n})},"DialogDescription")),Mj="DialogClose",R1=r.forwardRef(Zr(function(t,n){const{__scopeDialog:s,...i}=t,c=ba(Mj,s);return o.jsx(yt.button,{type:"button",...i,ref:n,onClick:De(t.onClick,()=>c.onOpenChange(!1))})},"DialogClose"));function P1(e){return e?"open":"closed"}Zr(P1,"getState");var Rj=Object.defineProperty,ds=(e,t)=>Rj(e,"name",{value:t,configurable:!0}),Pj="AlertDialog",[Lj,GO]=Sr(Pj,[D3]),fs=D3(),Tj=ds(e=>{const{__scopeAlertDialog:t,...n}=e,s=fs(t);return o.jsx(ui,{...s,...n,modal:!0})},"AlertDialog"),Hj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(am,{...c,...i,ref:n})},"AlertDialogTrigger")),Dj=ds(e=>{const{__scopeAlertDialog:t,...n}=e,s=fs(t);return o.jsx(di,{...s,...n})},"AlertDialogPortal"),$j=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(fi,{...c,...i,ref:n})},"AlertDialogOverlay")),Fj="AlertDialogContent",[Ij,_j]=Lj(Fj),Oj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,children:i,...c}=t,u=fs(s),f=r.useRef(null),h=vt(n,f),m=r.useRef(null);return o.jsx(Ij,{scope:s,cancelRef:m,children:o.jsx(hi,{role:"alertdialog",...u,...c,ref:h,onOpenAutoFocus:De(c.onOpenAutoFocus,g=>{var v;g.preventDefault(),(v=m.current)==null||v.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:i})})},"AlertDialogContent")),Zj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(mi,{...c,...i,ref:n})},"AlertDialogTitle")),Vj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(sm,{...c,...i,ref:n})},"AlertDialogDescription")),zj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=fs(s);return o.jsx(R1,{...c,...i,ref:n})},"AlertDialogAction")),Bj="AlertDialogCancel",Uj=r.forwardRef(ds(function(t,n){const{__scopeAlertDialog:s,...i}=t,{cancelRef:c}=_j(Bj,s),u=fs(s),f=vt(n,c);return o.jsx(R1,{...u,...i,ref:f})},"AlertDialogCancel")),Wj=Tj,Gj=Hj,Kj=Dj,Yj=$j,qj=Oj,Xj=zj,Qj=Uj,Jj=Zj,ek=Vj,tk=Object.defineProperty,nk=(e,t)=>tk(e,"name",{value:t,configurable:!0});function _3(e){const[t,n]=r.useState(void 0);return An(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,f;if("borderBoxSize"in c){const h=c.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;n({width:u,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}nk(_3,"useSize");const rk=["top","right","bottom","left"],Xs=Math.min,os=Math.max,q0=Math.round,C0=Math.floor,ls=e=>({x:e,y:e}),ak={left:"right",right:"left",bottom:"top",top:"bottom"};function O3(e,t,n){return os(e,Xs(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function Qs(e){return e.split("-")[0]}function pi(e){return e.split("-")[1]}function om(e){return e==="x"?"y":"x"}function lm(e){return e==="y"?"height":"width"}function Ta(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function im(e){return om(Ta(e))}function sk(e,t,n){n===void 0&&(n=!1);const s=pi(e),i=im(e),c=lm(i);let u=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=X0(u)),[u,X0(u)]}function ok(e){const t=X0(e);return[J2(e),t,J2(t)]}function J2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const V4=["left","right"],z4=["right","left"],lk=["top","bottom"],ik=["bottom","top"];function ck(e,t,n){switch(e){case"top":case"bottom":return n?t?z4:V4:t?V4:z4;case"left":case"right":return t?lk:ik;default:return[]}}function uk(e,t,n,s){const i=pi(e);let c=ck(Qs(e),n==="start",s);return i&&(c=c.map(u=>u+"-"+i),t&&(c=c.concat(c.map(J2)))),c}function X0(e){const t=Qs(e);return ak[t]+e.slice(t.length)}function dk(e){var t,n,s,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(s=e.bottom)!=null?s:0,left:(i=e.left)!=null?i:0}}function Z3(e){return typeof e!="number"?dk(e):{top:e,right:e,bottom:e,left:e}}function Q0(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function B4(e,t,n){let{reference:s,floating:i}=e;const c=Ta(t),u=im(t),f=lm(u),h=Qs(t),m=c==="y",g=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,y=s[f]/2-i[f]/2;let w;switch(h){case"top":w={x:g,y:s.y-i.height};break;case"bottom":w={x:g,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:v};break;case"left":w={x:s.x-i.width,y:v};break;default:w={x:s.x,y:s.y}}const E=pi(t);return E&&(w[u]+=y*(E==="end"?1:-1)*(n&&m?-1:1)),w}async function fk(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:c,rects:u,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:v="floating",altBoundary:y=!1,padding:w=0}=us(t,e),E=Z3(w),b=f[y?v==="floating"?"reference":"floating":v],N=Q0(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(b)))==null||n?b:b.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:m,rootBoundary:g,strategy:h})),j=v==="floating"?{x:s,y:i,width:u.floating.width,height:u.floating.height}:u.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),A=await(c.isElement==null?void 0:c.isElement(k))&&await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1},M=Q0(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:j,offsetParent:k,strategy:h}):j);return{top:(N.top-M.top+E.top)/A.y,bottom:(M.bottom-N.bottom+E.bottom)/A.y,left:(N.left-M.left+E.left)/A.x,right:(M.right-N.right+E.right)/A.x}}const hk=50,mk=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=n,f=u.detectOverflow?u:{...u,detectOverflow:fk},h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:v}=B4(m,s,h),y=s,w=0;const E={};for(let C=0;C<c.length;C++){const b=c[C];if(!b)continue;const{name:N,fn:j}=b,{x:k,y:A,data:M,reset:T}=await j({x:g,y:v,initialPlacement:s,placement:y,strategy:i,middlewareData:E,rects:m,platform:f,elements:{reference:e,floating:t}});g=k??g,v=A??v,E[N]={...E[N],...M},T&&w<hk&&(w++,typeof T=="object"&&(T.placement&&(y=T.placement),T.rects&&(m=T.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:g,y:v}=B4(m,y,h)),C=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:E}},pk=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:c,platform:u,elements:f,middlewareData:h}=t,{element:m,padding:g=0}=us(e,t)||{};if(m==null)return{};const v=Z3(g),y={x:n,y:s},w=im(i),E=lm(w),C=await u.getDimensions(m),b=w==="y",N=b?"top":"left",j=b?"bottom":"right",k=b?"clientHeight":"clientWidth",A=c.reference[E]+c.reference[w]-y[w]-c.floating[E],M=y[w]-c.reference[w],T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let D=T?T[k]:0;(!D||!await(u.isElement==null?void 0:u.isElement(T)))&&(D=f.floating[k]||c.floating[E]);const L=A/2-M/2,Y=D/2-C[E]/2-1,I=Xs(v[N],Y),se=Xs(v[j],Y),U=D-C[E]-se,te=D/2-C[E]/2+L,O=O3(I,te,U),ne=!h.arrow&&pi(i)!=null&&te!==O&&c.reference[E]/2-(te<I?I:se)-C[E]/2<0,Q=ne?te<I?te-I:te-U:0;return{[w]:y[w]+Q,data:{[w]:O,centerOffset:te-O-Q,...ne&&{alignmentOffset:Q}},reset:ne}}}),gk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:c,rects:u,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:g=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...b}=us(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const N=Qs(i),j=Ta(f),k=Qs(f)===f,A=await(h.isRTL==null?void 0:h.isRTL(m.floating)),M=y||(k||!C?[X0(f)]:ok(f)),T=E!=="none";!y&&T&&M.push(...uk(f,C,E,A));const D=[f,...M],L=await h.detectOverflow(t,b),Y=[];let I=((s=c.flip)==null?void 0:s.overflows)||[];if(g&&Y.push(L[N]),v){const O=sk(i,u,A);Y.push(L[O[0]],L[O[1]])}if(I=[...I,{placement:i,overflows:Y}],!Y.every(O=>O<=0)){var se,U;const O=(((se=c.flip)==null?void 0:se.index)||0)+1,ne=D[O];if(ne&&(!(v==="alignment"?j!==Ta(ne):!1)||I.every(K=>Ta(K.placement)===j?K.overflows[0]>0:!0)))return{data:{index:O,overflows:I},reset:{placement:ne}};let Q=(U=I.filter(H=>H.overflows[0]<=0).sort((H,K)=>H.overflows[1]-K.overflows[1])[0])==null?void 0:U.placement;if(!Q)switch(w){case"bestFit":{var te;const H=(te=I.filter(K=>{if(T){const X=Ta(K.placement);return X===j||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,W)=>X+W,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:te[0];H&&(Q=H);break}case"initialPlacement":Q=f;break}if(i!==Q)return{reset:{placement:Q}}}return{}}}};function U4(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W4(e){return rk.some(t=>e[t]>=0)}const vk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...c}=us(e,t);switch(i){case"referenceHidden":{const u=await s.detectOverflow(t,{...c,elementContext:"reference"}),f=U4(u,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:W4(f)}}}case"escaped":{const u=await s.detectOverflow(t,{...c,altBoundary:!0}),f=U4(u,n.floating);return{data:{escapedOffsets:f,escaped:W4(f)}}}default:return{}}}}},V3=new Set(["left","top"]);async function yk(e,t){const{placement:n,platform:s,elements:i}=e,c=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=Qs(n),f=pi(n),h=Ta(n)==="y",m=V3.has(u)?-1:1,g=c&&h?-1:1,v=us(t,e);let{mainAxis:y,crossAxis:w,alignmentAxis:E}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof E=="number"&&(w=f==="end"?E*-1:E),h?{x:w*g,y:y*m}:{x:y*m,y:w*g}}const xk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:c,placement:u,middlewareData:f}=t,h=await yk(t,e);return u===((n=f.offset)==null?void 0:n.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:c+h.y,data:{...h,placement:u}}}}},wk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:c}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:j=>{let{x:k,y:A}=j;return{x:k,y:A}}},...m}=us(e,t),g={x:n,y:s},v=await c.detectOverflow(t,m),y=Ta(i),w=om(y);let E=g[w],C=g[y];const b=(j,k)=>O3(k+v[j==="y"?"top":"left"],k,k-v[j==="y"?"bottom":"right"]);u&&(E=b(w,E)),f&&(C=b(y,C));const N=h.fn({...t,[w]:E,[y]:C});return{...N,data:{x:N.x-n,y:N.y-s,enabled:{[w]:u,[y]:f}}}}}},bk=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,s;const{x:i,y:c,placement:u,rects:f,middlewareData:h}=t,{offset:m=0,mainAxis:g=!0,crossAxis:v=!0}=us(e,t),y={x:i,y:c},w=Ta(u),E=om(w);let C=y[E],b=y[w];const N=us(m,t),j=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:(n=N.mainAxis)!=null?n:0,crossAxis:(s=N.crossAxis)!=null?s:0};if(g){const M=E==="y"?"height":"width",T=f.reference[E]-f.floating[M]+j.mainAxis,D=f.reference[E]+f.reference[M]-j.mainAxis;C<T?C=T:C>D&&(C=D)}if(v){var k,A;const M=E==="y"?"width":"height",T=V3.has(Qs(u)),D=f.reference[w]-f.floating[M]+(T&&((k=h.offset)==null?void 0:k[w])||0)+(T?0:j.crossAxis),L=f.reference[w]+f.reference[M]+(T?0:((A=h.offset)==null?void 0:A[w])||0)-(T?j.crossAxis:0);b<D?b=D:b>L&&(b=L)}return{[E]:C,[w]:b}}}},Ek=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...f}=us(e,t),h=await i.detectOverflow(t,f),m=Qs(n),g=pi(n),v=Ta(n)==="y",{width:y,height:w}=s.floating;let E,C;m==="top"||m==="bottom"?(E=m,C=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(C=m,E=g==="end"?"top":"bottom");const b=w-h.top-h.bottom,N=y-h.left-h.right,j=Xs(w-h[E],b),k=Xs(y-h[C],N),A=t.middlewareData.shift,M=!A;let T=j,D=k;A!=null&&A.enabled.x&&(D=N),A!=null&&A.enabled.y&&(T=b),M&&!g&&(v?D=y-2*os(h.left,h.right):T=w-2*os(h.top,h.bottom)),await u({...t,availableWidth:D,availableHeight:T});const L=await i.getDimensions(c.floating);return y!==L.width||w!==L.height?{reset:{rects:!0}}:{}}}};function L1(){return typeof window<"u"}function gi(e){return z3(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hs(e){var t;return(t=(z3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function z3(e){return L1()?e instanceof Node||e instanceof Cr(e).Node:!1}function $a(e){return L1()?e instanceof Element||e instanceof Cr(e).Element:!1}function no(e){return L1()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function G4(e){return!L1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}function T1(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=Fa(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function Ck(e){return/^(table|td|th)$/.test(gi(e))}function H1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Sk=/transform|translate|scale|rotate|perspective|filter/,jk=/paint|layout|strict|content/,bo=e=>!!e&&e!=="none";let a2;function cm(e){const t=$a(e)?Fa(e):e;return bo(t.transform)||bo(t.translate)||bo(t.scale)||bo(t.rotate)||bo(t.perspective)||!um()&&(bo(t.backdropFilter)||bo(t.filter))||Sk.test(t.willChange||"")||jk.test(t.contain||"")}function kk(e){let t=Ho(e);for(;no(t)&&!Nc(t);){if(cm(t))return t;if(H1(t))return null;t=Ho(t)}return null}function um(){return a2==null&&(a2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),a2}function Nc(e){return/^(html|body|#document)$/.test(gi(e))}function Fa(e){return Cr(e).getComputedStyle(e)}function D1(e){return $a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ho(e){if(gi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||G4(e)&&e.host||hs(e);return G4(t)?t.host:t}function B3(e){const t=Ho(e);return Nc(t)?(e.ownerDocument||e).body:no(t)&&T1(t)?t:B3(t)}function Ac(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=B3(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),u=Cr(i);if(c){const f=eh(u);return t.concat(u,u.visualViewport||[],T1(i)?i:[],f&&n?Ac(f):[])}else return t.concat(i,Ac(i,[],n))}function eh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U3(e){const t=Fa(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=no(e),c=i?e.offsetWidth:n,u=i?e.offsetHeight:s,f=q0(n)!==c||q0(s)!==u;return f&&(n=c,s=u),{width:n,height:s,$:f}}function dm(e){return $a(e)?e:e.contextElement}function Gl(e){const t=dm(e);if(!no(t))return ls(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:c}=U3(t);let u=(c?q0(n.width):n.width)/s,f=(c?q0(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const Nk=ls(0);function W3(e){const t=Cr(e);return!um()||!t.visualViewport?Nk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ak(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Cr(e)}function Do(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=dm(e);let u=ls(1);t&&(s?$a(s)&&(u=Gl(s)):u=Gl(e));const f=Ak(c,n,s)?W3(c):ls(0);let h=(i.left+f.x)/u.x,m=(i.top+f.y)/u.y,g=i.width/u.x,v=i.height/u.y;if(c&&s){const y=Cr(c),w=$a(s)?Cr(s):s;let E=y,C=eh(E);for(;C&&w!==E;){const b=Gl(C),N=C.getBoundingClientRect(),j=Fa(C),k=N.left+(C.clientLeft+parseFloat(j.paddingLeft))*b.x,A=N.top+(C.clientTop+parseFloat(j.paddingTop))*b.y;h*=b.x,m*=b.y,g*=b.x,v*=b.y,h+=k,m+=A,E=Cr(C),C=eh(E)}}return Q0({width:g,height:v,x:h,y:m})}function $1(e,t){const n=D1(e).scrollLeft;return t?t.left+n:Do(hs(e)).left+n}function G3(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-$1(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function Mk(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const c=i==="fixed",u=hs(s),f=t?H1(t.floating):!1;if(s===u||f&&c)return n;let h={scrollLeft:0,scrollTop:0},m=ls(1);const g=ls(0),v=no(s);if((v||!c)&&((gi(s)!=="body"||T1(u))&&(h=D1(s)),v)){const w=Do(s);m=Gl(s),g.x=w.x+s.clientLeft,g.y=w.y+s.clientTop}const y=u&&!v&&!c?G3(u,h):ls(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+g.x+y.x,y:n.y*m.y-h.scrollTop*m.y+g.y+y.y}}function Rk(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pk(e){const t=D1(e),n=e.ownerDocument.body,s=os(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=os(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let c=-t.scrollLeft+$1(e);const u=-t.scrollTop;return Fa(n).direction==="rtl"&&(c+=os(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:c,y:u}}const Lk=25;function Tk(e,t,n){n===void 0&&(n="viewport");const s=n==="layoutViewport",i=Cr(e),c=hs(e),u=i.visualViewport;let f=c.clientWidth,h=c.clientHeight,m=0,g=0;if(u){const y=!um()||t==="fixed";s?y||(m=-u.offsetLeft,g=-u.offsetTop):(f=u.width,h=u.height,y&&(m=u.offsetLeft,g=u.offsetTop))}if($1(c)<=0){const y=c.ownerDocument,w=y.body,E=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,b=Math.abs(c.clientWidth-w.clientWidth-C),N=getComputedStyle(c).scrollbarGutter==="stable both-edges"?b/2:b;N<=Lk&&(f-=N)}return{width:f,height:h,x:m,y:g}}function Hk(e,t){const n=Do(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,c=Gl(e),u=e.clientWidth*c.x,f=e.clientHeight*c.y,h=i*c.x,m=s*c.y;return{width:u,height:f,x:h,y:m}}function K4(e,t,n){let s;if(t==="viewport"||t==="layoutViewport")s=Tk(e,n,t);else if(t==="document")s=Pk(hs(e));else if($a(t))s=Hk(t,n);else{const i=W3(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Q0(s)}function Dk(e,t){const n=t.get(e);if(n)return n;let s=Ac(e,[],!1).filter(f=>$a(f)&&gi(f)!=="body"),i=null;const c=Fa(e).position==="fixed";let u=c?Ho(e):e;for(;$a(u)&&!Nc(u);){const f=Fa(u),h=cm(u),m=i?i.position:c?"fixed":"";!h&&(m==="fixed"||m==="absolute"&&f.position==="static")?s=s.filter(v=>v!==u):i=f,u=Ho(u)}return t.set(e,s),s}function $k(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const u=[...n==="clippingAncestors"?H1(t)?[]:Dk(t,this._c):[].concat(n),s],f=K4(t,u[0],i);let h=f.top,m=f.right,g=f.bottom,v=f.left;for(let y=1;y<u.length;y++){const w=K4(t,u[y],i);h=os(w.top,h),m=Xs(w.right,m),g=Xs(w.bottom,g),v=os(w.left,v)}return{width:m-v,height:g-h,x:v,y:h}}function Fk(e){const{width:t,height:n}=U3(e);return{width:t,height:n}}function Ik(e,t,n){const s=no(t),i=hs(t),c=n==="fixed",u=Do(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=ls(0);if((s||!c)&&((gi(t)!=="body"||T1(i))&&(f=D1(t)),s)){const y=Do(t,!0,c,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}!s&&i&&(h.x=$1(i));const m=i&&!s&&!c?G3(i,f):ls(0),g=u.left+f.scrollLeft-h.x-m.x,v=u.top+f.scrollTop-h.y-m.y;return{x:g,y:v,width:u.width,height:u.height}}function s2(e){return Fa(e).position==="static"}function Y4(e,t){if(!no(e)||Fa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return hs(e)===n&&(n=n.ownerDocument.body),n}function K3(e,t){const n=Cr(e);if(H1(e))return n;if(!no(e)){let i=Ho(e);for(;i&&!Nc(i);){if($a(i)&&!s2(i))return i;i=Ho(i)}return n}let s=Y4(e,t);for(;s&&Ck(s)&&s2(s);)s=Y4(s,t);return s&&Nc(s)&&s2(s)&&!cm(s)?n:s||kk(e)||n}const _k=async function(e){const t=this.getOffsetParent||K3,n=this.getDimensions,s=await n(e.floating);return{reference:Ik(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ok(e){return Fa(e).direction==="rtl"}const Zk={convertOffsetParentRelativeRectToViewportRelativeRect:Mk,getDocumentElement:hs,getClippingRect:$k,getOffsetParent:K3,getElementRects:_k,getClientRects:Rk,getDimensions:Fk,getScale:Gl,isElement:$a,isRTL:Ok};function Y3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vk(e,t,n){let s=null,i;const c=hs(e);function u(){var g;clearTimeout(i),(g=s)==null||g.disconnect(),s=null}function f(g,v){g===void 0&&(g=!1),v===void 0&&(v=1),u();const y=e.getBoundingClientRect(),{left:w,top:E,width:C,height:b}=y;if(g||t(),!C||!b)return;const N=C0(E),j=C0(c.clientWidth-(w+C)),k=C0(c.clientHeight-(E+b)),A=C0(w),T={rootMargin:-N+"px "+-j+"px "+-k+"px "+-A+"px",threshold:os(0,Xs(1,v))||1};let D=!0;function L(Y){const I=Y[0].intersectionRatio;if(!Y3(y,e.getBoundingClientRect()))return f();if(I!==v){if(!D)return f();I?f(!1,I):i=setTimeout(()=>{f(!1,1e-7)},1e3)}D=!1}try{s=new IntersectionObserver(L,{...T,root:c.ownerDocument})}catch{s=new IntersectionObserver(L,T)}s.observe(e)}const h=Cr(e),m=()=>f(n);return h.addEventListener("resize",m),f(!0),()=>{h.removeEventListener("resize",m),u()}}function zk(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=dm(e),g=i||c?[...m?Ac(m):[],...t?Ac(t):[]]:[];g.forEach(N=>{i&&N.addEventListener("scroll",n),c&&N.addEventListener("resize",n)});const v=m&&f?Vk(m,n,c):null;let y=-1,w=null;u&&(w=new ResizeObserver(N=>{let[j]=N;j&&j.target===m&&w&&t&&(w.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var k;(k=w)==null||k.observe(t)})),n()}),m&&!h&&w.observe(m),t&&w.observe(t));let E,C=h?Do(e):null;h&&b();function b(){const N=Do(e);C&&!Y3(C,N)&&n(),C=N,E=requestAnimationFrame(b)}return n(),()=>{var N;g.forEach(j=>{i&&j.removeEventListener("scroll",n),c&&j.removeEventListener("resize",n)}),v==null||v(),(N=w)==null||N.disconnect(),w=null,h&&cancelAnimationFrame(E)}}const Bk=xk,Uk=wk,Wk=gk,Gk=Ek,Kk=vk,q4=pk,Yk=bk,qk=(e,t,n)=>{const s=new Map,i=n??{},c={...Zk,...i.platform,_c:s};return mk(e,t,{...i,platform:c})};var Xk=typeof document<"u",Qk=function(){},V0=Xk?r.useLayoutEffect:Qk;function J0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!J0(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const c=i[s];if(!(c==="_owner"&&e.$$typeof)&&!J0(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function q3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function X4(e,t){const n=q3(e);return Math.round(t*n)/n}function o2(e){const t=r.useRef(e);return V0(()=>{t.current=e}),t}function Jk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[g,v]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,w]=r.useState(s);J0(y,s)||w(s);const[E,C]=r.useState(null),[b,N]=r.useState(null),j=r.useCallback(K=>{K!==T.current&&(T.current=K,C(K))},[]),k=r.useCallback(K=>{K!==D.current&&(D.current=K,N(K))},[]),A=c||E,M=u||b,T=r.useRef(null),D=r.useRef(null),L=r.useRef(g),Y=h!=null,I=o2(h),se=o2(i),U=o2(m),te=r.useCallback(()=>{if(!T.current||!D.current)return;const K={placement:t,strategy:n,middleware:y};se.current&&(K.platform=se.current),qk(T.current,D.current,K).then(X=>{const W={...X,isPositioned:U.current!==!1};O.current&&!J0(L.current,W)&&(L.current=W,na.flushSync(()=>{v(W)}))})},[y,t,n,se,U]);V0(()=>{m===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[m]);const O=r.useRef(!1);V0(()=>(O.current=!0,()=>{O.current=!1}),[]),V0(()=>{if(A&&(T.current=A),M&&(D.current=M),A&&M){if(I.current)return I.current(A,M,te);te()}},[A,M,te,I,Y]);const ne=r.useMemo(()=>({reference:T,floating:D,setReference:j,setFloating:k}),[j,k]),Q=r.useMemo(()=>({reference:A,floating:M}),[A,M]),H=r.useMemo(()=>{const K={position:n,left:0,top:0};if(!Q.floating)return K;const X=X4(Q.floating,g.x),W=X4(Q.floating,g.y);return f?{...K,transform:"translate("+X+"px, "+W+"px)",...q3(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:W}},[n,f,Q.floating,g.x,g.y]);return r.useMemo(()=>({...g,update:te,refs:ne,elements:Q,floatingStyles:H}),[g,te,ne,Q,H])}const eN=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?q4({element:s.current,padding:i}).fn(n):{}:s?q4({element:s,padding:i}).fn(n):{}}}},tN=(e,t)=>{const n=Bk(e);return{name:n.name,fn:n.fn,options:[e,t]}},nN=(e,t)=>{const n=Uk(e);return{name:n.name,fn:n.fn,options:[e,t]}},rN=(e,t)=>({fn:Yk(e).fn,options:[e,t]}),aN=(e,t)=>{const n=Wk(e);return{name:n.name,fn:n.fn,options:[e,t]}},sN=(e,t)=>{const n=Gk(e);return{name:n.name,fn:n.fn,options:[e,t]}},oN=(e,t)=>{const n=Kk(e);return{name:n.name,fn:n.fn,options:[e,t]}},lN=(e,t)=>{const n=eN(e);return{name:n.name,fn:n.fn,options:[e,t]}};var iN=Object.defineProperty,Ws=(e,t)=>iN(e,"name",{value:t,configurable:!0}),X3="Popper",[Q3,ro]=Sr(X3),[cN,J3]=Q3(X3),uN=Ws(e=>{const{__scopePopper:t,children:n}=e,[s,i]=r.useState(null),[c,u]=r.useState(void 0);return o.jsx(cN,{scope:t,anchor:s,onAnchorChange:i,placementState:c,setPlacementState:u,children:n})},"Popper"),dN="PopperAnchor",fN=r.forwardRef(Ws(function(t,n){const{__scopePopper:s,virtualRef:i,...c}=t,u=J3(dN,s),f=r.useRef(null),h=u.onAnchorChange,m=r.useCallback(C=>{f.current=C,C&&h(C)},[h]),g=vt(n,m),v=r.useRef(null);r.useEffect(()=>{if(!i)return;const C=v.current;v.current=i.current,C!==v.current&&h(v.current)});const y=u.placementState&&F1(u.placementState),w=y==null?void 0:y[0],E=y==null?void 0:y[1];return i?null:o.jsx(yt.div,{"data-radix-popper-side":w,"data-radix-popper-align":E,...c,ref:g})},"PopperAnchor")),ey="PopperContent",[hN,KO]=Q3(ey),mN=r.forwardRef(Ws(function(t,n){var ge,He,Qe,ye,ke,lt,jt;const{__scopePopper:s,side:i="bottom",sideOffset:c=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:w=!1,updatePositionStrategy:E="optimized",onPlaced:C,...b}=t,N=J3(ey,s),[j,k]=r.useState(null),A=vt(n,k),[M,T]=r.useState(null),D=_3(M),L=(D==null?void 0:D.width)??0,Y=(D==null?void 0:D.height)??0,I=i+(u!=="center"?"-"+u:""),se=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},U=Array.isArray(g)?g:[g],te=U.length>0,O={padding:se,boundary:U.filter(ty),altBoundary:te},{refs:ne,floatingStyles:Q,placement:H,isPositioned:K,middlewareData:X}=Jk({strategy:"fixed",placement:I,whileElementsMounted:Ws((...Pt)=>zk(...Pt,{animationFrame:E==="always"}),"whileElementsMounted"),elements:{reference:N.anchor},middleware:[tN({mainAxis:c+Y,alignmentAxis:f}),m&&nN({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?rN():void 0,...O}),m&&aN({...O}),sN({...O,apply:Ws(({elements:Pt,rects:Ne,availableWidth:Ae,availableHeight:Ee})=>{const{width:at,height:kt}=Ne.reference,Qt=Pt.floating.style;Qt.setProperty("--radix-popper-available-width",`${Ae}px`),Qt.setProperty("--radix-popper-available-height",`${Ee}px`),Qt.setProperty("--radix-popper-anchor-width",`${at}px`),Qt.setProperty("--radix-popper-anchor-height",`${kt}px`)},"apply")}),M&&lN({element:M,padding:h}),pN({arrowWidth:L,arrowHeight:Y}),w&&oN({strategy:"referenceHidden",...O,boundary:te?O.boundary:void 0})]}),W=N.setPlacementState;An(()=>(W(H),()=>{W(void 0)}),[H,W]);const[P,Z]=F1(H),ae=En(C);An(()=>{K&&(ae==null||ae())},[K,ae]);const G=(ge=X.arrow)==null?void 0:ge.x,fe=(He=X.arrow)==null?void 0:He.y,le=((Qe=X.arrow)==null?void 0:Qe.centerOffset)!==0,[me,J]=r.useState();return An(()=>{j&&J(window.getComputedStyle(j).zIndex)},[j]),o.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:K?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(ye=X.transformOrigin)==null?void 0:ye.x,(ke=X.transformOrigin)==null?void 0:ke.y].join(" "),...((lt=X.hide)==null?void 0:lt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(hN,{scope:s,placedSide:P,placedAlign:Z,onArrowChange:T,arrowX:G,arrowY:fe,shouldHideArrow:le,children:o.jsx(yt.div,{"data-side":P,"data-align":Z,...b,ref:A,style:{...b.style,animation:K?(jt=b.style)==null?void 0:jt.animation:"none"}})})})},"PopperContent"));function ty(e){return e!==null}Ws(ty,"isNotNull");var pN=Ws(e=>({name:"transformOrigin",options:e,fn(t){var b,N,j;const{placement:n,rects:s,middlewareData:i}=t,u=((b=i.arrow)==null?void 0:b.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=F1(n),v={start:"0%",center:"50%",end:"100%"}[g],y=(((N=i.arrow)==null?void 0:N.x)??0)+f/2,w=(((j=i.arrow)==null?void 0:j.y)??0)+h/2;let E="",C="";return m==="bottom"?(E=u?v:`${y}px`,C=`${-h}px`):m==="top"?(E=u?v:`${y}px`,C=`${s.floating.height+h}px`):m==="right"?(E=`${-h}px`,C=u?v:`${w}px`):m==="left"&&(E=`${s.floating.width+h}px`,C=u?v:`${w}px`),{data:{x:E,y:C}}}}),"transformOrigin");function F1(e){const[t,n="center"]=e.split("-");return[t,n]}Ws(F1,"getSideAndAlignFromPlacement");var fm=uN,I1=fN,hm=mN,gN=Object.defineProperty,mm=(e,t)=>gN(e,"name",{value:t,configurable:!0}),l2=!1;function ny(){const[e,t]=r.useState(l2);return r.useEffect(()=>{l2||(l2=!0,t(!0))},[]),e}mm(ny,"useIsHydrated");var ry=Bo[" useSyncExternalStore ".trim().toString()];function ay(){return()=>{}}mm(ay,"subscribe");function sy(){return ry(ay,()=>!0,()=>!1)}mm(sy,"useIsHydratedModern");var vN=typeof ry=="function"?sy:ny,yN=Object.defineProperty,Ko=(e,t)=>yN(e,"name",{value:t,configurable:!0}),i2="rovingFocusGroup.onEntryFocus",xN={bubbles:!1,cancelable:!0},_1="RovingFocusGroup",[th,oy,wN]=j1(_1),[bN,ly]=Sr(_1,[wN]),[EN,CN]=bN(_1),SN=r.forwardRef(Ko(function(t,n){return o.jsx(th.Provider,{scope:t.__scopeRovingFocusGroup,children:o.jsx(th.Slot,{scope:t.__scopeRovingFocusGroup,children:o.jsx(jN,{...t,ref:n})})})},"RovingFocusGroup")),jN=r.forwardRef(Ko(function(t,n){const{__scopeRovingFocusGroup:s,orientation:i,loop:c=!1,dir:u,currentTabStopId:f,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=t,w=r.useRef(null),E=vt(n,w),C=Vc(u),[b,N]=qs({prop:f,defaultProp:h??null,onChange:m,caller:_1}),[j,k]=r.useState(!1),A=En(g),M=oy(s),T=r.useRef(!1),[D,L]=r.useState(0);return r.useEffect(()=>{const Y=w.current;if(Y)return Y.addEventListener(i2,A),()=>Y.removeEventListener(i2,A)},[A]),o.jsx(EN,{scope:s,orientation:i,dir:C,loop:c,currentTabStopId:b,onItemFocus:r.useCallback(Y=>N(Y),[N]),onItemShiftTab:r.useCallback(()=>k(!0),[]),onFocusableItemAdd:r.useCallback(()=>L(Y=>Y+1),[]),onFocusableItemRemove:r.useCallback(()=>L(Y=>Y-1),[]),children:o.jsx(yt.div,{tabIndex:j||D===0?-1:0,"data-orientation":i,...y,ref:E,style:{outline:"none",...t.style},onMouseDown:De(t.onMouseDown,()=>{T.current=!0}),onFocus:De(t.onFocus,Y=>{const I=!T.current;if(Y.target===Y.currentTarget&&I&&!j){const se=new CustomEvent(i2,xN);if(Y.currentTarget.dispatchEvent(se),!se.defaultPrevented){const U=M().filter(H=>H.focusable),te=U.find(H=>H.active),O=U.find(H=>H.id===b),Q=[te,O,...U].filter(Boolean).map(H=>H.ref.current);pm(Q,v)}}T.current=!1}),onBlur:De(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),kN="RovingFocusGroupItem",NN=r.forwardRef(Ko(function(t,n){const{__scopeRovingFocusGroup:s,focusable:i=!0,active:c=!1,tabStopId:u,children:f,...h}=t,m=pa(),g=u||m,v=CN(kN,s),y=v.currentTabStopId===g,w=oy(s),{onFocusableItemAdd:E,onFocusableItemRemove:C,currentTabStopId:b}=v,N=vN();return An(()=>{if(!(!N||!i))return E(),()=>C()},[N,i,E,C]),r.useEffect(()=>{if(!(N||!i))return E(),()=>C()},[N,i,E,C]),o.jsx(th.ItemSlot,{scope:s,id:g,focusable:i,active:c,children:o.jsx(yt.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...h,ref:n,onMouseDown:De(t.onMouseDown,j=>{i?v.onItemFocus(g):j.preventDefault()}),onFocus:De(t.onFocus,()=>v.onItemFocus(g)),onKeyDown:De(t.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){v.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const k=cy(j,v.orientation,v.dir);if(k!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let M=w().filter(T=>T.focusable).map(T=>T.ref.current);if(k==="last")M.reverse();else if(k==="prev"||k==="next"){k==="prev"&&M.reverse();const T=M.indexOf(j.currentTarget);M=v.loop?uy(M,T+1):M.slice(T+1)}setTimeout(()=>pm(M))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:b!=null}):f})})},"RovingFocusGroupItem")),AN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ko(iy,"getDirectionAwareKey");function cy(e,t,n){const s=iy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return AN[s]}Ko(cy,"getFocusIntent");function pm(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}Ko(pm,"focusFirst");function uy(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Ko(uy,"wrapArray");var MN=SN,RN=NN,PN=Object.defineProperty,At=(e,t)=>PN(e,"name",{value:t,configurable:!0}),nh=["Enter"," "],LN=["ArrowDown","PageUp","Home"],dy=["ArrowUp","PageDown","End"],TN=[...LN,...dy],HN={ltr:[...nh,"ArrowRight"],rtl:[...nh,"ArrowLeft"]},DN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},O1="Menu",[Mc,$N,FN]=j1(O1),[Yo,Z1]=Sr(O1,[FN,ro,ly]),gm=ro(),fy=ly(),[IN,qo]=Yo(O1),[_N,Uc]=Yo(O1),ON=At(e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:i,onOpenChange:c,modal:u=!0}=e,f=gm(t),[h,m]=r.useState(null),g=r.useRef(!1),v=En(c),y=Vc(i);return r.useEffect(()=>{const w=At(()=>{g.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},"handleKeyDown"),E=At(()=>g.current=!1,"handlePointer");return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),r.useEffect(()=>{if(!n)return;const w=At(()=>v(!1),"handleBlur");return window.addEventListener("blur",w),()=>window.removeEventListener("blur",w)},[n,v]),o.jsx(fm,{...f,children:o.jsx(IN,{scope:t,open:n,onOpenChange:v,content:h,onContentChange:m,children:o.jsx(_N,{scope:t,onClose:r.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:g,dir:y,modal:u,children:s})})})},"Menu"),hy=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t,c=gm(s);return o.jsx(I1,{...c,...i,ref:n})},"MenuAnchor")),my="MenuPortal",[ZN,py]=Yo(my,{forceMount:void 0}),VN=At(e=>{const{__scopeMenu:t,forceMount:n,children:s,container:i}=e,c=qo(my,t);return o.jsx(ZN,{scope:t,forceMount:n,children:o.jsx(jr,{present:n||c.open,children:o.jsx(N1,{asChild:!0,container:i,children:s})})})},"MenuPortal"),ga="MenuContent",[zN,vm]=Yo(ga),BN=r.forwardRef(At(function(t,n){const s=py(ga,t.__scopeMenu),{forceMount:i=s.forceMount,...c}=t,u=qo(ga,t.__scopeMenu),f=Uc(ga,t.__scopeMenu);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(jr,{present:i||u.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:f.modal?o.jsx(UN,{...c,ref:n}):o.jsx(WN,{...c,ref:n})})})})},"MenuContent")),UN=r.forwardRef(At(function(t,n){const s=qo(ga,t.__scopeMenu),i=r.useRef(null),c=vt(n,i);return r.useEffect(()=>{const u=i.current;if(u)return M1(u)},[]),o.jsx(ym,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:De(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),WN=r.forwardRef(At(function(t,n){const s=qo(ga,t.__scopeMenu);return o.jsx(ym,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),GN=ya("MenuContent.ScrollLock"),ym=r.forwardRef(At(function(t,n){const{__scopeMenu:s,loop:i=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:f,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:E,disableOutsideScroll:C,...b}=t,N=qo(ga,s),j=Uc(ga,s),k=gm(s),A=fy(s),M=$N(s),[T,D]=r.useState(null),L=r.useRef(null),Y=vt(n,L,N.onContentChange),I=r.useRef(0),se=r.useRef(""),U=r.useRef(0),te=r.useRef(null),O=r.useRef("right"),ne=r.useRef(0),Q=C?Bc:r.Fragment,H=C?{as:GN,allowPinchZoom:!0}:void 0,K=At(W=>{var J,ge;const P=se.current+W,Z=M().filter(He=>!He.disabled),ae=document.activeElement,G=(J=Z.find(He=>He.ref.current===ae))==null?void 0:J.textValue,fe=Z.map(He=>He.textValue),le=Cy(fe,P,G),me=(ge=Z.find(He=>He.textValue===le))==null?void 0:ge.ref.current;At((function He(Qe){se.current=Qe,window.clearTimeout(I.current),Qe!==""&&(I.current=window.setTimeout(()=>He(""),1e3))}),"updateSearch")(P),me&&setTimeout(()=>me.focus())},"handleTypeaheadSearch");r.useEffect(()=>()=>window.clearTimeout(I.current),[]),ci();const X=r.useCallback(W=>{var Z,ae;return O.current===((Z=te.current)==null?void 0:Z.side)&&jy(W,(ae=te.current)==null?void 0:ae.area)},[]);return o.jsx(zN,{scope:s,searchRef:se,onItemEnter:r.useCallback(W=>{X(W)&&W.preventDefault()},[X]),onItemLeave:r.useCallback(W=>{var P;X(W)||((P=L.current)==null||P.focus(),D(null))},[X]),onTriggerLeave:r.useCallback(W=>{X(W)&&W.preventDefault()},[X]),pointerGraceTimerRef:U,onPointerGraceIntentChange:r.useCallback(W=>{te.current=W},[]),children:o.jsx(Q,{...H,children:o.jsx(zc,{asChild:!0,trapped:c,onMountAutoFocus:De(u,W=>{var P;W.preventDefault(),(P=L.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:o.jsx(k1,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:E,children:o.jsx(MN,{asChild:!0,...A,dir:j.dir,orientation:"vertical",loop:i,currentTabStopId:T,onCurrentTabStopIdChange:D,onEntryFocus:De(m,W=>{j.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(hm,{role:"menu","aria-orientation":"vertical","data-state":wm(N.open),"data-radix-menu-content":"",dir:j.dir,...k,...b,ref:Y,style:{outline:"none",...b.style},onKeyDown:De(b.onKeyDown,W=>{const Z=W.target.closest("[data-radix-menu-content]")===W.currentTarget,ae=W.ctrlKey||W.altKey||W.metaKey,G=W.key.length===1;Z&&(W.key==="Tab"&&W.preventDefault(),!ae&&G&&K(W.key));const fe=L.current;if(W.target!==fe||!TN.includes(W.key))return;W.preventDefault();const me=M().filter(J=>!J.disabled).map(J=>J.ref.current);dy.includes(W.key)&&me.reverse(),by(me)}),onBlur:De(t.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(I.current),se.current="")}),onPointerMove:De(t.onPointerMove,Jl(W=>{const P=W.target,Z=ne.current!==W.clientX;if(W.currentTarget.contains(P)&&Z){const ae=W.clientX>ne.current?"right":"left";O.current=ae,ne.current=W.clientX}}))})})})})})})},"MenuContentImpl")),gy=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(yt.div,{role:"group",...i,ref:n})},"MenuGroup")),KN=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(yt.div,{...i,ref:n})},"MenuLabel")),rh="MenuItem",Q4="menu.itemSelect",xm=r.forwardRef(At(function(t,n){const{disabled:s=!1,onSelect:i,...c}=t,u=r.useRef(null),f=Uc(rh,t.__scopeMenu),h=vm(rh,t.__scopeMenu),m=vt(n,u),g=r.useRef(!1),v=At(()=>{const y=u.current;if(!s&&y){const w=new CustomEvent(Q4,{bubbles:!0,cancelable:!0});y.addEventListener(Q4,E=>i==null?void 0:i(E),{once:!0}),Qh(y,w),w.defaultPrevented?g.current=!1:f.onClose()}},"handleSelect");return o.jsx(vy,{...c,ref:m,disabled:s,onClick:De(t.onClick,v),onPointerDown:y=>{var w;(w=t.onPointerDown)==null||w.call(t,y),g.current=!0},onPointerUp:De(t.onPointerUp,y=>{var w;g.current||(w=y.currentTarget)==null||w.click()}),onKeyDown:De(t.onKeyDown,y=>{s||y.target!==y.currentTarget||h.searchRef.current!==""&&y.key===" "||nh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})},"MenuItem")),vy=r.forwardRef(At(function(t,n){const{__scopeMenu:s,disabled:i=!1,textValue:c,...u}=t,f=vm(rh,s),h=fy(s),m=r.useRef(null),g=vt(n,m),[v,y]=r.useState(!1),[w,E]=r.useState("");return r.useEffect(()=>{const C=m.current;C&&E((C.textContent??"").trim())},[u.children]),o.jsx(Mc.ItemSlot,{scope:s,disabled:i,textValue:c??w,children:o.jsx(RN,{asChild:!0,...h,focusable:!i,children:o.jsx(yt.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:De(t.onPointerMove,Jl(C=>{i?f.onItemLeave(C):(f.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:De(t.onPointerLeave,Jl(C=>f.onItemLeave(C))),onFocus:De(t.onFocus,()=>y(!0)),onBlur:De(t.onBlur,()=>y(!1))})})})},"MenuItemImpl")),YN=r.forwardRef(At(function(t,n){const{checked:s=!1,onCheckedChange:i,...c}=t;return o.jsx(xy,{scope:t.__scopeMenu,checked:s,children:o.jsx(xm,{role:"menuitemcheckbox","aria-checked":Rc(s)?"mixed":s,...c,ref:n,"data-state":V1(s),onSelect:De(c.onSelect,()=>i==null?void 0:i(Rc(s)?!0:!s),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),qN="MenuRadioGroup",[XN,QN]=Yo(qN,{value:void 0,onValueChange:At(()=>{},"onValueChange")}),JN=r.forwardRef(At(function(t,n){const{value:s,onValueChange:i,...c}=t,u=En(i);return o.jsx(XN,{scope:t.__scopeMenu,value:s,onValueChange:u,children:o.jsx(gy,{...c,ref:n})})},"MenuRadioGroup")),eA="MenuRadioItem",tA=r.forwardRef(At(function(t,n){const{value:s,...i}=t,c=QN(eA,t.__scopeMenu),u=s===c.value;return o.jsx(xy,{scope:t.__scopeMenu,checked:u,children:o.jsx(xm,{role:"menuitemradio","aria-checked":u,...i,ref:n,"data-state":V1(u),onSelect:De(i.onSelect,()=>{var f;return(f=c.onValueChange)==null?void 0:f.call(c,s)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),yy="MenuItemIndicator",[xy,nA]=Yo(yy,{checked:!1}),rA=r.forwardRef(At(function(t,n){const{__scopeMenu:s,forceMount:i,...c}=t,u=nA(yy,s);return o.jsx(jr,{present:i||Rc(u.checked)||u.checked===!0,children:o.jsx(yt.span,{...c,ref:n,"data-state":V1(u.checked)})})},"MenuItemIndicator")),aA=r.forwardRef(At(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(yt.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})},"MenuSeparator")),sA="MenuSub",[YO,wy]=Yo(sA),S0="MenuSubTrigger",oA=r.forwardRef(At(function(t,n){const s=qo(S0,t.__scopeMenu),i=Uc(S0,t.__scopeMenu),c=wy(S0,t.__scopeMenu),u=vm(S0,t.__scopeMenu),f=r.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,g={__scopeMenu:t.__scopeMenu},v=r.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);r.useEffect(()=>v,[v]),r.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),m(null)}},[h,m]);const y=vt(n,c.onTriggerChange);return o.jsx(hy,{asChild:!0,...g,children:o.jsx(vy,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?c.contentId:void 0,"data-state":wm(s.open),...t,ref:y,onClick:w=>{var E;(E=t.onClick)==null||E.call(t,w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:De(t.onPointerMove,Jl(w=>{u.onItemEnter(w),!w.defaultPrevented&&!t.disabled&&!s.open&&!f.current&&(u.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{s.onOpenChange(!0),v()},100))})),onPointerLeave:De(t.onPointerLeave,Jl(w=>{var C,b;v();const E=(C=s.content)==null?void 0:C.getBoundingClientRect();if(E){const N=(b=s.content)==null?void 0:b.dataset.side,j=N==="right",k=j?-5:5,A=E[j?"left":"right"],M=E[j?"right":"left"];u.onPointerGraceIntentChange({area:[{x:w.clientX+k,y:w.clientY},{x:A,y:E.top},{x:M,y:E.top},{x:M,y:E.bottom},{x:A,y:E.bottom}],side:N}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(w),w.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:De(t.onKeyDown,w=>{var C;t.disabled||w.target!==w.currentTarget||u.searchRef.current!==""&&w.key===" "||HN[i.dir].includes(w.key)&&(s.onOpenChange(!0),(C=s.content)==null||C.focus(),w.preventDefault())})})})},"MenuSubTrigger")),lA="MenuSubContent",iA=r.forwardRef(At(function(t,n){const s=py(ga,t.__scopeMenu),{forceMount:i=s.forceMount,align:c="start",...u}=t,f=qo(ga,t.__scopeMenu),h=Uc(ga,t.__scopeMenu),m=wy(lA,t.__scopeMenu),g=r.useRef(null),v=vt(n,g);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(jr,{present:i||f.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:o.jsx(ym,{id:m.contentId,"aria-labelledby":m.triggerId,...u,ref:v,align:c,side:h.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{var w;h.isUsingKeyboardRef.current&&((w=g.current)==null||w.focus()),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:De(t.onFocusOutside,y=>{y.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:De(t.onEscapeKeyDown,y=>{h.onClose(),y.preventDefault()}),onKeyDown:De(t.onKeyDown,y=>{var C;const w=y.currentTarget.contains(y.target),E=DN[h.dir].includes(y.key);w&&E&&(f.onOpenChange(!1),(C=m.trigger)==null||C.focus(),y.preventDefault())})})})})})},"MenuSubContent"));function wm(e){return e?"open":"closed"}At(wm,"getOpenState");function Rc(e){return e==="indeterminate"}At(Rc,"isIndeterminate");function V1(e){return Rc(e)?"indeterminate":e?"checked":"unchecked"}At(V1,"getCheckedState");function by(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}At(by,"focusFirst");function Ey(e,t){return e.map((n,s)=>e[(t+s)%e.length])}At(Ey,"wrapArray");function Cy(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=Ey(e,Math.max(c,0));i.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}At(Cy,"getNextMatch");function Sy(e,t){const{x:n,y:s}=e;let i=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],m=f.x,g=f.y,v=h.x,y=h.y;g>s!=y>s&&n<(v-m)*(s-g)/(y-g)+m&&(i=!i)}return i}At(Sy,"isPointInPolygon");function jy(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Sy(n,t)}At(jy,"isPointerInGraceArea");function Jl(e){return t=>t.pointerType==="mouse"?e(t):void 0}At(Jl,"whenMouse");var ky=ON,Ny=hy,Ay=VN,My=BN,Ry=gy,Py=KN,Ly=xm,Ty=YN,Hy=JN,Dy=tA,$y=rA,Fy=aA,Iy=oA,_y=iA,cA=Object.defineProperty,Un=(e,t)=>cA(e,"name",{value:t,configurable:!0}),bm="ContextMenu",[uA,qO]=Sr(bm,[Z1]),kr=Z1(),[dA,Oy]=uA(bm),fA=Un(e=>{const{__scopeContextMenu:t,children:n,onOpenChange:s,open:i,dir:c,modal:u=!0}=e,f=r.useRef(!1),[h,m]=qs({prop:i,defaultProp:!1,onChange:s,caller:bm}),g=kr(t);return o.jsx(dA,{scope:t,open:h,onOpenChange:m,modal:u,hasInteractedRef:f,children:o.jsx(ky,{...g,dir:c,open:h,onOpenChange:m,modal:u,children:n})})},"ContextMenu"),hA="ContextMenuTrigger",mA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,disabled:i=!1,...c}=t,u=Oy(hA,s),f=kr(s),[h,m]=r.useState({x:0,y:0}),g=r.useMemo(()=>({current:{getBoundingClientRect:Un(()=>DOMRect.fromRect({width:0,height:0,...h}),"getBoundingClientRect")}}),[h]),v=r.useRef(0),y=r.useCallback(()=>window.clearTimeout(v.current),[]),w=Un(E=>{u.hasInteractedRef.current=!0,m({x:E.clientX,y:E.clientY}),u.onOpenChange(!0)},"handleOpen");return r.useEffect(()=>y,[y]),r.useEffect(()=>void(i&&y()),[i,y]),o.jsxs(o.Fragment,{children:[o.jsx(Ny,{...f,virtualRef:g}),o.jsx(yt.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:n,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:i?t.onContextMenu:De(t.onContextMenu,E=>{y(),w(E),E.preventDefault()}),onPointerDown:i?t.onPointerDown:De(t.onPointerDown,ic(E=>{y(),u.open&&u.onOpenChange(!1),v.current=window.setTimeout(()=>w(E),700)})),onPointerMove:i?t.onPointerMove:De(t.onPointerMove,ic(y)),onPointerCancel:i?t.onPointerCancel:De(t.onPointerCancel,ic(y)),onPointerUp:i?t.onPointerUp:De(t.onPointerUp,ic(y))})]})},"ContextMenuTrigger")),pA=Un(e=>{const{__scopeContextMenu:t,...n}=e,s=kr(t);return o.jsx(Ay,{...s,...n})},"ContextMenuPortal"),gA="ContextMenuContent",vA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=Oy(gA,s),u=kr(s),f=r.useRef(!1);return o.jsx(My,{...u,...i,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var m;(m=t.onCloseAutoFocus)==null||m.call(t,h),!h.defaultPrevented&&f.current&&h.preventDefault(),f.current=!1},onInteractOutside:h=>{var m;(m=t.onInteractOutside)==null||m.call(t,h),!h.defaultPrevented&&!c.modal&&(f.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuContent")),yA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Ry,{...c,...i,ref:n})},"ContextMenuGroup")),xA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Py,{...c,...i,ref:n})},"ContextMenuLabel")),wA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Ly,{...c,...i,ref:n})},"ContextMenuItem")),bA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Ty,{...c,...i,ref:n})},"ContextMenuCheckboxItem")),EA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Hy,{...c,...i,ref:n})},"ContextMenuRadioGroup")),CA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Dy,{...c,...i,ref:n})},"ContextMenuRadioItem")),SA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx($y,{...c,...i,ref:n})},"ContextMenuItemIndicator")),jA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Fy,{...c,...i,ref:n})},"ContextMenuSeparator")),kA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(Iy,{...c,...i,ref:n})},"ContextMenuSubTrigger")),NA=r.forwardRef(Un(function(t,n){const{__scopeContextMenu:s,...i}=t,c=kr(s);return o.jsx(_y,{...c,...i,ref:n,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuSubContent"));function ic(e){return t=>t.pointerType!=="mouse"?e(t):void 0}Un(ic,"whenTouchOrPen");var AA=fA,MA=mA,Zy=pA,RA=vA,PA=yA,LA=xA,TA=wA,HA=bA,DA=EA,$A=CA,Vy=SA,FA=jA,IA=kA,_A=NA,OA=Object.defineProperty,Nr=(e,t)=>OA(e,"name",{value:t,configurable:!0}),Em="DropdownMenu",[ZA,XO]=Sr(Em,[Z1]),Ar=Z1(),[VA,zy]=ZA(Em),zA=Nr(e=>{const{__scopeDropdownMenu:t,children:n,dir:s,open:i,defaultOpen:c,onOpenChange:u,modal:f=!0}=e,h=Ar(t),m=r.useRef(null),[g,v]=qs({prop:i,defaultProp:c??!1,onChange:u,caller:Em});return o.jsx(VA,{scope:t,triggerId:pa(),triggerRef:m,contentId:pa(),open:g,onOpenChange:v,onOpenToggle:r.useCallback(()=>v(y=>!y),[v]),modal:f,children:o.jsx(ky,{...h,open:g,onOpenChange:v,dir:s,modal:f,children:n})})},"DropdownMenu"),BA="DropdownMenuTrigger",UA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,disabled:i=!1,...c}=t,u=zy(BA,s),f=Ar(s),h=vt(n,u.triggerRef);return o.jsx(Ny,{asChild:!0,...f,children:o.jsx(yt.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...c,ref:h,onPointerDown:De(t.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:De(t.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),WA=Nr(e=>{const{__scopeDropdownMenu:t,...n}=e,s=Ar(t);return o.jsx(Ay,{...s,...n})},"DropdownMenuPortal"),GA="DropdownMenuContent",KA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=zy(GA,s),u=Ar(s),f=r.useRef(!1);return o.jsx(My,{id:c.contentId,"aria-labelledby":c.triggerId,...u,...i,ref:n,onCloseAutoFocus:De(t.onCloseAutoFocus,h=>{var m;f.current||(m=c.triggerRef.current)==null||m.focus(),f.current=!1,h.preventDefault()}),onInteractOutside:De(t.onInteractOutside,h=>{const m=h.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,v=m.button===2||g;(!c.modal||v)&&(f.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),YA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ry,{...c,...i,ref:n})},"DropdownMenuGroup")),qA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Py,{...c,...i,ref:n})},"DropdownMenuLabel")),XA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ly,{...c,...i,ref:n})},"DropdownMenuItem")),QA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ty,{...c,...i,ref:n})},"DropdownMenuCheckboxItem")),JA=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Hy,{...c,...i,ref:n})},"DropdownMenuRadioGroup")),eM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Dy,{...c,...i,ref:n})},"DropdownMenuRadioItem")),tM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx($y,{...c,...i,ref:n})},"DropdownMenuItemIndicator")),nM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Fy,{...c,...i,ref:n})},"DropdownMenuSeparator")),rM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Iy,{...c,...i,ref:n})},"DropdownMenuSubTrigger")),aM=r.forwardRef(Nr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(_y,{...c,...i,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),sM=zA,oM=UA,By=WA,lM=KA,iM=YA,cM=qA,uM=XA,dM=QA,fM=JA,hM=eM,Uy=tM,mM=nM,pM=rM,gM=aM,vM=Object.defineProperty,yM=(e,t)=>vM(e,"name",{value:t,configurable:!0});function Wy(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}yM(Wy,"usePrevious");var xM=Object.defineProperty,wM=(e,t)=>xM(e,"name",{value:t,configurable:!0});function e1(e,[t,n]){return Math.min(n,Math.max(t,e))}wM(e1,"clamp");var bM=Object.defineProperty,Ba=(e,t)=>bM(e,"name",{value:t,configurable:!0}),Cm="Popover",[Gy,QO]=Sr(Cm,[ro]),z1=ro(),[EM,ao]=Gy(Cm),CM=Ba(e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!1}=e,f=z1(t),h=r.useRef(null),[m,g]=r.useState(!1),[v,y]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:Cm});return o.jsx(fm,{...f,children:o.jsx(EM,{scope:t,contentId:pa(),triggerRef:h,open:v,onOpenChange:y,onOpenToggle:r.useCallback(()=>y(w=>!w),[y]),hasCustomAnchor:m,onCustomAnchorAdd:r.useCallback(()=>g(!0),[]),onCustomAnchorRemove:r.useCallback(()=>g(!1),[]),modal:u,children:n})})},"Popover"),SM="PopoverAnchor",jM=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,...i}=t,c=ao(SM,s),u=z1(s),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=c;return r.useEffect(()=>(f(),()=>h()),[f,h]),o.jsx(I1,{...u,...i,ref:n})},"PopoverAnchor")),kM="PopoverTrigger",NM=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,...i}=t,c=ao(kM,s),u=z1(s),f=vt(n,c.triggerRef),h=o.jsx(yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":Sm(c.open),...i,ref:f,onClick:De(t.onClick,c.onOpenToggle)});return c.hasCustomAnchor?h:o.jsx(I1,{asChild:!0,...u,children:h})},"PopoverTrigger")),Ky="PopoverPortal",[AM,MM]=Gy(Ky,{forceMount:void 0}),RM=Ba(e=>{const{__scopePopover:t,forceMount:n,children:s,container:i}=e,c=ao(Ky,t);return o.jsx(AM,{scope:t,forceMount:n,children:o.jsx(jr,{present:n||c.open,children:o.jsx(N1,{asChild:!0,container:i,children:s})})})},"PopoverPortal"),Pc="PopoverContent",PM=r.forwardRef(Ba(function(t,n){const s=MM(Pc,t.__scopePopover),{forceMount:i=s.forceMount,...c}=t,u=ao(Pc,t.__scopePopover);return o.jsx(jr,{present:i||u.open,children:u.modal?o.jsx(TM,{...c,ref:n}):o.jsx(HM,{...c,ref:n})})},"PopoverContent")),LM=ya("PopoverContent.RemoveScroll"),TM=r.forwardRef(Ba(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(null),c=vt(n,i),u=r.useRef(!1);return r.useEffect(()=>{const f=i.current;if(f)return M1(f)},[]),o.jsx(Bc,{as:LM,allowPinchZoom:!0,children:o.jsx(Yy,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(t.onCloseAutoFocus,f=>{var h;f.preventDefault(),u.current||(h=s.triggerRef.current)==null||h.focus()}),onPointerDownOutside:De(t.onPointerDownOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,g=h.button===2||m;u.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:De(t.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),HM=r.forwardRef(Ba(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(Yy,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var f,h;(f=t.onCloseAutoFocus)==null||f.call(t,u),u.defaultPrevented||(i.current||(h=s.triggerRef.current)==null||h.focus(),u.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:u=>{var m,g;(m=t.onInteractOutside)==null||m.call(t,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=u.target;((g=s.triggerRef.current)==null?void 0:g.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&c.current&&u.preventDefault()}})},"PopoverContentNonModal")),Yy=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:v,...y}=t,w=ao(Pc,s),E=z1(s);return ci(),o.jsx(zc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(k1,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onDismiss:()=>w.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(hm,{"data-state":Sm(w.open),role:"dialog",id:w.contentId,...E,...y,ref:n,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl")),DM="PopoverClose",$M=r.forwardRef(Ba(function(t,n){const{__scopePopover:s,...i}=t,c=ao(DM,s);return o.jsx(yt.button,{type:"button",...i,ref:n,onClick:De(t.onClick,()=>c.onOpenChange(!1))})},"PopoverClose"));function Sm(e){return e?"open":"closed"}Ba(Sm,"getState");var FM=CM,IM=jM,_M=NM,OM=RM,ZM=PM,VM=$M,zM=Object.defineProperty,Et=(e,t)=>zM(e,"name",{value:t,configurable:!0});function qy(e,t){return r.useReducer((n,s)=>t[n][s]??n,e)}Et(qy,"useStateMachine");var Xy="ScrollArea",[Qy,JO]=Sr(Xy),[BM,ra]=Qy(Xy),UM=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,type:i="hover",dir:c,scrollHideDelay:u=600,...f}=t,[h,m]=r.useState(null),[g,v]=r.useState(null),[y,w]=r.useState(null),[E,C]=r.useState(null),[b,N]=r.useState(null),[j,k]=r.useState(0),[A,M]=r.useState(0),[T,D]=r.useState(!1),[L,Y]=r.useState(!1),I=vt(n,m),se=Vc(c);return o.jsx(BM,{scope:s,type:i,dir:se,scrollHideDelay:u,scrollArea:h,viewport:g,onViewportChange:v,content:y,onContentChange:w,scrollbarX:E,onScrollbarXChange:C,scrollbarXEnabled:T,onScrollbarXEnabledChange:D,scrollbarY:b,onScrollbarYChange:N,scrollbarYEnabled:L,onScrollbarYEnabledChange:Y,onCornerWidthChange:k,onCornerHeightChange:M,children:o.jsx(yt.div,{dir:se,...f,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":A+"px",...t.style}})})},"ScrollArea")),WM="ScrollAreaViewport",GM=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,children:i,nonce:c,...u}=t,f=ra(WM,s),h=r.useRef(null),m=vt(n,h,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(KM,{nonce:c}),o.jsx(yt.div,{"data-radix-scroll-area-viewport":"",...u,ref:m,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...t.style},children:o.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})},"ScrollAreaViewport")),KM=r.memo(Et(function({nonce:t}){return o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t})},"ScrollAreaViewportStyle"),(e,t)=>e.nonce===t.nonce),ms="ScrollAreaScrollbar",YM=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ms,t.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:f}=c,h=t.orientation==="horizontal";return r.useEffect(()=>(h?u(!0):f(!0),()=>{h?u(!1):f(!1)}),[h,u,f]),c.type==="hover"?o.jsx(qM,{...i,ref:n,forceMount:s}):c.type==="scroll"?o.jsx(XM,{...i,ref:n,forceMount:s}):c.type==="auto"?o.jsx(Jy,{...i,ref:n,forceMount:s}):c.type==="always"?o.jsx(jm,{...i,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),qM=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ms,t.__scopeScrollArea),[u,f]=r.useState(!1);return r.useEffect(()=>{const h=c.scrollArea;let m=0;if(h){const g=Et(()=>{window.clearTimeout(m),f(!0)},"handlePointerEnter"),v=Et(()=>{m=window.setTimeout(()=>f(!1),c.scrollHideDelay)},"handlePointerLeave");return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",v),()=>{window.clearTimeout(m),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",v)}}},[c.scrollArea,c.scrollHideDelay]),o.jsx(jr,{present:s||u,children:o.jsx(Jy,{"data-state":u?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarHover")),XM=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ms,t.__scopeScrollArea),u=t.orientation==="horizontal",f=Gc(()=>m("SCROLL_END"),100),[h,m]=qy("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return r.useEffect(()=>{if(h==="idle"){const g=window.setTimeout(()=>m("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(g)}},[h,c.scrollHideDelay,m]),r.useEffect(()=>{const g=c.viewport,v=u?"scrollLeft":"scrollTop";if(g){let y=g[v];const w=Et(()=>{const E=g[v];y!==E&&(m("SCROLL"),f()),y=E},"handleScroll");return g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[c.viewport,u,m,f]),o.jsx(jr,{present:s||h!=="hidden",children:o.jsx(jm,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:De(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:De(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Jy=r.forwardRef(Et(function(t,n){const s=ra(ms,t.__scopeScrollArea),{forceMount:i,...c}=t,[u,f]=r.useState(!1),h=t.orientation==="horizontal",m=Gc(()=>{if(s.viewport){const g=s.viewport.offsetWidth<s.viewport.scrollWidth,v=s.viewport.offsetHeight<s.viewport.scrollHeight;f(h?g:v)}},10);return $o(s.viewport,m),$o(s.content,m),o.jsx(jr,{present:i||u,children:o.jsx(jm,{"data-state":u?"visible":"hidden",...c,ref:n})})},"ScrollAreaScrollbarAuto")),jm=r.forwardRef(Et(function(t,n){const{orientation:s="vertical",...i}=t,c=ra(ms,t.__scopeScrollArea),u=r.useRef(null),f=r.useRef(0),[h,m]=r.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),g=km(h.viewport,h.content),v={...i,sizes:h,onSizesChange:m,hasThumb:g>0&&g<1,onThumbChange:Et(w=>u.current=w,"onThumbChange"),onThumbPointerUp:Et(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:Et(w=>f.current=w,"onThumbPointerDown")};function y(w,E){return rx(w,f.current,h,E)}return Et(y,"getScrollPosition"),s==="horizontal"?o.jsx(QM,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollLeft,E=sh(w,h,c.dir);u.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:w=>{c.viewport&&(c.viewport.scrollLeft=w)},onDragScroll:w=>{c.viewport&&(c.viewport.scrollLeft=y(w,c.dir))}}):s==="vertical"?o.jsx(JM,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollTop,E=sh(w,h);u.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:w=>{c.viewport&&(c.viewport.scrollTop=w)},onDragScroll:w=>{c.viewport&&(c.viewport.scrollTop=y(w))}}):null},"ScrollAreaScrollbarVisible")),QM=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ms,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=vt(n,m,u.onScrollbarXChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(tx,{"data-orientation":"horizontal",...c,ref:g,sizes:s,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wc(s)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.x),onDragScroll:v=>t.onDragScroll(v.x),onWheelScroll:(v,y)=>{if(u.viewport){const w=u.viewport.scrollLeft+v.deltaX;t.onWheelScroll(w),Am(w,y)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&f&&i({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Lc(f.paddingLeft),paddingEnd:Lc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),JM=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ms,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=vt(n,m,u.onScrollbarYChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(tx,{"data-orientation":"vertical",...c,ref:g,sizes:s,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wc(s)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.y),onDragScroll:v=>t.onDragScroll(v.y),onWheelScroll:(v,y)=>{if(u.viewport){const w=u.viewport.scrollTop+v.deltaY;t.onWheelScroll(w),Am(w,y)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&f&&i({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Lc(f.paddingTop),paddingEnd:Lc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[eR,ex]=Qy(ms),tx=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,sizes:i,hasThumb:c,onThumbChange:u,onThumbPointerUp:f,onThumbPointerDown:h,onThumbPositionChange:m,onDragScroll:g,onWheelScroll:v,onResize:y,...w}=t,E=ra(ms,s),[C,b]=r.useState(null),N=vt(n,b),j=r.useRef(null),k=r.useRef(""),A=E.viewport,M=i.content-i.viewport,T=En(v),D=En(m),L=Gc(y,10);function Y(I){if(j.current){const se=I.clientX-j.current.left,U=I.clientY-j.current.top;g({x:se,y:U})}}return Et(Y,"handleDragScroll"),r.useEffect(()=>{const I=Et(se=>{const U=se.target;(C==null?void 0:C.contains(U))&&T(se,M)},"handleWheel");return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[A,C,M,T]),r.useEffect(D,[i,D]),$o(C,L),$o(E.content,L),o.jsx(eR,{scope:s,scrollbar:C,hasThumb:c,onThumbChange:En(u),onThumbPointerUp:En(f),onThumbPositionChange:D,onThumbPointerDown:En(h),children:o.jsx(yt.div,{...w,ref:N,style:{position:"absolute",...w.style},onPointerDown:De(t.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),j.current=C.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),Y(I))}),onPointerMove:De(t.onPointerMove,Y),onPointerUp:De(t.onPointerUp,I=>{const se=I.target;se.hasPointerCapture(I.pointerId)&&se.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=k.current,E.viewport&&(E.viewport.style.scrollBehavior=""),j.current=null})})})},"ScrollAreaScrollbarImpl")),ah="ScrollAreaThumb",tR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ex(ah,t.__scopeScrollArea);return o.jsx(jr,{present:s||c.hasThumb,children:o.jsx(nR,{ref:n,...i})})},"ScrollAreaThumb")),nR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,style:i,...c}=t,u=ra(ah,s),f=ex(ah,s),{onThumbPositionChange:h}=f,m=vt(n,f.onThumbChange),g=r.useRef(void 0),v=Gc(()=>{g.current&&(g.current(),g.current=void 0)},100);return r.useEffect(()=>{const y=u.viewport;if(y){const w=Et(()=>{if(v(),!g.current){const E=sR(y,h);g.current=E,h()}},"handleScroll");return h(),y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)}},[u.viewport,v,h]),o.jsx(yt.div,{"data-state":f.hasThumb?"visible":"hidden",...c,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:De(t.onPointerDownCapture,y=>{const E=y.target.getBoundingClientRect(),C=y.clientX-E.left,b=y.clientY-E.top;f.onThumbPointerDown({x:C,y:b})}),onPointerUp:De(t.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),nx="ScrollAreaCorner",rR=r.forwardRef(Et(function(t,n){const s=ra(nx,t.__scopeScrollArea),i=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&i?o.jsx(aR,{...t,ref:n}):null},"ScrollAreaCorner")),aR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,...i}=t,c=ra(nx,s),[u,f]=r.useState(0),[h,m]=r.useState(0),g=!!(u&&h),{onCornerWidthChange:v,onCornerHeightChange:y}=c;return $o(c.scrollbarX,()=>{var E;const w=((E=c.scrollbarX)==null?void 0:E.offsetHeight)||0;c.onCornerHeightChange(w),m(w)}),$o(c.scrollbarY,()=>{var E;const w=((E=c.scrollbarY)==null?void 0:E.offsetWidth)||0;c.onCornerWidthChange(w),f(w)}),r.useEffect(()=>()=>{v(0),y(0)},[v,y]),g?o.jsx(yt.div,{...i,ref:n,style:{width:u,height:h,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null},"ScrollAreaCornerImpl"));function Lc(e){return e?parseInt(e,10):0}Et(Lc,"toInt");function km(e,t){const n=e/t;return isNaN(n)?0:n}Et(km,"getThumbRatio");function Wc(e){const t=km(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}Et(Wc,"getThumbSize");function rx(e,t,n,s="ltr"){const i=Wc(n),c=i/2,u=t||c,f=i-u,h=n.scrollbar.paddingStart+u,m=n.scrollbar.size-n.scrollbar.paddingEnd-f,g=n.content-n.viewport,v=s==="ltr"?[0,g]:[g*-1,0];return Nm([h,m],v)(e)}Et(rx,"getScrollPositionFromPointer");function sh(e,t,n="ltr"){const s=Wc(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,c=t.scrollbar.size-i,u=t.content-t.viewport,f=c-s,h=n==="ltr"?[0,u]:[u*-1,0],m=e1(e,h);return Nm([0,u],[0,f])(m)}Et(sh,"getThumbOffsetFromScroll");function Nm(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}Et(Nm,"linearScale");function Am(e,t){return e>0&&e<t}Et(Am,"isScrollingWithinScrollbarBounds");var sR=Et((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},s=0;return Et((function i(){const c={left:e.scrollLeft,top:e.scrollTop},u=n.left!==c.left,f=n.top!==c.top;(u||f)&&t(),n=c,s=window.requestAnimationFrame(i)}),"loop")(),()=>window.cancelAnimationFrame(s)},"addUnlinkedScrollListener");function Gc(e,t){const n=En(e),s=r.useRef(0);return r.useEffect(()=>()=>window.clearTimeout(s.current),[]),r.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,t)},[n,t])}Et(Gc,"useDebounceCallback");function $o(e,t){const n=En(t);An(()=>{let s=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(s),i.unobserve(e)}}},[e,n])}Et($o,"useResizeObserver");var ax=UM,sx=GM,oh=YM,lh=tR,oR=rR,lR=Object.defineProperty,Tt=(e,t)=>lR(e,"name",{value:t,configurable:!0}),iR=[" ","Enter","ArrowUp","ArrowDown"],cR=[" ","Enter"],ei="Select",[B1,Mm,uR]=j1(ei),[Xo,eZ]=Sr(ei,[uR,ro]),Rm=ro(),[dR,so]=Xo(ei),[fR,hR]=Xo(ei);function ox(e){const{__scopeSelect:t,children:n,open:s,defaultOpen:i,onOpenChange:c,value:u,defaultValue:f,onValueChange:h,dir:m,name:g,autoComplete:v,disabled:y,required:w,form:E,internal_do_not_use_render:C}=e,b=Rm(t),[N,j]=r.useState(null),[k,A]=r.useState(null),[M,T]=r.useState(!1),D=Vc(m),[L,Y]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:ei}),[I,se]=qs({prop:u,defaultProp:f,onChange:h,caller:ei}),U=r.useRef(null),te=r.useRef(I);r.useEffect(()=>{const Z=E?N==null?void 0:N.ownerDocument.getElementById(E):N==null?void 0:N.form;if(Z instanceof HTMLFormElement){const ae=Tt(()=>se(te.current),"reset");return Z.addEventListener("reset",ae),()=>Z.removeEventListener("reset",ae)}},[E,N,se]);const O=N?!!E||!!N.closest("form"):!0,[ne,Q]=r.useState(new Set),H=pa(),K=Array.from(ne).map(Z=>Z.props.value).join(";"),X=r.useCallback(Z=>{Q(ae=>new Set(ae).add(Z))},[]),W=r.useCallback(Z=>{Q(ae=>{const G=new Set(ae);return G.delete(Z),G})},[]),P={required:w,trigger:N,onTriggerChange:j,valueNode:k,onValueNodeChange:A,valueNodeHasChildren:M,onValueNodeHasChildrenChange:T,contentId:H,value:I,onValueChange:se,open:L,onOpenChange:Y,dir:D,triggerPointerDownPosRef:U,disabled:y,name:g,autoComplete:v,form:E,nativeOptions:ne,nativeSelectKey:K,isFormControl:O};return o.jsx(fm,{...b,children:o.jsx(dR,{scope:t,...P,children:o.jsx(B1.Provider,{scope:t,children:o.jsx(fR,{scope:t,onNativeOptionAdd:X,onNativeOptionRemove:W,children:cx(C)?C(P):n})})})})}Tt(ox,"SelectProvider");var mR=Tt(e=>{const{__scopeSelect:t,children:n,...s}=e;return o.jsx(ox,{__scopeSelect:t,...s,internal_do_not_use_render:({isFormControl:i})=>o.jsxs(o.Fragment,{children:[n,i?o.jsx(UR,{__scopeSelect:t}):null]})})},"Select"),pR="SelectTrigger",gR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,disabled:i=!1,...c}=t,u=Rm(s),f=so(pR,s),h=f.disabled||i,m=vt(n,f.onTriggerChange),g=Mm(s),v=r.useRef("touch"),[y,w,E]=Pm(b=>{const N=g().filter(A=>!A.disabled),j=N.find(A=>A.value===f.value),k=Lm(N,b,j);k!==void 0&&f.onValueChange(k.value)}),C=Tt(b=>{h||(f.onOpenChange(!0),E()),b&&(f.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})},"handleOpen");return o.jsx(I1,{asChild:!0,...u,children:o.jsx(yt.button,{type:"button",role:"combobox","aria-controls":f.open?f.contentId:void 0,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":Kc(f.value)?"":void 0,...c,ref:m,onClick:De(c.onClick,b=>{b.currentTarget.focus(),v.current!=="mouse"&&C(b)}),onPointerDown:De(c.onPointerDown,b=>{v.current=b.pointerType;const N=b.target;N.hasPointerCapture(b.pointerId)&&N.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(C(b),b.preventDefault())}),onKeyDown:De(c.onKeyDown,b=>{const N=y.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&w(b.key),!(N&&b.key===" ")&&iR.includes(b.key)&&(C(),b.preventDefault())})})})},"SelectTrigger")),vR="SelectValue",yR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,className:i,style:c,children:u,placeholder:f="",...h}=t,m=so(vR,s),{onValueNodeHasChildrenChange:g}=m,v=u!==void 0,y=vt(n,m.onValueNodeChange);An(()=>{g(v)},[g,v]);const w=Kc(m.value);return o.jsx(yt.span,{...h,asChild:w?!1:h.asChild,ref:y,style:{pointerEvents:"none"},children:o.jsx(r.Fragment,{children:w?f:u},w?"placeholder":"value")})},"SelectValue")),xR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,children:i,...c}=t;return o.jsx(yt.span,{"aria-hidden":!0,...c,ref:n,children:i||"▼"})},"SelectIcon")),wR="SelectPortal",[bR,ER]=Xo(wR,{forceMount:void 0}),CR=Tt(e=>{const{__scopeSelect:t,forceMount:n,...s}=e;return o.jsx(bR,{scope:e.__scopeSelect,forceMount:n,children:o.jsx(N1,{asChild:!0,...s})})},"SelectPortal"),Fo="SelectContent",SR=r.forwardRef(Tt(function(t,n){const s=ER(Fo,t.__scopeSelect),{forceMount:i=s.forceMount,...c}=t,u=so(Fo,t.__scopeSelect),[f,h]=r.useState();return An(()=>{h(new DocumentFragment)},[]),o.jsx(jr,{present:i||u.open,children:({present:m})=>m?o.jsx(NR,{...c,ref:n}):o.jsx(jR,{...c,fragment:f})})},"SelectContent")),jR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,children:i,fragment:c}=t;return c?na.createPortal(o.jsx(lx,{scope:s,children:o.jsx(B1.Slot,{scope:s,children:o.jsx("div",{ref:n,children:i})})}),c):null},"SelectContentFragment")),fa=10,[lx,U1]=Xo(Fo),kR=ya("SelectContent.RemoveScroll"),NR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s}=t,{position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,side:h,sideOffset:m,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:w,collisionPadding:E,sticky:C,hideWhenDetached:b,avoidCollisions:N,...j}=t,k=so(Fo,s),[A,M]=r.useState(null),[T,D]=r.useState(null),L=vt(n,M),[Y,I]=r.useState(null),[se,U]=r.useState(null),te=Mm(s),[O,ne]=r.useState(!1),Q=r.useRef(!1);r.useEffect(()=>{if(A)return M1(A)},[A]),ci();const H=r.useCallback(J=>{const[ge,...He]=te().map(ke=>ke.ref.current),[Qe]=He.slice(-1),ye=document.activeElement;for(const ke of J)if(ke===ye||(ke==null||ke.scrollIntoView({block:"nearest"}),ke===ge&&T&&(T.scrollTop=0),ke===Qe&&T&&(T.scrollTop=T.scrollHeight),ke==null||ke.focus(),document.activeElement!==ye))return},[te,T]),K=r.useCallback(()=>H([Y,A]),[H,Y,A]);r.useEffect(()=>{O&&K()},[O,K]);const{onOpenChange:X,triggerPointerDownPosRef:W}=k;r.useEffect(()=>{if(A){let J={x:0,y:0};const ge=Tt(Qe=>{var ye,ke;J={x:Math.abs(Math.round(Qe.pageX)-(((ye=W.current)==null?void 0:ye.x)??0)),y:Math.abs(Math.round(Qe.pageY)-(((ke=W.current)==null?void 0:ke.y)??0))}},"handlePointerMove"),He=Tt(Qe=>{J.x<=10&&J.y<=10?Qe.preventDefault():Qe.composedPath().includes(A)||X(!1),document.removeEventListener("pointermove",ge),W.current=null},"handlePointerUp");return W.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",He,{capture:!0})}}},[A,X,W]),r.useEffect(()=>{const J=Tt(()=>X(!1),"close");return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[X]);const[P,Z]=Pm(J=>{const ge=te().filter(ye=>!ye.disabled),He=ge.find(ye=>ye.ref.current===document.activeElement),Qe=Lm(ge,J,He);Qe&&setTimeout(()=>{var ye;return(ye=Qe.ref.current)==null?void 0:ye.focus()})}),ae=r.useCallback((J,ge,He)=>{const Qe=!Q.current&&!He;(k.value!==void 0&&k.value===ge||Qe)&&(I(J),Qe&&(Q.current=!0))},[k.value]),G=r.useCallback(()=>A==null?void 0:A.focus(),[A]),fe=r.useCallback((J,ge,He)=>{const Qe=!Q.current&&!He;(k.value!==void 0&&k.value===ge||Qe)&&U(J)},[k.value]),le=i==="popper"?J4:AR,me=le===J4?{side:h,sideOffset:m,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:w,collisionPadding:E,sticky:C,hideWhenDetached:b,avoidCollisions:N}:{};return o.jsx(lx,{scope:s,content:A,viewport:T,onViewportChange:D,itemRefCallback:ae,selectedItem:Y,onItemLeave:G,itemTextRefCallback:fe,focusSelectedItem:K,selectedItemText:se,position:i,isPositioned:O,searchRef:P,children:o.jsx(Bc,{as:kR,allowPinchZoom:!0,children:o.jsx(zc,{asChild:!0,trapped:k.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:De(c,J=>{var ge;(ge=k.trigger)==null||ge.focus({preventScroll:!0}),J.preventDefault()}),children:o.jsx(k1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:o.jsx(le,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:J=>J.preventDefault(),...j,...me,onPlaced:()=>ne(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:De(j.onKeyDown,J=>{const ge=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!ge&&J.key.length===1&&Z(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let Qe=te().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);if(["ArrowUp","End"].includes(J.key)&&(Qe=Qe.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const ye=J.target,ke=Qe.indexOf(ye);Qe=Qe.slice(ke+1)}setTimeout(()=>H(Qe)),J.preventDefault()}})})})})})})},"SelectContentImpl")),AR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,onPlaced:i,...c}=t,u=so(Fo,s),f=U1(Fo,s),[h,m]=r.useState(null),[g,v]=r.useState(null),y=vt(n,v),w=Mm(s),E=r.useRef(!1),C=r.useRef(!0),{viewport:b,selectedItem:N,selectedItemText:j,focusSelectedItem:k}=f,A=r.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&g&&b&&N&&j){const L=u.trigger.getBoundingClientRect(),Y=g.getBoundingClientRect(),I=u.valueNode.getBoundingClientRect(),se=j.getBoundingClientRect();if(u.dir!=="rtl"){const ye=se.left-Y.left,ke=I.left-ye,lt=L.left-ke,jt=L.width+lt,Pt=Math.max(jt,Y.width),Ne=window.innerWidth-fa,Ae=e1(ke,[fa,Math.max(fa,Ne-Pt)]);h.style.minWidth=jt+"px",h.style.left=Ae+"px"}else{const ye=Y.right-se.right,ke=window.innerWidth-I.right-ye,lt=window.innerWidth-L.right-ke,jt=L.width+lt,Pt=Math.max(jt,Y.width),Ne=window.innerWidth-fa,Ae=e1(ke,[fa,Math.max(fa,Ne-Pt)]);h.style.minWidth=jt+"px",h.style.right=Ae+"px"}const U=w(),te=window.innerHeight-fa*2,O=b.scrollHeight,ne=window.getComputedStyle(g),Q=parseInt(ne.borderTopWidth,10),H=parseInt(ne.paddingTop,10),K=parseInt(ne.borderBottomWidth,10),X=parseInt(ne.paddingBottom,10),W=Q+H+O+X+K,P=Math.min(N.offsetHeight*5,W),Z=window.getComputedStyle(b),ae=parseInt(Z.paddingTop,10),G=parseInt(Z.paddingBottom,10),fe=L.top+L.height/2-fa,le=te-fe,me=N.offsetHeight/2,J=N.offsetTop+me,ge=Q+H+J,He=W-ge;if(ge<=fe){const ye=U.length>0&&N===U[U.length-1].ref.current;h.style.bottom="0px";const ke=g.clientHeight-b.offsetTop-b.offsetHeight,lt=Math.max(le,me+(ye?G:0)+ke+K),jt=ge+lt;h.style.height=jt+"px"}else{const ye=U.length>0&&N===U[0].ref.current;h.style.top="0px";const lt=Math.max(fe,Q+b.offsetTop+(ye?ae:0)+me)+He;h.style.height=lt+"px",b.scrollTop=ge-fe+b.offsetTop}h.style.margin=`${fa}px 0`,h.style.minHeight=P+"px",h.style.maxHeight=te+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[w,u.trigger,u.valueNode,h,g,b,N,j,u.dir,i]);An(()=>A(),[A]);const[M,T]=r.useState();An(()=>{g&&T(window.getComputedStyle(g).zIndex)},[g]);const D=r.useCallback(L=>{L&&C.current===!0&&(A(),k==null||k(),C.current=!1)},[A,k]);return o.jsx(MR,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:E,onScrollButtonChange:D,children:o.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:o.jsx(yt.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})},"SelectItemAlignedPosition")),J4=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,align:i="start",collisionPadding:c=fa,...u}=t,f=Rm(s);return o.jsx(hm,{...f,...u,ref:n,align:i,collisionPadding:c,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[MR,RR]=Xo(Fo,{}),eg="SelectViewport",PR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,nonce:i,...c}=t,u=U1(eg,s),f=RR(eg,s),h=vt(n,u.onViewportChange),m=r.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),o.jsx(B1.Slot,{scope:s,children:o.jsx(yt.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:De(c.onScroll,g=>{const v=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=f;if(w!=null&&w.current&&y){const E=Math.abs(m.current-v.scrollTop);if(E>0){const C=window.innerHeight-fa*2,b=parseFloat(y.style.minHeight),N=parseFloat(y.style.height),j=Math.max(b,N);if(j<C){const k=j+E,A=Math.min(C,k),M=k-A;y.style.height=A+"px",y.style.bottom==="0px"&&(v.scrollTop=M>0?M:0,y.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})},"SelectViewport")),LR="SelectGroup",[TR,HR]=Xo(LR),DR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t,c=pa();return o.jsx(TR,{scope:s,id:c,children:o.jsx(yt.div,{role:"group","aria-labelledby":c,...i,ref:n})})},"SelectGroup")),$R="SelectLabel",FR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t,c=HR($R,s);return o.jsx(yt.div,{id:c.id,...i,ref:n})},"SelectLabel")),ih="SelectItem",[IR,ix]=Xo(ih),_R=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,value:i,disabled:c=!1,textValue:u,...f}=t,h=so(ih,s),m=U1(ih,s),g=h.value===i,[v,y]=r.useState(u??""),[w,E]=r.useState(!1),C=En(A=>{var M;return(M=m.itemRefCallback)==null?void 0:M.call(m,A,i,c)}),b=vt(n,C),N=pa(),j=r.useRef("touch"),k=Tt(()=>{c||(h.onValueChange(i),h.onOpenChange(!1))},"handleSelect");return o.jsx(IR,{scope:s,value:i,disabled:c,textId:N,isSelected:g,onItemTextChange:r.useCallback(A=>{y(M=>M||((A==null?void 0:A.textContent)??"").trim())},[]),children:o.jsx(B1.ItemSlot,{scope:s,value:i,disabled:c,textValue:v,children:o.jsx(yt.div,{role:"option","aria-labelledby":N,"data-highlighted":w?"":void 0,"aria-selected":g&&w,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:b,onFocus:De(f.onFocus,()=>E(!0)),onBlur:De(f.onBlur,()=>E(!1)),onClick:De(f.onClick,()=>{j.current!=="mouse"&&k()}),onPointerUp:De(f.onPointerUp,()=>{j.current==="mouse"&&k()}),onPointerDown:De(f.onPointerDown,A=>{j.current=A.pointerType}),onPointerMove:De(f.onPointerMove,A=>{var M;j.current=A.pointerType,c?(M=m.onItemLeave)==null||M.call(m):j.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:De(f.onPointerLeave,A=>{var M;A.currentTarget===document.activeElement&&((M=m.onItemLeave)==null||M.call(m))}),onKeyDown:De(f.onKeyDown,A=>{var T;c||A.target!==A.currentTarget||((T=m.searchRef)==null?void 0:T.current)!==""&&A.key===" "||(cR.includes(A.key)&&k(),A.key===" "&&A.preventDefault())})})})})},"SelectItem")),j0="SelectItemText",OR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,className:i,style:c,...u}=t,f=so(j0,s),h=U1(j0,s),m=ix(j0,s),g=hR(j0,s),[v,y]=r.useState(null),w=En(k=>{var A;return(A=h.itemTextRefCallback)==null?void 0:A.call(h,k,m.value,m.disabled)}),E=vt(n,y,m.onItemTextChange,w),C=v==null?void 0:v.textContent,b=r.useMemo(()=>o.jsx("option",{value:m.value,disabled:m.disabled,children:C},m.value),[m.disabled,m.value,C]),{onNativeOptionAdd:N,onNativeOptionRemove:j}=g;return An(()=>(N(b),()=>j(b)),[N,j,b]),o.jsxs(o.Fragment,{children:[o.jsx(yt.span,{id:m.textId,...u,ref:E}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Kc(f.value)?na.createPortal(u.children,f.valueNode):null]})},"SelectItemText")),ZR="SelectItemIndicator",VR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t;return ix(ZR,s).isSelected?o.jsx(yt.span,{"aria-hidden":!0,...i,ref:n}):null},"SelectItemIndicator")),zR=r.forwardRef(Tt(function(t,n){const{__scopeSelect:s,...i}=t;return o.jsx(yt.div,{"aria-hidden":!0,...i,ref:n})},"SelectSeparator")),BR="SelectBubbleInput",UR=r.forwardRef(Tt(function({__scopeSelect:t,...n},s){const i=so(BR,t),{value:c,onValueChange:u,required:f,disabled:h,name:m,autoComplete:g,form:v}=i,{nativeOptions:y,nativeSelectKey:w}=i,E=r.useRef(null),C=vt(s,E),b=c??"",N=Wy(b),j=Array.from(y).some(k=>(k.props.value??"")==="");return r.useEffect(()=>{const k=E.current;if(!k)return;const A=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(A,"value").set;if(N!==b&&T){const D=new Event("change",{bubbles:!0});T.call(k,b),k.dispatchEvent(D)}},[N,b]),o.jsxs(yt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:m,autoComplete:g,disabled:h,form:v,onChange:k=>u(k.target.value),...n,style:{...Qv,...n.style},ref:C,defaultValue:b,children:[Kc(c)&&!j?o.jsx("option",{value:""}):null,Array.from(y)]},w)},"SelectBubbleInput"));function cx(e){return typeof e=="function"}Tt(cx,"isFunction");function Kc(e){return e===""||e===void 0}Tt(Kc,"shouldShowPlaceholder");function Pm(e){const t=En(e),n=r.useRef(""),s=r.useRef(0),i=r.useCallback(u=>{const f=n.current+u;t(f),Tt((function h(m){n.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(f)},[t]),c=r.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,i,c]}Tt(Pm,"useTypeaheadSearch");function Lm(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=ux(e,Math.max(c,0));i.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}Tt(Lm,"findNextItem");function ux(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Tt(ux,"wrapArray");var WR=Object.defineProperty,Qo=(e,t)=>WR(e,"name",{value:t,configurable:!0}),[Tm,tZ]=Sr("Tooltip",[ro]);ro();var GR="TooltipProvider",KR=700,[YR,nZ]=Tm(GR),qR=Qo(e=>{const{__scopeTooltip:t,delayDuration:n=KR,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:c}=e,u=r.useRef(!0),f=r.useRef(!1),h=r.useRef(0);return r.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),o.jsx(YR,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:r.useCallback(()=>{s<=0||(window.clearTimeout(h.current),u.current=!1)},[s]),onClose:r.useCallback(()=>{s<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,s))},[s]),isPointerInTransitRef:f,onPointerInTransitChange:r.useCallback(m=>{f.current=m},[]),disableHoverableContent:i,children:c})},"TooltipProvider"),XR="Tooltip",[rZ,aZ]=Tm(XR),QR="TooltipPortal",[sZ,oZ]=Tm(QR,{forceMount:void 0});function JR(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),c=Math.abs(t.left-e.x);switch(Math.min(n,s,i,c)){case c:return"left";case i:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}Qo(JR,"getExitSideFromRect");function eP(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}Qo(eP,"getPaddedExitPoints");function tP(e){const{top:t,right:n,bottom:s,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:s},{x:i,y:s}]}Qo(tP,"getPointsFromRect");function nP(e,t){const{x:n,y:s}=e;let i=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],m=f.x,g=f.y,v=h.x,y=h.y;g>s!=y>s&&n<(v-m)*(s-g)/(y-g)+m&&(i=!i)}return i}Qo(nP,"isPointInPolygon");function rP(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),dx(t)}Qo(rP,"getHull");function dx(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(;t.length>=2;){const c=t[t.length-1],u=t[t.length-2];if((c.x-u.x)*(i.y-u.y)>=(c.y-u.y)*(i.x-u.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const i=e[s];for(;n.length>=2;){const c=n[n.length-1],u=n[n.length-2];if((c.x-u.x)*(i.y-u.y)>=(c.y-u.y)*(i.x-u.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Qo(dx,"getHullPresorted");var aP=qR,c2={exports:{}};/*!
|
|
93
93
|
Copyright (c) 2018 Jed Watson.
|
|
94
94
|
Licensed under the MIT License (MIT), see
|
|
95
95
|
http://jedwatson.github.io/classnames
|
|
96
|
-
*/var tg;function sP(){return tg||(tg=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var c="",u=0;u<arguments.length;u++){var f=arguments[u];f&&(c=i(c,s(f)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return n.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var u="";for(var f in c)t.call(c,f)&&c[f]&&(u=i(u,f));return u}function i(c,u){return u?c?c+" "+u:c+u:c}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(c2)),c2.exports}var oP=sP();const Xe=rv(oP),Ea={asChild:{type:"boolean"}},Lo={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}},Hm={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}},lP=["1","2","3","4"],f5={...Ea,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:lP,default:"3",responsive:!0},width:Lo.width,minWidth:Lo.minWidth,maxWidth:{...Lo.maxWidth,default:"600px"},...Hm},h5=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],Ca={color:{type:"enum",values:h5,default:void 0}},Dm={color:{type:"enum",values:h5,default:""}},Jo={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}},iP=["normal","start","end","both"],m5={trim:{type:"enum",className:"rt-r-lt",values:iP,responsive:!0}},cP=["left","center","right"],p5={align:{type:"enum",className:"rt-r-ta",values:cP,responsive:!0}},uP=["wrap","nowrap","pretty","balance"],g5={wrap:{type:"enum",className:"rt-r-tw",values:uP,responsive:!0}},v5={truncate:{type:"boolean",className:"rt-truncate"}},dP=["light","regular","medium","bold"],y5={weight:{type:"enum",className:"rt-r-weight",values:dP,responsive:!0}},fP=["h1","h2","h3","h4","h5","h6"],hP=["1","2","3","4","5","6","7","8","9"],mP={as:{type:"enum",values:fP,default:"h1"},...Ea,size:{type:"enum",className:"rt-r-size",values:hP,default:"6",responsive:!0},...y5,...p5,...m5,...v5,...g5,...Ca,...Jo},pP=["initial","xs","sm","md","lg","xl"],$m=new Set(pP);function x5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pc(e){return typeof e=="object"&&e!==null&&Object.keys(e).some(t=>$m.has(t))}function _s({className:e,customProperties:t,...n}){const s=t1({allowArbitraryValues:!0,className:e,...n}),i=gP({customProperties:t,...n});return[s,i]}function t1({allowArbitraryValues:e,value:t,className:n,propValues:s,parseValue:i=c=>c}){const c=[];if(t){if(typeof t=="string"&&s.includes(t))return ng(n,t,i);if(pc(t)){const u=t;for(const f in u){if(!x5(u,f)||!$m.has(f))continue;const h=u[f];if(h!==void 0){if(s.includes(h)){const m=ng(n,h,i),g=f==="initial"?m:`${f}:${m}`;c.push(g)}else if(e){const m=f==="initial"?n:`${f}:${n}`;c.push(m)}}}return c.join(" ")}if(e)return n}}function ng(e,t,n){const s=e?"-":"",i=n(t),c=i==null?void 0:i.startsWith("-"),u=c?"-":"",f=c?i==null?void 0:i.substring(1):i;return`${u}${e}${s}${f}`}function gP({customProperties:e,value:t,propValues:n,parseValue:s=i=>i}){let i={};if(!(!t||typeof t=="string"&&n.includes(t))){if(typeof t=="string"&&(i=Object.fromEntries(e.map(c=>[c,t]))),pc(t)){const c=t;for(const u in c){if(!x5(c,u)||!$m.has(u))continue;const f=c[u];if(!n.includes(f))for(const h of e)i={[u==="initial"?h:`${h}-${u}`]:f,...i}}}for(const c in i){const u=i[c];u!==void 0&&(i[c]=s(u))}return i}}function n1(...e){let t={};for(const n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}function vP(...e){return Object.assign({},...e)}function hn(e,...t){let n,s;const i={...e},c=vP(...t);for(const u in c){let f=i[u];const h=c[u];if(h.default!==void 0&&f===void 0&&(f=h.default),h.type==="enum"&&![h.default,...h.values].includes(f)&&!pc(f)&&(f=h.default),i[u]=f,"className"in h&&h.className){delete i[u];const m="responsive"in h;if(!f||pc(f)&&!m)continue;if(pc(f)&&(h.default!==void 0&&f.initial===void 0&&(f.initial=h.default),h.type==="enum"&&([h.default,...h.values].includes(f.initial)||(f.initial=h.default))),h.type==="enum"){const g=t1({allowArbitraryValues:!1,value:f,className:h.className,propValues:h.values,parseValue:h.parseValue});n=Xe(n,g);continue}if(h.type==="string"||h.type==="enum | string"){const g=h.type==="string"?[]:h.values,[v,y]=_s({className:h.className,customProperties:h.customProperties,propValues:g,parseValue:h.parseValue,value:f});s=n1(s,y),n=Xe(n,v);continue}if(h.type==="boolean"&&f){n=Xe(n,h.className);continue}}}return i.className=Xe(n,e.className),i.style=n1(s,e.style),i}const Eo=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],aa={m:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}},Fm=r.forwardRef((e,t)=>{const{children:n,className:s,asChild:i,as:c="h1",color:u,...f}=hn(e,mP,aa);return r.createElement(Go,{"data-accent-color":u,...f,ref:t,className:Xe("rt-Heading",s)},i?n:r.createElement(c,null,n))});Fm.displayName="Heading";const yP=["span","div","label","p"],xP=["1","2","3","4","5","6","7","8","9"],wP={as:{type:"enum",values:yP,default:"span"},...Ea,size:{type:"enum",className:"rt-r-size",values:xP,responsive:!0},...y5,...p5,...m5,...v5,...g5,...Ca,...Jo},Io=r.forwardRef((e,t)=>{const{children:n,className:s,asChild:i,as:c="span",color:u,...f}=hn(e,wP,aa);return r.createElement(Go,{"data-accent-color":u,...f,ref:t,className:Xe("rt-Text",s)},i?n:r.createElement(c,null,n))});Io.displayName="Text";function bP(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}const EP=["none","small","medium","large","full"],vi={radius:{type:"enum",values:EP,default:void 0}},$r={hasBackground:{default:!0},appearance:{default:"inherit"},accentColor:{default:"indigo"},grayColor:{default:"auto"},panelBackground:{default:"translucent"},radius:{default:"medium"},scaling:{default:"100%"}},Tl=()=>{},r1=r.createContext(void 0);function Im(){const e=r.useContext(r1);if(e===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return e}const Ua=r.forwardRef((e,t)=>r.useContext(r1)===void 0?r.createElement(aP,{delayDuration:200},r.createElement(ES,{dir:"ltr"},r.createElement(w5,{...e,ref:t}))):r.createElement(_m,{...e,ref:t}));Ua.displayName="Theme";const w5=r.forwardRef((e,t)=>{const{appearance:n=$r.appearance.default,accentColor:s=$r.accentColor.default,grayColor:i=$r.grayColor.default,panelBackground:c=$r.panelBackground.default,radius:u=$r.radius.default,scaling:f=$r.scaling.default,hasBackground:h=$r.hasBackground.default,...m}=e,[g,v]=r.useState(n);r.useEffect(()=>v(n),[n]);const[y,w]=r.useState(s);r.useEffect(()=>w(s),[s]);const[E,C]=r.useState(i);r.useEffect(()=>C(i),[i]);const[b,N]=r.useState(c);r.useEffect(()=>N(c),[c]);const[j,k]=r.useState(u);r.useEffect(()=>k(u),[u]);const[A,M]=r.useState(f);return r.useEffect(()=>M(f),[f]),r.createElement(_m,{...m,ref:t,isRoot:!0,hasBackground:h,appearance:g,accentColor:y,grayColor:E,panelBackground:b,radius:j,scaling:A,onAppearanceChange:v,onAccentColorChange:w,onGrayColorChange:C,onPanelBackgroundChange:N,onRadiusChange:k,onScalingChange:M})});w5.displayName="ThemeRoot";const _m=r.forwardRef((e,t)=>{const n=r.useContext(r1),{asChild:s,isRoot:i,hasBackground:c,appearance:u=(n==null?void 0:n.appearance)??$r.appearance.default,accentColor:f=(n==null?void 0:n.accentColor)??$r.accentColor.default,grayColor:h=(n==null?void 0:n.resolvedGrayColor)??$r.grayColor.default,panelBackground:m=(n==null?void 0:n.panelBackground)??$r.panelBackground.default,radius:g=(n==null?void 0:n.radius)??$r.radius.default,scaling:v=(n==null?void 0:n.scaling)??$r.scaling.default,onAppearanceChange:y=Tl,onAccentColorChange:w=Tl,onGrayColorChange:E=Tl,onPanelBackgroundChange:C=Tl,onRadiusChange:b=Tl,onScalingChange:N=Tl,...j}=e,k=s?Go:"div",A=h==="auto"?bP(f):h,M=e.appearance==="light"||e.appearance==="dark",T=c===void 0?i||M:c;return r.createElement(r1.Provider,{value:r.useMemo(()=>({appearance:u,accentColor:f,grayColor:h,resolvedGrayColor:A,panelBackground:m,radius:g,scaling:v,onAppearanceChange:y,onAccentColorChange:w,onGrayColorChange:E,onPanelBackgroundChange:C,onRadiusChange:b,onScalingChange:N}),[u,f,h,A,m,g,v,y,w,E,C,b,N])},r.createElement(k,{"data-is-root-theme":i?"true":"false","data-accent-color":f,"data-gray-color":A,"data-has-background":T?"true":"false","data-panel-background":m,"data-radius":g,"data-scaling":v,ref:t,...j,className:Xe("radix-themes",{light:u==="light",dark:u==="dark"},j.className)}))});_m.displayName="ThemeImpl";const ps=e=>{if(!r.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${r.Children.toArray(e).map(t=>typeof t=="object"&&"type"in t&&typeof t.type=="string"?t.type:typeof t).join(", ")}`);return e},Yc=e=>r.createElement(Wj,{...e});Yc.displayName="AlertDialog.Root";const b5=r.forwardRef(({children:e,...t},n)=>r.createElement(Gj,{...t,ref:n,asChild:!0},ps(e)));b5.displayName="AlertDialog.Trigger";const qc=r.forwardRef(({align:e,...t},n)=>{const{align:s,...i}=f5,{className:c}=hn({align:e},{align:s}),{className:u,forceMount:f,container:h,...m}=hn(t,i);return r.createElement(Kj,{container:h,forceMount:f},r.createElement(Ua,{asChild:!0},r.createElement(Yj,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},r.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},r.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${c}`},r.createElement(qj,{...m,ref:n,className:Xe("rt-BaseDialogContent","rt-AlertDialogContent",u)}))))))});qc.displayName="AlertDialog.Content";const Xc=r.forwardRef((e,t)=>r.createElement(Jj,{asChild:!0},r.createElement(Fm,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));Xc.displayName="AlertDialog.Title";const Qc=r.forwardRef((e,t)=>r.createElement(ek,{asChild:!0},r.createElement(Io,{as:"p",size:"3",...e,asChild:!1,ref:t})));Qc.displayName="AlertDialog.Description";const Jc=r.forwardRef(({children:e,...t},n)=>r.createElement(Xj,{...t,ref:n,asChild:!0},ps(e)));Jc.displayName="AlertDialog.Action";const eu=r.forwardRef(({children:e,...t},n)=>r.createElement(Qj,{...t,ref:n,asChild:!0},ps(e)));eu.displayName="AlertDialog.Cancel";function CP(e,t){const{asChild:n,children:s}=e;if(!n)return typeof t=="function"?t(s):t;const i=r.Children.only(s);return r.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}const SP=["1","2","3"],jP=["solid","soft","surface","outline"],kP={...Ea,size:{type:"enum",className:"rt-r-size",values:SP,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:jP,default:"soft"},...Dm,...Jo,...vi},E5=r.forwardRef((e,t)=>{const{asChild:n,className:s,color:i,radius:c,...u}=hn(e,kP,aa),f=n?Go:"span";return r.createElement(f,{"data-accent-color":i,"data-radius":c,...u,ref:t,className:Xe("rt-reset","rt-Badge",s)})});E5.displayName="Badge";const C5=Go,NP=["div","span"],AP=["none","inline","inline-block","block","contents"],MP={as:{type:"enum",values:NP,default:"div"},...Ea,display:{type:"enum",className:"rt-r-display",values:AP,responsive:!0}},Co=["0","1","2","3","4","5","6","7","8","9"],z0={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:Co,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:Co,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:Co,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:Co,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:Co,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:Co,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:Co,responsive:!0}},u2=["visible","hidden","clip","scroll","auto"],RP=["static","relative","absolute","fixed","sticky"],rc=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],PP=["0","1"],LP=["0","1"],TP=["start","center","end","baseline","stretch"],HP=["start","center","end","baseline","stretch"],S5={...z0,...Lo,...Hm,position:{type:"enum",className:"rt-r-position",values:RP,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:rc,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:rc,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:rc,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:rc,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:rc,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:u2,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:u2,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:u2,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:PP,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:LP,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:TP,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:HP,responsive:!0}},B0=r.forwardRef((e,t)=>{const{className:n,asChild:s,as:i="div",...c}=hn(e,MP,S5,aa);return r.createElement(s?C5:i,{...c,ref:t,className:Xe("rt-Box",n)})});B0.displayName="Box";const DP=["1","2","3","4"],$P=["classic","solid","soft","surface","outline","ghost"],rg={...Ea,size:{type:"enum",className:"rt-r-size",values:DP,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:$P,default:"solid"},...Dm,...Jo,...vi,loading:{type:"boolean",className:"rt-loading",default:!1}},d2=["0","1","2","3","4","5","6","7","8","9"],FP={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:d2,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:d2,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:d2,responsive:!0}},IP=["div","span"],_P=["none","inline-flex","flex"],OP=["row","column","row-reverse","column-reverse"],ZP=["start","center","end","baseline","stretch"],VP=["start","center","end","between"],zP=["nowrap","wrap","wrap-reverse"],j5={as:{type:"enum",values:IP,default:"div"},...Ea,display:{type:"enum",className:"rt-r-display",values:_P,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:OP,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:ZP,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:VP,parseValue:BP,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:zP,responsive:!0},...FP};function BP(e){return e==="between"?"space-between":e}const fr=r.forwardRef((e,t)=>{const{className:n,asChild:s,as:i="div",...c}=hn(e,j5,S5,aa);return r.createElement(s?C5:i,{...c,ref:t,className:Xe("rt-Flex",n)})});fr.displayName="Flex";const UP=["1","2","3"],WP={size:{type:"enum",className:"rt-r-size",values:UP,default:"2",responsive:!0},loading:{type:"boolean",default:!0}},ln=r.forwardRef((e,t)=>{const{className:n,children:s,loading:i,...c}=hn(e,WP,aa);if(!i)return s;const u=r.createElement("span",{...c,ref:t,className:Xe("rt-Spinner",n)},r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}));return s===void 0?u:r.createElement(fr,{asChild:!0,position:"relative",align:"center",justify:"center"},r.createElement("span",null,r.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},s),r.createElement(fr,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,u))))});ln.displayName="Spinner";const GP=rS;function k5(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s)]))}function KP(e){return e==="3"?"3":"2"}function YP(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}const N5=r.forwardRef((e,t)=>{const{size:n=rg.size.default}=e,{className:s,children:i,asChild:c,color:u,radius:f,disabled:h=e.loading,...m}=hn(e,rg,aa),g=c?Go:"button";return r.createElement(g,{"data-disabled":h||void 0,"data-accent-color":u,"data-radius":f,...m,ref:t,className:Xe("rt-reset","rt-BaseButton",s),disabled:h},e.loading?r.createElement(r.Fragment,null,r.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},i),r.createElement(GP,null,i),r.createElement(fr,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,r.createElement(ln,{size:k5(n,YP)})))):i)});N5.displayName="BaseButton";const ma=r.forwardRef(({className:e,...t},n)=>r.createElement(N5,{...t,ref:n,className:Xe("rt-Button",e)}));ma.displayName="Button";const qP=["1","2","3"],XP=["soft","surface","outline"],ag={...Ea,size:{type:"enum",className:"rt-r-size",values:qP,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:XP,default:"soft"},...Dm,...Jo},A5=r.createContext({}),M5=r.forwardRef((e,t)=>{const{size:n=ag.size.default}=e,{asChild:s,children:i,className:c,color:u,...f}=hn(e,ag,aa),h=s?Go:"div";return r.createElement(h,{"data-accent-color":u,...f,className:Xe("rt-CalloutRoot",c),ref:t},r.createElement(A5.Provider,{value:r.useMemo(()=>({size:n}),[n])},i))});M5.displayName="Callout.Root";const QP=r.forwardRef(({className:e,...t},n)=>r.createElement("div",{...t,className:Xe("rt-CalloutIcon",e),ref:n}));QP.displayName="Callout.Icon";const R5=r.forwardRef(({className:e,...t},n)=>{const{size:s}=r.useContext(A5);return r.createElement(Io,{as:"p",size:k5(s,KP),...t,asChild:!1,ref:n,className:Xe("rt-CalloutText",e)})});R5.displayName="Callout.Text";const JP=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));JP.displayName="ThickDividerHorizontalIcon";const yi=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));yi.displayName="ThickCheckIcon";const P5=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));P5.displayName="ChevronDownIcon";const Om=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));Om.displayName="ThickChevronRightIcon";const eL=["1","2","3"],ac={...Ea,size:{values:eL,default:"1"},...vi,scrollbars:{default:"both"}};function tL(e){const{m:t,mx:n,my:s,mt:i,mr:c,mb:u,ml:f,...h}=e;return{m:t,mx:n,my:s,mt:i,mr:c,mb:u,ml:f,rest:h}}const So=aa.m.values;function nL(e){const[t,n]=_s({className:"rt-r-m",customProperties:["--margin"],propValues:So,value:e.m}),[s,i]=_s({className:"rt-r-mx",customProperties:["--margin-left","--margin-right"],propValues:So,value:e.mx}),[c,u]=_s({className:"rt-r-my",customProperties:["--margin-top","--margin-bottom"],propValues:So,value:e.my}),[f,h]=_s({className:"rt-r-mt",customProperties:["--margin-top"],propValues:So,value:e.mt}),[m,g]=_s({className:"rt-r-mr",customProperties:["--margin-right"],propValues:So,value:e.mr}),[v,y]=_s({className:"rt-r-mb",customProperties:["--margin-bottom"],propValues:So,value:e.mb}),[w,E]=_s({className:"rt-r-ml",customProperties:["--margin-left"],propValues:So,value:e.ml});return[Xe(t,s,c,f,m,v,w),n1(n,i,u,h,g,y,E)]}const xi=r.forwardRef((e,t)=>{const{rest:n,...s}=tL(e),[i,c]=nL(s),{asChild:u,children:f,className:h,style:m,type:g,scrollHideDelay:v=g!=="scroll"?0:void 0,dir:y,size:w=ac.size.default,radius:E=ac.radius.default,scrollbars:C=ac.scrollbars.default,...b}=n;return r.createElement(a5,{type:g,scrollHideDelay:v,className:Xe("rt-ScrollAreaRoot",i,h),style:n1(c,m),asChild:u},CP({asChild:u,children:f},N=>r.createElement(r.Fragment,null,r.createElement(s5,{...b,ref:t,className:"rt-ScrollAreaViewport"},N),r.createElement("div",{className:"rt-ScrollAreaViewportFocusRing"}),C!=="vertical"?r.createElement(oh,{"data-radius":E,orientation:"horizontal",className:Xe("rt-ScrollAreaScrollbar",t1({className:"rt-r-size",value:w,propValues:ac.size.values}))},r.createElement(lh,{className:"rt-ScrollAreaThumb"})):null,C!=="horizontal"?r.createElement(oh,{"data-radius":E,orientation:"vertical",className:Xe("rt-ScrollAreaScrollbar",t1({className:"rt-r-size",value:w,propValues:ac.size.values}))},r.createElement(lh,{className:"rt-ScrollAreaThumb"})):null,C==="both"?r.createElement(oR,{className:"rt-ScrollAreaCorner"}):null)))});xi.displayName="ScrollArea";const rL=["1","2"],aL=["solid","soft"],Ha={size:{type:"enum",className:"rt-r-size",values:rL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:aL,default:"solid"},...Ca,...Jo},L5={...Ea,...Ca},T5={...Ca},H5={...Ca},Zm=e=>r.createElement(AA,{...e});Zm.displayName="ContextMenu.Root";const Vm=r.forwardRef(({children:e,...t},n)=>r.createElement(MA,{...t,ref:n,asChild:!0},ps(e)));Vm.displayName="ContextMenu.Trigger";const D5=r.createContext({}),zm=r.forwardRef((e,t)=>{const n=Im(),{size:s=Ha.size.default,variant:i=Ha.variant.default,highContrast:c=Ha.highContrast.default}=e,{className:u,children:f,color:h,container:m,forceMount:g,...v}=hn(e,Ha),y=h||n.accentColor;return r.createElement(Zy,{container:m,forceMount:g},r.createElement(Ua,{asChild:!0},r.createElement(RA,{"data-accent-color":y,alignOffset:-Number(s)*4,collisionPadding:10,...v,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-ContextMenuContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-ContextMenuViewport")},r.createElement(D5.Provider,{value:r.useMemo(()=>({size:s,variant:i,color:y,highContrast:c}),[s,i,y,c])},f))))))});zm.displayName="ContextMenu.Content";const sL=r.forwardRef(({className:e,...t},n)=>r.createElement(LA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuLabel","rt-ContextMenuLabel",e)}));sL.displayName="ContextMenu.Label";const qr=r.forwardRef((e,t)=>{const{className:n,children:s,color:i=L5.color.default,shortcut:c,...u}=e;return r.createElement(TA,{"data-accent-color":i,...u,ref:t,className:Xe("rt-reset","rt-BaseMenuItem","rt-ContextMenuItem",n)},r.createElement(S1,null,s),c&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},c))});qr.displayName="ContextMenu.Item";const oL=r.forwardRef(({className:e,...t},n)=>r.createElement(PA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuGroup","rt-ContextMenuGroup",e)}));oL.displayName="ContextMenu.Group";const lL=r.forwardRef(({className:e,...t},n)=>r.createElement(DA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuRadioGroup","rt-ContextMenuRadioGroup",e)}));lL.displayName="ContextMenu.RadioGroup";const iL=r.forwardRef((e,t)=>{const{children:n,className:s,color:i=H5.color.default,...c}=e;return r.createElement($A,{...c,asChild:!1,ref:t,"data-accent-color":i,className:Xe("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-ContextMenuItem","rt-ContextMenuRadioItem",s)},r.createElement(S1,null,n),r.createElement(Vy,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})))});iL.displayName="ContextMenu.RadioItem";const cL=r.forwardRef((e,t)=>{const{children:n,className:s,shortcut:i,color:c=T5.color.default,...u}=e;return r.createElement(HA,{...u,asChild:!1,ref:t,"data-accent-color":c,className:Xe("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-ContextMenuItem","rt-ContextMenuCheckboxItem",s)},r.createElement(S1,null,n),r.createElement(Vy,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),i&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},i))});cL.displayName="ContextMenu.CheckboxItem";const uL=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(IA,{...i,asChild:!1,ref:t,className:Xe("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-ContextMenuItem","rt-ContextMenuSubTrigger",n)},s,r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},r.createElement(Om,{className:"rt-BaseMenuSubTriggerIcon rt-ContextMenuSubTriggerIcon"})))});uL.displayName="ContextMenu.SubTrigger";const dL=r.forwardRef((e,t)=>{const{size:n,variant:s,color:i,highContrast:c}=r.useContext(D5),{className:u,children:f,container:h,forceMount:m,...g}=hn({size:n,variant:s,color:i,highContrast:c,...e},Ha);return r.createElement(Zy,{container:h,forceMount:m},r.createElement(Ua,{asChild:!0},r.createElement(_A,{"data-accent-color":i,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...g,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-ContextMenuContent","rt-ContextMenuSubContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-ContextMenuViewport")},f)))))});dL.displayName="ContextMenu.SubContent";const ch=r.forwardRef(({className:e,...t},n)=>r.createElement(FA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuSeparator","rt-ContextMenuSeparator",e)}));ch.displayName="ContextMenu.Separator";const el=e=>r.createElement(ui,{...e,modal:!0});el.displayName="Dialog.Root";const fL=r.forwardRef(({children:e,...t},n)=>r.createElement(am,{...t,ref:n,asChild:!0},ps(e)));fL.displayName="Dialog.Trigger";const tl=r.forwardRef(({align:e,...t},n)=>{const{align:s,...i}=f5,{className:c}=hn({align:e},{align:s}),{className:u,forceMount:f,container:h,...m}=hn(t,i);return r.createElement(di,{container:h,forceMount:f},r.createElement(Ua,{asChild:!0},r.createElement(fi,{className:"rt-BaseDialogOverlay rt-DialogOverlay"},r.createElement("div",{className:"rt-BaseDialogScroll rt-DialogScroll"},r.createElement("div",{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${c}`},r.createElement(hi,{...m,ref:n,className:Xe("rt-BaseDialogContent","rt-DialogContent",u)}))))))});tl.displayName="Dialog.Content";const nl=r.forwardRef((e,t)=>r.createElement(mi,{asChild:!0},r.createElement(Fm,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));nl.displayName="Dialog.Title";const hL=r.forwardRef((e,t)=>r.createElement(sm,{asChild:!0},r.createElement(Io,{as:"p",size:"3",...e,asChild:!1,ref:t})));hL.displayName="Dialog.Description";const tu=r.forwardRef(({children:e,...t},n)=>r.createElement(R1,{...t,ref:n,asChild:!0},ps(e)));tu.displayName="Dialog.Close";const _o=e=>r.createElement(sM,{...e});_o.displayName="DropdownMenu.Root";const Oo=r.forwardRef(({children:e,...t},n)=>r.createElement(oM,{...t,ref:n,asChild:!0},ps(e)));Oo.displayName="DropdownMenu.Trigger";const $5=r.createContext({}),Zo=r.forwardRef((e,t)=>{const n=Im(),{size:s=Ha.size.default,variant:i=Ha.variant.default,highContrast:c=Ha.highContrast.default}=e,{className:u,children:f,color:h,container:m,forceMount:g,...v}=hn(e,Ha),y=h||n.accentColor;return r.createElement(By,{container:m,forceMount:g},r.createElement(Ua,{asChild:!0},r.createElement(lM,{"data-accent-color":y,align:"start",sideOffset:4,collisionPadding:10,...v,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-DropdownMenuContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-DropdownMenuViewport")},r.createElement($5.Provider,{value:r.useMemo(()=>({size:s,variant:i,color:y,highContrast:c}),[s,i,y,c])},f))))))});Zo.displayName="DropdownMenu.Content";const mL=r.forwardRef(({className:e,...t},n)=>r.createElement(cM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuLabel","rt-DropdownMenuLabel",e)}));mL.displayName="DropdownMenu.Label";const Qr=r.forwardRef((e,t)=>{const{className:n,children:s,color:i=L5.color.default,shortcut:c,...u}=e;return r.createElement(uM,{"data-accent-color":i,...u,ref:t,className:Xe("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem",n)},r.createElement(S1,null,s),c&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},c))});Qr.displayName="DropdownMenu.Item";const pL=r.forwardRef(({className:e,...t},n)=>r.createElement(iM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuGroup","rt-DropdownMenuGroup",e)}));pL.displayName="DropdownMenu.Group";const a1=r.forwardRef(({className:e,...t},n)=>r.createElement(fM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuRadioGroup","rt-DropdownMenuRadioGroup",e)}));a1.displayName="DropdownMenu.RadioGroup";const Vl=r.forwardRef((e,t)=>{const{children:n,className:s,color:i=H5.color.default,...c}=e;return r.createElement(hM,{...c,asChild:!1,ref:t,"data-accent-color":i,className:Xe("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-DropdownMenuItem","rt-DropdownMenuRadioItem",s)},n,r.createElement(Uy,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon"})))});Vl.displayName="DropdownMenu.RadioItem";const gL=r.forwardRef((e,t)=>{const{children:n,className:s,shortcut:i,color:c=T5.color.default,...u}=e;return r.createElement(dM,{...u,asChild:!1,ref:t,"data-accent-color":c,className:Xe("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-DropdownMenuItem","rt-DropdownMenuCheckboxItem",s)},n,r.createElement(Uy,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),i&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},i))});gL.displayName="DropdownMenu.CheckboxItem";const vL=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(pM,{...i,asChild:!1,ref:t,className:Xe("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger",n)},s,r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},r.createElement(Om,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"})))});vL.displayName="DropdownMenu.SubTrigger";const yL=r.forwardRef((e,t)=>{const{size:n,variant:s,color:i,highContrast:c}=r.useContext($5),{className:u,children:f,container:h,forceMount:m,...g}=hn({size:n,variant:s,color:i,highContrast:c,...e},Ha);return r.createElement(By,{container:h,forceMount:m},r.createElement(Ua,{asChild:!0},r.createElement(gM,{"data-accent-color":i,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...g,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-DropdownMenuContent","rt-DropdownMenuSubContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-DropdownMenuViewport")},f)))))});yL.displayName="DropdownMenu.SubContent";const s1=r.forwardRef(({className:e,...t},n)=>r.createElement(mM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuSeparator","rt-DropdownMenuSeparator",e)}));s1.displayName="DropdownMenu.Separator";const xL=["1","2","3","4"],wL={...Ea,size:{type:"enum",className:"rt-r-size",values:xL,default:"2",responsive:!0},width:Lo.width,minWidth:Lo.minWidth,maxWidth:{...Lo.maxWidth,default:"480px"},...Hm},ti=e=>r.createElement(FM,{...e});ti.displayName="Popover.Root";const ni=r.forwardRef(({children:e,...t},n)=>r.createElement(_M,{...t,ref:n,asChild:!0},ps(e)));ni.displayName="Popover.Trigger";const ri=r.forwardRef((e,t)=>{const{className:n,forceMount:s,container:i,...c}=hn(e,wL);return r.createElement(OM,{container:i,forceMount:s},r.createElement(Ua,{asChild:!0},r.createElement(ZM,{align:"start",sideOffset:8,collisionPadding:10,...c,ref:t,className:Xe("rt-PopperContent","rt-PopoverContent",n)})))});ri.displayName="Popover.Content";const bL=r.forwardRef(({children:e,...t},n)=>r.createElement(VM,{...t,ref:n,asChild:!0},ps(e)));bL.displayName="Popover.Close";const EL=r.forwardRef(({children:e,...t},n)=>r.createElement(IM,{...t,ref:n}));EL.displayName="Popover.Anchor";const CL=["1","2","3"],Bm={size:{type:"enum",className:"rt-r-size",values:CL,default:"2",responsive:!0}},SL=["classic","surface","soft","ghost"],jL={variant:{type:"enum",className:"rt-variant",values:SL,default:"surface"},...Ca,...vi,placeholder:{type:"string"}},kL=["solid","soft"],NL={variant:{type:"enum",className:"rt-variant",values:kL,default:"solid"},...Ca,...Jo},Um=r.createContext({}),F5=e=>{const{children:t,size:n=Bm.size.default,...s}=e;return r.createElement(mR,{...s},r.createElement(Um.Provider,{value:r.useMemo(()=>({size:n}),[n])},t))};F5.displayName="Select.Root";const I5=r.forwardRef((e,t)=>{const n=r.useContext(Um),{children:s,className:i,color:c,radius:u,placeholder:f,...h}=hn({size:n==null?void 0:n.size,...e},{size:Bm.size},jL,aa);return r.createElement(gR,{asChild:!0},r.createElement("button",{"data-accent-color":c,"data-radius":u,...h,ref:t,className:Xe("rt-reset","rt-SelectTrigger",i)},r.createElement("span",{className:"rt-SelectTriggerInner"},r.createElement(yR,{placeholder:f},s)),r.createElement(xR,{asChild:!0},r.createElement(P5,{className:"rt-SelectIcon"}))))});I5.displayName="Select.Trigger";const _5=r.forwardRef((e,t)=>{const n=r.useContext(Um),{className:s,children:i,color:c,container:u,...f}=hn({size:n==null?void 0:n.size,...e},{size:Bm.size},NL),h=Im(),m=c||h.accentColor;return r.createElement(CR,{container:u},r.createElement(Ua,{asChild:!0},r.createElement(SR,{"data-accent-color":m,sideOffset:4,...f,asChild:!1,ref:t,className:Xe({"rt-PopperContent":f.position==="popper"},"rt-SelectContent",s)},r.createElement(a5,{type:"auto",className:"rt-ScrollAreaRoot"},r.createElement(PR,{asChild:!0,className:"rt-SelectViewport"},r.createElement(s5,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},i)),r.createElement(oh,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},r.createElement(lh,{className:"rt-ScrollAreaThumb"}))))))});_5.displayName="Select.Content";const O5=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(_R,{...i,asChild:!1,ref:t,className:Xe("rt-SelectItem",n)},r.createElement(VR,{className:"rt-SelectItemIndicator"},r.createElement(yi,{className:"rt-SelectItemIndicatorIcon"})),r.createElement(OR,null,s))});O5.displayName="Select.Item";const AL=r.forwardRef(({className:e,...t},n)=>r.createElement(DR,{...t,asChild:!1,ref:n,className:Xe("rt-SelectGroup",e)}));AL.displayName="Select.Group";const ML=r.forwardRef(({className:e,...t},n)=>r.createElement(FR,{...t,asChild:!1,ref:n,className:Xe("rt-SelectLabel",e)}));ML.displayName="Select.Label";const RL=r.forwardRef(({className:e,...t},n)=>r.createElement(zR,{...t,asChild:!1,ref:n,className:Xe("rt-SelectSeparator",e)}));RL.displayName="Select.Separator";const PL=["1","2","3"],LL=["classic","surface","soft"],TL=["none","vertical","horizontal","both"],HL={size:{type:"enum",className:"rt-r-size",values:PL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:LL,default:"surface"},resize:{type:"enum",className:"rt-r-resize",values:TL,responsive:!0},...Ca,...vi},Wm=r.forwardRef((e,t)=>{const{className:n,color:s,radius:i,style:c,...u}=hn(e,HL,aa);return r.createElement("div",{"data-accent-color":s,"data-radius":i,className:Xe("rt-TextAreaRoot",n),style:c},r.createElement("textarea",{className:"rt-reset rt-TextAreaInput",ref:t,...u}))});Wm.displayName="TextArea";const DL=["1","2","3"],$L=["classic","surface","soft"],FL={size:{type:"enum",className:"rt-r-size",values:DL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:$L,default:"surface"},...Ca,...vi},IL=["left","right"],_L={side:{type:"enum",values:IL},...Ca,gap:j5.gap,px:z0.px,pl:z0.pl,pr:z0.pr},Kl=r.forwardRef((e,t)=>{const n=r.useRef(null),{children:s,className:i,color:c,radius:u,style:f,...h}=hn(e,FL,aa);return r.createElement("div",{"data-accent-color":c,"data-radius":u,style:f,className:Xe("rt-TextFieldRoot",i),onPointerDown:m=>{const g=m.target;if(g.closest("input, button, a"))return;const v=n.current;if(!v)return;const y=g.closest(`
|
|
96
|
+
*/var tg;function sP(){return tg||(tg=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var c="",u=0;u<arguments.length;u++){var f=arguments[u];f&&(c=i(c,s(f)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return n.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var u="";for(var f in c)t.call(c,f)&&c[f]&&(u=i(u,f));return u}function i(c,u){return u?c?c+" "+u:c+u:c}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(c2)),c2.exports}var oP=sP();const Xe=rv(oP),Ea={asChild:{type:"boolean"}},Lo={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}},Hm={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}},lP=["1","2","3","4"],fx={...Ea,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:lP,default:"3",responsive:!0},width:Lo.width,minWidth:Lo.minWidth,maxWidth:{...Lo.maxWidth,default:"600px"},...Hm},hx=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],Ca={color:{type:"enum",values:hx,default:void 0}},Dm={color:{type:"enum",values:hx,default:""}},Jo={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}},iP=["normal","start","end","both"],mx={trim:{type:"enum",className:"rt-r-lt",values:iP,responsive:!0}},cP=["left","center","right"],px={align:{type:"enum",className:"rt-r-ta",values:cP,responsive:!0}},uP=["wrap","nowrap","pretty","balance"],gx={wrap:{type:"enum",className:"rt-r-tw",values:uP,responsive:!0}},vx={truncate:{type:"boolean",className:"rt-truncate"}},dP=["light","regular","medium","bold"],yx={weight:{type:"enum",className:"rt-r-weight",values:dP,responsive:!0}},fP=["h1","h2","h3","h4","h5","h6"],hP=["1","2","3","4","5","6","7","8","9"],mP={as:{type:"enum",values:fP,default:"h1"},...Ea,size:{type:"enum",className:"rt-r-size",values:hP,default:"6",responsive:!0},...yx,...px,...mx,...vx,...gx,...Ca,...Jo},pP=["initial","xs","sm","md","lg","xl"],$m=new Set(pP);function xx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pc(e){return typeof e=="object"&&e!==null&&Object.keys(e).some(t=>$m.has(t))}function _s({className:e,customProperties:t,...n}){const s=t1({allowArbitraryValues:!0,className:e,...n}),i=gP({customProperties:t,...n});return[s,i]}function t1({allowArbitraryValues:e,value:t,className:n,propValues:s,parseValue:i=c=>c}){const c=[];if(t){if(typeof t=="string"&&s.includes(t))return ng(n,t,i);if(pc(t)){const u=t;for(const f in u){if(!xx(u,f)||!$m.has(f))continue;const h=u[f];if(h!==void 0){if(s.includes(h)){const m=ng(n,h,i),g=f==="initial"?m:`${f}:${m}`;c.push(g)}else if(e){const m=f==="initial"?n:`${f}:${n}`;c.push(m)}}}return c.join(" ")}if(e)return n}}function ng(e,t,n){const s=e?"-":"",i=n(t),c=i==null?void 0:i.startsWith("-"),u=c?"-":"",f=c?i==null?void 0:i.substring(1):i;return`${u}${e}${s}${f}`}function gP({customProperties:e,value:t,propValues:n,parseValue:s=i=>i}){let i={};if(!(!t||typeof t=="string"&&n.includes(t))){if(typeof t=="string"&&(i=Object.fromEntries(e.map(c=>[c,t]))),pc(t)){const c=t;for(const u in c){if(!xx(c,u)||!$m.has(u))continue;const f=c[u];if(!n.includes(f))for(const h of e)i={[u==="initial"?h:`${h}-${u}`]:f,...i}}}for(const c in i){const u=i[c];u!==void 0&&(i[c]=s(u))}return i}}function n1(...e){let t={};for(const n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}function vP(...e){return Object.assign({},...e)}function hn(e,...t){let n,s;const i={...e},c=vP(...t);for(const u in c){let f=i[u];const h=c[u];if(h.default!==void 0&&f===void 0&&(f=h.default),h.type==="enum"&&![h.default,...h.values].includes(f)&&!pc(f)&&(f=h.default),i[u]=f,"className"in h&&h.className){delete i[u];const m="responsive"in h;if(!f||pc(f)&&!m)continue;if(pc(f)&&(h.default!==void 0&&f.initial===void 0&&(f.initial=h.default),h.type==="enum"&&([h.default,...h.values].includes(f.initial)||(f.initial=h.default))),h.type==="enum"){const g=t1({allowArbitraryValues:!1,value:f,className:h.className,propValues:h.values,parseValue:h.parseValue});n=Xe(n,g);continue}if(h.type==="string"||h.type==="enum | string"){const g=h.type==="string"?[]:h.values,[v,y]=_s({className:h.className,customProperties:h.customProperties,propValues:g,parseValue:h.parseValue,value:f});s=n1(s,y),n=Xe(n,v);continue}if(h.type==="boolean"&&f){n=Xe(n,h.className);continue}}}return i.className=Xe(n,e.className),i.style=n1(s,e.style),i}const Eo=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],aa={m:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:Eo,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}},Fm=r.forwardRef((e,t)=>{const{children:n,className:s,asChild:i,as:c="h1",color:u,...f}=hn(e,mP,aa);return r.createElement(Go,{"data-accent-color":u,...f,ref:t,className:Xe("rt-Heading",s)},i?n:r.createElement(c,null,n))});Fm.displayName="Heading";const yP=["span","div","label","p"],xP=["1","2","3","4","5","6","7","8","9"],wP={as:{type:"enum",values:yP,default:"span"},...Ea,size:{type:"enum",className:"rt-r-size",values:xP,responsive:!0},...yx,...px,...mx,...vx,...gx,...Ca,...Jo},Io=r.forwardRef((e,t)=>{const{children:n,className:s,asChild:i,as:c="span",color:u,...f}=hn(e,wP,aa);return r.createElement(Go,{"data-accent-color":u,...f,ref:t,className:Xe("rt-Text",s)},i?n:r.createElement(c,null,n))});Io.displayName="Text";function bP(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}const EP=["none","small","medium","large","full"],vi={radius:{type:"enum",values:EP,default:void 0}},$r={hasBackground:{default:!0},appearance:{default:"inherit"},accentColor:{default:"indigo"},grayColor:{default:"auto"},panelBackground:{default:"translucent"},radius:{default:"medium"},scaling:{default:"100%"}},Tl=()=>{},r1=r.createContext(void 0);function Im(){const e=r.useContext(r1);if(e===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return e}const Ua=r.forwardRef((e,t)=>r.useContext(r1)===void 0?r.createElement(aP,{delayDuration:200},r.createElement(ES,{dir:"ltr"},r.createElement(wx,{...e,ref:t}))):r.createElement(_m,{...e,ref:t}));Ua.displayName="Theme";const wx=r.forwardRef((e,t)=>{const{appearance:n=$r.appearance.default,accentColor:s=$r.accentColor.default,grayColor:i=$r.grayColor.default,panelBackground:c=$r.panelBackground.default,radius:u=$r.radius.default,scaling:f=$r.scaling.default,hasBackground:h=$r.hasBackground.default,...m}=e,[g,v]=r.useState(n);r.useEffect(()=>v(n),[n]);const[y,w]=r.useState(s);r.useEffect(()=>w(s),[s]);const[E,C]=r.useState(i);r.useEffect(()=>C(i),[i]);const[b,N]=r.useState(c);r.useEffect(()=>N(c),[c]);const[j,k]=r.useState(u);r.useEffect(()=>k(u),[u]);const[A,M]=r.useState(f);return r.useEffect(()=>M(f),[f]),r.createElement(_m,{...m,ref:t,isRoot:!0,hasBackground:h,appearance:g,accentColor:y,grayColor:E,panelBackground:b,radius:j,scaling:A,onAppearanceChange:v,onAccentColorChange:w,onGrayColorChange:C,onPanelBackgroundChange:N,onRadiusChange:k,onScalingChange:M})});wx.displayName="ThemeRoot";const _m=r.forwardRef((e,t)=>{const n=r.useContext(r1),{asChild:s,isRoot:i,hasBackground:c,appearance:u=(n==null?void 0:n.appearance)??$r.appearance.default,accentColor:f=(n==null?void 0:n.accentColor)??$r.accentColor.default,grayColor:h=(n==null?void 0:n.resolvedGrayColor)??$r.grayColor.default,panelBackground:m=(n==null?void 0:n.panelBackground)??$r.panelBackground.default,radius:g=(n==null?void 0:n.radius)??$r.radius.default,scaling:v=(n==null?void 0:n.scaling)??$r.scaling.default,onAppearanceChange:y=Tl,onAccentColorChange:w=Tl,onGrayColorChange:E=Tl,onPanelBackgroundChange:C=Tl,onRadiusChange:b=Tl,onScalingChange:N=Tl,...j}=e,k=s?Go:"div",A=h==="auto"?bP(f):h,M=e.appearance==="light"||e.appearance==="dark",T=c===void 0?i||M:c;return r.createElement(r1.Provider,{value:r.useMemo(()=>({appearance:u,accentColor:f,grayColor:h,resolvedGrayColor:A,panelBackground:m,radius:g,scaling:v,onAppearanceChange:y,onAccentColorChange:w,onGrayColorChange:E,onPanelBackgroundChange:C,onRadiusChange:b,onScalingChange:N}),[u,f,h,A,m,g,v,y,w,E,C,b,N])},r.createElement(k,{"data-is-root-theme":i?"true":"false","data-accent-color":f,"data-gray-color":A,"data-has-background":T?"true":"false","data-panel-background":m,"data-radius":g,"data-scaling":v,ref:t,...j,className:Xe("radix-themes",{light:u==="light",dark:u==="dark"},j.className)}))});_m.displayName="ThemeImpl";const ps=e=>{if(!r.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${r.Children.toArray(e).map(t=>typeof t=="object"&&"type"in t&&typeof t.type=="string"?t.type:typeof t).join(", ")}`);return e},Yc=e=>r.createElement(Wj,{...e});Yc.displayName="AlertDialog.Root";const bx=r.forwardRef(({children:e,...t},n)=>r.createElement(Gj,{...t,ref:n,asChild:!0},ps(e)));bx.displayName="AlertDialog.Trigger";const qc=r.forwardRef(({align:e,...t},n)=>{const{align:s,...i}=fx,{className:c}=hn({align:e},{align:s}),{className:u,forceMount:f,container:h,...m}=hn(t,i);return r.createElement(Kj,{container:h,forceMount:f},r.createElement(Ua,{asChild:!0},r.createElement(Yj,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},r.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},r.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${c}`},r.createElement(qj,{...m,ref:n,className:Xe("rt-BaseDialogContent","rt-AlertDialogContent",u)}))))))});qc.displayName="AlertDialog.Content";const Xc=r.forwardRef((e,t)=>r.createElement(Jj,{asChild:!0},r.createElement(Fm,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));Xc.displayName="AlertDialog.Title";const Qc=r.forwardRef((e,t)=>r.createElement(ek,{asChild:!0},r.createElement(Io,{as:"p",size:"3",...e,asChild:!1,ref:t})));Qc.displayName="AlertDialog.Description";const Jc=r.forwardRef(({children:e,...t},n)=>r.createElement(Xj,{...t,ref:n,asChild:!0},ps(e)));Jc.displayName="AlertDialog.Action";const eu=r.forwardRef(({children:e,...t},n)=>r.createElement(Qj,{...t,ref:n,asChild:!0},ps(e)));eu.displayName="AlertDialog.Cancel";function CP(e,t){const{asChild:n,children:s}=e;if(!n)return typeof t=="function"?t(s):t;const i=r.Children.only(s);return r.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}const SP=["1","2","3"],jP=["solid","soft","surface","outline"],kP={...Ea,size:{type:"enum",className:"rt-r-size",values:SP,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:jP,default:"soft"},...Dm,...Jo,...vi},Ex=r.forwardRef((e,t)=>{const{asChild:n,className:s,color:i,radius:c,...u}=hn(e,kP,aa),f=n?Go:"span";return r.createElement(f,{"data-accent-color":i,"data-radius":c,...u,ref:t,className:Xe("rt-reset","rt-Badge",s)})});Ex.displayName="Badge";const Cx=Go,NP=["div","span"],AP=["none","inline","inline-block","block","contents"],MP={as:{type:"enum",values:NP,default:"div"},...Ea,display:{type:"enum",className:"rt-r-display",values:AP,responsive:!0}},Co=["0","1","2","3","4","5","6","7","8","9"],z0={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:Co,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:Co,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:Co,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:Co,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:Co,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:Co,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:Co,responsive:!0}},u2=["visible","hidden","clip","scroll","auto"],RP=["static","relative","absolute","fixed","sticky"],rc=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],PP=["0","1"],LP=["0","1"],TP=["start","center","end","baseline","stretch"],HP=["start","center","end","baseline","stretch"],Sx={...z0,...Lo,...Hm,position:{type:"enum",className:"rt-r-position",values:RP,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:rc,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:rc,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:rc,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:rc,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:rc,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:u2,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:u2,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:u2,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:PP,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:LP,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:TP,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:HP,responsive:!0}},B0=r.forwardRef((e,t)=>{const{className:n,asChild:s,as:i="div",...c}=hn(e,MP,Sx,aa);return r.createElement(s?Cx:i,{...c,ref:t,className:Xe("rt-Box",n)})});B0.displayName="Box";const DP=["1","2","3","4"],$P=["classic","solid","soft","surface","outline","ghost"],rg={...Ea,size:{type:"enum",className:"rt-r-size",values:DP,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:$P,default:"solid"},...Dm,...Jo,...vi,loading:{type:"boolean",className:"rt-loading",default:!1}},d2=["0","1","2","3","4","5","6","7","8","9"],FP={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:d2,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:d2,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:d2,responsive:!0}},IP=["div","span"],_P=["none","inline-flex","flex"],OP=["row","column","row-reverse","column-reverse"],ZP=["start","center","end","baseline","stretch"],VP=["start","center","end","between"],zP=["nowrap","wrap","wrap-reverse"],jx={as:{type:"enum",values:IP,default:"div"},...Ea,display:{type:"enum",className:"rt-r-display",values:_P,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:OP,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:ZP,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:VP,parseValue:BP,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:zP,responsive:!0},...FP};function BP(e){return e==="between"?"space-between":e}const fr=r.forwardRef((e,t)=>{const{className:n,asChild:s,as:i="div",...c}=hn(e,jx,Sx,aa);return r.createElement(s?Cx:i,{...c,ref:t,className:Xe("rt-Flex",n)})});fr.displayName="Flex";const UP=["1","2","3"],WP={size:{type:"enum",className:"rt-r-size",values:UP,default:"2",responsive:!0},loading:{type:"boolean",default:!0}},ln=r.forwardRef((e,t)=>{const{className:n,children:s,loading:i,...c}=hn(e,WP,aa);if(!i)return s;const u=r.createElement("span",{...c,ref:t,className:Xe("rt-Spinner",n)},r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}),r.createElement("span",{className:"rt-SpinnerLeaf"}));return s===void 0?u:r.createElement(fr,{asChild:!0,position:"relative",align:"center",justify:"center"},r.createElement("span",null,r.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},s),r.createElement(fr,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,u))))});ln.displayName="Spinner";const GP=rS;function kx(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s)]))}function KP(e){return e==="3"?"3":"2"}function YP(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}const Nx=r.forwardRef((e,t)=>{const{size:n=rg.size.default}=e,{className:s,children:i,asChild:c,color:u,radius:f,disabled:h=e.loading,...m}=hn(e,rg,aa),g=c?Go:"button";return r.createElement(g,{"data-disabled":h||void 0,"data-accent-color":u,"data-radius":f,...m,ref:t,className:Xe("rt-reset","rt-BaseButton",s),disabled:h},e.loading?r.createElement(r.Fragment,null,r.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},i),r.createElement(GP,null,i),r.createElement(fr,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,r.createElement(ln,{size:kx(n,YP)})))):i)});Nx.displayName="BaseButton";const ma=r.forwardRef(({className:e,...t},n)=>r.createElement(Nx,{...t,ref:n,className:Xe("rt-Button",e)}));ma.displayName="Button";const qP=["1","2","3"],XP=["soft","surface","outline"],ag={...Ea,size:{type:"enum",className:"rt-r-size",values:qP,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:XP,default:"soft"},...Dm,...Jo},Ax=r.createContext({}),Mx=r.forwardRef((e,t)=>{const{size:n=ag.size.default}=e,{asChild:s,children:i,className:c,color:u,...f}=hn(e,ag,aa),h=s?Go:"div";return r.createElement(h,{"data-accent-color":u,...f,className:Xe("rt-CalloutRoot",c),ref:t},r.createElement(Ax.Provider,{value:r.useMemo(()=>({size:n}),[n])},i))});Mx.displayName="Callout.Root";const QP=r.forwardRef(({className:e,...t},n)=>r.createElement("div",{...t,className:Xe("rt-CalloutIcon",e),ref:n}));QP.displayName="Callout.Icon";const Rx=r.forwardRef(({className:e,...t},n)=>{const{size:s}=r.useContext(Ax);return r.createElement(Io,{as:"p",size:kx(s,KP),...t,asChild:!1,ref:n,className:Xe("rt-CalloutText",e)})});Rx.displayName="Callout.Text";const JP=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));JP.displayName="ThickDividerHorizontalIcon";const yi=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));yi.displayName="ThickCheckIcon";const Px=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));Px.displayName="ChevronDownIcon";const Om=$t.forwardRef((e,t)=>$t.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},$t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));Om.displayName="ThickChevronRightIcon";const eL=["1","2","3"],ac={...Ea,size:{values:eL,default:"1"},...vi,scrollbars:{default:"both"}};function tL(e){const{m:t,mx:n,my:s,mt:i,mr:c,mb:u,ml:f,...h}=e;return{m:t,mx:n,my:s,mt:i,mr:c,mb:u,ml:f,rest:h}}const So=aa.m.values;function nL(e){const[t,n]=_s({className:"rt-r-m",customProperties:["--margin"],propValues:So,value:e.m}),[s,i]=_s({className:"rt-r-mx",customProperties:["--margin-left","--margin-right"],propValues:So,value:e.mx}),[c,u]=_s({className:"rt-r-my",customProperties:["--margin-top","--margin-bottom"],propValues:So,value:e.my}),[f,h]=_s({className:"rt-r-mt",customProperties:["--margin-top"],propValues:So,value:e.mt}),[m,g]=_s({className:"rt-r-mr",customProperties:["--margin-right"],propValues:So,value:e.mr}),[v,y]=_s({className:"rt-r-mb",customProperties:["--margin-bottom"],propValues:So,value:e.mb}),[w,E]=_s({className:"rt-r-ml",customProperties:["--margin-left"],propValues:So,value:e.ml});return[Xe(t,s,c,f,m,v,w),n1(n,i,u,h,g,y,E)]}const xi=r.forwardRef((e,t)=>{const{rest:n,...s}=tL(e),[i,c]=nL(s),{asChild:u,children:f,className:h,style:m,type:g,scrollHideDelay:v=g!=="scroll"?0:void 0,dir:y,size:w=ac.size.default,radius:E=ac.radius.default,scrollbars:C=ac.scrollbars.default,...b}=n;return r.createElement(ax,{type:g,scrollHideDelay:v,className:Xe("rt-ScrollAreaRoot",i,h),style:n1(c,m),asChild:u},CP({asChild:u,children:f},N=>r.createElement(r.Fragment,null,r.createElement(sx,{...b,ref:t,className:"rt-ScrollAreaViewport"},N),r.createElement("div",{className:"rt-ScrollAreaViewportFocusRing"}),C!=="vertical"?r.createElement(oh,{"data-radius":E,orientation:"horizontal",className:Xe("rt-ScrollAreaScrollbar",t1({className:"rt-r-size",value:w,propValues:ac.size.values}))},r.createElement(lh,{className:"rt-ScrollAreaThumb"})):null,C!=="horizontal"?r.createElement(oh,{"data-radius":E,orientation:"vertical",className:Xe("rt-ScrollAreaScrollbar",t1({className:"rt-r-size",value:w,propValues:ac.size.values}))},r.createElement(lh,{className:"rt-ScrollAreaThumb"})):null,C==="both"?r.createElement(oR,{className:"rt-ScrollAreaCorner"}):null)))});xi.displayName="ScrollArea";const rL=["1","2"],aL=["solid","soft"],Ha={size:{type:"enum",className:"rt-r-size",values:rL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:aL,default:"solid"},...Ca,...Jo},Lx={...Ea,...Ca},Tx={...Ca},Hx={...Ca},Zm=e=>r.createElement(AA,{...e});Zm.displayName="ContextMenu.Root";const Vm=r.forwardRef(({children:e,...t},n)=>r.createElement(MA,{...t,ref:n,asChild:!0},ps(e)));Vm.displayName="ContextMenu.Trigger";const Dx=r.createContext({}),zm=r.forwardRef((e,t)=>{const n=Im(),{size:s=Ha.size.default,variant:i=Ha.variant.default,highContrast:c=Ha.highContrast.default}=e,{className:u,children:f,color:h,container:m,forceMount:g,...v}=hn(e,Ha),y=h||n.accentColor;return r.createElement(Zy,{container:m,forceMount:g},r.createElement(Ua,{asChild:!0},r.createElement(RA,{"data-accent-color":y,alignOffset:-Number(s)*4,collisionPadding:10,...v,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-ContextMenuContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-ContextMenuViewport")},r.createElement(Dx.Provider,{value:r.useMemo(()=>({size:s,variant:i,color:y,highContrast:c}),[s,i,y,c])},f))))))});zm.displayName="ContextMenu.Content";const sL=r.forwardRef(({className:e,...t},n)=>r.createElement(LA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuLabel","rt-ContextMenuLabel",e)}));sL.displayName="ContextMenu.Label";const qr=r.forwardRef((e,t)=>{const{className:n,children:s,color:i=Lx.color.default,shortcut:c,...u}=e;return r.createElement(TA,{"data-accent-color":i,...u,ref:t,className:Xe("rt-reset","rt-BaseMenuItem","rt-ContextMenuItem",n)},r.createElement(S1,null,s),c&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},c))});qr.displayName="ContextMenu.Item";const oL=r.forwardRef(({className:e,...t},n)=>r.createElement(PA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuGroup","rt-ContextMenuGroup",e)}));oL.displayName="ContextMenu.Group";const lL=r.forwardRef(({className:e,...t},n)=>r.createElement(DA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuRadioGroup","rt-ContextMenuRadioGroup",e)}));lL.displayName="ContextMenu.RadioGroup";const iL=r.forwardRef((e,t)=>{const{children:n,className:s,color:i=Hx.color.default,...c}=e;return r.createElement($A,{...c,asChild:!1,ref:t,"data-accent-color":i,className:Xe("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-ContextMenuItem","rt-ContextMenuRadioItem",s)},r.createElement(S1,null,n),r.createElement(Vy,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})))});iL.displayName="ContextMenu.RadioItem";const cL=r.forwardRef((e,t)=>{const{children:n,className:s,shortcut:i,color:c=Tx.color.default,...u}=e;return r.createElement(HA,{...u,asChild:!1,ref:t,"data-accent-color":c,className:Xe("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-ContextMenuItem","rt-ContextMenuCheckboxItem",s)},r.createElement(S1,null,n),r.createElement(Vy,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),i&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},i))});cL.displayName="ContextMenu.CheckboxItem";const uL=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(IA,{...i,asChild:!1,ref:t,className:Xe("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-ContextMenuItem","rt-ContextMenuSubTrigger",n)},s,r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},r.createElement(Om,{className:"rt-BaseMenuSubTriggerIcon rt-ContextMenuSubTriggerIcon"})))});uL.displayName="ContextMenu.SubTrigger";const dL=r.forwardRef((e,t)=>{const{size:n,variant:s,color:i,highContrast:c}=r.useContext(Dx),{className:u,children:f,container:h,forceMount:m,...g}=hn({size:n,variant:s,color:i,highContrast:c,...e},Ha);return r.createElement(Zy,{container:h,forceMount:m},r.createElement(Ua,{asChild:!0},r.createElement(_A,{"data-accent-color":i,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...g,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-ContextMenuContent","rt-ContextMenuSubContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-ContextMenuViewport")},f)))))});dL.displayName="ContextMenu.SubContent";const ch=r.forwardRef(({className:e,...t},n)=>r.createElement(FA,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuSeparator","rt-ContextMenuSeparator",e)}));ch.displayName="ContextMenu.Separator";const el=e=>r.createElement(ui,{...e,modal:!0});el.displayName="Dialog.Root";const fL=r.forwardRef(({children:e,...t},n)=>r.createElement(am,{...t,ref:n,asChild:!0},ps(e)));fL.displayName="Dialog.Trigger";const tl=r.forwardRef(({align:e,...t},n)=>{const{align:s,...i}=fx,{className:c}=hn({align:e},{align:s}),{className:u,forceMount:f,container:h,...m}=hn(t,i);return r.createElement(di,{container:h,forceMount:f},r.createElement(Ua,{asChild:!0},r.createElement(fi,{className:"rt-BaseDialogOverlay rt-DialogOverlay"},r.createElement("div",{className:"rt-BaseDialogScroll rt-DialogScroll"},r.createElement("div",{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${c}`},r.createElement(hi,{...m,ref:n,className:Xe("rt-BaseDialogContent","rt-DialogContent",u)}))))))});tl.displayName="Dialog.Content";const nl=r.forwardRef((e,t)=>r.createElement(mi,{asChild:!0},r.createElement(Fm,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));nl.displayName="Dialog.Title";const hL=r.forwardRef((e,t)=>r.createElement(sm,{asChild:!0},r.createElement(Io,{as:"p",size:"3",...e,asChild:!1,ref:t})));hL.displayName="Dialog.Description";const tu=r.forwardRef(({children:e,...t},n)=>r.createElement(R1,{...t,ref:n,asChild:!0},ps(e)));tu.displayName="Dialog.Close";const _o=e=>r.createElement(sM,{...e});_o.displayName="DropdownMenu.Root";const Oo=r.forwardRef(({children:e,...t},n)=>r.createElement(oM,{...t,ref:n,asChild:!0},ps(e)));Oo.displayName="DropdownMenu.Trigger";const $x=r.createContext({}),Zo=r.forwardRef((e,t)=>{const n=Im(),{size:s=Ha.size.default,variant:i=Ha.variant.default,highContrast:c=Ha.highContrast.default}=e,{className:u,children:f,color:h,container:m,forceMount:g,...v}=hn(e,Ha),y=h||n.accentColor;return r.createElement(By,{container:m,forceMount:g},r.createElement(Ua,{asChild:!0},r.createElement(lM,{"data-accent-color":y,align:"start",sideOffset:4,collisionPadding:10,...v,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-DropdownMenuContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-DropdownMenuViewport")},r.createElement($x.Provider,{value:r.useMemo(()=>({size:s,variant:i,color:y,highContrast:c}),[s,i,y,c])},f))))))});Zo.displayName="DropdownMenu.Content";const mL=r.forwardRef(({className:e,...t},n)=>r.createElement(cM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuLabel","rt-DropdownMenuLabel",e)}));mL.displayName="DropdownMenu.Label";const Qr=r.forwardRef((e,t)=>{const{className:n,children:s,color:i=Lx.color.default,shortcut:c,...u}=e;return r.createElement(uM,{"data-accent-color":i,...u,ref:t,className:Xe("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem",n)},r.createElement(S1,null,s),c&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},c))});Qr.displayName="DropdownMenu.Item";const pL=r.forwardRef(({className:e,...t},n)=>r.createElement(iM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuGroup","rt-DropdownMenuGroup",e)}));pL.displayName="DropdownMenu.Group";const a1=r.forwardRef(({className:e,...t},n)=>r.createElement(fM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuRadioGroup","rt-DropdownMenuRadioGroup",e)}));a1.displayName="DropdownMenu.RadioGroup";const Vl=r.forwardRef((e,t)=>{const{children:n,className:s,color:i=Hx.color.default,...c}=e;return r.createElement(hM,{...c,asChild:!1,ref:t,"data-accent-color":i,className:Xe("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-DropdownMenuItem","rt-DropdownMenuRadioItem",s)},n,r.createElement(Uy,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon"})))});Vl.displayName="DropdownMenu.RadioItem";const gL=r.forwardRef((e,t)=>{const{children:n,className:s,shortcut:i,color:c=Tx.color.default,...u}=e;return r.createElement(dM,{...u,asChild:!1,ref:t,"data-accent-color":c,className:Xe("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-DropdownMenuItem","rt-DropdownMenuCheckboxItem",s)},n,r.createElement(Uy,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),i&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},i))});gL.displayName="DropdownMenu.CheckboxItem";const vL=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(pM,{...i,asChild:!1,ref:t,className:Xe("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger",n)},s,r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},r.createElement(Om,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"})))});vL.displayName="DropdownMenu.SubTrigger";const yL=r.forwardRef((e,t)=>{const{size:n,variant:s,color:i,highContrast:c}=r.useContext($x),{className:u,children:f,container:h,forceMount:m,...g}=hn({size:n,variant:s,color:i,highContrast:c,...e},Ha);return r.createElement(By,{container:h,forceMount:m},r.createElement(Ua,{asChild:!0},r.createElement(gM,{"data-accent-color":i,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...g,asChild:!1,ref:t,className:Xe("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-DropdownMenuContent","rt-DropdownMenuSubContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Xe("rt-BaseMenuViewport","rt-DropdownMenuViewport")},f)))))});yL.displayName="DropdownMenu.SubContent";const s1=r.forwardRef(({className:e,...t},n)=>r.createElement(mM,{...t,asChild:!1,ref:n,className:Xe("rt-BaseMenuSeparator","rt-DropdownMenuSeparator",e)}));s1.displayName="DropdownMenu.Separator";const xL=["1","2","3","4"],wL={...Ea,size:{type:"enum",className:"rt-r-size",values:xL,default:"2",responsive:!0},width:Lo.width,minWidth:Lo.minWidth,maxWidth:{...Lo.maxWidth,default:"480px"},...Hm},ti=e=>r.createElement(FM,{...e});ti.displayName="Popover.Root";const ni=r.forwardRef(({children:e,...t},n)=>r.createElement(_M,{...t,ref:n,asChild:!0},ps(e)));ni.displayName="Popover.Trigger";const ri=r.forwardRef((e,t)=>{const{className:n,forceMount:s,container:i,...c}=hn(e,wL);return r.createElement(OM,{container:i,forceMount:s},r.createElement(Ua,{asChild:!0},r.createElement(ZM,{align:"start",sideOffset:8,collisionPadding:10,...c,ref:t,className:Xe("rt-PopperContent","rt-PopoverContent",n)})))});ri.displayName="Popover.Content";const bL=r.forwardRef(({children:e,...t},n)=>r.createElement(VM,{...t,ref:n,asChild:!0},ps(e)));bL.displayName="Popover.Close";const EL=r.forwardRef(({children:e,...t},n)=>r.createElement(IM,{...t,ref:n}));EL.displayName="Popover.Anchor";const CL=["1","2","3"],Bm={size:{type:"enum",className:"rt-r-size",values:CL,default:"2",responsive:!0}},SL=["classic","surface","soft","ghost"],jL={variant:{type:"enum",className:"rt-variant",values:SL,default:"surface"},...Ca,...vi,placeholder:{type:"string"}},kL=["solid","soft"],NL={variant:{type:"enum",className:"rt-variant",values:kL,default:"solid"},...Ca,...Jo},Um=r.createContext({}),Fx=e=>{const{children:t,size:n=Bm.size.default,...s}=e;return r.createElement(mR,{...s},r.createElement(Um.Provider,{value:r.useMemo(()=>({size:n}),[n])},t))};Fx.displayName="Select.Root";const Ix=r.forwardRef((e,t)=>{const n=r.useContext(Um),{children:s,className:i,color:c,radius:u,placeholder:f,...h}=hn({size:n==null?void 0:n.size,...e},{size:Bm.size},jL,aa);return r.createElement(gR,{asChild:!0},r.createElement("button",{"data-accent-color":c,"data-radius":u,...h,ref:t,className:Xe("rt-reset","rt-SelectTrigger",i)},r.createElement("span",{className:"rt-SelectTriggerInner"},r.createElement(yR,{placeholder:f},s)),r.createElement(xR,{asChild:!0},r.createElement(Px,{className:"rt-SelectIcon"}))))});Ix.displayName="Select.Trigger";const _x=r.forwardRef((e,t)=>{const n=r.useContext(Um),{className:s,children:i,color:c,container:u,...f}=hn({size:n==null?void 0:n.size,...e},{size:Bm.size},NL),h=Im(),m=c||h.accentColor;return r.createElement(CR,{container:u},r.createElement(Ua,{asChild:!0},r.createElement(SR,{"data-accent-color":m,sideOffset:4,...f,asChild:!1,ref:t,className:Xe({"rt-PopperContent":f.position==="popper"},"rt-SelectContent",s)},r.createElement(ax,{type:"auto",className:"rt-ScrollAreaRoot"},r.createElement(PR,{asChild:!0,className:"rt-SelectViewport"},r.createElement(sx,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},i)),r.createElement(oh,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},r.createElement(lh,{className:"rt-ScrollAreaThumb"}))))))});_x.displayName="Select.Content";const Ox=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(_R,{...i,asChild:!1,ref:t,className:Xe("rt-SelectItem",n)},r.createElement(VR,{className:"rt-SelectItemIndicator"},r.createElement(yi,{className:"rt-SelectItemIndicatorIcon"})),r.createElement(OR,null,s))});Ox.displayName="Select.Item";const AL=r.forwardRef(({className:e,...t},n)=>r.createElement(DR,{...t,asChild:!1,ref:n,className:Xe("rt-SelectGroup",e)}));AL.displayName="Select.Group";const ML=r.forwardRef(({className:e,...t},n)=>r.createElement(FR,{...t,asChild:!1,ref:n,className:Xe("rt-SelectLabel",e)}));ML.displayName="Select.Label";const RL=r.forwardRef(({className:e,...t},n)=>r.createElement(zR,{...t,asChild:!1,ref:n,className:Xe("rt-SelectSeparator",e)}));RL.displayName="Select.Separator";const PL=["1","2","3"],LL=["classic","surface","soft"],TL=["none","vertical","horizontal","both"],HL={size:{type:"enum",className:"rt-r-size",values:PL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:LL,default:"surface"},resize:{type:"enum",className:"rt-r-resize",values:TL,responsive:!0},...Ca,...vi},Wm=r.forwardRef((e,t)=>{const{className:n,color:s,radius:i,style:c,...u}=hn(e,HL,aa);return r.createElement("div",{"data-accent-color":s,"data-radius":i,className:Xe("rt-TextAreaRoot",n),style:c},r.createElement("textarea",{className:"rt-reset rt-TextAreaInput",ref:t,...u}))});Wm.displayName="TextArea";const DL=["1","2","3"],$L=["classic","surface","soft"],FL={size:{type:"enum",className:"rt-r-size",values:DL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:$L,default:"surface"},...Ca,...vi},IL=["left","right"],_L={side:{type:"enum",values:IL},...Ca,gap:jx.gap,px:z0.px,pl:z0.pl,pr:z0.pr},Kl=r.forwardRef((e,t)=>{const n=r.useRef(null),{children:s,className:i,color:c,radius:u,style:f,...h}=hn(e,FL,aa);return r.createElement("div",{"data-accent-color":c,"data-radius":u,style:f,className:Xe("rt-TextFieldRoot",i),onPointerDown:m=>{const g=m.target;if(g.closest("input, button, a"))return;const v=n.current;if(!v)return;const y=g.closest(`
|
|
97
97
|
.rt-TextFieldSlot[data-side='right'],
|
|
98
98
|
.rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])
|
|
99
|
-
`)?v.value.length:0;requestAnimationFrame(()=>{try{v.setSelectionRange(y,y)}catch{}v.focus()})}},r.createElement("input",{spellCheck:"false",...h,ref:Xh(n,t),className:"rt-reset rt-TextFieldInput"}),s)});Kl.displayName="TextField.Root";const OL=r.forwardRef((e,t)=>{const{className:n,color:s,side:i,...c}=hn(e,_L);return r.createElement("div",{"data-accent-color":s,"data-side":i,...c,ref:t,className:Xe("rt-TextFieldSlot",n)})});OL.displayName="TextField.Slot";const cr={lastBrand:"scenri:last-brand",engine:"scenri:engine",quality:"scenri:quality",count:"scenri:count",format:"scenri:format",assetsOpen:"scenri:assets-open",assetsExpanded:"scenri:assets-expanded",tileSize:"scenri:tile-size",wallDensity:"scenri:wall-density",feedSort:"scenri:feed-sort"};function Z5(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}const uh="scenri:pref-changed";function V5(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}try{window.dispatchEvent(new CustomEvent(uh,{detail:{key:e,value:t}}))}catch{}}function dh(e,t){try{const n=localStorage.getItem(e);return n===null?null:(localStorage.setItem(t,n),localStorage.removeItem(e),n)}catch{return null}}function Ia(e,t){const[n,s]=r.useState(()=>Z5(e,t));return r.useEffect(()=>{V5(e,n)},[e,n]),r.useEffect(()=>{const i=c=>{const u=c.detail;(u==null?void 0:u.key)===e&&s(f=>Object.is(f,u.value)?f:u.value)};return window.addEventListener(uh,i),()=>window.removeEventListener(uh,i)},[e]),[n,s]}function ZL(e,t){const[n,s]=r.useState(()=>{try{const i=sessionStorage.getItem(e);return i===null?t:JSON.parse(i)}catch{return t}});return r.useEffect(()=>{try{sessionStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,s]}function f2(e,t){const[n,s]=Ia(e,t),[i,c]=r.useState(null);return[i??n,f=>{c(null),s(f)},c]}const VL=()=>Z5(cr.lastBrand,null),zL=e=>V5(cr.lastBrand,e),fh="sc-theme",BL="bt-theme",UL=()=>window.matchMedia("(prefers-color-scheme: light)").matches,z5=r.createContext({choice:"system",mode:"dark",setChoice:()=>{},toggle:()=>{}}),WL=()=>r.useContext(z5);function GL(){const e=localStorage.getItem(fh)??dh(BL,fh);return e==="light"||e==="dark"||e==="system"?e:"system"}function KL({children:e}){const[t,n]=r.useState(GL),[s,i]=r.useState(()=>UL()?"light":"dark");r.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: light)"),h=()=>i(f.matches?"light":"dark");return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);const c=t==="system"?s:t;r.useEffect(()=>{document.documentElement.dataset.theme=c,localStorage.setItem(fh,t)},[c,t]);const u=r.useMemo(()=>({choice:t,mode:c,setChoice:n,toggle:()=>n(c==="dark"?"light":"dark")}),[t,c]);return o.jsx(z5.Provider,{value:u,children:o.jsx(Ua,{appearance:c,accentColor:"gray",grayColor:"gray",radius:"large",scaling:"100%",children:e})})}const YL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.41,51.63a108,108,0,1,0,0,152.74A107.38,107.38,0,0,0,204.41,51.63Zm-17,17A83.85,83.85,0,0,1,196.26,79L169,111.09l-23.3-65.21A83.52,83.52,0,0,1,187.43,68.6Zm-118.85,0a83.44,83.44,0,0,1,51.11-24.2l14.16,39.65L65.71,71.61C66.64,70.59,67.59,69.59,68.58,68.6ZM48,153.7a84.48,84.48,0,0,1,3.4-60.3L92.84,101Zm20.55,33.7A83.94,83.94,0,0,1,59.74,177L87,144.91l23.3,65.21A83.53,83.53,0,0,1,68.58,187.4Zm36.36-63.61,15.18-17.85,23.06,4.21,7.88,22.06-15.17,17.85-23.06-4.21Zm82.49,63.61a83.49,83.49,0,0,1-51.11,24.2L122.15,172l68.14,12.44C189.36,185.41,188.41,186.41,187.43,187.4ZM163.16,155,208,102.3a84.43,84.43,0,0,1-3.41,60.3Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M195.88,60.12a96,96,0,1,0,0,135.76A96,96,0,0,0,195.88,60.12Zm-55.34,103h0l-36.68-6.69h0L91.32,121.3l24.14-28.41h0l36.68,6.69,12.54,35.12Z",opacity:"0.2"}),r.createElement("path",{d:"M201.54,54.46A104,104,0,0,0,54.46,201.54,104,104,0,0,0,201.54,54.46ZM190.23,65.78a88.18,88.18,0,0,1,11,13.48L167.55,119,139.63,40.78A87.34,87.34,0,0,1,190.23,65.78ZM155.59,133l-18.16,21.37-27.59-5L100.41,123l18.16-21.37,27.59,5ZM65.77,65.78a87.34,87.34,0,0,1,56.66-25.59l17.51,49L58.3,74.32A88,88,0,0,1,65.77,65.78ZM46.65,161.54a88.41,88.41,0,0,1,2.53-72.62l51.21,9.35Zm19.12,28.68a88.18,88.18,0,0,1-11-13.48L88.45,137l27.92,78.18A87.34,87.34,0,0,1,65.77,190.22Zm124.46,0a87.34,87.34,0,0,1-56.66,25.59l-17.51-49,81.64,14.91A88,88,0,0,1,190.23,190.22Zm-34.62-32.49,53.74-63.27a88.41,88.41,0,0,1-2.53,72.62Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,0,0,54.46,54.46,104,104,0,0,0,128,232h.09A104,104,0,0,0,232,128ZM49.18,88.92l51.21,9.35L46.65,161.53A88.39,88.39,0,0,1,49.18,88.92Zm160.17,5.54a88.41,88.41,0,0,1-2.53,72.62l-51.21-9.35Zm-8.08-15.2L167.55,119,139.63,40.78a87.38,87.38,0,0,1,50.6,25A88.74,88.74,0,0,1,201.27,79.26ZM122.43,40.19l17.51,49L58.3,74.32a89.28,89.28,0,0,1,7.47-8.55A87.37,87.37,0,0,1,122.43,40.19ZM54.73,176.74,88.45,137l27.92,78.18a88,88,0,0,1-61.64-38.48Zm78.84,39.06-17.51-49L139.14,171h0l58.52,10.69a87.5,87.5,0,0,1-64.13,34.12Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200.12,55.88A102,102,0,0,0,55.87,200.12,102,102,0,1,0,200.12,55.88Zm-102,66.67,19.65-23.14,29.86,5.46,10.21,28.58-19.65,23.14-29.86-5.46ZM209.93,90.69a90.24,90.24,0,0,1-2,78.63l-56.14-10.24Zm-6.16-11.28-36.94,43.48L136.66,38.42a89.31,89.31,0,0,1,55,25.94A91.33,91.33,0,0,1,203.77,79.41Zm-139.41-15A89.37,89.37,0,0,1,123.81,38.1L143,91.82,54.75,75.71A91.2,91.2,0,0,1,64.36,64.36ZM48,86.68l56.14,10.24L46.07,165.31a90.24,90.24,0,0,1,2-78.63Zm4.21,89.91,36.94-43.48,30.17,84.47a89.31,89.31,0,0,1-55-25.94A91.33,91.33,0,0,1,52.23,176.59Zm139.41,15a89.32,89.32,0,0,1-59.45,26.26L113,164.18l88.24,16.11A91.2,91.2,0,0,1,191.64,191.64Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M201.54,54.46A104,104,0,0,0,54.46,201.54,104,104,0,0,0,201.54,54.46ZM190.23,65.78a88.18,88.18,0,0,1,11,13.48L167.55,119,139.63,40.78A87.34,87.34,0,0,1,190.23,65.78ZM155.59,133l-18.16,21.37-27.59-5L100.41,123l18.16-21.37,27.59,5ZM65.77,65.78a87.34,87.34,0,0,1,56.66-25.59l17.51,49L58.3,74.32A88,88,0,0,1,65.77,65.78ZM46.65,161.54a88.41,88.41,0,0,1,2.53-72.62l51.21,9.35Zm19.12,28.68a88.18,88.18,0,0,1-11-13.48L88.45,137l27.92,78.18A87.34,87.34,0,0,1,65.77,190.22Zm124.46,0a87.34,87.34,0,0,1-56.66,25.59l-17.51-49,81.64,14.91A88,88,0,0,1,190.23,190.22Zm-34.62-32.49,53.74-63.27a88.41,88.41,0,0,1-2.53,72.62Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M198.71,57.29A100,100,0,1,0,57.29,198.71,100,100,0,1,0,198.71,57.29Zm10.37,114.27-61-11.14L210.4,87a92.26,92.26,0,0,1-1.32,84.52ZM95.87,122.13,117,97.24l32.14,5.86,11,30.77L139,158.76l-32.14-5.86ZM206.24,79.58l-40.13,47.25L133.75,36.2a92.09,92.09,0,0,1,72.49,43.38ZM63,63a91.31,91.31,0,0,1,62.26-26.88L146,94.41,51.32,77.11A92.94,92.94,0,0,1,63,63Zm-16,21.49,61,11.14L45.6,169a92.26,92.26,0,0,1,1.32-84.52Zm2.84,92,40.13-47.25,32.36,90.63a92.09,92.09,0,0,1-72.49-43.38Zm143.29,16.63a91.31,91.31,0,0,1-62.26,26.88L110,161.59l94.72,17.3A92.94,92.94,0,0,1,193.05,193.05Z"}))]]),qL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,44H32A20,20,0,0,0,12,64V88a20,20,0,0,0,16,19.6V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V107.6A20,20,0,0,0,244,88V64A20,20,0,0,0,224,44ZM36,68H220V84H36ZM52,188V108H204v80Zm112-52a12,12,0,0,1-12,12H104a12,12,0,0,1,0-24h48A12,12,0,0,1,164,136Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm-72,96H104a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm72-56H32V64H224V88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,50H32A14,14,0,0,0,18,64V88a14,14,0,0,0,14,14h2v90a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V102h2a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50ZM210,192a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V102H210ZM226,88a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2ZM98,136a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,52H32A12,12,0,0,0,20,64V88a12,12,0,0,0,12,12h4v92a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V100h4a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52ZM212,192a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V100H212ZM228,88a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4ZM100,136a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,136Z"}))]]),XL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-100.49a12,12,0,0,1-17,17L140,117v51a12,12,0,0,1-24,0V117l-11.51,11.52a12,12,0,0,1-17-17l32-32a12,12,0,0,1,17,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,101.66a8,8,0,0,1-11.32,0L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,165.66,125.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm36.24-102.24a6,6,0,1,1-8.48,8.48L134,102.49V168a6,6,0,0,1-12,0V102.49l-21.76,21.75a6,6,0,0,1-8.48-8.48l32-32a6,6,0,0,1,8.48,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-102.83a4,4,0,0,1-5.66,5.66L132,97.66V168a4,4,0,0,1-8,0V97.66L98.83,122.83a4,4,0,0,1-5.66-5.66l32-32a4,4,0,0,1,5.66,0Z"}))]]),QL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),JL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),eT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,143.51a12,12,0,0,1-17,17L140,109V224a12,12,0,0,1-24,0V109L64.49,160.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0ZM216,28H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,144H56l72-72Z",opacity:"0.2"}),r.createElement("path",{d:"M133.66,66.34a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,152h64v72a8,8,0,0,0,16,0V152h64a8,8,0,0,0,5.66-13.66ZM75.31,136,128,83.31,180.69,136ZM224,40a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,138.34A8,8,0,0,1,200,152H136v72a8,8,0,0,1-16,0V152H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0ZM216,32H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,139.76a6,6,0,1,1-8.48,8.48L134,86.49V224a6,6,0,0,1-12,0V86.49L60.24,148.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0ZM216,34H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,138.34a8,8,0,0,1-11.32,11.32L136,91.31V224a8,8,0,0,1-16,0V91.31L61.66,149.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0ZM216,32H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,141.17a4,4,0,0,1-5.66,5.66L132,81.66V224a4,4,0,0,1-8,0V81.66L58.83,146.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0ZM216,36H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"}))]]),tT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),r.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),nT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),rT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),aT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"}))]]),sT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,48V208H80V48Z",opacity:"0.2"}),r.createElement("path",{d:"M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z"}))]]),oT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),lT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),iT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,28H72A20,20,0,0,0,52,48V224a12,12,0,0,0,18.36,10.18l57.63-36,57.65,36A12,12,0,0,0,204,224V48A20,20,0,0,0,184,28Zm-4,174.35-45.65-28.53a12,12,0,0,0-12.72,0L76,202.35V52H180Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,48V224l-64-40L64,224V48a8,8,0,0,1,8-8H184A8,8,0,0,1,192,48Z",opacity:"0.2"}),r.createElement("path",{d:"M184,32H72A16,16,0,0,0,56,48V224a8,8,0,0,0,12.24,6.78L128,193.43l59.77,37.35A8,8,0,0,0,200,224V48A16,16,0,0,0,184,32Zm0,177.57-51.77-32.35a8,8,0,0,0-8.48,0L72,209.57V48H184Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,32H72A16,16,0,0,0,56,48V224a8,8,0,0,0,12.24,6.78L128,193.43l59.77,37.35A8,8,0,0,0,200,224V48A16,16,0,0,0,184,32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,34H72A14,14,0,0,0,58,48V224a6,6,0,0,0,9.18,5.09l60.81-38,60.83,38A6,6,0,0,0,198,224V48A14,14,0,0,0,184,34Zm2,179.17-54.83-34.26a6,6,0,0,0-6.36,0L70,213.17V48a2,2,0,0,1,2-2H184a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,32H72A16,16,0,0,0,56,48V224a8,8,0,0,0,12.24,6.78L128,193.43l59.77,37.35A8,8,0,0,0,200,224V48A16,16,0,0,0,184,32Zm0,177.57-51.77-32.35a8,8,0,0,0-8.48,0L72,209.57V48H184Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,36H72A12,12,0,0,0,60,48V224a4,4,0,0,0,6.12,3.39L128,188.72l61.89,38.67A4,4,0,0,0,192,228a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,196,224V48A12,12,0,0,0,184,36Zm4,180.78-57.89-36.17a4,4,0,0,0-4.24,0L68,216.78V48a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4Z"}))]]),cT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.24,213.21C216.12,203,204,180.64,204,152V134.73a19.94,19.94,0,0,0-12.62-18.59l-24.86-9.81a4,4,0,0,1-2.26-5.14l21.33-53A32,32,0,0,0,167.17,6,32.13,32.13,0,0,0,126.25,24.2l-.07.18-21,53.09a3.94,3.94,0,0,1-2.14,2.2,3.89,3.89,0,0,1-3,.06L74.6,69.43A19.89,19.89,0,0,0,52.87,74C31.06,96.43,20,122.68,20,152a115.46,115.46,0,0,0,32.29,80.3A12,12,0,0,0,61,236H232a12,12,0,0,0,5.24-22.79ZM68.19,92.73,91.06,102A28,28,0,0,0,127.5,86.31l20.95-53a8.32,8.32,0,0,1,10.33-4.81,8,8,0,0,1,4.61,10.57,1.17,1.17,0,0,0,0,.11L142,92.29a28.05,28.05,0,0,0,15.68,36.33L180,137.45V152c0,1,0,2.07.05,3.1l-122.44-49A101.91,101.91,0,0,1,68.19,92.73ZM116.74,212a83.73,83.73,0,0,1-22.09-39,12,12,0,0,0-23.25,6,110.27,110.27,0,0,0,14.49,33H66.25A91.53,91.53,0,0,1,44,152a84,84,0,0,1,3.41-24.11l136.67,54.66A86.58,86.58,0,0,0,198.66,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192.8,165.12,43.93,105.57A110.88,110.88,0,0,1,61.47,82.38a8,8,0,0,1,8.67-1.81L95.52,90.85a16,16,0,0,0,20.82-9l21-53.1c4.15-10,15.47-15.33,25.63-11.53a20,20,0,0,1,11.51,26.39L153.13,96.71a16,16,0,0,0,8.93,20.75L187,127.3a8,8,0,0,1,5,7.43V152A104.58,104.58,0,0,0,192.8,165.12Z",opacity:"0.2"}),r.createElement("path",{d:"M235.5,216.81c-22.56-11-35.5-34.58-35.5-64.8V134.73a15.94,15.94,0,0,0-10.09-14.87L165,110a8,8,0,0,1-4.48-10.34l21.32-53a28,28,0,0,0-16.1-37,28.14,28.14,0,0,0-35.82,16,.61.61,0,0,0,0,.12L108.9,79a8,8,0,0,1-10.37,4.49L73.11,73.14A15.89,15.89,0,0,0,55.74,76.8C34.68,98.45,24,123.75,24,152a111.45,111.45,0,0,0,31.18,77.53A8,8,0,0,0,61,232H232a8,8,0,0,0,3.5-15.19ZM67.14,88l25.41,10.3a24,24,0,0,0,31.23-13.45l21-53c2.56-6.11,9.47-9.27,15.43-7a12,12,0,0,1,6.88,15.92L145.69,93.76a24,24,0,0,0,13.43,31.14L184,134.73V152c0,.33,0,.66,0,1L55.77,101.71A108.84,108.84,0,0,1,67.14,88Zm48,128a87.53,87.53,0,0,1-24.34-42,8,8,0,0,0-15.49,4,105.16,105.16,0,0,0,18.36,38H64.44A95.54,95.54,0,0,1,40,152a85.9,85.9,0,0,1,7.73-36.29l137.8,55.12c3,18,10.56,33.48,21.89,45.16Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.29,216.7C212.86,205.69,200,182.12,200,152V134.69a15.94,15.94,0,0,0-10.09-14.87l-28.65-11.46A8,8,0,0,1,156.79,98l22.32-56.67C184,28.79,178,14.21,165.34,9.51a24,24,0,0,0-30.7,13.71L112.25,80.08a8,8,0,0,1-10.41,4.5L73.11,73.08a15.91,15.91,0,0,0-17.38,3.66C34.68,98.4,24,123.71,24,152a111.53,111.53,0,0,0,31.15,77.53A8.06,8.06,0,0,0,61,232H232a8,8,0,0,0,8-7.51A8.21,8.21,0,0,0,235.29,216.7ZM115.11,216a87.52,87.52,0,0,1-24.26-41.71,8.21,8.21,0,0,0-9.25-6.18A8,8,0,0,0,75.28,178a105.33,105.33,0,0,0,18.36,38H64.44A95.62,95.62,0,0,1,40,152a85.92,85.92,0,0,1,7.73-36.3l137.8,55.13c3,18.06,10.55,33.5,21.89,45.19Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.62,218.6C211.35,207.29,198,183,198,152V134.7a14,14,0,0,0-8.82-13l-24.89-9.83a10,10,0,0,1-5.59-13L180,45.9a26,26,0,0,0-15-34.33c-12.95-4.83-27.88,1.84-33.31,15l-21,53.11a10,10,0,0,1-13,5.61L72.37,75a13.9,13.9,0,0,0-15.2,3.19C36.49,99.42,26,124.26,26,152a109.53,109.53,0,0,0,30.62,76.16A6,6,0,0,0,61,230H232a6,6,0,0,0,2.62-11.4ZM65.77,86.52a2,2,0,0,1,2.12-.43l25.4,10.29a22,22,0,0,0,28.63-12.32l21-53c3-7.13,11-10.81,18-8.21a14,14,0,0,1,8,18.54l-21.36,53.1A22.05,22.05,0,0,0,159.86,123l24.88,9.83A2,2,0,0,1,186,134.7V152c0,1.34,0,2.65.08,4L52.74,102.61A110.07,110.07,0,0,1,65.77,86.52ZM114.33,218a89.6,89.6,0,0,1-25.5-43.5,6,6,0,1,0-11.62,3A102.87,102.87,0,0,0,97.81,218H63.56A97.56,97.56,0,0,1,38,152a87.42,87.42,0,0,1,8.71-38.86L187.35,169.4c3.15,19.92,11.77,36.66,25,48.6Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.5,216.81c-22.56-11-35.5-34.58-35.5-64.8V134.73a15.94,15.94,0,0,0-10.09-14.87L165,110a8,8,0,0,1-4.48-10.34l21.32-53a28,28,0,0,0-16.1-37,28.14,28.14,0,0,0-35.82,16,.61.61,0,0,0,0,.12L108.9,79a8,8,0,0,1-10.37,4.49L73.11,73.14A15.89,15.89,0,0,0,55.74,76.8C34.68,98.45,24,123.75,24,152a111.45,111.45,0,0,0,31.18,77.53A8,8,0,0,0,61,232H232a8,8,0,0,0,3.5-15.19ZM67.14,88l25.41,10.3a24,24,0,0,0,31.23-13.45l21-53c2.56-6.11,9.47-9.27,15.43-7a12,12,0,0,1,6.88,15.92L145.69,93.76a24,24,0,0,0,13.43,31.14L184,134.73V152c0,.33,0,.66,0,1L55.77,101.71A108.84,108.84,0,0,1,67.14,88Zm48,128a87.53,87.53,0,0,1-24.34-42,8,8,0,0,0-15.49,4,105.16,105.16,0,0,0,18.36,38H64.44A95.54,95.54,0,0,1,40,152a85.9,85.9,0,0,1,7.73-36.29l137.8,55.12c3,18,10.56,33.48,21.89,45.16Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M233.75,220.4C209.76,208.75,196,183.82,196,152V134.72a12,12,0,0,0-7.56-11.15l-24.89-9.83a12,12,0,0,1-6.71-15.55l21.33-53a23.88,23.88,0,0,0-31.93-31A24.72,24.72,0,0,0,133.62,27.3l-21,53.1A12,12,0,0,1,97,87.13L71.63,76.84a12,12,0,0,0-13,2.73C38.3,100.45,28,124.82,28,152a107.5,107.5,0,0,0,30.07,74.77A4,4,0,0,0,61,228H232a4,4,0,0,0,1.75-7.6ZM64.34,85.15a3.94,3.94,0,0,1,4.3-.89L94,94.55a20,20,0,0,0,26-11.2l21-53C144.39,22.19,153.61,18,161.58,21a16,16,0,0,1,9.19,21.16L149.41,95.22a20,20,0,0,0,11.18,26l24.9,9.83a4,4,0,0,1,2.51,3.72V152c0,2.36.08,4.69.22,7l-138.5-55.4A110.84,110.84,0,0,1,64.34,85.15ZM113.56,220A91.35,91.35,0,0,1,86.9,175a4,4,0,0,0-7.75,2,100.21,100.21,0,0,0,23.09,43H62.68A99.5,99.5,0,0,1,36,152a89.37,89.37,0,0,1,9.73-41.4L189.13,168c3.22,22,13.23,40.09,28.8,52Z"}))]]),uT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),r.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),dT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),r.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),fT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),r.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),hT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),mT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),pT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]),gT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z"}))]]),vT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),yT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180,64H40A12,12,0,0,0,28,76V216a12,12,0,0,0,12,12H180a12,12,0,0,0,12-12V76A12,12,0,0,0,180,64ZM168,204H52V88H168ZM228,40V180a12,12,0,0,1-24,0V52H76a12,12,0,0,1,0-24H216A12,12,0,0,1,228,40Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,72V216H40V72Z",opacity:"0.2"}),r.createElement("path",{d:"M184,64H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V72A8,8,0,0,0,184,64Zm-8,144H48V80H176ZM224,40V184a8,8,0,0,1-16,0V48H72a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,72V216a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H184A8,8,0,0,1,192,72Zm24-40H72a8,8,0,0,0,0,16H208V184a8,8,0,0,0,16,0V40A8,8,0,0,0,216,32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,66H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H184a6,6,0,0,0,6-6V72A6,6,0,0,0,184,66Zm-6,144H46V78H178ZM222,40V184a6,6,0,0,1-12,0V46H72a6,6,0,0,1,0-12H216A6,6,0,0,1,222,40Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,64H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V72A8,8,0,0,0,184,64Zm-8,144H48V80H176ZM224,40V184a8,8,0,0,1-16,0V48H72a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,68H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H184a4,4,0,0,0,4-4V72A4,4,0,0,0,184,68Zm-4,144H44V76H180ZM220,40V184a4,4,0,0,1-8,0V44H72a4,4,0,0,1,0-8H216A4,4,0,0,1,220,40Z"}))]]),xT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,35.52C177.62,25.51,153.48,20,128,20S78.38,25.51,60,35.52C39.37,46.79,28,62.58,28,80v96c0,17.42,11.37,33.21,32,44.48,18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52c20.66-11.27,32-27.06,32-44.48V80C228,62.58,216.63,46.79,196,35.52ZM204,128c0,17-31.21,36-76,36s-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94ZM128,44c44.79,0,76,19,76,36s-31.21,36-76,36S52,97,52,80,83.21,44,128,44Zm0,168c-44.79,0-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94V176C204,193,172.79,212,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,80c0,26.51-39.4,48-88,48S40,106.51,40,80s39.4-48,88-48S216,53.49,216,80Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64Zm-21.61,74.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26C75.29,26,34,49.72,34,80v96c0,30.28,41.29,54,94,54s94-23.72,94-54V80C222,49.72,180.71,26,128,26Zm0,12c44.45,0,82,19.23,82,42s-37.55,42-82,42S46,102.77,46,80,83.55,38,128,38Zm82,138c0,22.77-37.55,42-82,42s-82-19.23-82-42V154.79C62,171.16,92.37,182,128,182s66-10.84,82-27.21Zm0-48c0,22.77-37.55,42-82,42s-82-19.23-82-42V106.79C62,123.16,92.37,134,128,134s66-10.84,82-27.21Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"}))]]),wT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",opacity:"0.2"}),r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z"}))]]),bT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),ET=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,100H132.92l78.14-20.63a12,12,0,0,0,8.52-14.75l-8.16-30a19.94,19.94,0,0,0-24.3-13.95L34.79,60.87a19.74,19.74,0,0,0-12.14,9.27,19.48,19.48,0,0,0-1.95,15L28,112v88a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V112A12,12,0,0,0,216,100ZM124.89,61.91l18.29,10.56-25.95,6.85L98.94,68.76Zm64.45-17,3.91,14.35-17.13,4.52L157.83,53.21ZM66,77.46,84.29,88l-35.4,9.35L45,83ZM204,196H52V124H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M67.71,64.59l47.79,27.6L40.43,112,32.27,82a7.76,7.76,0,0,1,5.58-9.52ZM199.84,37.76a7.9,7.9,0,0,0-9.66-5.49L126.61,49.05,174.4,76.64,208,67.77Z",opacity:"0.2"}),r.createElement("path",{d:"M216,104H102.09L210,75.51a8,8,0,0,0,5.68-9.84l-8.16-30a15.93,15.93,0,0,0-19.42-11.13L35.81,64.74a15.75,15.75,0,0,0-9.7,7.4,15.51,15.51,0,0,0-1.55,12L32,111.56c0,.14,0,.29,0,.44v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V112A8,8,0,0,0,216,104ZM192.16,40l6,22.07-22.62,6L147.42,51.83Zm-66.69,17.6,28.12,16.24-36.94,9.75L88.53,67.37Zm-79.4,44.62-6-22.08,26.5-7L94.69,89.4ZM208,200H48V120H208v80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,104H102.09L210,75.51a8,8,0,0,0,5.68-9.84l-8.16-30a15.93,15.93,0,0,0-19.42-11.13L35.81,64.74a15.75,15.75,0,0,0-9.7,7.4,15.51,15.51,0,0,0-1.55,12L32,111.56c0,.14,0,.29,0,.44v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V112A8,8,0,0,0,216,104ZM192.16,40l6,22.07L164.57,71,136.44,54.72ZM77.55,70.27l28.12,16.24-59.6,15.73-6-22.08Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,106H86.68L209.53,73.57a6,6,0,0,0,4.26-7.38l-8.16-30a13.94,13.94,0,0,0-17-9.72L36.32,66.67a13.77,13.77,0,0,0-8.48,6.47,13.57,13.57,0,0,0-1.36,10.42L34,111.34c0,.22,0,.44,0,.66v88a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V112A6,6,0,0,0,216,106ZM125.75,55.48l33,19.07-42.43,11.2-33-19.07Zm66-17.41a1.92,1.92,0,0,1,2.34,1.26l6.57,24.18L175.26,70.2l-33-19.07ZM38.23,79.14a1.85,1.85,0,0,1,1.15-.87L66.86,71l33,19.08L44.66,104.68l-6.6-24.27A1.63,1.63,0,0,1,38.23,79.14ZM210,200a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V118H210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,104H102.09L210,75.51a8,8,0,0,0,5.68-9.84l-8.16-30a15.93,15.93,0,0,0-19.42-11.13L35.81,64.74a15.75,15.75,0,0,0-9.7,7.4,15.51,15.51,0,0,0-1.55,12L32,111.56c0,.14,0,.29,0,.44v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V112A8,8,0,0,0,216,104ZM192.16,40l6,22.07-22.62,6L147.42,51.83Zm-66.69,17.6,28.12,16.24-36.94,9.75L88.53,67.37Zm-79.4,44.62-6-22.08,26.5-7L94.69,89.4ZM208,200H48V120H208v80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,108H71.26L209,71.64a4,4,0,0,0,2.84-4.92l-8.16-30a11.92,11.92,0,0,0-14.54-8.31L36.83,68.61a11.78,11.78,0,0,0-7.26,5.53A11.59,11.59,0,0,0,28.41,83l7.67,28.19A3.87,3.87,0,0,0,36,112v88a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V112A4,4,0,0,0,216,108ZM126,53.33l38,21.92L116.08,87.9,78.12,66Zm65.16-17.2a4,4,0,0,1,1-.13A3.88,3.88,0,0,1,196,38.81l7.1,26.12L175,72.35,137,50.43Zm-154.7,42a3.86,3.86,0,0,1,2.37-1.8l28.27-7.46,38,21.91L43.25,107.12,36.13,80.94A3.66,3.66,0,0,1,36.5,78.14ZM212,200a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V116H212Z"}))]]),CT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),ST=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,88a12,12,0,0,1,12-12h32a12,12,0,0,1,12,12v32a12,12,0,0,1-24,0V100H152A12,12,0,0,1,140,88ZM72,180h32a12,12,0,0,0,0-24H84V136a12,12,0,0,0-24,0v32A12,12,0,0,0,72,180ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),r.createElement("path",{d:"M200,80v32a8,8,0,0,1-16,0V88H160a8,8,0,0,1,0-16h32A8,8,0,0,1,200,80ZM96,168H72V144a8,8,0,0,0-16,0v32a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM88,192H56a8,8,0,0,1-8-8V152a8,8,0,0,1,16,0v24H88a8,8,0,0,1,0,16Zm120-88a8,8,0,0,1-16,0V80H168a8,8,0,0,1,0-16h32a8,8,0,0,1,8,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M198,80v32a6,6,0,0,1-12,0V86H160a6,6,0,0,1,0-12h32A6,6,0,0,1,198,80ZM96,170H70V144a6,6,0,0,0-12,0v32a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12ZM230,56V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,80v32a8,8,0,0,1-16,0V88H160a8,8,0,0,1,0-16h32A8,8,0,0,1,200,80ZM96,168H72V144a8,8,0,0,0-16,0v32a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,80v32a4,4,0,0,1-8,0V84H160a4,4,0,0,1,0-8h32A4,4,0,0,1,196,80ZM96,172H68V144a4,4,0,0,0-8,0v32a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8ZM228,56V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z"}))]]),jT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z"}))]]),kT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z",opacity:"0.2"}),r.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"}))]]),NT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V40A20,20,0,0,0,200,20Zm-4,192H60V44H196ZM84,68A12,12,0,0,1,96,56h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,68Zm8.8,127.37a48,48,0,0,1,70.4,0,12,12,0,0,0,17.6-16.32,72,72,0,0,0-19.21-14.68,44,44,0,1,0-67.19,0,72.12,72.12,0,0,0-19.2,14.68,12,12,0,0,0,17.6,16.32ZM128,116a20,20,0,1,1-20,20A20,20,0,0,1,128,116Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,32H56a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32ZM128,168a32,32,0,1,1,32-32A32,32,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM96,48h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm84.81,150.4a8,8,0,0,1-11.21-1.6,52,52,0,0,0-83.2,0,8,8,0,1,1-12.8-9.6A67.88,67.88,0,0,1,101,165.51a40,40,0,1,1,53.94,0A67.88,67.88,0,0,1,182.4,187.2,8,8,0,0,1,180.81,198.4ZM152,136a24,24,0,1,1-24-24A24,24,0,0,1,152,136Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M151.11,166.13a38,38,0,1,0-46.22,0A65.75,65.75,0,0,0,75.2,188.4a6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,9.6-7.2A65.75,65.75,0,0,0,151.11,166.13ZM128,110a26,26,0,1,1-26,26A26,26,0,0,1,128,110Zm72-84H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm2,190a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2ZM90,64a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,64Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M146.7,166.75a36,36,0,1,0-37.4,0A63.61,63.61,0,0,0,76.8,189.6a4,4,0,0,0,6.4,4.8,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63.65,63.65,0,0,0,146.7,166.75ZM100,136a28,28,0,1,1,28,28A28,28,0,0,1,100,136ZM200,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Zm4,188a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4ZM92,64a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,64Z"}))]]),AT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v63.72L186.14,97.86a20,20,0,0,0-28.28,0L52,203.72V52ZM85.66,204,172,117.66l32,32V204ZM76,96a20,20,0,1,1,20,20A20,20,0,0,1,76,96Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,40H48a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8h8.69L166.34,106.34a8,8,0,0,1,11.32,0L216,144.69V48A8,8,0,0,0,208,40ZM96,112a16,16,0,1,1,16-16A16,16,0,0,1,96,112Z",opacity:"0.2"}),r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM48,48H208v77.38l-24.69-24.7a16,16,0,0,0-22.62,0L53.37,208H48ZM208,208H76l96-96,36,36v60ZM96,120A24,24,0,1,0,72,96,24,24,0,0,0,96,120Zm0-32a8,8,0,1,1-8,8A8,8,0,0,1,96,88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM48,48H208v77.38l-24.69-24.7a16,16,0,0,0-22.62,0L53.37,208H48ZM80,96a16,16,0,1,1,16,16A16,16,0,0,1,80,96Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM46,208V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2v82.2l-28.1-28.1a14,14,0,0,0-19.8,0L54.2,210H48A2,2,0,0,1,46,208Zm162,2H71.17l99.41-99.41a2,2,0,0,1,2.83,0L210,147.17V208A2,2,0,0,1,208,210ZM96,118A22,22,0,1,0,74,96,22,22,0,0,0,96,118Zm0-32A10,10,0,1,1,86,96,10,10,0,0,1,96,86Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM48,48H208v77.38l-24.69-24.7a16,16,0,0,0-22.62,0L53.37,208H48ZM208,208H76l96-96,36,36v60ZM96,120A24,24,0,1,0,72,96,24,24,0,0,0,96,120Zm0-32a8,8,0,1,1-8,8A8,8,0,0,1,96,88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM44,208V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4v87l-31.51-31.52a12,12,0,0,0-17,0L55,212H48A4,4,0,0,1,44,208Zm164,4H66.34L169.17,109.17a4,4,0,0,1,5.66,0L212,146.34V208A4,4,0,0,1,208,212ZM96,116A20,20,0,1,0,76,96,20,20,0,0,0,96,116Zm0-32A12,12,0,1,1,84,96,12,12,0,0,1,96,84Z"}))]]),MT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),RT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),PT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),LT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),r.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),TT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,80a32,32,0,1,0-32-32A32,32,0,0,0,160,80Zm0-40a8,8,0,1,1-8,8A8,8,0,0,1,160,40Zm94.32,153.88L199.76,101.8A19.85,19.85,0,0,0,182.55,92h0a19.83,19.83,0,0,0-17.2,9.8l-18.7,31.55-37.42-63.5a20,20,0,0,0-34.46,0L1.66,193.91A12,12,0,0,0,12,212H244a12,12,0,0,0,10.32-18.12ZM92,87.87,108.57,116H75.43ZM33,188l28.28-48h61.44L151,188Zm145.86,0L160.56,157l22-37.1L222.94,188Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144,52a20,20,0,1,1,20,20A20,20,0,0,1,144,52Zm49.44,55.92a8,8,0,0,0-13.77,0l-33,55.75-21-35.67H50.35L8,200H248Z",opacity:"0.2"}),r.createElement("path",{d:"M164,80a28,28,0,1,0-28-28A28,28,0,0,0,164,80Zm0-40a12,12,0,1,1-12,12A12,12,0,0,1,164,40Zm90.88,155.92-54.56-92.08A15.87,15.87,0,0,0,186.55,96h0a15.85,15.85,0,0,0-13.76,7.84L146.63,148l-44.84-76.1a16,16,0,0,0-27.58,0L1.11,195.94A8,8,0,0,0,8,208H248a8,8,0,0,0,6.88-12.08ZM88,80l23.57,40H64.43ZM22,192l33-56h66l33,56Zm150.57,0-16.66-28.28L186.55,112,234,192Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M254.88,195.92l-54.56-92.08A15.87,15.87,0,0,0,186.55,96h0a15.85,15.85,0,0,0-13.76,7.84l-15.64,26.39a4,4,0,0,0,0,4.07l26.8,45.47a8.13,8.13,0,0,1-1.89,10.55,8,8,0,0,1-11.8-2.26L101.79,71.88a16,16,0,0,0-27.58,0L1.11,195.94a8,8,0,0,0,1,9.52A8.23,8.23,0,0,0,8.23,208H247.77a8.29,8.29,0,0,0,6.09-2.55A8,8,0,0,0,254.88,195.92ZM64.43,120,88,80l23.57,40ZM140,52a24,24,0,1,1,24,24A24,24,0,0,1,140,52Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,78a26,26,0,1,0-26-26A26,26,0,0,0,164,78Zm0-40a14,14,0,1,1-14,14A14,14,0,0,1,164,38Zm89.16,158.94L198.6,104.86a13.9,13.9,0,0,0-12-6.86h0a13.88,13.88,0,0,0-12,6.86l-27.88,47.05-46.56-79a14,14,0,0,0-24.13,0L2.83,197A6,6,0,0,0,8,206H248a6,6,0,0,0,5.16-9.06ZM86.27,79a2,2,0,0,1,3.46,0l25.34,43H60.93ZM18.5,194l35.36-60h68.29l19.3,32.77,0,0,16,27.2Zm152.93,0-17.85-30.29L184.83,111a2,2,0,0,1,1.72-1,1.93,1.93,0,0,1,1.72,1l49.2,83Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,80a28,28,0,1,0-28-28A28,28,0,0,0,164,80Zm0-40a12,12,0,1,1-12,12A12,12,0,0,1,164,40Zm90.88,155.92-54.56-92.08A15.87,15.87,0,0,0,186.55,96h0a15.85,15.85,0,0,0-13.76,7.84L146.63,148l-44.84-76.1a16,16,0,0,0-27.58,0L1.11,195.94A8,8,0,0,0,8,208H248a8,8,0,0,0,6.88-12.08ZM88,80l23.57,40H64.43ZM22,192l33-56h66l18.74,31.8,0,0L154,192Zm150.57,0-16.66-28.28L186.55,112,234,192Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,76a24,24,0,1,0-24-24A24,24,0,0,0,164,76Zm0-40a16,16,0,1,1-16,16A16,16,0,0,1,164,36Zm87.44,162-54.56-92.08A11.91,11.91,0,0,0,186.55,100h0a11.89,11.89,0,0,0-10.32,5.88l-29.61,50L98.34,73.91a12,12,0,0,0-20.68,0L4.55,198A4,4,0,0,0,8,204H248a4,4,0,0,0,3.44-6ZM84.55,78a4,4,0,0,1,6.9,0l27.12,46H57.43ZM15,196l37.71-64h70.58L161,196Zm155.29,0-19-32.29L183.11,110a4,4,0,0,1,6.88,0l51,86Z"}))]]),HT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,178.57,87.73l-72-39.42Zm0,78.83L56,76,81.56,62l72,39.41ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l24-13.13V152a12,12,0,0,0,24,0V109.92l24-13.13v76.65Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.18a8,8,0,0,1-4.16-7V80.18a8,8,0,0,1,.7-3.25Z",opacity:"0.2"}),r.createElement("path",{d:"M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.35,44L178.57,92.29l-80.35-44Zm0,88L47.65,76,81.56,57.43l80.35,44Zm88,55.85h0l-80,43.79V133.83l32-17.51V152a8,8,0,0,0,16,0V107.56l32-17.51v85.76Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.72,67.91l-88-48.18a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.91ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,178.57,94.57,94.05,48.31ZM122,223,39,177.57a2,2,0,0,1-1-1.75V86.66l84,46ZM43.49,76,81.56,55.15l84.51,46.26L128,122.24ZM218,175.82a2,2,0,0,1-1,1.75h0L134,223V132.64l36-19.71V152a6,6,0,0,0,12,0V106.37l36-19.71Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,178.5,96.89a4,4,0,0,0-.58-.4l-88-48.18Zm1.92,96L39.33,76,81.56,52.87l88.67,48.54Zm-89.92,54.8a4,4,0,0,1-2.08-3.5V83.29l88,48.16v94.91Zm179.84,0h0l-85.92,47V131.45l40-21.89V152a4,4,0,0,0,8,0V105.18l40-21.89v92.53A4,4,0,0,1,217.92,179.32Z"}))]]),DT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,20H72A44.05,44.05,0,0,0,28,64v72a28,28,0,0,0,28,28H95.64L92,207c0,.33,0,.67,0,1a36,36,0,0,0,72,0c0-.33,0-.67,0-1l-3.6-43H200a28,28,0,0,0,28-28V32A12,12,0,0,0,216,20ZM72,44h88V68a12,12,0,0,0,24,0V44h20V96H52V64A20,20,0,0,1,72,44Zm128,96H156a20,20,0,0,0-19.85,22.4l3.84,46a12,12,0,0,1-24,0l3.84-46A20,20,0,0,0,100,140H56a4,4,0,0,1-4-4V120H204v16A4,4,0,0,1,200,140Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,112v24a16,16,0,0,1-16,16H152a8,8,0,0,0-7.92,9.13L152,208a24,24,0,0,1-48,0l7.92-46.87A8,8,0,0,0,104,152H56a16,16,0,0,1-16-16V112Z",opacity:"0.2"}),r.createElement("path",{d:"M216,24H72A40,40,0,0,0,32,64v72a24,24,0,0,0,24,24h48l-7.89,46.67A8.42,8.42,0,0,0,96,208a32,32,0,0,0,64,0,8.42,8.42,0,0,0-.11-1.33L152,160h48a24,24,0,0,0,24-24V32A8,8,0,0,0,216,24ZM72,40H176V80a8,8,0,0,0,16,0V40h16v64H48V64A24,24,0,0,1,72,40ZM200,144H152a16,16,0,0,0-15.84,18.26l0,.2L144,208.6a16,16,0,0,1-32,0l7.8-46.14,0-.2A16,16,0,0,0,104,144H56a8,8,0,0,1-8-8V120H208v16A8,8,0,0,1,200,144Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,24H72A40,40,0,0,0,32,64v72a24,24,0,0,0,24,24h48l-7.89,46.67A8.42,8.42,0,0,0,96,208a32,32,0,0,0,64,0,8.42,8.42,0,0,0-.11-1.33L152,160h48a24,24,0,0,0,24-24V32A8,8,0,0,0,216,24ZM72,40H176V80a8,8,0,0,0,16,0V40h16v72H48V64A24,24,0,0,1,72,40Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,26H72A38,38,0,0,0,34,64v72a22,22,0,0,0,22,22h48a2,2,0,0,1,2,2.23L98.08,207a6.74,6.74,0,0,0-.08,1,30,30,0,0,0,60,0,6.74,6.74,0,0,0-.08-1L150,160.23a2,2,0,0,1,2-2.23h48a22,22,0,0,0,22-22V32A6,6,0,0,0,216,26ZM72,38H178V80a6,6,0,0,0,12,0V38h20v68H46V64A26,26,0,0,1,72,38ZM200,146H152a14,14,0,0,0-13.86,16l0,.15L146,208.47a18,18,0,0,1-36,0l7.82-46.34,0-.15A14,14,0,0,0,104,146H56a10,10,0,0,1-10-10V118H210v18A10,10,0,0,1,200,146Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,24H72A40,40,0,0,0,32,64v72a24,24,0,0,0,24,24h48l-7.89,46.67A8.42,8.42,0,0,0,96,208a32,32,0,0,0,64,0,8.42,8.42,0,0,0-.11-1.33L152,160h48a24,24,0,0,0,24-24V32A8,8,0,0,0,216,24ZM72,40H176V80a8,8,0,0,0,16,0V40h16v64H48V64A24,24,0,0,1,72,40ZM200,144H152a16,16,0,0,0-15.84,18.26l0,.2L144,208.6a16,16,0,0,1-32,0l7.8-46.14,0-.2A16,16,0,0,0,104,144H56a8,8,0,0,1-8-8V120H208v16A8,8,0,0,1,200,144Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,28H72A36,36,0,0,0,36,64v72a20,20,0,0,0,20,20h48a4,4,0,0,1,4,4.52l-7.9,46.81a3.79,3.79,0,0,0-.06.67,28,28,0,0,0,56,0,3.79,3.79,0,0,0-.06-.67L148,160.52a4,4,0,0,1,4-4.52h48a20,20,0,0,0,20-20V32A4,4,0,0,0,216,28ZM72,36H180V80a4,4,0,0,0,8,0V36h24v72H44V64A28,28,0,0,1,72,36ZM200,148H152a12,12,0,0,0-11.88,13.7s0,.06,0,.1L148,208.32a20,20,0,0,1-40,0l7.86-46.52s0-.07,0-.1A12,12,0,0,0,104,148H56a12,12,0,0,1-12-12V116H212v20A12,12,0,0,1,200,148Z"}))]]),$T=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),r.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),FT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.15,70.54,185.46,25.86a20,20,0,0,0-28.28,0L33.86,149.17A19.86,19.86,0,0,0,28,163.31V208a20,20,0,0,0,20,20H216a12,12,0,0,0,0-24H125L230.15,98.83A20,20,0,0,0,230.15,70.54ZM136,81l11,11L76,163,65,152ZM52,204V173l15.52,15.51h0L83,204Zm52-13L93,180l71-71,11,11Zm88-88L153,64l18.34-18.34,39,39Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),r.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM79.32,188,164,103.31,180.69,120,96,204.69ZM68,176.69,51.31,160,136,75.31,152.69,92Zm-20,2.62L76.69,208H48Zm144-70.62L147.32,64l24-24L216,84.69Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM79.32,188l90.34-90.34,16.69,16.68L96,204.69Zm79-101.66h0L68,176.69,51.31,160l90.35-90.34ZM48,179.31,76.69,208H48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.91,74.79,181.22,30.1a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H216a6,6,0,0,0,0-12H110.49L225.91,94.59A14,14,0,0,0,225.91,74.79ZM76.49,188,164,100.48,183.52,120,96,207.51ZM68,179.52,48.49,160,136,72.49,155.52,92ZM46,208V174.48L81.52,210H48A2,2,0,0,1,46,208ZM217.42,86.1,192,111.52,144.49,64,169.9,38.59a2,2,0,0,1,2.83,0l44.69,44.68A2,2,0,0,1,217.42,86.1Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM136,75.31,152.69,92,68,176.69,51.31,160ZM48,208V179.31L76.69,208Zm48-3.31L79.32,188,164,103.31,180.69,120Zm96-96L147.32,64l24-24L216,84.69Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L39.51,154.83A12,12,0,0,0,36,163.31V208a12,12,0,0,0,12,12H216a4,4,0,0,0,0-8H105.66L224.49,93.17A12,12,0,0,0,224.49,76.2ZM73.66,188,164,97.66,186.35,120,96,210.34ZM68,182.34,45.66,160,136,69.66,158.35,92ZM44,208V169.66l21.17,21.17h0L86.34,212H48A4,4,0,0,1,44,208ZM218.83,87.51,192,114.34,141.66,64l26.83-26.83a4,4,0,0,1,5.66,0l44.68,44.69A4,4,0,0,1,218.83,87.51Z"}))]]),IT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,120a16,16,0,1,1-16-16A16,16,0,0,1,200,120ZM156,64H116a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Zm100,48v32a28,28,0,0,1-27.54,28L213.2,214.73A20,20,0,0,1,194.36,228H181.64a20,20,0,0,1-18.84-13.27l-1-2.73H110.17l-1,2.73A20,20,0,0,1,90.36,228H77.64A20,20,0,0,1,58.8,214.73L46.5,180.28A91.63,91.63,0,0,1,25.75,137.8,11.91,11.91,0,0,0,24,144a12,12,0,0,1-24,0,36.07,36.07,0,0,1,24.56-34.13A92.13,92.13,0,0,1,116,28H220a12,12,0,0,1,0,24H210a92,92,0,0,1,22.48,31.45l.42,1A28.05,28.05,0,0,1,256,112Zm-24,0a4,4,0,0,0-4-4h-3.66a12,12,0,0,1-11.45-8.41A68,68,0,0,0,148,52H116A68,68,0,0,0,65.86,165.94,11.85,11.85,0,0,1,68.31,170l12.15,34h7.08l2.87-8a12,12,0,0,1,11.3-8h68.58a12,12,0,0,1,11.3,8l2.87,8h7.08l17.16-48a12,12,0,0,1,11.3-8h8a4,4,0,0,0,4-4Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,112v32a16,16,0,0,1-16,16h-8l-18.1,50.69a8,8,0,0,1-7.54,5.31H177.64a8,8,0,0,1-7.54-5.31L166.29,200H97.71L93.9,210.69A8,8,0,0,1,86.36,216H73.64a8,8,0,0,1-7.54-5.31L53,174a79.7,79.7,0,0,1-21-54h0a80,80,0,0,1,80-80h32a80,80,0,0,1,73.44,48.22,82.22,82.22,0,0,1,2.9,7.78H224A16,16,0,0,1,240,112Z",opacity:"0.2"}),r.createElement("path",{d:"M192,116a12,12,0,1,1-12-12A12,12,0,0,1,192,116ZM152,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm96,48v32a24,24,0,0,1-24,24h-2.36l-16.21,45.38A16,16,0,0,1,190.36,224H177.64a16,16,0,0,1-15.07-10.62L160.65,208h-57.3l-1.92,5.38A16,16,0,0,1,86.36,224H73.64a16,16,0,0,1-15.07-10.62L46,178.22a87.69,87.69,0,0,1-21.44-48.38A16,16,0,0,0,16,144a8,8,0,0,1-16,0,32,32,0,0,1,24.28-31A88.12,88.12,0,0,1,112,32H216a8,8,0,0,1,0,16H194.61a87.93,87.93,0,0,1,30.17,37c.43,1,.85,2,1.25,3A24,24,0,0,1,248,112Zm-16,0a8,8,0,0,0-8-8h-3.66a8,8,0,0,1-7.64-5.6A71.9,71.9,0,0,0,144,48H112A72,72,0,0,0,58.91,168.64a8,8,0,0,1,1.64,2.71L73.64,208H86.36l3.82-10.69A8,8,0,0,1,97.71,192h68.58a8,8,0,0,1,7.53,5.31L177.64,208h12.72l18.11-50.69A8,8,0,0,1,216,152h8a8,8,0,0,0,8-8Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226,88.08c-.4-1-.82-2-1.25-3a87.93,87.93,0,0,0-30.17-37H216a8,8,0,0,0,0-16H112a88.12,88.12,0,0,0-87.72,81A32,32,0,0,0,0,144a8,8,0,0,0,16,0,16,16,0,0,1,8.57-14.16A87.69,87.69,0,0,0,46,178.22l12.56,35.16A16,16,0,0,0,73.64,224H86.36a16,16,0,0,0,15.07-10.62l1.92-5.38h57.3l1.92,5.38A16,16,0,0,0,177.64,224h12.72a16,16,0,0,0,15.07-10.62L221.64,168H224a24,24,0,0,0,24-24V112A24,24,0,0,0,226,88.08ZM152,72H112a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm28,56a12,12,0,1,1,12-12A12,12,0,0,1,180,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M190,116a10,10,0,1,1-10-10A10,10,0,0,1,190,116ZM152,66H112a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Zm94,46v32a22,22,0,0,1-22,22h-3.77l-16.68,46.71A14,14,0,0,1,190.36,222H177.64a14,14,0,0,1-13.19-9.29L162.06,206H101.94l-2.39,6.71A14,14,0,0,1,86.36,222H73.64a14,14,0,0,1-13.19-9.29L47.76,177.18a85.72,85.72,0,0,1-21.47-50.24A18,18,0,0,0,14,144a6,6,0,0,1-12,0,30,30,0,0,1,24.19-29.43A86.1,86.1,0,0,1,112,34H216a6,6,0,0,1,0,12H187.82a85.92,85.92,0,0,1,35.12,39.83c.6,1.38,1.16,2.77,1.68,4.18A22,22,0,0,1,246,112Zm-12,0a10,10,0,0,0-10-10h-3.66a6,6,0,0,1-5.73-4.2,71.4,71.4,0,0,0-2.68-7.19A74,74,0,0,0,144,46H112A74,74,0,0,0,57.44,170a5.81,5.81,0,0,1,1.22,2l13.09,36.64A2,2,0,0,0,73.64,210H86.36a2,2,0,0,0,1.89-1.33L92.06,198a6,6,0,0,1,5.65-4h68.58a6,6,0,0,1,5.65,4l3.81,10.69a2,2,0,0,0,1.89,1.33h12.72a2,2,0,0,0,1.89-1.33L210.35,158a6,6,0,0,1,5.65-4h8a10,10,0,0,0,10-10Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,116a12,12,0,1,1-12-12A12,12,0,0,1,192,116ZM152,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm96,48v32a24,24,0,0,1-24,24h-2.36l-16.21,45.38A16,16,0,0,1,190.36,224H177.64a16,16,0,0,1-15.07-10.62L160.65,208h-57.3l-1.92,5.38A16,16,0,0,1,86.36,224H73.64a16,16,0,0,1-15.07-10.62L46,178.22a87.69,87.69,0,0,1-21.44-48.38A16,16,0,0,0,16,144a8,8,0,0,1-16,0,32,32,0,0,1,24.28-31A88.12,88.12,0,0,1,112,32H216a8,8,0,0,1,0,16H194.61a87.93,87.93,0,0,1,30.17,37c.43,1,.85,2,1.25,3A24,24,0,0,1,248,112Zm-16,0a8,8,0,0,0-8-8h-3.66a8,8,0,0,1-7.64-5.6A71.9,71.9,0,0,0,144,48H112A72,72,0,0,0,58.91,168.64a8,8,0,0,1,1.64,2.71L73.64,208H86.36l3.82-10.69A8,8,0,0,1,97.71,192h68.58a8,8,0,0,1,7.53,5.31L177.64,208h12.72l18.11-50.69A8,8,0,0,1,216,152h8a8,8,0,0,0,8-8Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M188,116a8,8,0,1,1-8-8A8,8,0,0,1,188,116ZM152,68H112a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8Zm92,44v32a20,20,0,0,1-20,20h-5.18l-17.16,48a12,12,0,0,1-11.3,8H177.64a12,12,0,0,1-11.3-8l-2.87-8H100.53l-2.87,8a12,12,0,0,1-11.3,8H73.64a12,12,0,0,1-11.3-8l-12.82-35.9a83.73,83.73,0,0,1-21.4-51.76A20,20,0,0,0,12,144a4,4,0,0,1-8,0,28,28,0,0,1,24.09-27.72A84.1,84.1,0,0,1,112,36H216a4,4,0,0,1,0,8H179.8a84,84,0,0,1,41.31,42.63c.76,1.76,1.47,3.55,2.11,5.37H224A20,20,0,0,1,244,112Zm-8,0a12,12,0,0,0-12-12h-3.66a4,4,0,0,1-3.82-2.8,74.45,74.45,0,0,0-2.75-7.39A76,76,0,0,0,144,44H112A76,76,0,0,0,56,171.34a4,4,0,0,1,.82,1.36l13.09,36.65A4,4,0,0,0,73.64,212H86.36a4,4,0,0,0,3.77-2.65L94,198.65A4,4,0,0,1,97.71,196h68.58a4,4,0,0,1,3.76,2.65l3.82,10.7a4,4,0,0,0,3.77,2.65h12.72a4,4,0,0,0,3.77-2.65l18.1-50.7A4,4,0,0,1,216,156h8a12,12,0,0,0,12-12Z"}))]]),_T=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),OT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H140v28a12,12,0,0,1-24,0V140H88a12,12,0,0,1,0-24h28V88a12,12,0,0,1,24,0v28h28A12,12,0,0,1,180,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24Zm40,112H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H134v34a6,6,0,0,1-12,0V134H88a6,6,0,0,1,0-12h34V88a6,6,0,0,1,12,0v34h34A6,6,0,0,1,174,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H132v36a4,4,0,0,1-8,0V132H88a4,4,0,0,1,0-8h36V88a4,4,0,0,1,8,0v36h36A4,4,0,0,1,172,128Z"}))]]),ZT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z",opacity:"0.2"}),r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"}))]]),VT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144.49,136.49l-40,40a12,12,0,0,1-17-17L107,140H24a12,12,0,0,1,0-24h83L87.51,96.49a12,12,0,0,1,17-17l40,40A12,12,0,0,1,144.49,136.49ZM200,28H136a12,12,0,0,0,0,24h52V204H136a12,12,0,0,0,0,24h64a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,40V216H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40Z",opacity:"0.2"}),r.createElement("path",{d:"M141.66,133.66l-40,40a8,8,0,0,1-11.32-11.32L116.69,136H24a8,8,0,0,1,0-16h92.69L90.34,93.66a8,8,0,0,1,11.32-11.32l40,40A8,8,0,0,1,141.66,133.66ZM200,32H136a8,8,0,0,0,0,16h56V208H136a8,8,0,0,0,0,16h64a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M141.66,133.66l-40,40A8,8,0,0,1,88,168V136H24a8,8,0,0,1,0-16H88V88a8,8,0,0,1,13.66-5.66l40,40A8,8,0,0,1,141.66,133.66ZM200,32H136a8,8,0,0,0,0,16h56V208H136a8,8,0,0,0,0,16h64a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140.24,132.24l-40,40a6,6,0,0,1-8.48-8.48L121.51,134H24a6,6,0,0,1,0-12h97.51L91.76,92.24a6,6,0,0,1,8.48-8.48l40,40A6,6,0,0,1,140.24,132.24ZM200,34H136a6,6,0,0,0,0,12h58V210H136a6,6,0,0,0,0,12h64a6,6,0,0,0,6-6V40A6,6,0,0,0,200,34Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M141.66,133.66l-40,40a8,8,0,0,1-11.32-11.32L116.69,136H24a8,8,0,0,1,0-16h92.69L90.34,93.66a8,8,0,0,1,11.32-11.32l40,40A8,8,0,0,1,141.66,133.66ZM200,32H136a8,8,0,0,0,0,16h56V208H136a8,8,0,0,0,0,16h64a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M138.83,130.83l-40,40a4,4,0,0,1-5.66-5.66L126.34,132H24a4,4,0,0,1,0-8H126.34L93.17,90.83a4,4,0,0,1,5.66-5.66l40,40A4,4,0,0,1,138.83,130.83ZM200,36H136a4,4,0,0,0,0,8h60V212H136a4,4,0,0,0,0,8h64a4,4,0,0,0,4-4V40A4,4,0,0,0,200,36Z"}))]]),zT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z",opacity:"0.2"}),r.createElement("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z"}))]]),BT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z",opacity:"0.2"}),r.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z"}))]]),UT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),r.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z"}),r.createElement("path",{d:"M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z"}),r.createElement("path",{d:"M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z"}))]]),WT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),GT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,96a12,12,0,0,0-.44-3.3L221.2,42.51A20.08,20.08,0,0,0,202,28H54A20.08,20.08,0,0,0,34.8,42.51L20.46,92.7A12,12,0,0,0,20,96h0v16a43.94,43.94,0,0,0,16,33.92V216a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V145.92A43.94,43.94,0,0,0,236,112V96ZM57.05,52H199l9.14,32H47.91Zm91,56v4a20,20,0,0,1-40,0v-4ZM53,128.71A20,20,0,0,1,44,112v-4H84v4a20,20,0,0,1-20,20,19.76,19.76,0,0,1-9.07-2.2A11.54,11.54,0,0,0,53,128.71ZM196,204H60V155.81c1.32.12,2.65.19,4,.19a43.86,43.86,0,0,0,32-13.85,43.89,43.89,0,0,0,64,0A43.86,43.86,0,0,0,192,156c1.35,0,2.68-.07,4-.19Zm16-92a20,20,0,0,1-9,16.71,11.66,11.66,0,0,0-1.88,1.09A20,20,0,0,1,172,112v-4h40Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,96v16a32,32,0,0,1-64,0V96H96v16a32,32,0,0,1-64,0V96L46.34,45.8A8,8,0,0,1,54,40H202a8,8,0,0,1,7.69,5.8Z",opacity:"0.2"}),r.createElement("path",{d:"M231.69,93.81,217.35,43.6A16.07,16.07,0,0,0,202,32H54A16.07,16.07,0,0,0,38.65,43.6L24.31,93.81A7.94,7.94,0,0,0,24,96v16a40,40,0,0,0,16,32v72a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V144a40,40,0,0,0,16-32V96A7.94,7.94,0,0,0,231.69,93.81ZM54,48H202l11.42,40H42.61Zm98,56v8a24,24,0,0,1-48,0v-8ZM51.06,132.2A24,24,0,0,1,40,112v-8H88v8a24,24,0,0,1-35.12,21.26A7.88,7.88,0,0,0,51.06,132.2ZM200,208H56V151.2a40.57,40.57,0,0,0,8,.8,40,40,0,0,0,32-16,40,40,0,0,0,64,0,40,40,0,0,0,32,16,40.57,40.57,0,0,0,8-.8Zm16-96a24,24,0,0,1-11.07,20.2,8.08,8.08,0,0,0-1.8,1.05A24,24,0,0,1,168,112v-8h48Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.69,93.81,217.35,43.6A16.07,16.07,0,0,0,202,32H54A16.07,16.07,0,0,0,38.65,43.6L24.31,93.81A7.94,7.94,0,0,0,24,96v16a40,40,0,0,0,16,32v72a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V144a40,40,0,0,0,16-32V96A7.94,7.94,0,0,0,231.69,93.81ZM88,112a24,24,0,0,1-35.12,21.26,7.88,7.88,0,0,0-1.82-1.06A24,24,0,0,1,40,112v-8H88Zm64,0a24,24,0,0,1-48,0v-8h48Zm64,0a24,24,0,0,1-11.07,20.2,8.08,8.08,0,0,0-1.8,1.05A24,24,0,0,1,168,112v-8h48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M26.22,94.41A6,6,0,0,0,26,96v16A38,38,0,0,0,42,143V216a6,6,0,0,0,6,6H208a6,6,0,0,0,6-6V143A38,38,0,0,0,230,112V96a5.91,5.91,0,0,0-.23-1.64L215.43,44.15A14.07,14.07,0,0,0,202,34H54A14.07,14.07,0,0,0,40.57,44.15Zm25.89-47A2,2,0,0,1,54,46H202a2,2,0,0,1,1.92,1.45L216.05,90H40ZM102,102h52v10a26,26,0,0,1-52,0Zm-64,0H90v10a26,26,0,0,1-38.18,23,6,6,0,0,0-1.65-1A26,26,0,0,1,38,112ZM202,210H54V148.66a38,38,0,0,0,42-16.21,37.95,37.95,0,0,0,64,0,38,38,0,0,0,42,16.21Zm3.83-76a6,6,0,0,0-1.65,1A26,26,0,0,1,166,112V102h52v10A26,26,0,0,1,205.83,134Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,96a7.89,7.89,0,0,0-.3-2.2L217.35,43.6A16.07,16.07,0,0,0,202,32H54A16.07,16.07,0,0,0,38.65,43.6L24.31,93.8A7.89,7.89,0,0,0,24,96h0v16a40,40,0,0,0,16,32v72a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V144a40,40,0,0,0,16-32V96ZM54,48H202l11.42,40H42.61Zm50,56h48v8a24,24,0,0,1-48,0Zm-16,0v8a24,24,0,0,1-35.12,21.26,7.88,7.88,0,0,0-1.82-1.06A24,24,0,0,1,40,112v-8ZM200,208H56V151.2a40.57,40.57,0,0,0,8,.8,40,40,0,0,0,32-16,40,40,0,0,0,64,0,40,40,0,0,0,32,16,40.57,40.57,0,0,0,8-.8Zm4.93-75.8a8.08,8.08,0,0,0-1.8,1.05A24,24,0,0,1,168,112v-8h48v8A24,24,0,0,1,204.93,132.2Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M28.15,95A3.81,3.81,0,0,0,28,96v16a36,36,0,0,0,16,29.92V216a4,4,0,0,0,4,4H208a4,4,0,0,0,4-4V141.92A36,36,0,0,0,228,112V96a3.81,3.81,0,0,0-.17-1.08L213.5,44.7A12,12,0,0,0,202,36H54A12,12,0,0,0,42.5,44.7Zm22-48.08A4,4,0,0,1,54,44H202a4,4,0,0,1,3.84,2.9L218.7,92H37.3ZM100,100h56v12a28,28,0,0,1-56,0ZM36,112V100H92v12a28,28,0,0,1-41.37,24.59,4,4,0,0,0-1.31-.76A28,28,0,0,1,36,112ZM204,212H52V145.94a36,36,0,0,0,44-17.48,36,36,0,0,0,64,0,36,36,0,0,0,44,17.48Zm2.68-76.17a3.94,3.94,0,0,0-1.3.76A28,28,0,0,1,164,112V100h56v12A28,28,0,0,1,206.68,135.83Z"}))]]),KT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),r.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),YT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),qT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56a8,8,0,0,1-8,8h-8V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,56ZM88,32h80a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM82,24a6,6,0,0,1,6-6h80a6,6,0,0,1,0,12H88A6,6,0,0,1,82,24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM84,24a4,4,0,0,1,4-4h80a4,4,0,0,1,0,8H88A4,4,0,0,1,84,24Z"}))]]),XT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0ZM96.49,80.49,116,61v83a12,12,0,0,0,24,0V61l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM88,80h32v64a8,8,0,0,0,16,0V80h32a8,8,0,0,0,5.66-13.66l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,88,80Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0ZM92.24,76.24,122,46.49V144a6,6,0,0,0,12,0V46.49l29.76,29.75a6,6,0,0,0,8.48-8.48l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0ZM90.83,74.83,124,41.66V144a4,4,0,0,0,8,0V41.66l33.17,33.17a4,4,0,1,0,5.66-5.66l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66Z"}))]]),QT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),JT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),eH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]),tH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),nH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),rH=r.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Be=r.forwardRef((e,t)=>{const{alt:n,color:s,size:i,weight:c,mirrored:u,children:f,weights:h,...m}=e,{color:g="currentColor",size:v,weight:y="regular",mirrored:w=!1,...E}=r.useContext(rH);return r.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:i??v,height:i??v,fill:s??g,viewBox:"0 0 256 256",transform:u||w?"scale(-1, 1)":void 0,...E,...m},!!n&&r.createElement("title",null,n),f,h.get(c??y))});Be.displayName="IconBase";const B5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:YL}));B5.displayName="ApertureIcon";const aH=B5,U5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:qL}));U5.displayName="ArchiveIcon";const W5=U5,G5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:XL}));G5.displayName="ArrowCircleUpIcon";const K5=G5,Y5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:QL}));Y5.displayName="ArrowClockwiseIcon";const Gm=Y5,q5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:JL}));q5.displayName="ArrowCounterClockwiseIcon";const o1=q5,X5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:eT}));X5.displayName="ArrowLineUpIcon";const sH=X5,Q5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:tT}));Q5.displayName="ArrowRightIcon";const sg=Q5,J5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:nT}));J5.displayName="ArrowSquareOutIcon";const W1=J5,ex=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:rT}));ex.displayName="ArrowUpIcon";const oH=ex,tx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:aT}));tx.displayName="ArrowsClockwiseIcon";const lH=tx,nx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:sT}));nx.displayName="ArrowsDownUpIcon";const iH=nx,rx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:oT}));rx.displayName="ArrowsLeftRightIcon";const cH=rx,ax=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:lT}));ax.displayName="BellIcon";const og=ax,sx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:iT}));sx.displayName="BookmarkSimpleIcon";const G1=sx,ox=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:cT}));ox.displayName="BroomIcon";const uH=ox,lx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:uT}));lx.displayName="CaretDownIcon";const ai=lx,ix=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:dT}));ix.displayName="CaretLeftIcon";const wi=ix,cx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:fT}));cx.displayName="CaretRightIcon";const K1=cx,ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:hT}));ux.displayName="CheckIcon";const _a=ux,dx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:mT}));dx.displayName="CheckCircleIcon";const dH=dx,fx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:pT}));fx.displayName="CircleIcon";const fH=fx,hx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:gT}));hx.displayName="ClockCounterClockwiseIcon";const hH=hx,mx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:vT}));mx.displayName="CopyIcon";const mH=mx,px=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:yT}));px.displayName="CopySimpleIcon";const pH=px,gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:xT}));gx.displayName="DatabaseIcon";const gH=gx,vx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:wT}));vx.displayName="DotsThreeIcon";const vH=vx,yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:bT}));yx.displayName="DownloadSimpleIcon";const xx=yx,wx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ET}));wx.displayName="FilmSlateIcon";const Km=wx,bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:CT}));bx.displayName="FolderSimpleIcon";const yH=bx,Ex=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ST}));Ex.displayName="FrameCornersIcon";const xH=Ex,Cx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:jT}));Cx.displayName="GearSixIcon";const wH=Cx,Sx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:kT}));Sx.displayName="HouseIcon";const bH=Sx,jx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:NT}));jx.displayName="IdentificationBadgeIcon";const Ym=jx,kx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:AT}));kx.displayName="ImageSquareIcon";const Wa=kx,Nx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:MT}));Nx.displayName="InfoIcon";const qm=Nx,Ax=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:RT}));Ax.displayName="KeyIcon";const Mx=Ax,Rx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:PT}));Rx.displayName="LightningIcon";const l1=Rx,Px=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:LT}));Px.displayName="MagnifyingGlassIcon";const Tc=Px,Lx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:TT}));Lx.displayName="MountainsIcon";const EH=Lx,Tx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:HT}));Tx.displayName="PackageIcon";const Xm=Tx,Hx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:DT}));Hx.displayName="PaintBrushBroadIcon";const CH=Hx,Dx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:$T}));Dx.displayName="PaletteIcon";const SH=Dx,$x=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:FT}));$x.displayName="PencilLineIcon";const lg=$x,Fx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:IT}));Fx.displayName="PiggyBankIcon";const jH=Fx,Ix=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:_T}));Ix.displayName="PlusIcon";const tr=Ix,_x=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:OT}));_x.displayName="PlusCircleIcon";const kH=_x,Ox=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ZT}));Ox.displayName="SidebarSimpleIcon";const NH=Ox,Zx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:VT}));Zx.displayName="SignInIcon";const AH=Zx,Vx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:zT}));Vx.displayName="SlidersHorizontalIcon";const zx=Vx,Bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:BT}));Bx.displayName="SparkleIcon";const MH=Bx,Ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:UT}));Ux.displayName="StackIcon";const hh=Ux,Wx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:WT}));Wx.displayName="StarIcon";const mh=Wx,Gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:GT}));Gx.displayName="StorefrontIcon";const RH=Gx,Kx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:KT}));Kx.displayName="SunIcon";const PH=Kx,Yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:YT}));Yx.displayName="TrashIcon";const qx=Yx,Xx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:qT}));Xx.displayName="TrashSimpleIcon";const Y1=Xx,Qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:XT}));Qx.displayName="UploadSimpleIcon";const Jx=Qx,ew=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:QT}));ew.displayName="UserIcon";const LH=ew,tw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:JT}));tw.displayName="WarningIcon";const nw=tw,rw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:eH}));rw.displayName="WarningCircleIcon";const nu=rw,aw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:tH}));aw.displayName="XIcon";const Mn=aw,sw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:nH}));sw.displayName="XCircleIcon";const ow=sw,lw=r.createContext({push:()=>{}}),mr=()=>r.useContext(lw),ig=4;function TH({children:e}){const[t,n]=r.useState([]),s=r.useRef(1),i=r.useCallback(u=>n(f=>f.filter(h=>h.id!==u)),[]),c=r.useCallback(u=>{const f=s.current++;n(h=>{const m=[...h,{...u,id:f}];if(m.length<=ig)return m;const g=[...m];for(;g.length>ig;){const v=g.findIndex(y=>{var w;return y.kind!=="error"&&!y.action&&!((w=y.actions)!=null&&w.length)});g.splice(v===-1?0:v,1)}return g}),window.setTimeout(()=>i(f),u.kind==="error"?9e3:5e3)},[i]);return o.jsxs(lw.Provider,{value:{push:c},children:[e,o.jsx("div",{className:"sc-toasts",role:"status","aria-live":"polite",children:t.map(u=>{var f;return o.jsxs("div",{className:"sc-toast",children:[u.kind==="success"?o.jsx(dH,{className:"sc-toast-ok",size:17,weight:"fill"}):o.jsx(nu,{className:"sc-toast-err",size:17,weight:"fill"}),o.jsxs("div",{style:{minWidth:0,flex:1},children:[o.jsx("b",{children:u.title}),u.detail&&o.jsx("small",{children:u.detail.slice(0,140)}),((f=u.actions)!=null&&f.length?u.actions:u.action?[u.action]:[]).slice(0,2).map(h=>o.jsx("button",{type:"button",className:"sc-toast-act",onClick:()=>{h.onClick(),i(u.id)},children:h.label},h.label))]}),o.jsx("button",{type:"button",className:"sc-toast-x",onClick:()=>i(u.id),"aria-label":"Dismiss",children:o.jsx(Mn,{size:13})})]},u.id)})})]})}async function Re(e,t,n){const s=await fetch(t,{method:e,headers:n!==void 0?{"content-type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0});if(!s.ok){let i=`HTTP ${s.status}`;try{const c=await s.json();i=c.error??i,c.details&&(i+=`: ${c.details.join("; ")}`)}catch{}throw Object.assign(new Error(i),{status:s.status,method:e,url:t})}return s.json()}const HH=(e,t,n)=>Re("DELETE",`/api/brands/${e}/${t}/${n}`),DH=(e,t)=>HH(e,"products",t);async function $H(e,t,n={}){const s=new FormData;n.role&&s.append("role",n.role),n.background&&s.append("background",n.background),s.append("file",t);const i=await fetch(`/api/brands/${e}/logos`,{method:"POST",body:s});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`HTTP ${i.status}`);return i.json()}const FH=e=>`/api/brands/${e}/export`;async function IH(e,t,n,s){const i=new FormData;i.append("file",n);const c=await fetch(`/api/brands/${e}/products/${t}/shots`,{method:"POST",body:i});if(!c.ok)throw new Error((await c.json().catch(()=>({}))).error??`HTTP ${c.status}`);return c.json()}async function iw(e){const t=new FormData;t.append("file",e);const n=await fetch("/api/images",{method:"POST",body:t});if(!n.ok)throw new Error((await n.json().catch(()=>({}))).error??`HTTP ${n.status}`);return(await n.json()).hash}function _H(e,t){try{fetch(`/api/brands/${e}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({brand:t}),keepalive:!0})}catch{}}const rn=e=>`/api/images/${e}`,_n=e=>e!=null&&e.startsWith("asset:")?rn(e.slice(6)):null;async function OH(e,t,n){const s=await fetch("/api/export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({imageHash:e,presets:t,baseName:n})});if(!s.ok)throw new Error(`export failed: HTTP ${s.status}`);const i=await s.blob(),c=document.createElement("a");c.href=URL.createObjectURL(i),c.download=`${n||"scenri-export"}.zip`,c.click(),URL.revokeObjectURL(c.href)}function cw(e){return e.every(t=>t.kind==="root")}let uw=new Map;function ZH(e){const t=new Map;for(const n of e)for(const s of n.legacyNames??[])s!==n.name&&t.set(s,n.name);uw=t}function Cn(e){var s;const t=(s=/^\[([^\]]+)\]/.exec(e.prompt))==null?void 0:s[1];return t?uw.get(t)??t:e.prompt.startsWith("Remove all overlaid marketing text")||e.prompt.startsWith("Remove ALL text")?"Text lift":e.prompt.trim().split(/\s+/).slice(0,6).join(" ")||(e.kind==="edit"?"Edit":"Generation")}const Ce={brands:()=>Re("GET","/api/brands"),createBrand:e=>Re("POST","/api/brands",{brand:e}),brandFromUrl:e=>Re("POST","/api/brands/from-url",{url:e}),updateBrand:(e,t)=>Re("PUT",`/api/brands/${e}`,{brand:t}),deleteBrand:e=>Re("DELETE",`/api/brands/${e}`),brandRules:e=>Re("GET",`/api/brands/${e}/directives`),refreshBrandFromUrl:(e,t)=>Re("POST",`/api/brands/${e}/refresh-from-url`,t?{url:t}:{}),updateLogo:(e,t,n)=>Re("PATCH",`/api/brands/${e}/logos/${t}`,n),deleteLogo:(e,t)=>Re("DELETE",`/api/brands/${e}/logos/${t}`),projects:e=>Re("GET",`/api/projects?brandId=${encodeURIComponent(e)}`),createProject:(e,t)=>Re("POST","/api/projects",{brandId:e,name:t}),tree:e=>Re("GET",`/api/projects/${e}/tree`),activity:e=>Re("GET",`/api/brands/${e}/activity`),workspace:e=>Re("GET",`/api/brands/${e}/workspace`),sets:e=>Re("GET",`/api/brands/${e}/sets`),createSet:(e,t)=>Re("POST",`/api/brands/${e}/sets`,{name:t}),renameSet:(e,t)=>Re("PATCH",`/api/sets/${e}`,{name:t}),deleteSet:e=>Re("DELETE",`/api/sets/${e}`),addToSet:(e,t)=>Re("POST",`/api/sets/${e}/nodes`,{nodeIds:t}),removeFromSet:(e,t)=>Re("DELETE",`/api/sets/${e}/nodes/${t}`),engines:()=>Re("GET","/api/engines"),codexStatus:()=>Re("GET","/api/engines/codex/status"),installCodex:()=>Re("POST","/api/engines/codex/install"),loginCodex:()=>Re("POST","/api/engines/codex/login"),setCap:(e,t)=>Re("PUT","/api/caps",{engineId:e,capUsd:t}),addNode:e=>Re("POST","/api/nodes",e),cancelNode:e=>Re("POST",`/api/nodes/${e}/cancel`),scenes:()=>Re("GET","/api/scenes"),presenters:()=>Re("GET","/api/presenters"),presenterFrames:e=>Re("GET",`/api/presenter-previews/${e}`),demoProducts:()=>Re("GET","/api/demo-products"),demoProductFrames:e=>Re("GET",`/api/demo-product-previews/${e}`),showcase:()=>Re("GET","/api/showcase"),exportPresets:()=>Re("GET","/api/export/presets"),previewBrief:(e,t,n)=>Re("POST","/api/brief/preview",{brief:e,engineId:t,brandId:n}),keep:(e,t)=>Re("POST",`/api/nodes/${e}/keep`,{kept:t}),archiveNode:(e,t)=>Re("POST",`/api/nodes/${e}/archive`,{archived:t}),deleteNode:e=>Re("DELETE",`/api/nodes/${e}`),deleteNodesBatch:e=>Re("POST","/api/nodes/delete-batch",{nodeIds:e}),diff:(e,t)=>Re("POST","/api/diff",{imageA:e,imageB:t}),settings:()=>Re("GET","/api/settings"),saveSettings:e=>Re("PUT","/api/settings",e),costs:()=>Re("GET","/api/costs/summary"),home:()=>Re("GET","/api/home"),reveal:()=>Re("POST","/api/system/reveal"),version:()=>Re("GET","/api/version"),updateStatus:()=>Re("GET","/api/update/status"),updateCheck:()=>Re("POST","/api/update/check"),updateApply:()=>Re("POST","/api/update/apply"),updateRestart:()=>Re("POST","/api/update/restart"),releaseNotes:()=>Re("GET","/api/release/notes"),releaseSeen:e=>Re("POST","/api/release/seen",{version:e}),sceneFrames:e=>Re("GET",`/api/scene-previews/${e}`),deleteData:e=>Re("DELETE",`/api/data?scope=${e}`),productsLibrary:e=>Re("GET",`/api/brands/${e}/products-library`),catalogImport:(e,t)=>Re("POST",`/api/brands/${e}/catalog/import`,{url:t}),catalogJob:(e,t)=>Re("GET",`/api/brands/${e}/catalog/jobs/${t}`),catalogJobs:e=>Re("GET",`/api/brands/${e}/catalog/jobs`),cancelCatalogJob:(e,t)=>Re("POST",`/api/brands/${e}/catalog/jobs/${t}/cancel`),deleteCatalogProduct:(e,t)=>Re("DELETE",`/api/brands/${e}/catalog/products/${t}`),updateProduct:(e,t,n)=>Re("PATCH",`/api/brands/${e}/products/${t}`,n),updateCatalogProduct:(e,t,n)=>Re("PATCH",`/api/brands/${e}/catalog/products/${t}`,n),setProductShots:(e,t,n)=>Re("PUT",`/api/brands/${e}/products/${t}/shots`,{files:n}),assetBuildCapabilities:()=>Re("GET","/api/asset-builds/capabilities"),startAssetBuild:(e,t)=>Re("POST",`/api/brands/${e}/asset-builds`,t),assetBuild:(e,t)=>Re("GET",`/api/brands/${e}/asset-builds/${t}`),assetBuilds:e=>Re("GET",`/api/brands/${e}/asset-builds`),cancelAssetBuild:(e,t)=>Re("POST",`/api/brands/${e}/asset-builds/${t}/cancel`),deleteAssetBuild:(e,t)=>Re("DELETE",`/api/brands/${e}/asset-builds/${t}`),createProduct:(e,t)=>Re("POST",`/api/brands/${e}/products`,t),createPresenter:(e,t)=>Re("POST",`/api/brands/${e}/presenters`,t),updatePresenter:(e,t,n)=>Re("PATCH",`/api/brands/${e}/presenters/${t}`,n),deletePresenter:(e,t)=>Re("DELETE",`/api/brands/${e}/presenters/${t}`),createScene:(e,t)=>Re("POST",`/api/brands/${e}/scenes`,t),updateScene:(e,t,n)=>Re("PATCH",`/api/brands/${e}/scenes/${t}`,n),deleteScene:(e,t)=>Re("DELETE",`/api/brands/${e}/scenes/${t}`),generateScenePreview:(e,t)=>Re("POST",`/api/brands/${e}/scenes/${t}/preview`)},Ye={root:"/",setup:"/setup",brand:"/:brandSlug",kit:"/:brandSlug/kit",products:"/:brandSlug/products",product:"/:brandSlug/products/:productId",scenes:"/:brandSlug/scenes",scene:"/:brandSlug/scenes/:sceneId",presenters:"/:brandSlug/presenters",presenter:"/:brandSlug/presenters/:presenterId",hub:"/:brandSlug/create",hubShot:"/:brandSlug/create/shots/:shotId",set:"/:brandSlug/sets/:setSlug",setShot:"/:brandSlug/sets/:setSlug/shots/:shotId",legacy:"/b/*",notFound:"*"},Vo=e=>ea(Ye.brand,{brandSlug:e.slug}),VH=e=>ea(Ye.kit,{brandSlug:e.slug}),U0=e=>ea(Ye.products,{brandSlug:e.slug}),Js=(e,t)=>ea(Ye.product,{brandSlug:e.slug,productId:t}),gc=e=>ea(Ye.scenes,{brandSlug:e.slug}),rl=(e,t)=>ea(Ye.scene,{brandSlug:e.slug,sceneId:t}),vc=e=>ea(Ye.presenters,{brandSlug:e.slug}),al=(e,t)=>ea(Ye.presenter,{brandSlug:e.slug,presenterId:t}),ur=e=>ea(Ye.hub,{brandSlug:e.slug}),cc=(e,t)=>ea(Ye.set,{brandSlug:e.slug,setSlug:t.slug}),q1=(e,t,n)=>t?ea(Ye.setShot,{brandSlug:e.slug,setSlug:t.slug,shotId:n}):ea(Ye.hubShot,{brandSlug:e.slug,shotId:n});function zH(e,t=""){const[,,n,...s]=e.split("/");if(!n)return Ye.root;const i=`/${n}${BH(s)}`;return t?i+t:i}function BH(e){const[t,n,s,i]=e;return t==="create"?s&&n==="n"?`/create/shots/${s}`:"/create":t==="s"&&n?i&&s==="n"?`/sets/${n}/shots/${i}`:`/sets/${n}`:t==="brand"?"/kit":t==="p"?"/create":t==="n"&&n?`/create/shots/${n}`:e.length?`/${e.join("/")}`:""}const UH=[[Ye.setup,"Setup"],[Ye.hubShot,"Create"],[Ye.hub,"Create"],[Ye.setShot,"Create"],[Ye.set,"Create"],[Ye.kit,"Brand kit"],[Ye.product,"Products"],[Ye.products,"Products"],[Ye.scene,"Scenes"],[Ye.scenes,"Scenes"],[Ye.presenter,"Presenters"],[Ye.presenters,"Presenters"]];function WH(e){for(const[t,n]of UH)if(Ql(t,e))return`${n} · scenri`;return"scenri studio"}function GH(){const{pathname:e}=mn();r.useEffect(()=>{document.title=WH(e)},[e])}const KH={scenes:[],collections:[],verticals:[],loaded:!1,error:!1};function YH(){const[e,t]=r.useState(KH),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.scenes().then(u=>{ZH(u.scenes),c&&t({scenes:u.scenes,collections:u.collections,verticals:u.verticals,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}const qH={presenters:[],categories:[],styles:[],loaded:!1,error:!1};function XH(){const[e,t]=r.useState(qH),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.presenters().then(u=>{c&&t({presenters:u.presenters,categories:u.categories,styles:u.styles,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}const QH={demoProducts:[],categories:[],loaded:!1,error:!1};function JH(){const[e,t]=r.useState(QH),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.demoProducts().then(u=>{c&&t({demoProducts:u.demoProducts,categories:u.categories,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}const eD={showcase:[],categories:[],loaded:!1,error:!1};function tD(){const[e,t]=r.useState(eD),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.showcase().then(u=>{c&&t({showcase:u.showcase,categories:u.categories,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}function X1(){const{open:e}=gs("settings");return r.useCallback((t="brand")=>e(t),[e])}const cg="codex-cli";function Q1(){const{open:e}=gs("setup");return r.useCallback((t=cg)=>{e(typeof t=="string"?t:cg)},[e])}function ru(e){var t;e.preventDefault(),(t=e.currentTarget)==null||t.focus({preventScroll:!0})}function Qm({failure:e,density:t,onRetry:n,dismiss:s}){const i=X1(),c=Q1(),{remedy:u}=e,f=t==="tile",h=()=>{u&&(u.opens==="setup"?c("codex-cli"):i(u.opens))},m=n&&e.retryable,g=w=>f?`sc-s${w?" sc-s-primary":""}`:`sc-btn ${w?"sc-btn-primary":"sc-btn-ghost"}`,v=!f&&!!e.fix,y=!f&&!!e.raw;return o.jsxs("div",{className:"sc-fail","data-density":t,"data-kind":e.kind,"data-long":e.title.length>90||void 0,role:"alert",children:[o.jsx("span",{className:"sc-fail-ic","aria-hidden":!0,children:o.jsx(nu,{size:f?15:21,weight:"fill"})}),o.jsxs("div",{className:"sc-fail-txt",children:[o.jsx("b",{children:e.title}),v&&o.jsx("small",{children:e.fix})]}),(u||m||s)&&o.jsxs("div",{className:"sc-fail-acts",children:[u&&o.jsx("button",{type:"button",className:g(!0),onClick:h,children:u.label}),m&&o.jsxs("button",{type:"button",className:g(!u),onClick:n,children:[o.jsx(o1,{size:f?12:14})," Try again"]}),s&&o.jsx("button",{type:"button",className:"sc-fail-alt",onClick:s.onClick,children:s.label})]}),y&&o.jsxs("details",{className:"sc-fail-raw",children:[o.jsx("summary",{children:"Details"}),o.jsx("pre",{children:e.raw})]})]})}function Jm({failure:e,action:t,tone:n="error"}){return o.jsx("div",{className:"sc-failrow","data-tone":n,role:n==="error"?"alert":"status",children:o.jsxs("div",{className:"sc-banner","data-tone":n==="error"?"error":void 0,children:[o.jsx("span",{className:"sc-banner-ic",children:n==="error"?o.jsx(nu,{size:16,weight:"fill"}):o.jsx(qm,{size:16,weight:"fill"})}),o.jsxs("span",{className:"sc-banner-txt",children:[o.jsx("b",{children:e.title}),e.fix&&o.jsx("small",{children:e.fix})]}),t]})})}const dw="the engine",nD=[{re:/HTTP 401\b|missing authentication|no auth credentials|invalid api key|unauthorized/i,kind:"auth",title:e=>`${Ra(e)} did not accept your API key.`,fix:"Add or replace the key, then run this again.",remedy:{label:"Add key",opens:"engines"},retryable:!1},{re:/HTTP 403\b|forbidden/i,kind:"auth",title:e=>`${Ra(e)} refused this key.`,fix:"It may not cover the model this shot asked for.",remedy:{label:"Check key",opens:"engines"},retryable:!1},{re:/spend cap for .*would exceed it|spend cap for/i,kind:"budget",title:e=>`This would go past your monthly cap for ${e}.`,fix:"Raise the cap, or wait for the month to roll over.",remedy:{label:"Open budget",opens:"budget"},retryable:!1},{re:/HTTP 402\b|insufficient (credit|funds|balance)|out of credit|billing|payment required/i,kind:"credit",title:e=>`${Ra(e)} is out of credit.`,fix:"Top up with the provider, then run this again.",remedy:{label:"Open engines",opens:"engines"},retryable:!1},{re:/HTTP 429\b|rate.?limit|too many requests/i,kind:"rate",title:e=>`${Ra(e)} is rate limiting this key.`,fix:"Give it a minute, then try again.",retryable:!0},{re:/moderation|content policy|safety system|flagged|violat(es|ion)|blocked by/i,kind:"policy",title:e=>`${Ra(e)} declined this brief.`,fix:"Reword what you asked for and run it again.",retryable:!1},{re:/cannot carry enough reference images/i,kind:"references",title:()=>"",remedy:{label:"Choose engine",opens:"engines"},retryable:!1},{re:/cannot produce the requested aspect ratio|engine returned \d+x\d+ for a \d+x\d+ request/i,kind:"format",title:e=>`${Ra(e)} cannot make this shape.`,fix:"Pick another format, or an engine that can.",remedy:{label:"Choose engine",opens:"engines"},retryable:!1},{re:/HTTP 404\b|model not found|no endpoints found|no allowed providers/i,kind:"model",title:e=>`${Ra(e)} has no model for this shot.`,fix:"Pick another engine in Settings.",remedy:{label:"Choose engine",opens:"engines"},retryable:!1},{re:/failed to spawn codex|codex.*enoent|command not found/i,kind:"setup",title:()=>"Codex is not installed on this machine.",fix:"Run setup once and this works from then on.",remedy:{label:"Set up Codex",opens:"setup"},retryable:!1},{re:/\brun aborted\b/i,kind:"cancelled",title:()=>"You stopped this shot.",fix:"The brief is kept. Run it again whenever.",retryable:!0},{re:/timed out|\btimeout\b|ETIMEDOUT/i,kind:"timeout",title:e=>`${Ra(e)} took too long to answer.`,fix:"Try again. A long brief sometimes needs a second run.",retryable:!0},{re:/ENOTFOUND|ECONNREFUSED|ECONNRESET|EAI_AGAIN|fetch failed|network error/i,kind:"network",title:e=>`Could not reach ${e}.`,fix:"Check your connection, then try again.",retryable:!0},{re:/interrupted\W+server restarted/i,kind:"restarted",title:()=>"scenri restarted while this was rendering.",fix:"The shot was lost, not the brief. Run it again.",retryable:!0},{re:/HTTP 5\d\d\b|internal server error|bad gateway|service unavailable|overloaded|upstream/i,kind:"server",title:e=>`${Ra(e)} had a problem on its end.`,fix:"Nothing wrong with your brief. Try again shortly.",retryable:!0},{re:/produced no images|returned no image|no images returned|finished but produced no/i,kind:"empty",title:e=>`${Ra(e)} finished without making a picture.`,fix:"Run it again. This usually clears on a second try.",retryable:!0}];function Ra(e){return e===dw?"The engine":e}function oo(e,t){const n=(e??"").trim(),s=(t??"").replace(/\s*\(BYOK\)\s*$/i,"").trim()||dw;if(!n)return{kind:"unknown",title:"This shot did not finish.",raw:"",retryable:!0};for(const i of nD){if(!i.re.test(n))continue;const c=i.title(s)||rD(n);return{kind:i.kind,title:c,fix:i.fix,raw:n,remedy:i.remedy,retryable:i.retryable}}return{kind:"unknown",title:"This shot did not finish.",raw:n,retryable:!0}}function fw(){return{kind:"cancelled",title:"You stopped this shot.",fix:"The brief is kept. Run it again whenever.",raw:"",retryable:!0}}function dn(e,t,n){const s=e instanceof Error?e.message:typeof e=="string"?e:String((e==null?void 0:e.message)??e),i=oo(s,n),c=i.kind==="unknown"?i.raw||void 0:[i.title,i.fix].filter(Boolean).join(" ");return{kind:"error",title:t,detail:c}}function rD(e){const t=e.trim();if(!t)return t;const n=t[0].toUpperCase()+t.slice(1);return/[.!?]$/.test(n)?n:`${n}.`}function hw(e){return e?e.phase==="ready"?e.blockReason!=="dev"&&e.blockReason!=="unsupervised"&&e.blockReason!=="launcher-too-old":e.canApply:!1}const aD=360*60*1e3,mw="scenri:update-dismissed";function sD(){try{return sessionStorage.getItem(mw)}catch{return null}}function oD(e){try{sessionStorage.setItem(mw,e)}catch{}}const pw=r.createContext(null);function ep(){const e=r.useContext(pw);if(!e)throw new Error("useUpdateCenter must be used inside UpdateCenterProvider");return e}function lD({children:e}){const[t,n]=r.useState(null),[s,i]=r.useState(!1),[c,u]=r.useState(sD),f=r.useRef(void 0);r.useEffect(()=>{let j=!0;const k=async()=>{if(j){if(!document.hidden)try{const M=await Ce.updateStatus();j&&n(M)}catch{}j&&(f.current=window.setTimeout(k,aD))}};k();const A=()=>{document.hidden||!j||(window.clearTimeout(f.current),k())};return document.addEventListener("visibilitychange",A),window.addEventListener("focus",A),()=>{j=!1,window.clearTimeout(f.current),document.removeEventListener("visibilitychange",A),window.removeEventListener("focus",A)}},[]);const h=r.useCallback(async()=>{i(!0);try{n(await Ce.updateCheck())}finally{i(!1)}},[]),m=r.useCallback(()=>{const j=t==null?void 0:t.latest;j&&(oD(j),u(j))},[t]),g=(t==null?void 0:t.latest)!=null&&t.latest===c,[v,y]=r.useState("idle"),[w,E]=r.useState(null),C=j=>new Promise(k=>setTimeout(k,j)),b=r.useCallback(async j=>{y("restarting");try{await Ce.updateRestart()}catch{}const k=Date.now()+3e4;for(;Date.now()<k;){await C(800);try{if((await Ce.version()).version!==j){location.reload();return}}catch{}}y("idle"),E("The restart did not complete. Check the terminal scenri runs in.")},[]),N=r.useCallback(async()=>{if(v!=="idle")return;E(null);const j=t==null?void 0:t.current;try{if((t==null?void 0:t.phase)!=="ready")for(y("applying"),await Ce.updateApply();;){await C(1500);const k=await Ce.updateStatus();if(n(k),k.phase==="ready")break;if(k.phase==="error"){E(k.error??"The update could not be staged."),y("idle");return}}await b(j)}catch(k){E(String((k==null?void 0:k.message)??k)),y("idle")}},[v,t,b]);return o.jsxs(pw.Provider,{value:{status:t,checking:s,checkNow:h,dismissed:g,dismiss:m,apply:N,busy:v,applyError:w},children:[e,v!=="restarting"&&(t==null?void 0:t.available)&&!g&&o.jsx(cD,{}),v==="restarting"&&o.jsx(iD,{version:(t==null?void 0:t.stagedVersion)??(t==null?void 0:t.latest)??null})]})}function iD({version:e}){return o.jsx("div",{className:"sc-upd-overlay",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"sc-upd-overlay-card",children:[o.jsx(K5,{size:22}),o.jsx("b",{children:e?`Updating to scenri ${e}`:"Updating scenri"}),o.jsx("small",{children:"Restarting. This page reconnects by itself."})]})})}function cD(){const{status:e,dismiss:t,apply:n,busy:s,applyError:i}=ep(),c=X1();return e?o.jsxs("div",{className:"sc-upd-float",role:"status",children:[o.jsx("span",{className:"sc-upd-float-dot","aria-hidden":"true"}),o.jsxs("span",{className:"sc-upd-float-txt",children:["A new update is available",i&&o.jsx("small",{children:i})]}),o.jsx("button",{type:"button",className:"sc-upd-float-later",onClick:t,children:"Not now"}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:s!=="idle",onClick:()=>hw(e)?void n():c("about"),children:s==="applying"?"Updating…":"Update"})]}):null}const gw=50;function ss(e){return Date.parse(e.includes("T")?e:`${e.replace(" ","T")}Z`)}function eo(e,t=Date.now()){const n=ss(e);return Number.isNaN(n)?0:Math.max(0,Math.round((t-n)/1e3))}function tp(e,t=Date.now()){const n=eo(e,t);return n<20?"generating":n<60?"still generating":"taking longer than usual"}function uD(e,t=Date.now()){const n=eo(e,t);if(n<60)return`${n}s`;const s=Math.floor(n/60);return s<60?`${s}m`:`${Math.floor(s/60)}h ${s%60}m`}function vw(e,t=Date.now()){const n=eo(e,t);if(n<45)return"just now";if(n<3600)return`${Math.round(n/60)}m ago`;if(n<86400)return`${Math.floor(n/3600)}h ago`;const s=Math.floor(n/86400);return s===1?"Yesterday":`${s}d ago`}function dD(e){if(!e)return 0;if(e.stage==="discovering")return e.discovered?15:8;if(e.stage==="fetching_products"){const t=Math.max(e.discovered,e.fetched,1);return 15+Math.min(45,Math.round(e.fetched/t*45))}if(e.stage==="processing_assets"){const t=Math.max(e.imagesTotal,1);return 60+Math.min(35,Math.round(e.imagesDone/t*35))}return e.stage==="completed"?100:e.stage==="partial"?95:5}function fD(e,t,n=Date.now()){const s=e.setNames.length>0?`${e.setNames.join(", ")} · `:"",i=e.status==="running"?`${s}${tp(e.createdAt,n)}`:e.status==="error"?`${s}${e.error??"failed"}`:e.status==="cancelled"?`${s}cancelled`:`${s}${e.images.length} image${e.images.length===1?"":"s"}`;return{id:`node:${e.id}`,kind:e.kind==="edit"?"edit":"generation",state:e.status,title:e.kind==="edit"?`Edit · ${Cn(e)}`:Cn(e),subtitle:i,thumb:e.images[0]??null,percent:null,startedAt:e.createdAt,href:q1(t,null,e.id)}}function hD(e,t){const n=e.stage==="completed"?"done":e.stage==="partial"?"partial":e.stage==="failed"?"error":"running";let s=e.url;try{s=new URL(e.url).hostname.replace(/^www\./,"")}catch{}const i=e.discovered?`${e.upserted} of ${e.discovered} products`:`${e.upserted} products`;return{id:`catalog:${e.id}`,kind:"catalog",state:n,title:s,subtitle:n==="error"?`Catalog import · ${e.message??"failed"}`:`Catalog import · ${i}`,thumb:null,percent:dD(e),startedAt:e.createdAt,href:VH(t)}}function mD(e,t){const n=e.stage==="done"?"done":e.stage==="failed"?"error":e.stage==="cancelled"?"cancelled":"running",s=n==="error"?e.error??"failed":n==="cancelled"?"stopped":n==="done"?e.warnings[0]??e.coverage[0]??(e.kind==="presenter"?"Ready to cast":"Ready to use"):e.message??(e.kind==="presenter"?"Building the studio views":"Reading the references");return{id:`build:${e.id}`,kind:e.kind,state:n,title:e.name,subtitle:s,thumb:e.previewHash,percent:e.steps>0?Math.min(100,Math.round(e.step/e.steps*100)):null,startedAt:e.startedAt,href:e.assetId?e.kind==="presenter"?al(t,e.assetId):rl(t,e.assetId):null}}function pD(e,t=12){const n=e.filter(i=>i.state==="running"),s=e.filter(i=>i.state!=="running").sort((i,c)=>ss(c.startedAt)-ss(i.startedAt)).slice(0,t);return n.sort((i,c)=>ss(i.startedAt)-ss(c.startedAt)),[...n,...s]}function gD(e,t,n=new Date){if(!e)return[];const s=[];for(const i of t){if(i.state==="running")continue;const c=e.get(i.id);c&&c.state!=="running"||s.push({id:i.id,kind:i.kind,state:i.state,title:i.title,subtitle:i.subtitle,thumb:i.thumb,at:n.toISOString(),href:i.href})}return s}function vD(e,t,n=gw){if(t.length===0)return e;const s=new Set(t.map(i=>i.id));return[...t,...e.filter(i=>!s.has(i.id))].sort((i,c)=>ss(c.at)-ss(i.at)).slice(0,n)}function yD(e,t){const n=e.filter(i=>!i.watched);if(!t)return n.length;const s=ss(t);return n.filter(i=>ss(i.at)>s).length}const yw=e=>`scenri:notifications-${e}`,xw=e=>`scenri:notifications-seen-${e}`;function ww(e){try{return localStorage.getItem(e)}catch{return null}}function bw(e,t){try{localStorage.setItem(e,t)}catch{}}function ug(e){const t=ww(yw(e));if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}const dg=(e,t)=>bw(yw(e),JSON.stringify(t.slice(0,gw))),fg=e=>ww(xw(e)),xD=(e,t)=>bw(xw(e),t),wD=1500,bD=5e3,Ew=r.createContext(null);function sl(){const e=r.useContext(Ew);if(!e)throw new Error("useTaskCenter must be used inside TaskCenterProvider");return e}function ED({brand:e,children:t}){const n=an(),{push:s}=mr(),{refresh:i}=pn(),c=e.id,[u,f]=r.useState([]),[h,m]=r.useState([]),[g,v]=r.useState(()=>ug(c)),[y,w]=r.useState(()=>fg(c)),[E,C]=r.useState(!1),b=r.useRef(null),N=r.useRef(new Set),j=r.useRef(0),k=r.useRef(new Set),A=r.useRef(i);A.current=i;const M=r.useRef(null),T=r.useRef(E);T.current=E;const D=r.useRef(n);D.current=n;const{pathname:L}=mn(),Y=r.useRef(!1);Y.current=/\/(create|sets)(\/|$)/.test(L);const I=r.useRef(s);I.current=s,r.useEffect(()=>{b.current=null,N.current=new Set,j.current=0,k.current=new Set,f([]),m([]),v(ug(c)),w(fg(c))},[c]);const se=r.useCallback(async()=>{var W;let Q,H;try{const[{nodes:P,jobs:Z},{builds:ae}]=await Promise.all([Ce.activity(c),Ce.assetBuilds(c)]);H=ae,Q=[...P.map(G=>fD(G,e)),...Z.map(G=>hD(G,e)),...ae.map(G=>mD(G,e))]}catch{return}m(H);const K=H.filter(P=>P.finished&&P.assetId&&!k.current.has(P.id));if(K.length){for(const P of K)k.current.add(P.id);await A.current()}const X=gD(b.current,Q);if(b.current=new Map(Q.map(P=>[P.id,P])),j.current=Q.filter(P=>P.state==="running").length,f(pD(Q)),X.length!==0&&(v(P=>{const Z=Y.current?X.map(G=>G.state==="error"?G:{...G,watched:!0}):X,ae=vD(P,Z);return dg(c,ae),ae}),!T.current))for(const P of X){if(N.current.has(P.id)||(N.current.add(P.id),P.state==="cancelled")||P.state!=="error"&&Y.current)continue;const Z=P.href,ae=Z?{label:"View",onClick:()=>D.current(Z)}:void 0;if(P.state==="error"){I.current({kind:"error",title:`${P.title} failed`,detail:P.subtitle,action:ae});continue}if(P.kind==="presenter"||P.kind==="scene"){const G=P.id.startsWith("build:")?((W=H.find(fe=>`build:${fe.id}`===P.id))==null?void 0:W.assetId)??null:null;I.current({kind:"success",title:`${P.title} is ready`,detail:P.subtitle,actions:Z?[{label:P.kind==="presenter"?"View presenter":"View scene",onClick:()=>D.current(Z)},{label:"Use in a shot",onClick:()=>D.current(`${ur(e)}?${P.kind==="presenter"?"presenter":"scene"}=${G}&compose=1`)}]:void 0});continue}I.current({kind:"success",title:P.kind==="catalog"?"Catalog import finished":"Generation finished",detail:P.title,action:ae})}},[c,e]);r.useEffect(()=>{let Q=null,H=!0;const K=async()=>{if(!H||(document.hidden||await se(),!H))return;const W=!document.hidden&&j.current>0;Q=setTimeout(K,W?wD:bD)},X=()=>{Q&&clearTimeout(Q),Q=null,document.hidden||K()};return M.current=X,K(),document.addEventListener("visibilitychange",X),window.addEventListener("focus",X),()=>{H=!1,M.current=null,Q&&clearTimeout(Q),document.removeEventListener("visibilitychange",X),window.removeEventListener("focus",X)}},[se]);const U=r.useCallback(()=>{var Q;return(Q=M.current)==null?void 0:Q.call(M)},[]),te=r.useCallback(()=>{const Q=new Date().toISOString();w(Q),xD(c,Q)},[c]),O=r.useCallback(()=>{v([]),dg(c,[]),te()},[c,te]),ne=r.useMemo(()=>({tasks:u,running:u.filter(Q=>Q.state==="running").length,builds:h,feed:g,unread:yD(g,y),markSeen:te,clearFeed:O,panelOpen:E,setPanelOpen:C,poke:U}),[u,h,g,y,te,O,E,U]);return o.jsx(Ew.Provider,{value:ne,children:t})}function Cw(e){const{brand:t}=It(),{pathname:n}=mn(),s=an(),i=!!lr(Ye.brand),c=!!lr({path:Ye.hub,end:!1}),u=!!lr({path:Ye.set,end:!1}),f=c||u,h=!!lr({path:Ye.products,end:!1}),m=!!lr({path:Ye.scenes,end:!1}),g=!!lr({path:Ye.presenters,end:!1}),v=y=>y?"fill":"regular";return[{key:"home",label:"Home",icon:o.jsx(bH,{size:e,weight:v(i)}),active:i,go:()=>s(Vo(t))},{key:"create",label:"Create",icon:o.jsx(kH,{size:e,weight:v(f)}),active:f,go:()=>s(f?`${n}?compose=1`:`${ur(t)}?compose=1`)},{key:"products",label:"Products",icon:o.jsx(Xm,{size:e,weight:v(h)}),active:h,go:()=>s(U0(t))},{key:"presenters",label:"Presenters",icon:o.jsx(Ym,{size:e,weight:v(g)}),active:g,go:()=>s(vc(t))},{key:"scenes",label:"Scenes",icon:o.jsx(Km,{size:e,weight:v(m)}),active:m,go:()=>s(gc(t))}]}const Po=e=>{var t,n;return((n=(t=e.json)==null?void 0:t.meta)==null?void 0:n.name)??e.slug};function CD(e){return([...e.trim()].find(n=>new RegExp("\\p{L}|\\p{N}","u").test(n))??"?").toUpperCase()}function SD(e){const t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return"#ffffff";const[n,s,i]=[0,2,4].map(u=>Number.parseInt(t[1].slice(u,u+2),16)/255),c=u=>u<=.03928?u/12.92:((u+.055)/1.055)**2.4;return .2126*c(n)+.7152*c(s)+.0722*c(i)>.42?"#0a0a0a":"#ffffff"}function h2({brand:e,size:t=20}){var i,c,u,f,h,m;const n=_n((u=(c=(i=e.json)==null?void 0:i.logos)==null?void 0:c[0])==null?void 0:u.file),s=((m=(h=(f=e.json)==null?void 0:f.palette)==null?void 0:h.primary)==null?void 0:m.hex)??"#6b6b6b";return o.jsx("span",{className:"sc-brand-av","data-logo":n?"":void 0,style:{width:t,height:t,fontSize:Math.round(t*.5),...n?{}:{background:s,color:SD(s)}},"aria-hidden":!0,children:n?o.jsx("img",{src:n,alt:""}):CD(Po(e))})}function jD(){const e=Cw(22);return o.jsx("nav",{className:"sc-tabbar","aria-label":"Main",children:o.jsx("ul",{children:e.map(t=>o.jsx("li",{children:o.jsxs("button",{type:"button","data-on":t.active||void 0,"aria-current":t.active?"page":void 0,onClick:t.go,children:[o.jsx("span",{className:"sc-tab-ic",children:t.icon}),o.jsx("span",{className:"sc-tab-lb",children:t.label})]})},t.key))})})}function kD(){var m,g;const{brands:e}=pn(),{brand:t}=It(),n=an(),s=X1(),i=ep(),c=td(),u=e.filter(v=>v.id!==t.id),f=!!((m=i.status)!=null&&m.available),h=f&&!i.dismissed||c.unread;return o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-org-btn","aria-label":`${Po(t)}, brand and settings`,children:[o.jsx(h2,{brand:t,size:22}),o.jsx("span",{dir:"auto",className:"sc-org-name",children:Po(t)}),o.jsx(ai,{size:11,className:"sc-caret"}),h&&o.jsx("span",{className:"sc-upd-dot","aria-hidden":"true"})]})}),o.jsxs(Zo,{align:"end",sideOffset:8,className:"sc-menu",children:[o.jsxs("div",{className:"sc-menu-head",children:[o.jsx(h2,{brand:t,size:34}),o.jsxs("span",{className:"sc-menu-head-txt",children:[o.jsx("span",{dir:"auto",className:"sc-menu-name",children:Po(t)}),o.jsx("span",{className:"sc-menu-sub",children:"Current brand"})]})]}),u.map(v=>o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>n(Vo(v)),children:[o.jsx(h2,{brand:v,size:20}),o.jsx("span",{dir:"auto",className:"sc-menu-lb",children:Po(v)})]},v.id)),o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>n("/setup"),children:[o.jsx(tr,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"Set up a brand"})]}),o.jsx("div",{className:"sc-menu-sep"}),f&&o.jsxs(Qr,{className:"sc-menu-item","data-update":"",onSelect:()=>s("about"),children:[o.jsx(K5,{size:18,className:"sc-menu-ic"}),o.jsxs("span",{className:"sc-menu-lb",children:["Update available · ",(g=i.status)==null?void 0:g.latest]})]}),o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>c.open(),children:[o.jsx(MH,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"What's new"}),c.unread&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-menu-new","aria-hidden":"true"}),o.jsx("span",{className:"sc-vh",children:", not read yet"})]})]}),o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>s(),children:[o.jsx(wH,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"Settings"})]})]})]})}function au(e){const t=r.useRef(null),n=r.useRef(null),s=r.useRef(0),i=f=>{f.pointerType==="mouse"&&f.button!==0||(n.current={y:f.clientY,t:f.timeStamp},s.current=0,t.current&&(t.current.style.transition="none"),f.currentTarget.setPointerCapture(f.pointerId))},c=f=>{!n.current||!t.current||(s.current=Math.max(0,f.clientY-n.current.y),t.current.style.transform=`translateY(${s.current}px)`)},u=f=>{const h=n.current;if(n.current=null,!h||!t.current)return;t.current.style.transition="";const m=s.current/Math.max(1,f.timeStamp-h.t);if(s.current>96||m>.45){e();return}t.current.style.transform=""};return{sheet:t,grip:{onPointerDown:i,onPointerMove:c,onPointerUp:u,onPointerCancel:u}}}function np({open:e=!0,className:t,maxWidth:n,described:s,children:i,onDismiss:c,onOpenAutoFocus:u,onCloseAutoFocus:f,onPaste:h}){const{sheet:m,grip:g}=au(c),v=u??ru,y=f??(w=>w.preventDefault());return o.jsx(ui,{open:e,onOpenChange:w=>!w&&c(),children:o.jsxs(di,{children:[o.jsx(fi,{className:"sc-newdlg-scrim"}),o.jsx(hi,{className:"sc-newdlg-layer",...s?{}:{"aria-describedby":void 0},onOpenAutoFocus:v,onCloseAutoFocus:y,onPaste:h,onPointerDown:w=>{w.target===w.currentTarget&&c()},children:o.jsxs("div",{ref:m,className:["sc-newdlg",t].filter(Boolean).join(" "),style:n?{"--sc-newdlg-max":n}:void 0,children:[o.jsx("div",{className:"sc-shotsheet-grip",...g,children:o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0})}),i]})})]})})}function rp({className:e,children:t}){return o.jsx(mi,{className:e,children:t})}function i1({children:e}){return o.jsx(R1,{asChild:!0,children:e})}function ND({className:e,children:t}){return o.jsx(sm,{className:e,children:t})}const ph=e=>Array.isArray(e)?e.map(t=>_n(t==null?void 0:t.file)).filter(t=>!!t):[];function J1(e){var n;return(((n=e==null?void 0:e.json)==null?void 0:n.characters)??[]).filter(s=>(s==null?void 0:s.origin)==="custom").map(MD)}function AD(e,t){return J1(e).find(n=>n.id===t)}function MD(e){const t=ph(e.shots),n=ph(e.sourceRefs),s=_n(e.preview)??t[0]??n[0]??null;return{id:String(e.id),name:String(e.name??""),promptName:e.promptName,presentation:e.presentation==="man"?"man":"woman",descriptor:String(e.descriptor??""),ageRange:String(e.ageRange??""),hair:String(e.hair??""),identityNotes:String(e.identityNotes??""),negativeConstraints:Array.isArray(e.negativeConstraints)?e.negativeConstraints.map(String):[],facial:"",skin:"",build:"",wardrobeDefault:"",suitableCategories:Array.isArray(e.suitableCategories)?e.suitableCategories.map(String):[],suitableStyles:[],width:1024,height:1280,previewUrl:s,avatarUrl:_n(e.avatar),custom:!0,shots:t,sourceRefs:n}}function su(e){var n;return(((n=e==null?void 0:e.json)==null?void 0:n.scenes)??[]).map(PD)}function RD(e,t){return su(e).find(n=>n.id===t)}function PD(e){const t=ph(e.refs);return{id:String(e.id),name:String(e.name??""),promptName:e.promptName,description:String(e.description??""),lighting:String(e.lighting??""),subject:e.subject==="product"||e.subject==="person"?e.subject:"either",collections:Array.isArray(e.collections)?e.collections.map(String):[],verticals:Array.isArray(e.verticals)?e.verticals.map(String):[],keywords:Array.isArray(e.keywords)?e.keywords.map(String):void 0,prompt:String(e.prompt??""),width:Number(e.width)||1024,height:Number(e.height)||1280,previewUrl:_n(e.preview)??t[0]??null,previewColor:null,custom:!0,refs:t,instruction:e.instruction?String(e.instruction):void 0}}function hg(e,t){const n=new Set(e.map(s=>s.id));return[...e,...t.filter(s=>!n.has(s.id))]}function LD(){const{brand:e,products:t}=It(),{scenes:n,presenters:s,demoProducts:i,showcase:c}=pn();return r.useMemo(()=>{const u={presenters:J1(e),scenes:su(e)},f=new Set,h=E=>!E||f.has(E)?null:(f.add(E),E),m=(E,C)=>{for(const b of E){const N=h(C(b));if(N)return N}return null},g=E=>m(c.filter(C=>{var b;return(((b=C.brief)==null?void 0:b.tokens)??[]).some(N=>(N==null?void 0:N.t)===E)}),C=>C.previewUrl),v=m([...t].reverse(),E=>{var C,b;return _n((b=(C=E==null?void 0:E.shots)==null?void 0:C[0])==null?void 0:b.file)}),y=m(u.presenters,E=>E.previewUrl),w=m(u.scenes,E=>E.previewUrl);return{product:{url:v??g("product")??m(i,E=>E.previewUrl)??null,count:t.length,own:!!v},presenter:{url:y??g("character")??m(s,E=>E.previewUrl??E.avatarUrl)??null,count:u.presenters.length,own:!!y},scene:{url:w??m(n,E=>E.previewUrl)??g("template")??null,count:u.scenes.length,own:!!w}}},[e,t,n,s,i,c])}const TD=[{kind:"product",label:"Product",line:"What you are photographing",noun:"product",icon:Xm},{kind:"presenter",label:"Presenter",line:"Who appears in the shot",noun:"presenter",icon:Ym},{kind:"scene",label:"Scene",line:"Where it takes place",noun:"scene",icon:Km}],mg=(e,t)=>e===0?"None yet":`${e} ${t}${e===1?"":"s"}`;function HD({suggest:e,onPick:t}){const n=r.useRef(null),{close:s}=gs("new"),i=LD(),c=()=>{var u,f;(f=(u=n.current)==null?void 0:u.querySelector(e?`[data-kind="${e}"]`:"[data-kind]"))==null||f.focus()};return r.useEffect(c,[e]),o.jsxs(np,{className:"sc-newpick",maxWidth:"620px",onDismiss:s,onOpenAutoFocus:u=>{u.preventDefault(),c()},children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(rp,{className:"sc-newdlg-title",children:"Add to this brand"}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx("p",{className:"sc-newdlg-sub",children:"The three things every shot is made from."}),o.jsx("div",{className:"sc-newdlg-body",children:o.jsx("div",{className:"sc-pickgrid",ref:n,children:TD.map(({kind:u,label:f,line:h,noun:m,icon:g})=>{const{url:v,count:y,own:w}=i[u];return o.jsxs("button",{type:"button",className:"sc-pick","data-kind":u,onClick:()=>t(u),"aria-label":`${f}. ${h}. ${mg(y,m)}.`,children:[o.jsxs("span",{className:"sc-pick-media",children:[v?o.jsx("img",{src:v,alt:"",loading:"lazy"}):o.jsx("span",{className:"sc-pick-blank",children:o.jsx(g,{size:22})}),w&&o.jsx("span",{className:"sc-pick-mine",children:"Yours"})]}),o.jsxs("span",{className:"sc-pick-cap",children:[o.jsx("b",{children:f}),o.jsx("small",{children:h})]}),o.jsx("span",{className:"sc-pick-count",children:mg(y,m)})]},u)})})})]})}function ap({title:e,sub:t,error:n,footnote:s,primaryLabel:i,ready:c,blocked:u,busy:f,width:h="440px",onBack:m,onPrimary:g,onPasteFiles:v,children:y}){const{close:w}=gs("new");return o.jsxs(np,{maxWidth:h,onDismiss:w,onPaste:E=>{var b;if(!v)return;const C=Array.from(((b=E.clipboardData)==null?void 0:b.files)??[]).filter(N=>N.type.startsWith("image/"));C.length&&(E.preventDefault(),v(C))},children:[o.jsxs("div",{className:"sc-newdlg-head",children:[m&&o.jsx("button",{type:"button",className:"sc-newdlg-back",onClick:m,"aria-label":"Back",children:o.jsx(wi,{size:15})}),o.jsx(rp,{className:"sc-newdlg-title",children:e}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),t&&o.jsx("p",{className:"sc-newdlg-sub",children:t}),o.jsx("div",{className:"sc-newdlg-body",children:y}),o.jsxs("div",{className:"sc-newdlg-foot",children:[n&&o.jsx("p",{className:"sc-newdlg-err",role:"alert",children:n}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary sc-dlg-go","aria-disabled":!c||f||void 0,title:u,onClick:()=>{c&&!f&&g()},children:[f?o.jsx(ln,{size:"1"}):null,i]}),s&&o.jsx("p",{className:"sc-dlg-foot",children:s})]})]})}function Sw({onFiles:e,onReject:t,disabled:n}){const s=r.useRef(0),[i,c]=r.useState(!1),u=r.useCallback(()=>{s.current=0,c(!1)},[]);return{dragOver:i,dropProps:{"data-drag-over":i||void 0,onDragEnter:h=>{n||!Array.from(h.dataTransfer.types).includes("Files")||(h.preventDefault(),s.current++,c(!0))},onDragOver:h=>{n||h.preventDefault()},onDragLeave:()=>{s.current=Math.max(0,s.current-1),s.current===0&&c(!1)},onDrop:h=>{if(n)return;h.preventDefault(),u();const m=Array.from(h.dataTransfer.files).filter(g=>g.type.startsWith("image/"));m.length?e(m):t==null||t()}}}}function pg({label:e,hint:t,busy:n,disabled:s,multiple:i=!0,accept:c="image/*",onFiles:u,onReject:f,children:h}){const m=r.useRef(null),{dropProps:g}=Sw({onFiles:u,onReject:f,disabled:s||n});return o.jsxs("button",{type:"button",className:"sc-dropzone",disabled:s||n,onClick:()=>{var v;return(v=m.current)==null?void 0:v.click()},...g,children:[o.jsx("input",{ref:m,type:"file",accept:c,multiple:i,hidden:!0,onChange:v=>{const y=Array.from(v.target.files??[]);v.target.value="",y.length&&u(y)}}),n?o.jsx(ln,{}):h,o.jsx("span",{className:"sc-dropzone-label",children:e}),t&&o.jsx("small",{children:t})]})}function sp({hashes:e,max:t,label:n,hint:s,busy:i,onAdd:c,onRemove:u,onReject:f}){if(e.length===0)return o.jsx("div",{className:"sc-assetwell",children:o.jsx(pg,{label:n,hint:s,busy:i,onFiles:c,onReject:f,children:o.jsx(tr,{size:18})})});const h=t-e.length;return o.jsxs("div",{className:"sc-assetform-refs",children:[e.map((m,g)=>o.jsxs("span",{className:"sc-assetform-ref",children:[o.jsx("img",{src:rn(m),alt:`Reference ${g+1}`}),o.jsx("button",{type:"button",className:"sc-assetform-drop","aria-label":`Remove reference ${g+1}`,onClick:()=>u(m),children:o.jsx(Mn,{size:11,weight:"bold"})})]},m)),h>0&&o.jsx(pg,{label:`${h} more`,busy:i,onFiles:c,onReject:f,children:o.jsx(tr,{size:15})})]})}const DD=720*60*60*1e3,op=(e,t)=>`scenri:new-${e}-${t}`;function $D(e){try{return localStorage.getItem(e)}catch{return null}}function FD(e,t){try{localStorage.setItem(e,t)}catch{}}function uc(e){try{localStorage.removeItem(e)}catch{}}function gg(e){var t,n,s;return!!((t=e.name)!=null&&t.trim())||!!((n=e.instruction)!=null&&n.trim())||!!((s=e.importUrl)!=null&&s.trim())||(e.facets??[]).length>0||(e.imageHashes??[]).length>0}const vg=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function ID(e,t){const n=op(e,t),s=$D(n);if(!s)return null;let i;try{i=JSON.parse(s)}catch{return uc(n),null}if(typeof i!="object"||i===null)return uc(n),null;const c=i;if(c.v!==1||c.brandId!==e||c.kind!==t)return uc(n),null;const u=Date.now()-Date.parse(c.updatedAt??"");return!Number.isFinite(u)||u>DD?(uc(n),null):{v:1,brandId:e,kind:t,updatedAt:c.updatedAt,name:typeof c.name=="string"?c.name:"",instruction:typeof c.instruction=="string"?c.instruction:"",facets:vg(c.facets),imageHashes:vg(c.imageHashes),importUrl:typeof c.importUrl=="string"?c.importUrl:"",pending:typeof c.pending=="string"?c.pending:null}}function m2(e,t,n){const s={v:1,brandId:e,kind:t,updatedAt:new Date().toISOString(),name:n.name??"",instruction:n.instruction??"",facets:n.facets??[],imageHashes:n.imageHashes??[],importUrl:n.importUrl??"",pending:n.pending??null};FD(op(e,t),JSON.stringify(s))}function p2(e,t){uc(op(e,t))}function _D(e,t){if(!e)return!1;if(e.pending===null)return!0;const n=t??"unknown";return n==="failed"||n==="cancelled"||n==="unknown"}const yg={name:"",instruction:"",facets:[],imageHashes:[],importUrl:""};function lp(e,t,n){const[s,i]=r.useState(yg),[c,u]=r.useState(!1),[f,h]=r.useState(null),m=r.useRef(null),g=r.useRef(null),v=r.useRef(n.pendingState);v.current=n.pendingState,r.useEffect(()=>{const k=ID(e,t),A=k!=null&&k.pending?v.current(k.pending):null;k&&_D(k,A)&&(g.current=k.pending,i({name:k.name,instruction:k.instruction,facets:k.facets,imageHashes:k.imageHashes,importUrl:k.importUrl}))},[e,t]);const y=r.useCallback(k=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{gg(k)?m2(e,t,{...k,pending:g.current}):p2(e,t)},400)},[e,t]),w=r.useCallback(k=>{i(A=>{const M={...A,...k};return y(M),M})},[y]),E=r.useCallback(()=>{m.current&&clearTimeout(m.current),i(k=>(gg(k)?m2(e,t,{...k,pending:g.current}):p2(e,t),k))},[e,t]);r.useEffect(()=>(window.addEventListener("beforeunload",E),()=>{window.removeEventListener("beforeunload",E),E()}),[E]);const C=r.useCallback(async k=>{u(!0),h(null);try{const A=n.max-s.imageHashes.length,M=[];for(const T of k.slice(0,A))M.push(await iw(T));w({imageHashes:[...new Set([...s.imageHashes,...M])].slice(0,n.max)})}catch(A){h(String(A.message??A))}finally{u(!1)}},[s.imageHashes,n.max,w]),b=r.useCallback(k=>w({imageHashes:s.imageHashes.filter(A=>A!==k)}),[s.imageHashes,w]),N=r.useCallback(k=>w({facets:s.facets.includes(k)?s.facets.filter(A=>A!==k):[...s.facets,k]}),[s.facets,w]),j=r.useCallback(k=>{if(m.current&&clearTimeout(m.current),!k){p2(e,t),g.current=null,i(yg);return}g.current=k,i(A=>(m2(e,t,{...A,pending:k}),A))},[e,t]);return{fields:s,set:w,uploading:c,err:f,setErr:h,addFiles:C,removeHash:b,toggleFacet:N,submitted:j}}const xg=4;function OD({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{presenterCategories:u}=pn(),[f,h]=r.useState(!1),m=lp(c.id,"presenter",{max:xg,pendingState:i}),g=!!m.fields.name.trim()&&m.fields.imageHashes.length>0,v=g?void 0:"Add a name and at least one photo",y=async()=>{h(!0),m.setErr(null);try{const{jobId:E}=await Ce.startAssetBuild(c.id,{kind:"presenter",name:m.fields.name.trim(),instruction:m.fields.instruction.trim()||void 0,imageHashes:m.fields.imageHashes,facets:m.fields.facets});m.submitted(E),t({kind:"presenter",jobId:E,name:m.fields.name.trim()})}catch(E){m.setErr(String(E.message??E))}finally{h(!1)}},w=E=>{E.key!=="Enter"||E.shiftKey||(E.preventDefault(),g&&!f&&y())};return o.jsx(ap,{title:"New presenter",error:m.err,footnote:s(n!=null&&n.canGenerate?"Four studio views. A few minutes.":"Saved from the photos you add."),primaryLabel:"Create presenter",ready:g,blocked:v,busy:f,onBack:e,onPrimary:()=>void y(),onPasteFiles:E=>void m.addFiles(E),children:o.jsxs("div",{className:"sc-assetform",children:[o.jsx(sp,{hashes:m.fields.imageHashes,max:xg,label:"Add photos",hint:"One works. Two to four, from different angles, hold the likeness far better.",busy:m.uploading,onAdd:E=>void m.addFiles(E),onRemove:m.removeHash,onReject:()=>m.setErr("Drop an image file.")}),o.jsxs("div",{className:"sc-assetform-fields",children:[o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-presenter-name",children:"Name"}),o.jsx("input",{id:"sc-presenter-name",className:"sc-in",type:"text",placeholder:"Their name",value:m.fields.name,onChange:E=>m.set({name:E.target.value}),onKeyDown:w})]}),o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-presenter-notes",children:"Notes"}),o.jsx("textarea",{id:"sc-presenter-notes",className:"sc-in",placeholder:"Anything worth knowing about them (optional)",rows:2,value:m.fields.instruction,onChange:E=>m.set({instruction:E.target.value})})]})]}),u.length>0&&o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Categories"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:u.map(E=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets.includes(E)||void 0,"aria-pressed":m.fields.facets.includes(E),onClick:()=>m.toggleFacet(E),children:E},E))})]})]})})}const Hc=[{key:"fragrance",label:"Fragrance",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"side",label:"Side"}]},{key:"footwear",label:"Footwear",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"lateral-side",label:"Lateral side"},{key:"medial-side",label:"Medial side"}]},{key:"apparel",label:"Apparel",angles:[{key:"front",label:"Front"},{key:"back",label:"Back"},{key:"detail-fabric",label:"Detail / fabric"}]},{key:"furniture",label:"Furniture",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"side",label:"Side"}]},{key:"beauty",label:"Beauty / skincare",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"label",label:"Label"}]},{key:"electronics",label:"Electronics",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"back",label:"Back"}]},{key:"jewelry",label:"Jewelry",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"clasp-detail",label:"Clasp detail"}]},{key:"accessories",label:"Accessories",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"detail",label:"Detail"}]},{key:"beverage",label:"Beverage",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"label",label:"Label"}]},{key:"food",label:"Food",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"packaging-label",label:"Packaging label"}]},{key:"other",label:"Other",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"side",label:"Side"}]}],ip=new Map(Hc.map(e=>[e.key,e]));ip.get("other");function si(e){var t;return e?((t=ip.get(e))==null?void 0:t.label)??e:null}function ZD(e,t){const n=[e??"",...t??[]].join(" ").toLowerCase();if(!n.trim())return;const s=[["fragrance",["fragrance","perfume","eau de","cologne"]],["footwear",["shoe","sneaker","boot","sandal","footwear"]],["apparel",["shirt","dress","jacket","pant","apparel","clothing","hoodie"]],["furniture",["chair","table","sofa","furniture","shelf","desk"]],["beauty",["skincare","serum","cream","lotion","cosmetic","makeup","beauty"]],["electronics",["electronic","headphone","speaker","charger","device","gadget"]],["jewelry",["jewelry","jewellery","necklace","bracelet","earring","ring"]],["accessories",["bag","handbag","wallet","watch","accessory","accessories"]],["beverage",["drink","beverage","soda","juice","coffee","tea"]],["food",["food","snack","grocery","sauce","spice","pantry"]]];for(const[i,c]of s)if(c.some(u=>n.includes(u)))return i}function cp(e){return e.category&&ip.has(e.category)?e.category:ZD(e.productType,e.tags)??null}const wg=6,VD=3;function zD({onBack:e,onStarted:t}){var C,b;const{brand:n}=It(),[s,i]=r.useState(!1),[c,u]=r.useState(!1),[f,h]=r.useState(!1),m=lp(n.id,"product",{max:wg,pendingState:()=>"unknown"}),g=m.fields.imageHashes.length>0,v=g?void 0:"Add at least one photo",y=async()=>{i(!0),m.setErr(null);try{const N=await Ce.createProduct(n.id,{name:m.fields.name.trim(),imageHashes:m.fields.imageHashes,category:m.fields.facets[0]}),j=m.fields.name.trim()||"Product";m.submitted(null),t({kind:"product",id:N.productId,name:j})}catch(N){m.setErr(String(N.message??N))}finally{i(!1)}},w=async()=>{var j,k;const N=m.fields.importUrl.trim()||(((k=(j=n.json)==null?void 0:j.meta)==null?void 0:k.website)??"");if(N){u(!0),m.setErr(null);try{await Ce.catalogImport(n.id,N),m.set({importUrl:""}),t({kind:"product",id:"",name:N})}catch(A){m.setErr(String(A.message??A))}finally{u(!1)}}},E=N=>{N.key==="Enter"&&(N.preventDefault(),g&&!s&&y())};return o.jsxs(ap,{title:"New product",error:m.err,footnote:"Added to this brand. No preview.",primaryLabel:"Add product",ready:g,blocked:v,busy:s,onBack:e,onPrimary:()=>void y(),onPasteFiles:N=>void m.addFiles(N),children:[o.jsxs("div",{className:"sc-assetform",children:[o.jsx(sp,{hashes:m.fields.imageHashes,max:wg,label:"Add packshots",hint:`Straight, well-lit packshots. The first ${VD} are the ones a shot attaches.`,busy:m.uploading,onAdd:N=>void m.addFiles(N),onRemove:m.removeHash,onReject:()=>m.setErr("Drop an image file.")}),o.jsx("div",{className:"sc-assetform-fields",children:o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-product-name",children:"Name"}),o.jsx("input",{id:"sc-product-name",className:"sc-in",type:"text",placeholder:"Name this product",value:m.fields.name,onChange:N=>m.set({name:N.target.value}),onKeyDown:E})]})}),o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Category"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:Hc.map(N=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets[0]===N.key||void 0,"aria-pressed":m.fields.facets[0]===N.key,onClick:()=>m.set({facets:m.fields.facets[0]===N.key?[]:[N.key]}),children:N.label},N.key))})]})]}),o.jsx("div",{className:"sc-newdlg-secondary",children:f?o.jsxs(o.Fragment,{children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-import-url",children:"Your store's address"}),o.jsxs("div",{className:"sc-newdlg-secrow",children:[o.jsx("input",{id:"sc-import-url",className:"sc-in",type:"url",placeholder:((b=(C=n.json)==null?void 0:C.meta)==null?void 0:b.website)??"https://yourstore.com",value:m.fields.importUrl,onChange:N=>m.set({importUrl:N.target.value}),onKeyDown:N=>{N.key==="Enter"&&w()}}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:c,onClick:()=>void w(),children:c?"Starting…":"Import"})]})]}):o.jsx("button",{type:"button",className:"sc-newdlg-secmore",onClick:()=>h(!0),children:"Import a catalog from a store URL"})})]})}const g2=4;function BD({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{verticals:u}=pn(),[f,h]=r.useState(!1),m=lp(c.id,"scene",{max:g2,pendingState:i}),g=!!m.fields.name.trim()&&(m.fields.imageHashes.length>0||!!m.fields.instruction.trim()),v=g?void 0:"Add a name, and a photo or a note",y=async()=>{h(!0),m.setErr(null);try{const{jobId:C}=await Ce.startAssetBuild(c.id,{kind:"scene",name:m.fields.name.trim(),instruction:m.fields.instruction.trim()||void 0,imageHashes:m.fields.imageHashes,facets:m.fields.facets});m.submitted(C),t({kind:"scene",jobId:C,name:m.fields.name.trim()})}catch(C){m.setErr(String(C.message??C))}finally{h(!1)}},w=C=>{C.key==="Enter"&&(C.preventDefault(),g&&!f&&y())},E=C=>{C.key!=="Enter"||!(C.metaKey||C.ctrlKey)||(C.preventDefault(),g&&!f&&y())};return o.jsx(ap,{title:"New scene",error:m.err,footnote:s(n!=null&&n.canGenerate?"One preview. A few minutes.":"Saved without a preview."),primaryLabel:"Create scene",ready:g,blocked:v,busy:f,onBack:e,onPrimary:()=>void y(),onPasteFiles:C=>void m.addFiles(C),children:o.jsxs("div",{className:"sc-assetform",children:[o.jsx(sp,{hashes:m.fields.imageHashes,max:g2,label:"Add a place",hint:`Screenshots, photography, anything showing the world you want. Up to ${g2}.`,busy:m.uploading,onAdd:C=>void m.addFiles(C),onRemove:m.removeHash,onReject:()=>m.setErr("Drop an image file.")}),o.jsxs("div",{className:"sc-assetform-fields",children:[o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-scene-name",children:"Name"}),o.jsx("input",{id:"sc-scene-name",className:"sc-in",type:"text",placeholder:"Name this place",value:m.fields.name,onChange:C=>m.set({name:C.target.value}),onKeyDown:w})]}),o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-scene-notes",children:"Notes"}),o.jsx("textarea",{id:"sc-scene-notes",className:"sc-in",placeholder:"What matters here, in your words",rows:3,value:m.fields.instruction,onChange:C=>m.set({instruction:C.target.value}),onKeyDown:E})]})]}),u.length>0&&o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Categories"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:u.map(C=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets.includes(C)||void 0,"aria-pressed":m.fields.facets.includes(C),onClick:()=>m.toggleFacet(C),children:C},C))})]})]})})}const v2="1",UD=["product","presenter","scene"],WD=e=>!!e&&UD.includes(e),jw=r.createContext(null);function ol(){const e=r.useContext(jw);if(!e)throw new Error("useCreateAsset must be used inside AssetCreateHost");return e.open}function GD({children:e}){const{brand:t}=It(),n=an(),{push:s}=mr(),{refresh:i}=pn(),{builds:c,poke:u}=sl(),f=gs("new"),h=f.value,m=!!lr({path:Ye.products,end:!1}),g=!!lr({path:Ye.presenters,end:!1}),v=!!lr({path:Ye.scenes,end:!1}),y=m?"product":g?"presenter":v?"scene":null,[w,E]=r.useState(null),[C,b]=r.useState(!1),[N,j]=r.useState(!1),k=r.useRef(null),A=r.useRef(null),M=f.open,T=f.set,D=f.close,L=r.useCallback((Q,H)=>{k.current=Q==="choose"||!(H!=null&&H.onCreated)?null:{kind:Q,fn:H.onCreated},A.current=document.activeElement instanceof HTMLElement?document.activeElement:null,j(Q==="choose"),M(Q==="choose"?v2:Q)},[M]),Y=r.useCallback(()=>{k.current=null,j(!1),D()},[D]);r.useEffect(()=>{if(h!==null)return;const Q=A.current;A.current=null,Q!=null&&Q.isConnected&&Q.focus()},[h]),r.useEffect(()=>{if(h===null)return;let Q=!0;b(!1);const H=K=>Ce.assetBuildCapabilities().then(X=>Q&&E(X)).catch(()=>{Q&&(K?setTimeout(()=>H(!1),600):b(!0))});return H(!0),()=>{Q=!1}},[h]);const I=r.useCallback(Q=>w?Q:C?"Could not reach the engine. You can still try.":"Checking the engine…",[w,C]),se=r.useCallback(Q=>{const H=c.find(K=>K.id===Q);return H?H.stage==="failed"?"failed":H.stage==="cancelled"?"cancelled":H.stage==="done"?"done":"running":"unknown"},[c]),U=r.useCallback(Q=>{const H=k.current;if(Y(),u(),Q.kind==="product"){if(!Q.id){s({kind:"success",title:"Importing your catalog",detail:Q.name});return}i(),(H==null?void 0:H.kind)==="product"&&H.fn(Q),s({kind:"success",title:`${Q.name} added`,actions:[{label:"Add details",onClick:()=>n(Js(t,Q.id))},{label:"Use in a shot",onClick:()=>n(`${ur(t)}?product=${Q.id}&compose=1`)}]});return}(H==null?void 0:H.kind)===Q.kind&&H.fn(Q),s({kind:"success",title:`Building ${Q.name}`,detail:Q.kind==="presenter"?"Four studio views. The bell will say when.":"The bell will say when."})},[t,Y,n,u,s,i]),te=r.useMemo(()=>({open:L}),[L]),O=WD(h)?h:null,ne={onBack:N?()=>T(v2):void 0,onStarted:U,caps:w,capsNote:I,pendingState:se};return o.jsxs(jw.Provider,{value:te,children:[e,h===v2&&o.jsx(HD,{suggest:y,onPick:Q=>{j(!0),T(Q)}}),O==="product"&&o.jsx(zD,{...ne},"product"),O==="presenter"&&o.jsx(OD,{...ne},"presenter"),O==="scene"&&o.jsx(BD,{...ne},"scene")]})}function KD(){const e=ol();return o.jsx("button",{type:"button",className:"sc-icon-btn","aria-label":"Add to this brand",title:"Add to this brand",onClick:()=>e("choose"),children:o.jsx(tr,{size:17,weight:"bold"})})}const bi="(max-width: 767px)";function lo(e){const[t,n]=r.useState(()=>window.matchMedia(e).matches);return r.useEffect(()=>{const s=window.matchMedia(e),i=()=>n(s.matches);return i(),s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[e]),t}function YD(){const{running:e,unread:t,panelOpen:n,setPanelOpen:s,markSeen:i}=sl(),{pathname:c}=mn(),u=lo(bi);r.useEffect(()=>s(!1),[c,s]);const f="Notifications"+(t?`, ${t} unread`:"")+(e?`, ${e} task${e===1?"":"s"} running`:""),h=t>0?o.jsx("span",{className:"sc-bell-dot","data-count":t,"aria-hidden":!0,children:t>9?"9+":t}):e>0?o.jsx("span",{className:"sc-bell-dot","data-running":"","aria-hidden":!0}):null;return u?o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"sc-icon-btn sc-notif-btn","data-on":n||void 0,"aria-label":f,"aria-expanded":n,title:"Notifications",onClick:()=>s(!n),children:[o.jsx(og,{size:16,weight:e?"fill":"regular"}),h]}),n?o.jsx(qD,{onClose:()=>s(!1),onSeen:i}):null]}):o.jsxs(ti,{open:n,onOpenChange:s,children:[o.jsx(ni,{children:o.jsxs("button",{type:"button",className:"sc-icon-btn sc-notif-btn","aria-label":f,title:"Notifications",children:[o.jsx(og,{size:16,weight:e?"fill":"regular"}),h]})}),o.jsx(ri,{align:"end",className:"sc-notif-pop",children:o.jsx(kw,{onClose:()=>s(!1),onSeen:i})})]})}function qD({onClose:e,onSeen:t}){const{sheet:n,grip:s}=au(e);return r.useEffect(()=>{const i=c=>{c.key==="Escape"&&e()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),na.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-notif-scrim",onClick:e,"aria-hidden":!0}),o.jsxs("div",{ref:n,className:"sc-notif-sheet",role:"dialog","aria-modal":"true","aria-label":"Notifications",children:[o.jsx("div",{className:"sc-shotsheet-grip",...s,children:o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0})}),o.jsx(kw,{onClose:e,onSeen:t})]})]}),document.body)}function kw({onClose:e,onSeen:t}){const{tasks:n,feed:s,unread:i,clearFeed:c}=sl(),{brand:u}=It(),f=an(),{push:h}=mr(),[m,g]=r.useState("tasks"),v=r.useRef(null),y=JD(1e3),w=b=>{if(b.startsWith("node:")){Ce.cancelNode(b.slice(5)).catch(N=>h(dn(N,"Could not cancel this shot")));return}b.startsWith("build:")&&Ce.cancelAssetBuild(u.id,b.slice(6)).catch(N=>h(dn(N,"Could not stop this build")))};r.useEffect(()=>{m==="feed"&&t()},[m,t]);const E=b=>{f(b),e()},C=b=>{var A,M;const N=["tasks","feed"],j=N.indexOf(m);let k=null;b.key==="ArrowRight"?k=N[(j+1)%N.length]:b.key==="ArrowLeft"?k=N[(j-1+N.length)%N.length]:b.key==="Home"?k=N[0]:b.key==="End"&&(k=N[N.length-1]),k&&(b.preventDefault(),g(k),(M=(A=v.current)==null?void 0:A.querySelector(`#sc-notif-tab-${k}`))==null||M.focus())};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-notif-tabs",role:"tablist","aria-label":"Notifications",ref:v,onKeyDown:C,children:[o.jsx(bg,{id:"tasks",tab:m,onSelect:g,count:n.length,children:"Tasks"}),o.jsx(bg,{id:"feed",tab:m,onSelect:g,count:i||void 0,children:"Notifications"})]}),o.jsx("div",{className:"sc-notif-scroll",role:"tabpanel",id:`sc-notif-panel-${m}`,"aria-labelledby":`sc-notif-tab-${m}`,tabIndex:0,children:m==="tasks"?n.length===0?o.jsx("p",{className:"sc-notif-empty",children:"Nothing running. Generations show up here as they go."}):n.map(b=>o.jsx(XD,{task:b,now:y,onOpen:E,onCancel:w},b.id)):s.length===0?o.jsx("p",{className:"sc-notif-empty",children:"You have no notifications yet."}):s.map(b=>o.jsx(QD,{item:b,now:y,onOpen:E},b.id))}),m==="feed"&&s.length>0?o.jsx("div",{className:"sc-notif-foot",children:o.jsx("button",{type:"button",className:"sc-notif-clear",onClick:c,children:"Clear all"})}):null]})}function bg({id:e,tab:t,onSelect:n,count:s,children:i}){const c=t===e;return o.jsxs("button",{type:"button",role:"tab",id:`sc-notif-tab-${e}`,className:"sc-notif-tab","aria-selected":c,"aria-controls":`sc-notif-panel-${e}`,tabIndex:c?0:-1,onClick:()=>n(e),children:[i,s?o.jsx("span",{className:"sc-notif-n",children:s}):null]})}function Nw({task:e}){return e.thumb?o.jsx("img",{src:rn(e.thumb),alt:""}):e.state==="running"?o.jsx("span",{className:"sc-shimmer"}):e.state==="error"?o.jsx(nu,{size:17,weight:"fill"}):e.state==="cancelled"?o.jsx(ow,{size:17,color:"var(--sc-fg3)"}):e.kind==="catalog"?o.jsx(RH,{size:17}):e.kind==="presenter"?o.jsx(Ym,{size:17}):e.kind==="scene"?o.jsx(Km,{size:17}):o.jsx(Wa,{size:17})}function XD({task:e,now:t,onOpen:n,onCancel:s}){const i=e.state==="running",c=e.id.startsWith("node:")||e.id.startsWith("build:"),u=i&&eo(e.startedAt,t)>=60;return o.jsxs("div",{className:"sc-notif-row-wrap",children:[o.jsxs("button",{type:"button",className:"sc-notif-row","data-state":e.state,"data-running":i||void 0,disabled:!e.href,onClick:()=>e.href&&n(e.href),children:[o.jsx("span",{className:"sc-notif-thumb",children:o.jsx(Nw,{task:e})}),o.jsxs("span",{className:"sc-notif-txt",children:[o.jsx("b",{dir:"auto",children:e.title}),o.jsx("small",{dir:"auto",children:e.subtitle}),i&&e.percent!==null?o.jsx("span",{className:"sc-notif-meter",children:o.jsx("div",{style:{width:`${e.percent}%`}})}):null]}),o.jsx("span",{className:"sc-notif-time",children:i?uD(e.startedAt,t):vw(e.startedAt,t)})]}),i&&c&&o.jsx("button",{type:"button",className:"sc-notif-row-cancel","data-urgent":u||void 0,onClick:f=>{f.stopPropagation(),s(e.id)},children:"Cancel"})]})}function QD({item:e,now:t,onOpen:n}){return o.jsxs("button",{type:"button",className:"sc-notif-row","data-state":e.state,disabled:!e.href,onClick:()=>e.href&&n(e.href),children:[o.jsx("span",{className:"sc-notif-thumb",children:o.jsx(Nw,{task:e})}),o.jsxs("span",{className:"sc-notif-txt",children:[o.jsx("b",{dir:"auto",children:e.title}),o.jsx("small",{dir:"auto",children:e.subtitle})]}),o.jsx("span",{className:"sc-notif-time",children:vw(e.at,t)})]})}function JD(e){const[t,n]=r.useState(()=>Date.now());return r.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}const e$=["M64.88 18.97V39.33L52.09 52.09V12.79H58.7C62.11 12.79 64.88 15.56 64.88 18.97Z","M12.79 12.79V52.1H6.18C2.77 52.1 0 49.33 0 45.92V25.56L12.79 12.8V12.79Z","M52.1 52.09L39.34 64.88H18.98C15.57 64.88 12.8 62.11 12.8 58.7V52.09H52.11H52.1Z","M12.79 12.79L25.55 0H45.91C49.32 0 52.09 2.77 52.09 6.18V12.79H12.79Z"],t$=["M98.73 30.75L93.53 29.42C91.8 28.95 90.34 28.34 89.14 27.59C87.95 26.84 87.35 25.72 87.35 24.22C87.35 22.72 88.07 21.54 89.53 20.67C90.98 19.8 92.69 19.37 94.66 19.37C96.49 19.37 98.15 19.72 99.64 20.42C101.14 21.12 102.33 22.36 103.22 24.14L108.42 21.75C107.72 20.07 106.69 18.65 105.33 17.5C103.97 16.35 102.39 15.49 100.59 14.9C98.79 14.32 96.86 14.02 94.8 14.02C92.46 14.02 90.26 14.43 88.2 15.25C86.14 16.07 84.48 17.25 83.22 18.8C81.96 20.35 81.32 22.19 81.32 24.35C81.32 26.27 81.78 27.9 82.69 29.23C83.6 30.56 84.81 31.65 86.31 32.5C87.81 33.34 89.4 34 91.08 34.47L95.43 35.59C97.12 36.01 98.54 36.48 99.71 36.99C100.88 37.51 101.77 38.13 102.38 38.85C102.99 39.58 103.29 40.48 103.29 41.55C103.29 43.28 102.55 44.59 101.08 45.48C99.61 46.37 97.77 46.81 95.57 46.81C93.37 46.81 91.24 46.22 89.46 45.05C87.68 43.88 86.32 42.22 85.39 40.07L80.05 42.46C80.7 44.19 81.7 45.8 83.03 47.27C84.36 48.74 86.05 49.92 88.08 50.78C90.12 51.65 92.47 52.08 95.14 52.08C97.81 52.08 100.15 51.63 102.3 50.75C104.45 49.86 106.16 48.6 107.43 46.96C108.69 45.32 109.33 43.38 109.33 41.13C109.33 38.6 108.44 36.46 106.66 34.71C104.88 32.96 102.24 31.63 98.73 30.74V30.75Z","M136.43 44.93C134.6 46.1 132.43 46.69 129.9 46.69C127.79 46.69 125.84 46.13 124.04 45C122.24 43.88 120.78 42.29 119.65 40.23C118.53 38.17 117.96 35.78 117.96 33.07C117.96 30.36 118.52 27.91 119.65 25.87C120.77 23.83 122.24 22.25 124.04 21.13C125.84 20.01 127.8 19.44 129.9 19.44C132.38 19.44 134.5 20.01 136.25 21.16C138.01 22.31 139.33 23.98 140.22 26.18L145.63 23.93C144.55 21.03 142.72 18.65 140.12 16.8C137.52 14.95 134.21 14.03 130.19 14.03C126.68 14.03 123.56 14.86 120.82 16.52C118.08 18.18 115.94 20.44 114.4 23.3C112.86 26.16 112.08 29.41 112.08 33.06C112.08 36.71 112.85 39.91 114.4 42.78C115.95 45.65 118.09 47.93 120.82 49.59C123.56 51.25 126.68 52.08 130.19 52.08C134.21 52.08 137.54 51.12 140.16 49.2C142.78 47.28 144.68 44.94 145.85 42.18L140.51 39.93C139.62 42.08 138.26 43.75 136.44 44.91L136.43 44.93Z","M174.03 16.39C171.48 14.82 168.43 14.04 164.87 14.04C161.31 14.04 158.3 14.92 155.71 16.67C153.11 18.42 151.1 20.75 149.67 23.66C148.24 26.56 147.53 29.72 147.53 33.14C147.53 36.79 148.29 40.04 149.81 42.9C151.33 45.76 153.44 48 156.13 49.64C158.82 51.28 161.9 52.1 165.36 52.1C169.29 52.1 172.57 51.21 175.19 49.43C177.81 47.65 179.83 45.41 181.23 42.69L176.18 40.23C175.15 42.06 173.78 43.59 172.07 44.83C170.36 46.07 168.2 46.69 165.58 46.69C163.57 46.69 161.64 46.2 159.79 45.22C157.94 44.24 156.43 42.74 155.26 40.73C154.23 38.95 153.65 36.78 153.53 34.2H181.87C181.92 33.97 181.95 33.69 181.98 33.36C182 33.03 182.01 32.71 182.01 32.38C182.01 28.82 181.32 25.66 179.94 22.9C178.56 20.14 176.59 17.97 174.04 16.41L174.03 16.39ZM153.87 29.28C154.1 28.16 154.42 27.11 154.86 26.12C155.77 24.06 157.08 22.43 158.79 21.24C160.5 20.05 162.52 19.45 164.86 19.45C166.82 19.45 168.48 19.77 169.81 20.4C171.14 21.03 172.24 21.85 173.11 22.86C173.98 23.87 174.61 24.94 175.01 26.09C175.41 27.24 175.63 28.3 175.68 29.28H153.87Z","M204.61 14.04C202.08 14.04 199.75 14.67 197.62 15.94C195.49 17.2 193.96 18.7 193.02 20.43H192.74V15.16H187.05V50.97H193.02V30.82C193.02 28.9 193.44 27.08 194.28 25.34C195.12 23.61 196.29 22.19 197.79 21.09C199.29 19.99 201.02 19.44 202.99 19.44C205.61 19.44 207.75 20.15 209.41 21.58C211.07 23.01 211.9 25.45 211.9 28.92V50.97H217.87V28.01C217.87 23.8 216.76 20.42 214.53 17.86C212.31 15.31 208.99 14.03 204.6 14.03L204.61 14.04Z","M240.91 14.11C239.51 14.11 238.09 14.4 236.66 14.99C235.23 15.58 233.97 16.37 232.87 17.38C231.77 18.39 230.99 19.57 230.52 20.93H230.24V15.17H224.55V50.98H230.52V30.97C230.52 29 230.95 27.2 231.82 25.56C232.69 23.92 233.84 22.61 235.3 21.63C236.75 20.65 238.34 20.16 240.07 20.16C240.96 20.16 241.84 20.25 242.7 20.44C243.57 20.63 244.37 20.91 245.12 21.28V14.82C244.6 14.59 244.04 14.41 243.44 14.29C242.83 14.17 241.99 14.11 240.91 14.11Z","M254.77 1.23C253.95 0.41 252.93 0 251.72 0C250.51 0 249.54 0.41 248.7 1.23C247.86 2.05 247.44 3.07 247.44 4.28C247.44 5.49 247.86 6.46 248.7 7.3C249.54 8.14 250.55 8.56 251.72 8.56C252.89 8.56 253.96 8.14 254.77 7.3C255.59 6.46 256 5.45 256 4.28C256 3.11 255.59 2.04 254.77 1.23Z","M254.74 15.17H248.77V50.98H254.74V15.17Z"];function n$(e){return o.jsx("svg",{viewBox:"0 0 256 64.88",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:[...e$,...t$].map(t=>o.jsx("path",{d:t},t))})}function r$(){const{brand:e}=It(),t=an(),n=lr({path:Ye.set,end:!1}),i=!!lr({path:Ye.hub,end:!1})||!!n;return o.jsxs("header",{className:"sc-topbar","data-project":i?"":void 0,children:[o.jsx("a",{className:"sc-skip",href:"#main",children:"Skip to content"}),o.jsx("div",{className:"sc-topbar-lead",children:o.jsx("button",{type:"button",className:"sc-wordmark","aria-label":"scenri home",onClick:()=>t(Vo(e)),children:o.jsx(n$,{})})}),o.jsx(a$,{}),o.jsxs("div",{className:"sc-topbar-end",children:[o.jsx(KD,{}),o.jsx(YD,{}),o.jsx(kD,{})]})]})}function a$(){const e=Cw(16);return o.jsx("nav",{className:"sc-nav sc-desktop-only","aria-label":"Main",children:o.jsx("ul",{children:e.map(t=>o.jsx("li",{children:o.jsx("button",{type:"button","data-active":t.active||void 0,"aria-current":t.active?"page":void 0,onClick:t.go,children:t.label})},t.key))})})}const s$=60;function o$(){r.useEffect(()=>{const e=window.visualViewport;if(!e)return;const t=document.documentElement,n=()=>{const s=window.innerHeight-e.height-e.offsetTop;t.style.setProperty("--sc-kb",s>s$?`${Math.round(s)}px`:"0px")};return n(),e.addEventListener("resize",n),e.addEventListener("scroll",n),()=>{e.removeEventListener("resize",n),e.removeEventListener("scroll",n),t.style.removeProperty("--sc-kb")}},[])}function l$(e){const[t,n]=r.useState({products:[],loaded:!1}),s=r.useCallback(async()=>{if(e)try{const i=await Ce.productsLibrary(e);n({products:i.products,loaded:!0})}catch{n(i=>({products:i.products,loaded:!0}))}},[e]);return r.useEffect(()=>{if(!e){n({products:[],loaded:!0});return}let i=!0;n({products:[],loaded:!1});const c=()=>{Ce.productsLibrary(e).then(f=>{i&&n({products:f.products,loaded:!0})}).catch(()=>{i&&n(f=>({products:f.products,loaded:!0}))})};c();const u=setInterval(c,4e3);return()=>{i=!1,clearInterval(u)}},[e]),{...t,reload:s}}function Fr({title:e,sub:t,children:n}){return o.jsxs("section",{className:"sc-set-sec",children:[(e||t)&&o.jsxs("div",{className:"sc-set-sech",children:[e&&o.jsx("h3",{children:e}),t&&o.jsx("p",{children:t})]}),o.jsx("div",{className:"sc-set-card",children:n})]})}function i$({value:e,onChange:t,placeholder:n,label:s,suggestions:i,max:c=24,maxLength:u=200}){const[f,h]=r.useState(""),m=e.length>=c,g=y=>{const w=y.trim().slice(0,u);h(""),!(!w||m)&&(e.some(E=>E.toLowerCase()===w.toLowerCase())||t([...e,w]))},v=!m&&i&&i.length>0?o.jsx("div",{className:"sc-chips-sugg",children:i.map(y=>o.jsx("button",{type:"button",className:"sc-chip",onClick:()=>g(y),"aria-label":`Never show ${y}`,children:y},y))}):null;return o.jsxs(o.Fragment,{children:[e.length===0&&v,o.jsxs("div",{className:"sc-chips",children:[e.map((y,w)=>o.jsxs("span",{className:"sc-chips-item",children:[o.jsx("span",{dir:"auto",children:y}),o.jsx("button",{type:"button",onClick:()=>t(e.filter((E,C)=>C!==w)),"aria-label":`Remove ${y}`,children:o.jsx(Mn,{size:10,weight:"bold"})})]},y)),o.jsx("input",{className:"sc-chips-in",value:f,"aria-label":s,placeholder:m?void 0:e.length?"Add another…":n??"Add one…",disabled:m,dir:"auto",onChange:y=>{const w=y.target.value;if(w.includes(",")){const E=w.split(",");for(const C of E.slice(0,-1))g(C);h(E[E.length-1]);return}h(w.slice(0,u))},onKeyDown:y=>{y.key==="Enter"?(y.preventDefault(),g(f)):y.key==="Backspace"&&!f&&e.length&&t(e.slice(0,-1))},onBlur:()=>g(f)})]}),e.length>0&&v]})}const c$=["competitor logos in frame","visible text or wordmarks on clothing","alcohol","children","visible clutter or mess","heavy skin retouching","neon or harsh colour","pure white studio backgrounds"],Eg=e=>e.trim().toLowerCase();function u$(e){const t=new Set((e??[]).map(Eg));return c$.filter(n=>!t.has(Eg(n)))}function d$({doc:e}){var i;const t=((i=e.json)==null?void 0:i.rules)??{},n=t.never??[],s=c=>{const u={...t};c.length?u.never=c:delete u.never,e.patch({rules:u})};return o.jsx("div",{className:"sc-nv",children:o.jsx(i$,{label:"Things this brand never shows",value:n,placeholder:"Or type your own",suggestions:u$(n),max:24,onChange:s})})}const Aw=["primary","mark","wordmark","monochrome","alternate"],up=["light","dark","any"],k0={primary:"Primary logo",mark:"Mark",wordmark:"Wordmark",monochrome:"Monochrome",alternate:"Alternate"},f$=/^[a-f0-9]{32}$/,h$=e=>{const t=String(e??"");if(!t.startsWith("asset:"))return null;const n=t.slice(6);return f$.test(n)?n:null},m$=e=>Aw.includes(e)?e:"primary",p$=e=>up.includes(e)?e:"any";function Mw(e){return(Array.isArray(e==null?void 0:e.logos)?e.logos:[]).filter(n=>n&&String(n.file??"").trim()).map(n=>{const s=h$(n.file),i=String(n.clearSpace??"").trim();return{hash:s,file:String(n.file),role:m$(n.role),background:p$(n.background),...i?{clearSpace:i}:{},attachable:s!==null}})}function Rw(e){return Mw(e).filter(t=>t.attachable)}function Pw(e,t){var i;const n={primary:"logo",mark:"mark",wordmark:"wordmark",monochrome:"monochrome logo",alternate:"alternate logo"},s=String(((i=e==null?void 0:e.meta)==null?void 0:i.name)??"").trim();return s?`${s} ${n[t.role]}`:`Brand ${n[t.role]}`}function g$({brand:e,doc:t}){const{push:n}=mr(),[s,i]=r.useState(!1),c=t.json??{},u=c.meta??{},f=u.name??e.slug,h=Mw(c),m=h.find(C=>C.role==="primary")??h[0],g=h.filter(C=>C!==m),v=C=>{const b={...u};for(const[N,j]of Object.entries(C)){const k=j.trim();k?b[N]=k:delete b[N]}b.name||(b.name=u.name),t.patch({meta:b})},y=async(C,b)=>{i(!0);try{await t.flush(),t.applyRow(await b())}catch(N){n(dn(N,C))}finally{i(!1)}},w=C=>void y("Could not upload that mark",()=>$H(e.id,C[0])),{dropProps:E}=Sw({onFiles:w,onReject:()=>n({kind:"error",title:"That is not an image",detail:"Drop a PNG, SVG or JPG."}),disabled:s});return o.jsxs("div",{className:"sc-ident",...E,children:[o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Logo"}),o.jsx("small",{children:"Drop an image, or tap to add."})]}),o.jsxs("div",{className:"sc-set-controls",children:[o.jsx(v$,{mark:m,name:f,busy:s,onUpload:w}),(m==null?void 0:m.attachable)&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:s,onClick:()=>void y("Could not remove that mark",()=>Ce.deleteLogo(e.id,m.hash??"")),children:"Remove"})]})]}),m&&o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Sits on"}),o.jsx("small",{children:"So a dark mark is not shown on a dark ground."})]}),o.jsx("select",{className:"sc-in",value:m.background,disabled:s||!m.attachable,onChange:C=>void y("Could not update that mark",()=>Ce.updateLogo(e.id,m.hash??"",{background:C.target.value})),"aria-label":"Sits on",children:up.map(C=>o.jsx("option",{value:C,children:C==="any"?"Any background":`On ${C}`},C))})]}),o.jsx(Cg,{label:"Name",value:u.name??"",placeholder:e.slug,maxLength:120,onCommit:C=>v({name:C})}),o.jsx(Cg,{label:"Tagline",value:u.tagline??"",placeholder:"Add a tagline",maxLength:200,onCommit:C=>v({tagline:C})}),g.map(C=>o.jsx(y$,{mark:C,busy:s,onRole:b=>void y("Could not retag that mark",()=>Ce.updateLogo(e.id,C.hash??"",{role:b})),onBackground:b=>void y("Could not update that mark",()=>Ce.updateLogo(e.id,C.hash??"",{background:b})),onRemove:()=>void y("Could not remove that mark",()=>Ce.deleteLogo(e.id,C.hash??""))},C.hash??C.file)),m&&o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Variant"}),o.jsx("small",{children:"A second mark for dark or light grounds."})]}),o.jsxs("label",{className:"sc-btn sc-btn-ghost",children:[o.jsx(tr,{size:12}),"Add",o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:s,onChange:C=>{const b=Array.from(C.target.files??[]);C.target.value="",b.length&&w(b)}})]})]})]})}function Cg({label:e,value:t,placeholder:n,maxLength:s,onCommit:i}){const[c,u]=r.useState(t);return r.useEffect(()=>u(t),[t]),o.jsxs("div",{className:"sc-set-row",children:[o.jsx("span",{className:"txt",children:o.jsx("b",{children:e})}),o.jsx("input",{className:"sc-in",value:c,placeholder:n,"aria-label":e,maxLength:s,dir:"auto",onChange:f=>u(f.target.value),onBlur:()=>{const f=c.trim();f!==t&&i(f),u(f)},onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(u(t),f.currentTarget.blur())}})]})}function v$({mark:e,name:t,busy:n,onUpload:s}){if(e){const i=e.hash?rn(e.hash):e.file;return o.jsx("span",{className:"sc-well","data-bg":e.background,children:o.jsx("img",{src:i,alt:`${t} logo`})})}return o.jsxs("label",{className:"sc-well","data-empty":"","aria-label":"Add logo",children:[o.jsx(Jx,{size:16}),o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:n,onChange:i=>{const c=Array.from(i.target.files??[]);i.target.value="",c.length&&s(c)}})]})}function y$({mark:e,busy:t,onRole:n,onBackground:s,onRemove:i}){const c=e.hash?rn(e.hash):e.file;return o.jsxs("div",{className:"sc-set-row",children:[o.jsx("span",{className:"txt",children:o.jsx("b",{children:k0[e.role]})}),o.jsxs("div",{className:"sc-set-controls",children:[o.jsx("span",{className:"sc-well","data-bg":e.background,children:o.jsx("img",{src:c,alt:k0[e.role]})}),o.jsx("select",{className:"sc-in",value:e.role,disabled:t||!e.attachable,onChange:u=>n(u.target.value),"aria-label":"Mark role",children:Aw.map(u=>o.jsx("option",{value:u,children:k0[u]},u))}),o.jsx("select",{className:"sc-in",value:e.background,disabled:t||!e.attachable,onChange:u=>s(u.target.value),"aria-label":"Sits on",children:up.map(u=>o.jsx("option",{value:u,children:u==="any"?"Any background":`On ${u}`},u))}),e.attachable&&o.jsx("button",{type:"button",disabled:t,onClick:i,"aria-label":`Remove ${k0[e.role]}`,children:o.jsx(Y1,{size:13})})]})]})}const Sg={primary:"Primary",secondary:"Secondary",accent:"Accent",neutral:"Neutral"},x$=(e,t)=>t<=1?Sg[e]:`${Sg[e]} ${t}`;function w$(e){return/^(Primary|Secondary|Accent|Neutral)( [2-9]\d*)?$/.test(String(e??"").trim())}const b$=/^#[0-9A-F]{6}$/;function fn(e){const t=String(e??"").trim(),n=(t.startsWith("#")?t.slice(1):t).toUpperCase();if(/^[0-9A-F]{3}$/.test(n)){const[i,c,u]=n;return`#${i}${i}${c}${c}${u}${u}`}const s=`#${n}`;return b$.test(s)?s:null}const E$=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function C$(e){const t=String(e??"").trim();return E$.test(t)?fn(t):null}function va(e){const t=[],n={primary:0,secondary:0,accent:0,neutral:0},s=(i,c)=>{const u=fn(String((i==null?void 0:i.hex)??""));if(!u)return;n[c]+=1;const f=String((i==null?void 0:i.name)??"").trim();t.push({hex:u,name:f||x$(c,n[c]),slot:c})};s(e==null?void 0:e.primary,"primary"),s(e==null?void 0:e.secondary,"secondary");for(const i of Array.isArray(e==null?void 0:e.accent)?e.accent:[])s(i,"accent");for(const i of Array.isArray(e==null?void 0:e.neutrals)?e.neutrals:[])s(i,"neutral");return t}function dp(e,t){const n={},s=[],i=[],c=g=>{const v=g.name.trim();return v&&!w$(v)?{hex:g.hex,name:v}:{hex:g.hex}};for(const g of e){const v=fn(g.hex);if(!v)continue;const y=c({...g,hex:v});g.slot==="neutral"?i.push(y):s.push(y)}const[u,f,...h]=s;u&&(n.primary=u),f&&(n.secondary=f),h.length&&(n.accent=h),i.length&&(n.neutrals=i);const m=String((t==null?void 0:t.usage)??"").trim();return m&&(n.usage=m),n}const jg=e=>e.slot!=="neutral";function fp(e){var u;const t=(u=e[e.length-1])==null?void 0:u.hex;if(!t)return"#808080";const n=Number.parseInt(t.slice(1),16),[s,i,c]=[n>>16&255,n>>8&255,n&255];return`#${[c,s,i].map(f=>f.toString(16).padStart(2,"0")).join("").toUpperCase()}`}function S$(e,t){const n=fn(t);if(!n)return{palette:e,added:!1,swatch:null};const s=va(e),i=s.find(h=>h.hex===n);if(i)return{palette:e,added:!1,swatch:i};const c=[...s,{hex:n,name:"",slot:s.length?"accent":"primary"}],u=dp(c,e),f=va(u).find(h=>h.hex===n)??null;return{palette:u,added:!0,swatch:f}}function j$(e,t){const n=fn(t);if(!n)return{palette:e,removed:!1};const s=va(e),i=s.filter(c=>c.hex!==n);return i.length===s.length?{palette:e,removed:!1}:{palette:dp(i,e),removed:!0}}function ed(){return(ed=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function Lw(e,t){if(e==null)return{};var n,s,i={},c=Object.keys(e);for(s=0;s<c.length;s++)t.indexOf(n=c[s])>=0||(i[n]=e[n]);return i}function yc(e){var t=r.useRef(e),n=r.useRef(function(s){t.current&&t.current(s)});return t.current=e,n.current}var Dc=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},xc=function(e){return"touches"in e},gh=function(e){return e&&e.ownerDocument.defaultView||self},kg=function(e,t,n){var s=e.getBoundingClientRect(),i=xc(t)?(function(c,u){for(var f=0;f<c.length;f++)if(c[f].identifier===u)return c[f];return c[0]})(t.touches,n):t;return{left:Dc((i.pageX-(s.left+gh(e).pageXOffset))/s.width),top:Dc((i.pageY-(s.top+gh(e).pageYOffset))/s.height)}},Ng=function(e){!xc(e)&&e.preventDefault()},Tw=$t.memo(function(e){var t=e.onMove,n=e.onKey,s=e.onEnd,i=Lw(e,["onMove","onKey","onEnd"]),c=r.useRef(null),u=yc(t),f=yc(n),h=yc(s),m=r.useRef(null),g=r.useRef(!1),v=r.useMemo(function(){var b=function(k){Ng(k),(xc(k)?k.touches.length>0:k.buttons>0)&&c.current?u(kg(c.current,k,m.current)):(j(!1),h())},N=function(){j(!1),h()};function j(k){var A=g.current,M=gh(c.current),T=k?M.addEventListener:M.removeEventListener;T(A?"touchmove":"mousemove",b),T(A?"touchend":"mouseup",N)}return[function(k){var A=k.nativeEvent,M=c.current;if(M&&(Ng(A),!(function(D,L){return L&&!xc(D)})(A,g.current)&&M)){if(xc(A)){g.current=!0;var T=A.changedTouches||[];T.length&&(m.current=T[0].identifier)}M.focus(),u(kg(M,A,m.current)),j(!0)}},function(k){var A=k.which||k.keyCode;A<37||A>40||(k.preventDefault(),f({left:A===39?.05:A===37?-.05:0,top:A===40?.05:A===38?-.05:0}))},function(k){var A=k.which||k.keyCode;A>=37&&A<=40&&h()},j]},[f,u,h]),y=v[0],w=v[1],E=v[2],C=v[3];return r.useEffect(function(){return C},[C]),$t.createElement("div",ed({},i,{onTouchStart:y,onMouseDown:y,className:"react-colorful__interactive",ref:c,onKeyDown:w,onKeyUp:E,tabIndex:0,role:"slider"}))}),hp=function(e){return e.filter(Boolean).join(" ")},Hw=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,c=hp(["react-colorful__pointer",e.className]);return $t.createElement("div",{className:c,style:{top:100*i+"%",left:100*n+"%"}},$t.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Bn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},k$=function(e){return P$(vh(e))},vh=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Bn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Bn(parseInt(e.substring(6,8),16)/255,2):1}},N$=function(e){return R$(M$(e))},A$=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Bn(e.h),s:Bn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Bn(i/2),a:Bn(s,2)}},yh=function(e){var t=A$(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},M$=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var c=Math.floor(t),u=s*(1-n),f=s*(1-(t-c)*n),h=s*(1-(1-t+c)*n),m=c%6;return{r:Bn(255*[s,f,u,u,h,s][m]),g:Bn(255*[h,s,s,f,u,u][m]),b:Bn(255*[u,u,h,s,s,f][m]),a:Bn(i,2)}},N0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},R$=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,c=i<1?N0(Bn(255*i)):"";return"#"+N0(t)+N0(n)+N0(s)+c},P$=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,c=Math.max(t,n,s),u=c-Math.min(t,n,s),f=u?c===t?(n-s)/u:c===n?2+(s-t)/u:4+(t-n)/u:0;return{h:Bn(60*(f<0?f+6:f)),s:Bn(c?u/c*100:0),v:Bn(c/255*100),a:i}},L$=$t.memo(function(e){var t=e.hue,n=e.onChange,s=e.onChangeEnd,i=hp(["react-colorful__hue",e.className]);return $t.createElement("div",{className:i},$t.createElement(Tw,{onMove:function(c){n({h:360*c.left})},onKey:function(c){n({h:Dc(t+360*c.left,0,360)})},onEnd:s,"aria-label":"Hue","aria-valuenow":Bn(t),"aria-valuemax":"360","aria-valuemin":"0"},$t.createElement(Hw,{className:"react-colorful__hue-pointer",left:t/360,color:yh({h:t,s:100,v:100,a:1})})))}),T$=$t.memo(function(e){var t=e.hsva,n=e.onChange,s=e.onChangeEnd,i={backgroundColor:yh({h:t.h,s:100,v:100,a:1})};return $t.createElement("div",{className:"react-colorful__saturation",style:i},$t.createElement(Tw,{onMove:function(c){n({s:100*c.left,v:100-100*c.top})},onKey:function(c){n({s:Dc(t.s+100*c.left,0,100),v:Dc(t.v-100*c.top,0,100)})},onEnd:s,"aria-label":"Color","aria-valuetext":"Saturation "+Bn(t.s)+"%, Brightness "+Bn(t.v)+"%"},$t.createElement(Hw,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:yh(t)})))}),Dw=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},H$=function(e,t){return e.toLowerCase()===t.toLowerCase()||Dw(vh(e),vh(t))};function D$(e,t,n,s){var i=yc(n),c=yc(s),u=r.useState(function(){return e.toHsva(t)}),f=u[0],h=u[1],m=r.useRef({color:t,hsva:f}),g=r.useRef(!1);r.useEffect(function(){if(!e.equal(t,m.current.color)){var w=e.toHsva(t);m.current={hsva:w,color:t},h(w),g.current=!1}},[t,e]),r.useEffect(function(){var w;Dw(f,m.current.hsva)||e.equal(w=e.fromHsva(f),m.current.color)||(m.current={hsva:f,color:w},i(w),g.current=!0)},[f,e,i]);var v=r.useCallback(function(w){h(function(E){return Object.assign({},E,w)})},[]),y=r.useCallback(function(){g.current&&(g.current=!1,c(m.current.color))},[c]);return[f,v,y]}var $$=typeof window<"u"?r.useLayoutEffect:r.useEffect,F$=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ag=new WeakMap,I$=function(e){$$(function(){var t=e.current;if(typeof document<"u"&&t){var n=t.getRootNode?t.getRootNode():t.ownerDocument,s=n&&("head"in n||"host"in n)?n:t.ownerDocument;if(!Ag.has(s)){var i="head"in s?s.head:s,c=(i.ownerDocument||document).createElement("style");c.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`;var u=F$();u&&c.setAttribute("nonce",u),Ag.set(s,c),i.appendChild(c)}}},[])},_$=function(e){var t=e.className,n=e.colorModel,s=e.color,i=s===void 0?n.defaultColor:s,c=e.onChange,u=e.onChangeEnd,f=Lw(e,["className","colorModel","color","onChange","onChangeEnd"]),h=r.useRef(null);I$(h);var m=D$(n,i,c,u),g=m[0],v=m[1],y=m[2],w=hp(["react-colorful",t]);return $t.createElement("div",ed({},f,{ref:h,className:w}),$t.createElement(T$,{hsva:g,onChange:v,onChangeEnd:y}),$t.createElement(L$,{hue:g.h,onChange:v,onChangeEnd:y,className:"react-colorful__last-control"}))},O$={defaultColor:"000",toHsva:k$,fromHsva:function(e){return N$({h:e.h,s:e.s,v:e.v,a:1})},equal:H$},Z$=function(e){return $t.createElement(_$,ed({},e,{colorModel:O$}))};function c1({value:e,onChange:t,label:n,presets:s,className:i,triggerStyle:c,triggerProps:u,commitMode:f="live",align:h="start",children:m}){const g=fn(e)??"#000000",[v,y]=r.useState(g),[w,E]=r.useState(!1);r.useEffect(()=>{w||y(g)},[g,w]);const C=k=>{const A=fn(k);A&&(y(A),f==="live"&&t(A))},b=k=>{const A=fn(k);A&&(y(A),t(A),f==="close"&&E(!1))},N=k=>{if(E(k),k||f!=="close")return;const A=fn(v);A&&A!==g&&t(A)},j=[...new Set((s??[]).map(k=>fn(k)).filter(k=>!!k))];return o.jsxs(ti,{open:w,onOpenChange:N,children:[o.jsx(ni,{children:o.jsx("button",{type:"button",className:i??"sc-cp-trigger",style:{background:g,...c},"aria-label":n,...u,children:m})}),o.jsxs(ri,{className:"sc-cp",align:h,sideOffset:6,width:"232px",children:[o.jsx(Z$,{color:v,onChange:C}),o.jsxs("div",{className:"sc-cp-foot",children:[o.jsx("span",{className:"sc-cp-preview",style:{background:v},"aria-hidden":!0}),o.jsx("input",{className:"sc-cp-hex",value:v,spellCheck:!1,maxLength:7,"aria-label":"Hex value",onChange:k=>{y(k.target.value);const A=fn(k.target.value);A&&f==="live"&&t(A)},onBlur:()=>y(fn(v)??g),onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),f==="close"?b(v):E(!1))}})]}),j.length>0&&o.jsx("div",{className:"sc-cp-presets",children:j.map(k=>o.jsx("button",{type:"button",style:{background:k},"data-on":k===v||void 0,title:k,"aria-label":k,onClick:()=>f==="close"?b(k):C(k)},k))})]})]})}function V$({doc:e,suggestions:t}){var w;const n=(w=e.json)==null?void 0:w.palette,[s,i]=r.useState(()=>va(n)),c=JSON.stringify(n??{});r.useEffect(()=>{i(va(n))},[c]);const u=(E,C=0)=>{i(E),e.patch({palette:dp(E,n)},{debounce:C})},f=(E,C,b=0)=>u(s.map((N,j)=>j===E?{...N,...C}:N),b),h=()=>u([...s,{hex:fp(s),name:"",slot:s.length?"accent":"primary"}]),m=(t??[]).filter(E=>{const C=fn(E.hex);return C&&!s.some(b=>b.hex===C)}),g=(E,C)=>o.jsx(z$,{swatch:E,presets:s.map(b=>b.hex),onHex:b=>f(C,{hex:b},300),onRemove:()=>u(s.filter((b,N)=>N!==C))},`${E.slot}-${C}`),v=s.map((E,C)=>[E,C]),y=v.filter(([E])=>!jg(E));return o.jsxs("div",{className:"sc-pal",children:[s.length===0&&o.jsx("p",{className:"sc-pal-empty",children:"No colours yet. Add one and it becomes a chip you can drop into any shot."}),v.filter(([E])=>jg(E)).map(([E,C])=>g(E,C)),y.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-pal-group",children:"Neutrals"}),y.map(([E,C])=>g(E,C))]}),o.jsxs("div",{className:"sc-pal-foot",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:h,children:[o.jsx(tr,{size:12}),"Add colour"]}),m.length>0&&o.jsxs("span",{className:"sc-pal-sugg",children:[o.jsx("small",{children:"From the website"}),m.map(E=>{const C=fn(E.hex);return o.jsx("button",{type:"button",className:"sc-pal-sugg-chip",style:{background:C},title:`Add ${C}`,"aria-label":`Add ${C}`,onClick:()=>u([...s,{hex:C,name:"",slot:"accent"}])},C)})]})]})]})}function z$({swatch:e,presets:t,onHex:n,onRemove:s}){const[i,c]=r.useState(e.hex);r.useEffect(()=>c(e.hex),[e.hex]);const u=()=>{const f=fn(i);f&&n(f),c(f??e.hex)};return o.jsxs("div",{className:"sc-pal-row",children:[o.jsx(c1,{value:e.hex,onChange:n,label:`${e.name} color`,presets:t,className:"sc-pal-chip"}),o.jsx("span",{className:"sc-pal-name",children:e.name}),o.jsx("input",{className:"sc-in sc-pal-hex",value:i,spellCheck:!1,maxLength:7,"aria-label":`${e.name} hex`,onChange:f=>c(f.target.value),onBlur:u,onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur()}}),o.jsx("button",{type:"button",className:"sc-pal-act","data-danger":"",onClick:s,"aria-label":`Remove ${e.name}`,title:"Remove",children:o.jsx(Y1,{size:13})})]})}function B$(){const{brand:e}=It(),{applyBrand:t}=pn(),{push:n}=mr(),[s,i]=r.useState({}),[c,u]=r.useState("idle"),f=r.useRef(s);f.current=s;const h=r.useRef(e);h.current=e;const m=r.useRef(null),g=r.useRef(!1),v=r.useRef(!1),y=r.useCallback(()=>({...h.current.json??{},...f.current}),[]),w=r.useCallback(async()=>{if(!Object.keys(f.current).length)return;if(g.current){v.current=!0;return}g.current=!0,u("saving");const j=f.current;try{const k=await Ce.updateBrand(h.current.id,y());t(k),i(A=>{const M={...A};for(const T of Object.keys(j))A[T]===j[T]&&delete M[T];return M}),u(v.current?"pending":"idle")}catch(k){u("error"),n({kind:"error",title:"Could not save the brand",detail:String((k==null?void 0:k.message)??k),action:{label:"Retry",onClick:()=>void w()}})}finally{g.current=!1,v.current&&(v.current=!1,w())}},[t,y,n]),E=r.useCallback((j,k)=>{m.current&&(clearTimeout(m.current),m.current=null);const A={...f.current,...j};f.current=A,i(A),u("pending");const M=(k==null?void 0:k.debounce)??0;M>0?m.current=setTimeout(()=>void w(),M):w()},[w]),C=r.useCallback(async()=>{m.current&&(clearTimeout(m.current),m.current=null),await w()},[w]),b=r.useCallback(j=>{i({}),f.current={},t(j),u("idle")},[t]),N=e.id;return r.useEffect(()=>{i({}),f.current={},u("idle")},[N]),r.useEffect(()=>{const j=()=>{Object.keys(f.current).length&&_H(h.current.id,y())};return window.addEventListener("beforeunload",j),()=>{window.removeEventListener("beforeunload",j),m.current&&clearTimeout(m.current),j()}},[y]),{json:y(),state:c,patch:E,flush:C,applyRow:b}}function U$(e){return e==="saving"?"Saving…":e==="pending"?"Unsaved changes":e==="error"?"Not saved":"Saved"}function W$(){var y,w;const{brand:e}=It(),{push:t}=mr(),n=B$(),[s,i]=r.useState(!1),[c,u]=r.useState([]),f=((w=(y=n.json)==null?void 0:y.meta)==null?void 0:w.website)??"",[h,m]=r.useState(f);r.useEffect(()=>m(f),[f]);const g=()=>{var N;const E=h.trim(),C=E&&!/^https?:\/\//i.test(E)?`https://${E}`:E;m(C);const b={...((N=n.json)==null?void 0:N.meta)??{}};C?b.website=C:delete b.website,n.patch({meta:b})},v=async()=>{var E,C;i(!0);try{await n.flush();const b=await Ce.refreshBrandFromUrl(e.id);n.applyRow(b),u(((E=b.suggestions)==null?void 0:E.palette)??[]),t({kind:"success",title:"Read the website again",detail:(C=b.warnings)!=null&&C.length?b.warnings.join(" "):"Your edits were kept."})}catch(b){t(dn(b,"Could not read that website"))}finally{i(!1)}};return o.jsxs(o.Fragment,{children:[o.jsx(Fr,{title:"Identity",sub:"The name and the mark.",children:o.jsx(g$,{brand:e,doc:n})}),o.jsx(Fr,{title:"Palette",sub:"Favoured on a shot that asks for the kit.",children:o.jsx("div",{className:"sc-set-block",children:o.jsx(V$,{doc:n,suggestions:c})})}),o.jsx(Fr,{title:"We never",sub:"Held on every shot, whether the kit is asked for or not.",children:o.jsx("div",{className:"sc-set-block",children:o.jsx(d$,{doc:n})})}),o.jsxs(Fr,{title:"Portable",sub:"The kit is a file, not a lock-in.",children:[o.jsxs("div",{className:"sc-set-row","data-stack":"",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Website"}),o.jsx("small",{children:"Reads colours and marks from the site again. Edits are kept; new colours are offered, not applied."})]}),o.jsxs("div",{className:"sc-set-controls",children:[o.jsx("input",{className:"sc-in",value:h,type:"url",inputMode:"url",placeholder:"acme.coffee","aria-label":"Brand website",onChange:E=>m(E.target.value),onBlur:g,onKeyDown:E=>{E.key==="Enter"&&E.currentTarget.blur()}}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:!f||s,onClick:()=>void v(),children:[s?o.jsx(ln,{size:"1"}):o.jsx(Gm,{size:13})," Refresh"]})]})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Export .brand"}),o.jsx("small",{"data-prose":"",children:"A zip holding brand.json and every image it references: the form any tool can read."})]}),o.jsx("a",{className:"sc-btn sc-btn-ghost",href:FH(e.id),download:!0,onClick:()=>void n.flush(),children:"Export"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Changes"}),o.jsx("small",{"data-prose":"",children:"Written as you make them. There is no save button to forget."})]}),o.jsx("span",{className:"sc-tag","data-state":n.state,children:U$(n.state)})]})]})]})}const Gs=e=>e.replace(/\s*\(BYOK\)\s*$/i,""),u1="codex-cli";function G$(e,t){var n;return e.some(s=>s.id===t)?t:((n=e[0])==null?void 0:n.id)??u1}const K$=e=>e.toFixed(3).replace(/0+$/,"").replace(/\.$/,"");function Y$(e){return e.free?e.localOnly?"Runs on your ChatGPT plan":"No cost per image":`$${K$(e.perGeneration)} / image`}function $w(e){return o.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:o.jsx("path",{d:"M22.282 9.821a6 6 0 0 0-.516-4.91a6.05 6.05 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a6 6 0 0 0-3.998 2.9a6.05 6.05 0 0 0 .743 7.097a5.98 5.98 0 0 0 .51 4.911a6.05 6.05 0 0 0 6.515 2.9A6 6 0 0 0 13.26 24a6.06 6.06 0 0 0 5.772-4.206a6 6 0 0 0 3.997-2.9a6.06 6.06 0 0 0-.747-7.073M13.26 22.43a4.48 4.48 0 0 1-2.876-1.04l.141-.081l4.779-2.758a.8.8 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494M3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085l4.783 2.759a.77.77 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646M2.34 7.896a4.5 4.5 0 0 1 2.366-1.973V11.6a.77.77 0 0 0 .388.677l5.815 3.354l-2.02 1.168a.08.08 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.08.08 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667m2.01-3.023l-.141-.085l-4.774-2.782a.78.78 0 0 0-.785 0L9.409 9.23V6.897a.07.07 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.8.8 0 0 0-.393.681zm1.097-2.365l2.602-1.5l2.607 1.5v2.999l-2.597 1.5l-2.607-1.5Z"})})}function q$(e){return o.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:o.jsx("path",{d:"M16.778 1.844v1.919q-.569-.026-1.138-.032-.708-.008-1.415.037c-1.93.126-4.023.728-6.149 2.237-2.911 2.066-2.731 1.95-4.14 2.75-.396.223-1.342.574-2.185.798-.841.225-1.753.333-1.751.333v4.229s.768.108 1.61.333c.842.224 1.789.575 2.185.799 1.41.798 1.228.683 4.14 2.75 2.126 1.509 4.22 2.11 6.148 2.236.88.058 1.716.041 2.555.005v1.918l7.222-4.168-7.222-4.17v2.176c-.86.038-1.611.065-2.278.021-1.364-.09-2.417-.357-3.979-1.465-2.244-1.593-2.866-2.027-3.68-2.508.889-.518 1.449-.906 3.822-2.59 1.56-1.109 2.614-1.377 3.978-1.466.667-.044 1.418-.017 2.278.02v2.176L24 6.014Z"})})}function X$(e){return o.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:o.jsx("path",{d:"M24 10.262v2.712h-9.518V24h-3.034V10.262zm0-5.131v2.717H8.755V24H5.722V5.131zM24 0v2.717H3.034V24H0V0z"})})}const Q$=[{engineId:"openrouter",settingKey:"openrouter_api_key",hint:"sk-or-...",keysUrl:"https://openrouter.ai/keys"},{engineId:"replicate",settingKey:"replicate_api_token",hint:"r8_...",keysUrl:"https://replicate.com/account/api-tokens"},{engineId:"fal",settingKey:"fal_key",hint:"fal_...",keysUrl:"https://fal.ai/dashboard/keys"}],Fw=e=>Q$.find(t=>t.engineId===e),Iw={"codex-cli":{Mark:$w,size:16,plate:"#FFFFFF",ink:"#000000"},openrouter:{Mark:q$,size:18,plate:"#FFFFFF",ink:"#7624F4"},replicate:{Mark:X$,size:15,plate:"#E42022",ink:"#FFFFFF"}},xh=e=>{const t=Iw[e];return t?{plate:t.plate,ink:t.ink}:void 0},J$={demo:fH};function _w({engineId:e,scale:t=1}){const n=Iw[e];if(n){const i=Math.round(n.size*t);return o.jsx(n.Mark,{width:i,height:i})}const s=J$[e]??l1;return o.jsx(s,{size:Math.round(15*t)})}const eF=e=>[...e].sort((t,n)=>+(n.id===u1)-+(t.id===u1));function tF({engines:e}){const t=Q1(),s=e.filter(i=>i.available).length===0;return o.jsx(Fr,{sub:"Where your images are generated. Connect as many as you like, then pick one in the composer.",children:eF(e).map(i=>{const c=Fw(i.id),u=Gs(i.displayName),f=i.code==="not-installed"||i.code==="not-authenticated",h=c?i.available?"Manage":"Connect":f?"Set up":null,m=i.available?"Connected":null,g=xh(i.id);return o.jsxs("div",{className:"sc-eng","data-connected":i.available?"":void 0,children:[o.jsx("span",{className:"sc-eng-ic","data-brand":g?"":void 0,style:g?{"--sc-plate":g.plate,"--sc-ink":g.ink}:void 0,children:o.jsx(_w,{engineId:i.id})}),o.jsxs("span",{className:"sc-eng-name",children:[o.jsx("b",{children:u}),o.jsx("small",{children:Y$(i)})]}),m&&o.jsxs("span",{className:"sc-stat",children:[o.jsx("span",{className:"d"}),m]}),!m&&!h&&i.reason&&o.jsx("span",{className:"sc-stat sc-stat-why",children:i.reason}),h&&o.jsx("button",{type:"button",className:`sc-btn ${s&&!c?"sc-btn-primary":"sc-btn-ghost"} sc-eng-act`,onClick:()=>t(i.id),"aria-label":`${h} ${u}`,children:h})]},i.id)})})}const nF={npx:"run with npx",global:"installed with npm",managed:"managed install",dev:"running from source",unknown:"local studio"};function rF(e){switch(e){case"npx":return"npx scenri update";case"global":case"managed":return"scenri update";default:return"npx scenri@latest"}}function aF({version:e}){var y;const t=ep(),n=td(),s=t.status,[i,c]=r.useState(null),[u,f]=r.useState(!1);r.useEffect(()=>{Ce.settings().then(w=>c(!!w.updateCheck)).catch(()=>{})},[]);const h=async()=>{if(i===null)return;const w=!i;c(w);try{await Ce.saveSettings({updateCheck:w})}catch{c(!w)}},m=rF(e==null?void 0:e.installKind),g=async()=>{try{await navigator.clipboard.writeText(m),f(!0),setTimeout(()=>f(!1),1600)}catch{}},v=t.checking?o.jsx("span",{className:"sc-tag",children:"checking…"}):s!=null&&s.available?o.jsxs("span",{className:"sc-tag sc-tag-gold",children:[s.latest," available"]}):s!=null&&s.error?o.jsx("span",{className:"sc-tag",children:"couldn't reach npm"}):s!=null&&s.checkedAt?o.jsx("span",{className:"sc-tag",children:"up to date"}):null;return o.jsxs(Fr,{children:[o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"scenri"}),o.jsxs("small",{children:[e?`v${e.version}`:""," · ",nF[(e==null?void 0:e.installKind)??"unknown"]]})]})}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Updates"}),o.jsxs("small",{"data-prose":"",children:[s!=null&&s.available?`You are on ${s.current}.`:"New versions announce themselves here.",(s==null?void 0:s.available)&&s.notesUrl&&o.jsxs(o.Fragment,{children:[" ",o.jsxs("a",{href:s.notesUrl,target:"_blank",rel:"noreferrer",children:["See what's in ",s.latest]})]})]})]}),v,o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:t.checking,onClick:()=>void t.checkNow(),children:"Check for updates"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"What's new"}),o.jsx("small",{children:((y=n.entry)==null?void 0:y.title)??`What changed in ${n.version?`v${n.version}`:"this version"}.`})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>n.open(),children:"Show"})]}),(s==null?void 0:s.available)&&((e==null?void 0:e.installKind)==="dev"?o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Update"}),o.jsx("small",{"data-prose":"",children:"Running from source. Pull and rebuild when you're ready. Nothing here touches your checkout."})]})}):hw(s)?o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Update"}),o.jsx("small",{"data-prose":"",children:t.applyError??(s.phase==="ready"?`${s.stagedVersion} is downloaded and verified. Restarting finishes it.`:"Downloads next to the running version, verifies it loads, then restarts. Your library stays put.")})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:t.busy!=="idle",onClick:()=>void t.apply(),children:t.busy==="applying"?"Updating…":s.phase==="ready"?"Restart now":"Update now"})]}):o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Update"}),o.jsxs("small",{"data-prose":"",children:["Run ",o.jsx("code",{children:m})," in a terminal, then start scenri again. Your library is not part of the app and stays put."]})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>void g(),children:u?"Copied":"Copy command"})]})),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Check for updates automatically"}),o.jsx("small",{"data-prose":"",children:"One version-number request to npm, at most daily. Off means scenri never calls anywhere by itself."})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:i===null,onClick:()=>void h(),children:i===null?"…":i?"Turn off":"Turn on"})]}),o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"License"}),o.jsx("small",{children:"AGPL-3.0 for the app · Apache-2.0 for the .brand format"})]})}),o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Open source"}),o.jsxs("small",{children:["Built by Tony Gorb ·"," ",o.jsx("a",{href:"https://github.com/tonygorb/scenri",target:"_blank",rel:"noreferrer",children:"GitHub"})]})]})})]})}function sF(){const{choice:e,setChoice:t}=WL(),n=[{id:"light",label:"Light",swatch:"linear-gradient(140deg,#ffffff 55%,#f1f1f1)"},{id:"dark",label:"Dark",swatch:"linear-gradient(140deg,#0d0d0d 55%,#1c1c1c)"},{id:"system",label:"System",swatch:"linear-gradient(110deg,#ffffff 50%,#0d0d0d 50%)"}];return o.jsx(Fr,{sub:"Follows your system unless you pick a side.",children:o.jsx("div",{className:"sc-themes",children:n.map(s=>o.jsxs("button",{type:"button",className:"sc-tp","data-on":e===s.id?"":void 0,onClick:()=>t(s.id),children:[o.jsx("span",{className:"swl",style:{background:s.swatch}}),o.jsxs("span",{className:"lbl",children:[o.jsx("span",{className:"dot"}),s.label]})]},s.id))})})}function oF({engines:e,onSaved:t}){const n=e.filter(u=>!u.free),[s,i]=r.useState({});r.useEffect(()=>{i(Object.fromEntries(n.map(u=>[u.id,u.cap===null?"":String(u.cap)])))},[e]);const c=async u=>{const f=(s[u]??"").trim(),h=f===""?null:Number(f);h!==null&&(Number.isNaN(h)||h<0)||(await Ce.setCap(u,h),t())};return n.length?o.jsx(Fr,{sub:"Your own API budget. Generation stops before a cap is crossed, so a runaway loop cannot spend your month.",children:n.map(u=>{const f=u.generationsLeft,h=u.generationsTotal,m=h&&h>0?Math.min(100,Math.round((h-(f??0))/h*100)):0,g=`$${u.monthlySpend.toFixed(2)} this month`;return o.jsxs("div",{className:"sc-cap",children:[o.jsxs("div",{className:"sc-cap-top",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:Gs(u.displayName)}),o.jsx("small",{children:f===null?g:`${g} · ${f} left`})]}),o.jsxs("div",{className:"sc-cap-in",children:[o.jsx("span",{className:"sc-cap-dollar",children:"$"}),o.jsx("input",{className:"sc-in",inputMode:"decimal",placeholder:"None",value:s[u.id]??"",onChange:v=>i(y=>({...y,[u.id]:v.target.value})),onBlur:()=>void c(u.id),"aria-label":`${Gs(u.displayName)} monthly cap in dollars`})]})]}),h!==null&&o.jsx("div",{className:"sc-meter",children:o.jsx("i",{style:{width:`${m}%`}})})]},u.id)})}):o.jsx(Fr,{sub:"Nothing to cap yet. Caps apply to engines you pay for per image. Codex usage counts against your ChatGPT plan, which OpenAI meters, not scenri.",children:o.jsx("p",{className:"sc-set-empty",children:"Add a paid engine key and its cap appears here."})})}function is({label:e,title:t,body:n,busy:s,onConfirm:i,fullWidth:c}){return o.jsxs(Yc,{children:[o.jsx(b5,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost sc-btn-red",disabled:s,style:c?{width:"100%"}:void 0,children:e})}),o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:t}),o.jsx(Qc,{size:"2",children:n}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:i,children:e})})]})]})]})}function lF({onDone:e}){const{brand:t}=It(),n=an(),[s,i]=r.useState(!1),c=r.useCallback(async u=>{i(!0);try{await Ce.deleteData(u),e(),u==="all"&&window.location.replace("/")}finally{i(!1)}},[e]);return o.jsxs(Fr,{sub:"These do not come back. Export from Library first if you are not certain.",children:[o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Delete this brand"}),o.jsxs("small",{"data-prose":"",children:["Removes ",Po(t),", its sets and every shot. Other brands stay."]})]}),o.jsx(is,{label:"Delete brand",title:`Delete ${Po(t)}?`,body:"The kit, its sets and every shot go with it. Exports you already downloaded stay yours.",busy:s,onConfirm:()=>{i(!0),Ce.deleteBrand(t.id).then(e).then(()=>n("/",{replace:!0})).finally(()=>i(!1))}})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Delete generated shots"}),o.jsx("small",{"data-prose":"",children:"Keeps brands, cast and scenes. Removes every set and every generated shot."})]}),o.jsx(is,{label:"Delete shots",title:"Delete every generated shot?",body:"Brands, cast and scenes stay. Every set and every generated shot goes.",busy:s,onConfirm:()=>void c("shots")})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Delete all local data"}),o.jsx("small",{"data-prose":"",children:"Brands, cast, sets, shots and saved keys, in one go."})]}),o.jsx(is,{label:"Delete everything",title:"Delete everything on this machine?",body:"The whole library folder is removed: brands, cast, sets, shots and your saved keys. There is no undo.",busy:s,onConfirm:()=>void c("all")})]})]})}const iF=e=>e>1e9?`${(e/1e9).toFixed(1)} GB`:e>1e6?`${Math.round(e/1e6)} MB`:`${Math.round(e/1e3)} KB`,y2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function cF(e){return e===0?0:e<3?1:e<6?2:e<12?3:4}function Mg(e,t){const n=t*7,s=new Date,i=new Date(s);i.setDate(s.getDate()-(n-1)-s.getDay());const c=[],u=[];let f=-1,h=0;for(let m=0;m<n;m++){const g=new Date(i);g.setDate(i.getDate()+m);const v=g.toISOString().slice(0,10),y=e.get(v)??0;if(h+=y,c.push({key:v,level:cF(y),title:y?`${y} run${y===1?"":"s"} on ${g.getDate()} ${y2[g.getMonth()]}`:`nothing on ${g.getDate()} ${y2[g.getMonth()]}`}),g.getDay()===0){const w=g.getMonth()!==f&&g.getDate()<=7;w&&(f=g.getMonth()),u.push({key:v,label:w?y2[g.getMonth()]:""})}}return{cells:c,months:u,sum:h}}function uF(){const[e,t]=r.useState(null);return r.useEffect(()=>{Ce.home().then(t).catch(()=>{})},[]),o.jsxs(Fr,{sub:"Plain files on this machine. Open them yourself, back them up like anything else.",children:[o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Library folder"}),o.jsx("small",{children:e?`${e.dir} · ${iF(e.bytes)} across ${e.images} images`:"…"})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>void Ce.reveal(),children:"Reveal"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Export everything"}),o.jsx("small",{children:"One zip: brands, cast, briefs, shots. Never keys."})]}),o.jsx("a",{className:"sc-btn sc-btn-ghost",href:"/api/export/all",download:!0,children:"Export"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Telemetry"}),o.jsx("small",{children:"There is none. This row exists to say so."})]}),o.jsx("span",{className:"sc-tag",children:"off, permanently"})]})]})}function Rg({weeks:e,months:t,cells:n}){return o.jsxs("div",{className:"sc-heat-range","data-weeks":e,children:[o.jsx("div",{className:"sc-heat-months",children:t.map(s=>o.jsx("span",{children:s.label},s.key))}),o.jsx("div",{className:"sc-heat-grid",children:n.map(s=>o.jsx("i",{"data-l":s.level||void 0,title:s.title},s.key))})]})}function dF({shots:e}){const t=r.useMemo(()=>e.filter(f=>f.kind!=="root"),[e]),{year:n,quarter:s,total:i,byKind:c}=r.useMemo(()=>{const f=new Map,h={generation:0,edit:0};for(const v of t??[]){const y=String(v.createdAt).slice(0,10);f.set(y,(f.get(y)??0)+1),v.kind==="edit"?h.edit++:h.generation++}const m=Mg(f,53),g=Mg(f,13);return{year:m,quarter:g,total:m.sum,byKind:h}},[t]);if(t===null)return o.jsx("p",{className:"sc-set-empty",children:"Reading your library…"});const u=Math.max(c.generation,c.edit,1);return o.jsxs(o.Fragment,{children:[o.jsx(Fr,{title:"The last year",sub:"One square per day, counted from your own runs.",children:o.jsxs("div",{className:"sc-heat",children:[o.jsx("div",{className:"sc-heat-h",children:o.jsxs("b",{children:[i.toLocaleString()," runs in the last year"]})}),o.jsx(Rg,{weeks:53,months:n.months,cells:n.cells}),o.jsx(Rg,{weeks:13,months:s.months,cells:s.cells})]})}),o.jsx(Fr,{title:"By activity",children:o.jsxs("div",{className:"sc-bars",children:[o.jsxs("div",{className:"sc-bar",children:[o.jsx("span",{className:"k",children:"Generations"}),o.jsx("span",{className:"t",children:o.jsx("i",{style:{width:`${c.generation/u*100}%`}})}),o.jsx("span",{className:"v",children:c.generation})]}),o.jsxs("div",{className:"sc-bar",children:[o.jsx("span",{className:"k",children:"Edits"}),o.jsx("span",{className:"t",children:o.jsx("i",{style:{width:`${c.edit/u*100}%`}})}),o.jsx("span",{className:"v",children:c.edit})]})]})})]})}const Hl=[{id:"brand",label:"Brand kit",title:"Brand kit",icon:o.jsx(SH,{size:14})},{id:"engines",label:"Providers",title:"Providers",icon:o.jsx(l1,{size:14})},{id:"budget",label:"Budget",title:"Budget",icon:o.jsx(jH,{size:14})},{id:"usage",label:"Usage",title:"Usage",icon:o.jsx(gH,{size:14})},{id:"library",label:"Library",title:"Library",icon:o.jsx(uH,{size:14})},{id:"appearance",label:"Appearance",title:"Appearance",icon:o.jsx(PH,{size:14})},{id:"about",label:"About",title:"About",icon:o.jsx(qm,{size:14})},{id:"danger",label:"Danger zone",title:"Danger zone",icon:o.jsx(Y1,{size:14}),danger:!0}];function fF({engines:e,shots:t,onSaved:n}){const s=gs("settings"),i=s.value!==null,[c,u]=r.useState(null);r.useEffect(()=>{if(!i||c)return;let g=!0;return Ce.version().then(v=>g&&u(v)).catch(()=>{}),()=>{g=!1}},[i,c]);const f=Hl.some(g=>g.id===s.value)?s.value:"brand",h=g=>s.set(g),m=r.useRef(null);return r.useEffect(()=>{const g=m.current;if(!g)return;const v=g.querySelector('[aria-current="page"]');if(!(v instanceof HTMLElement))return;const y=requestAnimationFrame(()=>{const w=v.offsetLeft-(g.clientWidth-v.offsetWidth)/2;g.scrollTo({left:Math.max(0,w)})});return()=>cancelAnimationFrame(y)},[f,i]),o.jsx(el,{open:i,onOpenChange:g=>!g&&s.close(),children:o.jsxs(tl,{className:"sc-set",maxWidth:"940px","aria-describedby":void 0,onOpenAutoFocus:ru,children:[o.jsx(nl,{style:{display:"none"},children:"Settings"}),o.jsxs("div",{className:"sc-set-grid",children:[o.jsxs("nav",{className:"sc-set-rail","aria-label":"Settings",children:[o.jsx("p",{className:"sc-set-group",children:"This brand"}),o.jsx(x2,{p:Hl[0],on:f==="brand",pick:()=>h("brand")}),o.jsx("p",{className:"sc-set-group",children:"Generation"}),Hl.slice(1,4).map(g=>o.jsx(x2,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id)),o.jsx("p",{className:"sc-set-group",children:"This machine"}),Hl.slice(4).map(g=>o.jsx(x2,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id)),o.jsx("span",{className:"sc-set-spacer"}),o.jsxs("p",{className:"sc-set-ver",children:[c?`v${c.version}`:"scenri"," · local"]})]}),o.jsxs("div",{className:"sc-set-body",children:[o.jsxs("div",{className:"sc-set-head",children:[o.jsx("b",{children:Hl.find(g=>g.id===f).title}),o.jsx("span",{className:"sc-set-sp"}),o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx("nav",{className:"sc-set-tabs","aria-label":"Settings",ref:m,children:Hl.map(g=>o.jsx(hF,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id))}),o.jsxs("div",{className:"sc-set-scroll",children:[f==="brand"&&o.jsx(W$,{}),f==="engines"&&o.jsx(tF,{engines:e}),f==="budget"&&o.jsx(oF,{engines:e,onSaved:n}),f==="usage"&&o.jsx(dF,{shots:t}),f==="library"&&o.jsx(uF,{}),f==="appearance"&&o.jsx(sF,{}),f==="about"&&o.jsx(aF,{version:c}),f==="danger"&&o.jsx(lF,{onDone:n})]})]})]})]})})}function x2({p:e,on:t,pick:n}){return o.jsxs("button",{type:"button",className:"sc-set-item","data-on":t?"":void 0,"data-danger":e.danger?"":void 0,"aria-current":t?"page":void 0,onClick:n,children:[e.icon,e.label]})}function hF({p:e,on:t,pick:n}){return o.jsx("button",{type:"button",className:"sc-chip","data-active":t?"true":void 0,"data-danger":e.danger?"":void 0,"aria-current":t?"page":void 0,onClick:n,children:e.label})}const mF=["January","February","March","April","May","June","July","August","September","October","November","December"];function pF(e){const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return e;const n=mF[Number(t[2])-1];return n?`${Number(t[3])} ${n} ${t[1]}`:e}function gF(){const e=gs("whatsnew"),{status:t,version:n,entry:s,changelogUrl:i,releasesUrl:c,markSeen:u}=td(),f=e.value!==null,h=()=>{u(),e.close()},m=t==="ready"&&!s&&!i,g=s!==null&&s.sections.length>1,v=t==="loading"?"Reading the release notes.":t==="failed"?"scenri could not read its release notes. If you are running a development server, it may predate this feature; restart it and try again.":m?"You are running a development build. What changed in a version appears here once that version is published.":s?"Maintenance only. Nothing here changes how scenri works for you.":"This version went out without a written summary.",y=s?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-vh",children:"Version "}),o.jsx("span",{className:"sc-wn-ver",children:s.version}),o.jsx("span",{"aria-hidden":"true",children:" · "}),pF(s.date)]}):t==="failed"?"Release notes unavailable":t==="loading"?"Loading":m?"Development build":o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-vh",children:"Version "}),o.jsx("span",{className:"sc-wn-ver",children:n})]});return o.jsxs(np,{open:f,className:"sc-wn",maxWidth:"420px",described:!0,onDismiss:h,children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(rp,{className:"sc-newdlg-title",children:"What's new"}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx(ND,{className:"sc-wn-sub",children:y}),o.jsxs("div",{className:"sc-newdlg-body",children:[(s==null?void 0:s.title)&&o.jsx("p",{className:"sc-wn-lede sc-accent",children:s.title}),s&&s.sections.length>0?s.sections.map(w=>o.jsxs("section",{className:"sc-wn-sec",children:[g&&o.jsx("h3",{className:"sc-wn-head",children:w.heading}),o.jsx("p",{className:"sc-wn-txt",children:w.body})]},w.heading)):o.jsx("p",{className:"sc-wn-txt",children:v})]}),o.jsxs("div",{className:"sc-newdlg-foot sc-wn-foot",children:[c&&o.jsxs("a",{className:"sc-wn-link",href:c,target:"_blank",rel:"noreferrer",children:["All releases",o.jsx(W1,{size:13})]}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Got it"})})]})]})}const vF=2e3,yF=5*6e4;function xF({engines:e,onSaved:t}){const n=gs("setup"),s=n.close,i=n.value,c=i?Fw(i):void 0,f=!!c||i==="codex-cli",h=e.find(m=>m.id===i);return o.jsx(el,{open:f,onOpenChange:m=>!m&&s(),children:o.jsx(tl,{className:"sc-setup",maxWidth:"520px","aria-describedby":void 0,onOpenAutoFocus:ru,children:c?o.jsx(wF,{provider:c,name:h?Gs(h.displayName):c.engineId,connected:!!(h!=null&&h.available),onSaved:t,onDone:s}):o.jsx(bF,{engines:e,onSaved:t,onDone:s})})})}function Ow({title:e}){return o.jsxs("div",{className:"sc-setup-head",children:[o.jsx(nl,{className:"sc-setup-title",children:e}),o.jsx("span",{className:"sc-set-sp"}),o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]})}function wF({provider:e,name:t,connected:n,onSaved:s,onDone:i}){var b,N;const[c,u]=r.useState(""),[f,h]=r.useState(!1),[m,g]=r.useState(null),[v,y]=r.useState(!1),w=r.useRef(null);r.useEffect(()=>{var j;(j=w.current)==null||j.focus()},[]);const E=async()=>{const j=c.trim();if(j){h(!0),g(null);try{await Ce.saveSettings({[e.settingKey]:j}),u(""),s(),i()}catch(k){g(k.message)}finally{h(!1)}}},C=async()=>{h(!0),g(null);try{await Ce.saveSettings({[e.settingKey]:""});const j=await Ce.settings();if(s(),j[e.settingKey]){y(!0);return}i()}catch(j){g(j.message)}finally{h(!1)}};return o.jsxs(o.Fragment,{children:[o.jsx(Ow,{title:n?`${t} key`:`Connect ${t}`}),o.jsxs("div",{className:"sc-setup-body",children:[o.jsxs("div",{className:"sc-setup-who",children:[o.jsx("span",{className:"sc-eng-ic","data-brand":"",style:{"--sc-plate":(b=xh(e.engineId))==null?void 0:b.plate,"--sc-ink":(N=xh(e.engineId))==null?void 0:N.ink},children:o.jsx(_w,{engineId:e.engineId})}),o.jsx("p",{className:"sc-setup-lead",children:n?`A key is saved for ${t}. Paste a new one to replace it, or disconnect to remove it from this computer.`:`Paste a key from ${t}. It is stored in your library folder on this computer, sent only to ${t}, and never shown again.`})]}),o.jsxs("form",{className:"sc-setup-key",onSubmit:j=>{j.preventDefault(),E()},children:[o.jsx("input",{ref:w,className:"sc-in",type:"password",placeholder:e.hint,value:c,onChange:j=>u(j.target.value),autoComplete:"off",name:e.settingKey,"aria-label":`${t} key`}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"submit",className:"sc-btn sc-btn-primary",disabled:f||!c.trim(),children:[f?o.jsx(ln,{size:"1"}):o.jsx(Mx,{size:15}),n?"Replace key":"Connect"]}),o.jsxs("a",{className:"sc-setup-alt",href:e.keysUrl,target:"_blank",rel:"noreferrer",children:["Get a key ",o.jsx(W1,{size:13})]})]})]}),n&&o.jsx("div",{className:"sc-setup-cut",children:o.jsx(is,{label:"Disconnect",title:`Disconnect ${t}?`,body:"The key is deleted from this computer. Nothing you have already generated changes, and you can paste a new key at any time.",busy:f,onConfirm:()=>void C()})}),v&&o.jsxs("p",{className:"sc-setup-note",children:["The stored key is gone, but ",t," is still connected through the ",e.settingKey.toUpperCase()," ","environment variable on this computer. Remove it from your shell to disconnect fully."]}),m&&o.jsx("div",{className:"sc-setup-problem",children:o.jsxs("p",{"data-detail":"",children:[o.jsx(nw,{size:15})," ",m]})})]})]})}function bF({engines:e,onSaved:t,onDone:n}){const s=Q1(),[i,c]=r.useState("checking"),[u,f]=r.useState(null),[h,m]=r.useState(!1),g=r.useRef(null),v=r.useCallback(()=>{g.current!==null&&(window.clearInterval(g.current),g.current=null)},[]),y=r.useCallback(async()=>{const{state:N}=await Ce.codexStatus();return c(N),N},[]);r.useEffect(()=>(f(null),c("checking"),y().catch(()=>c("not-installed")),v),[y,v]),r.useEffect(()=>{i==="ready"&&t()},[i,t]);const w=async()=>{f(null),c("installing");try{const N=await Ce.installCodex();if(N.ok){c(N.state);return}f({detail:N.detail,command:N.fallbackCommand,docsUrl:N.docsUrl}),c(N.state)}catch(N){f({detail:N.message,command:"npm install -g @openai/codex"}),c("not-installed")}},E=async()=>{f(null),c("signing-in");const N=Date.now();v(),g.current=window.setInterval(()=>{if(Date.now()-N>yF){v(),c("not-authenticated"),f({detail:"Sign-in did not finish. Try again, or use the command below.",command:"codex login"});return}Ce.codexStatus().then(({state:j})=>{j==="ready"&&(v(),c("ready"))}).catch(()=>{})},vF);try{const j=await Ce.loginCodex();if(v(),j.ok){c(j.state);return}f({detail:j.detail,command:j.fallbackCommand}),c(j.state)}catch(j){v(),f({detail:j.message,command:"codex login --device-auth"}),c("not-authenticated")}},C=N=>{var j;(j=navigator.clipboard)==null||j.writeText(N).then(()=>{m(!0),window.setTimeout(()=>m(!1),1600)})},b=e.filter(N=>N.available&&N.id!=="codex-cli"&&!N.localOnly);return o.jsxs(o.Fragment,{children:[o.jsx(Ow,{title:"Set up image generation"}),o.jsx(EF,{phase:i}),o.jsxs("div",{className:"sc-setup-body",children:[i==="checking"&&o.jsxs("p",{className:"sc-setup-lead",children:[o.jsx(ln,{size:"1"})," Checking this computer."]}),(i==="not-installed"||i==="installing")&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"scenri generates with Codex CLI, a small official helper from OpenAI that runs on this computer and uses your own ChatGPT plan. It needs to be installed once."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:w,disabled:i==="installing",children:[i==="installing"?o.jsx(ln,{size:"1"}):o.jsx(xx,{size:15}),i==="installing"?"Installing":"Install Codex CLI"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>c("no-plan"),children:"I do not have ChatGPT"})]})]}),(i==="not-authenticated"||i==="signing-in")&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Codex CLI is installed. Sign in with the ChatGPT account whose plan should cover your images. This opens your browser, and scenri never sees your password or token."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:E,disabled:i==="signing-in",children:[i==="signing-in"?o.jsx(ln,{size:"1"}):o.jsx(AH,{size:15}),i==="signing-in"?"Waiting for your browser":"Sign in with ChatGPT"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>c("no-plan"),children:"I do not have ChatGPT"})]}),i==="signing-in"&&o.jsx("p",{className:"sc-setup-note",children:"Finish in the browser tab that just opened. This screen updates itself."})]}),i==="ready"&&o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"sc-setup-lead",children:[o.jsx(_a,{size:15})," Codex CLI is ready. Your images run on your own ChatGPT plan, and scenri adds nothing to the bill."]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:n,children:"Start creating"})]}),i==="no-plan"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Codex CLI draws on a ChatGPT plan, so without one there is nothing behind it to generate your images."}),o.jsx("p",{className:"sc-setup-lead",children:"You can use your own key from an image provider instead. You pay that provider directly, per image, and the key stays in your library folder on this computer."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>s("openrouter"),children:[o.jsx(Mx,{size:15})," Add a provider key"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>void y(),children:"Back to Codex setup"})]}),b.length>0&&o.jsxs("p",{className:"sc-setup-note",children:[b.map(N=>Gs(N.displayName)).join(", ")," is already connected, so you can generate now."]})]}),u&&o.jsxs("div",{className:"sc-setup-problem",children:[o.jsxs("p",{"data-detail":"",children:[o.jsx(nw,{size:15})," ",u.detail??"That did not work."]}),u.command&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-note",children:"Run this in Terminal, then reopen this window:"}),o.jsxs("div",{className:"sc-setup-cmd",children:[o.jsx("code",{children:u.command}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>C(u.command),children:[h?o.jsx(_a,{size:14}):o.jsx(mH,{size:14}),h?"Copied":"Copy"]})]})]}),u.docsUrl&&o.jsxs("a",{className:"sc-setup-alt",href:u.docsUrl,target:"_blank",rel:"noreferrer",children:["Installation help ",o.jsx(W1,{size:13})]})]})]})]})}function EF({phase:e}){if(e==="no-plan")return null;const t=e==="not-authenticated"||e==="signing-in"||e==="ready",n=e==="ready";return o.jsxs("ol",{className:"sc-setup-steps",children:[o.jsxs("li",{"data-on":t?"":void 0,"data-now":e==="not-installed"||e==="installing"?"":void 0,children:[t?o.jsx(_a,{size:12}):o.jsx("span",{className:"d"})," Install"]}),o.jsxs("li",{"data-on":n?"":void 0,"data-now":e==="not-authenticated"||e==="signing-in"?"":void 0,children:[n?o.jsx(_a,{size:12}):o.jsx("span",{className:"d"})," Sign in"]})]})}function CF(){const{brands:e}=pn(),t=Zw(e);return t?o.jsx(Ys,{to:Vo(t),replace:!0}):o.jsx(Ys,{to:"/setup",replace:!0})}function Zw(e){const t=VL();return e.find(n=>n.id===t)??e[0]??null}const Vw=r.createContext(null);function It(){const e=r.useContext(Vw);if(!e)throw new Error("useBrand must be used inside BrandLayout");return e}const zw=r.createContext(null);function SF(){const e=r.useContext(zw);if(!e)throw new Error("useAssetsPanel must be used inside BrandLayout");return e}function jF(){const{brandSlug:e}=za(),{pathname:t,search:n}=mn(),s=lr({path:Ye.brand,end:!1}),{brands:i,engines:c,refresh:u}=pn(),[f,h]=r.useState(null),[m,g]=r.useState([]),[v,y]=r.useState([]),[w,E]=r.useState({}),[C,b]=r.useState(!1),[N,j]=Ia(cr.assetsOpen,window.innerWidth>=1280),k=r.useCallback(()=>j(te=>!te),[]),A=r.useMemo(()=>({open:N,toggle:k,setOpen:j}),[N,k]);o$();const M=i.find(te=>te.slug===e)??i.find(te=>te.id===e)??null,{products:T,loaded:D,reload:L}=l$(M==null?void 0:M.id),Y=r.useCallback(async()=>{if(!M)return;const te=await Ce.workspace(M.id);h(te.project),g(te.nodes),y(te.sets),E(te.membership),b(!0)},[M==null?void 0:M.id]),I=r.useCallback(te=>y(O=>O.map(ne=>ne.id===te.id?te:ne)),[]),se=r.useCallback(te=>y(O=>O.filter(ne=>ne.id!==te)),[]);r.useEffect(()=>{b(!1)},[M==null?void 0:M.id]),r.useEffect(()=>{M&&zL(M.id)},[M==null?void 0:M.id]),r.useEffect(()=>{Y()},[Y,M==null?void 0:M.updatedAt]);const U=s?t.slice(s.pathnameBase.length):"";if(!M){const te=Zw(i);return o.jsx(Ys,{to:te?Vo(te)+U+n:Ye.root,replace:!0})}return e!==M.slug?o.jsx(Ys,{to:Vo(M)+U+n,replace:!0}):o.jsxs(Vw.Provider,{value:{brand:M,workspace:f,nodes:m,sets:v,membership:w,products:T,productsLoaded:D,refreshProducts:L,loaded:C,refresh:Y,applySet:I,dropSet:se},children:[o.jsx(fF,{engines:c,shots:m,onSaved:u}),o.jsx(xF,{engines:c,onSaved:u}),o.jsx(gF,{}),o.jsxs(ED,{brand:M,children:[o.jsx(MF,{}),o.jsx(GD,{children:o.jsx(zw.Provider,{value:A,children:o.jsxs("div",{className:"sc-shell",children:[o.jsx(r$,{}),o.jsx(Uh,{}),o.jsx(jD,{})]})})})]})]})}function kF(e){return!e.unread||e.spent||!e.loaded||!e.visible||e.dialogOpen?!1:e.running===0&&e.builds===0}const NF=2500,Bw=r.createContext(null);function td(){const e=r.useContext(Bw);if(!e)throw new Error("useWhatsNew must be used inside WhatsNewProvider");return e}function AF({children:e}){const[t,n]=r.useState(null),[s,i]=r.useState(null),[c,u]=r.useState(null),[f,h]=r.useState(null),[m,g]=r.useState(null),[v,y]=r.useState("loading"),[w,E]=r.useState(!1),C=gs("whatsnew");r.useEffect(()=>{let M=!0;return Ce.releaseNotes().then(T=>{M&&(n(T.version),i(T.entry),u(T.changelogUrl),h(T.releasesUrl??null),g(T.seen),y("ready"))}).catch(()=>{M&&y("failed")}),()=>{M=!1}},[]);const b=C.open,N=r.useCallback(()=>b(t??"latest"),[b,t]),j=r.useCallback(()=>{E(!0),N()},[N]),k=r.useCallback(()=>{!t||m===t||(g(t),Ce.releaseSeen(t).catch(()=>{}))},[t,m]),A=t!==null&&m!==t&&s!==null&&s.sections.length>0;return o.jsx(Bw.Provider,{value:{status:v,version:t,entry:s,changelogUrl:c,releasesUrl:f,unread:A,open:N,autoOpenSpent:w,autoOpen:j,markSeen:k},children:e})}function MF(){const e=td(),{running:t,builds:n}=sl(),{loaded:s}=It(),[i]=li(),[c,u]=r.useState(()=>!document.hidden),f=r.useRef(!1);r.useEffect(()=>{const m=()=>u(!document.hidden);return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]);const h=i.has("settings")||i.has("setup")||i.has("new")||i.has("whatsnew");return r.useEffect(()=>{if(!kF({unread:e.unread,spent:f.current||e.autoOpenSpent,loaded:s,visible:c,dialogOpen:h,running:t,builds:n.length}))return;const g=window.setTimeout(()=>{f.current=!0,e.autoOpen()},NF);return()=>window.clearTimeout(g)},[e,s,c,h,t,n.length]),null}const Uw=r.createContext(null);function pn(){const e=r.useContext(Uw);if(!e)throw new Error("useAppData must be used inside AppShell");return e}function RF(){GH();const[e,t]=r.useState(null),[n,s]=r.useState([]),[i,c]=r.useState(null),u=YH(),f=XH(),h=JH(),m=tD(),g=r.useCallback(y=>{t(w=>w&&w.map(E=>E.id===y.id?y:E))},[]),v=r.useCallback(async()=>{try{const[y,w]=await Promise.all([Ce.brands(),Ce.engines()]);t(y),s(w)}catch(y){c(String(y.message??y))}},[]);return r.useEffect(()=>{v()},[v]),i?o.jsx(fr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(Jm,{failure:oo(i)})}):e===null?o.jsx(fr,{align:"center",justify:"center",height:"100vh",children:o.jsx(ln,{size:"3"})}):o.jsx(Uw.Provider,{value:{brands:e,engines:n,...u,presenters:f.presenters,presenterCategories:f.categories,presenterStyles:f.styles,presentersLoaded:f.loaded,presentersError:f.error,refetchPresenters:f.refetch,demoProducts:h.demoProducts,demoProductCategories:h.categories,demoProductsLoaded:h.loaded,demoProductsError:h.error,showcase:m.showcase,showcaseCategories:m.categories,showcaseLoaded:m.loaded,showcaseError:m.error,refetchShowcase:m.refetch,refresh:v,applyBrand:g},children:o.jsx(lD,{children:o.jsxs(AF,{children:[o.jsx(Bv,{}),o.jsx(Uh,{})]})})})}function gs(e){const[t,n]=li(),s=t.get(e),i=r.useCallback(f=>{n(h=>{const m=new URLSearchParams(h);return m.set(e,f),m},{replace:!1})},[e,n]),c=r.useCallback(f=>{n(h=>{const m=new URLSearchParams(h);return m.set(e,f),m},{replace:!0})},[e,n]),u=r.useCallback(()=>{n(f=>{const h=new URLSearchParams(f);return h.delete(e),h},{replace:!0})},[e,n]);return{value:s,open:i,set:c,close:u}}function Os(e,t=""){const[n,s]=li(),i=n.get(e)??t,c=r.useCallback(u=>{s(f=>{const h=new URLSearchParams(f);return u===null||u===t?h.delete(e):h.set(e,u),h},{replace:!0})},[e,t,s]);return[i,c]}function PF(){var T,D,L,Y,I,se,U,te;const{brands:e,refresh:t}=pn(),n=an(),s=e.length>0,[i,c]=r.useState(""),[u,f]=r.useState(""),[h,m]=r.useState(!1),[g,v]=r.useState(!1),[y,w]=r.useState(null),[E,C]=r.useState(null),b=async O=>{C(O),await t(),n(Vo(O),{replace:!0})},N=async()=>{var O,ne,Q;v(!0),w(null);try{const H=/^https?:\/\//.test(i)?i:`https://${i}`,K=await Ce.brandFromUrl(H),X=await Ce.updateBrand(K.id,{...K.json,meta:{...(O=K.json)==null?void 0:O.meta,website:((Q=(ne=K.json)==null?void 0:ne.meta)==null?void 0:Q.website)||H}});Ce.catalogImport(X.id,H).catch(()=>{}),await b(X)}catch(H){w(String(H.message??H)),v(!1)}},j=async()=>{v(!0),w(null);try{await b(await Ce.createBrand({specVersion:"0.1",meta:{name:u.trim()||"Untitled brand"}}))}catch(O){w(String(O.message??O)),v(!1)}},k=()=>n("/",{replace:!0}),A=E?va((T=E.json)==null?void 0:T.palette):[],M=E?_n((Y=(L=(D=E.json)==null?void 0:D.logos)==null?void 0:L[0])==null?void 0:Y.file):null;return o.jsxs("div",{className:"sc-wiz",children:[o.jsxs("div",{className:"sc-wiz-form",children:[o.jsxs("div",{className:"sc-wiz-head",children:[o.jsxs("button",{type:"button",className:"sc-wiz-back",onClick:k,style:s?void 0:{visibility:"hidden"},children:[o.jsx(wi,{size:11})," Back"]}),o.jsx("span",{}),o.jsx("span",{})]}),o.jsxs("h1",{children:["Your ",o.jsx("em",{children:"brand"})]}),o.jsx("p",{className:"sc-wiz-sub",children:"Paste a website and the kit builds itself: name, logo, palette. You can also start from nothing and fill it in later from Settings."}),o.jsxs("div",{className:"sc-wiz-fields",children:[h?o.jsxs(o.Fragment,{children:[o.jsx("label",{htmlFor:"sc-wiz-name",children:"Brand name"}),o.jsx("input",{id:"sc-wiz-name",className:"sc-in",placeholder:"Brand name",value:u,onChange:O=>f(O.target.value),onKeyDown:O=>O.key==="Enter"&&u.trim()&&!g&&void j()}),o.jsxs("div",{style:{textAlign:"center"},children:[o.jsx("button",{type:"button",className:"sc-wiz-cta",disabled:!u.trim()||g,onClick:()=>void j(),children:g?o.jsx(ln,{size:"1"}):o.jsxs(o.Fragment,{children:["Create it ",o.jsx(sg,{size:12})]})}),o.jsx("div",{children:o.jsx("button",{type:"button",className:"sc-wiz-skip",onClick:()=>m(!1),children:"Build from a website instead"})})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("label",{htmlFor:"sc-wiz-url",children:"Website"}),o.jsx("input",{id:"sc-wiz-url",className:"sc-in",placeholder:"acme.com",value:i,onChange:O=>c(O.target.value),onKeyDown:O=>O.key==="Enter"&&i.trim()&&!g&&void N()}),o.jsx("p",{className:"sc-wiz-hint",children:"We only read public pages. Nothing leaves this machine."}),o.jsxs("div",{style:{textAlign:"center"},children:[o.jsx("button",{type:"button",className:"sc-wiz-cta",disabled:!i.trim()||g,onClick:()=>void N(),children:g?o.jsx(ln,{size:"1"}):o.jsxs(o.Fragment,{children:["Build the kit ",o.jsx(sg,{size:12})]})}),o.jsx("div",{children:o.jsx("button",{type:"button",className:"sc-wiz-skip",onClick:()=>m(!0),children:"Start from scratch instead"})})]})]}),y&&o.jsx(M5,{color:"red",mt:"3",size:"1",children:o.jsx(R5,{children:y})})]})]}),o.jsx("div",{className:"sc-wiz-preview",children:o.jsxs("div",{className:"sc-wiz-card",children:[o.jsx("div",{className:"sc-wiz-cap",children:g?`Reading ${i||"the site"}`:"Live kit preview"}),o.jsxs("div",{className:"sc-wiz-body",children:[g&&!E&&o.jsxs("div",{className:"sc-scrape-row",children:[o.jsx(ln,{size:"1"})," Reading the site and building the kit"]}),!g&&!E&&o.jsx("p",{style:{color:"var(--sc-fg3)",fontSize:12.5,margin:0},children:"The kit appears here as it is found."}),E&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:A.length?16:0},children:[o.jsx("span",{className:"sc-kit-logo",style:{width:44,height:44,padding:7,borderRadius:12},children:M?o.jsx("img",{src:M,alt:""}):o.jsx(Wa,{size:16,color:"var(--sc-fg3)"})}),o.jsxs("span",{children:[o.jsx("b",{dir:"auto",style:{fontFamily:"var(--sc-font-display)",fontSize:16},children:(se=(I=E.json)==null?void 0:I.meta)==null?void 0:se.name}),((te=(U=E.json)==null?void 0:U.meta)==null?void 0:te.tagline)&&o.jsx("small",{dir:"auto",style:{display:"block",color:"var(--sc-fg3)",fontSize:11.5},children:String(E.json.meta.tagline).slice(0,60)})]})]}),A.length>0&&o.jsx("div",{style:{display:"flex",gap:8},children:A.slice(0,5).map(O=>o.jsx("span",{style:{flex:1,height:44,borderRadius:9,border:"1px solid var(--sc-line)",background:O.hex}},O.hex))})]})]})]})})]})}const Ol=e=>{const t=(e??"").trim();return t||null};function LF(e){const t=e;return{name:e.name,brand:Ol(t.brand)??Ol(t.vendor),qualifier:Ol(t.format)??Ol(t.subcategory)??Ol(t.variant)}}function TF(e){return!e.brand||e.name.toLowerCase().startsWith(e.brand.toLowerCase())?e.name:`${e.brand} ${e.name}`}function Oa(e,t){const n=LF(e);if(t==="chip")return n.name;const s=TF(n);return t==="tooltip"?[s,n.qualifier].filter(Boolean).join(" · "):s}function to(e,t){return t==="tooltip"?[e.name,Ol(e.lighting)].filter(Boolean).join(" · "):e.name}function d1(e){return[e.name,...e.legacyNames??[],...e.keywords??[],e.description,e.lighting,e.subject].concat(e.collections??[],e.verticals??[]).filter(Boolean).join(" ")}function mp(e){const t=e;return[e.name,...t.legacyNames??[],...t.keywords??[],t.brand,t.vendor,t.format,t.subcategory,t.variant,t.productType,...t.tags??[]].filter(Boolean).join(" ")}function f1(e){return[e.name,e.descriptor,e.presentation,e.ageRange,e.facial,e.skin,e.hair,e.build,e.wardrobeDefault,...e.suitableCategories,...e.suitableStyles].filter(Boolean).join(" ")}function HF(e,t,n){return[e.title,e.category,n,t.product?mp(t.product):null,t.presenter?f1(t.presenter):null,t.scene?d1(t.scene):null].filter(Boolean).join(" ")}function pp(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?presenter=${encodeURIComponent(s)}&compose=1`)},[n,t])}function gp(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?scene=${encodeURIComponent(s)}&compose=1`)},[n,t])}function wh(e){return{...e.brief,...e.variants?{variants:e.variants}:{},...e.quality?{quality:e.quality}:{},_at:Date.now()}}function DF(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?showcase=${encodeURIComponent(s)}`)},[n,t])}const W0=e=>`sc-favscenes-${e}`,$F=e=>`sc-favlooks-${e}`,FF=e=>`bt-favlooks-${e}`;function Za(e){try{const t=localStorage.getItem(W0(e))??dh($F(e),W0(e))??dh(FF(e),W0(e)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function IF(e,t){try{localStorage.setItem(W0(e),JSON.stringify(t))}catch{}}function Ww(e,t){const n=Za(e),s=n.includes(t)?n.filter(i=>i!==t):[...n,t];return IF(e,s),s}const Gw=[{key:"campaign",label:"Product campaign"},{key:"lifestyle",label:"Lifestyle"},{key:"editorial",label:"Fashion & editorial"},{key:"beauty",label:"Beauty"},{key:"food-drink",label:"Food & drink"},{key:"launch",label:"Tech launch"},{key:"social",label:"Social"},{key:"cinematic",label:"Cinematic"},{key:"catalog",label:"Catalog"},{key:"seasonal",label:"Seasonal"}],_F=new Map(Gw.map(e=>[e.key,e]));function w2(e){var t;return e?((t=_F.get(e))==null?void 0:t.label)??e:null}function OF(e){const t=new Map(Gw.map((n,s)=>[n.key,s]));return[...e].sort((n,s)=>(t.get(n)??99)-(t.get(s)??99)||n.localeCompare(s))}const b2=14,ZF=768,bh=[{px:190,label:"Compact",cells:3},{px:320,label:"Large",cells:2}],Kw=320;function Yw(e){const t=typeof e=="number"&&Number.isFinite(e)?e:Kw;let n=bh[0].px;for(const s of bh)Math.abs(s.px-t)<Math.abs(n-t)&&(n=s.px);return n}const zo=5;function ll(e){const t=typeof e=="number"?e:zo;return t===7||t===5?t:t===6?5:zo}function VF(e){const[t,n]=r.useState(0);return r.useEffect(()=>{if(!e)return;const s=()=>n(e.clientWidth);s();const i=new ResizeObserver(s);return i.observe(e),()=>i.disconnect()},[e]),t}function zF(){const[e,t]=r.useState(()=>window.innerWidth);return r.useEffect(()=>{const n=()=>t(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}function BF(e,t,n){if(e<=0)return{tile:t,cols:1};const s=n?2:Math.max(1,Math.floor((e+b2)/(t+b2)));return{tile:Math.floor((e-b2*(s-1))/s),cols:s}}function ou(e){return ll(e)===5?"large":"compact"}function UF(){const[e]=Ia(cr.wallDensity,zo);return ou(e)}const WF=[{value:7,label:"Compact",hint:"More cards per row",cells:3},{value:5,label:"Large",hint:"Fewer, larger cards",cells:2}],GF=bh.map(e=>({value:e.px,label:e.label,hint:e.label==="Compact"?"More shots per row":"Fewer, larger shots",cells:e.cells}));function nd({value:e,onChange:t}){return o.jsx(qw,{label:"Grid size",value:ll(e),options:WF,onChange:n=>t(n)})}function KF({value:e,onChange:t}){return o.jsx(qw,{label:"Shot size",value:Yw(e),options:GF,onChange:t})}function qw({label:e,value:t,options:n,onChange:s}){const i=r.useRef(null);return r.useLayoutEffect(()=>{const c=i.current;if(!c)return;const u=()=>{const h=c.querySelector(":scope > button[data-on]");if(!h){c.style.setProperty("--sc-density-x","0px"),c.style.setProperty("--sc-density-w","0px");return}c.style.setProperty("--sc-density-x",`${h.offsetLeft}px`),c.style.setProperty("--sc-density-w",`${h.offsetWidth}px`)};u(),c.dataset.inkReady||requestAnimationFrame(()=>{c.dataset.inkReady=""});const f=new ResizeObserver(u);return f.observe(c),()=>f.disconnect()},[t]),o.jsxs("div",{ref:i,className:"sc-density",role:"radiogroup","aria-label":e,children:[o.jsx("span",{className:"sc-density-ink","aria-hidden":!0}),n.map(c=>{const u=t===c.value;return o.jsx("button",{type:"button",role:"radio",className:"sc-density-opt","aria-checked":u,"aria-label":c.label,title:c.hint,"data-on":u||void 0,onClick:()=>{u||s(c.value)},children:o.jsx(YF,{cells:c.cells})},c.value)})]})}function YF({cells:e}){const t=e,n=16,s=1.5,i=1.5,u=(n-s*2-i*(t-1))/t,f=Math.max(.6,u*.22),h=[];for(let m=0;m<t;m++)for(let g=0;g<t;g++)h.push({x:s+g*(u+i),y:s+m*(u+i)});return o.jsx("svg",{className:"sc-density-icon",width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-hidden":!0,children:h.map(m=>o.jsx("rect",{x:m.x,y:m.y,width:u,height:u,rx:f,ry:f,fill:"currentColor"},`${m.x}-${m.y}`))})}function rd(e){return{"--sc-wall-cols":String(ll(e))}}const G0="sc-insert-menu";function qF(e){var t;return!!(((t=e.nativeEvent)==null?void 0:t.isComposing)??e.isComposing)||e.keyCode===229}function Pg(e){return e==="/"?"Scenes":e==="@"?"Presenters":e==="#"?"Colors":"Products"}function XF(e){return e==="/"?"No matching scenes":e==="#"?"No matching colours":e==="@"?"No matching presenters":"No matching products"}function QF({menuOpen:e,handled:t}){return!e&&!t}function JF(e,t){return t||!e?{open:!1}:{open:!0,sigil:e.sigil,query:e.query}}function eI(e,t){const n=t.trim().split(/\s+/).filter(Boolean)[0];if(!n)return[{text:e,hit:!1}];const s=e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase());if(s<0)return[{text:e,hit:!1}];const i=s+n.length;return[...s>0?[{text:e.slice(0,s),hit:!1}]:[],{text:e.slice(s,i),hit:!0},...i<e.length?[{text:e.slice(i),hit:!1}]:[]]}const tI=e=>e.t!=="format",as=()=>[{t:"text",v:""}];function Xw(e){const t=(e.tokens??[]).filter(tI),n=t.length?t:as(),s=n.some(i=>i.t==="template");return e.templateId&&!s?[{t:"template",id:e.templateId},...n]:n}const ha="sc-token",vp=`.${ha}`,Qw=e=>e.t==="template"?`t:${e.id}`:e.t==="product"?`p:${e.id}${e.angle?`|${e.angle}`:""}`:e.t==="character"?`h:${e.id}`:e.t==="color"?`c:${e.hex}|${e.name??""}`:e.t==="ref"?`r:${e.imageHash}`:e.t==="mark"?`m:${e.imageHash}`:"",zs=e=>{const t=e.slice(0,1),n=e.slice(2);if(t==="t")return n?{t:"template",id:n}:null;if(t==="p"){const[s,i]=n.split("|");return s?{t:"product",id:s,...i?{angle:i}:{}}:null}if(t==="h")return n?{t:"character",id:n}:null;if(t==="r")return n?{t:"ref",imageHash:n}:null;if(t==="m")return n?{t:"mark",imageHash:n}:null;if(t==="c"){const[s,i]=n.split("|");return s?{t:"color",hex:s,name:i||void 0}:null}return null};function K0(e){const t=typeof window>"u"?null:window.getSelection();if(!e||!t||t.rangeCount===0)return null;const n=t.getRangeAt(0);if(!e.contains(n.startContainer))return null;if(n.startContainer===e){let i=0;for(let c=0;c<n.startOffset&&c<e.childNodes.length;c++)i+=h1(e.childNodes[c]);return i}let s=0;for(const i of Array.from(e.childNodes)){if(i===n.startContainer)return s+n.startOffset;if(i.contains(n.startContainer))return s+1;s+=h1(i)}return s}function Yl(e,t){if(!e)return;let n=0;for(const s of Array.from(e.childNodes)){const i=h1(s);if(t<=n+i){if(s.nodeType===Node.TEXT_NODE){Ir(e,s,t-n);return}const c=s.nextSibling;if((c==null?void 0:c.nodeType)===Node.TEXT_NODE){Ir(e,c,0);return}break}n+=i}dc(e)}function dc(e){if(!e)return;if(e.focus({preventScroll:!0}),!e.firstChild){const n=window.getSelection(),s=document.createRange();s.selectNodeContents(e),s.collapse(!1),n==null||n.removeAllRanges(),n==null||n.addRange(s);return}const t=nI(e);Ir(e,t,t.length)}function nI(e){const t=e.lastChild;if(t&&t.nodeType===Node.TEXT_NODE)return t;const n=document.createTextNode(" ");return e.appendChild(n),n}function Ir(e,t,n){const s=window.getSelection(),i=document.createRange();i.setStart(t,Math.max(0,Math.min(n,t.length))),i.collapse(!0),s==null||s.removeAllRanges(),s==null||s.addRange(i)}const h1=e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").length:1;function Bs(e){if(!e)return;const t=K0(e);e.normalize();for(const s of Array.from(e.childNodes))s.nodeType===Node.TEXT_NODE&&!(s.textContent??"").length&&s.remove();const n=Array.from(e.childNodes);for(let s=0;s<n.length;s++){const i=n[s];if(i.nodeType!==Node.TEXT_NODE)continue;let c=(i.textContent??"").replace(/ {2,}/g," ");const u=No(i.previousSibling),f=No(i.nextSibling);u?c=c.replace(/^ */," "):i.previousSibling||(c=c.replace(/^ +/,"")),f&&(c=c.replace(/ *$/," ")),i.textContent=c}for(const s of Array.from(e.childNodes))No(s)&&No(s.nextSibling)&&e.insertBefore(document.createTextNode(" "),s.nextSibling);No(e.lastChild)&&e.appendChild(document.createTextNode(" ")),No(e.firstChild)&&e.insertBefore(document.createTextNode(""),e.firstChild),!fc(e)&&t!==null&&Yl(e,t)}function rI(e){return e.querySelector(vp)?!1:!(e.textContent??"").replace(/[\u200B\uFEFF\u00a0]/g,"").trim()}function fc(e){if(!e)return!1;const t=rI(e);return t&&e.firstChild&&e.replaceChildren(),e.toggleAttribute("data-empty",t),t}const No=e=>!!e&&e.nodeType===Node.ELEMENT_NODE&&e.classList.contains(ha);function Lg(e){var i;if(!e)return as();const t=[];let n="";const s=()=>{n&&(t.push({t:"text",v:n}),n="")};for(const c of Array.from(e.childNodes)){if(c.nodeType===Node.TEXT_NODE){n+=c.textContent??"";continue}const u=c,f=(i=u.dataset)==null?void 0:i.tok;if(f){const h=zs(f);if(h){s(),t.push(h);continue}}if(u.tagName==="BR"){n+=`
|
|
99
|
+
`)?v.value.length:0;requestAnimationFrame(()=>{try{v.setSelectionRange(y,y)}catch{}v.focus()})}},r.createElement("input",{spellCheck:"false",...h,ref:Xh(n,t),className:"rt-reset rt-TextFieldInput"}),s)});Kl.displayName="TextField.Root";const OL=r.forwardRef((e,t)=>{const{className:n,color:s,side:i,...c}=hn(e,_L);return r.createElement("div",{"data-accent-color":s,"data-side":i,...c,ref:t,className:Xe("rt-TextFieldSlot",n)})});OL.displayName="TextField.Slot";const cr={lastBrand:"scenri:last-brand",engine:"scenri:engine",quality:"scenri:quality",count:"scenri:count",format:"scenri:format",assetsOpen:"scenri:assets-open",assetsExpanded:"scenri:assets-expanded",tileSize:"scenri:tile-size",wallDensity:"scenri:wall-density",feedSort:"scenri:feed-sort"};function Zx(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}const uh="scenri:pref-changed";function Vx(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}try{window.dispatchEvent(new CustomEvent(uh,{detail:{key:e,value:t}}))}catch{}}function dh(e,t){try{const n=localStorage.getItem(e);return n===null?null:(localStorage.setItem(t,n),localStorage.removeItem(e),n)}catch{return null}}function Ia(e,t){const[n,s]=r.useState(()=>Zx(e,t));return r.useEffect(()=>{Vx(e,n)},[e,n]),r.useEffect(()=>{const i=c=>{const u=c.detail;(u==null?void 0:u.key)===e&&s(f=>Object.is(f,u.value)?f:u.value)};return window.addEventListener(uh,i),()=>window.removeEventListener(uh,i)},[e]),[n,s]}function ZL(e,t){const[n,s]=r.useState(()=>{try{const i=sessionStorage.getItem(e);return i===null?t:JSON.parse(i)}catch{return t}});return r.useEffect(()=>{try{sessionStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,s]}function f2(e,t){const[n,s]=Ia(e,t),[i,c]=r.useState(null);return[i??n,f=>{c(null),s(f)},c]}const VL=()=>Zx(cr.lastBrand,null),zL=e=>Vx(cr.lastBrand,e),fh="sc-theme",BL="bt-theme",UL=()=>window.matchMedia("(prefers-color-scheme: light)").matches,zx=r.createContext({choice:"system",mode:"dark",setChoice:()=>{},toggle:()=>{}}),WL=()=>r.useContext(zx);function GL(){const e=localStorage.getItem(fh)??dh(BL,fh);return e==="light"||e==="dark"||e==="system"?e:"system"}function KL({children:e}){const[t,n]=r.useState(GL),[s,i]=r.useState(()=>UL()?"light":"dark");r.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: light)"),h=()=>i(f.matches?"light":"dark");return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);const c=t==="system"?s:t;r.useEffect(()=>{document.documentElement.dataset.theme=c,localStorage.setItem(fh,t)},[c,t]);const u=r.useMemo(()=>({choice:t,mode:c,setChoice:n,toggle:()=>n(c==="dark"?"light":"dark")}),[t,c]);return o.jsx(zx.Provider,{value:u,children:o.jsx(Ua,{appearance:c,accentColor:"gray",grayColor:"gray",radius:"large",scaling:"100%",children:e})})}const YL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.41,51.63a108,108,0,1,0,0,152.74A107.38,107.38,0,0,0,204.41,51.63Zm-17,17A83.85,83.85,0,0,1,196.26,79L169,111.09l-23.3-65.21A83.52,83.52,0,0,1,187.43,68.6Zm-118.85,0a83.44,83.44,0,0,1,51.11-24.2l14.16,39.65L65.71,71.61C66.64,70.59,67.59,69.59,68.58,68.6ZM48,153.7a84.48,84.48,0,0,1,3.4-60.3L92.84,101Zm20.55,33.7A83.94,83.94,0,0,1,59.74,177L87,144.91l23.3,65.21A83.53,83.53,0,0,1,68.58,187.4Zm36.36-63.61,15.18-17.85,23.06,4.21,7.88,22.06-15.17,17.85-23.06-4.21Zm82.49,63.61a83.49,83.49,0,0,1-51.11,24.2L122.15,172l68.14,12.44C189.36,185.41,188.41,186.41,187.43,187.4ZM163.16,155,208,102.3a84.43,84.43,0,0,1-3.41,60.3Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M195.88,60.12a96,96,0,1,0,0,135.76A96,96,0,0,0,195.88,60.12Zm-55.34,103h0l-36.68-6.69h0L91.32,121.3l24.14-28.41h0l36.68,6.69,12.54,35.12Z",opacity:"0.2"}),r.createElement("path",{d:"M201.54,54.46A104,104,0,0,0,54.46,201.54,104,104,0,0,0,201.54,54.46ZM190.23,65.78a88.18,88.18,0,0,1,11,13.48L167.55,119,139.63,40.78A87.34,87.34,0,0,1,190.23,65.78ZM155.59,133l-18.16,21.37-27.59-5L100.41,123l18.16-21.37,27.59,5ZM65.77,65.78a87.34,87.34,0,0,1,56.66-25.59l17.51,49L58.3,74.32A88,88,0,0,1,65.77,65.78ZM46.65,161.54a88.41,88.41,0,0,1,2.53-72.62l51.21,9.35Zm19.12,28.68a88.18,88.18,0,0,1-11-13.48L88.45,137l27.92,78.18A87.34,87.34,0,0,1,65.77,190.22Zm124.46,0a87.34,87.34,0,0,1-56.66,25.59l-17.51-49,81.64,14.91A88,88,0,0,1,190.23,190.22Zm-34.62-32.49,53.74-63.27a88.41,88.41,0,0,1-2.53,72.62Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,0,0,54.46,54.46,104,104,0,0,0,128,232h.09A104,104,0,0,0,232,128ZM49.18,88.92l51.21,9.35L46.65,161.53A88.39,88.39,0,0,1,49.18,88.92Zm160.17,5.54a88.41,88.41,0,0,1-2.53,72.62l-51.21-9.35Zm-8.08-15.2L167.55,119,139.63,40.78a87.38,87.38,0,0,1,50.6,25A88.74,88.74,0,0,1,201.27,79.26ZM122.43,40.19l17.51,49L58.3,74.32a89.28,89.28,0,0,1,7.47-8.55A87.37,87.37,0,0,1,122.43,40.19ZM54.73,176.74,88.45,137l27.92,78.18a88,88,0,0,1-61.64-38.48Zm78.84,39.06-17.51-49L139.14,171h0l58.52,10.69a87.5,87.5,0,0,1-64.13,34.12Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200.12,55.88A102,102,0,0,0,55.87,200.12,102,102,0,1,0,200.12,55.88Zm-102,66.67,19.65-23.14,29.86,5.46,10.21,28.58-19.65,23.14-29.86-5.46ZM209.93,90.69a90.24,90.24,0,0,1-2,78.63l-56.14-10.24Zm-6.16-11.28-36.94,43.48L136.66,38.42a89.31,89.31,0,0,1,55,25.94A91.33,91.33,0,0,1,203.77,79.41Zm-139.41-15A89.37,89.37,0,0,1,123.81,38.1L143,91.82,54.75,75.71A91.2,91.2,0,0,1,64.36,64.36ZM48,86.68l56.14,10.24L46.07,165.31a90.24,90.24,0,0,1,2-78.63Zm4.21,89.91,36.94-43.48,30.17,84.47a89.31,89.31,0,0,1-55-25.94A91.33,91.33,0,0,1,52.23,176.59Zm139.41,15a89.32,89.32,0,0,1-59.45,26.26L113,164.18l88.24,16.11A91.2,91.2,0,0,1,191.64,191.64Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M201.54,54.46A104,104,0,0,0,54.46,201.54,104,104,0,0,0,201.54,54.46ZM190.23,65.78a88.18,88.18,0,0,1,11,13.48L167.55,119,139.63,40.78A87.34,87.34,0,0,1,190.23,65.78ZM155.59,133l-18.16,21.37-27.59-5L100.41,123l18.16-21.37,27.59,5ZM65.77,65.78a87.34,87.34,0,0,1,56.66-25.59l17.51,49L58.3,74.32A88,88,0,0,1,65.77,65.78ZM46.65,161.54a88.41,88.41,0,0,1,2.53-72.62l51.21,9.35Zm19.12,28.68a88.18,88.18,0,0,1-11-13.48L88.45,137l27.92,78.18A87.34,87.34,0,0,1,65.77,190.22Zm124.46,0a87.34,87.34,0,0,1-56.66,25.59l-17.51-49,81.64,14.91A88,88,0,0,1,190.23,190.22Zm-34.62-32.49,53.74-63.27a88.41,88.41,0,0,1-2.53,72.62Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M198.71,57.29A100,100,0,1,0,57.29,198.71,100,100,0,1,0,198.71,57.29Zm10.37,114.27-61-11.14L210.4,87a92.26,92.26,0,0,1-1.32,84.52ZM95.87,122.13,117,97.24l32.14,5.86,11,30.77L139,158.76l-32.14-5.86ZM206.24,79.58l-40.13,47.25L133.75,36.2a92.09,92.09,0,0,1,72.49,43.38ZM63,63a91.31,91.31,0,0,1,62.26-26.88L146,94.41,51.32,77.11A92.94,92.94,0,0,1,63,63Zm-16,21.49,61,11.14L45.6,169a92.26,92.26,0,0,1,1.32-84.52Zm2.84,92,40.13-47.25,32.36,90.63a92.09,92.09,0,0,1-72.49-43.38Zm143.29,16.63a91.31,91.31,0,0,1-62.26,26.88L110,161.59l94.72,17.3A92.94,92.94,0,0,1,193.05,193.05Z"}))]]),qL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,44H32A20,20,0,0,0,12,64V88a20,20,0,0,0,16,19.6V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V107.6A20,20,0,0,0,244,88V64A20,20,0,0,0,224,44ZM36,68H220V84H36ZM52,188V108H204v80Zm112-52a12,12,0,0,1-12,12H104a12,12,0,0,1,0-24h48A12,12,0,0,1,164,136Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm-72,96H104a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm72-56H32V64H224V88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,50H32A14,14,0,0,0,18,64V88a14,14,0,0,0,14,14h2v90a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V102h2a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50ZM210,192a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V102H210ZM226,88a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2ZM98,136a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,52H32A12,12,0,0,0,20,64V88a12,12,0,0,0,12,12h4v92a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V100h4a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52ZM212,192a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V100H212ZM228,88a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4ZM100,136a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,136Z"}))]]),XL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-100.49a12,12,0,0,1-17,17L140,117v51a12,12,0,0,1-24,0V117l-11.51,11.52a12,12,0,0,1-17-17l32-32a12,12,0,0,1,17,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,101.66a8,8,0,0,1-11.32,0L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,165.66,125.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm36.24-102.24a6,6,0,1,1-8.48,8.48L134,102.49V168a6,6,0,0,1-12,0V102.49l-21.76,21.75a6,6,0,0,1-8.48-8.48l32-32a6,6,0,0,1,8.48,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-102.83a4,4,0,0,1-5.66,5.66L132,97.66V168a4,4,0,0,1-8,0V97.66L98.83,122.83a4,4,0,0,1-5.66-5.66l32-32a4,4,0,0,1,5.66,0Z"}))]]),QL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),JL=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),eT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,143.51a12,12,0,0,1-17,17L140,109V224a12,12,0,0,1-24,0V109L64.49,160.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0ZM216,28H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,144H56l72-72Z",opacity:"0.2"}),r.createElement("path",{d:"M133.66,66.34a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,152h64v72a8,8,0,0,0,16,0V152h64a8,8,0,0,0,5.66-13.66ZM75.31,136,128,83.31,180.69,136ZM224,40a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,138.34A8,8,0,0,1,200,152H136v72a8,8,0,0,1-16,0V152H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0ZM216,32H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,139.76a6,6,0,1,1-8.48,8.48L134,86.49V224a6,6,0,0,1-12,0V86.49L60.24,148.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0ZM216,34H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,138.34a8,8,0,0,1-11.32,11.32L136,91.31V224a8,8,0,0,1-16,0V91.31L61.66,149.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0ZM216,32H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,141.17a4,4,0,0,1-5.66,5.66L132,81.66V224a4,4,0,0,1-8,0V81.66L58.83,146.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0ZM216,36H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"}))]]),tT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),r.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),nT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),rT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),aT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"}))]]),sT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,48V208H80V48Z",opacity:"0.2"}),r.createElement("path",{d:"M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z"}))]]),oT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),lT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),iT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,28H72A20,20,0,0,0,52,48V224a12,12,0,0,0,18.36,10.18l57.63-36,57.65,36A12,12,0,0,0,204,224V48A20,20,0,0,0,184,28Zm-4,174.35-45.65-28.53a12,12,0,0,0-12.72,0L76,202.35V52H180Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,48V224l-64-40L64,224V48a8,8,0,0,1,8-8H184A8,8,0,0,1,192,48Z",opacity:"0.2"}),r.createElement("path",{d:"M184,32H72A16,16,0,0,0,56,48V224a8,8,0,0,0,12.24,6.78L128,193.43l59.77,37.35A8,8,0,0,0,200,224V48A16,16,0,0,0,184,32Zm0,177.57-51.77-32.35a8,8,0,0,0-8.48,0L72,209.57V48H184Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,32H72A16,16,0,0,0,56,48V224a8,8,0,0,0,12.24,6.78L128,193.43l59.77,37.35A8,8,0,0,0,200,224V48A16,16,0,0,0,184,32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,34H72A14,14,0,0,0,58,48V224a6,6,0,0,0,9.18,5.09l60.81-38,60.83,38A6,6,0,0,0,198,224V48A14,14,0,0,0,184,34Zm2,179.17-54.83-34.26a6,6,0,0,0-6.36,0L70,213.17V48a2,2,0,0,1,2-2H184a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,32H72A16,16,0,0,0,56,48V224a8,8,0,0,0,12.24,6.78L128,193.43l59.77,37.35A8,8,0,0,0,200,224V48A16,16,0,0,0,184,32Zm0,177.57-51.77-32.35a8,8,0,0,0-8.48,0L72,209.57V48H184Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,36H72A12,12,0,0,0,60,48V224a4,4,0,0,0,6.12,3.39L128,188.72l61.89,38.67A4,4,0,0,0,192,228a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,196,224V48A12,12,0,0,0,184,36Zm4,180.78-57.89-36.17a4,4,0,0,0-4.24,0L68,216.78V48a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4Z"}))]]),cT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.24,213.21C216.12,203,204,180.64,204,152V134.73a19.94,19.94,0,0,0-12.62-18.59l-24.86-9.81a4,4,0,0,1-2.26-5.14l21.33-53A32,32,0,0,0,167.17,6,32.13,32.13,0,0,0,126.25,24.2l-.07.18-21,53.09a3.94,3.94,0,0,1-2.14,2.2,3.89,3.89,0,0,1-3,.06L74.6,69.43A19.89,19.89,0,0,0,52.87,74C31.06,96.43,20,122.68,20,152a115.46,115.46,0,0,0,32.29,80.3A12,12,0,0,0,61,236H232a12,12,0,0,0,5.24-22.79ZM68.19,92.73,91.06,102A28,28,0,0,0,127.5,86.31l20.95-53a8.32,8.32,0,0,1,10.33-4.81,8,8,0,0,1,4.61,10.57,1.17,1.17,0,0,0,0,.11L142,92.29a28.05,28.05,0,0,0,15.68,36.33L180,137.45V152c0,1,0,2.07.05,3.1l-122.44-49A101.91,101.91,0,0,1,68.19,92.73ZM116.74,212a83.73,83.73,0,0,1-22.09-39,12,12,0,0,0-23.25,6,110.27,110.27,0,0,0,14.49,33H66.25A91.53,91.53,0,0,1,44,152a84,84,0,0,1,3.41-24.11l136.67,54.66A86.58,86.58,0,0,0,198.66,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192.8,165.12,43.93,105.57A110.88,110.88,0,0,1,61.47,82.38a8,8,0,0,1,8.67-1.81L95.52,90.85a16,16,0,0,0,20.82-9l21-53.1c4.15-10,15.47-15.33,25.63-11.53a20,20,0,0,1,11.51,26.39L153.13,96.71a16,16,0,0,0,8.93,20.75L187,127.3a8,8,0,0,1,5,7.43V152A104.58,104.58,0,0,0,192.8,165.12Z",opacity:"0.2"}),r.createElement("path",{d:"M235.5,216.81c-22.56-11-35.5-34.58-35.5-64.8V134.73a15.94,15.94,0,0,0-10.09-14.87L165,110a8,8,0,0,1-4.48-10.34l21.32-53a28,28,0,0,0-16.1-37,28.14,28.14,0,0,0-35.82,16,.61.61,0,0,0,0,.12L108.9,79a8,8,0,0,1-10.37,4.49L73.11,73.14A15.89,15.89,0,0,0,55.74,76.8C34.68,98.45,24,123.75,24,152a111.45,111.45,0,0,0,31.18,77.53A8,8,0,0,0,61,232H232a8,8,0,0,0,3.5-15.19ZM67.14,88l25.41,10.3a24,24,0,0,0,31.23-13.45l21-53c2.56-6.11,9.47-9.27,15.43-7a12,12,0,0,1,6.88,15.92L145.69,93.76a24,24,0,0,0,13.43,31.14L184,134.73V152c0,.33,0,.66,0,1L55.77,101.71A108.84,108.84,0,0,1,67.14,88Zm48,128a87.53,87.53,0,0,1-24.34-42,8,8,0,0,0-15.49,4,105.16,105.16,0,0,0,18.36,38H64.44A95.54,95.54,0,0,1,40,152a85.9,85.9,0,0,1,7.73-36.29l137.8,55.12c3,18,10.56,33.48,21.89,45.16Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.29,216.7C212.86,205.69,200,182.12,200,152V134.69a15.94,15.94,0,0,0-10.09-14.87l-28.65-11.46A8,8,0,0,1,156.79,98l22.32-56.67C184,28.79,178,14.21,165.34,9.51a24,24,0,0,0-30.7,13.71L112.25,80.08a8,8,0,0,1-10.41,4.5L73.11,73.08a15.91,15.91,0,0,0-17.38,3.66C34.68,98.4,24,123.71,24,152a111.53,111.53,0,0,0,31.15,77.53A8.06,8.06,0,0,0,61,232H232a8,8,0,0,0,8-7.51A8.21,8.21,0,0,0,235.29,216.7ZM115.11,216a87.52,87.52,0,0,1-24.26-41.71,8.21,8.21,0,0,0-9.25-6.18A8,8,0,0,0,75.28,178a105.33,105.33,0,0,0,18.36,38H64.44A95.62,95.62,0,0,1,40,152a85.92,85.92,0,0,1,7.73-36.3l137.8,55.13c3,18.06,10.55,33.5,21.89,45.19Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.62,218.6C211.35,207.29,198,183,198,152V134.7a14,14,0,0,0-8.82-13l-24.89-9.83a10,10,0,0,1-5.59-13L180,45.9a26,26,0,0,0-15-34.33c-12.95-4.83-27.88,1.84-33.31,15l-21,53.11a10,10,0,0,1-13,5.61L72.37,75a13.9,13.9,0,0,0-15.2,3.19C36.49,99.42,26,124.26,26,152a109.53,109.53,0,0,0,30.62,76.16A6,6,0,0,0,61,230H232a6,6,0,0,0,2.62-11.4ZM65.77,86.52a2,2,0,0,1,2.12-.43l25.4,10.29a22,22,0,0,0,28.63-12.32l21-53c3-7.13,11-10.81,18-8.21a14,14,0,0,1,8,18.54l-21.36,53.1A22.05,22.05,0,0,0,159.86,123l24.88,9.83A2,2,0,0,1,186,134.7V152c0,1.34,0,2.65.08,4L52.74,102.61A110.07,110.07,0,0,1,65.77,86.52ZM114.33,218a89.6,89.6,0,0,1-25.5-43.5,6,6,0,1,0-11.62,3A102.87,102.87,0,0,0,97.81,218H63.56A97.56,97.56,0,0,1,38,152a87.42,87.42,0,0,1,8.71-38.86L187.35,169.4c3.15,19.92,11.77,36.66,25,48.6Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.5,216.81c-22.56-11-35.5-34.58-35.5-64.8V134.73a15.94,15.94,0,0,0-10.09-14.87L165,110a8,8,0,0,1-4.48-10.34l21.32-53a28,28,0,0,0-16.1-37,28.14,28.14,0,0,0-35.82,16,.61.61,0,0,0,0,.12L108.9,79a8,8,0,0,1-10.37,4.49L73.11,73.14A15.89,15.89,0,0,0,55.74,76.8C34.68,98.45,24,123.75,24,152a111.45,111.45,0,0,0,31.18,77.53A8,8,0,0,0,61,232H232a8,8,0,0,0,3.5-15.19ZM67.14,88l25.41,10.3a24,24,0,0,0,31.23-13.45l21-53c2.56-6.11,9.47-9.27,15.43-7a12,12,0,0,1,6.88,15.92L145.69,93.76a24,24,0,0,0,13.43,31.14L184,134.73V152c0,.33,0,.66,0,1L55.77,101.71A108.84,108.84,0,0,1,67.14,88Zm48,128a87.53,87.53,0,0,1-24.34-42,8,8,0,0,0-15.49,4,105.16,105.16,0,0,0,18.36,38H64.44A95.54,95.54,0,0,1,40,152a85.9,85.9,0,0,1,7.73-36.29l137.8,55.12c3,18,10.56,33.48,21.89,45.16Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M233.75,220.4C209.76,208.75,196,183.82,196,152V134.72a12,12,0,0,0-7.56-11.15l-24.89-9.83a12,12,0,0,1-6.71-15.55l21.33-53a23.88,23.88,0,0,0-31.93-31A24.72,24.72,0,0,0,133.62,27.3l-21,53.1A12,12,0,0,1,97,87.13L71.63,76.84a12,12,0,0,0-13,2.73C38.3,100.45,28,124.82,28,152a107.5,107.5,0,0,0,30.07,74.77A4,4,0,0,0,61,228H232a4,4,0,0,0,1.75-7.6ZM64.34,85.15a3.94,3.94,0,0,1,4.3-.89L94,94.55a20,20,0,0,0,26-11.2l21-53C144.39,22.19,153.61,18,161.58,21a16,16,0,0,1,9.19,21.16L149.41,95.22a20,20,0,0,0,11.18,26l24.9,9.83a4,4,0,0,1,2.51,3.72V152c0,2.36.08,4.69.22,7l-138.5-55.4A110.84,110.84,0,0,1,64.34,85.15ZM113.56,220A91.35,91.35,0,0,1,86.9,175a4,4,0,0,0-7.75,2,100.21,100.21,0,0,0,23.09,43H62.68A99.5,99.5,0,0,1,36,152a89.37,89.37,0,0,1,9.73-41.4L189.13,168c3.22,22,13.23,40.09,28.8,52Z"}))]]),uT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),r.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),dT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),r.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),fT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),r.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),hT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),mT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),pT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]),gT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z"}))]]),vT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),yT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180,64H40A12,12,0,0,0,28,76V216a12,12,0,0,0,12,12H180a12,12,0,0,0,12-12V76A12,12,0,0,0,180,64ZM168,204H52V88H168ZM228,40V180a12,12,0,0,1-24,0V52H76a12,12,0,0,1,0-24H216A12,12,0,0,1,228,40Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,72V216H40V72Z",opacity:"0.2"}),r.createElement("path",{d:"M184,64H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V72A8,8,0,0,0,184,64Zm-8,144H48V80H176ZM224,40V184a8,8,0,0,1-16,0V48H72a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,72V216a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H184A8,8,0,0,1,192,72Zm24-40H72a8,8,0,0,0,0,16H208V184a8,8,0,0,0,16,0V40A8,8,0,0,0,216,32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,66H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H184a6,6,0,0,0,6-6V72A6,6,0,0,0,184,66Zm-6,144H46V78H178ZM222,40V184a6,6,0,0,1-12,0V46H72a6,6,0,0,1,0-12H216A6,6,0,0,1,222,40Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,64H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V72A8,8,0,0,0,184,64Zm-8,144H48V80H176ZM224,40V184a8,8,0,0,1-16,0V48H72a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,68H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H184a4,4,0,0,0,4-4V72A4,4,0,0,0,184,68Zm-4,144H44V76H180ZM220,40V184a4,4,0,0,1-8,0V44H72a4,4,0,0,1,0-8H216A4,4,0,0,1,220,40Z"}))]]),xT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,35.52C177.62,25.51,153.48,20,128,20S78.38,25.51,60,35.52C39.37,46.79,28,62.58,28,80v96c0,17.42,11.37,33.21,32,44.48,18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52c20.66-11.27,32-27.06,32-44.48V80C228,62.58,216.63,46.79,196,35.52ZM204,128c0,17-31.21,36-76,36s-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94ZM128,44c44.79,0,76,19,76,36s-31.21,36-76,36S52,97,52,80,83.21,44,128,44Zm0,168c-44.79,0-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94V176C204,193,172.79,212,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,80c0,26.51-39.4,48-88,48S40,106.51,40,80s39.4-48,88-48S216,53.49,216,80Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64Zm-21.61,74.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26C75.29,26,34,49.72,34,80v96c0,30.28,41.29,54,94,54s94-23.72,94-54V80C222,49.72,180.71,26,128,26Zm0,12c44.45,0,82,19.23,82,42s-37.55,42-82,42S46,102.77,46,80,83.55,38,128,38Zm82,138c0,22.77-37.55,42-82,42s-82-19.23-82-42V154.79C62,171.16,92.37,182,128,182s66-10.84,82-27.21Zm0-48c0,22.77-37.55,42-82,42s-82-19.23-82-42V106.79C62,123.16,92.37,134,128,134s66-10.84,82-27.21Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"}))]]),wT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",opacity:"0.2"}),r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z"}))]]),bT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),ET=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,100H132.92l78.14-20.63a12,12,0,0,0,8.52-14.75l-8.16-30a19.94,19.94,0,0,0-24.3-13.95L34.79,60.87a19.74,19.74,0,0,0-12.14,9.27,19.48,19.48,0,0,0-1.95,15L28,112v88a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V112A12,12,0,0,0,216,100ZM124.89,61.91l18.29,10.56-25.95,6.85L98.94,68.76Zm64.45-17,3.91,14.35-17.13,4.52L157.83,53.21ZM66,77.46,84.29,88l-35.4,9.35L45,83ZM204,196H52V124H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M67.71,64.59l47.79,27.6L40.43,112,32.27,82a7.76,7.76,0,0,1,5.58-9.52ZM199.84,37.76a7.9,7.9,0,0,0-9.66-5.49L126.61,49.05,174.4,76.64,208,67.77Z",opacity:"0.2"}),r.createElement("path",{d:"M216,104H102.09L210,75.51a8,8,0,0,0,5.68-9.84l-8.16-30a15.93,15.93,0,0,0-19.42-11.13L35.81,64.74a15.75,15.75,0,0,0-9.7,7.4,15.51,15.51,0,0,0-1.55,12L32,111.56c0,.14,0,.29,0,.44v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V112A8,8,0,0,0,216,104ZM192.16,40l6,22.07-22.62,6L147.42,51.83Zm-66.69,17.6,28.12,16.24-36.94,9.75L88.53,67.37Zm-79.4,44.62-6-22.08,26.5-7L94.69,89.4ZM208,200H48V120H208v80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,104H102.09L210,75.51a8,8,0,0,0,5.68-9.84l-8.16-30a15.93,15.93,0,0,0-19.42-11.13L35.81,64.74a15.75,15.75,0,0,0-9.7,7.4,15.51,15.51,0,0,0-1.55,12L32,111.56c0,.14,0,.29,0,.44v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V112A8,8,0,0,0,216,104ZM192.16,40l6,22.07L164.57,71,136.44,54.72ZM77.55,70.27l28.12,16.24-59.6,15.73-6-22.08Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,106H86.68L209.53,73.57a6,6,0,0,0,4.26-7.38l-8.16-30a13.94,13.94,0,0,0-17-9.72L36.32,66.67a13.77,13.77,0,0,0-8.48,6.47,13.57,13.57,0,0,0-1.36,10.42L34,111.34c0,.22,0,.44,0,.66v88a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V112A6,6,0,0,0,216,106ZM125.75,55.48l33,19.07-42.43,11.2-33-19.07Zm66-17.41a1.92,1.92,0,0,1,2.34,1.26l6.57,24.18L175.26,70.2l-33-19.07ZM38.23,79.14a1.85,1.85,0,0,1,1.15-.87L66.86,71l33,19.08L44.66,104.68l-6.6-24.27A1.63,1.63,0,0,1,38.23,79.14ZM210,200a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V118H210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,104H102.09L210,75.51a8,8,0,0,0,5.68-9.84l-8.16-30a15.93,15.93,0,0,0-19.42-11.13L35.81,64.74a15.75,15.75,0,0,0-9.7,7.4,15.51,15.51,0,0,0-1.55,12L32,111.56c0,.14,0,.29,0,.44v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V112A8,8,0,0,0,216,104ZM192.16,40l6,22.07-22.62,6L147.42,51.83Zm-66.69,17.6,28.12,16.24-36.94,9.75L88.53,67.37Zm-79.4,44.62-6-22.08,26.5-7L94.69,89.4ZM208,200H48V120H208v80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,108H71.26L209,71.64a4,4,0,0,0,2.84-4.92l-8.16-30a11.92,11.92,0,0,0-14.54-8.31L36.83,68.61a11.78,11.78,0,0,0-7.26,5.53A11.59,11.59,0,0,0,28.41,83l7.67,28.19A3.87,3.87,0,0,0,36,112v88a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V112A4,4,0,0,0,216,108ZM126,53.33l38,21.92L116.08,87.9,78.12,66Zm65.16-17.2a4,4,0,0,1,1-.13A3.88,3.88,0,0,1,196,38.81l7.1,26.12L175,72.35,137,50.43Zm-154.7,42a3.86,3.86,0,0,1,2.37-1.8l28.27-7.46,38,21.91L43.25,107.12,36.13,80.94A3.66,3.66,0,0,1,36.5,78.14ZM212,200a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V116H212Z"}))]]),CT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),ST=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,88a12,12,0,0,1,12-12h32a12,12,0,0,1,12,12v32a12,12,0,0,1-24,0V100H152A12,12,0,0,1,140,88ZM72,180h32a12,12,0,0,0,0-24H84V136a12,12,0,0,0-24,0v32A12,12,0,0,0,72,180ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),r.createElement("path",{d:"M200,80v32a8,8,0,0,1-16,0V88H160a8,8,0,0,1,0-16h32A8,8,0,0,1,200,80ZM96,168H72V144a8,8,0,0,0-16,0v32a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM88,192H56a8,8,0,0,1-8-8V152a8,8,0,0,1,16,0v24H88a8,8,0,0,1,0,16Zm120-88a8,8,0,0,1-16,0V80H168a8,8,0,0,1,0-16h32a8,8,0,0,1,8,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M198,80v32a6,6,0,0,1-12,0V86H160a6,6,0,0,1,0-12h32A6,6,0,0,1,198,80ZM96,170H70V144a6,6,0,0,0-12,0v32a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12ZM230,56V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,80v32a8,8,0,0,1-16,0V88H160a8,8,0,0,1,0-16h32A8,8,0,0,1,200,80ZM96,168H72V144a8,8,0,0,0-16,0v32a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,80v32a4,4,0,0,1-8,0V84H160a4,4,0,0,1,0-8h32A4,4,0,0,1,196,80ZM96,172H68V144a4,4,0,0,0-8,0v32a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8ZM228,56V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z"}))]]),jT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z"}))]]),kT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z",opacity:"0.2"}),r.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"}))]]),NT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V40A20,20,0,0,0,200,20Zm-4,192H60V44H196ZM84,68A12,12,0,0,1,96,56h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,68Zm8.8,127.37a48,48,0,0,1,70.4,0,12,12,0,0,0,17.6-16.32,72,72,0,0,0-19.21-14.68,44,44,0,1,0-67.19,0,72.12,72.12,0,0,0-19.2,14.68,12,12,0,0,0,17.6,16.32ZM128,116a20,20,0,1,1-20,20A20,20,0,0,1,128,116Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,32H56a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32ZM128,168a32,32,0,1,1,32-32A32,32,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM96,48h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm84.81,150.4a8,8,0,0,1-11.21-1.6,52,52,0,0,0-83.2,0,8,8,0,1,1-12.8-9.6A67.88,67.88,0,0,1,101,165.51a40,40,0,1,1,53.94,0A67.88,67.88,0,0,1,182.4,187.2,8,8,0,0,1,180.81,198.4ZM152,136a24,24,0,1,1-24-24A24,24,0,0,1,152,136Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M151.11,166.13a38,38,0,1,0-46.22,0A65.75,65.75,0,0,0,75.2,188.4a6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,9.6-7.2A65.75,65.75,0,0,0,151.11,166.13ZM128,110a26,26,0,1,1-26,26A26,26,0,0,1,128,110Zm72-84H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm2,190a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2ZM90,64a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,64Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M146.7,166.75a36,36,0,1,0-37.4,0A63.61,63.61,0,0,0,76.8,189.6a4,4,0,0,0,6.4,4.8,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63.65,63.65,0,0,0,146.7,166.75ZM100,136a28,28,0,1,1,28,28A28,28,0,0,1,100,136ZM200,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Zm4,188a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4ZM92,64a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,64Z"}))]]),AT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v63.72L186.14,97.86a20,20,0,0,0-28.28,0L52,203.72V52ZM85.66,204,172,117.66l32,32V204ZM76,96a20,20,0,1,1,20,20A20,20,0,0,1,76,96Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,40H48a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8h8.69L166.34,106.34a8,8,0,0,1,11.32,0L216,144.69V48A8,8,0,0,0,208,40ZM96,112a16,16,0,1,1,16-16A16,16,0,0,1,96,112Z",opacity:"0.2"}),r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM48,48H208v77.38l-24.69-24.7a16,16,0,0,0-22.62,0L53.37,208H48ZM208,208H76l96-96,36,36v60ZM96,120A24,24,0,1,0,72,96,24,24,0,0,0,96,120Zm0-32a8,8,0,1,1-8,8A8,8,0,0,1,96,88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM48,48H208v77.38l-24.69-24.7a16,16,0,0,0-22.62,0L53.37,208H48ZM80,96a16,16,0,1,1,16,16A16,16,0,0,1,80,96Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM46,208V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2v82.2l-28.1-28.1a14,14,0,0,0-19.8,0L54.2,210H48A2,2,0,0,1,46,208Zm162,2H71.17l99.41-99.41a2,2,0,0,1,2.83,0L210,147.17V208A2,2,0,0,1,208,210ZM96,118A22,22,0,1,0,74,96,22,22,0,0,0,96,118Zm0-32A10,10,0,1,1,86,96,10,10,0,0,1,96,86Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM48,48H208v77.38l-24.69-24.7a16,16,0,0,0-22.62,0L53.37,208H48ZM208,208H76l96-96,36,36v60ZM96,120A24,24,0,1,0,72,96,24,24,0,0,0,96,120Zm0-32a8,8,0,1,1-8,8A8,8,0,0,1,96,88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM44,208V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4v87l-31.51-31.52a12,12,0,0,0-17,0L55,212H48A4,4,0,0,1,44,208Zm164,4H66.34L169.17,109.17a4,4,0,0,1,5.66,0L212,146.34V208A4,4,0,0,1,208,212ZM96,116A20,20,0,1,0,76,96,20,20,0,0,0,96,116Zm0-32A12,12,0,1,1,84,96,12,12,0,0,1,96,84Z"}))]]),MT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),RT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),PT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),LT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),r.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),TT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,80a32,32,0,1,0-32-32A32,32,0,0,0,160,80Zm0-40a8,8,0,1,1-8,8A8,8,0,0,1,160,40Zm94.32,153.88L199.76,101.8A19.85,19.85,0,0,0,182.55,92h0a19.83,19.83,0,0,0-17.2,9.8l-18.7,31.55-37.42-63.5a20,20,0,0,0-34.46,0L1.66,193.91A12,12,0,0,0,12,212H244a12,12,0,0,0,10.32-18.12ZM92,87.87,108.57,116H75.43ZM33,188l28.28-48h61.44L151,188Zm145.86,0L160.56,157l22-37.1L222.94,188Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144,52a20,20,0,1,1,20,20A20,20,0,0,1,144,52Zm49.44,55.92a8,8,0,0,0-13.77,0l-33,55.75-21-35.67H50.35L8,200H248Z",opacity:"0.2"}),r.createElement("path",{d:"M164,80a28,28,0,1,0-28-28A28,28,0,0,0,164,80Zm0-40a12,12,0,1,1-12,12A12,12,0,0,1,164,40Zm90.88,155.92-54.56-92.08A15.87,15.87,0,0,0,186.55,96h0a15.85,15.85,0,0,0-13.76,7.84L146.63,148l-44.84-76.1a16,16,0,0,0-27.58,0L1.11,195.94A8,8,0,0,0,8,208H248a8,8,0,0,0,6.88-12.08ZM88,80l23.57,40H64.43ZM22,192l33-56h66l33,56Zm150.57,0-16.66-28.28L186.55,112,234,192Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M254.88,195.92l-54.56-92.08A15.87,15.87,0,0,0,186.55,96h0a15.85,15.85,0,0,0-13.76,7.84l-15.64,26.39a4,4,0,0,0,0,4.07l26.8,45.47a8.13,8.13,0,0,1-1.89,10.55,8,8,0,0,1-11.8-2.26L101.79,71.88a16,16,0,0,0-27.58,0L1.11,195.94a8,8,0,0,0,1,9.52A8.23,8.23,0,0,0,8.23,208H247.77a8.29,8.29,0,0,0,6.09-2.55A8,8,0,0,0,254.88,195.92ZM64.43,120,88,80l23.57,40ZM140,52a24,24,0,1,1,24,24A24,24,0,0,1,140,52Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,78a26,26,0,1,0-26-26A26,26,0,0,0,164,78Zm0-40a14,14,0,1,1-14,14A14,14,0,0,1,164,38Zm89.16,158.94L198.6,104.86a13.9,13.9,0,0,0-12-6.86h0a13.88,13.88,0,0,0-12,6.86l-27.88,47.05-46.56-79a14,14,0,0,0-24.13,0L2.83,197A6,6,0,0,0,8,206H248a6,6,0,0,0,5.16-9.06ZM86.27,79a2,2,0,0,1,3.46,0l25.34,43H60.93ZM18.5,194l35.36-60h68.29l19.3,32.77,0,0,16,27.2Zm152.93,0-17.85-30.29L184.83,111a2,2,0,0,1,1.72-1,1.93,1.93,0,0,1,1.72,1l49.2,83Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,80a28,28,0,1,0-28-28A28,28,0,0,0,164,80Zm0-40a12,12,0,1,1-12,12A12,12,0,0,1,164,40Zm90.88,155.92-54.56-92.08A15.87,15.87,0,0,0,186.55,96h0a15.85,15.85,0,0,0-13.76,7.84L146.63,148l-44.84-76.1a16,16,0,0,0-27.58,0L1.11,195.94A8,8,0,0,0,8,208H248a8,8,0,0,0,6.88-12.08ZM88,80l23.57,40H64.43ZM22,192l33-56h66l18.74,31.8,0,0L154,192Zm150.57,0-16.66-28.28L186.55,112,234,192Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,76a24,24,0,1,0-24-24A24,24,0,0,0,164,76Zm0-40a16,16,0,1,1-16,16A16,16,0,0,1,164,36Zm87.44,162-54.56-92.08A11.91,11.91,0,0,0,186.55,100h0a11.89,11.89,0,0,0-10.32,5.88l-29.61,50L98.34,73.91a12,12,0,0,0-20.68,0L4.55,198A4,4,0,0,0,8,204H248a4,4,0,0,0,3.44-6ZM84.55,78a4,4,0,0,1,6.9,0l27.12,46H57.43ZM15,196l37.71-64h70.58L161,196Zm155.29,0-19-32.29L183.11,110a4,4,0,0,1,6.88,0l51,86Z"}))]]),HT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,178.57,87.73l-72-39.42Zm0,78.83L56,76,81.56,62l72,39.41ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l24-13.13V152a12,12,0,0,0,24,0V109.92l24-13.13v76.65Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.18a8,8,0,0,1-4.16-7V80.18a8,8,0,0,1,.7-3.25Z",opacity:"0.2"}),r.createElement("path",{d:"M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.35,44L178.57,92.29l-80.35-44Zm0,88L47.65,76,81.56,57.43l80.35,44Zm88,55.85h0l-80,43.79V133.83l32-17.51V152a8,8,0,0,0,16,0V107.56l32-17.51v85.76Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.72,67.91l-88-48.18a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.91ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,178.57,94.57,94.05,48.31ZM122,223,39,177.57a2,2,0,0,1-1-1.75V86.66l84,46ZM43.49,76,81.56,55.15l84.51,46.26L128,122.24ZM218,175.82a2,2,0,0,1-1,1.75h0L134,223V132.64l36-19.71V152a6,6,0,0,0,12,0V106.37l36-19.71Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,178.5,96.89a4,4,0,0,0-.58-.4l-88-48.18Zm1.92,96L39.33,76,81.56,52.87l88.67,48.54Zm-89.92,54.8a4,4,0,0,1-2.08-3.5V83.29l88,48.16v94.91Zm179.84,0h0l-85.92,47V131.45l40-21.89V152a4,4,0,0,0,8,0V105.18l40-21.89v92.53A4,4,0,0,1,217.92,179.32Z"}))]]),DT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,20H72A44.05,44.05,0,0,0,28,64v72a28,28,0,0,0,28,28H95.64L92,207c0,.33,0,.67,0,1a36,36,0,0,0,72,0c0-.33,0-.67,0-1l-3.6-43H200a28,28,0,0,0,28-28V32A12,12,0,0,0,216,20ZM72,44h88V68a12,12,0,0,0,24,0V44h20V96H52V64A20,20,0,0,1,72,44Zm128,96H156a20,20,0,0,0-19.85,22.4l3.84,46a12,12,0,0,1-24,0l3.84-46A20,20,0,0,0,100,140H56a4,4,0,0,1-4-4V120H204v16A4,4,0,0,1,200,140Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,112v24a16,16,0,0,1-16,16H152a8,8,0,0,0-7.92,9.13L152,208a24,24,0,0,1-48,0l7.92-46.87A8,8,0,0,0,104,152H56a16,16,0,0,1-16-16V112Z",opacity:"0.2"}),r.createElement("path",{d:"M216,24H72A40,40,0,0,0,32,64v72a24,24,0,0,0,24,24h48l-7.89,46.67A8.42,8.42,0,0,0,96,208a32,32,0,0,0,64,0,8.42,8.42,0,0,0-.11-1.33L152,160h48a24,24,0,0,0,24-24V32A8,8,0,0,0,216,24ZM72,40H176V80a8,8,0,0,0,16,0V40h16v64H48V64A24,24,0,0,1,72,40ZM200,144H152a16,16,0,0,0-15.84,18.26l0,.2L144,208.6a16,16,0,0,1-32,0l7.8-46.14,0-.2A16,16,0,0,0,104,144H56a8,8,0,0,1-8-8V120H208v16A8,8,0,0,1,200,144Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,24H72A40,40,0,0,0,32,64v72a24,24,0,0,0,24,24h48l-7.89,46.67A8.42,8.42,0,0,0,96,208a32,32,0,0,0,64,0,8.42,8.42,0,0,0-.11-1.33L152,160h48a24,24,0,0,0,24-24V32A8,8,0,0,0,216,24ZM72,40H176V80a8,8,0,0,0,16,0V40h16v72H48V64A24,24,0,0,1,72,40Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,26H72A38,38,0,0,0,34,64v72a22,22,0,0,0,22,22h48a2,2,0,0,1,2,2.23L98.08,207a6.74,6.74,0,0,0-.08,1,30,30,0,0,0,60,0,6.74,6.74,0,0,0-.08-1L150,160.23a2,2,0,0,1,2-2.23h48a22,22,0,0,0,22-22V32A6,6,0,0,0,216,26ZM72,38H178V80a6,6,0,0,0,12,0V38h20v68H46V64A26,26,0,0,1,72,38ZM200,146H152a14,14,0,0,0-13.86,16l0,.15L146,208.47a18,18,0,0,1-36,0l7.82-46.34,0-.15A14,14,0,0,0,104,146H56a10,10,0,0,1-10-10V118H210v18A10,10,0,0,1,200,146Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,24H72A40,40,0,0,0,32,64v72a24,24,0,0,0,24,24h48l-7.89,46.67A8.42,8.42,0,0,0,96,208a32,32,0,0,0,64,0,8.42,8.42,0,0,0-.11-1.33L152,160h48a24,24,0,0,0,24-24V32A8,8,0,0,0,216,24ZM72,40H176V80a8,8,0,0,0,16,0V40h16v64H48V64A24,24,0,0,1,72,40ZM200,144H152a16,16,0,0,0-15.84,18.26l0,.2L144,208.6a16,16,0,0,1-32,0l7.8-46.14,0-.2A16,16,0,0,0,104,144H56a8,8,0,0,1-8-8V120H208v16A8,8,0,0,1,200,144Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,28H72A36,36,0,0,0,36,64v72a20,20,0,0,0,20,20h48a4,4,0,0,1,4,4.52l-7.9,46.81a3.79,3.79,0,0,0-.06.67,28,28,0,0,0,56,0,3.79,3.79,0,0,0-.06-.67L148,160.52a4,4,0,0,1,4-4.52h48a20,20,0,0,0,20-20V32A4,4,0,0,0,216,28ZM72,36H180V80a4,4,0,0,0,8,0V36h24v72H44V64A28,28,0,0,1,72,36ZM200,148H152a12,12,0,0,0-11.88,13.7s0,.06,0,.1L148,208.32a20,20,0,0,1-40,0l7.86-46.52s0-.07,0-.1A12,12,0,0,0,104,148H56a12,12,0,0,1-12-12V116H212v20A12,12,0,0,1,200,148Z"}))]]),$T=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),r.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),FT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.15,70.54,185.46,25.86a20,20,0,0,0-28.28,0L33.86,149.17A19.86,19.86,0,0,0,28,163.31V208a20,20,0,0,0,20,20H216a12,12,0,0,0,0-24H125L230.15,98.83A20,20,0,0,0,230.15,70.54ZM136,81l11,11L76,163,65,152ZM52,204V173l15.52,15.51h0L83,204Zm52-13L93,180l71-71,11,11Zm88-88L153,64l18.34-18.34,39,39Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),r.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM79.32,188,164,103.31,180.69,120,96,204.69ZM68,176.69,51.31,160,136,75.31,152.69,92Zm-20,2.62L76.69,208H48Zm144-70.62L147.32,64l24-24L216,84.69Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM79.32,188l90.34-90.34,16.69,16.68L96,204.69Zm79-101.66h0L68,176.69,51.31,160l90.35-90.34ZM48,179.31,76.69,208H48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.91,74.79,181.22,30.1a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H216a6,6,0,0,0,0-12H110.49L225.91,94.59A14,14,0,0,0,225.91,74.79ZM76.49,188,164,100.48,183.52,120,96,207.51ZM68,179.52,48.49,160,136,72.49,155.52,92ZM46,208V174.48L81.52,210H48A2,2,0,0,1,46,208ZM217.42,86.1,192,111.52,144.49,64,169.9,38.59a2,2,0,0,1,2.83,0l44.69,44.68A2,2,0,0,1,217.42,86.1Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM136,75.31,152.69,92,68,176.69,51.31,160ZM48,208V179.31L76.69,208Zm48-3.31L79.32,188,164,103.31,180.69,120Zm96-96L147.32,64l24-24L216,84.69Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L39.51,154.83A12,12,0,0,0,36,163.31V208a12,12,0,0,0,12,12H216a4,4,0,0,0,0-8H105.66L224.49,93.17A12,12,0,0,0,224.49,76.2ZM73.66,188,164,97.66,186.35,120,96,210.34ZM68,182.34,45.66,160,136,69.66,158.35,92ZM44,208V169.66l21.17,21.17h0L86.34,212H48A4,4,0,0,1,44,208ZM218.83,87.51,192,114.34,141.66,64l26.83-26.83a4,4,0,0,1,5.66,0l44.68,44.69A4,4,0,0,1,218.83,87.51Z"}))]]),IT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,120a16,16,0,1,1-16-16A16,16,0,0,1,200,120ZM156,64H116a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Zm100,48v32a28,28,0,0,1-27.54,28L213.2,214.73A20,20,0,0,1,194.36,228H181.64a20,20,0,0,1-18.84-13.27l-1-2.73H110.17l-1,2.73A20,20,0,0,1,90.36,228H77.64A20,20,0,0,1,58.8,214.73L46.5,180.28A91.63,91.63,0,0,1,25.75,137.8,11.91,11.91,0,0,0,24,144a12,12,0,0,1-24,0,36.07,36.07,0,0,1,24.56-34.13A92.13,92.13,0,0,1,116,28H220a12,12,0,0,1,0,24H210a92,92,0,0,1,22.48,31.45l.42,1A28.05,28.05,0,0,1,256,112Zm-24,0a4,4,0,0,0-4-4h-3.66a12,12,0,0,1-11.45-8.41A68,68,0,0,0,148,52H116A68,68,0,0,0,65.86,165.94,11.85,11.85,0,0,1,68.31,170l12.15,34h7.08l2.87-8a12,12,0,0,1,11.3-8h68.58a12,12,0,0,1,11.3,8l2.87,8h7.08l17.16-48a12,12,0,0,1,11.3-8h8a4,4,0,0,0,4-4Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,112v32a16,16,0,0,1-16,16h-8l-18.1,50.69a8,8,0,0,1-7.54,5.31H177.64a8,8,0,0,1-7.54-5.31L166.29,200H97.71L93.9,210.69A8,8,0,0,1,86.36,216H73.64a8,8,0,0,1-7.54-5.31L53,174a79.7,79.7,0,0,1-21-54h0a80,80,0,0,1,80-80h32a80,80,0,0,1,73.44,48.22,82.22,82.22,0,0,1,2.9,7.78H224A16,16,0,0,1,240,112Z",opacity:"0.2"}),r.createElement("path",{d:"M192,116a12,12,0,1,1-12-12A12,12,0,0,1,192,116ZM152,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm96,48v32a24,24,0,0,1-24,24h-2.36l-16.21,45.38A16,16,0,0,1,190.36,224H177.64a16,16,0,0,1-15.07-10.62L160.65,208h-57.3l-1.92,5.38A16,16,0,0,1,86.36,224H73.64a16,16,0,0,1-15.07-10.62L46,178.22a87.69,87.69,0,0,1-21.44-48.38A16,16,0,0,0,16,144a8,8,0,0,1-16,0,32,32,0,0,1,24.28-31A88.12,88.12,0,0,1,112,32H216a8,8,0,0,1,0,16H194.61a87.93,87.93,0,0,1,30.17,37c.43,1,.85,2,1.25,3A24,24,0,0,1,248,112Zm-16,0a8,8,0,0,0-8-8h-3.66a8,8,0,0,1-7.64-5.6A71.9,71.9,0,0,0,144,48H112A72,72,0,0,0,58.91,168.64a8,8,0,0,1,1.64,2.71L73.64,208H86.36l3.82-10.69A8,8,0,0,1,97.71,192h68.58a8,8,0,0,1,7.53,5.31L177.64,208h12.72l18.11-50.69A8,8,0,0,1,216,152h8a8,8,0,0,0,8-8Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226,88.08c-.4-1-.82-2-1.25-3a87.93,87.93,0,0,0-30.17-37H216a8,8,0,0,0,0-16H112a88.12,88.12,0,0,0-87.72,81A32,32,0,0,0,0,144a8,8,0,0,0,16,0,16,16,0,0,1,8.57-14.16A87.69,87.69,0,0,0,46,178.22l12.56,35.16A16,16,0,0,0,73.64,224H86.36a16,16,0,0,0,15.07-10.62l1.92-5.38h57.3l1.92,5.38A16,16,0,0,0,177.64,224h12.72a16,16,0,0,0,15.07-10.62L221.64,168H224a24,24,0,0,0,24-24V112A24,24,0,0,0,226,88.08ZM152,72H112a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm28,56a12,12,0,1,1,12-12A12,12,0,0,1,180,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M190,116a10,10,0,1,1-10-10A10,10,0,0,1,190,116ZM152,66H112a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Zm94,46v32a22,22,0,0,1-22,22h-3.77l-16.68,46.71A14,14,0,0,1,190.36,222H177.64a14,14,0,0,1-13.19-9.29L162.06,206H101.94l-2.39,6.71A14,14,0,0,1,86.36,222H73.64a14,14,0,0,1-13.19-9.29L47.76,177.18a85.72,85.72,0,0,1-21.47-50.24A18,18,0,0,0,14,144a6,6,0,0,1-12,0,30,30,0,0,1,24.19-29.43A86.1,86.1,0,0,1,112,34H216a6,6,0,0,1,0,12H187.82a85.92,85.92,0,0,1,35.12,39.83c.6,1.38,1.16,2.77,1.68,4.18A22,22,0,0,1,246,112Zm-12,0a10,10,0,0,0-10-10h-3.66a6,6,0,0,1-5.73-4.2,71.4,71.4,0,0,0-2.68-7.19A74,74,0,0,0,144,46H112A74,74,0,0,0,57.44,170a5.81,5.81,0,0,1,1.22,2l13.09,36.64A2,2,0,0,0,73.64,210H86.36a2,2,0,0,0,1.89-1.33L92.06,198a6,6,0,0,1,5.65-4h68.58a6,6,0,0,1,5.65,4l3.81,10.69a2,2,0,0,0,1.89,1.33h12.72a2,2,0,0,0,1.89-1.33L210.35,158a6,6,0,0,1,5.65-4h8a10,10,0,0,0,10-10Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,116a12,12,0,1,1-12-12A12,12,0,0,1,192,116ZM152,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm96,48v32a24,24,0,0,1-24,24h-2.36l-16.21,45.38A16,16,0,0,1,190.36,224H177.64a16,16,0,0,1-15.07-10.62L160.65,208h-57.3l-1.92,5.38A16,16,0,0,1,86.36,224H73.64a16,16,0,0,1-15.07-10.62L46,178.22a87.69,87.69,0,0,1-21.44-48.38A16,16,0,0,0,16,144a8,8,0,0,1-16,0,32,32,0,0,1,24.28-31A88.12,88.12,0,0,1,112,32H216a8,8,0,0,1,0,16H194.61a87.93,87.93,0,0,1,30.17,37c.43,1,.85,2,1.25,3A24,24,0,0,1,248,112Zm-16,0a8,8,0,0,0-8-8h-3.66a8,8,0,0,1-7.64-5.6A71.9,71.9,0,0,0,144,48H112A72,72,0,0,0,58.91,168.64a8,8,0,0,1,1.64,2.71L73.64,208H86.36l3.82-10.69A8,8,0,0,1,97.71,192h68.58a8,8,0,0,1,7.53,5.31L177.64,208h12.72l18.11-50.69A8,8,0,0,1,216,152h8a8,8,0,0,0,8-8Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M188,116a8,8,0,1,1-8-8A8,8,0,0,1,188,116ZM152,68H112a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8Zm92,44v32a20,20,0,0,1-20,20h-5.18l-17.16,48a12,12,0,0,1-11.3,8H177.64a12,12,0,0,1-11.3-8l-2.87-8H100.53l-2.87,8a12,12,0,0,1-11.3,8H73.64a12,12,0,0,1-11.3-8l-12.82-35.9a83.73,83.73,0,0,1-21.4-51.76A20,20,0,0,0,12,144a4,4,0,0,1-8,0,28,28,0,0,1,24.09-27.72A84.1,84.1,0,0,1,112,36H216a4,4,0,0,1,0,8H179.8a84,84,0,0,1,41.31,42.63c.76,1.76,1.47,3.55,2.11,5.37H224A20,20,0,0,1,244,112Zm-8,0a12,12,0,0,0-12-12h-3.66a4,4,0,0,1-3.82-2.8,74.45,74.45,0,0,0-2.75-7.39A76,76,0,0,0,144,44H112A76,76,0,0,0,56,171.34a4,4,0,0,1,.82,1.36l13.09,36.65A4,4,0,0,0,73.64,212H86.36a4,4,0,0,0,3.77-2.65L94,198.65A4,4,0,0,1,97.71,196h68.58a4,4,0,0,1,3.76,2.65l3.82,10.7a4,4,0,0,0,3.77,2.65h12.72a4,4,0,0,0,3.77-2.65l18.1-50.7A4,4,0,0,1,216,156h8a12,12,0,0,0,12-12Z"}))]]),_T=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),OT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H140v28a12,12,0,0,1-24,0V140H88a12,12,0,0,1,0-24h28V88a12,12,0,0,1,24,0v28h28A12,12,0,0,1,180,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24Zm40,112H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H134v34a6,6,0,0,1-12,0V134H88a6,6,0,0,1,0-12h34V88a6,6,0,0,1,12,0v34h34A6,6,0,0,1,174,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H132v36a4,4,0,0,1-8,0V132H88a4,4,0,0,1,0-8h36V88a4,4,0,0,1,8,0v36h36A4,4,0,0,1,172,128Z"}))]]),ZT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z",opacity:"0.2"}),r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"}))]]),VT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144.49,136.49l-40,40a12,12,0,0,1-17-17L107,140H24a12,12,0,0,1,0-24h83L87.51,96.49a12,12,0,0,1,17-17l40,40A12,12,0,0,1,144.49,136.49ZM200,28H136a12,12,0,0,0,0,24h52V204H136a12,12,0,0,0,0,24h64a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,40V216H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40Z",opacity:"0.2"}),r.createElement("path",{d:"M141.66,133.66l-40,40a8,8,0,0,1-11.32-11.32L116.69,136H24a8,8,0,0,1,0-16h92.69L90.34,93.66a8,8,0,0,1,11.32-11.32l40,40A8,8,0,0,1,141.66,133.66ZM200,32H136a8,8,0,0,0,0,16h56V208H136a8,8,0,0,0,0,16h64a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M141.66,133.66l-40,40A8,8,0,0,1,88,168V136H24a8,8,0,0,1,0-16H88V88a8,8,0,0,1,13.66-5.66l40,40A8,8,0,0,1,141.66,133.66ZM200,32H136a8,8,0,0,0,0,16h56V208H136a8,8,0,0,0,0,16h64a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140.24,132.24l-40,40a6,6,0,0,1-8.48-8.48L121.51,134H24a6,6,0,0,1,0-12h97.51L91.76,92.24a6,6,0,0,1,8.48-8.48l40,40A6,6,0,0,1,140.24,132.24ZM200,34H136a6,6,0,0,0,0,12h58V210H136a6,6,0,0,0,0,12h64a6,6,0,0,0,6-6V40A6,6,0,0,0,200,34Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M141.66,133.66l-40,40a8,8,0,0,1-11.32-11.32L116.69,136H24a8,8,0,0,1,0-16h92.69L90.34,93.66a8,8,0,0,1,11.32-11.32l40,40A8,8,0,0,1,141.66,133.66ZM200,32H136a8,8,0,0,0,0,16h56V208H136a8,8,0,0,0,0,16h64a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M138.83,130.83l-40,40a4,4,0,0,1-5.66-5.66L126.34,132H24a4,4,0,0,1,0-8H126.34L93.17,90.83a4,4,0,0,1,5.66-5.66l40,40A4,4,0,0,1,138.83,130.83ZM200,36H136a4,4,0,0,0,0,8h60V212H136a4,4,0,0,0,0,8h64a4,4,0,0,0,4-4V40A4,4,0,0,0,200,36Z"}))]]),zT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z",opacity:"0.2"}),r.createElement("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z"}))]]),BT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z",opacity:"0.2"}),r.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z"}))]]),UT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),r.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z"}),r.createElement("path",{d:"M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z"}),r.createElement("path",{d:"M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z"}))]]),WT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),GT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,96a12,12,0,0,0-.44-3.3L221.2,42.51A20.08,20.08,0,0,0,202,28H54A20.08,20.08,0,0,0,34.8,42.51L20.46,92.7A12,12,0,0,0,20,96h0v16a43.94,43.94,0,0,0,16,33.92V216a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V145.92A43.94,43.94,0,0,0,236,112V96ZM57.05,52H199l9.14,32H47.91Zm91,56v4a20,20,0,0,1-40,0v-4ZM53,128.71A20,20,0,0,1,44,112v-4H84v4a20,20,0,0,1-20,20,19.76,19.76,0,0,1-9.07-2.2A11.54,11.54,0,0,0,53,128.71ZM196,204H60V155.81c1.32.12,2.65.19,4,.19a43.86,43.86,0,0,0,32-13.85,43.89,43.89,0,0,0,64,0A43.86,43.86,0,0,0,192,156c1.35,0,2.68-.07,4-.19Zm16-92a20,20,0,0,1-9,16.71,11.66,11.66,0,0,0-1.88,1.09A20,20,0,0,1,172,112v-4h40Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,96v16a32,32,0,0,1-64,0V96H96v16a32,32,0,0,1-64,0V96L46.34,45.8A8,8,0,0,1,54,40H202a8,8,0,0,1,7.69,5.8Z",opacity:"0.2"}),r.createElement("path",{d:"M231.69,93.81,217.35,43.6A16.07,16.07,0,0,0,202,32H54A16.07,16.07,0,0,0,38.65,43.6L24.31,93.81A7.94,7.94,0,0,0,24,96v16a40,40,0,0,0,16,32v72a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V144a40,40,0,0,0,16-32V96A7.94,7.94,0,0,0,231.69,93.81ZM54,48H202l11.42,40H42.61Zm98,56v8a24,24,0,0,1-48,0v-8ZM51.06,132.2A24,24,0,0,1,40,112v-8H88v8a24,24,0,0,1-35.12,21.26A7.88,7.88,0,0,0,51.06,132.2ZM200,208H56V151.2a40.57,40.57,0,0,0,8,.8,40,40,0,0,0,32-16,40,40,0,0,0,64,0,40,40,0,0,0,32,16,40.57,40.57,0,0,0,8-.8Zm16-96a24,24,0,0,1-11.07,20.2,8.08,8.08,0,0,0-1.8,1.05A24,24,0,0,1,168,112v-8h48Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.69,93.81,217.35,43.6A16.07,16.07,0,0,0,202,32H54A16.07,16.07,0,0,0,38.65,43.6L24.31,93.81A7.94,7.94,0,0,0,24,96v16a40,40,0,0,0,16,32v72a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V144a40,40,0,0,0,16-32V96A7.94,7.94,0,0,0,231.69,93.81ZM88,112a24,24,0,0,1-35.12,21.26,7.88,7.88,0,0,0-1.82-1.06A24,24,0,0,1,40,112v-8H88Zm64,0a24,24,0,0,1-48,0v-8h48Zm64,0a24,24,0,0,1-11.07,20.2,8.08,8.08,0,0,0-1.8,1.05A24,24,0,0,1,168,112v-8h48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M26.22,94.41A6,6,0,0,0,26,96v16A38,38,0,0,0,42,143V216a6,6,0,0,0,6,6H208a6,6,0,0,0,6-6V143A38,38,0,0,0,230,112V96a5.91,5.91,0,0,0-.23-1.64L215.43,44.15A14.07,14.07,0,0,0,202,34H54A14.07,14.07,0,0,0,40.57,44.15Zm25.89-47A2,2,0,0,1,54,46H202a2,2,0,0,1,1.92,1.45L216.05,90H40ZM102,102h52v10a26,26,0,0,1-52,0Zm-64,0H90v10a26,26,0,0,1-38.18,23,6,6,0,0,0-1.65-1A26,26,0,0,1,38,112ZM202,210H54V148.66a38,38,0,0,0,42-16.21,37.95,37.95,0,0,0,64,0,38,38,0,0,0,42,16.21Zm3.83-76a6,6,0,0,0-1.65,1A26,26,0,0,1,166,112V102h52v10A26,26,0,0,1,205.83,134Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,96a7.89,7.89,0,0,0-.3-2.2L217.35,43.6A16.07,16.07,0,0,0,202,32H54A16.07,16.07,0,0,0,38.65,43.6L24.31,93.8A7.89,7.89,0,0,0,24,96h0v16a40,40,0,0,0,16,32v72a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V144a40,40,0,0,0,16-32V96ZM54,48H202l11.42,40H42.61Zm50,56h48v8a24,24,0,0,1-48,0Zm-16,0v8a24,24,0,0,1-35.12,21.26,7.88,7.88,0,0,0-1.82-1.06A24,24,0,0,1,40,112v-8ZM200,208H56V151.2a40.57,40.57,0,0,0,8,.8,40,40,0,0,0,32-16,40,40,0,0,0,64,0,40,40,0,0,0,32,16,40.57,40.57,0,0,0,8-.8Zm4.93-75.8a8.08,8.08,0,0,0-1.8,1.05A24,24,0,0,1,168,112v-8h48v8A24,24,0,0,1,204.93,132.2Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M28.15,95A3.81,3.81,0,0,0,28,96v16a36,36,0,0,0,16,29.92V216a4,4,0,0,0,4,4H208a4,4,0,0,0,4-4V141.92A36,36,0,0,0,228,112V96a3.81,3.81,0,0,0-.17-1.08L213.5,44.7A12,12,0,0,0,202,36H54A12,12,0,0,0,42.5,44.7Zm22-48.08A4,4,0,0,1,54,44H202a4,4,0,0,1,3.84,2.9L218.7,92H37.3ZM100,100h56v12a28,28,0,0,1-56,0ZM36,112V100H92v12a28,28,0,0,1-41.37,24.59,4,4,0,0,0-1.31-.76A28,28,0,0,1,36,112ZM204,212H52V145.94a36,36,0,0,0,44-17.48,36,36,0,0,0,64,0,36,36,0,0,0,44,17.48Zm2.68-76.17a3.94,3.94,0,0,0-1.3.76A28,28,0,0,1,164,112V100h56v12A28,28,0,0,1,206.68,135.83Z"}))]]),KT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),r.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),YT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),qT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56a8,8,0,0,1-8,8h-8V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,56ZM88,32h80a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM82,24a6,6,0,0,1,6-6h80a6,6,0,0,1,0,12H88A6,6,0,0,1,82,24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM84,24a4,4,0,0,1,4-4h80a4,4,0,0,1,0,8H88A4,4,0,0,1,84,24Z"}))]]),XT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0ZM96.49,80.49,116,61v83a12,12,0,0,0,24,0V61l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM88,80h32v64a8,8,0,0,0,16,0V80h32a8,8,0,0,0,5.66-13.66l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,88,80Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0ZM92.24,76.24,122,46.49V144a6,6,0,0,0,12,0V46.49l29.76,29.75a6,6,0,0,0,8.48-8.48l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0ZM90.83,74.83,124,41.66V144a4,4,0,0,0,8,0V41.66l33.17,33.17a4,4,0,1,0,5.66-5.66l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66Z"}))]]),QT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),JT=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),eH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]),tH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),nH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),rH=r.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Be=r.forwardRef((e,t)=>{const{alt:n,color:s,size:i,weight:c,mirrored:u,children:f,weights:h,...m}=e,{color:g="currentColor",size:v,weight:y="regular",mirrored:w=!1,...E}=r.useContext(rH);return r.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:i??v,height:i??v,fill:s??g,viewBox:"0 0 256 256",transform:u||w?"scale(-1, 1)":void 0,...E,...m},!!n&&r.createElement("title",null,n),f,h.get(c??y))});Be.displayName="IconBase";const Bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:YL}));Bx.displayName="ApertureIcon";const aH=Bx,Ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:qL}));Ux.displayName="ArchiveIcon";const Wx=Ux,Gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:XL}));Gx.displayName="ArrowCircleUpIcon";const Kx=Gx,Yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:QL}));Yx.displayName="ArrowClockwiseIcon";const Gm=Yx,qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:JL}));qx.displayName="ArrowCounterClockwiseIcon";const o1=qx,Xx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:eT}));Xx.displayName="ArrowLineUpIcon";const sH=Xx,Qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:tT}));Qx.displayName="ArrowRightIcon";const sg=Qx,Jx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:nT}));Jx.displayName="ArrowSquareOutIcon";const W1=Jx,e5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:rT}));e5.displayName="ArrowUpIcon";const oH=e5,t5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:aT}));t5.displayName="ArrowsClockwiseIcon";const lH=t5,n5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:sT}));n5.displayName="ArrowsDownUpIcon";const iH=n5,r5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:oT}));r5.displayName="ArrowsLeftRightIcon";const cH=r5,a5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:lT}));a5.displayName="BellIcon";const og=a5,s5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:iT}));s5.displayName="BookmarkSimpleIcon";const G1=s5,o5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:cT}));o5.displayName="BroomIcon";const uH=o5,l5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:uT}));l5.displayName="CaretDownIcon";const ai=l5,i5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:dT}));i5.displayName="CaretLeftIcon";const wi=i5,c5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:fT}));c5.displayName="CaretRightIcon";const K1=c5,u5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:hT}));u5.displayName="CheckIcon";const _a=u5,d5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:mT}));d5.displayName="CheckCircleIcon";const dH=d5,f5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:pT}));f5.displayName="CircleIcon";const fH=f5,h5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:gT}));h5.displayName="ClockCounterClockwiseIcon";const hH=h5,m5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:vT}));m5.displayName="CopyIcon";const mH=m5,p5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:yT}));p5.displayName="CopySimpleIcon";const pH=p5,g5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:xT}));g5.displayName="DatabaseIcon";const gH=g5,v5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:wT}));v5.displayName="DotsThreeIcon";const vH=v5,y5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:bT}));y5.displayName="DownloadSimpleIcon";const x5=y5,w5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ET}));w5.displayName="FilmSlateIcon";const Km=w5,b5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:CT}));b5.displayName="FolderSimpleIcon";const yH=b5,E5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ST}));E5.displayName="FrameCornersIcon";const xH=E5,C5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:jT}));C5.displayName="GearSixIcon";const wH=C5,S5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:kT}));S5.displayName="HouseIcon";const bH=S5,j5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:NT}));j5.displayName="IdentificationBadgeIcon";const Ym=j5,k5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:AT}));k5.displayName="ImageSquareIcon";const Wa=k5,N5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:MT}));N5.displayName="InfoIcon";const qm=N5,A5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:RT}));A5.displayName="KeyIcon";const M5=A5,R5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:PT}));R5.displayName="LightningIcon";const l1=R5,P5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:LT}));P5.displayName="MagnifyingGlassIcon";const Tc=P5,L5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:TT}));L5.displayName="MountainsIcon";const EH=L5,T5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:HT}));T5.displayName="PackageIcon";const Xm=T5,H5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:DT}));H5.displayName="PaintBrushBroadIcon";const CH=H5,D5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:$T}));D5.displayName="PaletteIcon";const SH=D5,$5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:FT}));$5.displayName="PencilLineIcon";const lg=$5,F5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:IT}));F5.displayName="PiggyBankIcon";const jH=F5,I5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:_T}));I5.displayName="PlusIcon";const tr=I5,_5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:OT}));_5.displayName="PlusCircleIcon";const kH=_5,O5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ZT}));O5.displayName="SidebarSimpleIcon";const NH=O5,Z5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:VT}));Z5.displayName="SignInIcon";const AH=Z5,V5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:zT}));V5.displayName="SlidersHorizontalIcon";const z5=V5,B5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:BT}));B5.displayName="SparkleIcon";const MH=B5,U5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:UT}));U5.displayName="StackIcon";const hh=U5,W5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:WT}));W5.displayName="StarIcon";const mh=W5,G5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:GT}));G5.displayName="StorefrontIcon";const RH=G5,K5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:KT}));K5.displayName="SunIcon";const PH=K5,Y5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:YT}));Y5.displayName="TrashIcon";const q5=Y5,X5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:qT}));X5.displayName="TrashSimpleIcon";const Y1=X5,Q5=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:XT}));Q5.displayName="UploadSimpleIcon";const J5=Q5,ew=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:QT}));ew.displayName="UserIcon";const LH=ew,tw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:JT}));tw.displayName="WarningIcon";const nw=tw,rw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:eH}));rw.displayName="WarningCircleIcon";const nu=rw,aw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:tH}));aw.displayName="XIcon";const Mn=aw,sw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:nH}));sw.displayName="XCircleIcon";const ow=sw,lw=r.createContext({push:()=>{}}),mr=()=>r.useContext(lw),ig=4;function TH({children:e}){const[t,n]=r.useState([]),s=r.useRef(1),i=r.useCallback(u=>n(f=>f.filter(h=>h.id!==u)),[]),c=r.useCallback(u=>{const f=s.current++;n(h=>{const m=[...h,{...u,id:f}];if(m.length<=ig)return m;const g=[...m];for(;g.length>ig;){const v=g.findIndex(y=>{var w;return y.kind!=="error"&&!y.action&&!((w=y.actions)!=null&&w.length)});g.splice(v===-1?0:v,1)}return g}),window.setTimeout(()=>i(f),u.kind==="error"?9e3:5e3)},[i]);return o.jsxs(lw.Provider,{value:{push:c},children:[e,o.jsx("div",{className:"sc-toasts",role:"status","aria-live":"polite",children:t.map(u=>{var f;return o.jsxs("div",{className:"sc-toast",children:[u.kind==="success"?o.jsx(dH,{className:"sc-toast-ok",size:17,weight:"fill"}):o.jsx(nu,{className:"sc-toast-err",size:17,weight:"fill"}),o.jsxs("div",{style:{minWidth:0,flex:1},children:[o.jsx("b",{children:u.title}),u.detail&&o.jsx("small",{children:u.detail.slice(0,140)}),((f=u.actions)!=null&&f.length?u.actions:u.action?[u.action]:[]).slice(0,2).map(h=>o.jsx("button",{type:"button",className:"sc-toast-act",onClick:()=>{h.onClick(),i(u.id)},children:h.label},h.label))]}),o.jsx("button",{type:"button",className:"sc-toast-x",onClick:()=>i(u.id),"aria-label":"Dismiss",children:o.jsx(Mn,{size:13})})]},u.id)})})]})}async function Re(e,t,n){const s=await fetch(t,{method:e,headers:n!==void 0?{"content-type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0});if(!s.ok){let i=`HTTP ${s.status}`;try{const c=await s.json();i=c.error??i,c.details&&(i+=`: ${c.details.join("; ")}`)}catch{}throw Object.assign(new Error(i),{status:s.status,method:e,url:t})}return s.json()}const HH=(e,t,n)=>Re("DELETE",`/api/brands/${e}/${t}/${n}`),DH=(e,t)=>HH(e,"products",t);async function $H(e,t,n={}){const s=new FormData;n.role&&s.append("role",n.role),n.background&&s.append("background",n.background),s.append("file",t);const i=await fetch(`/api/brands/${e}/logos`,{method:"POST",body:s});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`HTTP ${i.status}`);return i.json()}const FH=e=>`/api/brands/${e}/export`;async function IH(e,t,n,s){const i=new FormData;i.append("file",n);const c=await fetch(`/api/brands/${e}/products/${t}/shots`,{method:"POST",body:i});if(!c.ok)throw new Error((await c.json().catch(()=>({}))).error??`HTTP ${c.status}`);return c.json()}async function iw(e){const t=new FormData;t.append("file",e);const n=await fetch("/api/images",{method:"POST",body:t});if(!n.ok)throw new Error((await n.json().catch(()=>({}))).error??`HTTP ${n.status}`);return(await n.json()).hash}function _H(e,t){try{fetch(`/api/brands/${e}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({brand:t}),keepalive:!0})}catch{}}const rn=e=>`/api/images/${e}`,_n=e=>e!=null&&e.startsWith("asset:")?rn(e.slice(6)):null;async function OH(e,t,n){const s=await fetch("/api/export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({imageHash:e,presets:t,baseName:n})});if(!s.ok)throw new Error(`export failed: HTTP ${s.status}`);const i=await s.blob(),c=document.createElement("a");c.href=URL.createObjectURL(i),c.download=`${n||"scenri-export"}.zip`,c.click(),URL.revokeObjectURL(c.href)}function cw(e){return e.every(t=>t.kind==="root")}let uw=new Map;function ZH(e){const t=new Map;for(const n of e)for(const s of n.legacyNames??[])s!==n.name&&t.set(s,n.name);uw=t}function Cn(e){var s;const t=(s=/^\[([^\]]+)\]/.exec(e.prompt))==null?void 0:s[1];return t?uw.get(t)??t:e.prompt.startsWith("Remove all overlaid marketing text")||e.prompt.startsWith("Remove ALL text")?"Text lift":e.prompt.trim().split(/\s+/).slice(0,6).join(" ")||(e.kind==="edit"?"Edit":"Generation")}const Ce={brands:()=>Re("GET","/api/brands"),createBrand:e=>Re("POST","/api/brands",{brand:e}),brandFromUrl:e=>Re("POST","/api/brands/from-url",{url:e}),updateBrand:(e,t)=>Re("PUT",`/api/brands/${e}`,{brand:t}),deleteBrand:e=>Re("DELETE",`/api/brands/${e}`),brandRules:e=>Re("GET",`/api/brands/${e}/directives`),refreshBrandFromUrl:(e,t)=>Re("POST",`/api/brands/${e}/refresh-from-url`,t?{url:t}:{}),updateLogo:(e,t,n)=>Re("PATCH",`/api/brands/${e}/logos/${t}`,n),deleteLogo:(e,t)=>Re("DELETE",`/api/brands/${e}/logos/${t}`),projects:e=>Re("GET",`/api/projects?brandId=${encodeURIComponent(e)}`),createProject:(e,t)=>Re("POST","/api/projects",{brandId:e,name:t}),tree:e=>Re("GET",`/api/projects/${e}/tree`),activity:e=>Re("GET",`/api/brands/${e}/activity`),workspace:e=>Re("GET",`/api/brands/${e}/workspace`),sets:e=>Re("GET",`/api/brands/${e}/sets`),createSet:(e,t)=>Re("POST",`/api/brands/${e}/sets`,{name:t}),renameSet:(e,t)=>Re("PATCH",`/api/sets/${e}`,{name:t}),deleteSet:e=>Re("DELETE",`/api/sets/${e}`),addToSet:(e,t)=>Re("POST",`/api/sets/${e}/nodes`,{nodeIds:t}),removeFromSet:(e,t)=>Re("DELETE",`/api/sets/${e}/nodes/${t}`),engines:()=>Re("GET","/api/engines"),codexStatus:()=>Re("GET","/api/engines/codex/status"),installCodex:()=>Re("POST","/api/engines/codex/install"),loginCodex:()=>Re("POST","/api/engines/codex/login"),setCap:(e,t)=>Re("PUT","/api/caps",{engineId:e,capUsd:t}),addNode:e=>Re("POST","/api/nodes",e),cancelNode:e=>Re("POST",`/api/nodes/${e}/cancel`),scenes:()=>Re("GET","/api/scenes"),presenters:()=>Re("GET","/api/presenters"),presenterFrames:e=>Re("GET",`/api/presenter-previews/${e}`),demoProducts:()=>Re("GET","/api/demo-products"),demoProductFrames:e=>Re("GET",`/api/demo-product-previews/${e}`),showcase:()=>Re("GET","/api/showcase"),exportPresets:()=>Re("GET","/api/export/presets"),previewBrief:(e,t,n)=>Re("POST","/api/brief/preview",{brief:e,engineId:t,brandId:n}),keep:(e,t)=>Re("POST",`/api/nodes/${e}/keep`,{kept:t}),archiveNode:(e,t)=>Re("POST",`/api/nodes/${e}/archive`,{archived:t}),deleteNode:e=>Re("DELETE",`/api/nodes/${e}`),deleteNodesBatch:e=>Re("POST","/api/nodes/delete-batch",{nodeIds:e}),diff:(e,t)=>Re("POST","/api/diff",{imageA:e,imageB:t}),settings:()=>Re("GET","/api/settings"),saveSettings:e=>Re("PUT","/api/settings",e),costs:()=>Re("GET","/api/costs/summary"),home:()=>Re("GET","/api/home"),reveal:()=>Re("POST","/api/system/reveal"),version:()=>Re("GET","/api/version"),updateStatus:()=>Re("GET","/api/update/status"),updateCheck:()=>Re("POST","/api/update/check"),updateApply:()=>Re("POST","/api/update/apply"),updateRestart:()=>Re("POST","/api/update/restart"),releaseNotes:()=>Re("GET","/api/release/notes"),releaseSeen:e=>Re("POST","/api/release/seen",{version:e}),sceneFrames:e=>Re("GET",`/api/scene-previews/${e}`),deleteData:e=>Re("DELETE",`/api/data?scope=${e}`),productsLibrary:e=>Re("GET",`/api/brands/${e}/products-library`),catalogImport:(e,t)=>Re("POST",`/api/brands/${e}/catalog/import`,{url:t}),catalogJob:(e,t)=>Re("GET",`/api/brands/${e}/catalog/jobs/${t}`),catalogJobs:e=>Re("GET",`/api/brands/${e}/catalog/jobs`),cancelCatalogJob:(e,t)=>Re("POST",`/api/brands/${e}/catalog/jobs/${t}/cancel`),deleteCatalogProduct:(e,t)=>Re("DELETE",`/api/brands/${e}/catalog/products/${t}`),updateProduct:(e,t,n)=>Re("PATCH",`/api/brands/${e}/products/${t}`,n),updateCatalogProduct:(e,t,n)=>Re("PATCH",`/api/brands/${e}/catalog/products/${t}`,n),setProductShots:(e,t,n)=>Re("PUT",`/api/brands/${e}/products/${t}/shots`,{files:n}),assetBuildCapabilities:()=>Re("GET","/api/asset-builds/capabilities"),startAssetBuild:(e,t)=>Re("POST",`/api/brands/${e}/asset-builds`,t),assetBuild:(e,t)=>Re("GET",`/api/brands/${e}/asset-builds/${t}`),assetBuilds:e=>Re("GET",`/api/brands/${e}/asset-builds`),cancelAssetBuild:(e,t)=>Re("POST",`/api/brands/${e}/asset-builds/${t}/cancel`),deleteAssetBuild:(e,t)=>Re("DELETE",`/api/brands/${e}/asset-builds/${t}`),createProduct:(e,t)=>Re("POST",`/api/brands/${e}/products`,t),createPresenter:(e,t)=>Re("POST",`/api/brands/${e}/presenters`,t),updatePresenter:(e,t,n)=>Re("PATCH",`/api/brands/${e}/presenters/${t}`,n),deletePresenter:(e,t)=>Re("DELETE",`/api/brands/${e}/presenters/${t}`),createScene:(e,t)=>Re("POST",`/api/brands/${e}/scenes`,t),updateScene:(e,t,n)=>Re("PATCH",`/api/brands/${e}/scenes/${t}`,n),deleteScene:(e,t)=>Re("DELETE",`/api/brands/${e}/scenes/${t}`),generateScenePreview:(e,t)=>Re("POST",`/api/brands/${e}/scenes/${t}/preview`)},Ye={root:"/",setup:"/setup",brand:"/:brandSlug",kit:"/:brandSlug/kit",products:"/:brandSlug/products",product:"/:brandSlug/products/:productId",scenes:"/:brandSlug/scenes",scene:"/:brandSlug/scenes/:sceneId",presenters:"/:brandSlug/presenters",presenter:"/:brandSlug/presenters/:presenterId",hub:"/:brandSlug/create",hubShot:"/:brandSlug/create/shots/:shotId",set:"/:brandSlug/sets/:setSlug",setShot:"/:brandSlug/sets/:setSlug/shots/:shotId",legacy:"/b/*",notFound:"*"},Vo=e=>ea(Ye.brand,{brandSlug:e.slug}),VH=e=>ea(Ye.kit,{brandSlug:e.slug}),U0=e=>ea(Ye.products,{brandSlug:e.slug}),Js=(e,t)=>ea(Ye.product,{brandSlug:e.slug,productId:t}),gc=e=>ea(Ye.scenes,{brandSlug:e.slug}),rl=(e,t)=>ea(Ye.scene,{brandSlug:e.slug,sceneId:t}),vc=e=>ea(Ye.presenters,{brandSlug:e.slug}),al=(e,t)=>ea(Ye.presenter,{brandSlug:e.slug,presenterId:t}),ur=e=>ea(Ye.hub,{brandSlug:e.slug}),cc=(e,t)=>ea(Ye.set,{brandSlug:e.slug,setSlug:t.slug}),q1=(e,t,n)=>t?ea(Ye.setShot,{brandSlug:e.slug,setSlug:t.slug,shotId:n}):ea(Ye.hubShot,{brandSlug:e.slug,shotId:n});function zH(e,t=""){const[,,n,...s]=e.split("/");if(!n)return Ye.root;const i=`/${n}${BH(s)}`;return t?i+t:i}function BH(e){const[t,n,s,i]=e;return t==="create"?s&&n==="n"?`/create/shots/${s}`:"/create":t==="s"&&n?i&&s==="n"?`/sets/${n}/shots/${i}`:`/sets/${n}`:t==="brand"?"/kit":t==="p"?"/create":t==="n"&&n?`/create/shots/${n}`:e.length?`/${e.join("/")}`:""}const UH=[[Ye.setup,"Setup"],[Ye.hubShot,"Create"],[Ye.hub,"Create"],[Ye.setShot,"Create"],[Ye.set,"Create"],[Ye.kit,"Brand kit"],[Ye.product,"Products"],[Ye.products,"Products"],[Ye.scene,"Scenes"],[Ye.scenes,"Scenes"],[Ye.presenter,"Presenters"],[Ye.presenters,"Presenters"]];function WH(e){for(const[t,n]of UH)if(Ql(t,e))return`${n} · scenri`;return"scenri studio"}function GH(){const{pathname:e}=mn();r.useEffect(()=>{document.title=WH(e)},[e])}const KH={scenes:[],collections:[],verticals:[],loaded:!1,error:!1};function YH(){const[e,t]=r.useState(KH),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.scenes().then(u=>{ZH(u.scenes),c&&t({scenes:u.scenes,collections:u.collections,verticals:u.verticals,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}const qH={presenters:[],categories:[],styles:[],loaded:!1,error:!1};function XH(){const[e,t]=r.useState(qH),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.presenters().then(u=>{c&&t({presenters:u.presenters,categories:u.categories,styles:u.styles,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}const QH={demoProducts:[],categories:[],loaded:!1,error:!1};function JH(){const[e,t]=r.useState(QH),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.demoProducts().then(u=>{c&&t({demoProducts:u.demoProducts,categories:u.categories,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}const eD={showcase:[],categories:[],loaded:!1,error:!1};function tD(){const[e,t]=r.useState(eD),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.showcase().then(u=>{c&&t({showcase:u.showcase,categories:u.categories,loaded:!0,error:!1})}).catch(()=>{c&&t(u=>({...u,loaded:!0,error:!0}))}),()=>{c=!1}},[n]);const i=r.useCallback(()=>{t(c=>({...c,loaded:!1,error:!1})),s(c=>c+1)},[]);return{...e,refetch:i}}function X1(){const{open:e}=gs("settings");return r.useCallback((t="brand")=>e(t),[e])}const cg="codex-cli";function Q1(){const{open:e}=gs("setup");return r.useCallback((t=cg)=>{e(typeof t=="string"?t:cg)},[e])}function ru(e){var t;e.preventDefault(),(t=e.currentTarget)==null||t.focus({preventScroll:!0})}function Qm({failure:e,density:t,onRetry:n,dismiss:s}){const i=X1(),c=Q1(),{remedy:u}=e,f=t==="tile",h=()=>{u&&(u.opens==="setup"?c("codex-cli"):i(u.opens))},m=n&&e.retryable,g=w=>f?`sc-s${w?" sc-s-primary":""}`:`sc-btn ${w?"sc-btn-primary":"sc-btn-ghost"}`,v=!f&&!!e.fix,y=!f&&!!e.raw;return o.jsxs("div",{className:"sc-fail","data-density":t,"data-kind":e.kind,"data-long":e.title.length>90||void 0,role:"alert",children:[o.jsx("span",{className:"sc-fail-ic","aria-hidden":!0,children:o.jsx(nu,{size:f?15:21,weight:"fill"})}),o.jsxs("div",{className:"sc-fail-txt",children:[o.jsx("b",{children:e.title}),v&&o.jsx("small",{children:e.fix})]}),(u||m||s)&&o.jsxs("div",{className:"sc-fail-acts",children:[u&&o.jsx("button",{type:"button",className:g(!0),onClick:h,children:u.label}),m&&o.jsxs("button",{type:"button",className:g(!u),onClick:n,children:[o.jsx(o1,{size:f?12:14})," Try again"]}),s&&o.jsx("button",{type:"button",className:"sc-fail-alt",onClick:s.onClick,children:s.label})]}),y&&o.jsxs("details",{className:"sc-fail-raw",children:[o.jsx("summary",{children:"Details"}),o.jsx("pre",{children:e.raw})]})]})}function Jm({failure:e,action:t,tone:n="error"}){return o.jsx("div",{className:"sc-failrow","data-tone":n,role:n==="error"?"alert":"status",children:o.jsxs("div",{className:"sc-banner","data-tone":n==="error"?"error":void 0,children:[o.jsx("span",{className:"sc-banner-ic",children:n==="error"?o.jsx(nu,{size:16,weight:"fill"}):o.jsx(qm,{size:16,weight:"fill"})}),o.jsxs("span",{className:"sc-banner-txt",children:[o.jsx("b",{children:e.title}),e.fix&&o.jsx("small",{children:e.fix})]}),t]})})}const dw="the engine",nD=[{re:/HTTP 401\b|missing authentication|no auth credentials|invalid api key|unauthorized/i,kind:"auth",title:e=>`${Ra(e)} did not accept your API key.`,fix:"Add or replace the key, then run this again.",remedy:{label:"Add key",opens:"engines"},retryable:!1},{re:/HTTP 403\b|forbidden/i,kind:"auth",title:e=>`${Ra(e)} refused this key.`,fix:"It may not cover the model this shot asked for.",remedy:{label:"Check key",opens:"engines"},retryable:!1},{re:/spend cap for .*would exceed it|spend cap for/i,kind:"budget",title:e=>`This would go past your monthly cap for ${e}.`,fix:"Raise the cap, or wait for the month to roll over.",remedy:{label:"Open budget",opens:"budget"},retryable:!1},{re:/HTTP 402\b|insufficient (credit|funds|balance)|out of credit|billing|payment required/i,kind:"credit",title:e=>`${Ra(e)} is out of credit.`,fix:"Top up with the provider, then run this again.",remedy:{label:"Open engines",opens:"engines"},retryable:!1},{re:/HTTP 429\b|rate.?limit|too many requests/i,kind:"rate",title:e=>`${Ra(e)} is rate limiting this key.`,fix:"Give it a minute, then try again.",retryable:!0},{re:/moderation|content policy|safety system|flagged|violat(es|ion)|blocked by/i,kind:"policy",title:e=>`${Ra(e)} declined this brief.`,fix:"Reword what you asked for and run it again.",retryable:!1},{re:/cannot carry enough reference images/i,kind:"references",title:()=>"",remedy:{label:"Choose engine",opens:"engines"},retryable:!1},{re:/cannot produce the requested aspect ratio|engine returned \d+x\d+ for a \d+x\d+ request/i,kind:"format",title:e=>`${Ra(e)} cannot make this shape.`,fix:"Pick another format, or an engine that can.",remedy:{label:"Choose engine",opens:"engines"},retryable:!1},{re:/HTTP 404\b|model not found|no endpoints found|no allowed providers/i,kind:"model",title:e=>`${Ra(e)} has no model for this shot.`,fix:"Pick another engine in Settings.",remedy:{label:"Choose engine",opens:"engines"},retryable:!1},{re:/failed to spawn codex|codex.*enoent|command not found/i,kind:"setup",title:()=>"Codex is not installed on this machine.",fix:"Run setup once and this works from then on.",remedy:{label:"Set up Codex",opens:"setup"},retryable:!1},{re:/\brun aborted\b/i,kind:"cancelled",title:()=>"You stopped this shot.",fix:"The brief is kept. Run it again whenever.",retryable:!0},{re:/timed out|\btimeout\b|ETIMEDOUT/i,kind:"timeout",title:e=>`${Ra(e)} took too long to answer.`,fix:"Try again. A long brief sometimes needs a second run.",retryable:!0},{re:/ENOTFOUND|ECONNREFUSED|ECONNRESET|EAI_AGAIN|fetch failed|network error/i,kind:"network",title:e=>`Could not reach ${e}.`,fix:"Check your connection, then try again.",retryable:!0},{re:/interrupted\W+server restarted/i,kind:"restarted",title:()=>"scenri restarted while this was rendering.",fix:"The shot was lost, not the brief. Run it again.",retryable:!0},{re:/HTTP 5\d\d\b|internal server error|bad gateway|service unavailable|overloaded|upstream/i,kind:"server",title:e=>`${Ra(e)} had a problem on its end.`,fix:"Nothing wrong with your brief. Try again shortly.",retryable:!0},{re:/produced no images|returned no image|no images returned|finished but produced no/i,kind:"empty",title:e=>`${Ra(e)} finished without making a picture.`,fix:"Run it again. This usually clears on a second try.",retryable:!0}];function Ra(e){return e===dw?"The engine":e}function oo(e,t){const n=(e??"").trim(),s=(t??"").replace(/\s*\(BYOK\)\s*$/i,"").trim()||dw;if(!n)return{kind:"unknown",title:"This shot did not finish.",raw:"",retryable:!0};for(const i of nD){if(!i.re.test(n))continue;const c=i.title(s)||rD(n);return{kind:i.kind,title:c,fix:i.fix,raw:n,remedy:i.remedy,retryable:i.retryable}}return{kind:"unknown",title:"This shot did not finish.",raw:n,retryable:!0}}function fw(){return{kind:"cancelled",title:"You stopped this shot.",fix:"The brief is kept. Run it again whenever.",raw:"",retryable:!0}}function dn(e,t,n){const s=e instanceof Error?e.message:typeof e=="string"?e:String((e==null?void 0:e.message)??e),i=oo(s,n),c=i.kind==="unknown"?i.raw||void 0:[i.title,i.fix].filter(Boolean).join(" ");return{kind:"error",title:t,detail:c}}function rD(e){const t=e.trim();if(!t)return t;const n=t[0].toUpperCase()+t.slice(1);return/[.!?]$/.test(n)?n:`${n}.`}function hw(e){return e?e.phase==="ready"?e.blockReason!=="dev"&&e.blockReason!=="unsupervised"&&e.blockReason!=="launcher-too-old":e.canApply:!1}const aD=360*60*1e3,mw="scenri:update-dismissed";function sD(){try{return sessionStorage.getItem(mw)}catch{return null}}function oD(e){try{sessionStorage.setItem(mw,e)}catch{}}const pw=r.createContext(null);function ep(){const e=r.useContext(pw);if(!e)throw new Error("useUpdateCenter must be used inside UpdateCenterProvider");return e}function lD({children:e}){const[t,n]=r.useState(null),[s,i]=r.useState(!1),[c,u]=r.useState(sD),f=r.useRef(void 0);r.useEffect(()=>{let j=!0;const k=async()=>{if(j){if(!document.hidden)try{const M=await Ce.updateStatus();j&&n(M)}catch{}j&&(f.current=window.setTimeout(k,aD))}};k();const A=()=>{document.hidden||!j||(window.clearTimeout(f.current),k())};return document.addEventListener("visibilitychange",A),window.addEventListener("focus",A),()=>{j=!1,window.clearTimeout(f.current),document.removeEventListener("visibilitychange",A),window.removeEventListener("focus",A)}},[]);const h=r.useCallback(async()=>{i(!0);try{n(await Ce.updateCheck())}finally{i(!1)}},[]),m=r.useCallback(()=>{const j=t==null?void 0:t.latest;j&&(oD(j),u(j))},[t]),g=(t==null?void 0:t.latest)!=null&&t.latest===c,[v,y]=r.useState("idle"),[w,E]=r.useState(null),C=j=>new Promise(k=>setTimeout(k,j)),b=r.useCallback(async j=>{y("restarting");try{await Ce.updateRestart()}catch{}const k=Date.now()+3e4;for(;Date.now()<k;){await C(800);try{if((await Ce.version()).version!==j){location.reload();return}}catch{}}y("idle"),E("The restart did not complete. Check the terminal scenri runs in.")},[]),N=r.useCallback(async()=>{if(v!=="idle")return;E(null);const j=t==null?void 0:t.current;try{if((t==null?void 0:t.phase)!=="ready")for(y("applying"),await Ce.updateApply();;){await C(1500);const k=await Ce.updateStatus();if(n(k),k.phase==="ready")break;if(k.phase==="error"){E(k.error??"The update could not be staged."),y("idle");return}}await b(j)}catch(k){E(String((k==null?void 0:k.message)??k)),y("idle")}},[v,t,b]);return o.jsxs(pw.Provider,{value:{status:t,checking:s,checkNow:h,dismissed:g,dismiss:m,apply:N,busy:v,applyError:w},children:[e,v!=="restarting"&&(t==null?void 0:t.available)&&!g&&o.jsx(cD,{}),v==="restarting"&&o.jsx(iD,{version:(t==null?void 0:t.stagedVersion)??(t==null?void 0:t.latest)??null})]})}function iD({version:e}){return o.jsx("div",{className:"sc-upd-overlay",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"sc-upd-overlay-card",children:[o.jsx(Kx,{size:22}),o.jsx("b",{children:e?`Updating to scenri ${e}`:"Updating scenri"}),o.jsx("small",{children:"Restarting. This page reconnects by itself."})]})})}function cD(){const{status:e,dismiss:t,apply:n,busy:s,applyError:i}=ep(),c=X1();return e?o.jsxs("div",{className:"sc-upd-float",role:"status",children:[o.jsx("span",{className:"sc-upd-float-dot","aria-hidden":"true"}),o.jsxs("span",{className:"sc-upd-float-txt",children:["A new update is available",i&&o.jsx("small",{children:i})]}),o.jsx("button",{type:"button",className:"sc-upd-float-later",onClick:t,children:"Not now"}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:s!=="idle",onClick:()=>hw(e)?void n():c("about"),children:s==="applying"?"Updating…":"Update"})]}):null}const gw=50;function ss(e){return Date.parse(e.includes("T")?e:`${e.replace(" ","T")}Z`)}function eo(e,t=Date.now()){const n=ss(e);return Number.isNaN(n)?0:Math.max(0,Math.round((t-n)/1e3))}function tp(e,t=Date.now()){const n=eo(e,t);return n<20?"generating":n<60?"still generating":"taking longer than usual"}function uD(e,t=Date.now()){const n=eo(e,t);if(n<60)return`${n}s`;const s=Math.floor(n/60);return s<60?`${s}m`:`${Math.floor(s/60)}h ${s%60}m`}function vw(e,t=Date.now()){const n=eo(e,t);if(n<45)return"just now";if(n<3600)return`${Math.round(n/60)}m ago`;if(n<86400)return`${Math.floor(n/3600)}h ago`;const s=Math.floor(n/86400);return s===1?"Yesterday":`${s}d ago`}function dD(e){if(!e)return 0;if(e.stage==="discovering")return e.discovered?15:8;if(e.stage==="fetching_products"){const t=Math.max(e.discovered,e.fetched,1);return 15+Math.min(45,Math.round(e.fetched/t*45))}if(e.stage==="processing_assets"){const t=Math.max(e.imagesTotal,1);return 60+Math.min(35,Math.round(e.imagesDone/t*35))}return e.stage==="completed"?100:e.stage==="partial"?95:5}function fD(e,t,n=Date.now()){const s=e.setNames.length>0?`${e.setNames.join(", ")} · `:"",i=e.status==="running"?`${s}${tp(e.createdAt,n)}`:e.status==="error"?`${s}${e.error??"failed"}`:e.status==="cancelled"?`${s}cancelled`:`${s}${e.images.length} image${e.images.length===1?"":"s"}`;return{id:`node:${e.id}`,kind:e.kind==="edit"?"edit":"generation",state:e.status,title:e.kind==="edit"?`Edit · ${Cn(e)}`:Cn(e),subtitle:i,thumb:e.images[0]??null,percent:null,startedAt:e.createdAt,href:q1(t,null,e.id)}}function hD(e,t){const n=e.stage==="completed"?"done":e.stage==="partial"?"partial":e.stage==="failed"?"error":"running";let s=e.url;try{s=new URL(e.url).hostname.replace(/^www\./,"")}catch{}const i=e.discovered?`${e.upserted} of ${e.discovered} products`:`${e.upserted} products`;return{id:`catalog:${e.id}`,kind:"catalog",state:n,title:s,subtitle:n==="error"?`Catalog import · ${e.message??"failed"}`:`Catalog import · ${i}`,thumb:null,percent:dD(e),startedAt:e.createdAt,href:VH(t)}}function mD(e,t){const n=e.stage==="done"?"done":e.stage==="failed"?"error":e.stage==="cancelled"?"cancelled":"running",s=n==="error"?e.error??"failed":n==="cancelled"?"stopped":n==="done"?e.warnings[0]??e.coverage[0]??(e.kind==="presenter"?"Ready to cast":"Ready to use"):e.message??(e.kind==="presenter"?"Building the studio views":"Reading the references");return{id:`build:${e.id}`,kind:e.kind,state:n,title:e.name,subtitle:s,thumb:e.previewHash,percent:e.steps>0?Math.min(100,Math.round(e.step/e.steps*100)):null,startedAt:e.startedAt,href:e.assetId?e.kind==="presenter"?al(t,e.assetId):rl(t,e.assetId):null}}function pD(e,t=12){const n=e.filter(i=>i.state==="running"),s=e.filter(i=>i.state!=="running").sort((i,c)=>ss(c.startedAt)-ss(i.startedAt)).slice(0,t);return n.sort((i,c)=>ss(i.startedAt)-ss(c.startedAt)),[...n,...s]}function gD(e,t,n=new Date){if(!e)return[];const s=[];for(const i of t){if(i.state==="running")continue;const c=e.get(i.id);c&&c.state!=="running"||s.push({id:i.id,kind:i.kind,state:i.state,title:i.title,subtitle:i.subtitle,thumb:i.thumb,at:n.toISOString(),href:i.href})}return s}function vD(e,t,n=gw){if(t.length===0)return e;const s=new Set(t.map(i=>i.id));return[...t,...e.filter(i=>!s.has(i.id))].sort((i,c)=>ss(c.at)-ss(i.at)).slice(0,n)}function yD(e,t){const n=e.filter(i=>!i.watched);if(!t)return n.length;const s=ss(t);return n.filter(i=>ss(i.at)>s).length}const yw=e=>`scenri:notifications-${e}`,xw=e=>`scenri:notifications-seen-${e}`;function ww(e){try{return localStorage.getItem(e)}catch{return null}}function bw(e,t){try{localStorage.setItem(e,t)}catch{}}function ug(e){const t=ww(yw(e));if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}const dg=(e,t)=>bw(yw(e),JSON.stringify(t.slice(0,gw))),fg=e=>ww(xw(e)),xD=(e,t)=>bw(xw(e),t),wD=1500,bD=5e3,Ew=r.createContext(null);function sl(){const e=r.useContext(Ew);if(!e)throw new Error("useTaskCenter must be used inside TaskCenterProvider");return e}function ED({brand:e,children:t}){const n=an(),{push:s}=mr(),{refresh:i}=pn(),c=e.id,[u,f]=r.useState([]),[h,m]=r.useState([]),[g,v]=r.useState(()=>ug(c)),[y,w]=r.useState(()=>fg(c)),[E,C]=r.useState(!1),b=r.useRef(null),N=r.useRef(new Set),j=r.useRef(0),k=r.useRef(new Set),A=r.useRef(i);A.current=i;const M=r.useRef(null),T=r.useRef(E);T.current=E;const D=r.useRef(n);D.current=n;const{pathname:L}=mn(),Y=r.useRef(!1);Y.current=/\/(create|sets)(\/|$)/.test(L);const I=r.useRef(s);I.current=s,r.useEffect(()=>{b.current=null,N.current=new Set,j.current=0,k.current=new Set,f([]),m([]),v(ug(c)),w(fg(c))},[c]);const se=r.useCallback(async()=>{var W;let Q,H;try{const[{nodes:P,jobs:Z},{builds:ae}]=await Promise.all([Ce.activity(c),Ce.assetBuilds(c)]);H=ae,Q=[...P.map(G=>fD(G,e)),...Z.map(G=>hD(G,e)),...ae.map(G=>mD(G,e))]}catch{return}m(H);const K=H.filter(P=>P.finished&&P.assetId&&!k.current.has(P.id));if(K.length){for(const P of K)k.current.add(P.id);await A.current()}const X=gD(b.current,Q);if(b.current=new Map(Q.map(P=>[P.id,P])),j.current=Q.filter(P=>P.state==="running").length,f(pD(Q)),X.length!==0&&(v(P=>{const Z=Y.current?X.map(G=>G.state==="error"?G:{...G,watched:!0}):X,ae=vD(P,Z);return dg(c,ae),ae}),!T.current))for(const P of X){if(N.current.has(P.id)||(N.current.add(P.id),P.state==="cancelled")||P.state!=="error"&&Y.current)continue;const Z=P.href,ae=Z?{label:"View",onClick:()=>D.current(Z)}:void 0;if(P.state==="error"){I.current({kind:"error",title:`${P.title} failed`,detail:P.subtitle,action:ae});continue}if(P.kind==="presenter"||P.kind==="scene"){const G=P.id.startsWith("build:")?((W=H.find(fe=>`build:${fe.id}`===P.id))==null?void 0:W.assetId)??null:null;I.current({kind:"success",title:`${P.title} is ready`,detail:P.subtitle,actions:Z?[{label:P.kind==="presenter"?"View presenter":"View scene",onClick:()=>D.current(Z)},{label:"Use in a shot",onClick:()=>D.current(`${ur(e)}?${P.kind==="presenter"?"presenter":"scene"}=${G}&compose=1`)}]:void 0});continue}I.current({kind:"success",title:P.kind==="catalog"?"Catalog import finished":"Generation finished",detail:P.title,action:ae})}},[c,e]);r.useEffect(()=>{let Q=null,H=!0;const K=async()=>{if(!H||(document.hidden||await se(),!H))return;const W=!document.hidden&&j.current>0;Q=setTimeout(K,W?wD:bD)},X=()=>{Q&&clearTimeout(Q),Q=null,document.hidden||K()};return M.current=X,K(),document.addEventListener("visibilitychange",X),window.addEventListener("focus",X),()=>{H=!1,M.current=null,Q&&clearTimeout(Q),document.removeEventListener("visibilitychange",X),window.removeEventListener("focus",X)}},[se]);const U=r.useCallback(()=>{var Q;return(Q=M.current)==null?void 0:Q.call(M)},[]),te=r.useCallback(()=>{const Q=new Date().toISOString();w(Q),xD(c,Q)},[c]),O=r.useCallback(()=>{v([]),dg(c,[]),te()},[c,te]),ne=r.useMemo(()=>({tasks:u,running:u.filter(Q=>Q.state==="running").length,builds:h,feed:g,unread:yD(g,y),markSeen:te,clearFeed:O,panelOpen:E,setPanelOpen:C,poke:U}),[u,h,g,y,te,O,E,U]);return o.jsx(Ew.Provider,{value:ne,children:t})}function Cw(e){const{brand:t}=It(),{pathname:n}=mn(),s=an(),i=!!lr(Ye.brand),c=!!lr({path:Ye.hub,end:!1}),u=!!lr({path:Ye.set,end:!1}),f=c||u,h=!!lr({path:Ye.products,end:!1}),m=!!lr({path:Ye.scenes,end:!1}),g=!!lr({path:Ye.presenters,end:!1}),v=y=>y?"fill":"regular";return[{key:"home",label:"Home",icon:o.jsx(bH,{size:e,weight:v(i)}),active:i,go:()=>s(Vo(t))},{key:"create",label:"Create",icon:o.jsx(kH,{size:e,weight:v(f)}),active:f,go:()=>s(f?`${n}?compose=1`:`${ur(t)}?compose=1`)},{key:"products",label:"Products",icon:o.jsx(Xm,{size:e,weight:v(h)}),active:h,go:()=>s(U0(t))},{key:"presenters",label:"Presenters",icon:o.jsx(Ym,{size:e,weight:v(g)}),active:g,go:()=>s(vc(t))},{key:"scenes",label:"Scenes",icon:o.jsx(Km,{size:e,weight:v(m)}),active:m,go:()=>s(gc(t))}]}const Po=e=>{var t,n;return((n=(t=e.json)==null?void 0:t.meta)==null?void 0:n.name)??e.slug};function CD(e){return([...e.trim()].find(n=>new RegExp("\\p{L}|\\p{N}","u").test(n))??"?").toUpperCase()}function SD(e){const t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return"#ffffff";const[n,s,i]=[0,2,4].map(u=>Number.parseInt(t[1].slice(u,u+2),16)/255),c=u=>u<=.03928?u/12.92:((u+.055)/1.055)**2.4;return .2126*c(n)+.7152*c(s)+.0722*c(i)>.42?"#0a0a0a":"#ffffff"}function h2({brand:e,size:t=20}){var i,c,u,f,h,m;const n=_n((u=(c=(i=e.json)==null?void 0:i.logos)==null?void 0:c[0])==null?void 0:u.file),s=((m=(h=(f=e.json)==null?void 0:f.palette)==null?void 0:h.primary)==null?void 0:m.hex)??"#6b6b6b";return o.jsx("span",{className:"sc-brand-av","data-logo":n?"":void 0,style:{width:t,height:t,fontSize:Math.round(t*.5),...n?{}:{background:s,color:SD(s)}},"aria-hidden":!0,children:n?o.jsx("img",{src:n,alt:""}):CD(Po(e))})}function jD(){const e=Cw(22);return o.jsx("nav",{className:"sc-tabbar","aria-label":"Main",children:o.jsx("ul",{children:e.map(t=>o.jsx("li",{children:o.jsxs("button",{type:"button","data-on":t.active||void 0,"aria-current":t.active?"page":void 0,onClick:t.go,children:[o.jsx("span",{className:"sc-tab-ic",children:t.icon}),o.jsx("span",{className:"sc-tab-lb",children:t.label})]})},t.key))})})}function kD(){var m,g;const{brands:e}=pn(),{brand:t}=It(),n=an(),s=X1(),i=ep(),c=td(),u=e.filter(v=>v.id!==t.id),f=!!((m=i.status)!=null&&m.available),h=f&&!i.dismissed||c.unread;return o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-org-btn","aria-label":`${Po(t)}, brand and settings`,children:[o.jsx(h2,{brand:t,size:22}),o.jsx("span",{dir:"auto",className:"sc-org-name",children:Po(t)}),o.jsx(ai,{size:11,className:"sc-caret"}),h&&o.jsx("span",{className:"sc-upd-dot","aria-hidden":"true"})]})}),o.jsxs(Zo,{align:"end",sideOffset:8,className:"sc-menu",children:[o.jsxs("div",{className:"sc-menu-head",children:[o.jsx(h2,{brand:t,size:34}),o.jsxs("span",{className:"sc-menu-head-txt",children:[o.jsx("span",{dir:"auto",className:"sc-menu-name",children:Po(t)}),o.jsx("span",{className:"sc-menu-sub",children:"Current brand"})]})]}),u.map(v=>o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>n(Vo(v)),children:[o.jsx(h2,{brand:v,size:20}),o.jsx("span",{dir:"auto",className:"sc-menu-lb",children:Po(v)})]},v.id)),o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>n("/setup"),children:[o.jsx(tr,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"Set up a brand"})]}),o.jsx("div",{className:"sc-menu-sep"}),f&&o.jsxs(Qr,{className:"sc-menu-item","data-update":"",onSelect:()=>s("about"),children:[o.jsx(Kx,{size:18,className:"sc-menu-ic"}),o.jsxs("span",{className:"sc-menu-lb",children:["Update available · ",(g=i.status)==null?void 0:g.latest]})]}),o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>c.open(),children:[o.jsx(MH,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"What's new"}),c.unread&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-menu-new","aria-hidden":"true"}),o.jsx("span",{className:"sc-vh",children:", not read yet"})]})]}),o.jsxs(Qr,{className:"sc-menu-item",onSelect:()=>s(),children:[o.jsx(wH,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"Settings"})]})]})]})}function au(e){const t=r.useRef(null),n=r.useRef(null),s=r.useRef(0),i=f=>{f.pointerType==="mouse"&&f.button!==0||(n.current={y:f.clientY,t:f.timeStamp},s.current=0,t.current&&(t.current.style.transition="none"),f.currentTarget.setPointerCapture(f.pointerId))},c=f=>{!n.current||!t.current||(s.current=Math.max(0,f.clientY-n.current.y),t.current.style.transform=`translateY(${s.current}px)`)},u=f=>{const h=n.current;if(n.current=null,!h||!t.current)return;t.current.style.transition="";const m=s.current/Math.max(1,f.timeStamp-h.t);if(s.current>96||m>.45){e();return}t.current.style.transform=""};return{sheet:t,grip:{onPointerDown:i,onPointerMove:c,onPointerUp:u,onPointerCancel:u}}}function np({open:e=!0,className:t,maxWidth:n,described:s,children:i,onDismiss:c,onOpenAutoFocus:u,onCloseAutoFocus:f,onPaste:h}){const{sheet:m,grip:g}=au(c),v=u??ru,y=f??(w=>w.preventDefault());return o.jsx(ui,{open:e,onOpenChange:w=>!w&&c(),children:o.jsxs(di,{children:[o.jsx(fi,{className:"sc-newdlg-scrim"}),o.jsx(hi,{className:"sc-newdlg-layer",...s?{}:{"aria-describedby":void 0},onOpenAutoFocus:v,onCloseAutoFocus:y,onPaste:h,onPointerDown:w=>{w.target===w.currentTarget&&c()},children:o.jsxs("div",{ref:m,className:["sc-newdlg",t].filter(Boolean).join(" "),style:n?{"--sc-newdlg-max":n}:void 0,children:[o.jsx("div",{className:"sc-shotsheet-grip",...g,children:o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0})}),i]})})]})})}function rp({className:e,children:t}){return o.jsx(mi,{className:e,children:t})}function i1({children:e}){return o.jsx(R1,{asChild:!0,children:e})}function ND({className:e,children:t}){return o.jsx(sm,{className:e,children:t})}const ph=e=>Array.isArray(e)?e.map(t=>_n(t==null?void 0:t.file)).filter(t=>!!t):[];function J1(e){var n;return(((n=e==null?void 0:e.json)==null?void 0:n.characters)??[]).filter(s=>(s==null?void 0:s.origin)==="custom").map(MD)}function AD(e,t){return J1(e).find(n=>n.id===t)}function MD(e){const t=ph(e.shots),n=ph(e.sourceRefs),s=_n(e.preview)??t[0]??n[0]??null;return{id:String(e.id),name:String(e.name??""),promptName:e.promptName,presentation:e.presentation==="man"?"man":"woman",descriptor:String(e.descriptor??""),ageRange:String(e.ageRange??""),hair:String(e.hair??""),identityNotes:String(e.identityNotes??""),negativeConstraints:Array.isArray(e.negativeConstraints)?e.negativeConstraints.map(String):[],facial:"",skin:"",build:"",wardrobeDefault:"",suitableCategories:Array.isArray(e.suitableCategories)?e.suitableCategories.map(String):[],suitableStyles:[],width:1024,height:1280,previewUrl:s,avatarUrl:_n(e.avatar),custom:!0,shots:t,sourceRefs:n}}function su(e){var n;return(((n=e==null?void 0:e.json)==null?void 0:n.scenes)??[]).map(PD)}function RD(e,t){return su(e).find(n=>n.id===t)}function PD(e){const t=ph(e.refs);return{id:String(e.id),name:String(e.name??""),promptName:e.promptName,description:String(e.description??""),lighting:String(e.lighting??""),subject:e.subject==="product"||e.subject==="person"?e.subject:"either",collections:Array.isArray(e.collections)?e.collections.map(String):[],verticals:Array.isArray(e.verticals)?e.verticals.map(String):[],keywords:Array.isArray(e.keywords)?e.keywords.map(String):void 0,prompt:String(e.prompt??""),width:Number(e.width)||1024,height:Number(e.height)||1280,previewUrl:_n(e.preview)??t[0]??null,previewColor:null,custom:!0,refs:t,instruction:e.instruction?String(e.instruction):void 0}}function hg(e,t){const n=new Set(e.map(s=>s.id));return[...e,...t.filter(s=>!n.has(s.id))]}function LD(){const{brand:e,products:t}=It(),{scenes:n,presenters:s,demoProducts:i,showcase:c}=pn();return r.useMemo(()=>{const u={presenters:J1(e),scenes:su(e)},f=new Set,h=E=>!E||f.has(E)?null:(f.add(E),E),m=(E,C)=>{for(const b of E){const N=h(C(b));if(N)return N}return null},g=E=>m(c.filter(C=>{var b;return(((b=C.brief)==null?void 0:b.tokens)??[]).some(N=>(N==null?void 0:N.t)===E)}),C=>C.previewUrl),v=m([...t].reverse(),E=>{var C,b;return _n((b=(C=E==null?void 0:E.shots)==null?void 0:C[0])==null?void 0:b.file)}),y=m(u.presenters,E=>E.previewUrl),w=m(u.scenes,E=>E.previewUrl);return{product:{url:v??g("product")??m(i,E=>E.previewUrl)??null,count:t.length,own:!!v},presenter:{url:y??g("character")??m(s,E=>E.previewUrl??E.avatarUrl)??null,count:u.presenters.length,own:!!y},scene:{url:w??m(n,E=>E.previewUrl)??g("template")??null,count:u.scenes.length,own:!!w}}},[e,t,n,s,i,c])}const TD=[{kind:"product",label:"Product",line:"What you are photographing",noun:"product",icon:Xm},{kind:"presenter",label:"Presenter",line:"Who appears in the shot",noun:"presenter",icon:Ym},{kind:"scene",label:"Scene",line:"Where it takes place",noun:"scene",icon:Km}],mg=(e,t)=>e===0?"None yet":`${e} ${t}${e===1?"":"s"}`;function HD({suggest:e,onPick:t}){const n=r.useRef(null),{close:s}=gs("new"),i=LD(),c=()=>{var u,f;(f=(u=n.current)==null?void 0:u.querySelector(e?`[data-kind="${e}"]`:"[data-kind]"))==null||f.focus()};return r.useEffect(c,[e]),o.jsxs(np,{className:"sc-newpick",maxWidth:"620px",onDismiss:s,onOpenAutoFocus:u=>{u.preventDefault(),c()},children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(rp,{className:"sc-newdlg-title",children:"Add to this brand"}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx("p",{className:"sc-newdlg-sub",children:"The three things every shot is made from."}),o.jsx("div",{className:"sc-newdlg-body",children:o.jsx("div",{className:"sc-pickgrid",ref:n,children:TD.map(({kind:u,label:f,line:h,noun:m,icon:g})=>{const{url:v,count:y,own:w}=i[u];return o.jsxs("button",{type:"button",className:"sc-pick","data-kind":u,onClick:()=>t(u),"aria-label":`${f}. ${h}. ${mg(y,m)}.`,children:[o.jsxs("span",{className:"sc-pick-media",children:[v?o.jsx("img",{src:v,alt:"",loading:"lazy"}):o.jsx("span",{className:"sc-pick-blank",children:o.jsx(g,{size:22})}),w&&o.jsx("span",{className:"sc-pick-mine",children:"Yours"})]}),o.jsxs("span",{className:"sc-pick-cap",children:[o.jsx("b",{children:f}),o.jsx("small",{children:h})]}),o.jsx("span",{className:"sc-pick-count",children:mg(y,m)})]},u)})})})]})}function ap({title:e,sub:t,error:n,footnote:s,primaryLabel:i,ready:c,blocked:u,busy:f,width:h="440px",onBack:m,onPrimary:g,onPasteFiles:v,children:y}){const{close:w}=gs("new");return o.jsxs(np,{maxWidth:h,onDismiss:w,onPaste:E=>{var b;if(!v)return;const C=Array.from(((b=E.clipboardData)==null?void 0:b.files)??[]).filter(N=>N.type.startsWith("image/"));C.length&&(E.preventDefault(),v(C))},children:[o.jsxs("div",{className:"sc-newdlg-head",children:[m&&o.jsx("button",{type:"button",className:"sc-newdlg-back",onClick:m,"aria-label":"Back",children:o.jsx(wi,{size:15})}),o.jsx(rp,{className:"sc-newdlg-title",children:e}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),t&&o.jsx("p",{className:"sc-newdlg-sub",children:t}),o.jsx("div",{className:"sc-newdlg-body",children:y}),o.jsxs("div",{className:"sc-newdlg-foot",children:[n&&o.jsx("p",{className:"sc-newdlg-err",role:"alert",children:n}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary sc-dlg-go","aria-disabled":!c||f||void 0,title:u,onClick:()=>{c&&!f&&g()},children:[f?o.jsx(ln,{size:"1"}):null,i]}),s&&o.jsx("p",{className:"sc-dlg-foot",children:s})]})]})}function Sw({onFiles:e,onReject:t,disabled:n}){const s=r.useRef(0),[i,c]=r.useState(!1),u=r.useCallback(()=>{s.current=0,c(!1)},[]);return{dragOver:i,dropProps:{"data-drag-over":i||void 0,onDragEnter:h=>{n||!Array.from(h.dataTransfer.types).includes("Files")||(h.preventDefault(),s.current++,c(!0))},onDragOver:h=>{n||h.preventDefault()},onDragLeave:()=>{s.current=Math.max(0,s.current-1),s.current===0&&c(!1)},onDrop:h=>{if(n)return;h.preventDefault(),u();const m=Array.from(h.dataTransfer.files).filter(g=>g.type.startsWith("image/"));m.length?e(m):t==null||t()}}}}function pg({label:e,hint:t,busy:n,disabled:s,multiple:i=!0,accept:c="image/*",onFiles:u,onReject:f,children:h}){const m=r.useRef(null),{dropProps:g}=Sw({onFiles:u,onReject:f,disabled:s||n});return o.jsxs("button",{type:"button",className:"sc-dropzone",disabled:s||n,onClick:()=>{var v;return(v=m.current)==null?void 0:v.click()},...g,children:[o.jsx("input",{ref:m,type:"file",accept:c,multiple:i,hidden:!0,onChange:v=>{const y=Array.from(v.target.files??[]);v.target.value="",y.length&&u(y)}}),n?o.jsx(ln,{}):h,o.jsx("span",{className:"sc-dropzone-label",children:e}),t&&o.jsx("small",{children:t})]})}function sp({hashes:e,max:t,label:n,hint:s,busy:i,onAdd:c,onRemove:u,onReject:f}){if(e.length===0)return o.jsx("div",{className:"sc-assetwell",children:o.jsx(pg,{label:n,hint:s,busy:i,onFiles:c,onReject:f,children:o.jsx(tr,{size:18})})});const h=t-e.length;return o.jsxs("div",{className:"sc-assetform-refs",children:[e.map((m,g)=>o.jsxs("span",{className:"sc-assetform-ref",children:[o.jsx("img",{src:rn(m),alt:`Reference ${g+1}`}),o.jsx("button",{type:"button",className:"sc-assetform-drop","aria-label":`Remove reference ${g+1}`,onClick:()=>u(m),children:o.jsx(Mn,{size:11,weight:"bold"})})]},m)),h>0&&o.jsx(pg,{label:`${h} more`,busy:i,onFiles:c,onReject:f,children:o.jsx(tr,{size:15})})]})}const DD=720*60*60*1e3,op=(e,t)=>`scenri:new-${e}-${t}`;function $D(e){try{return localStorage.getItem(e)}catch{return null}}function FD(e,t){try{localStorage.setItem(e,t)}catch{}}function uc(e){try{localStorage.removeItem(e)}catch{}}function gg(e){var t,n,s;return!!((t=e.name)!=null&&t.trim())||!!((n=e.instruction)!=null&&n.trim())||!!((s=e.importUrl)!=null&&s.trim())||(e.facets??[]).length>0||(e.imageHashes??[]).length>0}const vg=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function ID(e,t){const n=op(e,t),s=$D(n);if(!s)return null;let i;try{i=JSON.parse(s)}catch{return uc(n),null}if(typeof i!="object"||i===null)return uc(n),null;const c=i;if(c.v!==1||c.brandId!==e||c.kind!==t)return uc(n),null;const u=Date.now()-Date.parse(c.updatedAt??"");return!Number.isFinite(u)||u>DD?(uc(n),null):{v:1,brandId:e,kind:t,updatedAt:c.updatedAt,name:typeof c.name=="string"?c.name:"",instruction:typeof c.instruction=="string"?c.instruction:"",facets:vg(c.facets),imageHashes:vg(c.imageHashes),importUrl:typeof c.importUrl=="string"?c.importUrl:"",pending:typeof c.pending=="string"?c.pending:null}}function m2(e,t,n){const s={v:1,brandId:e,kind:t,updatedAt:new Date().toISOString(),name:n.name??"",instruction:n.instruction??"",facets:n.facets??[],imageHashes:n.imageHashes??[],importUrl:n.importUrl??"",pending:n.pending??null};FD(op(e,t),JSON.stringify(s))}function p2(e,t){uc(op(e,t))}function _D(e,t){if(!e)return!1;if(e.pending===null)return!0;const n=t??"unknown";return n==="failed"||n==="cancelled"||n==="unknown"}const yg={name:"",instruction:"",facets:[],imageHashes:[],importUrl:""};function lp(e,t,n){const[s,i]=r.useState(yg),[c,u]=r.useState(!1),[f,h]=r.useState(null),m=r.useRef(null),g=r.useRef(null),v=r.useRef(n.pendingState);v.current=n.pendingState,r.useEffect(()=>{const k=ID(e,t),A=k!=null&&k.pending?v.current(k.pending):null;k&&_D(k,A)&&(g.current=k.pending,i({name:k.name,instruction:k.instruction,facets:k.facets,imageHashes:k.imageHashes,importUrl:k.importUrl}))},[e,t]);const y=r.useCallback(k=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{gg(k)?m2(e,t,{...k,pending:g.current}):p2(e,t)},400)},[e,t]),w=r.useCallback(k=>{i(A=>{const M={...A,...k};return y(M),M})},[y]),E=r.useCallback(()=>{m.current&&clearTimeout(m.current),i(k=>(gg(k)?m2(e,t,{...k,pending:g.current}):p2(e,t),k))},[e,t]);r.useEffect(()=>(window.addEventListener("beforeunload",E),()=>{window.removeEventListener("beforeunload",E),E()}),[E]);const C=r.useCallback(async k=>{u(!0),h(null);try{const A=n.max-s.imageHashes.length,M=[];for(const T of k.slice(0,A))M.push(await iw(T));w({imageHashes:[...new Set([...s.imageHashes,...M])].slice(0,n.max)})}catch(A){h(String(A.message??A))}finally{u(!1)}},[s.imageHashes,n.max,w]),b=r.useCallback(k=>w({imageHashes:s.imageHashes.filter(A=>A!==k)}),[s.imageHashes,w]),N=r.useCallback(k=>w({facets:s.facets.includes(k)?s.facets.filter(A=>A!==k):[...s.facets,k]}),[s.facets,w]),j=r.useCallback(k=>{if(m.current&&clearTimeout(m.current),!k){p2(e,t),g.current=null,i(yg);return}g.current=k,i(A=>(m2(e,t,{...A,pending:k}),A))},[e,t]);return{fields:s,set:w,uploading:c,err:f,setErr:h,addFiles:C,removeHash:b,toggleFacet:N,submitted:j}}const xg=4;function OD({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{presenterCategories:u}=pn(),[f,h]=r.useState(!1),m=lp(c.id,"presenter",{max:xg,pendingState:i}),g=!!m.fields.name.trim()&&m.fields.imageHashes.length>0,v=g?void 0:"Add a name and at least one photo",y=async()=>{h(!0),m.setErr(null);try{const{jobId:E}=await Ce.startAssetBuild(c.id,{kind:"presenter",name:m.fields.name.trim(),instruction:m.fields.instruction.trim()||void 0,imageHashes:m.fields.imageHashes,facets:m.fields.facets});m.submitted(E),t({kind:"presenter",jobId:E,name:m.fields.name.trim()})}catch(E){m.setErr(String(E.message??E))}finally{h(!1)}},w=E=>{E.key!=="Enter"||E.shiftKey||(E.preventDefault(),g&&!f&&y())};return o.jsx(ap,{title:"New presenter",error:m.err,footnote:s(n!=null&&n.canGenerate?"Four studio views. A few minutes.":"Saved from the photos you add."),primaryLabel:"Create presenter",ready:g,blocked:v,busy:f,onBack:e,onPrimary:()=>void y(),onPasteFiles:E=>void m.addFiles(E),children:o.jsxs("div",{className:"sc-assetform",children:[o.jsx(sp,{hashes:m.fields.imageHashes,max:xg,label:"Add photos",hint:"One works. Two to four, from different angles, hold the likeness far better.",busy:m.uploading,onAdd:E=>void m.addFiles(E),onRemove:m.removeHash,onReject:()=>m.setErr("Drop an image file.")}),o.jsxs("div",{className:"sc-assetform-fields",children:[o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-presenter-name",children:"Name"}),o.jsx("input",{id:"sc-presenter-name",className:"sc-in",type:"text",placeholder:"Their name",value:m.fields.name,onChange:E=>m.set({name:E.target.value}),onKeyDown:w})]}),o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-presenter-notes",children:"Notes"}),o.jsx("textarea",{id:"sc-presenter-notes",className:"sc-in",placeholder:"Anything worth knowing about them (optional)",rows:2,value:m.fields.instruction,onChange:E=>m.set({instruction:E.target.value})})]})]}),u.length>0&&o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Categories"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:u.map(E=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets.includes(E)||void 0,"aria-pressed":m.fields.facets.includes(E),onClick:()=>m.toggleFacet(E),children:E},E))})]})]})})}const Hc=[{key:"fragrance",label:"Fragrance",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"side",label:"Side"}]},{key:"footwear",label:"Footwear",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"lateral-side",label:"Lateral side"},{key:"medial-side",label:"Medial side"}]},{key:"apparel",label:"Apparel",angles:[{key:"front",label:"Front"},{key:"back",label:"Back"},{key:"detail-fabric",label:"Detail / fabric"}]},{key:"furniture",label:"Furniture",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"side",label:"Side"}]},{key:"beauty",label:"Beauty / skincare",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"label",label:"Label"}]},{key:"electronics",label:"Electronics",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"back",label:"Back"}]},{key:"jewelry",label:"Jewelry",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"clasp-detail",label:"Clasp detail"}]},{key:"accessories",label:"Accessories",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"detail",label:"Detail"}]},{key:"beverage",label:"Beverage",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"label",label:"Label"}]},{key:"food",label:"Food",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"packaging-label",label:"Packaging label"}]},{key:"other",label:"Other",angles:[{key:"three-quarter",label:"Three-quarter"},{key:"front",label:"Front"},{key:"side",label:"Side"}]}],ip=new Map(Hc.map(e=>[e.key,e]));ip.get("other");function si(e){var t;return e?((t=ip.get(e))==null?void 0:t.label)??e:null}function ZD(e,t){const n=[e??"",...t??[]].join(" ").toLowerCase();if(!n.trim())return;const s=[["fragrance",["fragrance","perfume","eau de","cologne"]],["footwear",["shoe","sneaker","boot","sandal","footwear"]],["apparel",["shirt","dress","jacket","pant","apparel","clothing","hoodie"]],["furniture",["chair","table","sofa","furniture","shelf","desk"]],["beauty",["skincare","serum","cream","lotion","cosmetic","makeup","beauty"]],["electronics",["electronic","headphone","speaker","charger","device","gadget"]],["jewelry",["jewelry","jewellery","necklace","bracelet","earring","ring"]],["accessories",["bag","handbag","wallet","watch","accessory","accessories"]],["beverage",["drink","beverage","soda","juice","coffee","tea"]],["food",["food","snack","grocery","sauce","spice","pantry"]]];for(const[i,c]of s)if(c.some(u=>n.includes(u)))return i}function cp(e){return e.category&&ip.has(e.category)?e.category:ZD(e.productType,e.tags)??null}const wg=6,VD=3;function zD({onBack:e,onStarted:t}){var C,b;const{brand:n}=It(),[s,i]=r.useState(!1),[c,u]=r.useState(!1),[f,h]=r.useState(!1),m=lp(n.id,"product",{max:wg,pendingState:()=>"unknown"}),g=m.fields.imageHashes.length>0,v=g?void 0:"Add at least one photo",y=async()=>{i(!0),m.setErr(null);try{const N=await Ce.createProduct(n.id,{name:m.fields.name.trim(),imageHashes:m.fields.imageHashes,category:m.fields.facets[0]}),j=m.fields.name.trim()||"Product";m.submitted(null),t({kind:"product",id:N.productId,name:j})}catch(N){m.setErr(String(N.message??N))}finally{i(!1)}},w=async()=>{var j,k;const N=m.fields.importUrl.trim()||(((k=(j=n.json)==null?void 0:j.meta)==null?void 0:k.website)??"");if(N){u(!0),m.setErr(null);try{await Ce.catalogImport(n.id,N),m.set({importUrl:""}),t({kind:"product",id:"",name:N})}catch(A){m.setErr(String(A.message??A))}finally{u(!1)}}},E=N=>{N.key==="Enter"&&(N.preventDefault(),g&&!s&&y())};return o.jsxs(ap,{title:"New product",error:m.err,footnote:"Added to this brand. No preview.",primaryLabel:"Add product",ready:g,blocked:v,busy:s,onBack:e,onPrimary:()=>void y(),onPasteFiles:N=>void m.addFiles(N),children:[o.jsxs("div",{className:"sc-assetform",children:[o.jsx(sp,{hashes:m.fields.imageHashes,max:wg,label:"Add packshots",hint:`Straight, well-lit packshots. The first ${VD} are the ones a shot attaches.`,busy:m.uploading,onAdd:N=>void m.addFiles(N),onRemove:m.removeHash,onReject:()=>m.setErr("Drop an image file.")}),o.jsx("div",{className:"sc-assetform-fields",children:o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-product-name",children:"Name"}),o.jsx("input",{id:"sc-product-name",className:"sc-in",type:"text",placeholder:"Name this product",value:m.fields.name,onChange:N=>m.set({name:N.target.value}),onKeyDown:E})]})}),o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Category"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:Hc.map(N=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets[0]===N.key||void 0,"aria-pressed":m.fields.facets[0]===N.key,onClick:()=>m.set({facets:m.fields.facets[0]===N.key?[]:[N.key]}),children:N.label},N.key))})]})]}),o.jsx("div",{className:"sc-newdlg-secondary",children:f?o.jsxs(o.Fragment,{children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-import-url",children:"Your store's address"}),o.jsxs("div",{className:"sc-newdlg-secrow",children:[o.jsx("input",{id:"sc-import-url",className:"sc-in",type:"url",placeholder:((b=(C=n.json)==null?void 0:C.meta)==null?void 0:b.website)??"https://yourstore.com",value:m.fields.importUrl,onChange:N=>m.set({importUrl:N.target.value}),onKeyDown:N=>{N.key==="Enter"&&w()}}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:c,onClick:()=>void w(),children:c?"Starting…":"Import"})]})]}):o.jsx("button",{type:"button",className:"sc-newdlg-secmore",onClick:()=>h(!0),children:"Import a catalog from a store URL"})})]})}const g2=4;function BD({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{verticals:u}=pn(),[f,h]=r.useState(!1),m=lp(c.id,"scene",{max:g2,pendingState:i}),g=!!m.fields.name.trim()&&(m.fields.imageHashes.length>0||!!m.fields.instruction.trim()),v=g?void 0:"Add a name, and a photo or a note",y=async()=>{h(!0),m.setErr(null);try{const{jobId:C}=await Ce.startAssetBuild(c.id,{kind:"scene",name:m.fields.name.trim(),instruction:m.fields.instruction.trim()||void 0,imageHashes:m.fields.imageHashes,facets:m.fields.facets});m.submitted(C),t({kind:"scene",jobId:C,name:m.fields.name.trim()})}catch(C){m.setErr(String(C.message??C))}finally{h(!1)}},w=C=>{C.key==="Enter"&&(C.preventDefault(),g&&!f&&y())},E=C=>{C.key!=="Enter"||!(C.metaKey||C.ctrlKey)||(C.preventDefault(),g&&!f&&y())};return o.jsx(ap,{title:"New scene",error:m.err,footnote:s(n!=null&&n.canGenerate?"One preview. A few minutes.":"Saved without a preview."),primaryLabel:"Create scene",ready:g,blocked:v,busy:f,onBack:e,onPrimary:()=>void y(),onPasteFiles:C=>void m.addFiles(C),children:o.jsxs("div",{className:"sc-assetform",children:[o.jsx(sp,{hashes:m.fields.imageHashes,max:g2,label:"Add a place",hint:`Screenshots, photography, anything showing the world you want. Up to ${g2}.`,busy:m.uploading,onAdd:C=>void m.addFiles(C),onRemove:m.removeHash,onReject:()=>m.setErr("Drop an image file.")}),o.jsxs("div",{className:"sc-assetform-fields",children:[o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-scene-name",children:"Name"}),o.jsx("input",{id:"sc-scene-name",className:"sc-in",type:"text",placeholder:"Name this place",value:m.fields.name,onChange:C=>m.set({name:C.target.value}),onKeyDown:w})]}),o.jsxs("div",{className:"sc-assetform-field",children:[o.jsx("label",{className:"sc-newdlg-seclabel",htmlFor:"sc-scene-notes",children:"Notes"}),o.jsx("textarea",{id:"sc-scene-notes",className:"sc-in",placeholder:"What matters here, in your words",rows:3,value:m.fields.instruction,onChange:C=>m.set({instruction:C.target.value}),onKeyDown:E})]})]}),u.length>0&&o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Categories"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:u.map(C=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets.includes(C)||void 0,"aria-pressed":m.fields.facets.includes(C),onClick:()=>m.toggleFacet(C),children:C},C))})]})]})})}const v2="1",UD=["product","presenter","scene"],WD=e=>!!e&&UD.includes(e),jw=r.createContext(null);function ol(){const e=r.useContext(jw);if(!e)throw new Error("useCreateAsset must be used inside AssetCreateHost");return e.open}function GD({children:e}){const{brand:t}=It(),n=an(),{push:s}=mr(),{refresh:i}=pn(),{builds:c,poke:u}=sl(),f=gs("new"),h=f.value,m=!!lr({path:Ye.products,end:!1}),g=!!lr({path:Ye.presenters,end:!1}),v=!!lr({path:Ye.scenes,end:!1}),y=m?"product":g?"presenter":v?"scene":null,[w,E]=r.useState(null),[C,b]=r.useState(!1),[N,j]=r.useState(!1),k=r.useRef(null),A=r.useRef(null),M=f.open,T=f.set,D=f.close,L=r.useCallback((Q,H)=>{k.current=Q==="choose"||!(H!=null&&H.onCreated)?null:{kind:Q,fn:H.onCreated},A.current=document.activeElement instanceof HTMLElement?document.activeElement:null,j(Q==="choose"),M(Q==="choose"?v2:Q)},[M]),Y=r.useCallback(()=>{k.current=null,j(!1),D()},[D]);r.useEffect(()=>{if(h!==null)return;const Q=A.current;A.current=null,Q!=null&&Q.isConnected&&Q.focus()},[h]),r.useEffect(()=>{if(h===null)return;let Q=!0;b(!1);const H=K=>Ce.assetBuildCapabilities().then(X=>Q&&E(X)).catch(()=>{Q&&(K?setTimeout(()=>H(!1),600):b(!0))});return H(!0),()=>{Q=!1}},[h]);const I=r.useCallback(Q=>w?Q:C?"Could not reach the engine. You can still try.":"Checking the engine…",[w,C]),se=r.useCallback(Q=>{const H=c.find(K=>K.id===Q);return H?H.stage==="failed"?"failed":H.stage==="cancelled"?"cancelled":H.stage==="done"?"done":"running":"unknown"},[c]),U=r.useCallback(Q=>{const H=k.current;if(Y(),u(),Q.kind==="product"){if(!Q.id){s({kind:"success",title:"Importing your catalog",detail:Q.name});return}i(),(H==null?void 0:H.kind)==="product"&&H.fn(Q),s({kind:"success",title:`${Q.name} added`,actions:[{label:"Add details",onClick:()=>n(Js(t,Q.id))},{label:"Use in a shot",onClick:()=>n(`${ur(t)}?product=${Q.id}&compose=1`)}]});return}(H==null?void 0:H.kind)===Q.kind&&H.fn(Q),s({kind:"success",title:`Building ${Q.name}`,detail:Q.kind==="presenter"?"Four studio views. The bell will say when.":"The bell will say when."})},[t,Y,n,u,s,i]),te=r.useMemo(()=>({open:L}),[L]),O=WD(h)?h:null,ne={onBack:N?()=>T(v2):void 0,onStarted:U,caps:w,capsNote:I,pendingState:se};return o.jsxs(jw.Provider,{value:te,children:[e,h===v2&&o.jsx(HD,{suggest:y,onPick:Q=>{j(!0),T(Q)}}),O==="product"&&o.jsx(zD,{...ne},"product"),O==="presenter"&&o.jsx(OD,{...ne},"presenter"),O==="scene"&&o.jsx(BD,{...ne},"scene")]})}function KD(){const e=ol();return o.jsx("button",{type:"button",className:"sc-icon-btn","aria-label":"Add to this brand",title:"Add to this brand",onClick:()=>e("choose"),children:o.jsx(tr,{size:17,weight:"bold"})})}const bi="(max-width: 767px)";function lo(e){const[t,n]=r.useState(()=>window.matchMedia(e).matches);return r.useEffect(()=>{const s=window.matchMedia(e),i=()=>n(s.matches);return i(),s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[e]),t}function YD(){const{running:e,unread:t,panelOpen:n,setPanelOpen:s,markSeen:i}=sl(),{pathname:c}=mn(),u=lo(bi);r.useEffect(()=>s(!1),[c,s]);const f="Notifications"+(t?`, ${t} unread`:"")+(e?`, ${e} task${e===1?"":"s"} running`:""),h=t>0?o.jsx("span",{className:"sc-bell-dot","data-count":t,"aria-hidden":!0,children:t>9?"9+":t}):e>0?o.jsx("span",{className:"sc-bell-dot","data-running":"","aria-hidden":!0}):null;return u?o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"sc-icon-btn sc-notif-btn","data-on":n||void 0,"aria-label":f,"aria-expanded":n,title:"Notifications",onClick:()=>s(!n),children:[o.jsx(og,{size:16,weight:e?"fill":"regular"}),h]}),n?o.jsx(qD,{onClose:()=>s(!1),onSeen:i}):null]}):o.jsxs(ti,{open:n,onOpenChange:s,children:[o.jsx(ni,{children:o.jsxs("button",{type:"button",className:"sc-icon-btn sc-notif-btn","aria-label":f,title:"Notifications",children:[o.jsx(og,{size:16,weight:e?"fill":"regular"}),h]})}),o.jsx(ri,{align:"end",className:"sc-notif-pop",children:o.jsx(kw,{onClose:()=>s(!1),onSeen:i})})]})}function qD({onClose:e,onSeen:t}){const{sheet:n,grip:s}=au(e);return r.useEffect(()=>{const i=c=>{c.key==="Escape"&&e()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),na.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-notif-scrim",onClick:e,"aria-hidden":!0}),o.jsxs("div",{ref:n,className:"sc-notif-sheet",role:"dialog","aria-modal":"true","aria-label":"Notifications",children:[o.jsx("div",{className:"sc-shotsheet-grip",...s,children:o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0})}),o.jsx(kw,{onClose:e,onSeen:t})]})]}),document.body)}function kw({onClose:e,onSeen:t}){const{tasks:n,feed:s,unread:i,clearFeed:c}=sl(),{brand:u}=It(),f=an(),{push:h}=mr(),[m,g]=r.useState("tasks"),v=r.useRef(null),y=JD(1e3),w=b=>{if(b.startsWith("node:")){Ce.cancelNode(b.slice(5)).catch(N=>h(dn(N,"Could not cancel this shot")));return}b.startsWith("build:")&&Ce.cancelAssetBuild(u.id,b.slice(6)).catch(N=>h(dn(N,"Could not stop this build")))};r.useEffect(()=>{m==="feed"&&t()},[m,t]);const E=b=>{f(b),e()},C=b=>{var A,M;const N=["tasks","feed"],j=N.indexOf(m);let k=null;b.key==="ArrowRight"?k=N[(j+1)%N.length]:b.key==="ArrowLeft"?k=N[(j-1+N.length)%N.length]:b.key==="Home"?k=N[0]:b.key==="End"&&(k=N[N.length-1]),k&&(b.preventDefault(),g(k),(M=(A=v.current)==null?void 0:A.querySelector(`#sc-notif-tab-${k}`))==null||M.focus())};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-notif-tabs",role:"tablist","aria-label":"Notifications",ref:v,onKeyDown:C,children:[o.jsx(bg,{id:"tasks",tab:m,onSelect:g,count:n.length,children:"Tasks"}),o.jsx(bg,{id:"feed",tab:m,onSelect:g,count:i||void 0,children:"Notifications"})]}),o.jsx("div",{className:"sc-notif-scroll",role:"tabpanel",id:`sc-notif-panel-${m}`,"aria-labelledby":`sc-notif-tab-${m}`,tabIndex:0,children:m==="tasks"?n.length===0?o.jsx("p",{className:"sc-notif-empty",children:"Nothing running. Generations show up here as they go."}):n.map(b=>o.jsx(XD,{task:b,now:y,onOpen:E,onCancel:w},b.id)):s.length===0?o.jsx("p",{className:"sc-notif-empty",children:"You have no notifications yet."}):s.map(b=>o.jsx(QD,{item:b,now:y,onOpen:E},b.id))}),m==="feed"&&s.length>0?o.jsx("div",{className:"sc-notif-foot",children:o.jsx("button",{type:"button",className:"sc-notif-clear",onClick:c,children:"Clear all"})}):null]})}function bg({id:e,tab:t,onSelect:n,count:s,children:i}){const c=t===e;return o.jsxs("button",{type:"button",role:"tab",id:`sc-notif-tab-${e}`,className:"sc-notif-tab","aria-selected":c,"aria-controls":`sc-notif-panel-${e}`,tabIndex:c?0:-1,onClick:()=>n(e),children:[i,s?o.jsx("span",{className:"sc-notif-n",children:s}):null]})}function Nw({task:e}){return e.thumb?o.jsx("img",{src:rn(e.thumb),alt:""}):e.state==="running"?o.jsx("span",{className:"sc-shimmer"}):e.state==="error"?o.jsx(nu,{size:17,weight:"fill"}):e.state==="cancelled"?o.jsx(ow,{size:17,color:"var(--sc-fg3)"}):e.kind==="catalog"?o.jsx(RH,{size:17}):e.kind==="presenter"?o.jsx(Ym,{size:17}):e.kind==="scene"?o.jsx(Km,{size:17}):o.jsx(Wa,{size:17})}function XD({task:e,now:t,onOpen:n,onCancel:s}){const i=e.state==="running",c=e.id.startsWith("node:")||e.id.startsWith("build:"),u=i&&eo(e.startedAt,t)>=60;return o.jsxs("div",{className:"sc-notif-row-wrap",children:[o.jsxs("button",{type:"button",className:"sc-notif-row","data-state":e.state,"data-running":i||void 0,disabled:!e.href,onClick:()=>e.href&&n(e.href),children:[o.jsx("span",{className:"sc-notif-thumb",children:o.jsx(Nw,{task:e})}),o.jsxs("span",{className:"sc-notif-txt",children:[o.jsx("b",{dir:"auto",children:e.title}),o.jsx("small",{dir:"auto",children:e.subtitle}),i&&e.percent!==null?o.jsx("span",{className:"sc-notif-meter",children:o.jsx("div",{style:{width:`${e.percent}%`}})}):null]}),o.jsx("span",{className:"sc-notif-time",children:i?uD(e.startedAt,t):vw(e.startedAt,t)})]}),i&&c&&o.jsx("button",{type:"button",className:"sc-notif-row-cancel","data-urgent":u||void 0,onClick:f=>{f.stopPropagation(),s(e.id)},children:"Cancel"})]})}function QD({item:e,now:t,onOpen:n}){return o.jsxs("button",{type:"button",className:"sc-notif-row","data-state":e.state,disabled:!e.href,onClick:()=>e.href&&n(e.href),children:[o.jsx("span",{className:"sc-notif-thumb",children:o.jsx(Nw,{task:e})}),o.jsxs("span",{className:"sc-notif-txt",children:[o.jsx("b",{dir:"auto",children:e.title}),o.jsx("small",{dir:"auto",children:e.subtitle})]}),o.jsx("span",{className:"sc-notif-time",children:vw(e.at,t)})]})}function JD(e){const[t,n]=r.useState(()=>Date.now());return r.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}const e$=["M64 18.71V38.8L51.38 51.39V12.62H57.9C61.27 12.62 64 15.35 64 18.72V18.71Z","M12.62 12.62V51.39H6.1C2.73 51.39 0 48.66 0 45.29V25.2L12.62 12.61V12.62Z","M51.38 51.38L38.79 64H18.7C15.33 64 12.6 61.27 12.6 57.9V51.38H51.37H51.38Z","M12.62 12.62L25.2 0H45.29C48.66 0 51.39 2.73 51.39 6.1V12.62H12.62Z"],t$=["M100.99 28.93L91.76 27.8C88.5 27.41 87.19 26.58 87.19 25.1C87.19 23.45 89.98 22.49 94.29 22.49C99.38 22.49 102.43 23.36 104.17 26.58L111.61 24.27C108.65 17.87 102.08 16 94.98 16C85.1 16 78.7 19.31 78.7 25.97C78.7 31.02 82.49 33.81 90.28 34.76L98.68 35.8C102.29 36.24 103.3 37.19 103.3 38.5C103.3 40.24 100.64 41.46 95.59 41.46C89.41 41.46 87.01 40.2 85.31 37.02L77.52 39.33C80.31 45.77 86.92 47.95 95.07 47.95C105.17 47.95 111.88 44.55 111.88 37.72C111.88 32.84 108.53 29.84 101 28.93H100.99Z","M132.73 22.66C137 22.66 140.87 24.01 142.7 28.54L150.49 26.67C148.79 20.66 142.3 16.05 132.6 16.05C121.41 16.05 113.44 22.23 113.44 31.98C113.44 41.73 121.41 48 132.6 48C142.31 48 148.8 43.3 150.49 37.29L142.7 35.42C140.87 39.95 137 41.3 132.73 41.3C126.94 41.3 122.24 38.38 122.24 32.42V31.55C122.24 25.59 126.94 22.67 132.73 22.67V22.66Z","M161.51 34.89H179.58V28.71H161.51V22.97H181.54V16.52H152.8V47.43H181.84V40.99H161.51V34.89Z","M208.71 33.85H208.67L193.86 16.52H184.94V47.43H193.04V27.49H193.08L210.15 47.43H216.81V16.52H208.71V33.85Z","M252.25 26.8C252.25 20.14 248.07 16.52 239.84 16.52H220.77V47.43H229.48V37.5H236.62L242.63 47.43H252.56L245.55 36.37C249.9 34.8 252.25 31.62 252.25 26.79V26.8ZM243.54 27.32C243.54 29.98 242.06 31.28 239.06 31.28H229.48V22.96H239.06C242.06 22.96 243.54 24.27 243.54 26.88V27.32Z","M263.79 16.52H255.08V47.43H263.79V16.52Z"];function n$(e){return o.jsx("svg",{viewBox:"0 0 263.79 64",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:[...e$,...t$].map(t=>o.jsx("path",{d:t},t))})}function r$(){const{brand:e}=It(),t=an(),n=lr({path:Ye.set,end:!1}),i=!!lr({path:Ye.hub,end:!1})||!!n;return o.jsxs("header",{className:"sc-topbar","data-project":i?"":void 0,children:[o.jsx("a",{className:"sc-skip",href:"#main",children:"Skip to content"}),o.jsx("div",{className:"sc-topbar-lead",children:o.jsx("button",{type:"button",className:"sc-wordmark","aria-label":"scenri home",onClick:()=>t(Vo(e)),children:o.jsx(n$,{})})}),o.jsx(a$,{}),o.jsxs("div",{className:"sc-topbar-end",children:[o.jsx(KD,{}),o.jsx(YD,{}),o.jsx(kD,{})]})]})}function a$(){const e=Cw(16);return o.jsx("nav",{className:"sc-nav sc-desktop-only","aria-label":"Main",children:o.jsx("ul",{children:e.map(t=>o.jsx("li",{children:o.jsx("button",{type:"button","data-active":t.active||void 0,"aria-current":t.active?"page":void 0,onClick:t.go,children:t.label})},t.key))})})}const s$=60;function o$(){r.useEffect(()=>{const e=window.visualViewport;if(!e)return;const t=document.documentElement,n=()=>{const s=window.innerHeight-e.height-e.offsetTop;t.style.setProperty("--sc-kb",s>s$?`${Math.round(s)}px`:"0px")};return n(),e.addEventListener("resize",n),e.addEventListener("scroll",n),()=>{e.removeEventListener("resize",n),e.removeEventListener("scroll",n),t.style.removeProperty("--sc-kb")}},[])}function l$(e){const[t,n]=r.useState({products:[],loaded:!1}),s=r.useCallback(async()=>{if(e)try{const i=await Ce.productsLibrary(e);n({products:i.products,loaded:!0})}catch{n(i=>({products:i.products,loaded:!0}))}},[e]);return r.useEffect(()=>{if(!e){n({products:[],loaded:!0});return}let i=!0;n({products:[],loaded:!1});const c=()=>{Ce.productsLibrary(e).then(f=>{i&&n({products:f.products,loaded:!0})}).catch(()=>{i&&n(f=>({products:f.products,loaded:!0}))})};c();const u=setInterval(c,4e3);return()=>{i=!1,clearInterval(u)}},[e]),{...t,reload:s}}function Fr({title:e,sub:t,children:n}){return o.jsxs("section",{className:"sc-set-sec",children:[(e||t)&&o.jsxs("div",{className:"sc-set-sech",children:[e&&o.jsx("h3",{children:e}),t&&o.jsx("p",{children:t})]}),o.jsx("div",{className:"sc-set-card",children:n})]})}function i$({value:e,onChange:t,placeholder:n,label:s,suggestions:i,max:c=24,maxLength:u=200}){const[f,h]=r.useState(""),m=e.length>=c,g=y=>{const w=y.trim().slice(0,u);h(""),!(!w||m)&&(e.some(E=>E.toLowerCase()===w.toLowerCase())||t([...e,w]))},v=!m&&i&&i.length>0?o.jsx("div",{className:"sc-chips-sugg",children:i.map(y=>o.jsx("button",{type:"button",className:"sc-chip",onClick:()=>g(y),"aria-label":`Never show ${y}`,children:y},y))}):null;return o.jsxs(o.Fragment,{children:[e.length===0&&v,o.jsxs("div",{className:"sc-chips",children:[e.map((y,w)=>o.jsxs("span",{className:"sc-chips-item",children:[o.jsx("span",{dir:"auto",children:y}),o.jsx("button",{type:"button",onClick:()=>t(e.filter((E,C)=>C!==w)),"aria-label":`Remove ${y}`,children:o.jsx(Mn,{size:10,weight:"bold"})})]},y)),o.jsx("input",{className:"sc-chips-in",value:f,"aria-label":s,placeholder:m?void 0:e.length?"Add another…":n??"Add one…",disabled:m,dir:"auto",onChange:y=>{const w=y.target.value;if(w.includes(",")){const E=w.split(",");for(const C of E.slice(0,-1))g(C);h(E[E.length-1]);return}h(w.slice(0,u))},onKeyDown:y=>{y.key==="Enter"?(y.preventDefault(),g(f)):y.key==="Backspace"&&!f&&e.length&&t(e.slice(0,-1))},onBlur:()=>g(f)})]}),e.length>0&&v]})}const c$=["competitor logos in frame","visible text or wordmarks on clothing","alcohol","children","visible clutter or mess","heavy skin retouching","neon or harsh colour","pure white studio backgrounds"],Eg=e=>e.trim().toLowerCase();function u$(e){const t=new Set((e??[]).map(Eg));return c$.filter(n=>!t.has(Eg(n)))}function d$({doc:e}){var i;const t=((i=e.json)==null?void 0:i.rules)??{},n=t.never??[],s=c=>{const u={...t};c.length?u.never=c:delete u.never,e.patch({rules:u})};return o.jsx("div",{className:"sc-nv",children:o.jsx(i$,{label:"Things this brand never shows",value:n,placeholder:"Or type your own",suggestions:u$(n),max:24,onChange:s})})}const Aw=["primary","mark","wordmark","monochrome","alternate"],up=["light","dark","any"],k0={primary:"Primary logo",mark:"Mark",wordmark:"Wordmark",monochrome:"Monochrome",alternate:"Alternate"},f$=/^[a-f0-9]{32}$/,h$=e=>{const t=String(e??"");if(!t.startsWith("asset:"))return null;const n=t.slice(6);return f$.test(n)?n:null},m$=e=>Aw.includes(e)?e:"primary",p$=e=>up.includes(e)?e:"any";function Mw(e){return(Array.isArray(e==null?void 0:e.logos)?e.logos:[]).filter(n=>n&&String(n.file??"").trim()).map(n=>{const s=h$(n.file),i=String(n.clearSpace??"").trim();return{hash:s,file:String(n.file),role:m$(n.role),background:p$(n.background),...i?{clearSpace:i}:{},attachable:s!==null}})}function Rw(e){return Mw(e).filter(t=>t.attachable)}function Pw(e,t){var i;const n={primary:"logo",mark:"mark",wordmark:"wordmark",monochrome:"monochrome logo",alternate:"alternate logo"},s=String(((i=e==null?void 0:e.meta)==null?void 0:i.name)??"").trim();return s?`${s} ${n[t.role]}`:`Brand ${n[t.role]}`}function g$({brand:e,doc:t}){const{push:n}=mr(),[s,i]=r.useState(!1),c=t.json??{},u=c.meta??{},f=u.name??e.slug,h=Mw(c),m=h.find(C=>C.role==="primary")??h[0],g=h.filter(C=>C!==m),v=C=>{const b={...u};for(const[N,j]of Object.entries(C)){const k=j.trim();k?b[N]=k:delete b[N]}b.name||(b.name=u.name),t.patch({meta:b})},y=async(C,b)=>{i(!0);try{await t.flush(),t.applyRow(await b())}catch(N){n(dn(N,C))}finally{i(!1)}},w=C=>void y("Could not upload that mark",()=>$H(e.id,C[0])),{dropProps:E}=Sw({onFiles:w,onReject:()=>n({kind:"error",title:"That is not an image",detail:"Drop a PNG, SVG or JPG."}),disabled:s});return o.jsxs("div",{className:"sc-ident",...E,children:[o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Logo"}),o.jsx("small",{children:"Drop an image, or tap to add."})]}),o.jsxs("div",{className:"sc-set-controls",children:[o.jsx(v$,{mark:m,name:f,busy:s,onUpload:w}),(m==null?void 0:m.attachable)&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:s,onClick:()=>void y("Could not remove that mark",()=>Ce.deleteLogo(e.id,m.hash??"")),children:"Remove"})]})]}),m&&o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Sits on"}),o.jsx("small",{children:"So a dark mark is not shown on a dark ground."})]}),o.jsx("select",{className:"sc-in",value:m.background,disabled:s||!m.attachable,onChange:C=>void y("Could not update that mark",()=>Ce.updateLogo(e.id,m.hash??"",{background:C.target.value})),"aria-label":"Sits on",children:up.map(C=>o.jsx("option",{value:C,children:C==="any"?"Any background":`On ${C}`},C))})]}),o.jsx(Cg,{label:"Name",value:u.name??"",placeholder:e.slug,maxLength:120,onCommit:C=>v({name:C})}),o.jsx(Cg,{label:"Tagline",value:u.tagline??"",placeholder:"Add a tagline",maxLength:200,onCommit:C=>v({tagline:C})}),g.map(C=>o.jsx(y$,{mark:C,busy:s,onRole:b=>void y("Could not retag that mark",()=>Ce.updateLogo(e.id,C.hash??"",{role:b})),onBackground:b=>void y("Could not update that mark",()=>Ce.updateLogo(e.id,C.hash??"",{background:b})),onRemove:()=>void y("Could not remove that mark",()=>Ce.deleteLogo(e.id,C.hash??""))},C.hash??C.file)),m&&o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Variant"}),o.jsx("small",{children:"A second mark for dark or light grounds."})]}),o.jsxs("label",{className:"sc-btn sc-btn-ghost",children:[o.jsx(tr,{size:12}),"Add",o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:s,onChange:C=>{const b=Array.from(C.target.files??[]);C.target.value="",b.length&&w(b)}})]})]})]})}function Cg({label:e,value:t,placeholder:n,maxLength:s,onCommit:i}){const[c,u]=r.useState(t);return r.useEffect(()=>u(t),[t]),o.jsxs("div",{className:"sc-set-row",children:[o.jsx("span",{className:"txt",children:o.jsx("b",{children:e})}),o.jsx("input",{className:"sc-in",value:c,placeholder:n,"aria-label":e,maxLength:s,dir:"auto",onChange:f=>u(f.target.value),onBlur:()=>{const f=c.trim();f!==t&&i(f),u(f)},onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(u(t),f.currentTarget.blur())}})]})}function v$({mark:e,name:t,busy:n,onUpload:s}){if(e){const i=e.hash?rn(e.hash):e.file;return o.jsx("span",{className:"sc-well","data-bg":e.background,children:o.jsx("img",{src:i,alt:`${t} logo`})})}return o.jsxs("label",{className:"sc-well","data-empty":"","aria-label":"Add logo",children:[o.jsx(J5,{size:16}),o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:n,onChange:i=>{const c=Array.from(i.target.files??[]);i.target.value="",c.length&&s(c)}})]})}function y$({mark:e,busy:t,onRole:n,onBackground:s,onRemove:i}){const c=e.hash?rn(e.hash):e.file;return o.jsxs("div",{className:"sc-set-row",children:[o.jsx("span",{className:"txt",children:o.jsx("b",{children:k0[e.role]})}),o.jsxs("div",{className:"sc-set-controls",children:[o.jsx("span",{className:"sc-well","data-bg":e.background,children:o.jsx("img",{src:c,alt:k0[e.role]})}),o.jsx("select",{className:"sc-in",value:e.role,disabled:t||!e.attachable,onChange:u=>n(u.target.value),"aria-label":"Mark role",children:Aw.map(u=>o.jsx("option",{value:u,children:k0[u]},u))}),o.jsx("select",{className:"sc-in",value:e.background,disabled:t||!e.attachable,onChange:u=>s(u.target.value),"aria-label":"Sits on",children:up.map(u=>o.jsx("option",{value:u,children:u==="any"?"Any background":`On ${u}`},u))}),e.attachable&&o.jsx("button",{type:"button",disabled:t,onClick:i,"aria-label":`Remove ${k0[e.role]}`,children:o.jsx(Y1,{size:13})})]})]})}const Sg={primary:"Primary",secondary:"Secondary",accent:"Accent",neutral:"Neutral"},x$=(e,t)=>t<=1?Sg[e]:`${Sg[e]} ${t}`;function w$(e){return/^(Primary|Secondary|Accent|Neutral)( [2-9]\d*)?$/.test(String(e??"").trim())}const b$=/^#[0-9A-F]{6}$/;function fn(e){const t=String(e??"").trim(),n=(t.startsWith("#")?t.slice(1):t).toUpperCase();if(/^[0-9A-F]{3}$/.test(n)){const[i,c,u]=n;return`#${i}${i}${c}${c}${u}${u}`}const s=`#${n}`;return b$.test(s)?s:null}const E$=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function C$(e){const t=String(e??"").trim();return E$.test(t)?fn(t):null}function va(e){const t=[],n={primary:0,secondary:0,accent:0,neutral:0},s=(i,c)=>{const u=fn(String((i==null?void 0:i.hex)??""));if(!u)return;n[c]+=1;const f=String((i==null?void 0:i.name)??"").trim();t.push({hex:u,name:f||x$(c,n[c]),slot:c})};s(e==null?void 0:e.primary,"primary"),s(e==null?void 0:e.secondary,"secondary");for(const i of Array.isArray(e==null?void 0:e.accent)?e.accent:[])s(i,"accent");for(const i of Array.isArray(e==null?void 0:e.neutrals)?e.neutrals:[])s(i,"neutral");return t}function dp(e,t){const n={},s=[],i=[],c=g=>{const v=g.name.trim();return v&&!w$(v)?{hex:g.hex,name:v}:{hex:g.hex}};for(const g of e){const v=fn(g.hex);if(!v)continue;const y=c({...g,hex:v});g.slot==="neutral"?i.push(y):s.push(y)}const[u,f,...h]=s;u&&(n.primary=u),f&&(n.secondary=f),h.length&&(n.accent=h),i.length&&(n.neutrals=i);const m=String((t==null?void 0:t.usage)??"").trim();return m&&(n.usage=m),n}const jg=e=>e.slot!=="neutral";function fp(e){var u;const t=(u=e[e.length-1])==null?void 0:u.hex;if(!t)return"#808080";const n=Number.parseInt(t.slice(1),16),[s,i,c]=[n>>16&255,n>>8&255,n&255];return`#${[c,s,i].map(f=>f.toString(16).padStart(2,"0")).join("").toUpperCase()}`}function S$(e,t){const n=fn(t);if(!n)return{palette:e,added:!1,swatch:null};const s=va(e),i=s.find(h=>h.hex===n);if(i)return{palette:e,added:!1,swatch:i};const c=[...s,{hex:n,name:"",slot:s.length?"accent":"primary"}],u=dp(c,e),f=va(u).find(h=>h.hex===n)??null;return{palette:u,added:!0,swatch:f}}function j$(e,t){const n=fn(t);if(!n)return{palette:e,removed:!1};const s=va(e),i=s.filter(c=>c.hex!==n);return i.length===s.length?{palette:e,removed:!1}:{palette:dp(i,e),removed:!0}}function ed(){return(ed=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function Lw(e,t){if(e==null)return{};var n,s,i={},c=Object.keys(e);for(s=0;s<c.length;s++)t.indexOf(n=c[s])>=0||(i[n]=e[n]);return i}function yc(e){var t=r.useRef(e),n=r.useRef(function(s){t.current&&t.current(s)});return t.current=e,n.current}var Dc=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},xc=function(e){return"touches"in e},gh=function(e){return e&&e.ownerDocument.defaultView||self},kg=function(e,t,n){var s=e.getBoundingClientRect(),i=xc(t)?(function(c,u){for(var f=0;f<c.length;f++)if(c[f].identifier===u)return c[f];return c[0]})(t.touches,n):t;return{left:Dc((i.pageX-(s.left+gh(e).pageXOffset))/s.width),top:Dc((i.pageY-(s.top+gh(e).pageYOffset))/s.height)}},Ng=function(e){!xc(e)&&e.preventDefault()},Tw=$t.memo(function(e){var t=e.onMove,n=e.onKey,s=e.onEnd,i=Lw(e,["onMove","onKey","onEnd"]),c=r.useRef(null),u=yc(t),f=yc(n),h=yc(s),m=r.useRef(null),g=r.useRef(!1),v=r.useMemo(function(){var b=function(k){Ng(k),(xc(k)?k.touches.length>0:k.buttons>0)&&c.current?u(kg(c.current,k,m.current)):(j(!1),h())},N=function(){j(!1),h()};function j(k){var A=g.current,M=gh(c.current),T=k?M.addEventListener:M.removeEventListener;T(A?"touchmove":"mousemove",b),T(A?"touchend":"mouseup",N)}return[function(k){var A=k.nativeEvent,M=c.current;if(M&&(Ng(A),!(function(D,L){return L&&!xc(D)})(A,g.current)&&M)){if(xc(A)){g.current=!0;var T=A.changedTouches||[];T.length&&(m.current=T[0].identifier)}M.focus(),u(kg(M,A,m.current)),j(!0)}},function(k){var A=k.which||k.keyCode;A<37||A>40||(k.preventDefault(),f({left:A===39?.05:A===37?-.05:0,top:A===40?.05:A===38?-.05:0}))},function(k){var A=k.which||k.keyCode;A>=37&&A<=40&&h()},j]},[f,u,h]),y=v[0],w=v[1],E=v[2],C=v[3];return r.useEffect(function(){return C},[C]),$t.createElement("div",ed({},i,{onTouchStart:y,onMouseDown:y,className:"react-colorful__interactive",ref:c,onKeyDown:w,onKeyUp:E,tabIndex:0,role:"slider"}))}),hp=function(e){return e.filter(Boolean).join(" ")},Hw=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,c=hp(["react-colorful__pointer",e.className]);return $t.createElement("div",{className:c,style:{top:100*i+"%",left:100*n+"%"}},$t.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Bn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},k$=function(e){return P$(vh(e))},vh=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Bn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Bn(parseInt(e.substring(6,8),16)/255,2):1}},N$=function(e){return R$(M$(e))},A$=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Bn(e.h),s:Bn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Bn(i/2),a:Bn(s,2)}},yh=function(e){var t=A$(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},M$=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var c=Math.floor(t),u=s*(1-n),f=s*(1-(t-c)*n),h=s*(1-(1-t+c)*n),m=c%6;return{r:Bn(255*[s,f,u,u,h,s][m]),g:Bn(255*[h,s,s,f,u,u][m]),b:Bn(255*[u,u,h,s,s,f][m]),a:Bn(i,2)}},N0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},R$=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,c=i<1?N0(Bn(255*i)):"";return"#"+N0(t)+N0(n)+N0(s)+c},P$=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,c=Math.max(t,n,s),u=c-Math.min(t,n,s),f=u?c===t?(n-s)/u:c===n?2+(s-t)/u:4+(t-n)/u:0;return{h:Bn(60*(f<0?f+6:f)),s:Bn(c?u/c*100:0),v:Bn(c/255*100),a:i}},L$=$t.memo(function(e){var t=e.hue,n=e.onChange,s=e.onChangeEnd,i=hp(["react-colorful__hue",e.className]);return $t.createElement("div",{className:i},$t.createElement(Tw,{onMove:function(c){n({h:360*c.left})},onKey:function(c){n({h:Dc(t+360*c.left,0,360)})},onEnd:s,"aria-label":"Hue","aria-valuenow":Bn(t),"aria-valuemax":"360","aria-valuemin":"0"},$t.createElement(Hw,{className:"react-colorful__hue-pointer",left:t/360,color:yh({h:t,s:100,v:100,a:1})})))}),T$=$t.memo(function(e){var t=e.hsva,n=e.onChange,s=e.onChangeEnd,i={backgroundColor:yh({h:t.h,s:100,v:100,a:1})};return $t.createElement("div",{className:"react-colorful__saturation",style:i},$t.createElement(Tw,{onMove:function(c){n({s:100*c.left,v:100-100*c.top})},onKey:function(c){n({s:Dc(t.s+100*c.left,0,100),v:Dc(t.v-100*c.top,0,100)})},onEnd:s,"aria-label":"Color","aria-valuetext":"Saturation "+Bn(t.s)+"%, Brightness "+Bn(t.v)+"%"},$t.createElement(Hw,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:yh(t)})))}),Dw=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},H$=function(e,t){return e.toLowerCase()===t.toLowerCase()||Dw(vh(e),vh(t))};function D$(e,t,n,s){var i=yc(n),c=yc(s),u=r.useState(function(){return e.toHsva(t)}),f=u[0],h=u[1],m=r.useRef({color:t,hsva:f}),g=r.useRef(!1);r.useEffect(function(){if(!e.equal(t,m.current.color)){var w=e.toHsva(t);m.current={hsva:w,color:t},h(w),g.current=!1}},[t,e]),r.useEffect(function(){var w;Dw(f,m.current.hsva)||e.equal(w=e.fromHsva(f),m.current.color)||(m.current={hsva:f,color:w},i(w),g.current=!0)},[f,e,i]);var v=r.useCallback(function(w){h(function(E){return Object.assign({},E,w)})},[]),y=r.useCallback(function(){g.current&&(g.current=!1,c(m.current.color))},[c]);return[f,v,y]}var $$=typeof window<"u"?r.useLayoutEffect:r.useEffect,F$=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ag=new WeakMap,I$=function(e){$$(function(){var t=e.current;if(typeof document<"u"&&t){var n=t.getRootNode?t.getRootNode():t.ownerDocument,s=n&&("head"in n||"host"in n)?n:t.ownerDocument;if(!Ag.has(s)){var i="head"in s?s.head:s,c=(i.ownerDocument||document).createElement("style");c.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`;var u=F$();u&&c.setAttribute("nonce",u),Ag.set(s,c),i.appendChild(c)}}},[])},_$=function(e){var t=e.className,n=e.colorModel,s=e.color,i=s===void 0?n.defaultColor:s,c=e.onChange,u=e.onChangeEnd,f=Lw(e,["className","colorModel","color","onChange","onChangeEnd"]),h=r.useRef(null);I$(h);var m=D$(n,i,c,u),g=m[0],v=m[1],y=m[2],w=hp(["react-colorful",t]);return $t.createElement("div",ed({},f,{ref:h,className:w}),$t.createElement(T$,{hsva:g,onChange:v,onChangeEnd:y}),$t.createElement(L$,{hue:g.h,onChange:v,onChangeEnd:y,className:"react-colorful__last-control"}))},O$={defaultColor:"000",toHsva:k$,fromHsva:function(e){return N$({h:e.h,s:e.s,v:e.v,a:1})},equal:H$},Z$=function(e){return $t.createElement(_$,ed({},e,{colorModel:O$}))};function c1({value:e,onChange:t,label:n,presets:s,className:i,triggerStyle:c,triggerProps:u,commitMode:f="live",align:h="start",children:m}){const g=fn(e)??"#000000",[v,y]=r.useState(g),[w,E]=r.useState(!1);r.useEffect(()=>{w||y(g)},[g,w]);const C=k=>{const A=fn(k);A&&(y(A),f==="live"&&t(A))},b=k=>{const A=fn(k);A&&(y(A),t(A),f==="close"&&E(!1))},N=k=>{if(E(k),k||f!=="close")return;const A=fn(v);A&&A!==g&&t(A)},j=[...new Set((s??[]).map(k=>fn(k)).filter(k=>!!k))];return o.jsxs(ti,{open:w,onOpenChange:N,children:[o.jsx(ni,{children:o.jsx("button",{type:"button",className:i??"sc-cp-trigger",style:{background:g,...c},"aria-label":n,...u,children:m})}),o.jsxs(ri,{className:"sc-cp",align:h,sideOffset:6,width:"232px",children:[o.jsx(Z$,{color:v,onChange:C}),o.jsxs("div",{className:"sc-cp-foot",children:[o.jsx("span",{className:"sc-cp-preview",style:{background:v},"aria-hidden":!0}),o.jsx("input",{className:"sc-cp-hex",value:v,spellCheck:!1,maxLength:7,"aria-label":"Hex value",onChange:k=>{y(k.target.value);const A=fn(k.target.value);A&&f==="live"&&t(A)},onBlur:()=>y(fn(v)??g),onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),f==="close"?b(v):E(!1))}})]}),j.length>0&&o.jsx("div",{className:"sc-cp-presets",children:j.map(k=>o.jsx("button",{type:"button",style:{background:k},"data-on":k===v||void 0,title:k,"aria-label":k,onClick:()=>f==="close"?b(k):C(k)},k))})]})]})}function V$({doc:e,suggestions:t}){var w;const n=(w=e.json)==null?void 0:w.palette,[s,i]=r.useState(()=>va(n)),c=JSON.stringify(n??{});r.useEffect(()=>{i(va(n))},[c]);const u=(E,C=0)=>{i(E),e.patch({palette:dp(E,n)},{debounce:C})},f=(E,C,b=0)=>u(s.map((N,j)=>j===E?{...N,...C}:N),b),h=()=>u([...s,{hex:fp(s),name:"",slot:s.length?"accent":"primary"}]),m=(t??[]).filter(E=>{const C=fn(E.hex);return C&&!s.some(b=>b.hex===C)}),g=(E,C)=>o.jsx(z$,{swatch:E,presets:s.map(b=>b.hex),onHex:b=>f(C,{hex:b},300),onRemove:()=>u(s.filter((b,N)=>N!==C))},`${E.slot}-${C}`),v=s.map((E,C)=>[E,C]),y=v.filter(([E])=>!jg(E));return o.jsxs("div",{className:"sc-pal",children:[s.length===0&&o.jsx("p",{className:"sc-pal-empty",children:"No colours yet. Add one and it becomes a chip you can drop into any shot."}),v.filter(([E])=>jg(E)).map(([E,C])=>g(E,C)),y.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-pal-group",children:"Neutrals"}),y.map(([E,C])=>g(E,C))]}),o.jsxs("div",{className:"sc-pal-foot",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:h,children:[o.jsx(tr,{size:12}),"Add colour"]}),m.length>0&&o.jsxs("span",{className:"sc-pal-sugg",children:[o.jsx("small",{children:"From the website"}),m.map(E=>{const C=fn(E.hex);return o.jsx("button",{type:"button",className:"sc-pal-sugg-chip",style:{background:C},title:`Add ${C}`,"aria-label":`Add ${C}`,onClick:()=>u([...s,{hex:C,name:"",slot:"accent"}])},C)})]})]})]})}function z$({swatch:e,presets:t,onHex:n,onRemove:s}){const[i,c]=r.useState(e.hex);r.useEffect(()=>c(e.hex),[e.hex]);const u=()=>{const f=fn(i);f&&n(f),c(f??e.hex)};return o.jsxs("div",{className:"sc-pal-row",children:[o.jsx(c1,{value:e.hex,onChange:n,label:`${e.name} color`,presets:t,className:"sc-pal-chip"}),o.jsx("span",{className:"sc-pal-name",children:e.name}),o.jsx("input",{className:"sc-in sc-pal-hex",value:i,spellCheck:!1,maxLength:7,"aria-label":`${e.name} hex`,onChange:f=>c(f.target.value),onBlur:u,onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur()}}),o.jsx("button",{type:"button",className:"sc-pal-act","data-danger":"",onClick:s,"aria-label":`Remove ${e.name}`,title:"Remove",children:o.jsx(Y1,{size:13})})]})}function B$(){const{brand:e}=It(),{applyBrand:t}=pn(),{push:n}=mr(),[s,i]=r.useState({}),[c,u]=r.useState("idle"),f=r.useRef(s);f.current=s;const h=r.useRef(e);h.current=e;const m=r.useRef(null),g=r.useRef(!1),v=r.useRef(!1),y=r.useCallback(()=>({...h.current.json??{},...f.current}),[]),w=r.useCallback(async()=>{if(!Object.keys(f.current).length)return;if(g.current){v.current=!0;return}g.current=!0,u("saving");const j=f.current;try{const k=await Ce.updateBrand(h.current.id,y());t(k),i(A=>{const M={...A};for(const T of Object.keys(j))A[T]===j[T]&&delete M[T];return M}),u(v.current?"pending":"idle")}catch(k){u("error"),n({kind:"error",title:"Could not save the brand",detail:String((k==null?void 0:k.message)??k),action:{label:"Retry",onClick:()=>void w()}})}finally{g.current=!1,v.current&&(v.current=!1,w())}},[t,y,n]),E=r.useCallback((j,k)=>{m.current&&(clearTimeout(m.current),m.current=null);const A={...f.current,...j};f.current=A,i(A),u("pending");const M=(k==null?void 0:k.debounce)??0;M>0?m.current=setTimeout(()=>void w(),M):w()},[w]),C=r.useCallback(async()=>{m.current&&(clearTimeout(m.current),m.current=null),await w()},[w]),b=r.useCallback(j=>{i({}),f.current={},t(j),u("idle")},[t]),N=e.id;return r.useEffect(()=>{i({}),f.current={},u("idle")},[N]),r.useEffect(()=>{const j=()=>{Object.keys(f.current).length&&_H(h.current.id,y())};return window.addEventListener("beforeunload",j),()=>{window.removeEventListener("beforeunload",j),m.current&&clearTimeout(m.current),j()}},[y]),{json:y(),state:c,patch:E,flush:C,applyRow:b}}function U$(e){return e==="saving"?"Saving…":e==="pending"?"Unsaved changes":e==="error"?"Not saved":"Saved"}function W$(){var y,w;const{brand:e}=It(),{push:t}=mr(),n=B$(),[s,i]=r.useState(!1),[c,u]=r.useState([]),f=((w=(y=n.json)==null?void 0:y.meta)==null?void 0:w.website)??"",[h,m]=r.useState(f);r.useEffect(()=>m(f),[f]);const g=()=>{var N;const E=h.trim(),C=E&&!/^https?:\/\//i.test(E)?`https://${E}`:E;m(C);const b={...((N=n.json)==null?void 0:N.meta)??{}};C?b.website=C:delete b.website,n.patch({meta:b})},v=async()=>{var E,C;i(!0);try{await n.flush();const b=await Ce.refreshBrandFromUrl(e.id);n.applyRow(b),u(((E=b.suggestions)==null?void 0:E.palette)??[]),t({kind:"success",title:"Read the website again",detail:(C=b.warnings)!=null&&C.length?b.warnings.join(" "):"Your edits were kept."})}catch(b){t(dn(b,"Could not read that website"))}finally{i(!1)}};return o.jsxs(o.Fragment,{children:[o.jsx(Fr,{title:"Identity",sub:"The name and the mark.",children:o.jsx(g$,{brand:e,doc:n})}),o.jsx(Fr,{title:"Palette",sub:"Favoured on a shot that asks for the kit.",children:o.jsx("div",{className:"sc-set-block",children:o.jsx(V$,{doc:n,suggestions:c})})}),o.jsx(Fr,{title:"We never",sub:"Held on every shot, whether the kit is asked for or not.",children:o.jsx("div",{className:"sc-set-block",children:o.jsx(d$,{doc:n})})}),o.jsxs(Fr,{title:"Portable",sub:"The kit is a file, not a lock-in.",children:[o.jsxs("div",{className:"sc-set-row","data-stack":"",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Website"}),o.jsx("small",{children:"Reads colours and marks from the site again. Edits are kept; new colours are offered, not applied."})]}),o.jsxs("div",{className:"sc-set-controls",children:[o.jsx("input",{className:"sc-in",value:h,type:"url",inputMode:"url",placeholder:"acme.coffee","aria-label":"Brand website",onChange:E=>m(E.target.value),onBlur:g,onKeyDown:E=>{E.key==="Enter"&&E.currentTarget.blur()}}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:!f||s,onClick:()=>void v(),children:[s?o.jsx(ln,{size:"1"}):o.jsx(Gm,{size:13})," Refresh"]})]})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Export .brand"}),o.jsx("small",{"data-prose":"",children:"A zip holding brand.json and every image it references: the form any tool can read."})]}),o.jsx("a",{className:"sc-btn sc-btn-ghost",href:FH(e.id),download:!0,onClick:()=>void n.flush(),children:"Export"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Changes"}),o.jsx("small",{"data-prose":"",children:"Written as you make them. There is no save button to forget."})]}),o.jsx("span",{className:"sc-tag","data-state":n.state,children:U$(n.state)})]})]})]})}const Gs=e=>e.replace(/\s*\(BYOK\)\s*$/i,""),u1="codex-cli";function G$(e,t){var n;return e.some(s=>s.id===t)?t:((n=e[0])==null?void 0:n.id)??u1}const K$=e=>e.toFixed(3).replace(/0+$/,"").replace(/\.$/,"");function Y$(e){return e.free?e.localOnly?"Runs on your ChatGPT plan":"No cost per image":`$${K$(e.perGeneration)} / image`}function $w(e){return o.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:o.jsx("path",{d:"M22.282 9.821a6 6 0 0 0-.516-4.91a6.05 6.05 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a6 6 0 0 0-3.998 2.9a6.05 6.05 0 0 0 .743 7.097a5.98 5.98 0 0 0 .51 4.911a6.05 6.05 0 0 0 6.515 2.9A6 6 0 0 0 13.26 24a6.06 6.06 0 0 0 5.772-4.206a6 6 0 0 0 3.997-2.9a6.06 6.06 0 0 0-.747-7.073M13.26 22.43a4.48 4.48 0 0 1-2.876-1.04l.141-.081l4.779-2.758a.8.8 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494M3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085l4.783 2.759a.77.77 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646M2.34 7.896a4.5 4.5 0 0 1 2.366-1.973V11.6a.77.77 0 0 0 .388.677l5.815 3.354l-2.02 1.168a.08.08 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.08.08 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667m2.01-3.023l-.141-.085l-4.774-2.782a.78.78 0 0 0-.785 0L9.409 9.23V6.897a.07.07 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.8.8 0 0 0-.393.681zm1.097-2.365l2.602-1.5l2.607 1.5v2.999l-2.597 1.5l-2.607-1.5Z"})})}function q$(e){return o.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:o.jsx("path",{d:"M16.778 1.844v1.919q-.569-.026-1.138-.032-.708-.008-1.415.037c-1.93.126-4.023.728-6.149 2.237-2.911 2.066-2.731 1.95-4.14 2.75-.396.223-1.342.574-2.185.798-.841.225-1.753.333-1.751.333v4.229s.768.108 1.61.333c.842.224 1.789.575 2.185.799 1.41.798 1.228.683 4.14 2.75 2.126 1.509 4.22 2.11 6.148 2.236.88.058 1.716.041 2.555.005v1.918l7.222-4.168-7.222-4.17v2.176c-.86.038-1.611.065-2.278.021-1.364-.09-2.417-.357-3.979-1.465-2.244-1.593-2.866-2.027-3.68-2.508.889-.518 1.449-.906 3.822-2.59 1.56-1.109 2.614-1.377 3.978-1.466.667-.044 1.418-.017 2.278.02v2.176L24 6.014Z"})})}function X$(e){return o.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:o.jsx("path",{d:"M24 10.262v2.712h-9.518V24h-3.034V10.262zm0-5.131v2.717H8.755V24H5.722V5.131zM24 0v2.717H3.034V24H0V0z"})})}const Q$=[{engineId:"openrouter",settingKey:"openrouter_api_key",hint:"sk-or-...",keysUrl:"https://openrouter.ai/keys"},{engineId:"replicate",settingKey:"replicate_api_token",hint:"r8_...",keysUrl:"https://replicate.com/account/api-tokens"},{engineId:"fal",settingKey:"fal_key",hint:"fal_...",keysUrl:"https://fal.ai/dashboard/keys"}],Fw=e=>Q$.find(t=>t.engineId===e),Iw={"codex-cli":{Mark:$w,size:16,plate:"#FFFFFF",ink:"#000000"},openrouter:{Mark:q$,size:18,plate:"#FFFFFF",ink:"#7624F4"},replicate:{Mark:X$,size:15,plate:"#E42022",ink:"#FFFFFF"}},xh=e=>{const t=Iw[e];return t?{plate:t.plate,ink:t.ink}:void 0},J$={demo:fH};function _w({engineId:e,scale:t=1}){const n=Iw[e];if(n){const i=Math.round(n.size*t);return o.jsx(n.Mark,{width:i,height:i})}const s=J$[e]??l1;return o.jsx(s,{size:Math.round(15*t)})}const eF=e=>[...e].sort((t,n)=>+(n.id===u1)-+(t.id===u1));function tF({engines:e}){const t=Q1(),s=e.filter(i=>i.available).length===0;return o.jsx(Fr,{sub:"Where your images are generated. Connect as many as you like, then pick one in the composer.",children:eF(e).map(i=>{const c=Fw(i.id),u=Gs(i.displayName),f=i.code==="not-installed"||i.code==="not-authenticated",h=c?i.available?"Manage":"Connect":f?"Set up":null,m=i.available?"Connected":null,g=xh(i.id);return o.jsxs("div",{className:"sc-eng","data-connected":i.available?"":void 0,children:[o.jsx("span",{className:"sc-eng-ic","data-brand":g?"":void 0,style:g?{"--sc-plate":g.plate,"--sc-ink":g.ink}:void 0,children:o.jsx(_w,{engineId:i.id})}),o.jsxs("span",{className:"sc-eng-name",children:[o.jsx("b",{children:u}),o.jsx("small",{children:Y$(i)})]}),m&&o.jsxs("span",{className:"sc-stat",children:[o.jsx("span",{className:"d"}),m]}),!m&&!h&&i.reason&&o.jsx("span",{className:"sc-stat sc-stat-why",children:i.reason}),h&&o.jsx("button",{type:"button",className:`sc-btn ${s&&!c?"sc-btn-primary":"sc-btn-ghost"} sc-eng-act`,onClick:()=>t(i.id),"aria-label":`${h} ${u}`,children:h})]},i.id)})})}const nF={npx:"run with npx",global:"installed with npm",managed:"managed install",dev:"running from source",unknown:"local studio"};function rF(e){switch(e){case"npx":return"npx scenri update";case"global":case"managed":return"scenri update";default:return"npx scenri@latest"}}function aF({version:e}){var y;const t=ep(),n=td(),s=t.status,[i,c]=r.useState(null),[u,f]=r.useState(!1);r.useEffect(()=>{Ce.settings().then(w=>c(!!w.updateCheck)).catch(()=>{})},[]);const h=async()=>{if(i===null)return;const w=!i;c(w);try{await Ce.saveSettings({updateCheck:w})}catch{c(!w)}},m=rF(e==null?void 0:e.installKind),g=async()=>{try{await navigator.clipboard.writeText(m),f(!0),setTimeout(()=>f(!1),1600)}catch{}},v=t.checking?o.jsx("span",{className:"sc-tag",children:"checking…"}):s!=null&&s.available?o.jsxs("span",{className:"sc-tag sc-tag-gold",children:[s.latest," available"]}):s!=null&&s.error?o.jsx("span",{className:"sc-tag",children:"couldn't reach npm"}):s!=null&&s.checkedAt?o.jsx("span",{className:"sc-tag",children:"up to date"}):null;return o.jsxs(Fr,{children:[o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"scenri"}),o.jsxs("small",{children:[e?`v${e.version}`:""," · ",nF[(e==null?void 0:e.installKind)??"unknown"]]})]})}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Updates"}),o.jsxs("small",{"data-prose":"",children:[s!=null&&s.available?`You are on ${s.current}.`:"New versions announce themselves here.",(s==null?void 0:s.available)&&s.notesUrl&&o.jsxs(o.Fragment,{children:[" ",o.jsxs("a",{href:s.notesUrl,target:"_blank",rel:"noreferrer",children:["See what's in ",s.latest]})]})]})]}),v,o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:t.checking,onClick:()=>void t.checkNow(),children:"Check for updates"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"What's new"}),o.jsx("small",{children:((y=n.entry)==null?void 0:y.title)??`What changed in ${n.version?`v${n.version}`:"this version"}.`})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>n.open(),children:"Show"})]}),(s==null?void 0:s.available)&&((e==null?void 0:e.installKind)==="dev"?o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Update"}),o.jsx("small",{"data-prose":"",children:"Running from source. Pull and rebuild when you're ready. Nothing here touches your checkout."})]})}):hw(s)?o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Update"}),o.jsx("small",{"data-prose":"",children:t.applyError??(s.phase==="ready"?`${s.stagedVersion} is downloaded and verified. Restarting finishes it.`:"Downloads next to the running version, verifies it loads, then restarts. Your library stays put.")})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:t.busy!=="idle",onClick:()=>void t.apply(),children:t.busy==="applying"?"Updating…":s.phase==="ready"?"Restart now":"Update now"})]}):o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Update"}),o.jsxs("small",{"data-prose":"",children:["Run ",o.jsx("code",{children:m})," in a terminal, then start scenri again. Your library is not part of the app and stays put."]})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>void g(),children:u?"Copied":"Copy command"})]})),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Check for updates automatically"}),o.jsx("small",{"data-prose":"",children:"One version-number request to npm, at most daily. Off means scenri never calls anywhere by itself."})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:i===null,onClick:()=>void h(),children:i===null?"…":i?"Turn off":"Turn on"})]}),o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"License"}),o.jsx("small",{children:"AGPL-3.0 for the app · Apache-2.0 for the .brand format"})]})}),o.jsx("div",{className:"sc-set-row",children:o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Open source"}),o.jsxs("small",{children:["Built by Tony Gorb ·"," ",o.jsx("a",{href:"https://github.com/tonygorb/scenri",target:"_blank",rel:"noreferrer",children:"GitHub"})]})]})})]})}function sF(){const{choice:e,setChoice:t}=WL(),n=[{id:"light",label:"Light",swatch:"linear-gradient(140deg,#ffffff 55%,#f1f1f1)"},{id:"dark",label:"Dark",swatch:"linear-gradient(140deg,#0d0d0d 55%,#1c1c1c)"},{id:"system",label:"System",swatch:"linear-gradient(110deg,#ffffff 50%,#0d0d0d 50%)"}];return o.jsx(Fr,{sub:"Follows your system unless you pick a side.",children:o.jsx("div",{className:"sc-themes",children:n.map(s=>o.jsxs("button",{type:"button",className:"sc-tp","data-on":e===s.id?"":void 0,onClick:()=>t(s.id),children:[o.jsx("span",{className:"swl",style:{background:s.swatch}}),o.jsxs("span",{className:"lbl",children:[o.jsx("span",{className:"dot"}),s.label]})]},s.id))})})}function oF({engines:e,onSaved:t}){const n=e.filter(u=>!u.free),[s,i]=r.useState({});r.useEffect(()=>{i(Object.fromEntries(n.map(u=>[u.id,u.cap===null?"":String(u.cap)])))},[e]);const c=async u=>{const f=(s[u]??"").trim(),h=f===""?null:Number(f);h!==null&&(Number.isNaN(h)||h<0)||(await Ce.setCap(u,h),t())};return n.length?o.jsx(Fr,{sub:"Your own API budget. Generation stops before a cap is crossed, so a runaway loop cannot spend your month.",children:n.map(u=>{const f=u.generationsLeft,h=u.generationsTotal,m=h&&h>0?Math.min(100,Math.round((h-(f??0))/h*100)):0,g=`$${u.monthlySpend.toFixed(2)} this month`;return o.jsxs("div",{className:"sc-cap",children:[o.jsxs("div",{className:"sc-cap-top",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:Gs(u.displayName)}),o.jsx("small",{children:f===null?g:`${g} · ${f} left`})]}),o.jsxs("div",{className:"sc-cap-in",children:[o.jsx("span",{className:"sc-cap-dollar",children:"$"}),o.jsx("input",{className:"sc-in",inputMode:"decimal",placeholder:"None",value:s[u.id]??"",onChange:v=>i(y=>({...y,[u.id]:v.target.value})),onBlur:()=>void c(u.id),"aria-label":`${Gs(u.displayName)} monthly cap in dollars`})]})]}),h!==null&&o.jsx("div",{className:"sc-meter",children:o.jsx("i",{style:{width:`${m}%`}})})]},u.id)})}):o.jsx(Fr,{sub:"Nothing to cap yet. Caps apply to engines you pay for per image. Codex usage counts against your ChatGPT plan, which OpenAI meters, not scenri.",children:o.jsx("p",{className:"sc-set-empty",children:"Add a paid engine key and its cap appears here."})})}function is({label:e,title:t,body:n,busy:s,onConfirm:i,fullWidth:c}){return o.jsxs(Yc,{children:[o.jsx(bx,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost sc-btn-red",disabled:s,style:c?{width:"100%"}:void 0,children:e})}),o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:t}),o.jsx(Qc,{size:"2",children:n}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:i,children:e})})]})]})]})}function lF({onDone:e}){const{brand:t}=It(),n=an(),[s,i]=r.useState(!1),c=r.useCallback(async u=>{i(!0);try{await Ce.deleteData(u),e(),u==="all"&&window.location.replace("/")}finally{i(!1)}},[e]);return o.jsxs(Fr,{sub:"These do not come back. Export from Library first if you are not certain.",children:[o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Delete this brand"}),o.jsxs("small",{"data-prose":"",children:["Removes ",Po(t),", its sets and every shot. Other brands stay."]})]}),o.jsx(is,{label:"Delete brand",title:`Delete ${Po(t)}?`,body:"The kit, its sets and every shot go with it. Exports you already downloaded stay yours.",busy:s,onConfirm:()=>{i(!0),Ce.deleteBrand(t.id).then(e).then(()=>n("/",{replace:!0})).finally(()=>i(!1))}})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Delete generated shots"}),o.jsx("small",{"data-prose":"",children:"Keeps brands, cast and scenes. Removes every set and every generated shot."})]}),o.jsx(is,{label:"Delete shots",title:"Delete every generated shot?",body:"Brands, cast and scenes stay. Every set and every generated shot goes.",busy:s,onConfirm:()=>void c("shots")})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Delete all local data"}),o.jsx("small",{"data-prose":"",children:"Brands, cast, sets, shots and saved keys, in one go."})]}),o.jsx(is,{label:"Delete everything",title:"Delete everything on this machine?",body:"The whole library folder is removed: brands, cast, sets, shots and your saved keys. There is no undo.",busy:s,onConfirm:()=>void c("all")})]})]})}const iF=e=>e>1e9?`${(e/1e9).toFixed(1)} GB`:e>1e6?`${Math.round(e/1e6)} MB`:`${Math.round(e/1e3)} KB`,y2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function cF(e){return e===0?0:e<3?1:e<6?2:e<12?3:4}function Mg(e,t){const n=t*7,s=new Date,i=new Date(s);i.setDate(s.getDate()-(n-1)-s.getDay());const c=[],u=[];let f=-1,h=0;for(let m=0;m<n;m++){const g=new Date(i);g.setDate(i.getDate()+m);const v=g.toISOString().slice(0,10),y=e.get(v)??0;if(h+=y,c.push({key:v,level:cF(y),title:y?`${y} run${y===1?"":"s"} on ${g.getDate()} ${y2[g.getMonth()]}`:`nothing on ${g.getDate()} ${y2[g.getMonth()]}`}),g.getDay()===0){const w=g.getMonth()!==f&&g.getDate()<=7;w&&(f=g.getMonth()),u.push({key:v,label:w?y2[g.getMonth()]:""})}}return{cells:c,months:u,sum:h}}function uF(){const[e,t]=r.useState(null);return r.useEffect(()=>{Ce.home().then(t).catch(()=>{})},[]),o.jsxs(Fr,{sub:"Plain files on this machine. Open them yourself, back them up like anything else.",children:[o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Library folder"}),o.jsx("small",{children:e?`${e.dir} · ${iF(e.bytes)} across ${e.images} images`:"…"})]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>void Ce.reveal(),children:"Reveal"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Export everything"}),o.jsx("small",{children:"One zip: brands, cast, briefs, shots. Never keys."})]}),o.jsx("a",{className:"sc-btn sc-btn-ghost",href:"/api/export/all",download:!0,children:"Export"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Telemetry"}),o.jsx("small",{children:"There is none. This row exists to say so."})]}),o.jsx("span",{className:"sc-tag",children:"off, permanently"})]})]})}function Rg({weeks:e,months:t,cells:n}){return o.jsxs("div",{className:"sc-heat-range","data-weeks":e,children:[o.jsx("div",{className:"sc-heat-months",children:t.map(s=>o.jsx("span",{children:s.label},s.key))}),o.jsx("div",{className:"sc-heat-grid",children:n.map(s=>o.jsx("i",{"data-l":s.level||void 0,title:s.title},s.key))})]})}function dF({shots:e}){const t=r.useMemo(()=>e.filter(f=>f.kind!=="root"),[e]),{year:n,quarter:s,total:i,byKind:c}=r.useMemo(()=>{const f=new Map,h={generation:0,edit:0};for(const v of t??[]){const y=String(v.createdAt).slice(0,10);f.set(y,(f.get(y)??0)+1),v.kind==="edit"?h.edit++:h.generation++}const m=Mg(f,53),g=Mg(f,13);return{year:m,quarter:g,total:m.sum,byKind:h}},[t]);if(t===null)return o.jsx("p",{className:"sc-set-empty",children:"Reading your library…"});const u=Math.max(c.generation,c.edit,1);return o.jsxs(o.Fragment,{children:[o.jsx(Fr,{title:"The last year",sub:"One square per day, counted from your own runs.",children:o.jsxs("div",{className:"sc-heat",children:[o.jsx("div",{className:"sc-heat-h",children:o.jsxs("b",{children:[i.toLocaleString()," runs in the last year"]})}),o.jsx(Rg,{weeks:53,months:n.months,cells:n.cells}),o.jsx(Rg,{weeks:13,months:s.months,cells:s.cells})]})}),o.jsx(Fr,{title:"By activity",children:o.jsxs("div",{className:"sc-bars",children:[o.jsxs("div",{className:"sc-bar",children:[o.jsx("span",{className:"k",children:"Generations"}),o.jsx("span",{className:"t",children:o.jsx("i",{style:{width:`${c.generation/u*100}%`}})}),o.jsx("span",{className:"v",children:c.generation})]}),o.jsxs("div",{className:"sc-bar",children:[o.jsx("span",{className:"k",children:"Edits"}),o.jsx("span",{className:"t",children:o.jsx("i",{style:{width:`${c.edit/u*100}%`}})}),o.jsx("span",{className:"v",children:c.edit})]})]})})]})}const Hl=[{id:"brand",label:"Brand kit",title:"Brand kit",icon:o.jsx(SH,{size:14})},{id:"engines",label:"Providers",title:"Providers",icon:o.jsx(l1,{size:14})},{id:"budget",label:"Budget",title:"Budget",icon:o.jsx(jH,{size:14})},{id:"usage",label:"Usage",title:"Usage",icon:o.jsx(gH,{size:14})},{id:"library",label:"Library",title:"Library",icon:o.jsx(uH,{size:14})},{id:"appearance",label:"Appearance",title:"Appearance",icon:o.jsx(PH,{size:14})},{id:"about",label:"About",title:"About",icon:o.jsx(qm,{size:14})},{id:"danger",label:"Danger zone",title:"Danger zone",icon:o.jsx(Y1,{size:14}),danger:!0}];function fF({engines:e,shots:t,onSaved:n}){const s=gs("settings"),i=s.value!==null,[c,u]=r.useState(null);r.useEffect(()=>{if(!i||c)return;let g=!0;return Ce.version().then(v=>g&&u(v)).catch(()=>{}),()=>{g=!1}},[i,c]);const f=Hl.some(g=>g.id===s.value)?s.value:"brand",h=g=>s.set(g),m=r.useRef(null);return r.useEffect(()=>{const g=m.current;if(!g)return;const v=g.querySelector('[aria-current="page"]');if(!(v instanceof HTMLElement))return;const y=requestAnimationFrame(()=>{const w=v.offsetLeft-(g.clientWidth-v.offsetWidth)/2;g.scrollTo({left:Math.max(0,w)})});return()=>cancelAnimationFrame(y)},[f,i]),o.jsx(el,{open:i,onOpenChange:g=>!g&&s.close(),children:o.jsxs(tl,{className:"sc-set",maxWidth:"940px","aria-describedby":void 0,onOpenAutoFocus:ru,children:[o.jsx(nl,{style:{display:"none"},children:"Settings"}),o.jsxs("div",{className:"sc-set-grid",children:[o.jsxs("nav",{className:"sc-set-rail","aria-label":"Settings",children:[o.jsx("p",{className:"sc-set-group",children:"This brand"}),o.jsx(x2,{p:Hl[0],on:f==="brand",pick:()=>h("brand")}),o.jsx("p",{className:"sc-set-group",children:"Generation"}),Hl.slice(1,4).map(g=>o.jsx(x2,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id)),o.jsx("p",{className:"sc-set-group",children:"This machine"}),Hl.slice(4).map(g=>o.jsx(x2,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id)),o.jsx("span",{className:"sc-set-spacer"}),o.jsxs("p",{className:"sc-set-ver",children:[c?`v${c.version}`:"scenri"," · local"]})]}),o.jsxs("div",{className:"sc-set-body",children:[o.jsxs("div",{className:"sc-set-head",children:[o.jsx("b",{children:Hl.find(g=>g.id===f).title}),o.jsx("span",{className:"sc-set-sp"}),o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx("nav",{className:"sc-set-tabs","aria-label":"Settings",ref:m,children:Hl.map(g=>o.jsx(hF,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id))}),o.jsxs("div",{className:"sc-set-scroll",children:[f==="brand"&&o.jsx(W$,{}),f==="engines"&&o.jsx(tF,{engines:e}),f==="budget"&&o.jsx(oF,{engines:e,onSaved:n}),f==="usage"&&o.jsx(dF,{shots:t}),f==="library"&&o.jsx(uF,{}),f==="appearance"&&o.jsx(sF,{}),f==="about"&&o.jsx(aF,{version:c}),f==="danger"&&o.jsx(lF,{onDone:n})]})]})]})]})})}function x2({p:e,on:t,pick:n}){return o.jsxs("button",{type:"button",className:"sc-set-item","data-on":t?"":void 0,"data-danger":e.danger?"":void 0,"aria-current":t?"page":void 0,onClick:n,children:[e.icon,e.label]})}function hF({p:e,on:t,pick:n}){return o.jsx("button",{type:"button",className:"sc-chip","data-active":t?"true":void 0,"data-danger":e.danger?"":void 0,"aria-current":t?"page":void 0,onClick:n,children:e.label})}const mF=["January","February","March","April","May","June","July","August","September","October","November","December"];function pF(e){const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return e;const n=mF[Number(t[2])-1];return n?`${Number(t[3])} ${n} ${t[1]}`:e}function gF(){const e=gs("whatsnew"),{status:t,version:n,entry:s,changelogUrl:i,releasesUrl:c,markSeen:u}=td(),f=e.value!==null,h=()=>{u(),e.close()},m=t==="ready"&&!s&&!i,g=s!==null&&s.sections.length>1,v=t==="loading"?"Reading the release notes.":t==="failed"?"scenri could not read its release notes. If you are running a development server, it may predate this feature; restart it and try again.":m?"You are running a development build. What changed in a version appears here once that version is published.":s?"Maintenance only. Nothing here changes how scenri works for you.":"This version went out without a written summary.",y=s?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-vh",children:"Version "}),o.jsx("span",{className:"sc-wn-ver",children:s.version}),o.jsx("span",{"aria-hidden":"true",children:" · "}),pF(s.date)]}):t==="failed"?"Release notes unavailable":t==="loading"?"Loading":m?"Development build":o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-vh",children:"Version "}),o.jsx("span",{className:"sc-wn-ver",children:n})]});return o.jsxs(np,{open:f,className:"sc-wn",maxWidth:"420px",described:!0,onDismiss:h,children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(rp,{className:"sc-newdlg-title",children:"What's new"}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx(ND,{className:"sc-wn-sub",children:y}),o.jsxs("div",{className:"sc-newdlg-body",children:[(s==null?void 0:s.title)&&o.jsx("p",{className:"sc-wn-lede sc-accent",children:s.title}),s&&s.sections.length>0?s.sections.map(w=>o.jsxs("section",{className:"sc-wn-sec",children:[g&&o.jsx("h3",{className:"sc-wn-head",children:w.heading}),o.jsx("p",{className:"sc-wn-txt",children:w.body})]},w.heading)):o.jsx("p",{className:"sc-wn-txt",children:v})]}),o.jsxs("div",{className:"sc-newdlg-foot sc-wn-foot",children:[c&&o.jsxs("a",{className:"sc-wn-link",href:c,target:"_blank",rel:"noreferrer",children:["All releases",o.jsx(W1,{size:13})]}),o.jsx(i1,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Got it"})})]})]})}const vF=2e3,yF=5*6e4;function xF({engines:e,onSaved:t}){const n=gs("setup"),s=n.close,i=n.value,c=i?Fw(i):void 0,f=!!c||i==="codex-cli",h=e.find(m=>m.id===i);return o.jsx(el,{open:f,onOpenChange:m=>!m&&s(),children:o.jsx(tl,{className:"sc-setup",maxWidth:"520px","aria-describedby":void 0,onOpenAutoFocus:ru,children:c?o.jsx(wF,{provider:c,name:h?Gs(h.displayName):c.engineId,connected:!!(h!=null&&h.available),onSaved:t,onDone:s}):o.jsx(bF,{engines:e,onSaved:t,onDone:s})})})}function Ow({title:e}){return o.jsxs("div",{className:"sc-setup-head",children:[o.jsx(nl,{className:"sc-setup-title",children:e}),o.jsx("span",{className:"sc-set-sp"}),o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]})}function wF({provider:e,name:t,connected:n,onSaved:s,onDone:i}){var b,N;const[c,u]=r.useState(""),[f,h]=r.useState(!1),[m,g]=r.useState(null),[v,y]=r.useState(!1),w=r.useRef(null);r.useEffect(()=>{var j;(j=w.current)==null||j.focus()},[]);const E=async()=>{const j=c.trim();if(j){h(!0),g(null);try{await Ce.saveSettings({[e.settingKey]:j}),u(""),s(),i()}catch(k){g(k.message)}finally{h(!1)}}},C=async()=>{h(!0),g(null);try{await Ce.saveSettings({[e.settingKey]:""});const j=await Ce.settings();if(s(),j[e.settingKey]){y(!0);return}i()}catch(j){g(j.message)}finally{h(!1)}};return o.jsxs(o.Fragment,{children:[o.jsx(Ow,{title:n?`${t} key`:`Connect ${t}`}),o.jsxs("div",{className:"sc-setup-body",children:[o.jsxs("div",{className:"sc-setup-who",children:[o.jsx("span",{className:"sc-eng-ic","data-brand":"",style:{"--sc-plate":(b=xh(e.engineId))==null?void 0:b.plate,"--sc-ink":(N=xh(e.engineId))==null?void 0:N.ink},children:o.jsx(_w,{engineId:e.engineId})}),o.jsx("p",{className:"sc-setup-lead",children:n?`A key is saved for ${t}. Paste a new one to replace it, or disconnect to remove it from this computer.`:`Paste a key from ${t}. It is stored in your library folder on this computer, sent only to ${t}, and never shown again.`})]}),o.jsxs("form",{className:"sc-setup-key",onSubmit:j=>{j.preventDefault(),E()},children:[o.jsx("input",{ref:w,className:"sc-in",type:"password",placeholder:e.hint,value:c,onChange:j=>u(j.target.value),autoComplete:"off",name:e.settingKey,"aria-label":`${t} key`}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"submit",className:"sc-btn sc-btn-primary",disabled:f||!c.trim(),children:[f?o.jsx(ln,{size:"1"}):o.jsx(M5,{size:15}),n?"Replace key":"Connect"]}),o.jsxs("a",{className:"sc-setup-alt",href:e.keysUrl,target:"_blank",rel:"noreferrer",children:["Get a key ",o.jsx(W1,{size:13})]})]})]}),n&&o.jsx("div",{className:"sc-setup-cut",children:o.jsx(is,{label:"Disconnect",title:`Disconnect ${t}?`,body:"The key is deleted from this computer. Nothing you have already generated changes, and you can paste a new key at any time.",busy:f,onConfirm:()=>void C()})}),v&&o.jsxs("p",{className:"sc-setup-note",children:["The stored key is gone, but ",t," is still connected through the ",e.settingKey.toUpperCase()," ","environment variable on this computer. Remove it from your shell to disconnect fully."]}),m&&o.jsx("div",{className:"sc-setup-problem",children:o.jsxs("p",{"data-detail":"",children:[o.jsx(nw,{size:15})," ",m]})})]})]})}function bF({engines:e,onSaved:t,onDone:n}){const s=Q1(),[i,c]=r.useState("checking"),[u,f]=r.useState(null),[h,m]=r.useState(!1),g=r.useRef(null),v=r.useCallback(()=>{g.current!==null&&(window.clearInterval(g.current),g.current=null)},[]),y=r.useCallback(async()=>{const{state:N}=await Ce.codexStatus();return c(N),N},[]);r.useEffect(()=>(f(null),c("checking"),y().catch(()=>c("not-installed")),v),[y,v]),r.useEffect(()=>{i==="ready"&&t()},[i,t]);const w=async()=>{f(null),c("installing");try{const N=await Ce.installCodex();if(N.ok){c(N.state);return}f({detail:N.detail,command:N.fallbackCommand,docsUrl:N.docsUrl}),c(N.state)}catch(N){f({detail:N.message,command:"npm install -g @openai/codex"}),c("not-installed")}},E=async()=>{f(null),c("signing-in");const N=Date.now();v(),g.current=window.setInterval(()=>{if(Date.now()-N>yF){v(),c("not-authenticated"),f({detail:"Sign-in did not finish. Try again, or use the command below.",command:"codex login"});return}Ce.codexStatus().then(({state:j})=>{j==="ready"&&(v(),c("ready"))}).catch(()=>{})},vF);try{const j=await Ce.loginCodex();if(v(),j.ok){c(j.state);return}f({detail:j.detail,command:j.fallbackCommand}),c(j.state)}catch(j){v(),f({detail:j.message,command:"codex login --device-auth"}),c("not-authenticated")}},C=N=>{var j;(j=navigator.clipboard)==null||j.writeText(N).then(()=>{m(!0),window.setTimeout(()=>m(!1),1600)})},b=e.filter(N=>N.available&&N.id!=="codex-cli"&&!N.localOnly);return o.jsxs(o.Fragment,{children:[o.jsx(Ow,{title:"Set up image generation"}),o.jsx(EF,{phase:i}),o.jsxs("div",{className:"sc-setup-body",children:[i==="checking"&&o.jsxs("p",{className:"sc-setup-lead",children:[o.jsx(ln,{size:"1"})," Checking this computer."]}),(i==="not-installed"||i==="installing")&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"scenri generates with Codex CLI, a small official helper from OpenAI that runs on this computer and uses your own ChatGPT plan. It needs to be installed once."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:w,disabled:i==="installing",children:[i==="installing"?o.jsx(ln,{size:"1"}):o.jsx(x5,{size:15}),i==="installing"?"Installing":"Install Codex CLI"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>c("no-plan"),children:"I do not have ChatGPT"})]})]}),(i==="not-authenticated"||i==="signing-in")&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Codex CLI is installed. Sign in with the ChatGPT account whose plan should cover your images. This opens your browser, and scenri never sees your password or token."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:E,disabled:i==="signing-in",children:[i==="signing-in"?o.jsx(ln,{size:"1"}):o.jsx(AH,{size:15}),i==="signing-in"?"Waiting for your browser":"Sign in with ChatGPT"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>c("no-plan"),children:"I do not have ChatGPT"})]}),i==="signing-in"&&o.jsx("p",{className:"sc-setup-note",children:"Finish in the browser tab that just opened. This screen updates itself."})]}),i==="ready"&&o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"sc-setup-lead",children:[o.jsx(_a,{size:15})," Codex CLI is ready. Your images run on your own ChatGPT plan, and scenri adds nothing to the bill."]}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:n,children:"Start creating"})]}),i==="no-plan"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Codex CLI draws on a ChatGPT plan, so without one there is nothing behind it to generate your images."}),o.jsx("p",{className:"sc-setup-lead",children:"You can use your own key from an image provider instead. You pay that provider directly, per image, and the key stays in your library folder on this computer."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>s("openrouter"),children:[o.jsx(M5,{size:15})," Add a provider key"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>void y(),children:"Back to Codex setup"})]}),b.length>0&&o.jsxs("p",{className:"sc-setup-note",children:[b.map(N=>Gs(N.displayName)).join(", ")," is already connected, so you can generate now."]})]}),u&&o.jsxs("div",{className:"sc-setup-problem",children:[o.jsxs("p",{"data-detail":"",children:[o.jsx(nw,{size:15})," ",u.detail??"That did not work."]}),u.command&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-note",children:"Run this in Terminal, then reopen this window:"}),o.jsxs("div",{className:"sc-setup-cmd",children:[o.jsx("code",{children:u.command}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>C(u.command),children:[h?o.jsx(_a,{size:14}):o.jsx(mH,{size:14}),h?"Copied":"Copy"]})]})]}),u.docsUrl&&o.jsxs("a",{className:"sc-setup-alt",href:u.docsUrl,target:"_blank",rel:"noreferrer",children:["Installation help ",o.jsx(W1,{size:13})]})]})]})]})}function EF({phase:e}){if(e==="no-plan")return null;const t=e==="not-authenticated"||e==="signing-in"||e==="ready",n=e==="ready";return o.jsxs("ol",{className:"sc-setup-steps",children:[o.jsxs("li",{"data-on":t?"":void 0,"data-now":e==="not-installed"||e==="installing"?"":void 0,children:[t?o.jsx(_a,{size:12}):o.jsx("span",{className:"d"})," Install"]}),o.jsxs("li",{"data-on":n?"":void 0,"data-now":e==="not-authenticated"||e==="signing-in"?"":void 0,children:[n?o.jsx(_a,{size:12}):o.jsx("span",{className:"d"})," Sign in"]})]})}function CF(){const{brands:e}=pn(),t=Zw(e);return t?o.jsx(Ys,{to:Vo(t),replace:!0}):o.jsx(Ys,{to:"/setup",replace:!0})}function Zw(e){const t=VL();return e.find(n=>n.id===t)??e[0]??null}const Vw=r.createContext(null);function It(){const e=r.useContext(Vw);if(!e)throw new Error("useBrand must be used inside BrandLayout");return e}const zw=r.createContext(null);function SF(){const e=r.useContext(zw);if(!e)throw new Error("useAssetsPanel must be used inside BrandLayout");return e}function jF(){const{brandSlug:e}=za(),{pathname:t,search:n}=mn(),s=lr({path:Ye.brand,end:!1}),{brands:i,engines:c,refresh:u}=pn(),[f,h]=r.useState(null),[m,g]=r.useState([]),[v,y]=r.useState([]),[w,E]=r.useState({}),[C,b]=r.useState(!1),[N,j]=Ia(cr.assetsOpen,window.innerWidth>=1280),k=r.useCallback(()=>j(te=>!te),[]),A=r.useMemo(()=>({open:N,toggle:k,setOpen:j}),[N,k]);o$();const M=i.find(te=>te.slug===e)??i.find(te=>te.id===e)??null,{products:T,loaded:D,reload:L}=l$(M==null?void 0:M.id),Y=r.useCallback(async()=>{if(!M)return;const te=await Ce.workspace(M.id);h(te.project),g(te.nodes),y(te.sets),E(te.membership),b(!0)},[M==null?void 0:M.id]),I=r.useCallback(te=>y(O=>O.map(ne=>ne.id===te.id?te:ne)),[]),se=r.useCallback(te=>y(O=>O.filter(ne=>ne.id!==te)),[]);r.useEffect(()=>{b(!1)},[M==null?void 0:M.id]),r.useEffect(()=>{M&&zL(M.id)},[M==null?void 0:M.id]),r.useEffect(()=>{Y()},[Y,M==null?void 0:M.updatedAt]);const U=s?t.slice(s.pathnameBase.length):"";if(!M){const te=Zw(i);return o.jsx(Ys,{to:te?Vo(te)+U+n:Ye.root,replace:!0})}return e!==M.slug?o.jsx(Ys,{to:Vo(M)+U+n,replace:!0}):o.jsxs(Vw.Provider,{value:{brand:M,workspace:f,nodes:m,sets:v,membership:w,products:T,productsLoaded:D,refreshProducts:L,loaded:C,refresh:Y,applySet:I,dropSet:se},children:[o.jsx(fF,{engines:c,shots:m,onSaved:u}),o.jsx(xF,{engines:c,onSaved:u}),o.jsx(gF,{}),o.jsxs(ED,{brand:M,children:[o.jsx(MF,{}),o.jsx(GD,{children:o.jsx(zw.Provider,{value:A,children:o.jsxs("div",{className:"sc-shell",children:[o.jsx(r$,{}),o.jsx(Uh,{}),o.jsx(jD,{})]})})})]})]})}function kF(e){return!e.unread||e.spent||!e.loaded||!e.visible||e.dialogOpen?!1:e.running===0&&e.builds===0}const NF=2500,Bw=r.createContext(null);function td(){const e=r.useContext(Bw);if(!e)throw new Error("useWhatsNew must be used inside WhatsNewProvider");return e}function AF({children:e}){const[t,n]=r.useState(null),[s,i]=r.useState(null),[c,u]=r.useState(null),[f,h]=r.useState(null),[m,g]=r.useState(null),[v,y]=r.useState("loading"),[w,E]=r.useState(!1),C=gs("whatsnew");r.useEffect(()=>{let M=!0;return Ce.releaseNotes().then(T=>{M&&(n(T.version),i(T.entry),u(T.changelogUrl),h(T.releasesUrl??null),g(T.seen),y("ready"))}).catch(()=>{M&&y("failed")}),()=>{M=!1}},[]);const b=C.open,N=r.useCallback(()=>b(t??"latest"),[b,t]),j=r.useCallback(()=>{E(!0),N()},[N]),k=r.useCallback(()=>{!t||m===t||(g(t),Ce.releaseSeen(t).catch(()=>{}))},[t,m]),A=t!==null&&m!==t&&s!==null&&s.sections.length>0;return o.jsx(Bw.Provider,{value:{status:v,version:t,entry:s,changelogUrl:c,releasesUrl:f,unread:A,open:N,autoOpenSpent:w,autoOpen:j,markSeen:k},children:e})}function MF(){const e=td(),{running:t,builds:n}=sl(),{loaded:s}=It(),[i]=li(),[c,u]=r.useState(()=>!document.hidden),f=r.useRef(!1);r.useEffect(()=>{const m=()=>u(!document.hidden);return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]);const h=i.has("settings")||i.has("setup")||i.has("new")||i.has("whatsnew");return r.useEffect(()=>{if(!kF({unread:e.unread,spent:f.current||e.autoOpenSpent,loaded:s,visible:c,dialogOpen:h,running:t,builds:n.length}))return;const g=window.setTimeout(()=>{f.current=!0,e.autoOpen()},NF);return()=>window.clearTimeout(g)},[e,s,c,h,t,n.length]),null}const Uw=r.createContext(null);function pn(){const e=r.useContext(Uw);if(!e)throw new Error("useAppData must be used inside AppShell");return e}function RF(){GH();const[e,t]=r.useState(null),[n,s]=r.useState([]),[i,c]=r.useState(null),u=YH(),f=XH(),h=JH(),m=tD(),g=r.useCallback(y=>{t(w=>w&&w.map(E=>E.id===y.id?y:E))},[]),v=r.useCallback(async()=>{try{const[y,w]=await Promise.all([Ce.brands(),Ce.engines()]);t(y),s(w)}catch(y){c(String(y.message??y))}},[]);return r.useEffect(()=>{v()},[v]),i?o.jsx(fr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(Jm,{failure:oo(i)})}):e===null?o.jsx(fr,{align:"center",justify:"center",height:"100vh",children:o.jsx(ln,{size:"3"})}):o.jsx(Uw.Provider,{value:{brands:e,engines:n,...u,presenters:f.presenters,presenterCategories:f.categories,presenterStyles:f.styles,presentersLoaded:f.loaded,presentersError:f.error,refetchPresenters:f.refetch,demoProducts:h.demoProducts,demoProductCategories:h.categories,demoProductsLoaded:h.loaded,demoProductsError:h.error,showcase:m.showcase,showcaseCategories:m.categories,showcaseLoaded:m.loaded,showcaseError:m.error,refetchShowcase:m.refetch,refresh:v,applyBrand:g},children:o.jsx(lD,{children:o.jsxs(AF,{children:[o.jsx(Bv,{}),o.jsx(Uh,{})]})})})}function gs(e){const[t,n]=li(),s=t.get(e),i=r.useCallback(f=>{n(h=>{const m=new URLSearchParams(h);return m.set(e,f),m},{replace:!1})},[e,n]),c=r.useCallback(f=>{n(h=>{const m=new URLSearchParams(h);return m.set(e,f),m},{replace:!0})},[e,n]),u=r.useCallback(()=>{n(f=>{const h=new URLSearchParams(f);return h.delete(e),h},{replace:!0})},[e,n]);return{value:s,open:i,set:c,close:u}}function Os(e,t=""){const[n,s]=li(),i=n.get(e)??t,c=r.useCallback(u=>{s(f=>{const h=new URLSearchParams(f);return u===null||u===t?h.delete(e):h.set(e,u),h},{replace:!0})},[e,t,s]);return[i,c]}function PF(){var T,D,L,Y,I,se,U,te;const{brands:e,refresh:t}=pn(),n=an(),s=e.length>0,[i,c]=r.useState(""),[u,f]=r.useState(""),[h,m]=r.useState(!1),[g,v]=r.useState(!1),[y,w]=r.useState(null),[E,C]=r.useState(null),b=async O=>{C(O),await t(),n(Vo(O),{replace:!0})},N=async()=>{var O,ne,Q;v(!0),w(null);try{const H=/^https?:\/\//.test(i)?i:`https://${i}`,K=await Ce.brandFromUrl(H),X=await Ce.updateBrand(K.id,{...K.json,meta:{...(O=K.json)==null?void 0:O.meta,website:((Q=(ne=K.json)==null?void 0:ne.meta)==null?void 0:Q.website)||H}});Ce.catalogImport(X.id,H).catch(()=>{}),await b(X)}catch(H){w(String(H.message??H)),v(!1)}},j=async()=>{v(!0),w(null);try{await b(await Ce.createBrand({specVersion:"0.1",meta:{name:u.trim()||"Untitled brand"}}))}catch(O){w(String(O.message??O)),v(!1)}},k=()=>n("/",{replace:!0}),A=E?va((T=E.json)==null?void 0:T.palette):[],M=E?_n((Y=(L=(D=E.json)==null?void 0:D.logos)==null?void 0:L[0])==null?void 0:Y.file):null;return o.jsxs("div",{className:"sc-wiz",children:[o.jsxs("div",{className:"sc-wiz-form",children:[o.jsxs("div",{className:"sc-wiz-head",children:[o.jsxs("button",{type:"button",className:"sc-wiz-back",onClick:k,style:s?void 0:{visibility:"hidden"},children:[o.jsx(wi,{size:11})," Back"]}),o.jsx("span",{}),o.jsx("span",{})]}),o.jsxs("h1",{children:["Your ",o.jsx("em",{children:"brand"})]}),o.jsx("p",{className:"sc-wiz-sub",children:"Paste a website and the kit builds itself: name, logo, palette. You can also start from nothing and fill it in later from Settings."}),o.jsxs("div",{className:"sc-wiz-fields",children:[h?o.jsxs(o.Fragment,{children:[o.jsx("label",{htmlFor:"sc-wiz-name",children:"Brand name"}),o.jsx("input",{id:"sc-wiz-name",className:"sc-in",placeholder:"Brand name",value:u,onChange:O=>f(O.target.value),onKeyDown:O=>O.key==="Enter"&&u.trim()&&!g&&void j()}),o.jsxs("div",{style:{textAlign:"center"},children:[o.jsx("button",{type:"button",className:"sc-wiz-cta",disabled:!u.trim()||g,onClick:()=>void j(),children:g?o.jsx(ln,{size:"1"}):o.jsxs(o.Fragment,{children:["Create it ",o.jsx(sg,{size:12})]})}),o.jsx("div",{children:o.jsx("button",{type:"button",className:"sc-wiz-skip",onClick:()=>m(!1),children:"Build from a website instead"})})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("label",{htmlFor:"sc-wiz-url",children:"Website"}),o.jsx("input",{id:"sc-wiz-url",className:"sc-in",placeholder:"acme.com",value:i,onChange:O=>c(O.target.value),onKeyDown:O=>O.key==="Enter"&&i.trim()&&!g&&void N()}),o.jsx("p",{className:"sc-wiz-hint",children:"We only read public pages. Nothing leaves this machine."}),o.jsxs("div",{style:{textAlign:"center"},children:[o.jsx("button",{type:"button",className:"sc-wiz-cta",disabled:!i.trim()||g,onClick:()=>void N(),children:g?o.jsx(ln,{size:"1"}):o.jsxs(o.Fragment,{children:["Build the kit ",o.jsx(sg,{size:12})]})}),o.jsx("div",{children:o.jsx("button",{type:"button",className:"sc-wiz-skip",onClick:()=>m(!0),children:"Start from scratch instead"})})]})]}),y&&o.jsx(Mx,{color:"red",mt:"3",size:"1",children:o.jsx(Rx,{children:y})})]})]}),o.jsx("div",{className:"sc-wiz-preview",children:o.jsxs("div",{className:"sc-wiz-card",children:[o.jsx("div",{className:"sc-wiz-cap",children:g?`Reading ${i||"the site"}`:"Live kit preview"}),o.jsxs("div",{className:"sc-wiz-body",children:[g&&!E&&o.jsxs("div",{className:"sc-scrape-row",children:[o.jsx(ln,{size:"1"})," Reading the site and building the kit"]}),!g&&!E&&o.jsx("p",{style:{color:"var(--sc-fg3)",fontSize:12.5,margin:0},children:"The kit appears here as it is found."}),E&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:A.length?16:0},children:[o.jsx("span",{className:"sc-kit-logo",style:{width:44,height:44,padding:7,borderRadius:12},children:M?o.jsx("img",{src:M,alt:""}):o.jsx(Wa,{size:16,color:"var(--sc-fg3)"})}),o.jsxs("span",{children:[o.jsx("b",{dir:"auto",style:{fontFamily:"var(--sc-font-display)",fontSize:16},children:(se=(I=E.json)==null?void 0:I.meta)==null?void 0:se.name}),((te=(U=E.json)==null?void 0:U.meta)==null?void 0:te.tagline)&&o.jsx("small",{dir:"auto",style:{display:"block",color:"var(--sc-fg3)",fontSize:11.5},children:String(E.json.meta.tagline).slice(0,60)})]})]}),A.length>0&&o.jsx("div",{style:{display:"flex",gap:8},children:A.slice(0,5).map(O=>o.jsx("span",{style:{flex:1,height:44,borderRadius:9,border:"1px solid var(--sc-line)",background:O.hex}},O.hex))})]})]})]})})]})}const Ol=e=>{const t=(e??"").trim();return t||null};function LF(e){const t=e;return{name:e.name,brand:Ol(t.brand)??Ol(t.vendor),qualifier:Ol(t.format)??Ol(t.subcategory)??Ol(t.variant)}}function TF(e){return!e.brand||e.name.toLowerCase().startsWith(e.brand.toLowerCase())?e.name:`${e.brand} ${e.name}`}function Oa(e,t){const n=LF(e);if(t==="chip")return n.name;const s=TF(n);return t==="tooltip"?[s,n.qualifier].filter(Boolean).join(" · "):s}function to(e,t){return t==="tooltip"?[e.name,Ol(e.lighting)].filter(Boolean).join(" · "):e.name}function d1(e){return[e.name,...e.legacyNames??[],...e.keywords??[],e.description,e.lighting,e.subject].concat(e.collections??[],e.verticals??[]).filter(Boolean).join(" ")}function mp(e){const t=e;return[e.name,...t.legacyNames??[],...t.keywords??[],t.brand,t.vendor,t.format,t.subcategory,t.variant,t.productType,...t.tags??[]].filter(Boolean).join(" ")}function f1(e){return[e.name,e.descriptor,e.presentation,e.ageRange,e.facial,e.skin,e.hair,e.build,e.wardrobeDefault,...e.suitableCategories,...e.suitableStyles].filter(Boolean).join(" ")}function HF(e,t,n){return[e.title,e.category,n,t.product?mp(t.product):null,t.presenter?f1(t.presenter):null,t.scene?d1(t.scene):null].filter(Boolean).join(" ")}function pp(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?presenter=${encodeURIComponent(s)}&compose=1`)},[n,t])}function gp(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?scene=${encodeURIComponent(s)}&compose=1`)},[n,t])}function wh(e){return{...e.brief,...e.variants?{variants:e.variants}:{},...e.quality?{quality:e.quality}:{},_at:Date.now()}}function DF(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?showcase=${encodeURIComponent(s)}`)},[n,t])}const W0=e=>`sc-favscenes-${e}`,$F=e=>`sc-favlooks-${e}`,FF=e=>`bt-favlooks-${e}`;function Za(e){try{const t=localStorage.getItem(W0(e))??dh($F(e),W0(e))??dh(FF(e),W0(e)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function IF(e,t){try{localStorage.setItem(W0(e),JSON.stringify(t))}catch{}}function Ww(e,t){const n=Za(e),s=n.includes(t)?n.filter(i=>i!==t):[...n,t];return IF(e,s),s}const Gw=[{key:"campaign",label:"Product campaign"},{key:"lifestyle",label:"Lifestyle"},{key:"editorial",label:"Fashion & editorial"},{key:"beauty",label:"Beauty"},{key:"food-drink",label:"Food & drink"},{key:"launch",label:"Tech launch"},{key:"social",label:"Social"},{key:"cinematic",label:"Cinematic"},{key:"catalog",label:"Catalog"},{key:"seasonal",label:"Seasonal"}],_F=new Map(Gw.map(e=>[e.key,e]));function w2(e){var t;return e?((t=_F.get(e))==null?void 0:t.label)??e:null}function OF(e){const t=new Map(Gw.map((n,s)=>[n.key,s]));return[...e].sort((n,s)=>(t.get(n)??99)-(t.get(s)??99)||n.localeCompare(s))}const b2=14,ZF=768,bh=[{px:190,label:"Compact",cells:3},{px:320,label:"Large",cells:2}],Kw=320;function Yw(e){const t=typeof e=="number"&&Number.isFinite(e)?e:Kw;let n=bh[0].px;for(const s of bh)Math.abs(s.px-t)<Math.abs(n-t)&&(n=s.px);return n}const zo=5;function ll(e){const t=typeof e=="number"?e:zo;return t===7||t===5?t:t===6?5:zo}function VF(e){const[t,n]=r.useState(0);return r.useEffect(()=>{if(!e)return;const s=()=>n(e.clientWidth);s();const i=new ResizeObserver(s);return i.observe(e),()=>i.disconnect()},[e]),t}function zF(){const[e,t]=r.useState(()=>window.innerWidth);return r.useEffect(()=>{const n=()=>t(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}function BF(e,t,n){if(e<=0)return{tile:t,cols:1};const s=n?2:Math.max(1,Math.floor((e+b2)/(t+b2)));return{tile:Math.floor((e-b2*(s-1))/s),cols:s}}function ou(e){return ll(e)===5?"large":"compact"}function UF(){const[e]=Ia(cr.wallDensity,zo);return ou(e)}const WF=[{value:7,label:"Compact",hint:"More cards per row",cells:3},{value:5,label:"Large",hint:"Fewer, larger cards",cells:2}],GF=bh.map(e=>({value:e.px,label:e.label,hint:e.label==="Compact"?"More shots per row":"Fewer, larger shots",cells:e.cells}));function nd({value:e,onChange:t}){return o.jsx(qw,{label:"Grid size",value:ll(e),options:WF,onChange:n=>t(n)})}function KF({value:e,onChange:t}){return o.jsx(qw,{label:"Shot size",value:Yw(e),options:GF,onChange:t})}function qw({label:e,value:t,options:n,onChange:s}){const i=r.useRef(null);return r.useLayoutEffect(()=>{const c=i.current;if(!c)return;const u=()=>{const h=c.querySelector(":scope > button[data-on]");if(!h){c.style.setProperty("--sc-density-x","0px"),c.style.setProperty("--sc-density-w","0px");return}c.style.setProperty("--sc-density-x",`${h.offsetLeft}px`),c.style.setProperty("--sc-density-w",`${h.offsetWidth}px`)};u(),c.dataset.inkReady||requestAnimationFrame(()=>{c.dataset.inkReady=""});const f=new ResizeObserver(u);return f.observe(c),()=>f.disconnect()},[t]),o.jsxs("div",{ref:i,className:"sc-density",role:"radiogroup","aria-label":e,children:[o.jsx("span",{className:"sc-density-ink","aria-hidden":!0}),n.map(c=>{const u=t===c.value;return o.jsx("button",{type:"button",role:"radio",className:"sc-density-opt","aria-checked":u,"aria-label":c.label,title:c.hint,"data-on":u||void 0,onClick:()=>{u||s(c.value)},children:o.jsx(YF,{cells:c.cells})},c.value)})]})}function YF({cells:e}){const t=e,n=16,s=1.5,i=1.5,u=(n-s*2-i*(t-1))/t,f=Math.max(.6,u*.22),h=[];for(let m=0;m<t;m++)for(let g=0;g<t;g++)h.push({x:s+g*(u+i),y:s+m*(u+i)});return o.jsx("svg",{className:"sc-density-icon",width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-hidden":!0,children:h.map(m=>o.jsx("rect",{x:m.x,y:m.y,width:u,height:u,rx:f,ry:f,fill:"currentColor"},`${m.x}-${m.y}`))})}function rd(e){return{"--sc-wall-cols":String(ll(e))}}const G0="sc-insert-menu";function qF(e){var t;return!!(((t=e.nativeEvent)==null?void 0:t.isComposing)??e.isComposing)||e.keyCode===229}function Pg(e){return e==="/"?"Scenes":e==="@"?"Presenters":e==="#"?"Colors":"Products"}function XF(e){return e==="/"?"No matching scenes":e==="#"?"No matching colours":e==="@"?"No matching presenters":"No matching products"}function QF({menuOpen:e,handled:t}){return!e&&!t}function JF(e,t){return t||!e?{open:!1}:{open:!0,sigil:e.sigil,query:e.query}}function eI(e,t){const n=t.trim().split(/\s+/).filter(Boolean)[0];if(!n)return[{text:e,hit:!1}];const s=e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase());if(s<0)return[{text:e,hit:!1}];const i=s+n.length;return[...s>0?[{text:e.slice(0,s),hit:!1}]:[],{text:e.slice(s,i),hit:!0},...i<e.length?[{text:e.slice(i),hit:!1}]:[]]}const tI=e=>e.t!=="format",as=()=>[{t:"text",v:""}];function Xw(e){const t=(e.tokens??[]).filter(tI),n=t.length?t:as(),s=n.some(i=>i.t==="template");return e.templateId&&!s?[{t:"template",id:e.templateId},...n]:n}const ha="sc-token",vp=`.${ha}`,Qw=e=>e.t==="template"?`t:${e.id}`:e.t==="product"?`p:${e.id}${e.angle?`|${e.angle}`:""}`:e.t==="character"?`h:${e.id}`:e.t==="color"?`c:${e.hex}|${e.name??""}`:e.t==="ref"?`r:${e.imageHash}`:e.t==="mark"?`m:${e.imageHash}`:"",zs=e=>{const t=e.slice(0,1),n=e.slice(2);if(t==="t")return n?{t:"template",id:n}:null;if(t==="p"){const[s,i]=n.split("|");return s?{t:"product",id:s,...i?{angle:i}:{}}:null}if(t==="h")return n?{t:"character",id:n}:null;if(t==="r")return n?{t:"ref",imageHash:n}:null;if(t==="m")return n?{t:"mark",imageHash:n}:null;if(t==="c"){const[s,i]=n.split("|");return s?{t:"color",hex:s,name:i||void 0}:null}return null};function K0(e){const t=typeof window>"u"?null:window.getSelection();if(!e||!t||t.rangeCount===0)return null;const n=t.getRangeAt(0);if(!e.contains(n.startContainer))return null;if(n.startContainer===e){let i=0;for(let c=0;c<n.startOffset&&c<e.childNodes.length;c++)i+=h1(e.childNodes[c]);return i}let s=0;for(const i of Array.from(e.childNodes)){if(i===n.startContainer)return s+n.startOffset;if(i.contains(n.startContainer))return s+1;s+=h1(i)}return s}function Yl(e,t){if(!e)return;let n=0;for(const s of Array.from(e.childNodes)){const i=h1(s);if(t<=n+i){if(s.nodeType===Node.TEXT_NODE){Ir(e,s,t-n);return}const c=s.nextSibling;if((c==null?void 0:c.nodeType)===Node.TEXT_NODE){Ir(e,c,0);return}break}n+=i}dc(e)}function dc(e){if(!e)return;if(e.focus({preventScroll:!0}),!e.firstChild){const n=window.getSelection(),s=document.createRange();s.selectNodeContents(e),s.collapse(!1),n==null||n.removeAllRanges(),n==null||n.addRange(s);return}const t=nI(e);Ir(e,t,t.length)}function nI(e){const t=e.lastChild;if(t&&t.nodeType===Node.TEXT_NODE)return t;const n=document.createTextNode(" ");return e.appendChild(n),n}function Ir(e,t,n){const s=window.getSelection(),i=document.createRange();i.setStart(t,Math.max(0,Math.min(n,t.length))),i.collapse(!0),s==null||s.removeAllRanges(),s==null||s.addRange(i)}const h1=e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").length:1;function Bs(e){if(!e)return;const t=K0(e);e.normalize();for(const s of Array.from(e.childNodes))s.nodeType===Node.TEXT_NODE&&!(s.textContent??"").length&&s.remove();const n=Array.from(e.childNodes);for(let s=0;s<n.length;s++){const i=n[s];if(i.nodeType!==Node.TEXT_NODE)continue;let c=(i.textContent??"").replace(/ {2,}/g," ");const u=No(i.previousSibling),f=No(i.nextSibling);u?c=c.replace(/^ */," "):i.previousSibling||(c=c.replace(/^ +/,"")),f&&(c=c.replace(/ *$/," ")),i.textContent=c}for(const s of Array.from(e.childNodes))No(s)&&No(s.nextSibling)&&e.insertBefore(document.createTextNode(" "),s.nextSibling);No(e.lastChild)&&e.appendChild(document.createTextNode(" ")),No(e.firstChild)&&e.insertBefore(document.createTextNode(""),e.firstChild),!fc(e)&&t!==null&&Yl(e,t)}function rI(e){return e.querySelector(vp)?!1:!(e.textContent??"").replace(/[\u200B\uFEFF\u00a0]/g,"").trim()}function fc(e){if(!e)return!1;const t=rI(e);return t&&e.firstChild&&e.replaceChildren(),e.toggleAttribute("data-empty",t),t}const No=e=>!!e&&e.nodeType===Node.ELEMENT_NODE&&e.classList.contains(ha);function Lg(e){var i;if(!e)return as();const t=[];let n="";const s=()=>{n&&(t.push({t:"text",v:n}),n="")};for(const c of Array.from(e.childNodes)){if(c.nodeType===Node.TEXT_NODE){n+=c.textContent??"";continue}const u=c,f=(i=u.dataset)==null?void 0:i.tok;if(f){const h=zs(f);if(h){s(),t.push(h);continue}}if(u.tagName==="BR"){n+=`
|
|
100
100
|
`;continue}n+=u.textContent??""}return s(),t.some(c=>c.t==="text")||t.push({t:"text",v:""}),t}function Tg(e,t,n){if(e){e.textContent="";for(const s of t){if(s.t==="text"){s.v&&e.appendChild(document.createTextNode(s.v));continue}e.appendChild(n(s))}Bs(e)}}function Jw(e){const t=typeof window>"u"?null:window.getSelection();if(!e||!t||t.rangeCount===0)return"";const n=t.getRangeAt(0);if(n.startContainer.nodeType!==Node.TEXT_NODE||!e.contains(n.startContainer))return"";let s=(n.startContainer.textContent??"").slice(0,n.startOffset);for(let i=n.startContainer.previousSibling;i&&i.nodeType===Node.TEXT_NODE;i=i.previousSibling)s=(i.textContent??"")+s;return s}function e9(){const e=window.getSelection();if(!e||e.rangeCount===0)return null;const t=e.getRangeAt(0).cloneRange(),n=t.getBoundingClientRect();if(n.width||n.height)return n;const s=document.createElement("span");s.textContent="",t.insertNode(s);const i=s.getBoundingClientRect(),c=s.parentNode;return s.remove(),c==null||c.normalize(),i}function Eh(e,t,n){var c,u;if(!e||!t)return;if(n==="after"){const f=t.nextSibling;if((f==null?void 0:f.nodeType)===Node.TEXT_NODE){const m=f;Ir(e,m,Math.min(1,m.length));return}const h=document.createTextNode(" ");(c=t.parentNode)==null||c.insertBefore(h,t.nextSibling),Ir(e,h,h.length);return}const s=t.previousSibling;if((s==null?void 0:s.nodeType)===Node.TEXT_NODE){const f=s;Ir(e,f,f.length);return}const i=document.createTextNode("");(u=t.parentNode)==null||u.insertBefore(i,t),Ir(e,i,0)}const Hg=9;function aI(e){if(!e.firstChild)return[];const t=document.createRange();return t.selectNodeContents(e),Array.from(t.getClientRects()).filter(n=>n.height>0)}function sI(e,t){let n=null,s=1/0;for(const i of e){const c=t<i.top?i.top-t:t>i.bottom?t-i.bottom:0;c<s&&(s=c,n=i)}return n}function oI(e,t,n){if(!e)return!1;const s=aI(e),i=sI(s,n);if(!i)return!1;const c=i.top+i.height/2;for(const f of Array.from(e.querySelectorAll(vp))){const h=f.getBoundingClientRect();if(!(h.bottom<i.top||h.top>i.bottom)&&!(t<h.left-Hg||t>h.right+Hg))return Eh(e,f,t<h.left+h.width/2?"before":"after"),!0}if(Math.abs(c-n)<1)return!1;const u=lI(t,c);return!u||!e.contains(u.node)||u.node.nodeType!==Node.TEXT_NODE?!1:(Ir(e,u.node,u.offset),!0)}function lI(e,t){var c,u;const n=document,s=(c=n.caretRangeFromPoint)==null?void 0:c.call(n,e,t);if(s)return{node:s.startContainer,offset:s.startOffset};const i=(u=n.caretPositionFromPoint)==null?void 0:u.call(n,e,t);return i?{node:i.offsetNode,offset:i.offset}:null}function iI(e,t,n={}){if(!e)return;const s=window.getSelection();let i=null;if(s&&s.rangeCount>0&&e.contains(s.getRangeAt(0).startContainer))i=s.getRangeAt(0);else if(n.fallbackUnits!=null){Yl(e,n.fallbackUnits);const v=window.getSelection();v&&v.rangeCount>0&&e.contains(v.getRangeAt(0).startContainer)&&(i=v.getRangeAt(0))}i||(i=document.createRange(),i.selectNodeContents(e),i.collapse(!1)),i.deleteContents();let c,u;if(i.startContainer.nodeType===Node.TEXT_NODE)c=i.startContainer,u=i.startOffset;else{const v=i.startContainer;c=document.createTextNode(""),v.insertBefore(c,v.childNodes[i.startOffset]??null),u=0}const f=c.textContent??"";let h=f.slice(0,u);const m=f.slice(u);n.eatQuery&&(h=fI(c,h));const g=c.parentNode;g&&(c.textContent=" ",(m.trim()||m.length>1)&&g.insertBefore(document.createTextNode(m),c.nextSibling),g.insertBefore(t,c),h&&g.insertBefore(document.createTextNode(h),t),Ir(e,c,c.length),Bs(e))}const cI=["$","/","@","#"],uI=e=>cI.includes(e),m1=e=>e===" "||e===`
|
|
101
|
-
`||e===" ";function dI(e){const t=Jw(e);for(let n=t.length-1;n>=0;n--){const s=t[n];if(m1(s))return null;if(uI(s))return n===0||m1(t[n-1])?{sigil:s,query:t.slice(n+1)}:null}return null}function fI(e,t){const n=c=>Math.max(c.lastIndexOf("$"),c.lastIndexOf("/"),c.lastIndexOf("@"),c.lastIndexOf("#")),s=n(t);if(s>=0)return t.slice(0,s);const i=[];for(let c=e.previousSibling;c&&c.nodeType===Node.TEXT_NODE;c=c.previousSibling){const u=c.textContent??"",f=n(u);if(f>=0){c.textContent=u.slice(0,f);for(const h of i)h.remove();return""}i.push(c)}return t}function E2(e,t){if(!e||!t)return;e.normalize();const n=Ch(e,t);t.remove(),Bs(e),Yl(e,n)}function Ch(e,t){let n=0;for(const s of Array.from(e.childNodes)){if(s===t)break;n+=h1(s)}return n}function hI(e){if(!e)return;const t=window.getSelection();if(!t||t.rangeCount===0||!t.getRangeAt(0).collapsed)return;const n=t.getRangeAt(0),s=n.startContainer;if(s.nodeType!==Node.TEXT_NODE||!e.contains(s))return;const i=s,c=i.textContent??"",u=n.startOffset;c[u-1]!==" "||c[u]!==" "||(i.textContent=c.slice(0,u)+c.slice(u+1),Ir(e,i,u))}function Sh(e){var n;const t=e.target;(n=t==null?void 0:t.closest)!=null&&n.call(t,'input, textarea, select, [contenteditable=""], [contenteditable="true"]')||e.preventDefault()}const C2=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function mI(e){let t="",n="";const s=i=>{var f;if(i.nodeType===Node.TEXT_NODE){const h=i.textContent??"";t+=h,n+=C2(h);return}const c=i,u=(f=c.dataset)==null?void 0:f.tok;if(u){const h=pI(c);t+=h,n+=`<span data-sc-tok="${C2(u)}">${C2(h)}</span>`;return}i.childNodes.forEach(s)};return e.cloneContents().childNodes.forEach(s),{text:t,html:`<span data-sc-brief="1">${n}</span>`}}function pI(e){let t="";for(const n of Array.from(e.childNodes))n.nodeType===Node.TEXT_NODE&&(t+=n.textContent??"");return t.trim()}function gI(e){if(!e.includes("data-sc-brief")&&!e.includes("data-bt-brief"))return null;const n=new DOMParser().parseFromString(e,"text/html").querySelector("[data-sc-brief], [data-bt-brief]");if(!n)return null;const s=[],i=c=>{var m,g;if(c.nodeType===Node.TEXT_NODE){s.push(c.textContent??"");return}const u=c,f=((m=u.dataset)==null?void 0:m.scTok)??((g=u.dataset)==null?void 0:g.btTok);if(f===void 0){c.childNodes.forEach(i);return}const h=zs(f);s.push(h??u.textContent??"")};return n.childNodes.forEach(i),s.length?s:null}const S2=e=>(e==null?void 0:e.querySelector('[data-kind="template"]'))??null,A0=e=>{var t;return((t=e==null?void 0:e.closest)==null?void 0:t.call(e,vp))??null};function j2(e,t,n={}){var i;if(!e)return!1;let s=!1;for(let c=0;c<32;c++){const u=yI(e,!!n.commit);if(!u)break;const f={t:"color",hex:u.hex,name:(i=n.nameFor)==null?void 0:i.call(n,u.hex)};bI(e,u.node,u.start,u.end,t(f)),s=!0}return s&&Bs(e),s}function vI(e,t){var i;e.dataset.kind="color",e.dataset.tok=Qw(t);const n=t.name??t.hex,s=e.querySelector(".sc-token-swatch");s&&(s.style.background=t.hex);for(const c of Array.from(e.childNodes))if(c.nodeType===Node.TEXT_NODE){c.textContent=n;break}e.getAttribute("role")==="button"&&e.setAttribute("aria-label",`colour: ${n}. Change or remove.`),(i=e.querySelector('[data-role="remove"]'))==null||i.setAttribute("aria-label",`Remove ${n}`)}function yI(e,t){for(let n=e.childNodes.length-1;n>=0;n--){const s=e.childNodes[n];if(s.nodeType!==Node.TEXT_NODE)continue;const i=s,c=wI(i.textContent??"",t,(f,h)=>xI(i,h,f)),u=c[c.length-1];if(u)return{node:i,...u}}return null}function xI(e,t,n){if(n>0)return m1(t[n-1]);const s=e.previousSibling;if(!s||No(s))return!0;if(s.nodeType===Node.TEXT_NODE){const i=s.textContent??"";return!i.length||m1(i[i.length-1]??"")}return!0}function wI(e,t,n){const s=[];for(let i=0;i<e.length;i++){if(e[i]!=="#"||!n(i,e))continue;let c=i+1;for(;c<e.length&&/[0-9A-Fa-f]/.test(e[c]??"");)c++;const u=e.slice(i,c),f=C$(u);if(!f)continue;if(c-i-1===3){const m=e[c];if(m===void 0?!t:/[0-9A-Za-z]/.test(m))continue}s.push({start:i,end:c,hex:f})}return s}function bI(e,t,n,s,i){const c=t.textContent??"",u=c.slice(0,n),f=c.slice(s),h=typeof window>"u"?null:window.getSelection();let m=null;h&&h.rangeCount>0&&h.getRangeAt(0).startContainer===t&&(m=h.getRangeAt(0).startOffset);const g=t.parentNode;if(g&&(t.textContent=f.length?f:" ",g.insertBefore(i,t),u&&g.insertBefore(document.createTextNode(u),i),m!=null)){if(m<=n){const v=i.previousSibling;(v==null?void 0:v.nodeType)===Node.TEXT_NODE&&Ir(e,v,Math.min(m,(v.textContent??"").length));return}if(m<=s||!f.length){Ir(e,t,t.length);return}Ir(e,t,Math.min(m-s,t.length))}}function yp(e){if(!e||!/^#[0-9a-f]{6}$/i.test(e))return;const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,s=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,s),c=Math.min(t,n,s),u=i-c;if(u<.02)return;let f;return i===t?f=((n-s)/u+(n<s?6:0))*60%360:i===n?f=((s-t)/u+2)*60:f=((t-n)/u+4)*60,`hsl(${Math.round(f)} 55% 55%)`}function EI(){const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","9"),t.setAttribute("height","9"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2.4");const n=document.createElementNS(e,"path");return n.setAttribute("d","m6 6 12 12M18 6 6 18"),t.appendChild(n),t}const t9=320,jh=320,CI=280,Mo=8,Ao=12,SI=8,Dg=80,jI=120,n9=48;function kI(e,t){return!(!e||e.top===0&&e.left===0&&e.right===0&&e.bottom===0||e.bottom<0||e.top>t.height||e.right-e.left>n9)}function NI(e){return{top:e.top,bottom:Math.min(e.bottom,e.top+22),left:e.left,right:e.left+2}}function r9(e,t,n,s){return Math.min(Math.max(e,s),Math.max(s,n.width-t-s))}function kh(e,t,n,s){const i=n?SI:Ao,c=n?Math.max(0,e.right-e.left):Math.min(t9,t.width-i*2),u=n?e.left:r9(e.left,c,t,i),f=n?Math.min(CI,Math.floor(t.height*.4)):jh,h=Math.min(f,s??f),m=e.top-Mo-i,g=Math.max(0,Math.min(h,m)),v=Math.max(i,e.top-Mo-g);return{left:u,top:v,width:c,maxHeight:g,side:"above",shell:"dock"}}function $g(e,t,n,s){const i=Math.min(t9,n.width-Ao*2),c=r9(e.left,i,n,Ao),u=e.top-Mo-Ao,f=n.height-e.bottom-Mo-Ao,h=u>=jI||u>=f?"above":"below",m=Math.min(jh,s??jh),g=h==="above"?u:f,v=Math.min(m,s==null?Math.max(Dg,g):g);if(h==="above"){const w=Math.max(Ao,e.top-Mo-Math.min(m,u)),E=Math.min(m,e.top-Mo-w);return s==null&&E<Dg?kh(t,n,!1):{left:c,top:w,width:i,maxHeight:E,side:h,shell:"caret"}}const y=e.bottom+Mo;return y+Math.min(v,f)>n.height-Ao?kh(t,n,!1,s):{left:c,top:y,width:i,maxHeight:Math.min(m,f),side:h,shell:"caret"}}function AI(e,t,n,s={}){if(s.phone)return kh(t,n,!0,s.height);const i=s.line??t;if(kI(e,n)&&e)return $g(e,t,n,s.height);const c=e&&e.right-e.left>n9?e:i;return $g(NI(c),t,n,s.height)}function MI({anchor:e,composer:t,line:n,query:s,options:i,sigil:c,onActiveId:u,onClose:f}){const h=lo(bi),[m,g]=r.useState(0),[v,y]=r.useState(null),w=r.useRef(null),E=`${s}\0${i.length}`,C=r.useRef({key:""});r.useEffect(()=>{g(0)},[s]),r.useEffect(()=>{g(j=>Math.min(j,Math.max(0,i.length-1)))},[i.length]);const b=r.useCallback(j=>{const A=e9()??(e==null?void 0:e.getBoundingClientRect())??null,M=t==null?void 0:t.getBoundingClientRect();if(!M)return null;const T=(n==null?void 0:n.getBoundingClientRect())??null,D=window.visualViewport;return AI(A,M,{width:(D==null?void 0:D.width)??window.innerWidth,height:(D==null?void 0:D.height)??window.innerHeight},{phone:h,line:T,height:j})},[e,t,n,h]);r.useLayoutEffect(()=>{var A,M;C.current.key!==E&&(C.current={key:E});const j=()=>y(b(C.current.height));j();const k=requestAnimationFrame(j);return window.addEventListener("resize",j),window.addEventListener("scroll",j,!0),(A=window.visualViewport)==null||A.addEventListener("resize",j),(M=window.visualViewport)==null||M.addEventListener("scroll",j),()=>{var T,D;cancelAnimationFrame(k),window.removeEventListener("resize",j),window.removeEventListener("scroll",j,!0),(T=window.visualViewport)==null||T.removeEventListener("resize",j),(D=window.visualViewport)==null||D.removeEventListener("scroll",j)}},[e,t,n,h,E,b]),r.useLayoutEffect(()=>{if((v==null?void 0:v.side)!=="above"||!w.current)return;const j=w.current.offsetHeight;if(!(j>0&&j<v.maxHeight))return;C.current={key:E,height:j};const k=b(j);!k||k.top===v.top&&k.maxHeight===v.maxHeight||y(k)},[v,E,b]),r.useLayoutEffect(()=>{const j=k=>{k.isComposing||k.keyCode===229||(k.key==="ArrowDown"?(k.preventDefault(),g(A=>Math.min(i.length-1,A+1))):k.key==="ArrowUp"?(k.preventDefault(),g(A=>Math.max(0,A-1))):(k.key==="Enter"||k.key==="Tab")&&i[m]?(k.preventDefault(),i[m].run()):k.key==="Escape"&&(k.preventDefault(),f()))};return window.addEventListener("keydown",j,!0),()=>window.removeEventListener("keydown",j,!0)},[i,m,f]),r.useEffect(()=>{var j,k;(k=(j=w.current)==null?void 0:j.querySelector('[data-active="true"]'))==null||k.scrollIntoView({block:"nearest"})},[m]);const N=i[m]?`${G0}-opt-${m}`:null;return r.useEffect(()=>(u==null||u(N),()=>u==null?void 0:u(null)),[N,u]),r.useEffect(()=>{const j=k=>{k.target.closest(".sc-cmd")||(Sh(k),f())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[f]),v?na.createPortal(o.jsx("div",{className:"sc-cmd",id:G0,"data-shell":v.shell,style:{left:v.left,top:v.top,width:v.width,maxHeight:v.maxHeight},ref:w,role:"listbox","aria-label":Pg(c),children:i.length?i.map((j,k)=>{var M;const A=k===0||j.group!==((M=i[k-1])==null?void 0:M.group);return o.jsxs("div",{children:[A&&o.jsx("div",{className:"sc-cmd-group",children:j.group}),o.jsxs("button",{type:"button",id:`${G0}-opt-${k}`,className:"sc-cmd-row",role:"option","aria-selected":k===m,"data-active":k===m,onMouseEnter:()=>g(k),onMouseDown:T=>Sh(T),onClick:()=>j.run(),children:[j.thumb?o.jsx("img",{src:j.thumb,alt:""}):j.swatch?o.jsx("span",{className:"sc-cmd-swatch",style:{background:j.swatch}}):null,o.jsx(RI,{text:j.label,query:s}),j.hint&&o.jsx("span",{className:"sc-cmd-hint",children:j.hint})]})]},j.key)}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-cmd-group",children:Pg(c)}),o.jsx("div",{className:"sc-cmd-empty",children:XF(c)})]})}),document.body):null}function RI({text:e,query:t}){return o.jsx("span",{className:"sc-cmd-label",children:eI(e,t).map(n=>n.hit?o.jsx("b",{children:n.text},`h:${n.text}`):o.jsx("span",{children:n.text},`t:${n.text}`))})}const PI=440,LI=460,M0=8,jo=12,TI=200,HI=240;function a9(e,t,n){if(e.bottom<0||e.top>t.height)return null;const s=Math.min((n==null?void 0:n.width)??PI,t.width-jo*2),i=e.top-M0-jo,c=t.height-e.bottom-M0-jo,u=i>=HI||i>=c?"above":"below",h=Math.max(TI,Math.min(LI,u==="above"?i:c)),m=Math.min(Math.max(e.left,jo),Math.max(jo,t.width-s-jo)),g=u==="above"?Math.max(jo,e.top-M0-h):e.bottom+M0;return{left:m,top:g,width:s,maxHeight:h,side:u}}const DI={fragrance:["Fragrance"],footwear:["Footwear"],apparel:["Apparel"],furniture:["Furniture","Home"],beauty:["Beauty"],electronics:["Electronics"],accessories:["Accessories"],beverage:["Food & drink"],jewelry:["Jewelry"],food:["Food & drink"]},$I={fragrance:["Fragrance"],footwear:["Footwear","Apparel"],apparel:["Apparel"],furniture:["Furniture","Home"],beauty:["Beauty"],electronics:["Electronics"],accessories:["Accessories"],beverage:["Food & drink"],jewelry:["Jewelry"],food:["Food & drink"]};function FI(e,t){if(!t)return!1;const n=DI[t];return!!n&&n.some(s=>e.verticals.includes(s))}function II(e,t){if(!t)return!1;const n=$I[t];return!!n&&n.some(s=>e.suitableCategories.includes(s))}function Fg(e){return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}const _I=4;function xa(e,t){const n=Fg(t).trim().split(/\s+/).filter(Boolean);if(!n.length)return!0;const s=Fg(e);return n.every(i=>s.includes(i)||i.length>=_I&&i.endsWith("s")&&s.includes(i.slice(0,-1)))}function s9(e){return e<2?"none":"tabs"}function o9(e,t){return{visible:e.slice(0,t),remaining:Math.max(0,e.length-t)}}function l9(e,t){return[...e].sort((n,s)=>Number(t(s))-Number(t(n)))}const lu={product:"product",presenter:"presenter",scene:"scene"},hc=48;function OI(e){return e?e.t==="product"?"product":e.t==="character"?"presenter":e.t==="template"?"scene":null:null}function R0(e){const t=OI(e);return t||((e==null?void 0:e.t)==="color"?"color":null)}const wc=e=>{const t=(e??"").trim();return t||void 0},Ig=e=>(e==null?void 0:e.custom)===!0;function zl(e,t){return e==="product"?[...(t.libraryProducts.length?t.libraryProducts:t.brandProducts).map(s=>{var i,c;return _g(s,"brand",_n((c=(i=s.shots)==null?void 0:i[0])==null?void 0:c.file))}),...t.demoProducts.map(s=>_g(s,"catalog",s.previewUrl??null))]:e==="presenter"?[...t.presenters.map(n=>({kind:"presenter",id:n.id,label:n.name,full:[n.name,wc(n.descriptor)].filter(Boolean).join(" · "),sub:wc(n.descriptor),search:f1(n),thumb:n.avatarUrl??n.previewUrl??null,crop:n.avatarUrl?void 0:"top",source:Ig(n)?"brand":"catalog",recommended:II(n,t.productCategory),token:{t:"character",id:n.id}})),...t.cast.map(n=>{var s,i;return{kind:"presenter",id:n.id,label:n.name,full:n.name,search:n.name,thumb:_n((i=(s=n.shots)==null?void 0:s[0])==null?void 0:i.file),crop:"top",source:"brand",token:{t:"character",id:n.id}}})]:t.scenes.map(n=>({kind:"scene",id:n.id,label:to(n,"card"),full:to(n,"tooltip"),sub:wc(n.lighting),search:d1(n),thumb:n.previewUrl??null,tint:yp(n.previewColor),source:Ig(n)?"brand":"catalog",recommended:FI(n,t.productCategory),token:{t:"template",id:n.id}}))}function _g(e,t,n){return{kind:"product",id:e.id,label:Oa(e,"chip"),full:Oa(e,"tooltip"),sub:ZI(e),search:mp(e),thumb:n,source:t,token:{t:"product",id:e.id}}}function ZI(e){const t=e;return wc(t.brand)??wc(t.vendor)}function bc(e,t){const n=t.trim();return n?e.filter(s=>xa(s.search,n)):e}function Og(e,t,n){return t.source==="brand"?0:e==="scene"?n.has(t.id)?1:t.recommended?2:3:e==="presenter"?t.recommended?1:2:1}function ad(e,t,n){const s=n.currentId?t.find(m=>m.id===n.currentId)??null:null,i=s?t.filter(m=>m.id!==s.id):t,u=[...bc(i,n.query)].sort((m,g)=>Og(e,m,n.bookmarked)-Og(e,g,n.bookmarked)).map(m=>n.bookmarked.has(m.id)?{...m,bookmarked:!0}:m),{visible:f,remaining:h}=o9(u,n.shown??hc);return{current:s,items:f,remaining:h,total:u.length}}const VI={$:"product","/":"scene","@":"presenter"},Zg=40,Vg={Products:8,Presenters:8,Colors:16,Scenes:8},zI={$:"Products","/":"Scenes","@":"Presenters","#":"Colors"};function i9(e){return{key:`${e.kind}:${e.id}`,group:e.kind==="presenter"?"Presenters":e.kind==="scene"?"Scenes":"Products",label:e.label,hint:e.sub,search:e.search,thumb:e.thumb??void 0,token:e.token}}function BI(e,t,n,s){return ad(e,t,{currentId:null,query:"",bookmarked:n,shown:s}).items.map(i9)}function UI(e,t,n={query:""}){const s=n.query.trim(),i=n.bookmarked??new Set;if(e==="#"){const f=(t.colors??[]).map(WI);return s?f.filter(h=>xa(h.search??h.label,s)).slice(0,Zg):f.slice(0,Vg.Colors)}const c=VI[e],u=c==="product"?t.products:c==="presenter"?t.presenters:t.scenes??[];return s?bc(u,s).map(i9).slice(0,Zg):BI(c,u,i,Vg[zI[e]])}function WI(e){return{key:`color:${e.hex}`,group:"Colors",label:e.name,hint:e.hex,search:`${e.name} ${e.hex}`,swatch:e.hex,token:{t:"color",hex:e.hex,name:e.name||void 0}}}const GI="(pointer: coarse)";function KI(e){return lo(bi)?o.jsx(JI,{...e}):o.jsx(QI,{...e})}function YI(){return!lo(GI)}const qI=e=>`Remove ${lu[e]}`;function XI(e,t,n){const s={slug:t};return e==="product"?Js(s,n):e==="presenter"?al(s,n):rl(s,n)}function c9({kind:e,currentId:t,candidates:n,brandId:s,brandSlug:i,warning:c,onPick:u,onRemove:f,onClose:h,onAttachRequest:m,autoFocusSearch:g}){const[v,y]=r.useState(""),[w,E]=r.useState(hc),C=r.useRef(null),b=r.useRef(null),[N,j]=r.useState(0),k=r.useMemo(()=>e==="scene"?new Set(Za(s)):new Set,[e,s]);r.useEffect(()=>{E(hc),j(0)},[v]);const A=r.useMemo(()=>ad(e,n,{currentId:t,query:v,bookmarked:k,shown:w}),[e,n,t,v,k,w]);r.useLayoutEffect(()=>{var I;g&&((I=C.current)==null||I.focus({preventScroll:!0}))},[g]),r.useEffect(()=>{j(I=>Math.max(0,Math.min(I,A.items.length-1)))},[A.items.length]);const M=r.useCallback(I=>{var U;const se=(U=b.current)==null?void 0:U.querySelectorAll("[data-nav]")[I];se&&(j(I),se.focus({preventScroll:!0}),se.scrollIntoView({block:"nearest"}))},[]),T=r.useCallback(()=>{const I=b.current;return I?Math.max(1,getComputedStyle(I).gridTemplateColumns.split(" ").filter(Boolean).length):1},[]),D=I=>{var O;if(I.key==="Escape"){I.preventDefault(),I.stopPropagation(),h("escape");return}const se=I.target===C.current;if(se&&I.key==="ArrowDown"){I.preventDefault(),M(0);return}if(se&&I.key==="Enter"){I.preventDefault(),A.items[0]&&u(A.items[0]);return}if(se)return;const U=T(),te=I.key==="ArrowRight"?1:I.key==="ArrowLeft"?-1:I.key==="ArrowDown"?U:I.key==="ArrowUp"?-U:0;if(te){I.preventDefault();const ne=N+te;ne<0&&te===-U?(O=C.current)==null||O.focus():ne>=0&&ne<A.items.length&&M(ne);return}I.key==="Home"?(I.preventDefault(),M(0)):I.key==="End"&&(I.preventDefault(),M(A.items.length-1))},L=lu[e],Y=e==="product";return o.jsxs("div",{className:"sc-swap-inner",onKeyDown:D,children:[o.jsx("div",{className:"sc-swap-head",children:o.jsxs("span",{className:"sc-swap-search",children:[o.jsx(Tc,{size:13}),o.jsx("input",{ref:C,type:"text",value:v,onChange:I=>y(I.target.value),placeholder:`Search ${L}s`,"aria-label":`Search ${L}s`,autoComplete:"off",spellCheck:!1})]})}),A.current&&o.jsxs("div",{className:"sc-swap-cur",title:A.current.full,children:[o.jsx(zg,{src:A.current.thumb,tinted:!!A.current.tint}),o.jsxs("span",{className:"sc-swap-curtext",children:[o.jsx("b",{dir:"auto",children:A.current.label}),A.current.sub&&o.jsx("span",{dir:"auto",children:A.current.sub})]}),o.jsx("a",{className:"sc-swap-open",href:XI(e,i,A.current.id),target:"_blank",rel:"noreferrer",title:`Open this ${L} in a new tab`,"aria-label":`Open ${A.current.label} in a new tab`,children:o.jsx(W1,{size:14})}),o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(_a,{size:11,weight:"bold"})})]}),o.jsxs("div",{className:"sc-swap-body",children:[A.items.length===0&&o.jsx("p",{className:"sc-swap-empty",children:v.trim()?`Nothing matches “${v.trim()}”.`:`No other ${L}s.`}),o.jsx("div",{className:"sc-swap-grid",ref:b,role:"listbox","aria-label":`Choose a ${L}`,children:A.items.map((I,se)=>o.jsxs("div",{className:"sc-swap-card",role:"option","aria-selected":!1,"data-nav":se,tabIndex:se===N?0:-1,title:I.full,style:I.tint?{"--tint":I.tint}:void 0,onFocus:()=>j(se),onClick:()=>u(I),onKeyDown:U=>{U.key!=="Enter"&&U.key!==" "||(U.preventDefault(),u(I))},children:[o.jsx(zg,{src:I.thumb,tinted:!!I.tint}),o.jsxs("b",{dir:"auto",children:[I.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(G1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),I.label]}),Y&&I.sub&&o.jsx("span",{dir:"auto",children:I.sub})]},I.id))}),A.remaining>0&&o.jsxs("button",{type:"button",className:"sc-swap-more",onClick:()=>E(I=>I+hc),children:["Show ",Math.min(hc,A.remaining)," more of ",A.total]})]}),o.jsxs("div",{className:"sc-swap-foot",children:[t&&!A.current&&o.jsxs("p",{className:"sc-swap-warn",children:["This ",L," is no longer available."]}),c&&o.jsx("p",{className:"sc-swap-warn",children:c}),c&&m&&e==="scene"&&o.jsxs("div",{className:"sc-swap-attach",children:[c.includes("product")&&o.jsx("button",{type:"button",className:"sc-btn",onClick:()=>m("Products"),children:"Attach a product"}),c.includes("person")&&o.jsx("button",{type:"button",className:"sc-btn",onClick:()=>m("Presenters"),children:"Attach a presenter"})]}),o.jsxs("button",{type:"button",className:"sc-swap-remove",onClick:f,children:[o.jsx(qx,{size:13}),qI(e)]})]})]})}function zg({src:e,tinted:t}){const[n,s]=r.useState(!1);return r.useEffect(()=>s(!1),[e]),!e||n?o.jsx("span",{className:"sc-swap-thumb sc-swap-thumb-empty",children:o.jsx(Wa,{size:18})}):o.jsx("img",{className:"sc-swap-thumb","data-tinted":t||void 0,src:e,alt:"",loading:"lazy",onError:()=>s(!0)})}function QI(e){const{anchor:t,kind:n,onClose:s}=e,i=YI(),[c,u]=r.useState(null),f=r.useRef(null);return r.useLayoutEffect(()=>{var m,g;const h=()=>{const v=window.visualViewport,y=a9(t.getBoundingClientRect(),{width:(v==null?void 0:v.width)??window.innerWidth,height:(v==null?void 0:v.height)??window.innerHeight});if(!y){s("outside");return}u(y)};return h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),(m=window.visualViewport)==null||m.addEventListener("resize",h),(g=window.visualViewport)==null||g.addEventListener("scroll",h),()=>{var v,y;window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0),(v=window.visualViewport)==null||v.removeEventListener("resize",h),(y=window.visualViewport)==null||y.removeEventListener("scroll",h)}},[t,s]),r.useEffect(()=>{const h=m=>{var v,y;const g=m.target;(v=f.current)!=null&&v.contains(g)||(y=g.closest)!=null&&y.call(g,".sc-token")||s("outside")};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s]),c?na.createPortal(o.jsx("div",{ref:f,className:"sc-swap","data-kind":n,"data-side":c.side,role:"dialog","aria-label":`Change ${lu[n]}`,style:{left:c.left,top:c.top,width:c.width,maxHeight:c.maxHeight},children:o.jsx(c9,{...e,autoFocusSearch:i})}),document.body):null}function JI(e){const{kind:t,onClose:n}=e,{sheet:s,grip:i}=au(()=>n("dismiss"));return o.jsx(ui,{open:!0,onOpenChange:c=>!c&&n("dismiss"),children:o.jsxs(di,{children:[o.jsx(fi,{className:"sc-shotsheet-scrim"}),o.jsxs(hi,{ref:s,className:"sc-shotsheet sc-swapsheet","data-kind":t,"aria-describedby":void 0,onOpenAutoFocus:c=>{var u;c.preventDefault(),(u=s.current)==null||u.focus({preventScroll:!0})},onCloseAutoFocus:c=>c.preventDefault(),onEscapeKeyDown:c=>{c.preventDefault(),n("escape")},children:[o.jsxs("div",{className:"sc-shotsheet-grip",...i,children:[o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0}),o.jsxs(mi,{className:"sc-vh",children:["Change ",lu[t]]})]}),o.jsx(c9,{...e,autoFocusSearch:!1})]})]})})}const e_=260;function t_(e){return lo(bi)?o.jsx(r_,{...e}):o.jsx(n_,{...e})}function Dl(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function u9({currentHex:e,currentName:t,palette:n,onPick:s,onRemove:i,onClose:c}){const u=r.useMemo(()=>{const b=new Set,N=[],j=A=>{const M=fn(A.hex);!M||b.has(M)||(b.add(M),N.push({...A,hex:M}))},k=e?fn(e):null;k&&!n.some(A=>Dl(A.hex,k))&&j({hex:k,name:t||k,slot:"accent"});for(const A of n)j(A);return N},[n,e,t]),f=r.useRef(null),[h,m]=r.useState(()=>Math.max(0,u.findIndex(b=>Dl(b.hex,e))));r.useEffect(()=>{m(b=>Math.max(0,Math.min(b,Math.max(0,u.length-1))))},[u.length]),r.useLayoutEffect(()=>{var N,j;const b=Math.max(0,u.findIndex(k=>Dl(k.hex,e)));(j=(N=f.current)==null?void 0:N.querySelectorAll("[data-nav]")[b])==null||j.focus({preventScroll:!0})},[]);const g=r.useCallback(b=>{var j;const N=(j=f.current)==null?void 0:j.querySelectorAll("[data-nav]")[b];N&&(m(b),N.focus({preventScroll:!0}))},[]),v=b=>{if(b.key==="Escape"){b.preventDefault(),b.stopPropagation(),c("escape");return}if(b.key==="ArrowDown"||b.key==="ArrowUp"){b.preventDefault();const N=h+(b.key==="ArrowDown"?1:-1);N>=0&&N<u.length&&g(N)}},y=b=>s({t:"color",hex:b.hex,name:b.name||void 0}),w=(b,N)=>{const j=u.find(k=>Dl(k.hex,b));s({t:"color",hex:b,name:(j==null?void 0:j.name)||void 0},{live:!0})},E=e?fn(e):null,C=!!E&&!n.some(b=>Dl(b.hex,E));return o.jsxs("div",{className:"sc-swap-inner",onKeyDown:v,children:[o.jsx("div",{className:"sc-swap-body",children:u.length===0?o.jsx("p",{className:"sc-swap-empty",children:"No brand colours yet."}):o.jsx("div",{className:"sc-swap-swatches",ref:f,role:"listbox","aria-label":"Choose a colour",children:u.map((b,N)=>{const j=Dl(b.hex,e),k=o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-swap-dot",style:{background:b.hex},"aria-hidden":!0}),o.jsx("b",{dir:"auto",children:b.name}),o.jsx("span",{children:b.hex}),j&&o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(_a,{size:11,weight:"bold"})})]});return C&&j?o.jsx(c1,{className:"sc-swap-swatch",triggerStyle:{background:"none"},value:b.hex,presets:n.map(A=>A.hex),commitMode:"live",align:"start",label:`Edit ${b.name}`,triggerProps:{role:"option","aria-selected":!0,"data-on":"","data-nav":N,tabIndex:N===h?0:-1,title:`${b.name} ${b.hex}`,onFocus:()=>m(N)},onChange:A=>w(A),children:k},"current-custom"):o.jsx("div",{className:"sc-swap-swatch",role:"option","aria-selected":j,"data-on":j||void 0,"data-nav":N,tabIndex:N===h?0:-1,title:`${b.name} ${b.hex}`,onFocus:()=>m(N),onClick:()=>y(b),onKeyDown:A=>{A.key!=="Enter"&&A.key!==" "||(A.preventDefault(),y(b))},children:k},b.hex)})})}),o.jsxs("div",{className:"sc-swap-foot",children:[o.jsxs(c1,{className:"sc-swap-swatch sc-swap-custom",triggerStyle:{background:"none"},value:e??fp(n),presets:n.map(b=>b.hex),commitMode:"live",align:"start",label:"Custom colour",onChange:b=>w(b),children:[o.jsx(tr,{size:12}),o.jsx("b",{children:"Custom colour"})]}),o.jsxs("button",{type:"button",className:"sc-swap-remove",onClick:i,children:[o.jsx(qx,{size:13}),"Remove colour"]})]})]})}function n_(e){const{anchor:t,onClose:n}=e,[s,i]=r.useState(null),c=r.useRef(null);return r.useLayoutEffect(()=>{var f,h;const u=()=>{const m=window.visualViewport,g=a9(t.getBoundingClientRect(),{width:(m==null?void 0:m.width)??window.innerWidth,height:(m==null?void 0:m.height)??window.innerHeight},{width:e_});if(!g){n("outside");return}i(g)};return u(),window.addEventListener("resize",u),window.addEventListener("scroll",u,!0),(f=window.visualViewport)==null||f.addEventListener("resize",u),(h=window.visualViewport)==null||h.addEventListener("scroll",u),()=>{var m,g;window.removeEventListener("resize",u),window.removeEventListener("scroll",u,!0),(m=window.visualViewport)==null||m.removeEventListener("resize",u),(g=window.visualViewport)==null||g.removeEventListener("scroll",u)}},[t,n]),r.useEffect(()=>{const u=f=>{var m,g,v;const h=f.target;(m=c.current)!=null&&m.contains(h)||(g=h.closest)!=null&&g.call(h,".sc-token")||(v=h.closest)!=null&&v.call(h,".sc-cp")||n("outside")};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[n]),s?na.createPortal(o.jsx("div",{ref:c,className:"sc-swap","data-kind":"color","data-side":s.side,role:"dialog","aria-label":"Change colour",style:{left:s.left,top:s.top,width:s.width,maxHeight:s.maxHeight},children:o.jsx(u9,{...e})}),document.body):null}function r_(e){const{onClose:t}=e,{sheet:n,grip:s}=au(()=>t("dismiss"));return o.jsx(ui,{open:!0,onOpenChange:i=>!i&&t("dismiss"),children:o.jsxs(di,{children:[o.jsx(fi,{className:"sc-shotsheet-scrim"}),o.jsxs(hi,{ref:n,className:"sc-shotsheet sc-swapsheet","data-kind":"color","aria-describedby":void 0,onOpenAutoFocus:i=>{var c;i.preventDefault(),(c=n.current)==null||c.focus({preventScroll:!0})},onCloseAutoFocus:i=>i.preventDefault(),onEscapeKeyDown:i=>{i.preventDefault(),t("escape")},children:[o.jsxs("div",{className:"sc-shotsheet-grip",...s,children:[o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0}),o.jsx(mi,{className:"sc-vh",children:"Change colour"})]}),o.jsx(u9,{...e})]})]})})}function iu(e){const{brand:t,products:n}=It(),{scenes:s,presenters:i,demoProducts:c}=pn(),u=r.useMemo(()=>hg(su(t),s),[t,s]),f=r.useMemo(()=>hg(J1(t),i),[t,i]),h=r.useMemo(()=>{var g;return(((g=t==null?void 0:t.json)==null?void 0:g.characters)??[]).filter(v=>(v==null?void 0:v.origin)!=="custom")},[t]),m=r.useMemo(()=>{var g;return((g=t==null?void 0:t.json)==null?void 0:g.products)??[]},[t]);return r.useMemo(()=>({libraryProducts:n,brandProducts:m,demoProducts:c,presenters:f,cast:h,scenes:u,productCategory:e??null}),[n,m,c,f,h,u,e])}const _r=[{id:"square",label:"Square",hint:"1:1",w:1024,h:1024},{id:"portrait",label:"Portrait",hint:"4:5",w:1024,h:1280},{id:"story",label:"Story",hint:"9:16",w:1080,h:1920},{id:"landscape",label:"Landscape",hint:"16:9",w:1600,h:900}],P0=6,a_=r.forwardRef(function({initialTokens:t,onChange:n,brand:s,templates:i,presenters:c,demoProducts:u,onTemplatePick:f,placeholder:h,placeholderSm:m,flag:g,activeProductCategory:v,onAttachRequest:y,onSubmit:w,onDropFiles:E},C){var Zt,tt,qe,Ut,Vt;const b=r.useRef(null),N=r.useRef(0),j=r.useRef(null),[k,A]=r.useState(null),[M,T]=r.useState(null),D=r.useRef(M);r.useEffect(()=>{D.current=M},[M]);const[L,Y]=r.useState(""),[I,se]=r.useState(null),U=r.useRef(!1),te=r.useRef(0),[O,ne]=r.useState(!1),Q=r.useRef(0),{products:H}=It(),K=H.length?H:((Zt=s.json)==null?void 0:Zt.products)??[],X=((tt=s.json)==null?void 0:tt.characters)??[],W=r.useMemo(()=>Rw(s.json),[s]),P=r.useCallback((z,ue)=>{var Sn,Ct,Mr,pr;const xe=document.createElement("span");xe.className=ha,xe.contentEditable="false",xe.dataset.kind=z.t,xe.dataset.tok=Qw(z),xe.dataset.uid=ue??`u${te.current++}`;let Me="",Ke=null,it=null;if(z.t==="template"){const ct=i.find(en=>en.id===z.id);Me=ct?to(ct,"chip"):"missing template",Ke=(ct==null?void 0:ct.previewUrl)??null;const St=yp(ct==null?void 0:ct.previewColor);St&&(xe.dataset.tinted="true",xe.style.setProperty("--tint",St))}else if(z.t==="product"){const ct=K.find(zt=>zt.id===z.id),St=ct?null:u.find(zt=>zt.id===z.id),en=ct??St;Me=en?Oa(en,"chip"):"missing product",Ke=ct?_n((Ct=(Sn=ct.shots)==null?void 0:Sn[0])==null?void 0:Ct.file):(St==null?void 0:St.previewUrl)??null}else if(z.t==="character"){const ct=X.find(en=>en.id===z.id),St=ct?null:c.find(en=>en.id===z.id);Me=(ct==null?void 0:ct.name)??(St==null?void 0:St.name)??"missing person",Ke=ct?_n((pr=(Mr=ct.shots)==null?void 0:Mr[0])==null?void 0:pr.file):(St==null?void 0:St.avatarUrl)??(St==null?void 0:St.previewUrl)??null}else if(z.t==="color")Me=z.name??z.hex,it=z.hex;else if(z.t==="ref")Me="reference",Ke=rn(z.imageHash);else if(z.t==="mark"){const ct=W.find(St=>St.hash===z.imageHash);Me=ct?Pw(s.json,ct):"missing mark",Ke=rn(z.imageHash)}if(Ke){const ct=document.createElement("img");ct.src=Ke,ct.alt="",xe.appendChild(ct)}else if(it){const ct=document.createElement("span");ct.className="sc-token-swatch",ct.style.background=it,xe.appendChild(ct)}xe.appendChild(document.createTextNode(Me));const _t=(g==null?void 0:g(z))??null;_t&&(xe.title=_t,xe.dataset.warn="1");const Nt=R0(z);if(Nt){const ct=Nt==="color"?"colour":lu[Nt];xe.tabIndex=0,xe.setAttribute("role","button"),xe.setAttribute("aria-haspopup","dialog"),xe.setAttribute("aria-expanded","false"),xe.setAttribute("aria-label",`${ct}: ${Me}. Change or remove.`)}const bt=document.createElement("button");return bt.type="button",bt.tabIndex=-1,bt.setAttribute("aria-label",`Remove ${Me}`),bt.dataset.role="remove",bt.appendChild(EI()),xe.appendChild(bt),xe},[i,K,X,c,u,W,s,g]),Z=r.useCallback(()=>{const z=b.current;z&&(N.current=z.querySelectorAll(`.${ha}`).length,n(Lg(z)))},[n]);r.useEffect(()=>{const z=b.current;z&&(Tg(z,t!=null&&t.length?t:as(),ue=>P(ue)),N.current=z.querySelectorAll(`.${ha}`).length,fc(z))},[]),r.useEffect(()=>{const z=b.current;if(z)for(const ue of z.querySelectorAll(`.${ha}`)){const xe=zs(ue.dataset.tok??"");if(!xe)continue;const Me=(g==null?void 0:g(xe))??null;Me?(ue.title=Me,ue.dataset.warn="1"):(ue.removeAttribute("title"),delete ue.dataset.warn)}},[g]),r.useEffect(()=>{const z=()=>{const ue=K0(b.current);ue!==null&&(j.current=ue)};return document.addEventListener("selectionchange",z),()=>document.removeEventListener("selectionchange",z)},[]);const ae=r.useCallback(z=>{const ue=b.current;if(ue){if(z.t==="template"){const xe=S2(ue);if(xe){xe.replaceWith(P(z,xe.dataset.uid)),Bs(ue),Z(),A(null),Y("");return}}iI(ue,P(z),{eatQuery:!!k,fallbackUnits:j.current}),Z(),A(null),Y("")}},[k,P,Z]),G=r.useRef(ae);r.useEffect(()=>{G.current=ae},[ae]);const fe=r.useCallback((z,ue)=>{const xe=b.current,Me=xe==null?void 0:xe.querySelector(`[data-uid="${CSS.escape(z)}"]`);return!xe||!Me?!1:(Me.replaceWith(P(ue,z)),Bs(xe),Z(),!0)},[P,Z]),le=r.useCallback(z=>{const ue=b.current,xe=ue==null?void 0:ue.querySelector(`[data-uid="${CSS.escape(z)}"]`);if(!ue||!xe)return null;const Me=Ch(ue,xe);return E2(ue,xe),Z(),Me},[Z]),me=r.useCallback((z,ue,xe,Me)=>{const Ke=z.dataset.uid;Ke&&(z.dataset.open="",z.setAttribute("aria-expanded","true"),A(null),Y(""),T({uid:Ke,kind:ue,anchor:z,caret:xe,touch:Me}))},[]),J=r.useCallback((z,ue)=>{const xe=D.current;if(D.current=null,T(null),!xe)return;const Me=b.current,Ke=Me==null?void 0:Me.querySelector(`[data-uid="${CSS.escape(xe.uid)}"]`);Ke&&(delete Ke.dataset.open,Ke.setAttribute("aria-expanded","false"));const it=ue!==void 0?ue:xe.caret;if(xe.touch){it!=null&&(j.current=it);return}Me&&(Me.focus({preventScroll:!0}),it!=null?Yl(Me,it):dc(Me))},[]);r.useEffect(()=>{if(!M)return;const z=b.current;z!=null&&z.querySelector(`[data-uid="${CSS.escape(M.uid)}"]`)||J("outside")},[M,J]),r.useImperativeHandle(C,()=>({insert:z=>G.current(z),setTokens:z=>{const ue=b.current;ue&&(Tg(ue,z.length?z:as(),xe=>P(xe)),N.current=ue.querySelectorAll(`.${ha}`).length,fc(ue),n(Lg(ue)))},removeTemplate:()=>{const z=b.current,ue=z?S2(z):null;!z||!ue||(E2(z,ue),Z())},openMenu:z=>{Y(""),A({anchor:z})},focus:()=>dc(b.current)}));const ge=iu(v),He=r.useCallback(z=>zl(z,ge),[ge]),Qe=r.useMemo(()=>new Set(Za(s.id)),[s.id]),ye=r.useMemo(()=>{var z;return k?UI(k.sigil??"$",{products:zl("product",ge),presenters:zl("presenter",ge),scenes:zl("scene",ge),colors:va((z=s.json)==null?void 0:z.palette)},{query:L,bookmarked:Qe}).map(ue=>({...ue,run:()=>ue.token.t==="template"?f(ue.token.id):G.current(ue.token)})):[]},[k,ge,L,Qe,f,(qe=s.json)==null?void 0:qe.palette]),ke=z=>{const ue=b.current,xe=z.target;if(xe.closest('[data-role="remove"]')){z.preventDefault();const Nt=A0(xe);M&&(Nt==null?void 0:Nt.dataset.uid)===M.uid&&J("remove"),E2(ue,Nt),Z(),A(null);return}oI(ue,z.clientX,z.clientY);const Me=A0(xe);if(!Me)return;const Ke=Me.getBoundingClientRect();if(z.clientX-Ke.left<=P0||Ke.right-z.clientX<=P0)return;const it=Me.dataset.uid??null;if(it&&(M==null?void 0:M.uid)===it){z.detail!==0&&J("outside");return}const _t=R0(zs(Me.dataset.tok??""));_t&&me(Me,_t,K0(ue),!1)},lt=z=>{if(z.pointerType==="mouse")return;const ue=z.target;if(ue.closest('[data-role="remove"]'))return;const xe=A0(ue);if(!xe)return;const Me=xe.getBoundingClientRect();if(z.clientX-Me.left<=P0||Me.right-z.clientX<=P0)return;const Ke=R0(zs(xe.dataset.tok??""));if(!Ke||xe.dataset.uid&&(M==null?void 0:M.uid)===xe.dataset.uid)return;z.preventDefault();const it=b.current,_t=document.activeElement===it,Nt=_t?K0(it):j.current;_t&&(it==null||it.blur()),me(xe,Ke,Nt,!0)},jt=z=>{const ue=b.current,xe=A0(z.target);if(xe&&!M){const Me=()=>{Eh(ue,xe,"after"),ue==null||ue.focus({preventScroll:!0})};if(z.key==="Tab"){z.preventDefault(),Eh(ue,xe,z.shiftKey?"before":"after"),ue==null||ue.focus({preventScroll:!0});return}if(z.key==="Enter"||z.key===" "){z.preventDefault();const Ke=R0(zs(xe.dataset.tok??""));Ke&&ue&&me(xe,Ke,Ch(ue,xe)+1,!1);return}if(z.key==="Backspace"||z.key==="Delete"){z.preventDefault();const Ke=xe.dataset.uid?le(xe.dataset.uid):null;ue==null||ue.focus({preventScroll:!0}),Ke!=null&&Yl(ue,Ke);return}if(z.key==="Escape"){z.preventDefault(),Me();return}}if(z.key==="Escape"&&k){z.preventDefault(),A(null),Y("");return}if(z.key==="Enter"&&!z.shiftKey){const Me=z.defaultPrevented;z.preventDefault(),QF({menuOpen:!!k,handled:Me})&&w();return}if(!(k||M)&&!qF(z)&&(z.key==="$"||z.key==="/"||z.key==="@"||z.key==="#")){const Me=b.current,Ke=Jw(Me),it=Ke.slice(-1);if(Ke.length&&!/[\s\u00a0]/.test(it))return;Y(""),A({anchor:{getBoundingClientRect:()=>e9()??(Me==null?void 0:Me.getBoundingClientRect())??new DOMRect},sigil:z.key})}},Pt=r.useCallback(z=>{var ue,xe;return(xe=va((ue=s.json)==null?void 0:ue.palette).find(Me=>Me.hex===z))==null?void 0:xe.name},[(Ut=s.json)==null?void 0:Ut.palette]),Ne=()=>{const z=b.current,ue=(z==null?void 0:z.querySelectorAll(`.${ha}`).length)??0;ue<N.current&&hI(z),N.current=ue,fc(z)&&dc(z);const xe=U.current;U.current=!1;const Me=j2(z,it=>P(it),{commit:xe,nameFor:Pt});Me&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ha}`).length)??0,A(null),Y(""));const Ke=Me?{open:!1}:JF(dI(z),xe);Ke.open?k&&Y(Ke.query):k&&(A(null),Y("")),Z()},Ae=z=>{const ue=window.getSelection();if(!ue||ue.rangeCount===0||ue.isCollapsed)return null;const xe=ue.getRangeAt(0),{text:Me,html:Ke}=mI(xe);return Me?(z.clipboardData.setData("text/plain",Me),z.clipboardData.setData("text/html",Ke),z.preventDefault(),xe):null},Ee=z=>{Ae(z)},at=z=>{const ue=Ae(z);ue&&(ue.deleteContents(),Bs(b.current),Z())},kt=r.useCallback(z=>z.t==="template"?i.some(ue=>ue.id===z.id):z.t==="product"?K.some(ue=>ue.id===z.id)||u.some(ue=>ue.id===z.id):z.t==="character"?X.some(ue=>ue.id===z.id)||c.some(ue=>ue.id===z.id):z.t==="mark"?W.some(ue=>ue.hash===z.imageHash):!0,[i,K,X,c,u,W]),Qt=z=>{Array.from(z.dataTransfer.types).includes("Files")&&(z.preventDefault(),Q.current++,ne(!0))},Jt=z=>z.preventDefault(),Ot=()=>{Q.current=Math.max(0,Q.current-1),Q.current===0&&ne(!1)},xn=z=>{z.preventDefault(),Q.current=0,ne(!1),z.dataTransfer.files.length&&(E==null||E(z.dataTransfer.files))},Rn=z=>{z.preventDefault(),U.current=!0;const ue=gI(z.clipboardData.getData("text/html"));if(ue&&Wn(ue)){const Me=b.current;j2(Me,Ke=>P(Ke),{commit:!0,nameFor:Pt})&&(N.current=(Me==null?void 0:Me.querySelectorAll(`.${ha}`).length)??0,Z());return}const xe=z.clipboardData.getData("text/plain");xe&&document.execCommand("insertText",!1,xe)},Wn=z=>{const ue=b.current,xe=window.getSelection();if(!ue||!xe||xe.rangeCount===0||!ue.contains(xe.getRangeAt(0).startContainer))return!1;const Me=xe.getRangeAt(0);let Ke=!1;const it=[];for(const Ct of z){if(typeof Ct!="string"&&!kt(Ct)){it.push(i_(Ct,i,K));continue}if(typeof Ct!="string"&&Ct.t==="template"){if(Ke)continue;Ke=!0}it.push(Ct)}const _t=Ke?S2(ue):null;Me.deleteContents();const Nt=document.createDocumentFragment();for(const Ct of it)Nt.appendChild(typeof Ct=="string"?document.createTextNode(Ct):P(Ct));const bt=document.createTextNode(" ");Nt.appendChild(bt),Me.insertNode(Nt),_t&&_t.remove();const Sn=l_(ue,bt);return Bs(ue),Yl(ue,Sn),Z(),!0},Pn=r.useCallback(()=>{requestAnimationFrame(()=>{const z=b.current;z&&document.activeElement===z&&fc(z)&&dc(z)})},[]);return o.jsxs("div",{className:"sc-brief","data-drag-over":O||void 0,children:[o.jsx("div",{ref:b,className:"sc-brief-line",contentEditable:!0,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-autocomplete":"list","aria-expanded":k?!0:void 0,"aria-controls":k?G0:void 0,"aria-activedescendant":k?I??void 0:void 0,tabIndex:0,dir:"auto","data-ph":h,...m?{"data-ph-sm":m}:{},onClick:ke,onPointerDown:lt,onKeyDown:jt,onInput:Ne,onCopy:Ee,onCut:at,onPaste:Rn,onDragEnter:Qt,onDragOver:Jt,onDragLeave:Ot,onDrop:xn,onFocus:Pn,onBlur:()=>{const z=b.current;j2(z,ue=>P(ue),{commit:!0,nameFor:Pt})&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ha}`).length)??0,A(null),Y("")),Z()}}),k&&o.jsx(MI,{anchor:k.anchor,composer:{getBoundingClientRect:()=>{var z,ue,xe;return((ue=(z=b.current)==null?void 0:z.closest(".sc-promptcard"))==null?void 0:ue.getBoundingClientRect())??((xe=b.current)==null?void 0:xe.getBoundingClientRect())??new DOMRect}},line:{getBoundingClientRect:()=>{var z;return((z=b.current)==null?void 0:z.getBoundingClientRect())??new DOMRect}},query:L,options:ye,sigil:k.sigil,onActiveId:se,onClose:()=>{A(null),Y("")}}),(M==null?void 0:M.kind)==="color"?o.jsx(t_,{anchor:M.anchor,currentHex:L0(M.anchor),currentName:s_(M.anchor),palette:va((Vt=s.json)==null?void 0:Vt.palette),onPick:(z,ue)=>{var Me;const xe=M.uid;if(ue!=null&&ue.live){const Ke=(Me=b.current)==null?void 0:Me.querySelector(`[data-uid="${CSS.escape(xe)}"]`);Ke&&vI(Ke,z),Z();return}if(o_(z.hex,L0(M.anchor))){J("pick");return}fe(xe,z),J("pick")},onRemove:()=>{const z=le(M.uid);J("remove",z)},onClose:J},M.uid):M?o.jsx(KI,{kind:M.kind,anchor:M.anchor,currentId:L0(M.anchor),candidates:He(M.kind),brandId:s.id,brandSlug:s.slug,warning:M.anchor.title||null,onAttachRequest:y?z=>{J("outside"),y(z)}:void 0,onPick:z=>{const ue=M.uid;if(z.id===L0(M.anchor)){J("pick");return}z.kind==="scene"?f(z.id):fe(ue,z.token),J("pick")},onRemove:()=>{const z=le(M.uid);J("remove",z)},onClose:J},M.uid):null]})});function L0(e){const t=zs(e.dataset.tok??"");return t?t.t==="color"?t.hex:"id"in t?t.id:null:null}function s_(e){const t=zs(e.dataset.tok??"");return(t==null?void 0:t.t)==="color"?t.name:void 0}function o_(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function l_(e,t){let n=0;for(const s of Array.from(e.childNodes)){if(s===t||s.contains(t))break;n+=s.nodeType===Node.TEXT_NODE?(s.textContent??"").length:1}return n+(t.nodeType===Node.TEXT_NODE?(t.textContent??"").length:1)}function i_(e,t,n){var s,i;return e.t==="template"?((s=t.find(c=>c.id===e.id))==null?void 0:s.name)??"template":e.t==="product"?((i=n.find(c=>c.id===e.id))==null?void 0:i.name)??"product":e.t==="character"?"someone":e.t==="color"?e.name??e.hex:e.t==="mark"?"brand mark":"reference"}const c_=8,k2=60,u_=["All","Products","Presenters","Scenes","Colors","Brand","Shots"];function d_({brand:e,shots:t,initialTab:n="All",activeProductCategory:s,onToken:i,onTemplate:c,onUpload:u,onClose:f}){const[h,m]=r.useState(n);r.useEffect(()=>{m(n)},[n]);const[g,v]=r.useState(""),y=iu(s),w=r.useMemo(()=>new Set(Za(e.id)),[e.id]),E=ol(),[C]=li(),b=C.get("new")!==null;r.useEffect(()=>{const D=L=>{L.key==="Escape"&&!b&&(L.stopPropagation(),f())};return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[f,b]),r.useEffect(()=>{const D=L=>{b||!L.target.closest(".sc-attachpanel")&&!L.target.closest(".sc-attach-toggle")&&f()};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[f,b]);const N=r.useMemo(()=>{var se;const D=va((se=e.json)==null?void 0:se.palette),L=Rw(e.json),Y=t.filter(U=>U.status==="done"&&U.images.length>0).slice(-12).reverse(),I=(U,te)=>ad(U,zl(U,y),{currentId:null,query:"",bookmarked:w,shown:Number.MAX_SAFE_INTEGER}).items.map(O=>({key:`${U}:${O.id}`,tab:te,label:O.label,sub:O.sub,search:O.search,thumb:O.thumb,recommended:O.recommended,run:()=>O.kind==="scene"?c(O.id):i(O.token)}));return[...I("product","Products"),...I("presenter","Presenters"),...I("scene","Scenes"),...L.map(U=>({key:`m:${U.hash}`,tab:"Brand",label:Pw(e.json,U),sub:"the mark itself",thumb:rn(U.hash),run:()=>i({t:"mark",imageHash:U.hash})})),...D.map(U=>({key:`c:${U.hex}`,tab:"Colors",label:U.name,sub:U.hex,swatch:U.hex,run:()=>i({t:"color",hex:U.hex,name:U.name})})),...Y.map((U,te)=>({key:`r:${U.id}`,tab:"Shots",label:`Shot ${Y.length-te}`,sub:"as reference",thumb:rn(U.images[0]),run:()=>i({t:"ref",imageHash:U.images[0]})}))]},[e,y,w,t,i,c]),j=D=>xa(`${D.label} ${D.sub??""} ${D.search??""}`,g),k=D=>h==="All"||D.tab===h,A=N.filter(D=>k(D)&&j(D)),M=["Products","Presenters","Scenes","Colors","Shots"],T=D=>o.jsxs("button",{type:"button",className:"sc-ap-card",title:D.sub?`${D.label} · ${D.sub}`:D.label,onClick:D.run,children:[D.swatch?o.jsx("span",{className:"sc-ap-thumb",style:{background:D.swatch}}):D.thumb?o.jsx("img",{className:"sc-ap-thumb",src:D.thumb,alt:"",loading:"lazy"}):o.jsx("span",{className:"sc-ap-thumb sc-ap-thumb-empty",children:o.jsx(Wa,{size:16})}),D.recommended&&o.jsx("span",{className:"sc-ap-rec",children:"Recommended"}),o.jsx("b",{dir:"auto",children:D.label})]},D.key);return o.jsxs("div",{className:"sc-attachpanel",role:"dialog","aria-label":"Attach to brief",onMouseDownCapture:Sh,children:[o.jsxs("div",{className:"sc-ap-head",children:[o.jsx("div",{className:"sc-ap-tabs",children:u_.map(D=>o.jsx("button",{type:"button","data-active":D===h,onClick:()=>m(D),children:D},D))}),o.jsxs("div",{className:"sc-ap-search",children:[o.jsx(Tc,{size:12}),o.jsx("input",{placeholder:"Search",value:g,onChange:D=>v(D.target.value)})]}),o.jsx("button",{type:"button",className:"sc-icon-btn sc-ap-close",onClick:u,"aria-label":"Upload image",title:"Upload an image",style:{width:28,height:28},children:o.jsx(Jx,{size:12})}),o.jsx("button",{type:"button",className:"sc-icon-btn sc-ap-close",onClick:f,"aria-label":"Close",style:{width:28,height:28},children:o.jsx(Mn,{size:12})})]}),o.jsxs("div",{className:"sc-ap-body",children:[A.length===0&&o.jsxs("div",{className:"sc-ap-empty",children:["Nothing matches",g.trim()?` "${g.trim()}"`:"","."]}),h==="All"?M.map(D=>{const L=A.filter(se=>se.tab===D);if(!L.length)return null;const Y=L.slice(0,c_),I=L.length-Y.length;return o.jsxs("div",{className:"sc-ap-group",children:[o.jsx("div",{className:"sc-eyebrow",children:D==="Shots"?"Recent shots":D==="Colors"?"Brand colors":D}),o.jsx("div",{className:"sc-ap-grid",children:Y.map(T)}),I>0&&o.jsxs("button",{type:"button",className:"sc-amore",onClick:()=>m(D),children:["Show all ",L.length]})]},D)}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-ap-grid",children:[h==="Products"&&o.jsxs("button",{type:"button",className:"sc-ap-card sc-ap-add",onClick:()=>E("product",{onCreated:D=>D.kind==="product"&&i({t:"product",id:D.id})}),children:[o.jsx("span",{className:"sc-ap-thumb sc-ap-thumb-empty",children:o.jsx(tr,{size:16})}),o.jsx("b",{children:"Add product"})]}),A.slice(0,k2).map(T)]}),A.length>k2&&o.jsxs("p",{className:"sc-ap-capped",children:["Showing ",k2," of ",A.length,". Search to narrow it down."]})]})]})]})}function f_({brandId:e,revision:t}){const[n,s]=r.useState([]),[i,c]=r.useState(!1);return r.useEffect(()=>{let u=!0;return Ce.brandRules(e).then(f=>u&&s(f.directives)).catch(()=>u&&s([])),()=>{u=!1}},[e,t]),n.length?o.jsxs("div",{className:"sc-inherit",children:[o.jsxs("button",{type:"button",className:"sc-inherit-head",onClick:()=>c(u=>!u),"aria-expanded":i,children:[o.jsx(CH,{size:12}),o.jsx("span",{children:"Brand rules apply to every shot"}),o.jsx(ai,{size:10,weight:"bold"})]}),i&&o.jsx("div",{className:"sc-inherit-body",children:n.map(u=>o.jsx("p",{children:u},u))})]}):null}const h_={"codex-cli":{sizing:"advisory"},openrouter:{sizing:"ratio"},replicate:{sizing:"ratio",formats:["square","story","landscape"]},fal:{sizing:"exact"},demo:{sizing:"exact"}},m_={sizing:"exact"},d9=e=>h_[e]??m_;function p_(e,t){const n=d9(e).formats;return!n||n.includes(t)}const xp=e=>d9(e).sizing,Us=[{id:"draft",label:"Draft",edge:768,note:"quick checks"},{id:"standard",label:"Standard",edge:1024,note:"everyday shots"},{id:"high",label:"High",edge:1536,note:"hero and print"}],p1=[1,2,3,4],f9=e=>_r.filter(t=>!p_(e,t.id)).map(t=>t.id),Nh=(e,t)=>t.length===0?void 0:`${e} cannot make ${_r.filter(n=>t.includes(n.id)).map(n=>n.hint).join(" or ")}.`,wp=e=>{var n;e.preventDefault();const t=e.currentTarget??e.target;(n=t==null?void 0:t.querySelector('[role="radiogroup"]'))==null||n.focus()};function N2({aria:e,width:t,trigger:n,open:s,onOpenChange:i,children:c,onCloseAutoFocus:u}){const f=r.useRef(null);return r.useEffect(()=>{var m;const h=(m=f.current)==null?void 0:m.parentElement;h&&(h.style.pointerEvents=s?"":"none")},[s]),o.jsxs(ti,{open:s,onOpenChange:i,children:[o.jsx(ni,{children:o.jsx("button",{type:"button",className:"sc-var","aria-label":e,children:n})}),o.jsx(ri,{ref:f,className:"sc-setpop",align:"end",sideOffset:8,width:t,onOpenAutoFocus:wp,onCloseAutoFocus:u,onInteractOutside:h=>{var m;(m=h.target)!=null&&m.closest(".sc-prompt-pills")&&h.preventDefault()},children:c(()=>i(!1))})]})}function Ah({w:e,h:t,slot:n,box:s}){const i=s/Math.max(e,t);return o.jsx("span",{className:"sc-ratio-slot",style:{width:n,height:n},"aria-hidden":!0,children:o.jsx("span",{className:"sc-ratio",style:{width:Math.round(e*i),height:Math.round(t*i)}})})}const Bg=()=>o.jsx("span",{className:"sc-setpop-tick","aria-hidden":!0,children:o.jsx(_a,{size:12,weight:"bold"})});function ql({label:e,value:t,ids:n,unavailable:s=[],onChange:i,className:c,children:u}){const f=r.useRef(null),h=n.filter(g=>!s.includes(g)),m=g=>{var E,C;const v=g.key==="ArrowDown"||g.key==="ArrowRight"?1:g.key==="ArrowUp"||g.key==="ArrowLeft"?-1:g.key==="Home"?"first":g.key==="End"?"last":null;if(v===null||!h.length)return;g.preventDefault();const y=h.indexOf(t),w=v==="first"?h[0]:v==="last"?h[h.length-1]:v===1?h[y<0||y===h.length-1?0:y+1]:h[y<=0?h.length-1:y-1];i(w),(C=(E=f.current)==null?void 0:E.querySelector(`[data-id="${w}"]`))==null||C.focus()};return o.jsx("div",{className:c,role:"radiogroup","aria-label":e,ref:f,tabIndex:-1,onKeyDown:m,children:u})}function Xl({id:e,on:t,unavailable:n,label:s,onPick:i,className:c,children:u}){return o.jsx("button",{type:"button",role:"radio","data-id":e,className:c,"aria-checked":t,"aria-label":s,"aria-disabled":n||void 0,"data-on":t||void 0,tabIndex:t?0:-1,onClick:()=>{n||i()},children:u})}const g_=({children:e})=>o.jsx("p",{className:"sc-setpop-foot",children:e});function v_({mode:e,engineId:t,engineName:n,formatId:s,onFormat:i,count:c,onCount:u,quality:f,onQuality:h,onCloseAutoFocus:m}){const g=_r.find(k=>k.id===s)??_r[0],v=Us.find(k=>k.id===f)??Us[1],y=f9(t),w=xp(t),[E,C]=r.useState(null),b=r.useRef(null);b.current=E;const N=k=>{k.preventDefault(),b.current===null&&(m==null||m(k))},j=k=>({open:E===k,onCloseAutoFocus:N,onOpenChange:A=>C(M=>A?k:M===k?null:M)});return o.jsxs("div",{className:"sc-prompt-pills",children:[o.jsx(N2,{...j("aspect"),aria:`Aspect ${g.label}, ${g.hint}`,width:"178px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(Ah,{w:g.w,h:g.h,slot:15,box:13}),g.label]}),children:k=>o.jsxs(o.Fragment,{children:[o.jsx(ql,{label:"Aspect ratio",className:"sc-setpop-list",value:s,ids:_r.map(A=>A.id),unavailable:y,onChange:i,children:_r.map(A=>o.jsxs(Xl,{id:A.id,className:"sc-setrow",on:A.id===s,unavailable:y.includes(A.id),label:`${A.label}, ${A.hint}`,onPick:()=>{i(A.id),k()},children:[o.jsx(Ah,{w:A.w,h:A.h,slot:20,box:17}),o.jsx("span",{className:"sc-setrow-n",children:A.label}),o.jsx("span",{className:"sc-setrow-v",children:A.hint}),o.jsx(Bg,{})]},A.id))}),Nh(n,y)&&o.jsx(g_,{children:Nh(n,y)})]})}),e==="generation"&&o.jsx(N2,{...j("variants"),aria:`${c} variants`,width:"156px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(hh,{size:14}),c]}),children:k=>o.jsx(o.Fragment,{children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:p1.map(String),onChange:A=>u(Number(A)),children:p1.map(A=>o.jsx(Xl,{id:String(A),className:"sc-seg-o",on:A===c,label:`${A} variant${A===1?"":"s"}`,onPick:()=>{u(A),k()},children:A},A))})})}),e==="generation"&&w!=="ratio"&&o.jsx(N2,{...j("resolution"),aria:`Resolution ${v.label}, ${v.edge} px`,width:"192px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(xH,{size:14}),v.label]}),children:k=>o.jsx(o.Fragment,{children:o.jsx(ql,{label:"Resolution",className:"sc-setpop-list",value:f,ids:Us.map(A=>A.id),onChange:A=>h(A),children:Us.map(A=>o.jsxs(Xl,{id:A.id,className:"sc-setrow",on:A.id===f,label:`${A.label}, ${A.edge} px, ${A.note}`,onPick:()=>{h(A.id),k()},children:[o.jsx("span",{className:"sc-setrow-n",children:A.label}),o.jsxs("span",{className:"sc-setrow-v",children:[A.edge," px"]}),o.jsx(Bg,{})]},A.id))})})})]})}function h9({mode:e,engineId:t,engineName:n,formatId:s,onFormat:i,count:c,onCount:u,quality:f,onQuality:h}){const m=f9(t),g=xp(t);return o.jsxs(o.Fragment,{children:[o.jsx(A2,{label:"Aspect ratio",note:Nh(n,m),children:o.jsx(ql,{label:"Aspect ratio",className:"sc-seg",value:s,ids:_r.map(v=>v.id),unavailable:m,onChange:i,children:_r.map(v=>o.jsxs(Xl,{id:v.id,className:"sc-seg-o sc-seg-ratio",on:v.id===s,unavailable:m.includes(v.id),label:`${v.label}, ${v.hint}`,onPick:()=>i(v.id),children:[o.jsx(Ah,{w:v.w,h:v.h,slot:17,box:14}),v.hint]},v.id))})}),e==="generation"&&o.jsx(A2,{label:"Variants",children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:p1.map(String),onChange:v=>u(Number(v)),children:p1.map(v=>o.jsx(Xl,{id:String(v),className:"sc-seg-o",on:v===c,label:`${v} variant${v===1?"":"s"}`,onPick:()=>u(v),children:v},v))})}),e==="generation"&&g!=="ratio"&&o.jsx(A2,{label:"Resolution",children:o.jsx(ql,{label:"Resolution",className:"sc-seg",value:f,ids:Us.map(v=>v.id),onChange:v=>h(v),children:Us.map(v=>o.jsx(Xl,{id:v.id,className:"sc-seg-o",on:v.id===f,label:`${v.label}, ${v.edge} px, ${v.note}`,onPick:()=>h(v.id),children:v.label},v.id))})})]})}function A2({label:e,note:t,children:n}){return o.jsxs("div",{className:"sc-shotfield",children:[o.jsx("span",{className:"sc-shotfield-lb",children:e}),n,t&&o.jsx("p",{className:"sc-shotfield-note",children:t})]})}function y_(e){const[t,n]=r.useState(!1),{sheet:s,grip:i}=au(()=>n(!1));return o.jsxs(ui,{open:t,onOpenChange:n,children:[o.jsx(am,{asChild:!0,children:o.jsx("button",{type:"button",className:"sc-var sc-shotset","aria-label":"Shot settings",title:"Shot settings",children:o.jsx(zx,{size:16})})}),o.jsxs(di,{children:[o.jsx(fi,{className:"sc-shotsheet-scrim"}),o.jsxs(hi,{ref:s,className:"sc-shotsheet","aria-describedby":void 0,onOpenAutoFocus:wp,onCloseAutoFocus:c=>c.preventDefault(),children:[o.jsxs("div",{className:"sc-shotsheet-grip",...i,children:[o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0}),o.jsx(mi,{className:"sc-vh",children:"Shot settings"})]}),o.jsx(h9,{...e})]})]})]})}const x_=720*60*60*1e3,Ec=e=>`scenri:draft-${e}`;function w_(e){try{return localStorage.getItem(e)}catch{return null}}function b_(e,t){try{localStorage.setItem(e,t)}catch{}}function Mh(e){try{localStorage.removeItem(e)}catch{}}function Ug(e,t,n){return e.some(s=>s.t==="text"?!!s.v.trim():!0)||Object.values(t).some(s=>!!s.trim())||!!n}function E_(e){const t=w_(Ec(e));if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!="object"||n===null)return null;const s=n;if(s.v!==1||s.brandId!==e||!Array.isArray(s.tokens)||typeof s.tplFields!="object"||!s.tplFields)return Mh(Ec(e)),null;const i=Date.now()-Date.parse(s.updatedAt??"");return!Number.isFinite(i)||i>x_?(Mh(Ec(e)),null):{v:1,brandId:e,updatedAt:s.updatedAt,tokens:s.tokens,tplFields:s.tplFields,branchId:s.branchId??null,setSlug:s.setSlug??null}}function m9(e,t){const n={v:1,brandId:e,updatedAt:new Date().toISOString(),tokens:t.tokens,tplFields:t.tplFields,branchId:t.branchId,setSlug:t.setSlug??null};b_(Ec(e),JSON.stringify(n))}function Wg(e){Mh(Ec(e))}function Gg(e,t,n,s,i){if(e===t)return{changed:!1,toast:null};const c=!!s;return e===null&&!c?{changed:!0,toast:null}:{changed:!0,toast:{title:c?`Switched to ${n}. This starts a new shot instead of refining ${i??"that shot"}.`:`Switched to ${n}.`,prevSceneId:e,branchWasCleared:c}}}const Rh=4,Kg=24,Yg=24,p9={product:[],presenter:[],scene:null};function C_(e){const t=[],n=[];let s=null;for(const i of e)i.t==="product"?t.includes(i.id)||t.push(i.id):i.t==="character"?n.includes(i.id)||n.push(i.id):i.t==="template"&&(s=i.id);return{product:t,presenter:n,scene:s}}function S_(e){return`${e.product.join(",")}|${e.presenter.join(",")}|${e.scene??""}`}function j_(e,t,n){const i=(t.size?[...e].sort((c,u)=>Number(t.has(u.id))-Number(t.has(c.id))):e).slice(0,n);return{visible:i,more:Math.max(0,e.length-i.length)}}const bp=r.forwardRef(function({projectId:t,brand:n,engines:s,parent:i,shots:c,initialBrief:u,suppressDraftRestore:f,startScene:h,startPresenter:m,startProduct:g,openAttachTab:v,onQueued:y,onSending:w,onAttached:E,target:C,onClearTarget:b,sourceImage:N,onRestoreBranchId:j,setSlug:k,persistDraft:A=!0},M){var gn,Gn,Ln;const{products:T}=It(),{demoProducts:D,loaded:L}=pn(),Y=iu(),I=Y.scenes,se=Y.presenters,U=X1(),te=Q1(),{push:O}=mr(),ne=s.filter(de=>de.available),[Q,H]=Ia(cr.engine,u1);r.useEffect(()=>{const de=G$(ne,Q);de!==Q&&H(de)},[ne,Q,H]);const K=ne.length===0&&s.some(de=>de.code==="not-installed"||de.code==="not-authenticated"),X=ne.length===0,W=X?K?{icon:o.jsx($w,{}),title:"Image generation is not set up yet",detail:"About a minute, using the ChatGPT account you already have.",action:"Set up",onAct:()=>te(),info:!0}:{icon:o.jsx(l1,{size:15}),title:"No image provider connected",detail:"Add a provider key and this brief is ready to run.",action:"Open settings",onAct:()=>U("engines"),info:!1}:null,[P,Z]=r.useState(as()),[ae,G]=r.useState(void 0),[fe,le,me]=f2(cr.format,"square"),[J,ge]=r.useState({}),[He,Qe,ye]=f2(cr.count,2),[ke,lt]=r.useState(!1),[jt,Pt]=r.useState(null),[Ne,Ae]=r.useState(null),[Ee,at]=r.useState(!1),[kt,Qt]=r.useState("All"),[Jt,Ot,xn]=f2(cr.quality,"standard"),[Rn,Wn]=r.useState(!1),[Pn,Zt]=r.useState(!1),tt=r.useRef(null),qe=r.useRef(null),Ut=r.useRef(null),Vt=r.useRef({tokens:P,tplFields:J,branchId:(C==null?void 0:C.id)??null});Vt.current={tokens:P,tplFields:J,branchId:(C==null?void 0:C.id)??null};const z=r.useRef(null),ue=r.useRef(null),xe=r.useRef(void 0),Me=r.useRef(void 0),Ke=r.useRef(void 0),it=r.useCallback(de=>{if(ue.current&&(clearTimeout(ue.current),ue.current=null),!A)return;const Le=Vt.current;Ug(Le.tokens,Le.tplFields,Le.branchId)?m9(de,{...Le,setSlug:k}):Wg(de)},[k,A]);r.useEffect(()=>{v&&(Qt(v),at(!0))},[v]),r.useEffect(()=>{if(!u)return;const de=(u.tokens??[]).find(Le=>Le.t==="format");de&&me(de.id),u.variants&&ye(u.variants),u.quality&&xn(u.quality),G(Xw(u)),ge(u.templateFields??{})},[u]),r.useEffect(()=>{var et,Wt;const de=z.current;de&&de!==n.id&&it(de);const Le=!!u||!!f||!A;let ht=null,Je=null,gt=null;if(!Le){const mt=E_(n.id);mt&&Ug(mt.tokens,mt.tplFields,mt.branchId)&&(ht=mt.tokens,Je=mt.tplFields,gt=mt.branchId)}if(h&&h!==xe.current){xe.current=h;const mt=ht??as(),Kt=mt.find(jn=>jn.t==="template"),vn=(Kt==null?void 0:Kt.id)??null,Kn=gt,Dt=((et=I.find(jn=>jn.id===h))==null?void 0:et.name)??"this scene",Zn=Kn?c.find(jn=>jn.id===Kn):null,ar=Gg(vn,h,Dt,Kn,Zn?Cn(Zn):null);if(ar.changed&&(ht=[{t:"template",id:h},...mt.filter(jn=>jn.t!=="template")],(Wt=ar.toast)!=null&&Wt.branchWasCleared&&(gt=null),ar.toast)){const jn=ar.toast;O({kind:"success",title:jn.title,action:{label:"Undo",onClick:()=>{var vs,_;jn.prevSceneId?(vs=tt.current)==null||vs.insert({t:"template",id:jn.prevSceneId}):(_=tt.current)==null||_.removeTemplate(),jn.branchWasCleared&&Kn&&(j==null||j(Kn))}}})}}if(m&&m!==Me.current){Me.current=m;const mt=ht??as();mt.some(vn=>vn.t==="character"&&vn.id===m)||(ht=[...mt,{t:"character",id:m}])}if(g&&g!==Ke.current){Ke.current=g;const mt=ht??as();mt.some(vn=>vn.t==="product"&&vn.id===g)||(ht=[...mt,{t:"product",id:g}])}ht&&(G(ht),ge(Je??{}),gt&&(j==null||j(gt))),z.current=n.id},[n.id,h,m,g]),r.useEffect(()=>{var de;ae&&((de=tt.current)==null||de.setTokens(ae),G(void 0))},[ae]);const _t=r.useMemo(()=>{var gt;const de=_r.find(et=>et.id===fe)??_r[0],ht=(((gt=Us.find(et=>et.id===Jt))==null?void 0:gt.edge)??1024)/Math.max(de.w,de.h),Je=et=>Math.max(256,Math.round(et*ht/8)*8);return{t:"format",id:de.id,w:Je(de.w),h:Je(de.h)}},[fe,Jt]),Nt=r.useMemo(()=>[_t,...P],[_t,P]),bt=r.useMemo(()=>({tokens:Nt,templateFields:J,variants:He,quality:Jt,format:fe}),[Nt,J,He,Jt,fe]),Sn=P.some(de=>de.t==="text"?!!de.v.trim():!0),Ct=r.useMemo(()=>{const de=P.find(Le=>Le.t==="template");return de?I.find(Le=>Le.id===de.id)??null:null},[P,I]),Mr=r.useMemo(()=>{const de=P.find(Le=>Le.t==="template");return(de==null?void 0:de.id)??null},[P]),pr=r.useCallback(de=>{var et,Wt;const Le=(Ct==null?void 0:Ct.id)??null,ht=(C==null?void 0:C.id)??null,Je=((et=I.find(mt=>mt.id===de))==null?void 0:et.name)??"this scene",gt=Gg(Le,de,Je,ht,C?Cn(C):null);if(gt.changed&&((Wt=tt.current)==null||Wt.insert({t:"template",id:de}),gt.toast)){const mt=gt.toast;O({kind:"success",title:mt.title,action:{label:"Undo",onClick:()=>{var Kt,vn;mt.prevSceneId?(Kt=tt.current)==null||Kt.insert({t:"template",id:mt.prevSceneId}):(vn=tt.current)==null||vn.removeTemplate(),mt.branchWasCleared&&ht&&(j==null||j(ht))}}})}},[Ct,C,I,O,j]);r.useImperativeHandle(M,()=>({insertToken:de=>{var Le;return(Le=tt.current)==null?void 0:Le.insert(de)},applyScene:de=>pr(de),openAttach:de=>pt(de),focus:()=>{var de;return(de=tt.current)==null?void 0:de.focus()},submit:()=>{ut()}}));const ct=r.useMemo(()=>C_(P),[P]),St=S_(ct),en=r.useRef(ct);en.current=ct,r.useEffect(()=>{E==null||E(en.current)},[St,E]),r.useEffect(()=>{var de;!L||!Mr||Ct||((de=tt.current)==null||de.removeTemplate(),O({kind:"error",title:"That scene is no longer available.",detail:"Starting from scratch."}))},[L,Mr,Ct,O]);const zt=r.useRef(null);r.useEffect(()=>{if(!Sn){Ae(null);return}return zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{Ce.previewBrief(bt,Q,n.id).then(Ae).catch(()=>Ae(null))},280),()=>{zt.current&&clearTimeout(zt.current)}},[bt,Q,n.id,Sn]),r.useEffect(()=>(ue.current&&clearTimeout(ue.current),ue.current=setTimeout(()=>it(z.current??n.id),500),()=>{ue.current&&clearTimeout(ue.current)}),[P,J,C==null?void 0:C.id,n.id,it]),r.useEffect(()=>()=>it(z.current??n.id),[it]),r.useEffect(()=>{const de=()=>it(z.current??n.id);return window.addEventListener("beforeunload",de),()=>window.removeEventListener("beforeunload",de)},[it,n.id]);const Lt=s.find(de=>de.id===Q),nr=Lt?Gs(Lt.displayName):"This engine",F=!!C&&C.kind!=="root"&&C.status==="running",V=C&&C.kind!=="root"&&C.status==="done"&&C.images.length>0||F,ee=!!(Lt!=null&&Lt.supportsEdit),pe=!!C&&!!((gn=C.brief)!=null&&gn.format)&&C.brief.format!==fe,he=V&&ee&&!Ct&&!pe?"edit":"generation",$e=V?Ct?"A scene starts a new shot.":pe?"A new shape starts a new shot from this setup.":ee?F?"Still rendering. This can be refined the moment it lands.":null:`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot edit. This makes a new shot.`:null,ze=r.useMemo(()=>{const de=_r.find(gt=>gt.id===fe)??_r[0],Le=`Aspect ${de.label} ${de.hint}`;if(he==="edit")return Le;const ht=Us.find(gt=>gt.id===Jt),Je=xp(Q)==="ratio"||!ht?null:`${ht.label} ${ht.edge} px`;return[Le,`${He} variants`,Je&&`resolution ${Je}`].filter(Boolean).join(", ")},[he,fe,He,Jt,Q]);r.useEffect(()=>{Ct&&V&&b&&b()},[Ct,V,b]);const st=(Ne==null?void 0:Ne.warnings.filter(de=>de.includes("built around a product")))??[],je=!ke&&Sn&&!!t&&!F&&!X,Ze=X?"Image generation is not set up yet":ke?"Working on the last one":t?F?"Wait for this version to finish, or press X to start a new shot":Sn?null:"Write a brief first":"Still opening this brand",Ge=de=>{var Le;le(de),(Le=tt.current)==null||Le.focus()},_e=de=>{var Le;Ot(de),(Le=tt.current)==null||Le.focus()},Pe=de=>{var Le;Qe(de),(Le=tt.current)==null||Le.focus()},dt=de=>{var Le;de.preventDefault(),(Le=tt.current)==null||Le.focus()},pt=de=>{Qt(de),at(!0)},Ft=async de=>{var ht;if(!(de!=null&&de.length))return;const Le=Array.from(de).filter(Je=>Je.type.startsWith("image/"));if(!Le.length){O({kind:"error",title:"Only images can be attached here"});return}Wn(!0),Pt(null);try{for(const Je of Le.slice(0,4)){const gt=await iw(Je);(ht=tt.current)==null||ht.insert({t:"ref",imageHash:gt})}}catch(Je){Pt(String(Je.message??Je)),O(dn(Je,"Could not attach that image"))}finally{Wn(!1),Ut.current&&(Ut.current.value="")}},Ht=Ct?st.length>0?"This scene builds around a product. Attach one.":(Ne==null?void 0:Ne.warnings.some(de=>de.includes("built around a person")))??!1?"This scene builds around a person. Attach a presenter.":null:null,xt=de=>{var Le;if(de.t==="template")return Ht;if(!Ne)return null;if(de.t==="ref"&&!Ne.attachments.some(ht=>ht.hash===de.imageHash))return`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot read this reference, so it is left out.`;if(de.t==="product"){const Je=(T.length?T:((Le=n.json)==null?void 0:Le.products)??[]).find(gt=>gt.id===de.id)??D.find(gt=>gt.id===de.id);if(Je&&!Ne.attachments.some(gt=>gt.role==="product"&>.id===Je.id))return`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot read the product image, so ${Je.name} rides as text only.`}if(de.t==="character"){const ht=se.find(Je=>Je.id===de.id);if(ht&&!Ne.attachments.some(Je=>Je.role==="character"&&Je.id===ht.id))return`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot read the person reference, so ${ht.name} rides as text only.`}return null},ut=async()=>{var Le,ht;if(!je)return;lt(!0),Pt(null);const de=P.flatMap(Je=>Je.t==="text"?[Je.v]:[]).join(" ").replace(/\s+/g," ").trim();w==null||w(de||"Your shot");try{if(!t)throw new Error("the workspace is still loading");const Je=await Ce.addNode({projectId:t,parentId:he==="edit"&&C?C.id:(i==null?void 0:i.id)??null,kind:he,engineId:Q,count:He,brief:bt,...he==="edit"&&N?{sourceImage:N}:{}}),gt=(Le=Je.warnings)==null?void 0:Le[0];gt&&O({kind:"success",title:"Sent, with one thing to know",detail:gt}),(ht=tt.current)==null||ht.setTokens(as()),ge({}),me(null),ye(null),xn(null),A&&Wg(n.id),y(Je.id,he)}catch(Je){const gt=String(Je.message??Je);Pt(gt),O({kind:"error",title:"That did not send",detail:gt}),w==null||w(null)}finally{lt(!1)}},tn=(Gn=P.find(de=>de.t==="product"))==null?void 0:Gn.id,rr=tn?T.find(de=>de.id===tn)??(((Ln=n.json)==null?void 0:Ln.products)??[]).find(de=>de.id===tn)??D.find(de=>de.id===tn)??null:null,On=rr?cp(rr):null;return o.jsxs("div",{className:"sc-composer",children:[o.jsx("input",{ref:Ut,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:de=>void Ft(de.target.files)}),Ee&&o.jsx(d_,{brand:n,activeProductCategory:On,shots:c,initialTab:kt,onUpload:()=>{var de;return(de=Ut.current)==null?void 0:de.click()},onToken:de=>{var Le;return(Le=tt.current)==null?void 0:Le.insert(de)},onTemplate:de=>pr(de),onClose:()=>at(!1)}),W&&o.jsx("div",{className:"sc-notes",children:W&&o.jsxs("div",{className:"sc-banner","data-tone":"action",children:[o.jsx("span",{className:"sc-banner-ic",children:W.icon}),o.jsxs("span",{className:"sc-banner-txt",children:[o.jsx("b",{children:W.title}),o.jsxs("small",{children:[W.detail,W.info&&o.jsxs(ti,{children:[o.jsx(ni,{children:o.jsx("button",{type:"button",className:"sc-note-info","aria-label":"What a ChatGPT account has to do with this",children:o.jsx(qm,{size:13})})}),o.jsxs(ri,{className:"sc-note-pop",align:"start",sideOffset:8,width:"300px",children:[o.jsx("p",{children:"Codex CLI signs in with your ChatGPT account and makes the images there. Every plan includes some Codex usage, so how many images you get depends on the plan you are on."}),o.jsx("p",{children:"No ChatGPT account, or run out for now? Use your own key from an image provider instead."}),o.jsx("p",{className:"sc-note-pop-fine",children:"scenri never sees your password or token. The sign-in happens in your browser and stays with Codex."}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>U("engines"),children:"Use a provider key instead"})]})]})]})]}),o.jsx("button",{type:"button",className:"sc-banner-act","data-primary":"",onClick:W.onAct,children:W.action})]})}),o.jsxs("div",{className:"sc-promptcard",children:[V&&b&&o.jsxs("div",{className:"sc-target","data-note":$e?"":void 0,children:[o.jsxs("span",{className:"sc-target-lb",children:["Refining",C.images[0]?o.jsx("img",{src:rn(C.images[0]),alt:""}):o.jsx("span",{className:"sc-target-thumb sc-shimmer"}),o.jsx("b",{dir:"auto",children:Cn(C)})]}),$e&&o.jsx("small",{className:"sc-target-note",children:$e}),o.jsx("button",{type:"button",className:"sc-target-x",onClick:b,"aria-label":"Make a new shot instead",children:o.jsx(Mn,{size:12})})]}),V&&!b&&$e&&o.jsx("small",{className:"sc-target-note sc-target-note-alone",children:$e}),o.jsx(a_,{ref:tt,onChange:Z,brand:n,shots:c,templates:I,presenters:se,demoProducts:D,onTemplatePick:pr,flag:xt,onAttachRequest:de=>pt(de),activeProductCategory:On,placeholder:Ct?"Add art direction, or run it as written":he==="edit"?"Say what to change about this shot":"What should we shoot? (use $ / @ #)",placeholderSm:Ct||he==="edit"?void 0:"What should we shoot? ($ / @ #)",onSubmit:()=>void ut(),onDropFiles:de=>void Ft(de)}),o.jsx(f_,{brandId:n.id,revision:n.updatedAt}),o.jsxs("div",{className:"sc-prompt-row",children:[o.jsxs("div",{className:"sc-prompt-left",children:[o.jsx("button",{type:"button",ref:qe,className:"sc-icon-btn sc-attach-toggle","aria-expanded":Ee,"aria-label":"Attach",title:"Attach a product, a scene, a colour or an image",onClick:()=>Ee?at(!1):pt("All"),children:Rn?o.jsx(ln,{size:"1"}):o.jsx(tr,{size:16})}),ne.length>1&&o.jsxs(F5,{value:Q,onValueChange:H,children:[o.jsxs(I5,{variant:"ghost",className:"sc-mini-sel",children:[o.jsx(l1,{size:14}),o.jsx("span",{className:"sc-mini-sel-t",children:Lt?Gs(Lt.displayName):"Demo"})]}),o.jsx(_5,{children:ne.map(de=>o.jsx(O5,{value:de.id,children:Gs(de.displayName)},de.id))})]})]}),o.jsxs("div",{className:"sc-prompt-right",children:[o.jsx(v_,{mode:he,engineId:Q,engineName:nr,formatId:fe,onFormat:Ge,count:He,onCount:Pe,quality:Jt,onQuality:_e,onCloseAutoFocus:dt}),o.jsxs(ti,{open:Pn,onOpenChange:Zt,children:[o.jsx(ni,{children:o.jsxs("button",{type:"button",className:"sc-var sc-more","aria-label":`Shot settings. ${ze}`,children:[o.jsx(zx,{size:14}),"More"]})}),o.jsx(ri,{className:"sc-morepop",align:"end",sideOffset:8,width:"300px",onOpenAutoFocus:wp,onCloseAutoFocus:dt,children:o.jsx(h9,{mode:he,engineId:Q,engineName:nr,formatId:fe,onFormat:Ge,count:He,onCount:Pe,quality:Jt,onQuality:_e})})]}),o.jsx(y_,{mode:he,engineId:Q,engineName:nr,formatId:fe,onFormat:Ge,count:He,onCount:Pe,quality:Jt,onQuality:_e}),o.jsxs("button",{type:"button",className:"sc-send","aria-disabled":!je||void 0,onClick:()=>void ut(),"aria-label":he==="edit"?"Refine":"Generate",title:jt??Ht??Ze??`${he==="edit"?"Refine":"Generate"} (enter)`,children:[o.jsx("span",{className:"sc-send-ico",children:ke?o.jsx(ln,{size:"1"}):o.jsx(oH,{size:17,weight:"bold"})}),o.jsx("span",{className:"sc-send-lb",children:he==="edit"?"Refine":"Generate"})]})]})]})]})]})});function g9({full:e=!0,children:t}){return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-dock-fade","data-full":e,"aria-hidden":!0}),o.jsx("div",{className:"sc-canvas-dock","data-full":e,children:t})]})}function cu({id:e,previewUrl:t,title:n,primary:s,secondary:i,useLabel:c,variant:u,onOpen:f,onUse:h,selected:m,onToggle:g,bookmarked:v,onBookmark:y,size:w="grid"}){const[E,C]=r.useState(!1),[b,N]=r.useState(!1),j=r.useRef(null),[k,A]=r.useState(!1);r.useEffect(()=>{const se=window.matchMedia("(hover: none)"),U=()=>A(se.matches);return U(),se.addEventListener("change",U),()=>se.removeEventListener("change",U)},[]);const M=u==="use"&&!!f&&!!h;r.useEffect(()=>{if(!b)return;const se=U=>{var te;(te=j.current)!=null&&te.contains(U.target)||N(!1)};return document.addEventListener("pointerdown",se),()=>document.removeEventListener("pointerdown",se)},[b]);const T=t&&!E?o.jsx("img",{src:t,alt:"",loading:"lazy",onError:()=>C(!0)}):o.jsx("span",{className:"sc-lookcard-blank",children:o.jsx(Wa,{size:20})}),D=o.jsxs("span",{className:"sc-lookcard-cap",title:n,children:[o.jsx("b",{dir:"auto",children:s}),i&&o.jsx("span",{children:i})]});if(u==="select")return o.jsxs("button",{type:"button",className:"sc-lookcard","data-variant":"select","data-size":w,"data-on":m||void 0,"aria-pressed":!!m,"aria-label":n,onClick:()=>g==null?void 0:g(e),children:[o.jsxs("span",{className:"sc-lookcard-media",children:[T,o.jsx("span",{className:"sc-lookcard-veil","aria-hidden":!0}),o.jsx("span",{className:"sc-lookcard-tick","aria-hidden":!0,children:o.jsx(_a,{size:11,weight:"bold"})})]}),D]});const L=()=>{if(M&&k){if(!b){N(!0);return}N(!1)}f?f(e):h==null||h(e)},Y=()=>{N(!1),h==null||h(e)},I=o.jsxs("div",{ref:j,className:"sc-lookcard","data-fb":"catalog-card","data-fb-id":e,"data-variant":u,"data-size":w,"data-armed":b||void 0,children:[o.jsxs("div",{className:"sc-lookcard-media",children:[o.jsxs("button",{type:"button",className:"sc-lookcard-open",onClick:L,"aria-label":n,children:[T,o.jsx("span",{className:"sc-lookcard-veil","aria-hidden":!0})]}),M&&o.jsx("button",{type:"button",className:"sc-lookcard-use",onClick:Y,children:c}),y&&o.jsx("button",{type:"button",className:"sc-cardpuck sc-lookcard-bookmark","data-on":v||void 0,"aria-pressed":!!v,"aria-label":v?`Remove bookmark from ${s}`:`Bookmark ${s}`,onClick:se=>{se.stopPropagation(),y(e)},children:o.jsx(G1,{size:13,weight:v?"fill":"regular"})})]}),D]});return!f&&!h||k?I:o.jsxs(Zm,{children:[o.jsx(Vm,{children:I}),o.jsxs(zm,{children:[f&&o.jsx(qr,{onSelect:()=>f(e),children:"Open"}),M&&o.jsx(qr,{onSelect:()=>h==null?void 0:h(e),children:c}),y&&o.jsx(qr,{onSelect:()=>y(e),children:v?"Remove bookmark":"Bookmark"})]})]})}function sd({size:e="grid",count:t=4}){return o.jsx(o.Fragment,{children:Array.from({length:t},(n,s)=>o.jsx("div",{className:"sc-lookcard","data-variant":"skeleton","data-size":e,"aria-hidden":!0},s))})}const k_={presenter:"Presenter",product:"Product",scene:"Scene"};function v9({entry:e,productName:t,productPreviewUrl:n,productId:s,presenterName:i,presenterPreviewUrl:c,presenterId:u,sceneName:f,scenePreviewUrl:h,sceneId:m,onOpen:g,onOpenProduct:v,onOpenPresenter:y,onOpenScene:w,active:E,hideRecipe:C,decorative:b,size:N="grid"}){const j=[t,i,f].filter(Boolean).join(" · "),k=i?{key:"presenter",name:i,previewUrl:c,linked:!!(y&&u),onOpen:y&&u?()=>y(u):void 0}:null,A=n&&t?{key:"product",name:t,previewUrl:n,linked:!!(v&&s),onOpen:v&&s?()=>v(s):void 0}:null,M=h&&f?{key:"scene",name:f,previewUrl:h,linked:!!(w&&m),onOpen:w&&m?()=>w(m):void 0}:null;return o.jsxs("div",{className:"sc-showcase-tile","data-active":E||void 0,"aria-hidden":b||void 0,...b?{inert:""}:{},children:[o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:e.title,primary:e.title,secondary:C?"":j,useLabel:"Recreate this",variant:"use",onOpen:g,onUse:g,size:N}),(k||A||M)&&o.jsx(A_,{presenter:k,product:A,scene:M})]})}function N_(e){return o.jsx(sd,{...e})}function A_({presenter:e,product:t,scene:n}){const[s,i]=r.useState(null),c=[t,n].filter(Boolean),u=c.length+(e?1:0)+Math.max(0,c.length-1);let f=0;const h=()=>({"--i":f++});return o.jsxs("div",{className:"sc-showcase-chips",onMouseLeave:()=>i(null),children:[e&&o.jsx(qg,{credit:e,open:s==="presenter",onEnter:()=>i("presenter"),children:R_(e)}),c.length>0&&o.jsxs("div",{className:"sc-showcase-recipe",style:{"--n":u},children:[e&&o.jsx("span",{className:"sc-showcase-join",style:h(),"aria-hidden":!0}),c.map((m,g)=>o.jsxs(r.Fragment,{children:[g>0&&o.jsx("span",{className:"sc-showcase-join",style:h(),"aria-hidden":!0}),o.jsx(qg,{credit:m,open:s===m.key,onEnter:()=>i(m.key),style:h(),children:M_({credit:m,step:g===0?1:2})})]},m.key))]})]})}function qg({credit:e,open:t,onEnter:n,children:s,style:i}){const c=r.useRef(null),u=r.useRef(null),[f,h]=r.useState(null),m=UF(),g=m==="large"?144:88,v=m==="large"?168:112;if(r.useLayoutEffect(()=>{if(!t||!e.previewUrl){h(null);return}const w=()=>{const N=c.current;if(!N)return;const j=N.getBoundingClientRect(),k=u.current,A=(k==null?void 0:k.offsetWidth)||g,M=(k==null?void 0:k.offsetHeight)||v,T=8,D=j.top>=M+T+12;h({left:Math.round(j.left+j.width/2-A/2),top:Math.round(D?j.top-T-M:j.bottom+T)})};w();const E=requestAnimationFrame(w),C=c.current,b=C?new ResizeObserver(w):null;return C&&b&&b.observe(C),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{cancelAnimationFrame(E),b==null||b.disconnect(),window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[t,e.previewUrl,e.key,g,v]),!e.previewUrl)return o.jsx("span",{ref:c,className:"sc-credit-tip",onPointerEnter:n,style:i,children:s});const y=k_[e.key];return o.jsxs("span",{ref:c,className:"sc-credit-tip","data-open":t||void 0,onPointerEnter:n,style:i,children:[s,t&&na.createPortal(o.jsx("span",{ref:u,className:"sc-credit-tip-pop","data-size":m,style:f?{left:f.left,top:f.top}:{left:-9999,top:0},role:"tooltip","aria-label":`${y}: ${e.name}`,children:o.jsxs("span",{className:"sc-credit-tip-card",children:[o.jsx("img",{src:e.previewUrl,alt:""}),o.jsx("span",{className:"sc-credit-tip-name",children:e.name}),o.jsx("span",{className:"sc-credit-tip-role",children:y})]})}),document.body)]})}function y9(e,t){e.stopPropagation(),e.preventDefault(),t==null||t()}function M_({credit:e,step:t}){const{name:n,previewUrl:s,linked:i,onOpen:c}=e;return i?o.jsx("button",{type:"button",className:"sc-showcase-chip","data-link":!0,"data-step":t,"aria-label":`See ${n}`,onClick:u=>y9(u,c),children:s?o.jsx("img",{src:s,alt:""}):null}):o.jsx("span",{className:"sc-showcase-chip","data-step":t,children:s?o.jsx("img",{src:s,alt:n}):o.jsx("span",{className:"sc-vh",children:n})})}function R_(e){const{name:t,previewUrl:n,linked:s,onOpen:i}=e;return s?o.jsxs("button",{type:"button",className:"sc-showcase-badge","data-link":!0,"aria-label":`See ${t}`,onClick:c=>y9(c,i),children:[n?o.jsx("img",{src:n,alt:""}):null,o.jsx("span",{className:"sc-showcase-badge-name",children:t})]}):o.jsxs("span",{className:"sc-showcase-badge","aria-hidden":!0,children:[n?o.jsx("img",{src:n,alt:""}):null,o.jsx("span",{className:"sc-showcase-badge-name",children:t})]})}function g1({presenter:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){return o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:e.descriptor||e.name,primary:e.name,secondary:e.descriptor,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u})}function x9(e){return o.jsx(sd,{...e})}function $c({scene:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,bookmarked:u,onBookmark:f,size:h="grid"}){return o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:e.description||to(e,"tooltip"),primary:to(e,"card"),secondary:e.lighting,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,bookmarked:u,onBookmark:f,size:h})}function w9(e){return o.jsx(sd,{...e})}const Xg=new Map,P_=1e3;function dr({className:e="sc-home",children:t}){const n=r.useRef(null),{key:s}=mn(),i=r.useRef(!1);return r.useLayoutEffect(()=>{const c=n.current,u=Xg.get(s);if(!c||!u)return;let f=!1;const h=()=>{f||(f=!0,i.current=!1,g.disconnect(),clearTimeout(v),c.removeEventListener("wheel",h),c.removeEventListener("touchstart",h))},m=()=>{f||(c.scrollTop=u,Math.abs(c.scrollTop-u)<1&&h())};i.current=!0;const g=new ResizeObserver(m),v=setTimeout(h,P_);return c.addEventListener("wheel",h,{passive:!0}),c.addEventListener("touchstart",h,{passive:!0}),m(),g.observe(c),c.firstElementChild&&g.observe(c.firstElementChild),h},[s]),r.useEffect(()=>{const c=n.current;if(!c)return;const u=()=>{i.current||Xg.set(s,c.scrollTop)};return c.addEventListener("scroll",u,{passive:!0}),()=>c.removeEventListener("scroll",u)},[s]),o.jsx("div",{ref:n,className:e,children:t})}function od({title:e,filters:t,active:n,summary:s,onClear:i,density:c,search:u,action:f}){return o.jsxs("div",{className:"sc-filterbar",children:[e?o.jsx("h1",{className:"sc-vh",children:e}):null,t,o.jsxs("div",{className:"sc-filterbar-actions",children:[n&&o.jsxs("span",{className:"sc-lib-count",children:[s,i&&o.jsx("button",{type:"button",className:"sc-lib-clear",onClick:i,children:"Clear"})]}),u,c,f?o.jsx("span",{className:"sc-filterbar-cta",children:f}):null]})]})}function T0(e,t){return t===null?e===null:e===t}function b9({"aria-label":e,activeKey:t,items:n,onSelect:s}){const i=r.useRef(null),c=r.useRef(null),u=n.map(g=>`${g.value??""}:${g.count}`).join("|");r.useLayoutEffect(()=>{const g=i.current,v=c.current;if(!g||!v)return;let y=0;const w=()=>{const A=v.querySelector(":scope > button[data-on]");if(!A)return v.style.setProperty("--sc-ink-x","0px"),v.style.setProperty("--sc-ink-w","0px"),null;const M=A.querySelector(".sc-vlabel")??A;return v.style.setProperty("--sc-ink-x",`${A.offsetLeft+M.offsetLeft}px`),v.style.setProperty("--sc-ink-w",`${M.offsetWidth}px`),A},E=()=>{const A=v.scrollWidth-v.clientWidth;if(A<=1){delete g.dataset.overflowLeft,delete g.dataset.overflowRight;return}v.scrollLeft>2?g.dataset.overflowLeft="":delete g.dataset.overflowLeft,v.scrollLeft<A-2?g.dataset.overflowRight="":delete g.dataset.overflowRight},C=A=>{const M=v.scrollWidth-v.clientWidth;if(M<=0)return;const T=[...v.querySelectorAll(":scope > button")],D=T.indexOf(A);if(D<0)return;const L=72,Y=v.scrollLeft,I=Y+v.clientWidth,se=T[D-1],U=T[D+1],te=U?U.offsetLeft+Math.min(L,U.offsetWidth):A.offsetLeft+A.offsetWidth+8,O=se?Math.max(0,se.offsetLeft+se.offsetWidth-L):Math.max(0,A.offsetLeft-8);let ne=Y;if(te>I)ne=Math.min(M,te-v.clientWidth);else if(O<Y)ne=O;else return;if(Math.abs(ne-Y)<1)return;const Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches;v.scrollTo({left:ne,behavior:Q?"auto":"smooth"})},b=w();b&&C(b),E(),v.dataset.inkReady||requestAnimationFrame(()=>{v.dataset.inkReady=""});const N=()=>{y||(y=requestAnimationFrame(()=>{y=0,E()}))},j=A=>{if(v.scrollWidth<=v.clientWidth+1||Math.abs(A.deltaX)>Math.abs(A.deltaY)||A.deltaY===0)return;const M=v.scrollWidth-v.clientWidth,T=Math.max(0,Math.min(M,v.scrollLeft+A.deltaY));T!==v.scrollLeft&&(A.preventDefault(),v.scrollLeft=T,E())},k=new ResizeObserver(()=>{w(),E()});return k.observe(v),v.addEventListener("scroll",N,{passive:!0}),v.addEventListener("wheel",j,{passive:!1}),()=>{y&&cancelAnimationFrame(y),k.disconnect(),v.removeEventListener("scroll",N),v.removeEventListener("wheel",j)}},[t,u]);const f=g=>{T0(t,g)||s(g)},h=g=>{var E;if(g.key!=="ArrowLeft"&&g.key!=="ArrowRight"&&g.key!=="Home"&&g.key!=="End"||n.length===0)return;g.preventDefault();const v=Math.max(0,n.findIndex(C=>T0(t,C.value)));let y=v;if(g.key==="ArrowRight"?y=Math.min(n.length-1,v+1):g.key==="ArrowLeft"?y=Math.max(0,v-1):g.key==="Home"?y=0:g.key==="End"&&(y=n.length-1),y===v)return;f(n[y].value);const w=(E=c.current)==null?void 0:E.querySelectorAll(":scope > button")[y];w==null||w.focus()},m=n.findIndex(g=>T0(t,g.value));return o.jsx("div",{ref:i,className:"sc-verticals-shell",children:o.jsxs("div",{ref:c,className:"sc-verticals",role:"tablist","aria-label":e,onKeyDown:h,children:[o.jsx("span",{className:"sc-verticals-ink","aria-hidden":!0}),n.map((g,v)=>{const y=T0(t,g.value);return o.jsxs("button",{type:"button",role:"tab","aria-selected":y,"data-on":y?"":void 0,tabIndex:y||m<0&&v===0?0:-1,onClick:()=>f(g.value),children:[o.jsx("span",{className:"sc-vlabel",children:g.label}),o.jsx("span",{className:"sc-vcount",children:g.count})]},g.value??"__all__")})]})})}function ld({mode:e,group:t}){if(e==="none"||!t)return null;const n=[{value:null,label:t.everyLabel,count:t.everyCount},...t.options.map(s=>({value:s.value,label:s.label,count:s.count}))];return o.jsx(b9,{"aria-label":t.label,activeKey:t.selected,items:n,onSelect:t.onSelect})}function uu({value:e,onChange:t,noun:n,total:s}){const i=r.useRef(null),[c,u]=r.useState(e.trim().length>0),f=r.useCallback(()=>{var m;na.flushSync(()=>u(!0)),(m=i.current)==null||m.focus()},[]);r.useEffect(()=>{e.trim().length>0&&u(!0)},[e]),r.useEffect(()=>{const m=g=>{if(g.key!=="/"||g.metaKey||g.ctrlKey||g.altKey)return;const v=g.target;v!=null&&v.isContentEditable||v&&/^(input|textarea|select)$/i.test(v.tagName)||(g.preventDefault(),f())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[f]);const h=m=>{var g;m.key==="Escape"&&(m.stopPropagation(),e?t(""):(u(!1),(g=i.current)==null||g.blur()))};return o.jsxs("div",{className:"sc-libsearch","data-open":c?"":void 0,children:[o.jsx("button",{type:"button",className:"sc-libsearch-toggle","aria-label":`Search ${n}`,"aria-expanded":c,tabIndex:c?-1:0,onClick:f,children:o.jsx(Tc,{size:16})}),o.jsxs("div",{className:"sc-libsearch-field",children:[o.jsx(Tc,{size:15,"aria-hidden":!0}),o.jsx("input",{ref:i,type:"search",value:e,placeholder:`Search ${s} ${n}`,"aria-label":`Search ${n}`,autoComplete:"off",autoCorrect:"off",spellCheck:!1,tabIndex:c?0:-1,onChange:m=>t(m.target.value),onKeyDown:h,onBlur:()=>{e.trim()||u(!1)}}),o.jsx("button",{type:"button",className:"sc-libsearch-clear","aria-label":"Clear search",hidden:!e,tabIndex:e?0:-1,onMouseDown:m=>m.preventDefault(),onClick:()=>{var m;t(""),(m=i.current)==null||m.focus()},children:o.jsx(Mn,{size:12,weight:"bold"})})]})]})}function Ks({shape:e,title:t,body:n,action:s,onRetry:i}){return e==="error"?o.jsxs(o.Fragment,{children:[o.jsx("h1",{children:t??"Couldn't load this library"}),o.jsx("p",{className:"sc-lookpage-lede",children:n}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:i,children:"Retry"})})]}):e==="cold"?o.jsxs("div",{className:"sc-canvas-empty",children:[t&&o.jsx("h3",{children:t}),o.jsx("p",{children:n}),s&&o.jsx("div",{className:"sc-lookpage-acts",children:s})]}):o.jsxs("div",{className:"sc-lib-zero",children:[o.jsx("p",{children:n}),s]})}function id({noun:e,q:t,facet:n,onClearSearch:s,onClearAll:i}){const c=t.trim(),u=c?o.jsxs(o.Fragment,{children:["No ",e," found for ",o.jsxs("em",{children:["“",c,"”"]}),n?` in ${n}`:""]}):o.jsxs(o.Fragment,{children:["No ",e," in ",n]});return o.jsx(Ks,{shape:"zero",body:u,action:o.jsxs("span",{className:"sc-lib-zero-acts",children:[c&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:s,children:"Clear search"}),c&&n&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:i,children:"Clear all"}),!c&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:i,children:"Clear filter"})]})})}const L_=150;function du(e){const[t,n]=li(),s=t.get("q")??"",i=e.join(","),c=r.useMemo(()=>{const j={};for(const k of i.split(",").filter(Boolean))j[k]=t.get(k)||null;return j},[t,i]),u=r.useCallback(j=>{n(k=>{const A=new URLSearchParams(k);for(const[M,T]of Object.entries(j))T===null||T===""?A.delete(M):A.set(M,T);return A},{replace:!0})},[n]),[f,h]=r.useState(s),m=r.useRef(s),g=r.useRef(null),v=r.useCallback(()=>{g.current!==null&&(clearTimeout(g.current),g.current=null)},[]);r.useEffect(()=>{s!==m.current&&(m.current=s,v(),h(s))},[s,v]),r.useEffect(()=>v,[v]);const y=r.useCallback(j=>{h(j),v(),g.current=setTimeout(()=>{g.current=null,m.current=j,u({q:j||null})},L_)},[u,v]),w=r.useCallback((j,k)=>u({[j]:k}),[u]),E=u,C=f.trim().length>0||Object.values(c).some(Boolean),b=r.useCallback(()=>{v(),h(""),m.current="",u({q:null})},[u,v]),N=r.useCallback(()=>{v(),h(""),m.current="";const j={q:null};for(const k of i.split(",").filter(Boolean))j[k]=null;u(j)},[u,v,i]);return{q:f,setQ:y,facets:c,setFacet:w,setFacets:E,active:C,clearSearch:b,clear:N}}const T_=8;function H_(){var Pt;const{engines:e,scenes:t,loaded:n,presenters:s,presentersLoaded:i,demoProducts:c,showcase:u,showcaseCategories:f,showcaseLoaded:h,showcaseError:m,refetchShowcase:g}=pn(),{brand:v,workspace:y,nodes:w,products:E}=It(),C=ol(),b=an(),{push:N}=mr(),j=pp(),k=gp(),A=DF(),M=lo(bi),{q:T,setQ:D,facets:L,setFacet:Y,clearSearch:I,clear:se}=du(["category"]),U=L.category,te=Ne=>Y("category",Ne),O=T.trim().length>0,[ne,Q]=Ia(cr.wallDensity,zo),H=ll(ne),K=Ne=>Q(Ne),X=rd(H),W=ou(H),P=Ne=>{const Ae=new URLSearchParams(Ne??{}).toString();b(`${ur(v)}${Ae?`?${Ae}`:""}`)},Z=E.length?E:((Pt=v.json)==null?void 0:Pt.products)??[],ae=Ne=>{var kt,Qt,Jt;const Ae=(kt=Ne.brief.tokens.find(Ot=>Ot.t==="product"))==null?void 0:kt.id,Ee=(Qt=Ne.brief.tokens.find(Ot=>Ot.t==="character"))==null?void 0:Qt.id,at=(Jt=Ne.brief.tokens.find(Ot=>Ot.t==="template"))==null?void 0:Jt.id;return{product:Ae?c.find(Ot=>Ot.id===Ae):void 0,presenter:Ee?s.find(Ot=>Ot.id===Ee):void 0,scene:at?t.find(Ot=>Ot.id===at):void 0}},G=r.useMemo(()=>{const Ne=new Map;for(const Ae of u){const{product:Ee,presenter:at,scene:kt}=ae(Ae);Ne.set(Ae.id,HF(Ae,{product:Ee,presenter:at,scene:kt},w2(Ae.category)))}return Ne},[u,c,s,t]),fe=r.useMemo(()=>(U?u.filter(Ae=>Ae.category===U):u).filter(Ae=>xa(G.get(Ae.id)??Ae.title,T)),[u,U,T,G]),le=r.useMemo(()=>{const Ne=OF(f);return{key:"category",label:"Categories",everyLabel:"All examples",everyCount:u.length,selected:U,onSelect:te,options:Ne.map(Ae=>({value:Ae,label:w2(Ae)??Ae,count:u.filter(Ee=>Ee.category===Ae).length}))}},[u,f,U,te]),me=Ne=>{const{product:Ae,presenter:Ee,scene:at}=ae(Ne);return{productName:Ae?Oa(Ae,"chip"):null,productPreviewUrl:(Ae==null?void 0:Ae.previewUrl)??null,productId:(Ae==null?void 0:Ae.id)??null,presenterName:(Ee==null?void 0:Ee.name)??null,presenterPreviewUrl:(Ee==null?void 0:Ee.avatarUrl)??(Ee==null?void 0:Ee.previewUrl)??null,presenterId:(Ee==null?void 0:Ee.id)??null,sceneName:at?to(at,"chip"):null,scenePreviewUrl:(at==null?void 0:at.previewUrl)??null,sceneId:(at==null?void 0:at.id)??null}},[J,ge]=r.useState(null),Qe=M?A:Ne=>{const Ae=u.find(Ee=>Ee.id===Ne);Ae&&(ge(wh(Ae)),N({kind:"success",title:`Starting from "${Ae.title}"`}))},ye=w.find(Ne=>Ne.kind==="root")??null,ke=()=>{var Ee;const Ae=[...Za(v.id)].reverse().find(at=>t.some(kt=>kt.id===at))??((Ee=t[0])==null?void 0:Ee.id);P(Ae?{scene:Ae,attach:"products",compose:"1"}:{attach:"products",compose:"1"})},lt=r.useMemo(()=>{const Ne=Za(v.id);return l9(t,Ae=>Ne.includes(Ae.id)).slice(0,8)},[t,v.id]),jt=r.useMemo(()=>{var Jt,Ot,xn,Rn,Wn,Pn,Zt,tt;const Ne=new Set,Ae=qe=>!qe||Ne.has(qe)?null:(Ne.add(qe),qe),Ee=qe=>{for(const Ut of qe){const Vt=u.find(ue=>ue.id===Ut&&ue.previewUrl),z=Ae(Vt==null?void 0:Vt.previewUrl);if(z)return z}return null},at=qe=>{for(const Ut of qe){const Vt=t.find(ue=>ue.id===Ut&&ue.previewUrl),z=Ae(Vt==null?void 0:Vt.previewUrl);if(z)return z}return null},kt=qe=>{for(const Ut of u)if(!(!Ut.previewUrl||Ne.has(Ut.previewUrl))&&!(qe&&!Ut.brief.tokens.some(Vt=>Vt.t===qe)))return Ae(Ut.previewUrl);return null},Qt=Z.find(qe=>{var Ut,Vt;return _n((Vt=(Ut=qe==null?void 0:qe.shots)==null?void 0:Ut[0])==null?void 0:Vt.file)});return{compose:Ae(Qt?_n((Ot=(Jt=Qt.shots)==null?void 0:Jt[0])==null?void 0:Ot.file):null)??Ee(["aurelia-serum-succulent-dew","verity-pearls-suspended-silk","solstice-aviators-screen-print"])??Ae((xn=c.find(qe=>qe.id==="aurelia-amber-serum"))==null?void 0:xn.previewUrl)??Ae((Rn=c.find(qe=>qe.previewUrl))==null?void 0:Rn.previewUrl)??kt("product"),product:Ee(["voss-rowe-runner-volcanic-ash","birchwood-salt-flat","voss-rowe-dune-slip-face"])??Ae((Wn=c.find(qe=>qe.id==="voss-rowe-trail-runner"))==null?void 0:Wn.previewUrl)??kt("product"),presenter:Ae((Pn=s.find(qe=>qe.id==="maren"))==null?void 0:Pn.avatarUrl)??Ae((Zt=s.find(qe=>qe.avatarUrl))==null?void 0:Zt.avatarUrl)??Ae((tt=s.find(qe=>qe.previewUrl))==null?void 0:tt.previewUrl)??kt("character"),scene:at(["furniture-travertine-atrium","wide-establishing-environment","studio-soft-horizon","studio-volcanic-ash-field","furniture-lamplight-hours"])??Ee(["moss-larkin-chair-travertine-atrium","calder-snow-loft","basalt-snells-window"])??kt("template")}},[t,s,Z,c,u]);return o.jsxs(dr,{children:[o.jsxs("main",{className:"sc-main",id:"main","data-no-dock":M||void 0,children:[o.jsxs("h1",{className:"sc-greet",children:["Compose a shot ",o.jsx("em",{children:"on brand"})]}),o.jsxs("div",{className:"sc-create-grid",children:[o.jsxs("button",{type:"button",className:"sc-create-card","data-tone":"compose","data-main":"",onClick:ke,children:[o.jsx(E9,{thumbUrl:jt.compose,fallback:o.jsx(aH,{size:22,weight:"fill"})}),o.jsx("b",{children:"Create an image"})]}),o.jsx(M2,{tone:"product",title:"Add a product",count:Z.length,thumbUrl:jt.product,icon:o.jsx(Xm,{size:22,weight:"fill"}),onClick:()=>C("product")}),o.jsx(M2,{tone:"presenter",title:"Create a presenter",thumbUrl:jt.presenter,icon:o.jsx(LH,{size:22,weight:"fill"}),onClick:()=>C("presenter")}),o.jsx(M2,{tone:"scene",title:"Create a scene",thumbUrl:jt.scene,icon:o.jsx(EH,{size:22,weight:"fill"}),onClick:()=>C("scene")})]}),!h&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":W,style:X,"aria-hidden":!0,children:o.jsx(N_,{size:"grid",count:8})}),h&&m&&o.jsxs("p",{className:"sc-feed-empty",children:["Couldn't load the showcase gallery."," ",o.jsx("button",{type:"button",className:"sc-sec-more",onClick:()=>g(),children:"Retry"})]}),h&&!m&&u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(od,{filters:o.jsx(ld,{mode:"tabs",group:le}),search:u.length>=T_&&o.jsx(uu,{value:T,onChange:D,noun:"examples",total:u.length}),density:o.jsx(nd,{value:H,onChange:K})}),fe.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":W,style:X,children:fe.map(Ne=>o.jsx(v9,{entry:Ne,size:"grid",onOpen:Qe,onOpenProduct:Ae=>b(Js(v,Ae)),onOpenPresenter:Ae=>b(al(v,Ae)),onOpenScene:Ae=>b(rl(v,Ae)),...me(Ne)},Ne.id))}),fe.length===0&&(O?o.jsx(id,{noun:"examples",q:T,facet:U?w2(U):null,onClearSearch:I,onClearAll:se}):o.jsx("p",{className:"sc-looks-empty",children:"No example carries that category yet."}))]}),!i&&o.jsx("div",{className:"sc-masonry","aria-hidden":!0,children:o.jsx(x9,{size:"grid",count:8})}),i&&s.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-sec-head",children:[o.jsx("span",{className:"sc-sec-title",children:"Presenters"}),o.jsx("button",{type:"button",className:"sc-sec-more",onClick:()=>b(vc(v)),children:"Browse presenters"})]}),o.jsx("div",{className:"sc-masonry",children:s.slice(0,8).map(Ne=>o.jsx(g1,{presenter:Ne,variant:"navigate",size:"grid",onOpen:j},Ne.id))})]}),!n&&o.jsx("div",{className:"sc-masonry","aria-hidden":!0,children:o.jsx(w9,{size:"grid",count:8})}),n&&t.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-sec-head",children:[o.jsx("span",{className:"sc-sec-title",children:"Scenes"}),o.jsx("button",{type:"button",className:"sc-sec-more",onClick:()=>b(gc(v)),children:"Browse scenes"})]}),o.jsx("div",{className:"sc-masonry",children:lt.map(Ne=>o.jsx($c,{scene:Ne,variant:"navigate",size:"grid",onOpen:k},Ne.id))})]})]}),!M&&o.jsx(g9,{children:o.jsx(bp,{projectId:(y==null?void 0:y.id)||null,brand:v,engines:e,parent:ye,shots:w,initialBrief:J,onQueued:()=>b(ur(v))})})]})}function M2({tone:e,title:t,icon:n,count:s,thumbUrl:i,onClick:c}){return o.jsxs("button",{type:"button",className:"sc-create-card","data-tone":e,onClick:c,children:[o.jsx(E9,{thumbUrl:i,fallback:n}),o.jsxs("b",{children:[t,s?o.jsx(E5,{variant:"soft",radius:"full",size:"1",children:s}):null]})]})}function E9({thumbUrl:e,fallback:t}){return o.jsx("span",{className:"sc-glyph","data-photo":e?"":void 0,"aria-hidden":!0,children:e?o.jsx("span",{className:"sc-glyph-shot",children:o.jsx("img",{src:e,alt:"",loading:"lazy"})}):t})}function C9({build:e,onCancel:t,onRetry:n,onDismiss:s}){const i=e.stage==="failed",c=e.steps>0?Math.round(e.step/e.steps*100):0,u=i?oo(e.error):null,f=u?u.title:e.message??"Starting",h=[...e.warnings,...e.coverage];return o.jsxs("div",{className:"sc-lookcard","data-variant":"plain","data-size":"grid","data-build":!0,"data-building":!i||void 0,children:[o.jsxs("div",{className:"sc-lookcard-media",children:[e.previewHash?o.jsx("img",{src:rn(e.previewHash),alt:""}):o.jsx("span",{className:"sc-lookcard-blank",children:i?null:o.jsx(ln,{})}),!i&&o.jsx("span",{className:"sc-buildbar","aria-hidden":!0,children:o.jsx("span",{style:{width:`${Math.max(6,c)}%`}})}),!i&&t&&o.jsx("button",{type:"button",className:"sc-cardpuck","aria-label":`Stop building ${e.name}`,onClick:()=>t(e.id),children:o.jsx(Mn,{size:13})}),i&&s&&o.jsx("button",{type:"button",className:"sc-cardpuck","aria-label":`Dismiss ${e.name}`,onClick:()=>s(e.id),children:o.jsx(Mn,{size:13})}),i&&n&&o.jsxs("button",{type:"button",className:"sc-lookcard-use",onClick:()=>n(e),children:[o.jsx(Gm,{size:12})," Try again"]})]}),o.jsxs("span",{className:"sc-lookcard-cap",title:(u==null?void 0:u.raw)||f,children:[o.jsx("b",{dir:"auto",children:e.name}),o.jsx("span",{children:f})]}),h.length>0&&o.jsx("ul",{className:"sc-buildnotes",children:h.slice(0,2).map(m=>o.jsx("li",{children:m},m))})]})}function Ep({label:e}){return o.jsx("div",{className:"sc-starter-rule",children:o.jsx("span",{children:e})})}const R2=60;function Cp(e,t){const[n,s]=r.useState(R2);r.useEffect(()=>{s(R2)},[t]);const{visible:i,remaining:c}=o9(e,n);return{visible:i,remaining:c,showMore:()=>s(f=>f+R2)}}const D_=8,P2="__bookmarked";function $_(){const{scenes:e,collections:t,verticals:n,loaded:s,error:i,refetch:c}=pn(),{brand:u}=It(),f=an(),[h,m]=r.useState(()=>Za(u.id)),g=Ee=>m(Ww(u.id,Ee)),v=gp(),{builds:y,poke:w}=sl(),E=ol(),C=r.useMemo(()=>su(u),[u]),b=y.filter(Ee=>Ee.kind==="scene"&&(!Ee.finished||Ee.stage==="failed")),{q:N,setQ:j,facets:k,setFacets:A,clearSearch:M,clear:T}=du(["vertical","bookmarked"]),D=k.vertical,L=k.bookmarked==="1",Y=N.trim().length>0,[I,se]=Ia(cr.wallDensity,zo),U=ll(I),te=Ee=>se(Ee),O=rd(U),ne=ou(U),Q=Ee=>f(rl(u,Ee)),H=r.useMemo(()=>L?e.filter(Ee=>h.includes(Ee.id)):D?e.filter(Ee=>Ee.verticals.includes(D)):e,[e,D,L,h]),X=!(C.length>0||b.length>0),W=e.reduce((Ee,at)=>Ee+(h.includes(at.id)?1:0),0),P=L&&W===0,Z=P&&X,ae=P&&!X,G=Y||L&&!Z,fe=r.useMemo(()=>Z?e:H,[Z,e,H]),le=r.useMemo(()=>fe.filter(Ee=>xa(d1(Ee),N)),[fe,N]),{visible:me,remaining:J,showMore:ge}=Cp(le,`${D??""}|${L?"bookmarked":""}|${Z?"browse":""}|${N}`),He=Ee=>[...C,...e].filter(at=>!at.verticals.length||at.verticals.includes(Ee)).length,Qe=[{value:P2,label:"Bookmarks",count:W},...n.map(Ee=>({value:Ee,label:Ee,count:He(Ee)}))],ye=e.length>0?"tabs":"none",ke={key:"vertical",label:"Vertical",everyLabel:"Every scene",everyCount:e.length+C.length,selected:L?P2:D,onSelect:Ee=>A(Ee===P2?{bookmarked:"1",vertical:null}:{bookmarked:null,vertical:Ee}),options:Qe},lt=r.useMemo(()=>C.filter(Ee=>D?!Ee.verticals.length||Ee.verticals.includes(D):!0).filter(Ee=>xa(d1(Ee),N)),[C,D,N]),jt=!L&&(b.length>0||lt.length>0),Pt=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>E("scene"),children:[o.jsx(tr,{size:12})," Create scene"]}),Ne=(Ee,at=!1)=>o.jsx("div",{className:"sc-masonry","data-wall":at||void 0,"data-density":!0,"data-density-size":ne,style:O,children:Ee.map(kt=>o.jsx($c,{scene:kt,variant:"use",size:"grid",onOpen:Q,onUse:v,bookmarked:h.includes(kt.id),onBookmark:g},kt.id))}),Ae=o.jsx(od,{title:"Scenes",filters:o.jsx(ld,{mode:ye,group:ke}),density:o.jsx(nd,{value:U,onChange:te}),search:e.length>=D_&&o.jsx(uu,{value:N,onChange:j,noun:"scenes",total:e.length}),action:X?void 0:Pt});return o.jsx(dr,{children:o.jsxs("main",{className:"sc-looks sc-scenes",id:"main","data-hero":X||void 0,children:[!X&&Ae,jt&&o.jsxs("section",{className:"sc-owned",children:[o.jsx("div",{className:"sc-sec-head",children:o.jsx("h2",{className:"sc-sec-title",children:"Your scenes"})}),o.jsxs("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":ne,style:O,children:[b.map(Ee=>o.jsx(C9,{build:Ee,onCancel:at=>void Ce.cancelAssetBuild(u.id,at).then(w),onDismiss:at=>void Ce.deleteAssetBuild(u.id,at).then(w),onRetry:()=>E("scene")},Ee.id)),lt.map(Ee=>o.jsx($c,{scene:Ee,variant:"use",size:"grid",onOpen:Q,onUse:v},Ee.id))]})]}),X&&s&&!i&&e.length>0&&o.jsx(Ks,{shape:"cold",title:o.jsxs(o.Fragment,{children:["Build your own ",o.jsx("em",{children:"scene"})]}),body:"Upload a few references of a place, and its light and materials carry into every image you make.",action:Pt}),jt&&s&&!i&&!L&&H.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri scenes"})}),X&&s&&!i&&e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Ep,{label:"Or start from one of ours"}),Ae]}),!s&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":ne,style:O,"aria-hidden":!0,children:o.jsx(w9,{size:"grid",count:8})}),s&&i&&o.jsx(Ks,{shape:"error",title:"Couldn't load this library",body:"Something went wrong reaching the catalog.",onRetry:()=>c()}),s&&!i&&!G&&t.map(Ee=>{const at=fe.filter(kt=>kt.collections.includes(Ee));return at.length?o.jsxs("section",{className:"sc-coll",children:[o.jsx("h2",{children:Ee}),Ne(at)]},Ee):null}),s&&!i&&G&&me.length>0&&Ne(me,!0),s&&!i&&ae&&o.jsx(Ks,{shape:"zero",body:"Nothing bookmarked yet. Bookmark a scene from its card and it stays here.",action:o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>A({bookmarked:null}),children:"Browse every scene"})}),s&&!i&&e.length>0&&!ae&&le.length===0&<.length===0&&o.jsx(id,{noun:"scenes",q:N,facet:Z?null:L?"Bookmarks":D,onClearSearch:M,onClearAll:T}),G&&J>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:ge,children:["Show ",Math.min(J,60)," more"]})})]})})}function v1({src:e}){const[t,n]=r.useState(!1);return o.jsx("div",{className:"sc-lookpage-ref",children:t?o.jsx("span",{className:"sc-lookpage-ref-blank",children:o.jsx(Wa,{size:20})}):o.jsx("img",{src:e,alt:"",loading:"lazy",onError:()=>n(!0)})})}function S9(){return o.jsx("div",{className:"sc-lookpage-refs",children:o.jsx("div",{className:"sc-lookpage-ref",children:o.jsx("span",{className:"sc-lookpage-ref-blank",children:o.jsx(Wa,{size:20})})})})}function Sp({node:e,onClick:t}){const[n,s]=r.useState(!1);return o.jsx("button",{type:"button",className:"sc-lookcard","aria-label":`Open ${Cn(e)}`,onClick:t,children:n?o.jsx("span",{className:"sc-lookcard-blank",children:o.jsx(Wa,{size:20})}):o.jsx("img",{src:rn(e.images[0]),alt:"",loading:"lazy",onError:()=>s(!0)})})}function To({label:e,children:t}){const n=r.useRef(null),s=r.useRef(null),i=r.useRef(!1),c=r.useRef(()=>{});r.useLayoutEffect(()=>{const f=n.current,h=s.current;if(!f||!h)return;let m=0;const g=()=>{const w=h.scrollWidth-h.clientWidth;if(w<=1){delete f.dataset.overflowLeft,delete f.dataset.overflowRight;return}h.scrollLeft>2?f.dataset.overflowLeft="":delete f.dataset.overflowLeft,h.scrollLeft<w-2?f.dataset.overflowRight="":delete f.dataset.overflowRight};c.current=g,g();const v=()=>{m||(m=requestAnimationFrame(()=>{m=0,g()}))},y=new ResizeObserver(()=>g());return y.observe(h),h.addEventListener("scroll",v,{passive:!0}),()=>{m&&cancelAnimationFrame(m),c.current=()=>{},y.disconnect(),h.removeEventListener("scroll",v)}},[]);const u=f=>{const h=s.current;if(!(h!=null&&h.firstElementChild)||i.current)return;const m=h.firstElementChild.getBoundingClientRect().width+16,g=h.scrollWidth/2;f<0&&h.scrollLeft<m&&(h.scrollLeft+=g);const v=h.scrollLeft,y=f*m,w=performance.now();i.current=!0;const E=C=>{const b=Math.min(1,(C-w)/420);h.scrollLeft=v+y*(1-(1-b)**3),c.current(),b<1?requestAnimationFrame(E):(i.current=!1,h.scrollLeft>=g&&(h.scrollLeft-=g),c.current())};requestAnimationFrame(E)};return o.jsxs("section",{className:"sc-lookpage-band",children:[o.jsx("p",{className:"sc-bandhead",children:e}),o.jsxs("div",{className:"sc-slider",ref:n,children:[o.jsx("button",{type:"button",className:"sc-slider-arrow prev","aria-label":"Previous",onClick:()=>u(-1),children:o.jsx(wi,{size:13,weight:"bold"})}),o.jsx("button",{type:"button",className:"sc-slider-arrow next","aria-label":"Next",onClick:()=>u(1),children:o.jsx(K1,{size:13,weight:"bold"})}),o.jsxs("div",{className:"sc-slider-track",ref:s,children:[t,t]})]})]})}const F_="(max-width: 760px)";function I_(){const{sceneId:e=""}=za(),{scenes:t,loaded:n,error:s,refetch:i,applyBrand:c}=pn(),{brand:u,nodes:f}=It(),h=an(),m=gp(),g=u.id,[v,y]=r.useState([]),[w,E]=r.useState(()=>Za(g)),[C,b]=Os("all"),N=C==="1",k=lo(F_)?4:3,A=ye=>h(rl(u,ye)),M=RD(u,e),T=M??t.find(ye=>ye.id===e);r.useEffect(()=>{let ye=!0;if(y([]),!M)return Ce.sceneFrames(e).then(ke=>{ye&&y(ke.frames)}).catch(()=>{ye&&y([])}),()=>{ye=!1}},[e,M]);const D=r.useMemo(()=>f.filter(ye=>{var ke;return ye.status==="done"&&ye.images.length>0&&(((ke=ye.brief)==null?void 0:ke.tokens)??[]).some(lt=>(lt==null?void 0:lt.t)==="template"&<.id===e)}).slice(-12).reverse(),[f,e]),L=r.useMemo(()=>{if(!T)return[];return t.filter(lt=>lt.id!==T.id).sort((lt,jt)=>ke(jt)-ke(lt)).slice(0,8);function ke(lt){const jt=lt.lighting.split(/[ ,]+/).some(Ne=>Ne.length>3&&T.lighting.toLowerCase().includes(Ne.toLowerCase())),Pt=lt.collections.some(Ne=>T.collections.includes(Ne));return(jt?2:0)+(Pt?1:0)}},[t,T]),Y=r.useMemo(()=>{if(T||!n||s)return[];const ye=Za(g);return l9(t,ke=>ye.includes(ke.id)).slice(0,6)},[T,n,s,t,g]),[I,se]=r.useState((M==null?void 0:M.name)??""),[U,te]=r.useState((M==null?void 0:M.description)??""),[O,ne]=r.useState((M==null?void 0:M.lighting)??""),[Q,H]=r.useState((M==null?void 0:M.prompt)??""),[K,X]=r.useState(null),[W,P]=r.useState(!1),[Z,ae]=r.useState(!1),G=r.useRef(void 0);r.useEffect(()=>{se((M==null?void 0:M.name)??""),te((M==null?void 0:M.description)??""),ne((M==null?void 0:M.lighting)??""),H((M==null?void 0:M.prompt)??"")},[M==null?void 0:M.id]);const fe=ye=>{M&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{Ce.updateScene(u.id,M.id,ye).then(ke=>{c(ke.brand),X(ke.warnings[0]??null)}).catch(ke=>X(String(ke.message??ke)))},500))},le=async()=>{if(M){P(!0),X(null);try{c((await Ce.generateScenePreview(u.id,M.id)).brand)}catch(ye){X(String(ye.message??ye))}finally{P(!1)}}},me=async()=>{if(M){ae(!0);try{await Ce.deleteScene(u.id,M.id),h(gc(u))}catch(ye){X(String(ye.message??ye)),ae(!1)}}};if(!n&&!M)return o.jsx(dr,{children:o.jsx("main",{className:"sc-lookpage",id:"main",children:o.jsx("div",{className:"sc-tplrow","aria-hidden":!0})})});if(s&&!M)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"Couldn't load this scene"}),o.jsx("p",{className:"sc-lookpage-lede",children:"Something went wrong reaching the catalog."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>i(),children:"Retry"})})]})});if(!T)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"This scene isn't here anymore"}),o.jsx("p",{className:"sc-lookpage-lede",children:"It may have been removed from the catalog, or the link is out of date."}),o.jsxs("div",{className:"sc-lookpage-acts",children:[o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>h(`${ur(u)}?compose=1`),children:"Start from scratch"}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>h(gc(u)),children:"Browse all scenes"})]}),Y.length>0&&o.jsx(To,{label:"You might like",children:Y.map(ye=>o.jsx($c,{scene:ye,variant:"navigate",size:"slider",onOpen:A},ye.id))})]})});const J=N?v:v.slice(0,k),ge=M?M.previewUrl?[M.previewUrl]:[]:v.length?J:T.previewUrl?[T.previewUrl]:[],He=!M&&T.subject!=="person"&&ge.length>0,Qe=w.includes(T.id);return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsxs("div",{className:"sc-lookpage-crumb",children:[o.jsx("button",{type:"button",onClick:()=>h(gc(u)),children:"Scenes"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:M?"Yours":T.collections[0]})]}),M?o.jsx(Kl,{className:"sc-ownededit-title",value:I,"aria-label":"Scene name",onChange:ye=>{se(ye.target.value),fe({name:ye.target.value})}}):o.jsx("h1",{children:T.name}),M?o.jsx(Kl,{className:"sc-ownededit-lede",value:U,placeholder:"One sentence for the card","aria-label":"Description",onChange:ye=>{te(ye.target.value),fe({description:ye.target.value})}}):o.jsx("p",{className:"sc-lookpage-lede",children:T.description}),o.jsxs("p",{className:"sc-lookpage-facts",children:[T.lighting," · ",T.subject==="either"?"product or person":`for a ${T.subject}`," ·"," ",T.width===T.height?"square by default":`${T.width}×${T.height} by default`]}),o.jsxs("div",{className:"sc-lookpage-acts",children:[o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>void m(T.id),children:"Use in a shot"}),!M&&o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost","aria-pressed":Qe,onClick:()=>E(Ww(g,T.id)),children:[o.jsx(G1,{size:13,weight:Qe?"fill":"regular"}),o.jsx("span",{children:Qe?"Bookmarked":"Bookmark"})]}),M&&o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:W,onClick:()=>void le(),children:[W?o.jsx(ln,{size:"1"}):o.jsx(Gm,{size:13}),o.jsx("span",{children:M.previewUrl?"Redraw the example":"Draw an example"})]})]}),K&&o.jsx("p",{className:"sc-assetform-err",children:K}),ge.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:ge.map(ye=>o.jsx(v1,{src:ye},ye))}),He&&o.jsx("p",{className:"sc-lookpage-note",children:"Shown with a demo product for reference. Yours replaces it."}),M&&o.jsx("p",{className:"sc-lookpage-note",children:"The place with nothing staged in it. Whatever you attach to a shot goes here."}),!M&&v.length>k&&o.jsx("button",{type:"button",className:"sc-lookpage-expand",onClick:()=>b(N?null:"1"),children:N?"Enough, close it":"See the whole set"})]}):o.jsx(S9,{}),M&&o.jsxs("div",{className:"sc-ownedbits",children:[M.refs.length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"Your references"}),o.jsx("p",{className:"sc-ownedbits-note",children:"What this scene was read from. Kept here to look at: a scene reaches a shot as words, never as pixels, so nothing in these images can turn up in a render on its own."}),o.jsx("div",{className:"sc-lookpage-refs",children:M.refs.map(ye=>o.jsx(v1,{src:ye},ye))})]}),o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"The place itself"}),o.jsx("p",{className:"sc-ownedbits-note",children:"Sent with every shot built here. Describe the world, not what stands in it."}),o.jsx(Wm,{value:Q,rows:5,onChange:ye=>{H(ye.target.value),fe({prompt:ye.target.value})}}),o.jsx(Kl,{mt:"2",value:O,placeholder:"The light, in a short phrase","aria-label":"Lighting",onChange:ye=>{ne(ye.target.value),fe({lighting:ye.target.value})}}),M.instruction&&o.jsxs("p",{className:"sc-ownedbits-note",children:["You asked for: ",M.instruction]})]}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(is,{label:"Delete scene",title:`Delete ${M.name}?`,body:"Shots already made here keep their images and their recipe. Only future shots lose it.",busy:Z,onConfirm:()=>void me()})})]}),D.length>0&&o.jsx(To,{label:"Your shots in this scene",children:D.map(ye=>o.jsx(Sp,{node:ye,onClick:()=>h(q1(u,null,ye.id))},ye.id))}),L.length>0&&o.jsx(To,{label:"Other scenes, similar light",children:L.map(ye=>o.jsx($c,{scene:ye,variant:"navigate",size:"slider",onOpen:A},ye.id))})]})})}const __=8;function O_(){const{presenters:e,presenterCategories:t,presentersLoaded:n,presentersError:s,refetchPresenters:i}=pn(),{brand:c}=It(),u=an(),f=pp(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=du(["category"]),E=g.category,{builds:C,poke:b}=sl(),N=ol(),j=r.useMemo(()=>J1(c),[c]),k=C.filter(G=>G.kind==="presenter"&&(!G.finished||G.stage==="failed")),[A,M]=Ia(cr.wallDensity,zo),T=ll(A),D=G=>M(G),L=rd(T),Y=ou(T),I=G=>u(al(c,G)),se=r.useMemo(()=>E?e.filter(G=>G.suitableCategories.includes(E)):e,[e,E]),U=r.useMemo(()=>se.filter(G=>xa(f1(G),h)),[se,h]),{visible:te,remaining:O,showMore:ne}=Cp(U,`${E??""}|${h}`),Q=s9(t.length),H=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>N("presenter"),children:[o.jsx(tr,{size:12})," Create presenter"]}),K=r.useMemo(()=>j.filter(G=>E?!G.suitableCategories.length||G.suitableCategories.includes(E):!0).filter(G=>xa(f1(G),h)),[j,E,h]),X=j.length>0||k.length>0,W=k.length>0||K.length>0,P=!X,Z={key:"category",label:"Category",everyLabel:"Every presenter",everyCount:e.length+j.length,selected:E,onSelect:G=>v("category",G),options:t.map(G=>({value:G,label:G,count:[...j,...e].filter(fe=>!fe.suitableCategories.length||fe.suitableCategories.includes(G)).length}))},ae=o.jsx(od,{title:"Presenters",filters:o.jsx(ld,{mode:Q,group:Z}),density:o.jsx(nd,{value:T,onChange:D}),search:e.length>=__&&o.jsx(uu,{value:h,onChange:m,noun:"presenters",total:e.length}),action:P?void 0:H});return o.jsx(dr,{children:o.jsxs("main",{className:"sc-looks sc-presenters",id:"main","data-hero":P||void 0,children:[!P&&ae,W&&o.jsxs("section",{className:"sc-owned",children:[o.jsx("div",{className:"sc-sec-head",children:o.jsx("h2",{className:"sc-sec-title",children:"Your presenters"})}),o.jsxs("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":Y,style:L,children:[k.map(G=>o.jsx(C9,{build:G,onCancel:fe=>void Ce.cancelAssetBuild(c.id,fe).then(b),onDismiss:fe=>void Ce.deleteAssetBuild(c.id,fe).then(b),onRetry:()=>N("presenter")},G.id)),K.map(G=>o.jsx(g1,{presenter:G,variant:"use",size:"grid",onOpen:I,onUse:f},G.id))]})]}),P&&n&&!s&&e.length>0&&o.jsx(Ks,{shape:"cold",title:o.jsxs(o.Fragment,{children:["Cast your own ",o.jsx("em",{children:"presenter"})]}),body:"Upload a few photos of one person, and they stay the same person in every image you make.",action:H}),W&&n&&!s&&te.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri presenters"})}),!n&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":Y,style:L,"aria-hidden":!0,children:o.jsx(x9,{size:"grid",count:8})}),n&&s&&o.jsx(Ks,{shape:"error",title:"Couldn't load the presenter library",body:"Something went wrong reaching the catalog.",onRetry:()=>i()}),P&&n&&!s&&e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Ep,{label:"Or cast someone from ours"}),ae]}),n&&!s&&te.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":Y,style:L,children:te.map(G=>o.jsx(g1,{presenter:G,variant:"use",size:"grid",onOpen:I,onUse:f},G.id))}),n&&!s&&!U.length&&e.length>0&&o.jsx(id,{noun:"presenters",q:h,facet:E,onClearSearch:y,onClearAll:w}),n&&!s&&!e.length&&o.jsx(Ks,{shape:"zero",body:"The presenter library is still being cast. Check back soon."}),O>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:ne,children:["Show ",Math.min(O,60)," more"]})})]})})}const Qg=4;function Z_(){var ae;const{presenterId:e=""}=za(),{presenters:t,presentersLoaded:n,presentersError:s,refetchPresenters:i,applyBrand:c}=pn(),{brand:u,nodes:f}=It(),h=an(),m=pp(),[g,v]=r.useState([]),[y,w]=Os("all"),E=y==="1",C=AD(u,e),b=C??t.find(G=>G.id===e);r.useEffect(()=>{let G=!0;if(v([]),!C)return Ce.presenterFrames(e).then(fe=>{G&&v(fe.frames)}).catch(()=>{G&&v([])}),()=>{G=!1}},[e,C]);const j=(((ae=u.json)==null?void 0:ae.characters)??[]).find(G=>G.presenterId===e),k=r.useMemo(()=>f.filter(G=>{var fe;return G.status==="done"&&G.images.length>0&&(((fe=G.brief)==null?void 0:fe.tokens)??[]).some(le=>(le==null?void 0:le.t)==="character"&&(le.id===e||le.id===(j==null?void 0:j.id)))}).slice(-12).reverse(),[f,e,j]),[A,M]=r.useState((C==null?void 0:C.name)??""),[T,D]=r.useState((C==null?void 0:C.descriptor)??""),[L,Y]=r.useState((C==null?void 0:C.identityNotes)??""),[I,se]=r.useState(null),[U,te]=r.useState(!1),O=r.useRef(void 0);r.useEffect(()=>{M((C==null?void 0:C.name)??""),D((C==null?void 0:C.descriptor)??""),Y((C==null?void 0:C.identityNotes)??"")},[C==null?void 0:C.id]);const ne=G=>{C&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{Ce.updatePresenter(u.id,C.id,G).then(fe=>c(fe.brand)).catch(fe=>se(String(fe.message??fe)))},500))},Q=async()=>{if(C){te(!0);try{await Ce.deletePresenter(u.id,C.id),h(vc(u))}catch(G){se(String(G.message??G)),te(!1)}}};if(!n&&!C)return o.jsx(dr,{children:o.jsx("main",{className:"sc-lookpage",id:"main",children:o.jsx("div",{className:"sc-tplrow","aria-hidden":!0})})});if(s&&!C)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"Couldn't load this presenter"}),o.jsx("p",{className:"sc-lookpage-lede",children:"Something went wrong reaching the catalog."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>i(),children:"Retry"})})]})});if(!b)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"This presenter isn't here anymore"}),o.jsx("p",{className:"sc-lookpage-lede",children:"They may have been removed from the catalog, or the link is out of date."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>h(vc(u)),children:"Browse presenters"})})]})});const H=(C==null?void 0:C.shots)??[],K=E?g:g.slice(0,Qg),X=C?H:g.length?K:b.previewUrl?[b.previewUrl]:[],W=t.filter(G=>G.id!==b.id).slice(0,8),P=!!b.avatarUrl,Z=b.avatarUrl??b.previewUrl??g[0]??null;return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage sc-presenterpage",id:"main",children:[o.jsxs("div",{className:"sc-lookpage-crumb",children:[o.jsx("button",{type:"button",onClick:()=>h(vc(u)),children:"Presenters"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:C?"Yours":b.suitableStyles[0]??b.presentation})]}),Z?o.jsx("div",{className:"sc-presenterpage-avatar","data-avatar":P||void 0,"aria-hidden":!0,children:o.jsx("img",{src:Z,alt:""})}):null,C?o.jsx(Kl,{className:"sc-ownededit-title",value:A,"aria-label":"Their name",onChange:G=>{M(G.target.value),ne({name:G.target.value})}}):o.jsx("h1",{children:b.name}),C?o.jsx(Kl,{className:"sc-ownededit-lede",value:T,placeholder:"A short caption for the card","aria-label":"Caption",onChange:G=>{D(G.target.value),ne({descriptor:G.target.value})}}):o.jsx("p",{className:"sc-lookpage-lede",children:b.descriptor}),o.jsx("p",{className:"sc-lookpage-facts",children:[b.ageRange,b.hair,b.suitableCategories.join(", ")].filter(Boolean).join(" · ")}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>m(e),children:"Use in a shot"})}),I&&o.jsx("p",{className:"sc-assetform-err",children:I}),X.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:X.map((G,fe)=>o.jsxs("div",{className:"sc-ownedref","data-engine":C&&fe<2?"":void 0,children:[o.jsx(v1,{src:G}),C&&fe<2&&o.jsx("span",{className:"sc-ownedref-tag",children:"Used in shots"})]},G))}),!C&&g.length>Qg&&o.jsx("button",{type:"button",className:"sc-lookpage-expand",onClick:()=>w(E?null:"1"),children:E?"Enough, close it":"See the whole set"})]}):o.jsx(S9,{}),C&&o.jsxs("div",{className:"sc-ownedbits",children:[C.sourceRefs.length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"Your photos"}),o.jsx("p",{className:"sc-ownedbits-note",children:"What this presenter was built from. Kept as they arrived, and never replaced by anything generated."}),o.jsx("div",{className:"sc-lookpage-refs",children:C.sourceRefs.map(G=>o.jsx(v1,{src:G},G))})]}),o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"What must stay the same"}),o.jsx("p",{className:"sc-ownedbits-note",children:"Sent with every shot they appear in."}),o.jsx(Wm,{value:L,rows:3,placeholder:"For example: the wide-set eyes and the small scar above the left brow must survive every generation.",onChange:G=>{Y(G.target.value),ne({identityNotes:G.target.value})}}),C.negativeConstraints.length>0&&o.jsx("ul",{className:"sc-ownedbits-list",children:C.negativeConstraints.map(G=>o.jsx("li",{children:G},G))})]}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(is,{label:"Delete presenter",title:`Delete ${C.name}?`,body:"Shots already made with them keep their images and their recipe. Only future shots lose them.",busy:U,onConfirm:()=>void Q()})})]}),k.length>0&&o.jsx(To,{label:`Shots featuring ${b.name}`,children:k.map(G=>o.jsx(Sp,{node:G,onClick:()=>h(q1(u,null,G.id))},G.id))}),W.length>0&&o.jsx(To,{label:"Other presenters",children:W.map(G=>o.jsx(g1,{presenter:G,variant:"navigate",size:"slider",onOpen:fe=>h(al(u,fe))},G.id))})]})})}function j9(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?product=${encodeURIComponent(s)}&compose=1`)},[n,t])}function k9({product:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){var m,g;const f=si(e.category),h=f&&e.variant?`${f} · ${e.variant}`:f??e.variant??"";return o.jsx(cu,{id:e.id,previewUrl:_n((g=(m=e.shots)==null?void 0:m[0])==null?void 0:g.file),title:Oa(e,"tooltip"),primary:Oa(e,"card"),secondary:h,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u})}function V_(e){return o.jsx(sd,{...e})}function N9({product:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){const f=si(e.category)??e.category;return o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:`${Oa(e,"tooltip")} · ${f}`,primary:Oa(e,"card"),secondary:f,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u})}const z_=8;function B_(){const{brand:e,products:t,productsLoaded:n}=It(),{demoProducts:s}=pn(),i=n&&t.length===0,c=an(),u=j9(),f=ol(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=du(["category"]),E=g.category,[C,b]=Ia(cr.wallDensity,zo),N=ll(C),j=ae=>b(ae),k=rd(N),A=ou(N),M=r.useMemo(()=>t.map(ae=>({product:ae,category:cp(ae),own:!0})),[t]),T=r.useMemo(()=>s.map(ae=>({product:ae,category:ae.category,own:!1})),[s]),D=r.useMemo(()=>[...M,...T],[M,T]),L=r.useMemo(()=>{const ae=new Map;for(const{category:G}of D)G&&ae.set(G,(ae.get(G)??0)+1);return ae},[D]),Y=r.useMemo(()=>Hc.filter(ae=>L.has(ae.key)),[L]),I=s9(Y.length),se=ae=>c(Js(e,ae)),U=r.useCallback(ae=>ae.filter(({category:G})=>!E||G===E).filter(({product:G,category:fe})=>xa([mp(G),si(fe)].filter(Boolean).join(" "),h)).map(({product:G})=>G),[E,h]),te=r.useMemo(()=>U(M),[U,M]),O=r.useMemo(()=>U(T),[U,T]),{visible:ne,remaining:Q,showMore:H}=Cp(te,`${E??""}|${h}`),K={key:"category",label:"Category",everyLabel:"Every product",everyCount:D.length,selected:E,onSelect:ae=>v("category",ae),options:Y.map(ae=>({value:ae.key,label:ae.label,count:L.get(ae.key)??0}))},X=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>f("product"),children:[o.jsx(tr,{size:12})," Add product"]}),W=i,P=t.length>0,Z=o.jsx(od,{title:"Products",filters:o.jsx(ld,{mode:I,group:K}),density:o.jsx(nd,{value:N,onChange:j}),search:D.length>=z_&&o.jsx(uu,{value:h,onChange:m,noun:"products",total:D.length}),action:W?void 0:X});return o.jsx(dr,{children:o.jsxs("main",{className:"sc-looks sc-products",id:"main","data-hero":W||void 0,children:[!W&&Z,!n&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":A,style:k,"aria-hidden":!0,children:o.jsx(V_,{size:"grid",count:8})}),P&&ne.length>0&&o.jsxs("section",{className:"sc-owned",children:[o.jsx("div",{className:"sc-sec-head",children:o.jsx("h2",{className:"sc-sec-title",children:"Your products"})}),o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":A,style:k,children:ne.map(ae=>o.jsx(k9,{product:ae,variant:"use",size:"grid",onOpen:se,onUse:u},ae.id))}),Q>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:H,children:["Show ",Math.min(Q,60)," more"]})})]}),W&&o.jsx(Ks,{shape:"cold",title:o.jsxs(o.Fragment,{children:["Bring in a ",o.jsx("em",{children:"product"})]}),body:"Upload a few clean shots, or import your store, and it stays exact in every image you make.",action:X}),P&&ne.length>0&&O.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri products"})}),W&&T.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Ep,{label:"Or borrow one of ours"}),Z]}),O.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":A,style:k,children:O.map(ae=>o.jsx(N9,{product:ae,variant:"use",size:"grid",onUse:u,onOpen:se},ae.id))}),n&&te.length===0&&O.length===0&&o.jsx(id,{noun:"products",q:h,facet:E?si(E):null,onClearSearch:y,onClearAll:w})]})})}function U_({value:e,onChange:t}){const n=si(e)??"Other",s=e&&Hc.some(i=>i.key===e)?e:"other";return o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost sc-catpick","aria-label":`Category: ${n}`,children:[n,o.jsx(ai,{size:11,weight:"bold"})]})}),o.jsx(Zo,{align:"center",sideOffset:8,children:o.jsx(a1,{value:s,children:Hc.map(i=>o.jsx(Vl,{value:i.key,onSelect:()=>t(i.key),children:i.label},i.key))})})]})}function W_(e){const t=r.useRef(null),n=r.useRef(null);r.useLayoutEffect(()=>{const i=t.current,c=n.current;if(!i||!c)return;let u=0;const f=()=>{const g=c.scrollWidth-c.clientWidth;if(g<=1){delete i.dataset.overflowLeft,delete i.dataset.overflowRight;return}c.scrollLeft>2?i.dataset.overflowLeft="":delete i.dataset.overflowLeft,c.scrollLeft<g-2?i.dataset.overflowRight="":delete i.dataset.overflowRight},h=()=>{u||(u=requestAnimationFrame(()=>{u=0,f()}))};f();const m=new ResizeObserver(()=>f());m.observe(c);for(const g of c.children)m.observe(g);return c.addEventListener("scroll",h,{passive:!0}),()=>{u&&cancelAnimationFrame(u),m.disconnect(),c.removeEventListener("scroll",h)}},[e]);const s=r.useCallback(i=>{const c=n.current;if(!(c!=null&&c.firstElementChild))return;const u=c.firstElementChild.getBoundingClientRect().width,f=Number.parseFloat(getComputedStyle(c).columnGap)||0,h=window.matchMedia("(prefers-reduced-motion: reduce)").matches;c.scrollBy({left:i*(u+f),behavior:h?"auto":"smooth"})},[]);return{shellRef:t,railRef:n,page:s}}function G_({refs:e,cap:t,note:n,addLabel:s,busy:i,onAdd:c,onPromote:u,onRemove:f}){const[h,m]=r.useState(null),g=r.useMemo(()=>e.find(A=>A.file===h)??e[0],[e,h]);r.useEffect(()=>{var A;e.length&&!e.some(M=>M.file===h)&&m(((A=e[0])==null?void 0:A.file)??null)},[e,h]);const v=g?e.findIndex(A=>A.file===g.file):-1,y=!!u&&v>0,w=!!f&&!!g&&e.length>1,E=!!(s&&c&&e.length>0),C=e.length>1||E,{shellRef:b,railRef:N,page:j}=W_(e.length),k=A=>{const M=A==null?void 0:A[0];M&&(c==null||c(M))};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-refstage",children:g?o.jsx("div",{className:"sc-refstage-frame",children:o.jsx("img",{src:g.url,alt:""})}):c?o.jsxs("label",{className:"sc-refstage-blank sc-refstage-drop","data-busy":i||void 0,onDragOver:A=>{A.preventDefault(),A.dataTransfer.dropEffect="copy"},onDrop:A=>{A.preventDefault(),k(A.dataTransfer.files)},children:[o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:i,onChange:A=>{k(A.target.files),A.target.value=""}}),i?o.jsx(ln,{size:"2"}):o.jsx(tr,{size:22,weight:"bold"}),o.jsx("span",{children:"Add a reference"})]}):o.jsx("span",{className:"sc-refstage-blank",children:o.jsx(Wa,{size:22})})}),C&&o.jsxs("div",{className:"sc-refrail-shell",ref:b,children:[o.jsxs("div",{className:"sc-refrail-track",children:[o.jsx("button",{type:"button",className:"sc-refrail-arrow prev","aria-label":"Previous references",onClick:()=>j(-1),children:o.jsx(wi,{size:13,weight:"bold"})}),o.jsx("button",{type:"button",className:"sc-refrail-arrow next","aria-label":"Next references",onClick:()=>j(1),children:o.jsx(K1,{size:13,weight:"bold"})}),o.jsx("div",{className:"sc-refrail",ref:N,children:e.map((A,M)=>o.jsx("button",{type:"button",className:"sc-refrail-item","data-on":(g==null?void 0:g.file)===A.file?"":void 0,"data-spare":M>=t?"":void 0,"aria-label":`Reference ${M+1}`,"aria-pressed":(g==null?void 0:g.file)===A.file,onClick:()=>m(A.file),children:o.jsx("img",{src:A.url,alt:"",loading:"lazy"})},A.file))})]}),E&&o.jsxs("label",{className:"sc-refrail-item sc-refrail-add","data-busy":i||void 0,children:[o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:i,onChange:A=>{k(A.target.files),A.target.value=""}}),i?o.jsx(ln,{size:"1"}):o.jsx(tr,{size:16,weight:"bold"}),o.jsx("span",{className:"sc-vh",children:s})]})]}),(y||w)&&o.jsx("div",{className:"sc-refacts",children:o.jsxs("span",{className:"sc-refacts-pair",children:[y&&o.jsxs("button",{type:"button",className:"sc-refact sc-refact-lead",onClick:()=>u==null?void 0:u(g.file),children:[o.jsx(sH,{size:14,weight:"bold"}),"Use first"]}),w&&o.jsx("button",{type:"button",className:"sc-refact sc-refact-aside",onClick:()=>f==null?void 0:f(g.file),children:"Remove"})]})}),o.jsx("p",{className:"sc-lookpage-note",children:n})]})}const K_=3;function Y_(e){const t=e,n=(t.brand??t.vendor??"").trim();return!n||e.name.toLowerCase().startsWith(n.toLowerCase())?null:n}function q_(e){return e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\s+/g," ").trim()}function X_(e,t){if(e.length<=t)return e;const n=e.slice(0,t+1).search(/[.!?](\s|$)/);if(n>40)return e.slice(0,n+1);const s=e.lastIndexOf(" ",t);return`${e.slice(0,s>40?s:t).trimEnd()}…`}function Q_({value:e,onChange:t}){const n=r.useRef(null),s=i=>{i&&(i.style.height="auto",i.style.height=`${i.scrollHeight}px`)};return r.useEffect(()=>s(n.current),[e]),o.jsx("textarea",{ref:n,className:"sc-lookpage-titleedit",rows:1,dir:"auto","aria-label":"Product name",value:e,onChange:i=>{s(i.currentTarget),t(i.target.value)},onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),i.currentTarget.blur())}})}function J_(){const{productId:e=""}=za(),{brand:t,products:n,nodes:s,refresh:i,refreshProducts:c}=It(),{demoProducts:u,demoProductsLoaded:f}=pn(),h=an(),m=j9(),{push:g}=mr(),[v,y]=r.useState(!1),[w,E]=r.useState(!1),[C,b]=r.useState(null),N=r.useRef(null),j=n.find(J=>J.id===e),k=r.useMemo(()=>j?void 0:u.find(J=>J.id===e),[j,u,e]),[A,M]=r.useState([]);r.useEffect(()=>{if(!k){M([]);return}let J=!0;return Ce.demoProductFrames(k.id).then(ge=>{J&&M(ge.frames)}).catch(()=>{J&&M([])}),()=>{J=!1}},[k==null?void 0:k.id]);const[T,D]=r.useState((j==null?void 0:j.name)??"");r.useEffect(()=>{D((j==null?void 0:j.name)??"")},[j==null?void 0:j.id]);const L=r.useMemo(()=>s.filter(J=>{var ge;return J.status==="done"&&J.images.length>0&&(((ge=J.brief)==null?void 0:ge.tokens)??[]).some(He=>(He==null?void 0:He.t)==="product"&&He.id===e)}).slice(-12).reverse(),[s,e]),Y=((j==null?void 0:j.origin)??"manual")==="manual",I=J=>{j&&(N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{(Y?Ce.updateProduct(t.id,j.id,J):Ce.updateCatalogProduct(t.id,j.id,J)).then(()=>c()).catch(He=>b(String(He.message??He)))},500))},se=async J=>{y(!0),b(null);try{await J,await c()}catch(ge){b(String(ge.message??ge))}finally{y(!1)}},U=async()=>{if(j){E(!0),b(null);try{j.origin==="catalog"||j.id.startsWith("cat-")?await Ce.deleteCatalogProduct(t.id,j.id):await DH(t.id,j.id),await i(),h(U0(t),{replace:!0})}catch(J){b(String(J.message??J)),E(!1)}}};if(!j&&!k&&!f)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage sc-productpage",id:"main",children:[o.jsxs("div",{className:"sc-refskeleton","aria-hidden":!0,children:[o.jsx("span",{className:"sc-refskeleton-title"}),o.jsx("span",{className:"sc-refskeleton-stage"}),o.jsxs("span",{className:"sc-refskeleton-rail",children:[o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{})]})]}),o.jsx("p",{className:"sc-vh",role:"status",children:"Loading this product"})]})});if(!j&&!k)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"This product isn't here anymore"}),o.jsx("p",{className:"sc-lookpage-lede",children:"It may have been removed, or the link is out of date."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>h(U0(t)),children:"Browse products"})})]})});const te=k?"none":Y?"full":"fields",O=j??k,ne=(j==null?void 0:j.id)??k.id,Q=j?cp(j):(k==null?void 0:k.category)??null,H=Y_(O),K=J=>{const ge=_n(J.file);return ge?[{file:J.file,url:ge,angle:J.angle}]:[]},X=k?A.map(J=>({file:J.angle,url:J.url,angle:J.angle})):((j==null?void 0:j.shots)??[]).flatMap(K),W=J=>{const ge=X.map(Qe=>Qe.file),He=ge.indexOf(J)+1;se(Ce.setProductShots(t.id,ne,ge.filter(Qe=>Qe!==J))).then(()=>g({kind:"success",title:"Reference removed",detail:`Reference ${He} of ${ge.length}`,action:{label:"Undo",onClick:()=>void se(Ce.setProductShots(t.id,ne,ge))}}))},P=k?"Our reference set. Yours replaces it.":X.length===0?Y?"No reference yet.":"No reference yet. Images from your store are still arriving.":X.length===1?"One angle. A shot has to guess at every side it can't see.":X.length===2?"Two angles. A third pins the shape.":"The first three build every shot. Remove any that show a different colour or version.",Z=te==="none"?null:"Add image",ae=j!=null&&j.descriptionHtml?X_(q_(j.descriptionHtml),200):"",G=(k==null?void 0:k.description)||ae||null,fe=k?[k.subcategory]:[j==null?void 0:j.variant,j==null?void 0:j.material,j==null?void 0:j.dimensions],le=[te==="none"?si(Q):null,...fe].filter(Boolean),me=k?u.filter(J=>J.id!==ne).slice(0,8):n.filter(J=>J.id!==ne).slice(0,8);return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage sc-productpage",id:"main",children:[o.jsxs("div",{className:"sc-lookpage-crumb",children:[o.jsx("button",{type:"button",onClick:()=>h(U0(t)),children:"Products"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:k?"Scenri library":Y?"Yours":"From your store"})]}),H&&o.jsx("p",{className:"sc-lookpage-house",children:o.jsx("em",{className:"sc-accent",children:H})}),te==="full"?o.jsx(Q_,{value:T,onChange:J=>{D(J),I({name:J})}}):o.jsx("h1",{dir:"auto",children:O.name}),G&&o.jsx("p",{className:"sc-lookpage-lede",children:G}),le.length>0&&o.jsx("p",{className:"sc-lookpage-facts",children:le.join(" · ")}),o.jsxs("div",{className:"sc-lookpage-acts",children:[te!=="none"&&o.jsx(U_,{value:Q,onChange:J=>I({category:J})}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>m(ne),children:"Use in a shot"})]}),C&&o.jsx("p",{className:"sc-assetform-err",children:C}),o.jsx(G_,{refs:X,cap:K_,note:P,addLabel:Z,busy:v,onAdd:te==="none"?void 0:J=>void se(IH(t.id,ne,J)),onPromote:te==="none"?void 0:J=>void se(Ce.setProductShots(t.id,ne,[J,...X.map(ge=>ge.file).filter(ge=>ge!==J)])),onRemove:te==="none"?void 0:W}),L.length>0&&o.jsx(To,{label:`Shots featuring ${O.name}`,children:L.map(J=>o.jsx(Sp,{node:J,onClick:()=>h(q1(t,null,J.id))},J.id))}),me.length>0&&o.jsx(To,{label:k?"Other products in the library":"Other products",children:me.map(J=>k?o.jsx(N9,{product:J,variant:"navigate",size:"slider",onOpen:ge=>h(Js(t,ge))},J.id):o.jsx(k9,{product:J,variant:"navigate",size:"slider",onOpen:ge=>h(Js(t,ge))},J.id))}),j&&o.jsx("div",{className:"sc-ownedbits",children:o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(is,{label:"Delete product",title:`Delete ${j.name}?`,body:"Shots already made with it keep their images and their recipe. Only future shots lose it.",busy:w,onConfirm:()=>void U()})})})]})})}const A9=[{id:"newest",label:"Newest first"},{id:"oldest",label:"Oldest first"},{id:"cost",label:"Highest cost"},{id:"keepers",label:"Keepers first"}];function eO(e){return A9.some(t=>t.id===e)}const M9=[{id:"all",label:"All"},{id:"keepers",label:"Keepers"},{id:"archived",label:"Archived"}];function tO(e){return M9.some(t=>t.id===e)}function nO(e,t,n){return n==="archived"?t:n==="keepers"?e.filter(s=>s.kept):e}function rO(e,t,n,s){const i=Ph(e,n,s);return{all:i.length,keepers:i.reduce((c,u)=>c+(u.kept?1:0),0),archived:Ph(t,n,s).length}}const Bl=(e,t)=>t.createdAt.localeCompare(e.createdAt);function aO(e,t,n){const s=[e.prompt],i=e.brief;if(i){const c=i.tokens??[];let u=!1;for(const f of c)switch(f.t){case"product":Fs(s,t.product(f.id));break;case"character":Fs(s,t.person(f.id));break;case"template":u=!0,Fs(s,t.scene(f.id));break;case"color":Fs(s,f.name),Fs(s,f.hex);break}i.templateId&&!u&&Fs(s,t.scene(i.templateId));for(const f of Object.values(i.templateFields??{}))Fs(s,f)}return Fs(s,n),s.join(`
|
|
102
|
-
`)}function Fs(e,t){t&&e.push(t)}function Ph(e,t,n){return t.trim()?e.filter(s=>xa(n(s),t)):e}function sO(e,t){const n=[...e];switch(t){case"oldest":return n.sort((s,i)=>Bl(i,s));case"cost":return n.sort((s,i)=>i.costUsd-s.costUsd||Bl(s,i));case"keepers":return n.sort((s,i)=>Number(i.kept)-Number(s.kept)||Bl(s,i));default:return n.sort(Bl)}}const oO=[{label:"Generate",keys:["cmd","enter"]},{label:"Jump to the brief",keys:["/"]},{label:"Product menu",keys:["$"]},{label:"Scene menu",keys:["/"]},{label:"Presenter menu",keys:["@"]},{label:"Colour menu",keys:["#"]},{label:"Walk versions",keys:["←","→"]},{label:"Walk lineage",keys:["↑","↓"]},{label:"Step variants",keys:["[","]"]},{label:"Refine this shot",keys:["b"]},{label:"Keep or unkeep",keys:["k"]},{label:"Open the shot",keys:["enter"]},{label:"Close, or stop refining",keys:["esc"]},{label:"Assets panel",keys:["."]},{label:"This list",keys:["?"]}];function lO({open:e,onOpenChange:t}){return o.jsx(el,{open:e,onOpenChange:t,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,children:[o.jsx(nl,{children:"Shortcuts"}),o.jsx("div",{className:"sc-keys",children:oO.map(n=>o.jsxs("div",{className:"sc-krow",children:[o.jsx("span",{children:n.label}),o.jsx("span",{className:"sc-ksp"}),n.keys.map(s=>o.jsx("kbd",{children:s},s))]},n.label))})]})})}const cd=e=>((e==null?void 0:e.tokens)??[]).filter(t=>t&&typeof t.t=="string"),Jg=(e,t)=>cd(e).filter(n=>n.t===t&&typeof n.id=="string").map(n=>n.id),ev=e=>cd(e).filter(t=>t.t==="text").map(t=>typeof t.v=="string"?t.v:"").join(" ").replace(/\s+/g," ").trim(),tv=(e,t)=>cd(e).filter(n=>n.t===t).length,H0=(e,t,n)=>t(e)??n;function iO(e,t,n){if(!e||!t)return[];const s=[],i=(f,h,m,g)=>{const v=Jg(e,f),y=Jg(t,f),w=y.filter(C=>!v.includes(C)),E=v.filter(C=>!y.includes(C));if(!(!w.length&&!E.length)){if(w.length===1&&E.length===1){s.push(`${m} ${H0(E[0],h,g)} to ${H0(w[0],h,g)}`);return}for(const C of w)s.push(`${m} ${H0(C,h,g)} added`);for(const C of E)s.push(`${m} ${H0(C,h,g)} removed`)}};i("product",n.product,"product","a product"),i("character",n.person,"presenter","a presenter"),i("template",n.scene,"scene","a scene");for(const[f,h]of[["color","colour"],["ref","reference"],["mark","brand mark"]]){const m=tv(e,f),g=tv(t,f);if(m===g)continue;const v=Math.abs(g-m),y=v===1?h:`${h}s`;s.push(g>m?`${v} ${y} added`:`${v} ${y} removed`)}const c=ev(e),u=ev(t);return c!==u&&s.push(u&&u.length<=60?`“${u}”`:"wording changed"),s}function cO(e,t,n){const s=iO(e,t,n);if(!s.length)return null;const i=s.slice(0,3),c=s.length-i.length;return`Changed: ${i.join(", ")}${c>0?`, and ${c} more`:""}`}function R9(e,t){var s;const n=(s=e.brief)==null?void 0:s.sourceImage;return n&&(t!=null&&t.images.includes(n))?n:t==null?void 0:t.images[0]}function uO(e){return cd(e.brief).filter(n=>n.t==="text").map(n=>typeof n.v=="string"?n.v:"").join(" ").replace(/\s+/g," ").trim()||e.prompt||""}function dO({since:e}){const[t,n]=r.useState(Date.now());return r.useEffect(()=>{const s=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(s)},[]),o.jsxs("span",{className:"sc-cell-tag",children:[tp(e,t)," · ",eo(e,t),"s"]})}function fO({nodes:e,selectedId:t,onOpen:n,onRetry:s,onCancel:i,onToggleKeep:c,onArchive:u,onDeletePermanently:f,setsFor:h,picked:m,onPick:g,empty:v,sending:y,onBranch:w,branchingFrom:E,branchingFromImage:C,expanded:b,onToggleExpand:N,versionsOf:j,onVersions:k,engineName:A,tile:M}){const T=e.filter(H=>H.kind!=="root"),D=new Map(e.map(H=>[H.id,H])),L=!!g,[Y,I]=r.useState(null),[se,U]=r.useState(null),{tile:te,cols:O}=BF(VF(se),M,zF()<ZF),ne=[...y?[o.jsxs("div",{className:"sc-cell","data-running":"true","data-sending":"true",children:[o.jsx("span",{className:"sc-shimmer"}),o.jsx("span",{className:"sc-cell-tag",children:"sending"}),o.jsx("span",{className:"sc-cell-said",dir:"auto",children:y})]},"sending")]:[],...T.flatMap(H=>{const K=H.parentId?D.get(H.parentId):null,X=K&&K.kind!=="root"?K:null;if(H.status==="running")return[o.jsxs("div",{className:"sc-cell","data-running":"true","data-fb-node":H.id,children:[o.jsxs("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}, still rendering`,onClick:()=>n(H.id),children:[o.jsx("span",{className:"sc-shimmer"}),o.jsx(dO,{since:H.createdAt})]}),i&&o.jsx("button",{type:"button",className:"sc-cell-retry","data-urgent":eo(H.createdAt)>=60||void 0,onClick:()=>i(H),children:"Cancel"})]},H.id)];if(H.status==="cancelled"||H.status==="error"||H.images.length===0){const le=H.status==="cancelled",me=le?fw():oo(H.error,A==null?void 0:A(H.engineId));return[o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-cancelled":le||void 0,"data-failed":!le||void 0,"data-selected":H.id===t,children:[o.jsx("button",{type:"button",className:"sc-cell-open",onClick:()=>n(H.id),"aria-label":`Open ${Cn(H)}`}),o.jsx("span",{className:"sc-cell-failed",children:o.jsx(Qm,{failure:me,density:"tile",onRetry:()=>s(H),dismiss:u?{label:H.archived?"Restore":"Dismiss",onClick:()=>u(H)}:void 0})})]},H.id)]}const W=(h==null?void 0:h(H.id))??[],P=(m==null?void 0:m.has(H.id))??!1,Z=(j==null?void 0:j(H.id))??0,ae=w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":H.id===E||void 0,onClick:()=>w(H.id),"aria-label":`Refine ${Cn(H)}`,title:"Continue from this shot",children:[o.jsx(lg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]}),G=o.jsxs("div",{className:"sc-cell-facts",children:[(X==null?void 0:X.images[0])&&o.jsxs("span",{className:"sc-fact sc-prov",children:[o.jsx("img",{src:rn(R9(H,X)??X.images[0]),alt:""}),"refined from"]}),H.images.length>1&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-stack",onClick:()=>N==null?void 0:N(H.id),"aria-expanded":"false","aria-label":`Show all ${H.images.length} variants`,children:[o.jsx(hh,{size:12}),H.images.length," variants"]}),Z>0&&k&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-versions",onClick:()=>k(H.id),"aria-label":`Show the ${Z} version${Z===1?"":"s"} of this shot`,children:[o.jsx(hH,{size:11}),Z," version",Z===1?"":"s"]})]},`${H.id}-facts`),fe=o.jsxs(o.Fragment,{children:[L&&o.jsx("button",{type:"button",className:"sc-cell-pick","data-on":P||void 0,"aria-pressed":P,"aria-label":P?"Deselect shot":"Select shot",onClick:()=>g==null?void 0:g(H.id),children:P&&o.jsx(_a,{size:12,weight:"bold"})}),u&&o.jsx("button",{type:"button",className:"sc-cell-archive",onClick:()=>u(H),"aria-label":H.archived?"Restore":"Archive",title:H.archived?"Restore":"Archive",children:H.archived?o.jsx(o1,{size:12}):o.jsx(W5,{size:12})})]});return b!=null&&b.has(H.id)&&H.images.length>1?H.images.map((le,me)=>o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-fb-variant":me,"data-variant":"","data-first":me===0||void 0,"data-selected":me===0&&H.id===t,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}, take ${me+1} of ${H.images.length}`,onClick:()=>n(H.id,me),children:o.jsx("img",{src:rn(le),alt:"",loading:"lazy"})}),o.jsxs("div",{className:"sc-cell-bar",children:[o.jsxs("div",{className:"sc-cell-facts",children:[o.jsxs("span",{className:"sc-fact",children:[me+1," of ",H.images.length]}),me===0&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-stack",onClick:()=>N==null?void 0:N(H.id),"aria-expanded":"true","aria-label":`Collapse ${H.images.length} variants`,children:[o.jsx(hh,{size:12}),"Collapse"]})]}),w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":E===H.id&&C===le?"":void 0,onClick:()=>w(H.id,me),"aria-label":`Refine ${me+1} of ${H.images.length}`,title:"Continue from this take",children:[o.jsx(lg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]})]}),me===0&&o.jsx(o.Fragment,{children:fe})]},`${H.id}:${le}`)):[o.jsxs(Zm,{children:[o.jsx(Vm,{children:o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-selected":H.id===t,"data-picked":P||void 0,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}`,onClick:()=>n(H.id),children:o.jsx("img",{src:rn(H.images[0]),alt:"",loading:"lazy"})}),o.jsxs("div",{className:"sc-cell-bar",children:[G,ae]}),fe,H.kept&&o.jsx("button",{type:"button",className:"sc-cell-star",onClick:()=>c==null?void 0:c(H),"aria-pressed":"true","aria-label":"Remove from keepers",children:o.jsx(mh,{size:14,weight:"fill"})}),W.length>0&&o.jsx("span",{className:"sc-cell-meta",children:W.map(le=>le.name).join(", ")})]})}),o.jsxs(zm,{children:[o.jsx(qr,{onSelect:()=>n(H.id),children:"Open"}),w&&o.jsx(qr,{onSelect:()=>w(H.id),children:"Refine from this"}),g&&o.jsx(qr,{onSelect:()=>g(H.id),children:P?"Deselect":"Select for set"}),Z>0&&k&&o.jsxs(qr,{onSelect:()=>k(H.id),children:[Z," version",Z===1?"":"s"]}),H.images.length>1&&N&&o.jsx(qr,{onSelect:()=>N(H.id),children:"Show all variants"}),c&&o.jsx(qr,{onSelect:()=>c(H),children:H.kept?"Remove from keepers":"Keep"}),u&&o.jsxs(o.Fragment,{children:[o.jsx(ch,{}),o.jsx(qr,{onSelect:()=>u(H),children:H.archived?"Restore":"Archive"})]}),f&&H.archived&&o.jsxs(o.Fragment,{children:[o.jsx(ch,{}),o.jsx(qr,{color:"red",onSelect:()=>I(H),children:"Delete permanently"})]})]})]},H.id)]})];if(cw(T)&&!y)return o.jsx(o.Fragment,{children:v??o.jsx("p",{className:"sc-feed-empty",children:"Nothing here yet."})});const Q=Math.max(1,Math.min(O,ne.length));return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-feed",ref:U,"data-picking":L&&((m==null?void 0:m.size)??0)>0?"":void 0,style:{"--sc-tile":`${te}px`},children:Array.from({length:Q},(H,K)=>o.jsx("div",{className:"sc-feed-col",children:ne.filter((X,W)=>(ne.length-1-W)%Q===K)},`col-${Q}-${K}`))}),o.jsx(Yc,{open:!!Y,onOpenChange:H=>!H&&I(null),children:o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:"Delete this shot permanently?"}),o.jsx(Qc,{size:"2",children:"This cannot be undone."}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:()=>{Y&&(f==null||f(Y)),I(null)},children:"Delete permanently"})})]})]})})]})}function P9({a:e,b:t,imageA:n,imageB:s,open:i,onOpenChange:c}){const[u,f]=r.useState(null),[h,m]=r.useState(null),[g,v]=r.useState(0);return r.useEffect(()=>{if(!i)return;f(null),m(null);let y=!0;return Ce.diff(n,s).then(w=>{y&&f(w)}).catch(w=>{y&&m(String((w==null?void 0:w.message)??w))}),()=>{y=!1}},[i,n,s,g]),o.jsx(el,{open:i,onOpenChange:c,children:o.jsxs(tl,{maxWidth:"860px","aria-describedby":void 0,onOpenAutoFocus:ru,children:[o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-dlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})}),o.jsx(nl,{children:"Compare"}),o.jsxs("div",{className:"sc-cmp",children:[o.jsxs("figure",{className:"sc-cmp-side",children:[o.jsx("img",{src:rn(n),alt:""}),o.jsx("figcaption",{dir:"auto",children:Cn(e)})]}),o.jsxs("figure",{className:"sc-cmp-side",children:[o.jsx("img",{src:rn(s),alt:""}),o.jsx("figcaption",{dir:"auto",children:Cn(t)})]}),o.jsxs("figure",{className:"sc-cmp-side",children:[h?o.jsx("div",{className:"sc-cmp-err",children:o.jsx(Qm,{failure:oo(h),density:"tile",onRetry:()=>v(y=>y+1)})}):u?o.jsx("img",{src:rn(u.heatmapHash),alt:"Heatmap of the pixels that differ"}):o.jsx("div",{className:"sc-cmp-wait",children:o.jsx(ln,{})}),o.jsx("figcaption",{children:"drift"})]})]}),u&&o.jsxs("p",{className:"sc-cmp-note",children:[o.jsxs("b",{children:[(u.score*100).toFixed(1),"% of pixels changed."]})," ",u.score>.35?"A different photograph, not a variation of the same one.":u.score>.12?"The frame moved. Check the product is still exactly itself.":"Close enough to read as the same setup."]})]})})}const hO=130;function mO(e){const[t,n]=r.useState(e);return r.useEffect(()=>{if(e===t)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){n(e);return}const s=setTimeout(()=>n(e),hO);return()=>clearTimeout(s)},[e,t]),t}function Lh({name:e,count:t,mode:n,onToggle:s,action:i,children:c}){const u=n==="open"||n==="result"?"open":"compact",f=mO(u);return o.jsxs("div",{className:"sc-agroup","data-mode":n,children:[o.jsxs("div",{className:"sc-agroup-h",children:[o.jsxs("button",{type:"button",className:"sc-agroup-t","aria-expanded":n==="open",onClick:s,children:[o.jsx("b",{children:e}),t!==void 0&&t>0&&o.jsx("span",{className:"sc-agroup-n",children:t}),o.jsx(ai,{size:11,className:"sc-agroup-caret","aria-hidden":"true"})]}),i]}),o.jsx("div",{className:"sc-agroup-body",children:o.jsx("div",{className:"sc-agroup-content","data-fading":f!==u||void 0,children:c(f)})})]})}function pO({candidate:e,on:t,named:n,onClick:s}){return o.jsxs("button",{type:"button",className:"sc-acard","data-on":t||void 0,"aria-label":e.full,"aria-pressed":t,title:e.full,onClick:s,children:[o.jsxs("span",{className:"sc-acard-thumb",children:[e.thumb?o.jsx("img",{src:e.thumb,alt:"",loading:"lazy","data-crop":e.crop}):o.jsx("span",{className:"sc-aswatch",style:{display:"grid",placeItems:"center"},children:o.jsx(Wa,{size:14})}),o.jsx("span",{className:"sc-acard-tick","aria-hidden":!0,children:o.jsx(_a,{size:10,weight:"bold"})})]}),n&&o.jsxs("span",{className:"sc-acard-label",children:[e.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(G1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),e.label]})]})}function L2({kind:e,title:t,items:n,attached:s,mode:i,onToggle:c,onPick:u,moreLabel:f,createLabel:h,onCreate:m}){const g=r.useMemo(()=>new Set(s),[s]),[v,y]=r.useState(Kg);return r.useEffect(()=>{i!=="open"&&y(Kg)},[i]),i==="result"&&n.length===0?null:o.jsx(Lh,{name:t,count:n.length,mode:i,onToggle:()=>c(e),action:o.jsx("button",{type:"button",className:"sc-aadd",title:h,"aria-label":h,onClick:m,children:o.jsx(tr,{size:10})}),children:w=>{const{visible:E,more:C}=j_(n,g,w==="open"?v:Rh);return o.jsxs("div",{className:w==="open"?"sc-acard-grid":"sc-arow",children:[E.map(b=>o.jsx(pO,{candidate:b,on:g.has(b.id),named:w==="open",onClick:()=>u(b.id)},b.id)),w==="open"&&C>0&&o.jsxs("button",{type:"button",className:"sc-amore-tile",onClick:()=>y(b=>b+Yg),"aria-label":`Show ${Math.min(C,Yg)} more ${f}`,children:[o.jsxs("span",{className:"sc-amore-n",children:["+",C]}),o.jsx("span",{className:"sc-amore-t",children:"more"})]})]})}})}function gO({brand:e,shots:t,attached:n=p9,onProduct:s,onCharacter:i,onColor:c,onRef:u,onTemplate:f,onClose:h}){const m=iu(),g=ol(),{applyBrand:v}=pn(),{push:y}=mr(),[w,E]=ZL(cr.assetsExpanded,null),C=O=>E(ne=>ne===O?null:O),[b,N]=r.useState(""),j=b.trim().length>0,k=O=>{N(""),E(O)},A=O=>j?"result":w===null?"idle":w===O?"open":"collapsed",M=r.useMemo(()=>new Set(Za(e.id)),[e.id]),T=r.useMemo(()=>{const O=ne=>{const Q=zl(ne,m);return ad(ne,Q,{currentId:null,query:"",bookmarked:M,shown:Q.length}).items};return{product:O("product"),presenter:O("presenter"),scene:O("scene")}},[m,M]),D=r.useMemo(()=>({product:bc(T.product,b),presenter:bc(T.presenter,b),scene:bc(T.scene,b)}),[T,b]),L=r.useMemo(()=>{var O;return va((O=e.json)==null?void 0:O.palette)},[e]),Y=r.useMemo(()=>j?L.filter(O=>xa(`${O.name} ${O.hex}`,b)):L,[L,b,j]),I=O=>{(async()=>{var Q;const ne=S$((Q=e.json)==null?void 0:Q.palette,O);if(ne.swatch){if(ne.added)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ne.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"));return}k("colors")}})()},se=O=>{(async()=>{var Q;const ne=j$((Q=e.json)==null?void 0:Q.palette,O);if(ne.removed)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ne.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"))}})()},U=t.filter(O=>O.status==="done"&&O.images.length>0).slice(-12).reverse(),te=j&&!D.product.length&&!D.presenter.length&&!D.scene.length&&!Y.length;return o.jsxs("aside",{className:"sc-assets","aria-label":"Assets",children:[o.jsxs("div",{className:"sc-assets-head",children:[o.jsx("b",{children:"Assets"}),o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:h,"aria-label":"Close assets",style:{width:28,height:28},children:o.jsx(Mn,{size:12})})]}),o.jsx("div",{className:"sc-assets-searchbar",children:o.jsxs("div",{className:"sc-assets-search",children:[o.jsx(Tc,{size:12}),o.jsx("input",{value:b,onChange:O=>N(O.target.value),onKeyDown:O=>{O.key==="Escape"&&b&&(O.stopPropagation(),N(""))},placeholder:"Search assets","aria-label":"Search assets in this panel"}),j&&o.jsx("button",{type:"button",className:"sc-assets-clear",onClick:()=>N(""),"aria-label":"Clear search",children:o.jsx(Mn,{size:11})})]})}),te&&o.jsxs("p",{className:"sc-assets-zero",children:["Nothing here matches “",b.trim(),"”."]}),o.jsx(L2,{kind:"product",title:"Products",items:D.product,attached:n.product,mode:A("product"),onToggle:C,onPick:s,moreLabel:"products",createLabel:"Add product",onCreate:()=>g("product",{onCreated:O=>{O.kind==="product"&&(k("product"),s(O.id))}})}),o.jsx(L2,{kind:"presenter",title:"Presenters",items:D.presenter,attached:n.presenter,mode:A("presenter"),onToggle:C,onPick:i,moreLabel:"presenters",createLabel:"Create presenter",onCreate:()=>g("presenter",{onCreated:O=>{O.kind==="presenter"&&k("presenter")}})}),o.jsx(L2,{kind:"scene",title:"Scenes",items:D.scene,attached:n.scene?[n.scene]:[],mode:A("scene"),onToggle:C,onPick:f,moreLabel:"scenes",createLabel:"Create scene",onCreate:()=>g("scene",{onCreated:O=>{O.kind==="scene"&&k("scene")}})}),!(j&&Y.length===0)&&o.jsx(Lh,{name:"Brand colors",count:Y.length,mode:A("colors"),onToggle:()=>C("colors"),action:o.jsx(c1,{className:"sc-aadd",triggerStyle:{background:"none"},value:fp(L),presets:L.map(O=>O.hex),commitMode:"close",align:"end",label:"Add colour",onChange:I,children:o.jsx(tr,{size:10})}),children:O=>o.jsx("div",{className:"sc-arow",children:(O==="open"?Y:Y.slice(0,Rh)).map(ne=>o.jsxs("div",{className:"sc-aswatch-tile",children:[o.jsx("button",{type:"button",title:`${ne.name} ${ne.hex}`,onClick:()=>c(ne.hex,ne.name),children:o.jsx("span",{className:"sc-aswatch",style:{background:ne.hex}})}),O==="open"&&o.jsx("button",{type:"button",className:"sc-aswatch-x","aria-label":`Remove ${ne.name}`,title:"Remove",onClick:()=>se(ne.hex),children:o.jsx(Mn,{size:10,weight:"bold"})})]},ne.hex))})}),U.length>0&&!j&&o.jsx(Lh,{name:"Recent shots",count:U.length,mode:A("shots"),onToggle:()=>C("shots"),children:O=>o.jsx("div",{className:"sc-arow",children:(O==="open"?U:U.slice(0,Rh)).map(ne=>o.jsx("button",{type:"button",title:"Attach as a style reference",onClick:()=>u(ne.images[0]),children:o.jsx("img",{src:rn(ne.images[0]),alt:"",loading:"lazy"})},ne.id))})})]})}function vO({sets:e,active:t,ungrouped:n,ungroupedCount:s,onPlaceAll:i,onPlaceUngrouped:c,onOpenSet:u,onNewSet:f,onResetNewSet:h,onRenameSet:m,onDeleteSet:g,askCreate:v,lens:y,lensCounts:w,onLens:E,q:C,onQ:b,searchTotal:N,sort:j,onSort:k,tile:A,onTile:M,assets:T,onAssets:D,showAssets:L}){const Y=t?t.id:n?"__ungrouped__":"__all__",I=t?t.name:n?"Not in a set":"All shots",se=!!t||n,[U,te]=r.useState(!1),[O,ne]=r.useState(!1),[Q,H]=r.useState(!1),[K,X]=r.useState(""),W=r.useRef(null),P=r.useRef(!1),Z=()=>{P.current=!0,ne(!0),X(""),te(!0)},ae=()=>{t&&(P.current=!1,ne(!1),X(t.name),te(!0))};r.useEffect(()=>{v&&Z()},[v]);const G=()=>{const me=K.trim();if(!me)return;const J=P.current;P.current=!1,ne(!1),te(!1),J?f(me):m==null||m(me)},fe=me=>{if(me){te(!0);return}const J=P.current;P.current=!1,ne(!1),te(!1),J&&(h==null||h())},le=M9.map(me=>({value:me.id==="all"?null:me.id,label:me.label,count:w[me.id]}));return o.jsxs("div",{className:"sc-toolbar",children:[o.jsxs("div",{className:"sc-toolbar-scope",children:[o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-place","data-on":se||void 0,"aria-label":I,children:[o.jsx(yH,{className:"sc-toolbar-place-ic",size:14}),o.jsx("span",{className:"sc-toolbar-place-t",children:I}),o.jsx(ai,{size:10,className:"sc-caret"})]})}),o.jsxs(Zo,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[o.jsxs(a1,{value:Y,children:[o.jsx(Vl,{value:"__all__",onSelect:i,children:"All shots"}),o.jsxs(Vl,{value:"__ungrouped__",onSelect:c,children:["Not in a set",s>0?` · ${s}`:""]}),e.length>0&&o.jsx(s1,{}),e.map(me=>o.jsx(Vl,{value:me.id,onSelect:()=>u(me),children:me.name},me.id))]}),o.jsx(s1,{}),o.jsx(Qr,{onSelect:()=>{h==null||h(),Z()},children:"New set"}),t&&m&&o.jsx(Qr,{onSelect:ae,children:"Rename"}),t&&g&&o.jsx(Qr,{color:"red",onSelect:()=>H(!0),children:"Delete set"})]})]}),o.jsx(el,{open:U,onOpenChange:fe,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:me=>{me.preventDefault();const J=W.current;J&&(J.focus(),J.select())},children:[o.jsx(nl,{children:O?"Name this set":"Rename set"}),o.jsx("input",{ref:W,className:"sc-in",style:{width:"100%",marginTop:8},value:K,"aria-label":"Set name",onChange:me=>X(me.target.value),onKeyDown:me=>{me.key==="Enter"&&G()}}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(ma,{variant:"soft",color:"gray",onClick:()=>fe(!1),children:"Cancel"}),o.jsx(ma,{onClick:G,disabled:!K.trim(),children:"Save"})]})]})}),o.jsx(Yc,{open:Q,onOpenChange:H,children:o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:"Delete this set?"}),o.jsx(Qc,{size:"2",children:"Shots stay in the library. Only the set goes."}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:()=>{g==null||g(),H(!1)},children:"Delete set"})})]})]})}),o.jsx(b9,{"aria-label":"Shot lenses",activeKey:y==="all"?null:y,items:le,onSelect:me=>E(me??"all")})]}),o.jsxs("div",{className:"sc-toolbar-actions",children:[o.jsx(uu,{value:C,onChange:b,noun:"shots",total:N}),o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-btn","aria-label":"Sort shots",children:[o.jsx(iH,{size:14}),o.jsx("span",{className:"sc-toolbar-btn-t",children:"Sort"}),o.jsx(ai,{size:10})]})}),o.jsx(Zo,{align:"end",children:o.jsx(a1,{value:j,onValueChange:me=>k(me),children:A9.map(me=>o.jsx(Vl,{value:me.id,children:me.label},me.id))})})]}),o.jsx(KF,{value:A,onChange:M}),L&&o.jsx("button",{type:"button",className:"sc-icon-btn sc-toolbar-assets","data-on":T||void 0,onClick:D,"aria-label":"Assets panel","aria-pressed":T,title:"Assets panel (.)",children:o.jsx(NH,{size:15,mirrored:!0})})]})]})}function yO(e){const{push:t}=mr(),n=r.useCallback(c=>Ce.archiveNode(c.id,!0).then(()=>e()).then(()=>{t({kind:"success",title:"Archived",detail:Cn(c),action:{label:"Undo",onClick:()=>void Ce.archiveNode(c.id,!1).then(e)}})}).catch(u=>t(dn(u,"Could not archive this shot"))),[e,t]),s=r.useCallback(c=>Ce.archiveNode(c.id,!1).then(()=>e()).catch(u=>t(dn(u,"Could not restore this shot"))),[e,t]),i=r.useCallback(c=>Promise.all(c.map(u=>Ce.archiveNode(u,!1))).then(()=>e()).catch(u=>t(dn(u,"Could not restore these shots"))),[e,t]);return{archive:n,unarchive:s,unarchiveBatch:i}}function xO(e){const{push:t}=mr(),n=r.useCallback(i=>Ce.deleteNode(i.id).then(()=>e()).catch(c=>t(dn(c,"Could not delete this shot"))),[e,t]),s=r.useCallback(i=>Ce.deleteNodesBatch(i).then(()=>e()).catch(c=>t(dn(c,"Could not delete these shots"))),[e,t]);return{remove:n,removeBatch:s}}function wO(e,{demoProducts:t,presenters:n,scenes:s}){var h,m,g,v;const i=((h=e.brief)==null?void 0:h.tokens)??[],c=(m=i.find(y=>(y==null?void 0:y.t)==="product"))==null?void 0:m.id,u=(g=i.find(y=>(y==null?void 0:y.t)==="character"))==null?void 0:g.id,f=(v=i.find(y=>(y==null?void 0:y.t)==="template"))==null?void 0:v.id;return{product:c?t.find(y=>y.id===c):void 0,presenter:u?n.find(y=>y.id===u):void 0,scene:f?s.find(y=>y.id===f):void 0}}function bO(e,t){const{product:n,presenter:s,scene:i}=wO(e,t);return{productName:n?Oa(n,"chip"):null,productPreviewUrl:(n==null?void 0:n.previewUrl)??null,productId:(n==null?void 0:n.id)??null,presenterName:(s==null?void 0:s.name)??null,presenterPreviewUrl:(s==null?void 0:s.avatarUrl)??(s==null?void 0:s.previewUrl)??null,presenterId:(s==null?void 0:s.id)??null,sceneName:i?to(i,"chip"):null,scenePreviewUrl:(i==null?void 0:i.previewUrl)??null,sceneId:(i==null?void 0:i.id)??null}}function EO(e){const t=r.useRef(null),n=r.useRef(0),s=r.useRef(null),i=r.useRef(0),c=r.useCallback(()=>{const h=t.current;h&&(n.current=h.scrollWidth/3)},[]);r.useEffect(()=>{const h=t.current;if(!h||!e)return;c(),h.scrollLeft=n.current;const m=new ResizeObserver(()=>{const g=n.current;c(),g<=0&&n.current>0&&(h.scrollLeft=n.current)});m.observe(h);for(const g of h.children)m.observe(g);return()=>m.disconnect()},[e,c]);const u=r.useCallback(()=>{const h=t.current,m=n.current;!h||m<=0||(h.scrollLeft<m*.5?(h.scrollLeft+=m,s.current!==null&&(s.current+=m)):h.scrollLeft>m*1.5&&(h.scrollLeft-=m,s.current!==null&&(s.current-=m)))},[]);r.useEffect(()=>{const h=t.current;if(!h)return;let m=0;const g=()=>{m||(m=requestAnimationFrame(()=>{m=0,u()}))},v=y=>{Math.abs(y.deltaY)<=Math.abs(y.deltaX)||(y.preventDefault(),s.current=null,cancelAnimationFrame(i.current),h.scrollLeft+=y.deltaY)};return h.addEventListener("scroll",g,{passive:!0}),h.addEventListener("wheel",v,{passive:!1}),()=>{m&&cancelAnimationFrame(m),cancelAnimationFrame(i.current),h.removeEventListener("scroll",g),h.removeEventListener("wheel",v)}},[u]);const f=r.useCallback(h=>{const m=t.current;if(!m)return;const g=m.firstElementChild&&Number.parseFloat(getComputedStyle(m).gridAutoColumns)||232,v=Number.parseFloat(getComputedStyle(m).columnGap)||0,y=g+v,w=Math.max(1,Math.floor(m.clientWidth/y)-1)*y;s.current=m.scrollLeft+w*h,cancelAnimationFrame(i.current);const E=()=>{const C=s.current;if(C===null)return;const b=C-m.scrollLeft;if(Math.abs(b)<.5){m.scrollLeft=C,s.current=null;return}m.scrollLeft+=b*.16,i.current=requestAnimationFrame(E)};i.current=requestAnimationFrame(E)},[]);return{ref:t,page:f}}function CO(e){const t=[...e];for(let n=t.length-1;n>0;n--){const s=Math.floor(Math.random()*(n+1));[t[n],t[s]]=[t[s],t[n]]}return t}function SO({entries:e,catalogs:t,stagedId:n,onUse:s,onOpenProduct:i,onOpenPresenter:c,onOpenScene:u}){const f=r.useMemo(()=>CO(e).slice(0,10),[e]),{ref:h,page:m}=EO(f.length);return o.jsxs("div",{className:"sc-canvas-empty",children:[o.jsxs("h3",{children:["Your first ",o.jsx("em",{children:"shot"})]}),o.jsx("p",{children:"Describe what you want in the brief below, or open one of these."}),f.length>0&&o.jsxs("div",{className:"sc-shelf",children:[o.jsx("button",{type:"button",className:"sc-shelf-arrow prev","aria-label":"Previous examples",onClick:()=>m(-1),children:o.jsx(wi,{size:13,weight:"bold"})}),o.jsx("button",{type:"button",className:"sc-shelf-arrow next","aria-label":"More examples",onClick:()=>m(1),children:o.jsx(K1,{size:13,weight:"bold"})}),o.jsx("div",{className:"sc-shelf-row",ref:h,children:[0,1,2].map(g=>f.map(v=>o.jsx(v9,{entry:v,size:"grid",hideRecipe:!0,decorative:g!==1,active:n===v.id,onOpen:()=>s(v),onOpenProduct:i,onOpenPresenter:c,onOpenScene:u,...bO(v,t)},`${g}-${v.id}`)))})]})]})}function sc({text:e,onAll:t,actionLabel:n="Show all shots"}){return o.jsxs("div",{className:"sc-feed-empty",children:[o.jsx("p",{children:e}),t&&o.jsx("button",{type:"button",className:"sc-btn",onClick:t,children:n})]})}function jO({count:e,sets:t,onAdd:n,onNew:s,onClear:i,onKeep:c,allKept:u,comparable:f,onCompare:h,archivedLens:m,pickedIds:g,onRestoreBatch:v,onDeleteBatch:y}){return o.jsxs("div",{className:"sc-picked",role:"status",children:[o.jsxs("span",{className:"sc-picked-n",children:[e," selected"]}),m?o.jsx("button",{type:"button",className:"sc-btn",onClick:()=>v(g),children:"Restore"}):o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"sc-btn",onClick:c,children:u?"Remove from keepers":"Keep"}),e===2&&o.jsx("button",{type:"button",className:"sc-btn","aria-disabled":!f||void 0,onClick:()=>{f&&h()},title:f?"Show the drift between these two":"Both shots need to have finished",children:"Compare"}),o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Add to set"})}),o.jsxs(Zo,{children:[t.map(w=>o.jsx(Qr,{onSelect:()=>n(w),children:w.name},w.id)),t.length>0&&o.jsx(s1,{}),o.jsx(Qr,{onSelect:s,children:"New set…"})]})]})]}),o.jsx("button",{type:"button",className:"sc-btn",onClick:i,children:"Clear"}),m&&o.jsx(is,{label:`Delete ${e} permanently`,title:`Delete ${e} shot${e===1?"":"s"} permanently?`,body:"This cannot be undone.",busy:!1,onConfirm:()=>y(g)})]})}function kO(){const e=lr(Ye.hubShot),t=lr(Ye.setShot);return(e==null?void 0:e.params.shotId)??(t==null?void 0:t.params.shotId)??null}function L9({set:e}){const{engines:t,scenes:n,presenters:s,demoProducts:i,showcase:c,showcaseLoaded:u}=pn(),{brand:f,workspace:h,nodes:m,sets:g,membership:v,loaded:y,refresh:w,applySet:E,dropSet:C,products:b}=It(),N=iu(),j=an(),[k,A]=li(),M=kO(),[T,D]=r.useState(null),[L,Y]=r.useState(!1),{open:I,toggle:se,setOpen:U}=SF(),te=lo(bi),O=I&&!te,[ne,Q]=r.useState(null),[H,K]=r.useState(p9),[X,W]=r.useState(null),[P,Z]=r.useState(null),[ae,G]=r.useState(new Set),[fe,le]=Os("tab","all"),[me,J]=Os("in",""),[ge,He]=Os("branch",""),[Qe]=Os("bi",""),[ye,ke]=Os("lineage",""),[lt,jt]=r.useState(new Set),[Pt,Ne]=Ia(cr.tileSize,Kw),Ae=Yw(Pt),{q:Ee,setQ:at,clearSearch:kt}=du([]),[Qt,Jt]=Ia(cr.feedSort,"newest"),Ot=eO(Qt)?Qt:"newest",[xn,Rn]=r.useState(!1),[Wn,Pn]=Os("i","0"),Zt=Number.parseInt(Wn,10)||0;r.useRef(null);const tt=r.useRef(null),{push:qe}=mr(),{tasks:Ut,poke:Vt}=sl(),[z,ue]=r.useState(null),xe=(h==null?void 0:h.id)??"",Me=e?cc(f,e):ur(f),Ke=r.useCallback((_,ie=0,Te=!1)=>{const Fe=new URLSearchParams(k);ie>0?Fe.set("i",String(ie)):Fe.delete("i");const cn=Fe.toString();j(`${Me}/shots/${_}${cn?`?${cn}`:""}`,{replace:Te})},[Me,j,k]),it=r.useCallback(()=>{const _=new URLSearchParams(k);_.delete("i"),_.delete("panel");const ie=_.toString();j(`${Me}${ie?`?${ie}`:""}`,{replace:!0})},[Me,j,k]),_t=tO(fe)?fe:"all",Nt=!e&&me==="ungrouped";r.useEffect(()=>{fe==="ungrouped"&&(le(null),J("ungrouped"))},[fe,le,J]);const bt=r.useCallback(async()=>{try{await w(),Q(null)}catch(_){Q(String(_.message??_))}},[w]),{archive:Sn,unarchive:Ct,unarchiveBatch:Mr}=yO(bt),{remove:pr,removeBatch:ct}=xO(bt);r.useEffect(()=>{M&&D(M)},[M]);const St=r.useMemo(()=>Ut.filter(_=>_.kind!=="catalog").map(_=>`${_.id}:${_.state}`).sort().join("|"),[Ut]),en=r.useRef(null);r.useEffect(()=>{if(en.current===null){en.current=St;return}en.current!==St&&(en.current=St,bt())},[St,bt]);const zt=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&!_.archived).sort(Bl),[m]),Lt=r.useMemo(()=>{const _=new Map;for(const ie of g)for(const Te of v[ie.id]??[])_.has(Te)||_.set(Te,[]),_.get(Te).push(ie);return _},[g,v]),nr=r.useMemo(()=>{const _=new Map;for(const ie of zt)ie.parentId&&(_.has(ie.parentId)||_.set(ie.parentId,[]),_.get(ie.parentId).push(ie));return _},[zt]),F=r.useMemo(()=>{if(!ye)return null;const _=zt.find(Fe=>Fe.id===ye);if(!_)return null;const ie=new Set([_.id]),Te=[_.id];for(;Te.length;)for(const Fe of nr.get(Te.pop())??[])ie.has(Fe.id)||(ie.add(Fe.id),Te.push(Fe.id));return{root:_,ids:ie}},[ye,zt,nr]);r.useEffect(()=>{!ye||!y||F||(ke(null),qe({kind:"error",title:"That shot is no longer available",detail:"Showing everything instead."}))},[ye,y,F,ke,qe]);const V=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&_.archived).sort(Bl),[m]),ee=r.useMemo(()=>{const _=ie=>{if(F)return ie.filter(Te=>F.ids.has(Te.id));if(e){const Te=new Set(v[e.id]??[]);return ie.filter(Fe=>Te.has(Fe.id))}return Nt?ie.filter(Te=>!Lt.has(Te.id)):ie};return{live:_(zt),archived:_(V)}},[zt,V,e,v,Lt,F,Nt]),pe=r.useMemo(()=>nO(ee.live,ee.archived,_t),[ee,_t]),he=r.useMemo(()=>{var Fe,cn;const _=b.length?b:((Fe=f.json)==null?void 0:Fe.products)??[],ie=((cn=f.json)==null?void 0:cn.characters)??[],Te=N.scenes;return{product:Bt=>{const Tn=_.find(gr=>gr.id===Bt)??i.find(gr=>gr.id===Bt);return Tn?Oa(Tn,"tooltip"):null},person:Bt=>{var Tn,gr;return((Tn=ie.find(Ga=>Ga.id===Bt))==null?void 0:Tn.name)??((gr=s.find(Ga=>Ga.id===Bt))==null?void 0:gr.name)??null},scene:Bt=>{const Tn=Te.find(gr=>gr.id===Bt);return Tn?to(Tn,"tooltip"):null}}},[b,i,f,s,N.scenes]),$e=r.useMemo(()=>{const _=new Map;return ie=>{var cn;const Te=_.get(ie.id);if(Te!==void 0)return Te;const Fe=aO(ie,he,(cn=t.find(Bt=>Bt.id===ie.engineId))==null?void 0:cn.displayName);return _.set(ie.id,Fe),Fe}},[he,t]),ze=r.useMemo(()=>rO(ee.live,ee.archived,Ee,$e),[ee,Ee,$e]),st=r.useMemo(()=>zt.reduce((_,ie)=>_+(Lt.has(ie.id)?0:1),0),[zt,Lt]),je=r.useMemo(()=>sO(Ph(pe,Ee,$e),Ot),[pe,Ee,$e,Ot]),Ze=r.useMemo(()=>{const _=new Map;for(const ie of m)_.has(ie.parentId)||_.set(ie.parentId,[]),_.get(ie.parentId).push(ie);return _},[m]),Ge=m.find(_=>_.kind==="root")??null,_e=r.useMemo(()=>{const _=m.find(Te=>Te.id===T);return _||(je.filter(Te=>Te.status!=="error")[0]??je[0]??Ge)},[m,T,je,Ge]),Pe=r.useMemo(()=>m.find(_=>_.id===ge&&_.kind!=="root"&&(_.status==="running"||_.status==="done"&&_.images.length>0))??null,[m,ge]),dt=(Pe==null?void 0:Pe.images[Number.parseInt(Qe,10)||0])??(Pe==null?void 0:Pe.images[0])??null,pt=r.useCallback(()=>{A(_=>{const ie=new URLSearchParams(_);return ie.delete("branch"),ie.delete("bi"),ie},{replace:!0})},[A]);r.useEffect(()=>{!ge||Pe||!y||(pt(),qe({kind:"error",title:"That shot is no longer available to refine",detail:"Making a new shot."}))},[ge,Pe,y,pt,qe]);const Ft=r.useCallback((_,ie=0)=>{var Te;A(Fe=>{const cn=new URLSearchParams(Fe);return cn.set("branch",_),ie>0?cn.set("bi",String(ie)):cn.delete("bi"),cn},{replace:!0}),(Te=tt.current)==null||Te.focus()},[A]),Ht=_=>{D(_),Pn(null)},xt=_=>M?Ke(_,0,!0):Ht(_),ut=_=>Pn(_===0?null:String(_)),tn=async _=>{var ie,Te;try{const Fe=await Ce.addNode({projectId:xe,parentId:_.parentId,kind:_.kind==="edit"?"edit":"generation",prompt:_.prompt,engineId:_.engineId,count:((ie=_.brief)==null?void 0:ie.variants)??Math.max(1,_.images.length||1),brief:_.brief,..._.kind==="edit"&&((Te=_.brief)!=null&&Te.sourceImage)?{sourceImage:_.brief.sourceImage}:{}});return await bt(),(Fe==null?void 0:Fe.id)??null}catch(Fe){return qe(dn(Fe,"Could not run this again")),null}},rr=async _=>{try{await Ce.cancelNode(_.id),await bt()}catch(ie){qe(dn(ie,"Could not cancel this shot"))}},On=r.useCallback(_=>{var ie,Te,Fe;_!=null&&_.scene&&((ie=tt.current)==null||ie.applyScene(_.scene)),_!=null&&_.scenesPanel&&((Te=tt.current)==null||Te.openAttach("Scenes")),(Fe=tt.current)==null||Fe.focus()},[]);r.useEffect(()=>{k.get("compose")!==null&&(On(),A(_=>{const ie=new URLSearchParams(_);return ie.delete("compose"),ie},{replace:!0}))},[k,On,A]);const gn=k.get("showcase"),Gn=r.useRef(null);r.useEffect(()=>{if(!gn||!u||Gn.current===gn)return;Gn.current=gn;const _=c.find(ie=>ie.id===gn);_?(W(wh(_)),qe({kind:"success",title:`Starting from "${_.title}"`})):qe({kind:"error",title:"That example is no longer available",detail:"Starting from scratch instead."}),A(ie=>{const Te=new URLSearchParams(ie);return Te.delete("showcase"),Te},{replace:!0})},[gn,u,c,A,qe]),r.useEffect(()=>{const _=ie=>{var gr,Ga;const Te=document.activeElement,Fe=((Te==null?void 0:Te.tagName)??"").toUpperCase(),cn=Fe==="INPUT"||Fe==="TEXTAREA"||Fe==="SELECT"||!!(Te!=null&&Te.closest('[contenteditable="true"]'));if(ie.key==="Enter"&&(ie.metaKey||ie.ctrlKey)){(gr=tt.current)==null||gr.submit(),ie.preventDefault();return}if(cn)return;if(ie.key==="?"){Y(!0),ie.preventDefault();return}if(ie.key==="/"&&!M){(Ga=tt.current)==null||Ga.focus(),ie.preventDefault();return}if(ie.key==="Escape"&&L){Y(!1),ie.preventDefault();return}if(ie.key==="Escape"&&M){it(),ie.preventDefault();return}if(ie.key==="Escape"&&ae.size>0){G(new Set),ie.preventDefault();return}if(ie.key==="Escape"&&ge){pt(),ie.preventDefault();return}if(!_e)return;if(ie.key==="b"&&_e.kind!=="root"&&_e.status==="done"&&_e.images.length>0){Ft(_e.id),ie.preventDefault();return}if(ie.key==="k"&&_e.kind!=="root"&&_e.status==="done"){ht(_e),ie.preventDefault();return}const Bt=(Ze.get(_e.parentId)??[]).filter(Ka=>Ka.kind!=="root"),Tn=Bt.findIndex(Ka=>Ka.id===_e.id);if(ie.key==="ArrowLeft"&&Tn>0)xt(Bt[Tn-1].id),ie.preventDefault();else if(ie.key==="ArrowRight"&&Tn>=0&&Tn<Bt.length-1)xt(Bt[Tn+1].id),ie.preventDefault();else if(ie.key==="ArrowUp"&&_e.parentId)xt(_e.parentId),ie.preventDefault();else if(ie.key==="ArrowDown"){const Ka=Ze.get(_e.id)??[];Ka.length&&(xt(Ka[0].id),ie.preventDefault())}else ie.key==="["&&Zt>0?ut(Zt-1):ie.key==="]"&&_e.images.length-1>Zt?ut(Zt+1):ie.key==="Enter"&&!M&&_e.kind!=="root"?Ke(_e.id):ie.key==="."&&!M&&se()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[_e,Ze,Zt,M,L,ae.size,ge,Ft,He]);const Ln=_=>G(ie=>{const Te=new Set(ie);return Te.delete(_)||Te.add(_),Te}),de=r.useMemo(()=>m.filter(_=>ae.has(_.id)),[m,ae]),Le=r.useMemo(()=>{if(de.length!==2)return null;const[_,ie]=de;return _.status!=="done"||ie.status!=="done"||!_.images[0]||!ie.images[0]?null:[_,ie]},[de]),ht=async(_,ie=!_.kept)=>{try{await Ce.keep(_.id,ie),await bt()}catch(Te){qe(dn(Te,"Could not update keeper status"))}},Je=async()=>{const _=!(de.length>0&&de.every(ie=>ie.kept));try{await Promise.all(de.filter(ie=>ie.kept!==_).map(ie=>Ce.keep(ie.id,_))),await bt()}catch(ie){qe(dn(ie,"Could not update keeper status"))}},gt=async _=>{try{await Ce.addToSet(_.id,[...ae]),G(new Set),await bt()}catch(ie){qe(dn(ie,"Could not add to the set"))}},et=r.useRef([]),[Wt,mt]=r.useState(!1);r.useEffect(()=>{Wt&&mt(!1)},[Wt]);const Kt=async(_,ie)=>{const Te=ie.trim();if(Te)try{const Fe=await Ce.createSet(f.id,Te);_.length>0&&await Ce.addToSet(Fe.id,_),G(new Set),await bt(),j(cc(f,Fe))}catch(Fe){qe(dn(Fe,"Could not create the set"))}},vn=()=>{const _=et.current;return et.current=[],_},Kn=async _=>{if(!e)return;const ie=_.trim();if(!(!ie||ie===e.name))try{const Te=await Ce.renameSet(e.id,ie);E(Te),j(cc(f,Te),{replace:!0}),w()}catch(Te){qe(dn(Te,"Could not rename the set"))}},Dt=async()=>{if(e)try{await Ce.deleteSet(e.id),C(e.id),j(ur(f),{replace:!0}),w()}catch(_){qe(dn(_,"Could not delete the set"))}},Zn=cw(m),ar=O||Zn&&!te,jn=Zn?o.jsx(SO,{entries:c,catalogs:{demoProducts:i,presenters:s,scenes:n},stagedId:P,onOpenProduct:_=>j(Js(f,_)),onOpenPresenter:_=>j(al(f,_)),onOpenScene:_=>j(rl(f,_)),onUse:_=>{Z(_.id),W(wh(_))}}):Ee.trim()?o.jsx(sc,{text:`No shots match “${Ee.trim()}”.`,onAll:kt,actionLabel:"Clear search"}):_t==="keepers"?o.jsx(sc,{text:"No keepers yet. Star a shot and it lands here.",onAll:()=>le(null)}):_t==="archived"?o.jsx(sc,{text:"Nothing archived.",onAll:()=>le(null)}):e?o.jsx(sc,{text:"Nothing in this set yet. Pick shots on All, then add them here."}):Nt?o.jsx(sc,{text:"Every shot is already in a set.",onAll:()=>J(null)}):null,vs={nodes:m,loaded:y,brand:f,engines:t,projectId:xe,imageIndex:Zt,setImageIndex:ut,close:it,select:xt,retry:_=>{tn(_).then(ie=>{ie&&xt(ie)})},cancel:_=>void rr(_),reload:()=>bt(),remix:_=>{W({..._.brief,_at:Date.now()}),_.brief&&m9(f.id,{tokens:Xw(_.brief),tplFields:_.brief.templateFields??{},branchId:null}),it()},branch:_=>{Ft(_.id),it()},archive:_=>void Sn(_).then(()=>it()),unarchive:_=>void Ct(_),delete:_=>void pr(_).then(()=>it()),refined:(_,ie)=>{ie==="edit"&&He(_)},tokenNames:he};return o.jsxs("div",{className:"sc-work","data-assets":ar,children:[o.jsxs("main",{className:"sc-canvas",id:"main","data-firstrun":Zn||void 0,children:[ne&&o.jsx("div",{className:"sc-canvas-alert",children:o.jsx(Jm,{failure:oo(ne)})}),(!Zn||e)&&o.jsx(vO,{sets:g,active:e,ungrouped:Nt,ungroupedCount:st,onPlaceAll:()=>e?j(ur(f)):J(null),onPlaceUngrouped:()=>e?j(`${ur(f)}?in=ungrouped`):J("ungrouped"),onOpenSet:_=>j(cc(f,_)),onNewSet:_=>void Kt(vn(),_),onResetNewSet:()=>{et.current=[]},onRenameSet:_=>void Kn(_),onDeleteSet:()=>void Dt(),askCreate:Wt,lens:_t,lensCounts:ze,onLens:_=>le(_==="all"?null:_),q:Ee,onQ:at,searchTotal:pe.length,sort:Ot,onSort:Jt,tile:Ae,onTile:Ne,assets:O,onAssets:se,showAssets:!te}),F&&o.jsxs("div",{className:"sc-lineage-bar",children:[o.jsx("button",{type:"button",className:"sc-crumb-back",onClick:()=>ke(null),children:"All shots"}),o.jsx("span",{className:"sc-crumb-sep",children:"›"}),o.jsx("b",{dir:"auto",children:Cn(F.root)}),o.jsx("span",{className:"sc-crumb-sep",children:"›"}),o.jsx("span",{className:"sc-crumb-here",children:"versions"})]}),o.jsx(fO,{nodes:je,selectedId:(_e==null?void 0:_e.id)??null,onOpen:Ke,onRetry:_=>void tn(_),onCancel:_=>void rr(_),onToggleKeep:_=>void ht(_),onArchive:_=>_.archived?Ct(_):Sn(_),onDeletePermanently:pr,engineName:_=>{var ie;return(ie=t.find(Te=>Te.id===_))==null?void 0:ie.displayName},setsFor:_=>Lt.get(_)??[],picked:ae,onPick:Ln,sending:z,onBranch:Ft,branchingFrom:(Pe==null?void 0:Pe.id)??null,branchingFromImage:dt,expanded:lt,onToggleExpand:_=>jt(ie=>{const Te=new Set(ie);return Te.delete(_)||Te.add(_),Te}),versionsOf:_=>{var ie;return((ie=nr.get(_))==null?void 0:ie.length)??0},onVersions:ke,tile:Ae,empty:jn})]}),Le&&o.jsx(P9,{open:xn,onOpenChange:Rn,a:Le[0],b:Le[1],imageA:Le[0].images[0],imageB:Le[1].images[0]}),ar&&o.jsx("div",{className:"sc-assets-backdrop",onClick:()=>U(!1),"aria-hidden":!0}),o.jsx(lO,{open:L,onOpenChange:Y}),!te&&o.jsx(gO,{brand:f,shots:m,attached:H,onProduct:_=>{var ie;return(ie=tt.current)==null?void 0:ie.insertToken({t:"product",id:_})},onCharacter:_=>{var ie;return(ie=tt.current)==null?void 0:ie.insertToken({t:"character",id:_})},onColor:(_,ie)=>{var Te;return(Te=tt.current)==null?void 0:Te.insertToken({t:"color",hex:_,name:ie})},onRef:_=>{var ie;return(ie=tt.current)==null?void 0:ie.insertToken({t:"ref",imageHash:_})},onTemplate:_=>{var ie;return(ie=tt.current)==null?void 0:ie.applyScene(_)},onClose:()=>U(!1)}),o.jsxs(g9,{full:!ar,children:[ae.size>0&&o.jsx(jO,{count:ae.size,sets:g,onAdd:_=>void gt(_),onNew:()=>{et.current=[...ae],mt(!0)},onClear:()=>G(new Set),onKeep:()=>void Je(),allKept:de.length>0&&de.every(_=>_.kept),comparable:Le,onCompare:()=>Rn(!0),archivedLens:_t==="archived",pickedIds:[...ae],onRestoreBatch:_=>void Mr(_).then(()=>G(new Set)),onDeleteBatch:_=>void ct(_).then(()=>G(new Set))}),o.jsx(bp,{ref:tt,projectId:xe||null,brand:f,engines:t,parent:Ge,shots:m,initialBrief:X,suppressDraftRestore:gn!==null,startScene:k.get("scene")??void 0,startPresenter:k.get("presenter")??void 0,startProduct:k.get("product")??void 0,openAttachTab:k.get("attach")==="scenes"?"Scenes":k.get("attach")==="products"?"Products":void 0,target:Pe,onClearTarget:pt,onRestoreBranchId:He,setSlug:(e==null?void 0:e.slug)??null,onSending:ue,onAttached:K,sourceImage:dt??void 0,onQueued:(_,ie)=>{W(null),A(cn=>{const Bt=new URLSearchParams(cn);return Bt.delete("scene"),Bt.delete("attach"),Bt.delete("presenter"),Bt.delete("product"),Bt},{replace:!0}),Vt();const Te=()=>ue(null),Fe=()=>{ie!=="edit"||!_||A(cn=>{const Bt=new URLSearchParams(cn);return Bt.set("branch",_),Bt.delete("bi"),Bt},{replace:!0})};e&&_?Ce.addToSet(e.id,[_]).then(bt).then(Fe).finally(Te):bt().then(Fe).finally(Te)}})]}),o.jsx(Uh,{context:vs})]})}function NO(e){return e.width&&e.height?`${e.width} x ${e.height}`:"untouched render"}function AO({open:e,onOpenChange:t,hash:n,baseName:s}){const[i,c]=r.useState([]),[u,f]=r.useState([]),[h,m]=r.useState(!1),[g,v]=r.useState(null);r.useEffect(()=>{e&&(v(null),f(["original"]),Ce.exportPresets().then(c).catch(()=>c([])))},[e]);const y=N=>f(j=>j.includes(N)?j.filter(k=>k!==N):[...j,N]),w=u,E=w.length>0?1:0,C=async()=>{m(!0),v(null);try{w.length>0&&await OH(n,w,s),t(!1)}catch(N){v(N instanceof Error?N.message:"Export failed")}finally{m(!1)}},b=i.map(N=>({id:N.id,label:N.label.replace(/\s*\d+×\d+$/,""),note:NO(N)}));return o.jsx(el,{open:e,onOpenChange:t,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:ru,children:[o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-dlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})}),o.jsx(nl,{children:"Export this shot"}),o.jsx("p",{className:"sc-dlg-sub",children:"Pick the sizes you need. Several downloads one zip."}),o.jsx("div",{className:"sc-opts",children:b.map(N=>o.jsxs("button",{type:"button",className:"sc-opt","data-active":u.includes(N.id),onClick:()=>y(N.id),"aria-pressed":u.includes(N.id),children:[o.jsx("span",{className:"sc-cb"}),o.jsxs("span",{children:[N.label,o.jsx("small",{children:N.note})]})]},N.id))}),g&&o.jsx("p",{className:"sc-dlg-err",children:g}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary sc-dlg-go","aria-disabled":E===0||h||void 0,title:E===0&&!h?"Pick at least one size to download":void 0,onClick:()=>{E!==0&&!h&&C()},children:h?o.jsx(ln,{size:"1"}):E===0?"Download":E>1?"Download both":w.length>0?"Download zip":"Download PNG"})]})})}function MO(e){const t=_r.find(n=>{var s;return n.id===((s=e.brief)==null?void 0:s.format)});return t?t.w/t.h:1}function RO({node:e,imageIndex:t,onRetry:n,onCancel:s,engineName:i}){const[c,u]=r.useState(null),[f,h]=r.useState(null),[,m]=r.useState(0);if(r.useEffect(()=>{if(e.status!=="running")return;const g=setInterval(()=>m(v=>v+1),1e3);return()=>clearInterval(g)},[e.status]),r.useEffect(()=>{if(!c)return;const g=()=>{const{naturalWidth:y,naturalHeight:w,clientWidth:E,clientHeight:C}=c;if(!y||!w||!E||!C)return;const b=Math.min(E/y,C/w),N=y*b,j=w*b;h({left:(E-N)/2,top:(C-j)/2,width:N,height:j})};g(),c.addEventListener("load",g);const v=new ResizeObserver(g);return v.observe(c),()=>{c.removeEventListener("load",g),v.disconnect()}},[c]),e.kind==="root")return o.jsx(B0,{className:"sc-frame",p:"8",children:o.jsxs(fr,{direction:"column",align:"center",gap:"2",py:"6",children:[o.jsx(Io,{className:"sc-display",size:"7",align:"center",children:"Blank canvas, full brand."}),o.jsx(Io,{color:"gray",size:"2",align:"center",children:"Pick a Template below (engineered briefs, your product attached) or describe a visual."})]})});if(e.status==="running")return o.jsxs("div",{className:"sc-stage-wait",style:{"--sc-wait-ar":MO(e)},children:[o.jsx("span",{className:"sc-shimmer"}),o.jsxs("div",{className:"sc-stage-wait-say",children:[o.jsxs("span",{className:"sc-stage-wait-t",children:[tp(e.createdAt),", ",eo(e.createdAt),"s"]}),s&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost","data-urgent":eo(e.createdAt)>=60||void 0,onClick:s,children:"Cancel"})]})]});if(e.status==="cancelled"||e.status==="error"){const v=e.status==="cancelled"?fw():oo(e.error,i);return o.jsx(Qm,{failure:v,density:"stage",onRetry:n})}return o.jsx(fr,{justify:"center",children:o.jsx(B0,{className:"sc-frame",style:{display:"inline-block",maxWidth:"100%"},children:e.status==="done"&&e.images[t]&&o.jsxs(B0,{position:"relative",style:{lineHeight:0},children:[o.jsx("img",{ref:u,src:rn(e.images[t]),alt:e.prompt,style:{display:"block",maxWidth:"100%"}}),f&&o.jsx("div",{style:{position:"absolute",left:f.left,top:f.top,width:f.width,height:f.height,lineHeight:"normal"}})]})})})}function PO(e){const{node:t}=e;return o.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:0},children:t?o.jsx(xi,{children:o.jsx("div",{style:{padding:"14px 2px 14px 0"},children:o.jsx(TO,{...e,node:t})})}):o.jsx(fr,{align:"center",justify:"center",style:{flex:1},p:"4",children:o.jsx(Io,{size:"1",style:{color:"var(--sc-fg3)",textAlign:"center"},children:"Pick a shot to see its details."})})})}function LO({children:e}){return o.jsx("div",{className:"sc-eyebrow",style:{margin:"16px 0 7px"},children:e})}function TO({node:e,onCompare:t,onDelete:n}){return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-eyebrow",children:"Brief"}),o.jsx("p",{className:"sc-brief-record",children:uO(e)||"(none)"}),t&&o.jsxs(o.Fragment,{children:[o.jsx(LO,{children:"Compare"}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",style:{width:"100%"},onClick:t,children:"Show what changed"})]}),e.archived&&o.jsx("div",{style:{marginTop:16},children:o.jsx(is,{label:"Delete this shot permanently",title:"Delete this shot permanently?",body:"This cannot be undone.",busy:!1,onConfirm:n,fullWidth:!0})})]})}function HO({size:e=14,dim:t=!1}){return o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":!0,style:{opacity:t?.45:1,flexShrink:0},children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"scCoinFace",x1:"0",y1:"0",x2:"0.7",y2:"1",children:[o.jsx("stop",{offset:"0%",stopColor:"#FFE08A"}),o.jsx("stop",{offset:"45%",stopColor:"#F2B03C"}),o.jsx("stop",{offset:"100%",stopColor:"#C6871B"})]}),o.jsxs("linearGradient",{id:"scCoinInner",x1:"0.2",y1:"0",x2:"0.8",y2:"1",children:[o.jsx("stop",{offset:"0%",stopColor:"#FFF3C4"}),o.jsx("stop",{offset:"100%",stopColor:"#E9A72C"})]})]}),o.jsx("circle",{cx:"12",cy:"12",r:"10.5",fill:"url(#scCoinFace)"}),o.jsx("circle",{cx:"12",cy:"12",r:"8",fill:"url(#scCoinInner)"}),o.jsx("path",{d:"M7.5 7.2a10 10 0 0 1 6.4-2.4",stroke:"#FFF7D6",strokeWidth:"1.4",strokeLinecap:"round",fill:"none",opacity:"0.85"}),o.jsx("circle",{cx:"12",cy:"12",r:"10.5",fill:"none",stroke:"#A66F12",strokeWidth:"1",opacity:"0.55"})]})}function DO({brief:e,brand:t}){var g,v;const{scenes:n,presenters:s,demoProducts:i}=pn(),c=(e==null?void 0:e.tokens)??[];if(!c.length)return null;const u=((g=t==null?void 0:t.json)==null?void 0:g.products)??[],f=((v=t==null?void 0:t.json)==null?void 0:v.characters)??[],h=su(t),m=c.flatMap(y=>{var w,E,C,b;if((y==null?void 0:y.t)==="product"){const N=u.find(k=>k.id===y.id),j=N?null:i.find(k=>k.id===y.id);return[{key:`p${y.id}`,kind:"product",label:(N==null?void 0:N.name)??(j==null?void 0:j.name)??"product",thumb:N?_n((E=(w=N==null?void 0:N.shots)==null?void 0:w[0])==null?void 0:E.file):(j==null?void 0:j.previewUrl)??null,to:t&&(N||j)?Js(t,y.id):void 0}]}if((y==null?void 0:y.t)==="character"){const N=f.find(A=>A.id===y.id),j=N?null:s.find(A=>A.id===y.id),k=(j==null?void 0:j.id)??(N==null?void 0:N.presenterId)??((N==null?void 0:N.origin)==="custom"?N.id:void 0);return[{key:`h${y.id}`,kind:"presenter",label:(N==null?void 0:N.name)??(j==null?void 0:j.name)??"someone",thumb:N?_n(N==null?void 0:N.preview)??_n((b=(C=N==null?void 0:N.shots)==null?void 0:C[0])==null?void 0:b.file):(j==null?void 0:j.avatarUrl)??(j==null?void 0:j.previewUrl)??null,to:t&&k?al(t,k):void 0}]}if((y==null?void 0:y.t)==="template"){const N=h.find(j=>j.id===y.id)??n.find(j=>j.id===y.id);return[{key:`t${y.id}`,kind:"scene",label:(N==null?void 0:N.name)??"a scene no longer in the catalog",thumb:(N==null?void 0:N.previewUrl)??null,to:t&&N?rl(t,N.id):void 0,tint:yp(N==null?void 0:N.previewColor)}]}return(y==null?void 0:y.t)==="color"?[{key:`c${y.hex}`,kind:"color",label:y.name??y.hex,swatch:y.hex}]:[]});return m.length?o.jsx("div",{className:"sc-ingredients",children:m.map(y=>{const w=o.jsxs(o.Fragment,{children:[y.thumb?o.jsx("img",{src:y.thumb,alt:""}):y.swatch?o.jsx("i",{style:{background:y.swatch}}):null,y.label]}),E=y.tint?{"--tint":y.tint}:void 0;return y.to?o.jsx(Kh,{className:"sc-ingredient",to:y.to,"data-kind":y.kind,"data-tinted":y.tint?"":void 0,style:E,title:`Open ${y.kind} ${y.label}`,children:w},y.key):o.jsx("span",{className:"sc-ingredient","data-kind":y.kind,"data-tinted":y.tint?"":void 0,style:E,title:`${y.kind}: ${y.label}`,children:w},y.key)})}):null}function $O(e,t){const n=r.useMemo(()=>new Map(e.map(g=>[g.id,g])),[e]),s=r.useMemo(()=>{const g=[];let v=t.parentId?n.get(t.parentId):null;for(;v&&v.kind!=="root";)g.unshift(v),v=v.parentId?n.get(v.parentId):null;return g},[t,n]),i=r.useMemo(()=>e.filter(g=>g.parentId===t.id&&g.kind!=="root"),[e,t.id]),c=r.useMemo(()=>e.filter(g=>g.parentId===t.parentId&&g.kind!=="root"),[e,t.parentId]),u=c.findIndex(g=>g.id===t.id),f=r.useMemo(()=>e.find(g=>g.kind==="root")??null,[e]),h=t.parentId?n.get(t.parentId):null,m=h&&h.kind!=="root"?h:null;return{byId:n,ancestors:s,children:i,siblings:c,sibIndex:u,root:f,parent:h,parentShot:m}}function FO({node:e,nodes:t,brand:n,engines:s,projectId:i,imageIndex:c,onImageIndex:u,onClose:f,onSelect:h,onRetry:m,onCancel:g,onChanged:v,onRemix:y,onArchive:w,onUnarchive:E,onDelete:C,onRefined:b,tokenNames:N}){const{ancestors:j,children:k,siblings:A,sibIndex:M,root:T,parentShot:D}=$O(t,e),L=r.useMemo(()=>s.find(le=>le.id===e.engineId),[s,e.engineId]),{push:Y}=mr(),I=r.useMemo(()=>R9(e,D),[e,D]),se=r.useMemo(()=>D?cO(D.brief,e.brief,N):null,[D,e.brief,N]),[U,te]=r.useState(!1),[O,ne]=r.useState(!1),[Q,H]=r.useState(!1),K=e.images[c]??e.images[0],X=e.prompt.slice(0,40).replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"")||"shot",W=async()=>{try{const le=await(await fetch(rn(K))).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":le})]),Y({kind:"success",title:"Copied to clipboard"})}catch(le){Y(dn(le,"Copy failed"))}};r.useEffect(()=>{const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[]);const P=[{key:"export",label:"Export",icon:o.jsx(xx,{size:14}),onClick:()=>te(!0)},{key:"keep",label:e.kept?"Remove from keepers":"Keep",icon:o.jsx(mh,{size:14,weight:e.kept?"fill":"regular"}),onClick:()=>void Ce.keep(e.id,!e.kept).then(v).catch(le=>Y(dn(le,"Could not update keeper status"))),tint:e.kept?"var(--sc-star)":void 0},{key:"copy",label:"Copy image",icon:o.jsx(pH,{size:14}),onClick:()=>void W()},...I?[{key:"compare",label:"Compare with source",icon:o.jsx(cH,{size:14}),onClick:()=>ne(!0)}]:[]],Z=[{key:"archive",label:e.archived?"Restore":"Archive",icon:e.archived?o.jsx(o1,{size:14}):o.jsx(W5,{size:14}),onClick:()=>e.archived?E(e):w(e)},...e.archived?[{key:"delete",label:"Delete permanently",icon:o.jsx(Y1,{size:14}),onClick:()=>H(!0),tint:"var(--sc-red)"}]:[]],ae=e.status==="done"&&e.images.length>0,G=ae?[...P,...Z]:Z,fe=(le,me=!1)=>o.jsxs("button",{type:"button",className:"sc-fr","data-fb-node":le.id,"data-current":me,"data-failed":le.status==="error"||!le.images[0]&&le.status!=="running"&&le.status!=="cancelled","data-cancelled":le.status==="cancelled"&&!le.images[0],title:Cn(le),onClick:()=>h(le.id),children:[le.images[0]?o.jsx("img",{src:rn(le.images[0]),alt:""}):le.status==="running"?o.jsx("span",{className:"sc-shimmer"}):le.status==="cancelled"?o.jsx(ow,{size:13}):o.jsx(nu,{size:13}),le.kept&&o.jsx("span",{className:"sc-fr-star",children:o.jsx(mh,{size:11,weight:"fill"})})]},le.id);return na.createPortal(o.jsx(zc,{trapped:!0,loop:!0,asChild:!0,children:o.jsxs("div",{className:"sc-ovl","data-fb":"shot-overlay","data-fb-node":e.id,"data-fb-variant":c,role:"dialog","aria-modal":"true","aria-label":Cn(e),children:[o.jsxs("header",{className:"sc-ovl-bar",children:[o.jsxs("div",{className:"sc-ovl-bar-l",children:[o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:f,"aria-label":"Close",title:"Close (esc)",children:o.jsx(Mn,{size:13})}),A.length>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"sc-icon-btn",disabled:M<=0,onClick:()=>M>0&&h(A[M-1].id),"aria-label":"Previous version",title:"Previous version",children:o.jsx(wi,{size:13})}),o.jsx("button",{type:"button",className:"sc-icon-btn",disabled:M>=A.length-1,onClick:()=>M<A.length-1&&h(A[M+1].id),"aria-label":"Next version",title:"Next version",children:o.jsx(K1,{size:13})})]})]}),G.length>0&&o.jsxs("div",{className:"sc-ovl-bar-r",children:[o.jsx("div",{className:"sc-ovl-acts",children:G.map(le=>o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:le.onClick,"aria-label":le.label,title:le.label,style:le.tint?{color:le.tint}:void 0,children:le.icon},le.key))}),o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsx("button",{type:"button",className:"sc-icon-btn sc-ovl-overflow","aria-label":"More actions",children:o.jsx(vH,{size:18,weight:"bold"})})}),o.jsx(Zo,{align:"end",sideOffset:6,children:G.map(le=>o.jsxs(Qr,{onSelect:le.onClick,color:le.tint?"red":void 0,children:[le.icon,le.label]},le.key))})]})]})]}),o.jsx(Yc,{open:Q,onOpenChange:H,children:o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:"Delete this shot permanently?"}),o.jsx(Qc,{size:"2",children:"This cannot be undone."}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:()=>C(e),children:"Delete permanently"})})]})]})}),o.jsxs("div",{className:"sc-ovl-stage","data-takes":e.status==="done"&&e.images.length>1?"":void 0,children:[o.jsx(RO,{node:e,imageIndex:c,onRetry:()=>m(e),onCancel:()=>g(e),engineName:L==null?void 0:L.displayName}),e.status==="done"&&e.images.length>1&&o.jsx("div",{style:{display:"flex",gap:8},children:e.images.map((le,me)=>o.jsx("button",{type:"button",onClick:()=>u(me),"aria-label":`Image ${me+1}`,style:{padding:0,border:"none",background:"none",cursor:"pointer",lineHeight:0},children:o.jsx("img",{src:rn(le),alt:"",className:"sc-thumb","data-active":me===c,width:52,height:52})},le))})]}),o.jsxs("aside",{className:"sc-ovl-meta",children:[o.jsxs("div",{className:"sc-ovl-head",children:[o.jsx("b",{children:e.kind==="edit"?"Refined shot":"Shot"}),o.jsx("small",{children:e.images.length>1?`${c+1} of ${e.images.length} variants`:Cn(e)}),o.jsx("span",{className:"sc-ovl-meta-sep","aria-hidden":!0}),o.jsx("small",{className:"sc-ovl-eng",children:e.engineId}),ae&&o.jsxs("small",{className:"sc-ovl-spend",title:e.costUsd>0?"Of your API budget":"No API cost for this shot",children:[o.jsx(HO,{size:12}),e.costUsd>0?`$${e.costUsd.toFixed(2)}`:"Free"]})]}),o.jsx(DO,{brief:e.brief,brand:n}),D&&o.jsxs("div",{className:"sc-ctx",children:[o.jsxs("button",{type:"button",className:"sc-ctx-chip",onClick:()=>h(D.id),title:`Open ${Cn(D)}, the shot this came from`,children:[I&&o.jsx("img",{src:rn(I),alt:""}),o.jsxs("span",{className:"sc-ctx-chip-t",children:["refined from ",o.jsx("b",{children:Cn(D)})]})]}),se&&o.jsx("p",{className:"sc-ctx-changed",children:se})]}),(j.length>0||k.length>0)&&o.jsxs("div",{className:"sc-ovl-trail",children:[o.jsx("span",{className:"sc-eyebrow",children:"Versions"}),o.jsxs("div",{className:"sc-ovl-trail-row",children:[j.map(le=>o.jsxs("span",{style:{display:"contents"},children:[fe(le),o.jsx("span",{className:"sc-wire"})]},le.id)),fe(e,!0),k.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-wire"}),k.slice(0,4).map(le=>fe(le))]})]})]}),(ae||e.brief)&&o.jsxs("div",{className:"sc-sugg",children:[e.brief&&o.jsxs("button",{type:"button",className:"sc-s",onClick:()=>y(e),title:"Put this shot's setup back in the brief, to change and run again",children:[o.jsx(lH,{size:12})," Reuse setup"]}),ae&&o.jsxs("button",{type:"button",className:"sc-s",onClick:()=>m(e),title:"Run the same setup again for a different take",children:[o.jsx(o1,{size:12})," Try again"]})]}),o.jsx("div",{className:"sc-ovl-body",children:o.jsx(PO,{node:e.kind!=="root"?e:null,nodes:t,imageIndex:c,onChanged:v,brand:n,onExport:()=>te(!0),onCompare:I?()=>ne(!0):void 0,onArchive:()=>w(e),onUnarchive:()=>E(e),onDelete:()=>C(e)})}),o.jsxs("div",{className:"sc-ovl-edit",children:[e.status==="done"&&e.images.length>0&&o.jsx("div",{className:"sc-eyebrow sc-ovl-edit-head",children:"Refine this shot"}),o.jsx(bp,{projectId:i,brand:n,engines:s,parent:T,target:e,sourceImage:K,shots:t,persistDraft:!1,onQueued:async(le,me)=>{await v(),le&&h(le),le&&(b==null||b(le,me))}})]})]}),o.jsx(AO,{open:U,onOpenChange:te,hash:K,baseName:X}),D&&I&&o.jsx(P9,{open:O,onOpenChange:ne,a:D,b:e,imageA:I,imageB:K})]})}),document.body)}function nv(){const{shotId:e}=za(),t=$E(),{push:n}=mr(),s=t.nodes.find(h=>h.id===e)??null,i=t.loaded&&(!s||s.kind==="root"),[c,u]=r.useState(null),f=i&&c===e;return r.useEffect(()=>{if(!i||!e||c===e)return;let h=!0;return t.reload().finally(()=>h&&u(e)),()=>{h=!1}},[i,e,c,t.reload]),r.useEffect(()=>{s&&u(null)},[s]),r.useEffect(()=>{f&&(n({kind:"error",title:"That shot is no longer available",detail:"Back to the feed."}),t.close())},[f,t.close,n]),t.loaded?!s||s.kind==="root"?f?null:o.jsx("div",{className:"sc-ovl-wait",role:"status","aria-label":"Loading",children:o.jsx(ln,{size:"3"})}):o.jsx(FO,{node:s,nodes:t.nodes,brand:t.brand,engines:t.engines,projectId:t.projectId,imageIndex:t.imageIndex,onImageIndex:t.setImageIndex,onClose:t.close,onSelect:t.select,onRetry:t.retry,onCancel:t.cancel,onChanged:t.reload,onRefined:t.refined,tokenNames:t.tokenNames,onRemix:t.remix,onArchive:()=>t.archive(s),onUnarchive:()=>t.unarchive(s),onDelete:()=>t.delete(s)}):o.jsx("div",{className:"sc-ovl-wait",role:"status","aria-label":"Loading",children:o.jsx(ln,{size:"3"})})}function IO(){const e=Zv();return o.jsx(fr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(Jm,{failure:oo(String((e==null?void 0:e.message)??e))})})}function _O(){const{setSlug:e=""}=za(),{pathname:t,search:n}=mn(),{brand:s,sets:i,loaded:c,refresh:u}=It(),f=an(),h=lr({path:Ye.set,end:!1}),m=i.find(y=>y.slug===e)??i.find(y=>y.id===e)??null,[g,v]=r.useState(null);if(r.useEffect(()=>{if(!c||m)return;if(g===e){f(ur(s),{replace:!0});return}let y=!0;return u().finally(()=>y&&v(e)),()=>{y=!1}},[c,m,e,g,s,f,u]),r.useEffect(()=>{m&&v(null)},[m]),!c||!m)return null;if(m.slug!==e){const y=h?t.slice(h.pathnameBase.length):"";return o.jsx(Ys,{to:cc(s,m)+y+n,replace:!0})}return o.jsx(L9,{set:m},m.id)}function OO(){const{pathname:e,search:t}=mn();return o.jsx(Ys,{to:zH(e,t),replace:!0})}function ZO(){const{brandSlug:e}=za();return o.jsx(Ys,{to:`/${e}?settings=brand`,replace:!0})}function VO(){const{sceneId:e}=za();return o.jsx(I_,{},e)}function zO(){const{presenterId:e}=za();return o.jsx(Z_,{},e)}function BO(){const{productId:e}=za();return o.jsx(J_,{},e)}const UO=PC([{element:o.jsx(RF,{}),errorElement:o.jsx(IO,{}),children:[{index:!0,element:o.jsx(CF,{})},{path:Ye.setup,element:o.jsx(PF,{})},{path:Ye.legacy,element:o.jsx(OO,{})},{path:Ye.brand,element:o.jsx(jF,{}),children:[{index:!0,element:o.jsx(H_,{})},{path:Ye.hub,element:o.jsx(L9,{set:null}),children:[{path:Ye.hubShot,element:o.jsx(nv,{})}]},{path:Ye.set,element:o.jsx(_O,{}),children:[{path:Ye.setShot,element:o.jsx(nv,{})}]},{path:Ye.kit,element:o.jsx(ZO,{})},{path:Ye.products,element:o.jsx(B_,{})},{path:Ye.product,element:o.jsx(BO,{})},{path:Ye.scenes,element:o.jsx($_,{})},{path:Ye.scene,element:o.jsx(VO,{})},{path:Ye.presenters,element:o.jsx(O_,{})},{path:Ye.presenter,element:o.jsx(zO,{})}]},{path:Ye.notFound,element:o.jsx(Ys,{to:Ye.root,replace:!0})}]}]),T2=localStorage.getItem("sc-theme")??localStorage.getItem("bt-theme");document.documentElement.dataset.theme=T2==="light"||T2==="dark"?T2:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";xb.createRoot(document.getElementById("root")).render(o.jsx($t.StrictMode,{children:o.jsx(KL,{children:o.jsx(TH,{children:o.jsx(tC,{router:UO})})})}));
|
|
101
|
+
`||e===" ";function dI(e){const t=Jw(e);for(let n=t.length-1;n>=0;n--){const s=t[n];if(m1(s))return null;if(uI(s))return n===0||m1(t[n-1])?{sigil:s,query:t.slice(n+1)}:null}return null}function fI(e,t){const n=c=>Math.max(c.lastIndexOf("$"),c.lastIndexOf("/"),c.lastIndexOf("@"),c.lastIndexOf("#")),s=n(t);if(s>=0)return t.slice(0,s);const i=[];for(let c=e.previousSibling;c&&c.nodeType===Node.TEXT_NODE;c=c.previousSibling){const u=c.textContent??"",f=n(u);if(f>=0){c.textContent=u.slice(0,f);for(const h of i)h.remove();return""}i.push(c)}return t}function E2(e,t){if(!e||!t)return;e.normalize();const n=Ch(e,t);t.remove(),Bs(e),Yl(e,n)}function Ch(e,t){let n=0;for(const s of Array.from(e.childNodes)){if(s===t)break;n+=h1(s)}return n}function hI(e){if(!e)return;const t=window.getSelection();if(!t||t.rangeCount===0||!t.getRangeAt(0).collapsed)return;const n=t.getRangeAt(0),s=n.startContainer;if(s.nodeType!==Node.TEXT_NODE||!e.contains(s))return;const i=s,c=i.textContent??"",u=n.startOffset;c[u-1]!==" "||c[u]!==" "||(i.textContent=c.slice(0,u)+c.slice(u+1),Ir(e,i,u))}function Sh(e){var n;const t=e.target;(n=t==null?void 0:t.closest)!=null&&n.call(t,'input, textarea, select, [contenteditable=""], [contenteditable="true"]')||e.preventDefault()}const C2=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function mI(e){let t="",n="";const s=i=>{var f;if(i.nodeType===Node.TEXT_NODE){const h=i.textContent??"";t+=h,n+=C2(h);return}const c=i,u=(f=c.dataset)==null?void 0:f.tok;if(u){const h=pI(c);t+=h,n+=`<span data-sc-tok="${C2(u)}">${C2(h)}</span>`;return}i.childNodes.forEach(s)};return e.cloneContents().childNodes.forEach(s),{text:t,html:`<span data-sc-brief="1">${n}</span>`}}function pI(e){let t="";for(const n of Array.from(e.childNodes))n.nodeType===Node.TEXT_NODE&&(t+=n.textContent??"");return t.trim()}function gI(e){if(!e.includes("data-sc-brief")&&!e.includes("data-bt-brief"))return null;const n=new DOMParser().parseFromString(e,"text/html").querySelector("[data-sc-brief], [data-bt-brief]");if(!n)return null;const s=[],i=c=>{var m,g;if(c.nodeType===Node.TEXT_NODE){s.push(c.textContent??"");return}const u=c,f=((m=u.dataset)==null?void 0:m.scTok)??((g=u.dataset)==null?void 0:g.btTok);if(f===void 0){c.childNodes.forEach(i);return}const h=zs(f);s.push(h??u.textContent??"")};return n.childNodes.forEach(i),s.length?s:null}const S2=e=>(e==null?void 0:e.querySelector('[data-kind="template"]'))??null,A0=e=>{var t;return((t=e==null?void 0:e.closest)==null?void 0:t.call(e,vp))??null};function j2(e,t,n={}){var i;if(!e)return!1;let s=!1;for(let c=0;c<32;c++){const u=yI(e,!!n.commit);if(!u)break;const f={t:"color",hex:u.hex,name:(i=n.nameFor)==null?void 0:i.call(n,u.hex)};bI(e,u.node,u.start,u.end,t(f)),s=!0}return s&&Bs(e),s}function vI(e,t){var i;e.dataset.kind="color",e.dataset.tok=Qw(t);const n=t.name??t.hex,s=e.querySelector(".sc-token-swatch");s&&(s.style.background=t.hex);for(const c of Array.from(e.childNodes))if(c.nodeType===Node.TEXT_NODE){c.textContent=n;break}e.getAttribute("role")==="button"&&e.setAttribute("aria-label",`colour: ${n}. Change or remove.`),(i=e.querySelector('[data-role="remove"]'))==null||i.setAttribute("aria-label",`Remove ${n}`)}function yI(e,t){for(let n=e.childNodes.length-1;n>=0;n--){const s=e.childNodes[n];if(s.nodeType!==Node.TEXT_NODE)continue;const i=s,c=wI(i.textContent??"",t,(f,h)=>xI(i,h,f)),u=c[c.length-1];if(u)return{node:i,...u}}return null}function xI(e,t,n){if(n>0)return m1(t[n-1]);const s=e.previousSibling;if(!s||No(s))return!0;if(s.nodeType===Node.TEXT_NODE){const i=s.textContent??"";return!i.length||m1(i[i.length-1]??"")}return!0}function wI(e,t,n){const s=[];for(let i=0;i<e.length;i++){if(e[i]!=="#"||!n(i,e))continue;let c=i+1;for(;c<e.length&&/[0-9A-Fa-f]/.test(e[c]??"");)c++;const u=e.slice(i,c),f=C$(u);if(!f)continue;if(c-i-1===3){const m=e[c];if(m===void 0?!t:/[0-9A-Za-z]/.test(m))continue}s.push({start:i,end:c,hex:f})}return s}function bI(e,t,n,s,i){const c=t.textContent??"",u=c.slice(0,n),f=c.slice(s),h=typeof window>"u"?null:window.getSelection();let m=null;h&&h.rangeCount>0&&h.getRangeAt(0).startContainer===t&&(m=h.getRangeAt(0).startOffset);const g=t.parentNode;if(g&&(t.textContent=f.length?f:" ",g.insertBefore(i,t),u&&g.insertBefore(document.createTextNode(u),i),m!=null)){if(m<=n){const v=i.previousSibling;(v==null?void 0:v.nodeType)===Node.TEXT_NODE&&Ir(e,v,Math.min(m,(v.textContent??"").length));return}if(m<=s||!f.length){Ir(e,t,t.length);return}Ir(e,t,Math.min(m-s,t.length))}}function yp(e){if(!e||!/^#[0-9a-f]{6}$/i.test(e))return;const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,s=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,s),c=Math.min(t,n,s),u=i-c;if(u<.02)return;let f;return i===t?f=((n-s)/u+(n<s?6:0))*60%360:i===n?f=((s-t)/u+2)*60:f=((t-n)/u+4)*60,`hsl(${Math.round(f)} 55% 55%)`}function EI(){const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","9"),t.setAttribute("height","9"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2.4");const n=document.createElementNS(e,"path");return n.setAttribute("d","m6 6 12 12M18 6 6 18"),t.appendChild(n),t}const t9=320,jh=320,CI=280,Mo=8,Ao=12,SI=8,Dg=80,jI=120,n9=48;function kI(e,t){return!(!e||e.top===0&&e.left===0&&e.right===0&&e.bottom===0||e.bottom<0||e.top>t.height||e.right-e.left>n9)}function NI(e){return{top:e.top,bottom:Math.min(e.bottom,e.top+22),left:e.left,right:e.left+2}}function r9(e,t,n,s){return Math.min(Math.max(e,s),Math.max(s,n.width-t-s))}function kh(e,t,n,s){const i=n?SI:Ao,c=n?Math.max(0,e.right-e.left):Math.min(t9,t.width-i*2),u=n?e.left:r9(e.left,c,t,i),f=n?Math.min(CI,Math.floor(t.height*.4)):jh,h=Math.min(f,s??f),m=e.top-Mo-i,g=Math.max(0,Math.min(h,m)),v=Math.max(i,e.top-Mo-g);return{left:u,top:v,width:c,maxHeight:g,side:"above",shell:"dock"}}function $g(e,t,n,s){const i=Math.min(t9,n.width-Ao*2),c=r9(e.left,i,n,Ao),u=e.top-Mo-Ao,f=n.height-e.bottom-Mo-Ao,h=u>=jI||u>=f?"above":"below",m=Math.min(jh,s??jh),g=h==="above"?u:f,v=Math.min(m,s==null?Math.max(Dg,g):g);if(h==="above"){const w=Math.max(Ao,e.top-Mo-Math.min(m,u)),E=Math.min(m,e.top-Mo-w);return s==null&&E<Dg?kh(t,n,!1):{left:c,top:w,width:i,maxHeight:E,side:h,shell:"caret"}}const y=e.bottom+Mo;return y+Math.min(v,f)>n.height-Ao?kh(t,n,!1,s):{left:c,top:y,width:i,maxHeight:Math.min(m,f),side:h,shell:"caret"}}function AI(e,t,n,s={}){if(s.phone)return kh(t,n,!0,s.height);const i=s.line??t;if(kI(e,n)&&e)return $g(e,t,n,s.height);const c=e&&e.right-e.left>n9?e:i;return $g(NI(c),t,n,s.height)}function MI({anchor:e,composer:t,line:n,query:s,options:i,sigil:c,onActiveId:u,onClose:f}){const h=lo(bi),[m,g]=r.useState(0),[v,y]=r.useState(null),w=r.useRef(null),E=`${s}\0${i.length}`,C=r.useRef({key:""});r.useEffect(()=>{g(0)},[s]),r.useEffect(()=>{g(j=>Math.min(j,Math.max(0,i.length-1)))},[i.length]);const b=r.useCallback(j=>{const A=e9()??(e==null?void 0:e.getBoundingClientRect())??null,M=t==null?void 0:t.getBoundingClientRect();if(!M)return null;const T=(n==null?void 0:n.getBoundingClientRect())??null,D=window.visualViewport;return AI(A,M,{width:(D==null?void 0:D.width)??window.innerWidth,height:(D==null?void 0:D.height)??window.innerHeight},{phone:h,line:T,height:j})},[e,t,n,h]);r.useLayoutEffect(()=>{var A,M;C.current.key!==E&&(C.current={key:E});const j=()=>y(b(C.current.height));j();const k=requestAnimationFrame(j);return window.addEventListener("resize",j),window.addEventListener("scroll",j,!0),(A=window.visualViewport)==null||A.addEventListener("resize",j),(M=window.visualViewport)==null||M.addEventListener("scroll",j),()=>{var T,D;cancelAnimationFrame(k),window.removeEventListener("resize",j),window.removeEventListener("scroll",j,!0),(T=window.visualViewport)==null||T.removeEventListener("resize",j),(D=window.visualViewport)==null||D.removeEventListener("scroll",j)}},[e,t,n,h,E,b]),r.useLayoutEffect(()=>{if((v==null?void 0:v.side)!=="above"||!w.current)return;const j=w.current.offsetHeight;if(!(j>0&&j<v.maxHeight))return;C.current={key:E,height:j};const k=b(j);!k||k.top===v.top&&k.maxHeight===v.maxHeight||y(k)},[v,E,b]),r.useLayoutEffect(()=>{const j=k=>{k.isComposing||k.keyCode===229||(k.key==="ArrowDown"?(k.preventDefault(),g(A=>Math.min(i.length-1,A+1))):k.key==="ArrowUp"?(k.preventDefault(),g(A=>Math.max(0,A-1))):(k.key==="Enter"||k.key==="Tab")&&i[m]?(k.preventDefault(),i[m].run()):k.key==="Escape"&&(k.preventDefault(),f()))};return window.addEventListener("keydown",j,!0),()=>window.removeEventListener("keydown",j,!0)},[i,m,f]),r.useEffect(()=>{var j,k;(k=(j=w.current)==null?void 0:j.querySelector('[data-active="true"]'))==null||k.scrollIntoView({block:"nearest"})},[m]);const N=i[m]?`${G0}-opt-${m}`:null;return r.useEffect(()=>(u==null||u(N),()=>u==null?void 0:u(null)),[N,u]),r.useEffect(()=>{const j=k=>{k.target.closest(".sc-cmd")||(Sh(k),f())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[f]),v?na.createPortal(o.jsx("div",{className:"sc-cmd",id:G0,"data-shell":v.shell,style:{left:v.left,top:v.top,width:v.width,maxHeight:v.maxHeight},ref:w,role:"listbox","aria-label":Pg(c),children:i.length?i.map((j,k)=>{var M;const A=k===0||j.group!==((M=i[k-1])==null?void 0:M.group);return o.jsxs("div",{children:[A&&o.jsx("div",{className:"sc-cmd-group",children:j.group}),o.jsxs("button",{type:"button",id:`${G0}-opt-${k}`,className:"sc-cmd-row",role:"option","aria-selected":k===m,"data-active":k===m,onMouseEnter:()=>g(k),onMouseDown:T=>Sh(T),onClick:()=>j.run(),children:[j.thumb?o.jsx("img",{src:j.thumb,alt:""}):j.swatch?o.jsx("span",{className:"sc-cmd-swatch",style:{background:j.swatch}}):null,o.jsx(RI,{text:j.label,query:s}),j.hint&&o.jsx("span",{className:"sc-cmd-hint",children:j.hint})]})]},j.key)}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-cmd-group",children:Pg(c)}),o.jsx("div",{className:"sc-cmd-empty",children:XF(c)})]})}),document.body):null}function RI({text:e,query:t}){return o.jsx("span",{className:"sc-cmd-label",children:eI(e,t).map(n=>n.hit?o.jsx("b",{children:n.text},`h:${n.text}`):o.jsx("span",{children:n.text},`t:${n.text}`))})}const PI=440,LI=460,M0=8,jo=12,TI=200,HI=240;function a9(e,t,n){if(e.bottom<0||e.top>t.height)return null;const s=Math.min((n==null?void 0:n.width)??PI,t.width-jo*2),i=e.top-M0-jo,c=t.height-e.bottom-M0-jo,u=i>=HI||i>=c?"above":"below",h=Math.max(TI,Math.min(LI,u==="above"?i:c)),m=Math.min(Math.max(e.left,jo),Math.max(jo,t.width-s-jo)),g=u==="above"?Math.max(jo,e.top-M0-h):e.bottom+M0;return{left:m,top:g,width:s,maxHeight:h,side:u}}const DI={fragrance:["Fragrance"],footwear:["Footwear"],apparel:["Apparel"],furniture:["Furniture","Home"],beauty:["Beauty"],electronics:["Electronics"],accessories:["Accessories"],beverage:["Food & drink"],jewelry:["Jewelry"],food:["Food & drink"]},$I={fragrance:["Fragrance"],footwear:["Footwear","Apparel"],apparel:["Apparel"],furniture:["Furniture","Home"],beauty:["Beauty"],electronics:["Electronics"],accessories:["Accessories"],beverage:["Food & drink"],jewelry:["Jewelry"],food:["Food & drink"]};function FI(e,t){if(!t)return!1;const n=DI[t];return!!n&&n.some(s=>e.verticals.includes(s))}function II(e,t){if(!t)return!1;const n=$I[t];return!!n&&n.some(s=>e.suitableCategories.includes(s))}function Fg(e){return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}const _I=4;function xa(e,t){const n=Fg(t).trim().split(/\s+/).filter(Boolean);if(!n.length)return!0;const s=Fg(e);return n.every(i=>s.includes(i)||i.length>=_I&&i.endsWith("s")&&s.includes(i.slice(0,-1)))}function s9(e){return e<2?"none":"tabs"}function o9(e,t){return{visible:e.slice(0,t),remaining:Math.max(0,e.length-t)}}function l9(e,t){return[...e].sort((n,s)=>Number(t(s))-Number(t(n)))}const lu={product:"product",presenter:"presenter",scene:"scene"},hc=48;function OI(e){return e?e.t==="product"?"product":e.t==="character"?"presenter":e.t==="template"?"scene":null:null}function R0(e){const t=OI(e);return t||((e==null?void 0:e.t)==="color"?"color":null)}const wc=e=>{const t=(e??"").trim();return t||void 0},Ig=e=>(e==null?void 0:e.custom)===!0;function zl(e,t){return e==="product"?[...(t.libraryProducts.length?t.libraryProducts:t.brandProducts).map(s=>{var i,c;return _g(s,"brand",_n((c=(i=s.shots)==null?void 0:i[0])==null?void 0:c.file))}),...t.demoProducts.map(s=>_g(s,"catalog",s.previewUrl??null))]:e==="presenter"?[...t.presenters.map(n=>({kind:"presenter",id:n.id,label:n.name,full:[n.name,wc(n.descriptor)].filter(Boolean).join(" · "),sub:wc(n.descriptor),search:f1(n),thumb:n.avatarUrl??n.previewUrl??null,crop:n.avatarUrl?void 0:"top",source:Ig(n)?"brand":"catalog",recommended:II(n,t.productCategory),token:{t:"character",id:n.id}})),...t.cast.map(n=>{var s,i;return{kind:"presenter",id:n.id,label:n.name,full:n.name,search:n.name,thumb:_n((i=(s=n.shots)==null?void 0:s[0])==null?void 0:i.file),crop:"top",source:"brand",token:{t:"character",id:n.id}}})]:t.scenes.map(n=>({kind:"scene",id:n.id,label:to(n,"card"),full:to(n,"tooltip"),sub:wc(n.lighting),search:d1(n),thumb:n.previewUrl??null,tint:yp(n.previewColor),source:Ig(n)?"brand":"catalog",recommended:FI(n,t.productCategory),token:{t:"template",id:n.id}}))}function _g(e,t,n){return{kind:"product",id:e.id,label:Oa(e,"chip"),full:Oa(e,"tooltip"),sub:ZI(e),search:mp(e),thumb:n,source:t,token:{t:"product",id:e.id}}}function ZI(e){const t=e;return wc(t.brand)??wc(t.vendor)}function bc(e,t){const n=t.trim();return n?e.filter(s=>xa(s.search,n)):e}function Og(e,t,n){return t.source==="brand"?0:e==="scene"?n.has(t.id)?1:t.recommended?2:3:e==="presenter"?t.recommended?1:2:1}function ad(e,t,n){const s=n.currentId?t.find(m=>m.id===n.currentId)??null:null,i=s?t.filter(m=>m.id!==s.id):t,u=[...bc(i,n.query)].sort((m,g)=>Og(e,m,n.bookmarked)-Og(e,g,n.bookmarked)).map(m=>n.bookmarked.has(m.id)?{...m,bookmarked:!0}:m),{visible:f,remaining:h}=o9(u,n.shown??hc);return{current:s,items:f,remaining:h,total:u.length}}const VI={$:"product","/":"scene","@":"presenter"},Zg=40,Vg={Products:8,Presenters:8,Colors:16,Scenes:8},zI={$:"Products","/":"Scenes","@":"Presenters","#":"Colors"};function i9(e){return{key:`${e.kind}:${e.id}`,group:e.kind==="presenter"?"Presenters":e.kind==="scene"?"Scenes":"Products",label:e.label,hint:e.sub,search:e.search,thumb:e.thumb??void 0,token:e.token}}function BI(e,t,n,s){return ad(e,t,{currentId:null,query:"",bookmarked:n,shown:s}).items.map(i9)}function UI(e,t,n={query:""}){const s=n.query.trim(),i=n.bookmarked??new Set;if(e==="#"){const f=(t.colors??[]).map(WI);return s?f.filter(h=>xa(h.search??h.label,s)).slice(0,Zg):f.slice(0,Vg.Colors)}const c=VI[e],u=c==="product"?t.products:c==="presenter"?t.presenters:t.scenes??[];return s?bc(u,s).map(i9).slice(0,Zg):BI(c,u,i,Vg[zI[e]])}function WI(e){return{key:`color:${e.hex}`,group:"Colors",label:e.name,hint:e.hex,search:`${e.name} ${e.hex}`,swatch:e.hex,token:{t:"color",hex:e.hex,name:e.name||void 0}}}const GI="(pointer: coarse)";function KI(e){return lo(bi)?o.jsx(JI,{...e}):o.jsx(QI,{...e})}function YI(){return!lo(GI)}const qI=e=>`Remove ${lu[e]}`;function XI(e,t,n){const s={slug:t};return e==="product"?Js(s,n):e==="presenter"?al(s,n):rl(s,n)}function c9({kind:e,currentId:t,candidates:n,brandId:s,brandSlug:i,warning:c,onPick:u,onRemove:f,onClose:h,onAttachRequest:m,autoFocusSearch:g}){const[v,y]=r.useState(""),[w,E]=r.useState(hc),C=r.useRef(null),b=r.useRef(null),[N,j]=r.useState(0),k=r.useMemo(()=>e==="scene"?new Set(Za(s)):new Set,[e,s]);r.useEffect(()=>{E(hc),j(0)},[v]);const A=r.useMemo(()=>ad(e,n,{currentId:t,query:v,bookmarked:k,shown:w}),[e,n,t,v,k,w]);r.useLayoutEffect(()=>{var I;g&&((I=C.current)==null||I.focus({preventScroll:!0}))},[g]),r.useEffect(()=>{j(I=>Math.max(0,Math.min(I,A.items.length-1)))},[A.items.length]);const M=r.useCallback(I=>{var U;const se=(U=b.current)==null?void 0:U.querySelectorAll("[data-nav]")[I];se&&(j(I),se.focus({preventScroll:!0}),se.scrollIntoView({block:"nearest"}))},[]),T=r.useCallback(()=>{const I=b.current;return I?Math.max(1,getComputedStyle(I).gridTemplateColumns.split(" ").filter(Boolean).length):1},[]),D=I=>{var O;if(I.key==="Escape"){I.preventDefault(),I.stopPropagation(),h("escape");return}const se=I.target===C.current;if(se&&I.key==="ArrowDown"){I.preventDefault(),M(0);return}if(se&&I.key==="Enter"){I.preventDefault(),A.items[0]&&u(A.items[0]);return}if(se)return;const U=T(),te=I.key==="ArrowRight"?1:I.key==="ArrowLeft"?-1:I.key==="ArrowDown"?U:I.key==="ArrowUp"?-U:0;if(te){I.preventDefault();const ne=N+te;ne<0&&te===-U?(O=C.current)==null||O.focus():ne>=0&&ne<A.items.length&&M(ne);return}I.key==="Home"?(I.preventDefault(),M(0)):I.key==="End"&&(I.preventDefault(),M(A.items.length-1))},L=lu[e],Y=e==="product";return o.jsxs("div",{className:"sc-swap-inner",onKeyDown:D,children:[o.jsx("div",{className:"sc-swap-head",children:o.jsxs("span",{className:"sc-swap-search",children:[o.jsx(Tc,{size:13}),o.jsx("input",{ref:C,type:"text",value:v,onChange:I=>y(I.target.value),placeholder:`Search ${L}s`,"aria-label":`Search ${L}s`,autoComplete:"off",spellCheck:!1})]})}),A.current&&o.jsxs("div",{className:"sc-swap-cur",title:A.current.full,children:[o.jsx(zg,{src:A.current.thumb,tinted:!!A.current.tint}),o.jsxs("span",{className:"sc-swap-curtext",children:[o.jsx("b",{dir:"auto",children:A.current.label}),A.current.sub&&o.jsx("span",{dir:"auto",children:A.current.sub})]}),o.jsx("a",{className:"sc-swap-open",href:XI(e,i,A.current.id),target:"_blank",rel:"noreferrer",title:`Open this ${L} in a new tab`,"aria-label":`Open ${A.current.label} in a new tab`,children:o.jsx(W1,{size:14})}),o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(_a,{size:11,weight:"bold"})})]}),o.jsxs("div",{className:"sc-swap-body",children:[A.items.length===0&&o.jsx("p",{className:"sc-swap-empty",children:v.trim()?`Nothing matches “${v.trim()}”.`:`No other ${L}s.`}),o.jsx("div",{className:"sc-swap-grid",ref:b,role:"listbox","aria-label":`Choose a ${L}`,children:A.items.map((I,se)=>o.jsxs("div",{className:"sc-swap-card",role:"option","aria-selected":!1,"data-nav":se,tabIndex:se===N?0:-1,title:I.full,style:I.tint?{"--tint":I.tint}:void 0,onFocus:()=>j(se),onClick:()=>u(I),onKeyDown:U=>{U.key!=="Enter"&&U.key!==" "||(U.preventDefault(),u(I))},children:[o.jsx(zg,{src:I.thumb,tinted:!!I.tint}),o.jsxs("b",{dir:"auto",children:[I.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(G1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),I.label]}),Y&&I.sub&&o.jsx("span",{dir:"auto",children:I.sub})]},I.id))}),A.remaining>0&&o.jsxs("button",{type:"button",className:"sc-swap-more",onClick:()=>E(I=>I+hc),children:["Show ",Math.min(hc,A.remaining)," more of ",A.total]})]}),o.jsxs("div",{className:"sc-swap-foot",children:[t&&!A.current&&o.jsxs("p",{className:"sc-swap-warn",children:["This ",L," is no longer available."]}),c&&o.jsx("p",{className:"sc-swap-warn",children:c}),c&&m&&e==="scene"&&o.jsxs("div",{className:"sc-swap-attach",children:[c.includes("product")&&o.jsx("button",{type:"button",className:"sc-btn",onClick:()=>m("Products"),children:"Attach a product"}),c.includes("person")&&o.jsx("button",{type:"button",className:"sc-btn",onClick:()=>m("Presenters"),children:"Attach a presenter"})]}),o.jsxs("button",{type:"button",className:"sc-swap-remove",onClick:f,children:[o.jsx(q5,{size:13}),qI(e)]})]})]})}function zg({src:e,tinted:t}){const[n,s]=r.useState(!1);return r.useEffect(()=>s(!1),[e]),!e||n?o.jsx("span",{className:"sc-swap-thumb sc-swap-thumb-empty",children:o.jsx(Wa,{size:18})}):o.jsx("img",{className:"sc-swap-thumb","data-tinted":t||void 0,src:e,alt:"",loading:"lazy",onError:()=>s(!0)})}function QI(e){const{anchor:t,kind:n,onClose:s}=e,i=YI(),[c,u]=r.useState(null),f=r.useRef(null);return r.useLayoutEffect(()=>{var m,g;const h=()=>{const v=window.visualViewport,y=a9(t.getBoundingClientRect(),{width:(v==null?void 0:v.width)??window.innerWidth,height:(v==null?void 0:v.height)??window.innerHeight});if(!y){s("outside");return}u(y)};return h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),(m=window.visualViewport)==null||m.addEventListener("resize",h),(g=window.visualViewport)==null||g.addEventListener("scroll",h),()=>{var v,y;window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0),(v=window.visualViewport)==null||v.removeEventListener("resize",h),(y=window.visualViewport)==null||y.removeEventListener("scroll",h)}},[t,s]),r.useEffect(()=>{const h=m=>{var v,y;const g=m.target;(v=f.current)!=null&&v.contains(g)||(y=g.closest)!=null&&y.call(g,".sc-token")||s("outside")};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s]),c?na.createPortal(o.jsx("div",{ref:f,className:"sc-swap","data-kind":n,"data-side":c.side,role:"dialog","aria-label":`Change ${lu[n]}`,style:{left:c.left,top:c.top,width:c.width,maxHeight:c.maxHeight},children:o.jsx(c9,{...e,autoFocusSearch:i})}),document.body):null}function JI(e){const{kind:t,onClose:n}=e,{sheet:s,grip:i}=au(()=>n("dismiss"));return o.jsx(ui,{open:!0,onOpenChange:c=>!c&&n("dismiss"),children:o.jsxs(di,{children:[o.jsx(fi,{className:"sc-shotsheet-scrim"}),o.jsxs(hi,{ref:s,className:"sc-shotsheet sc-swapsheet","data-kind":t,"aria-describedby":void 0,onOpenAutoFocus:c=>{var u;c.preventDefault(),(u=s.current)==null||u.focus({preventScroll:!0})},onCloseAutoFocus:c=>c.preventDefault(),onEscapeKeyDown:c=>{c.preventDefault(),n("escape")},children:[o.jsxs("div",{className:"sc-shotsheet-grip",...i,children:[o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0}),o.jsxs(mi,{className:"sc-vh",children:["Change ",lu[t]]})]}),o.jsx(c9,{...e,autoFocusSearch:!1})]})]})})}const e_=260;function t_(e){return lo(bi)?o.jsx(r_,{...e}):o.jsx(n_,{...e})}function Dl(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function u9({currentHex:e,currentName:t,palette:n,onPick:s,onRemove:i,onClose:c}){const u=r.useMemo(()=>{const b=new Set,N=[],j=A=>{const M=fn(A.hex);!M||b.has(M)||(b.add(M),N.push({...A,hex:M}))},k=e?fn(e):null;k&&!n.some(A=>Dl(A.hex,k))&&j({hex:k,name:t||k,slot:"accent"});for(const A of n)j(A);return N},[n,e,t]),f=r.useRef(null),[h,m]=r.useState(()=>Math.max(0,u.findIndex(b=>Dl(b.hex,e))));r.useEffect(()=>{m(b=>Math.max(0,Math.min(b,Math.max(0,u.length-1))))},[u.length]),r.useLayoutEffect(()=>{var N,j;const b=Math.max(0,u.findIndex(k=>Dl(k.hex,e)));(j=(N=f.current)==null?void 0:N.querySelectorAll("[data-nav]")[b])==null||j.focus({preventScroll:!0})},[]);const g=r.useCallback(b=>{var j;const N=(j=f.current)==null?void 0:j.querySelectorAll("[data-nav]")[b];N&&(m(b),N.focus({preventScroll:!0}))},[]),v=b=>{if(b.key==="Escape"){b.preventDefault(),b.stopPropagation(),c("escape");return}if(b.key==="ArrowDown"||b.key==="ArrowUp"){b.preventDefault();const N=h+(b.key==="ArrowDown"?1:-1);N>=0&&N<u.length&&g(N)}},y=b=>s({t:"color",hex:b.hex,name:b.name||void 0}),w=(b,N)=>{const j=u.find(k=>Dl(k.hex,b));s({t:"color",hex:b,name:(j==null?void 0:j.name)||void 0},{live:!0})},E=e?fn(e):null,C=!!E&&!n.some(b=>Dl(b.hex,E));return o.jsxs("div",{className:"sc-swap-inner",onKeyDown:v,children:[o.jsx("div",{className:"sc-swap-body",children:u.length===0?o.jsx("p",{className:"sc-swap-empty",children:"No brand colours yet."}):o.jsx("div",{className:"sc-swap-swatches",ref:f,role:"listbox","aria-label":"Choose a colour",children:u.map((b,N)=>{const j=Dl(b.hex,e),k=o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-swap-dot",style:{background:b.hex},"aria-hidden":!0}),o.jsx("b",{dir:"auto",children:b.name}),o.jsx("span",{children:b.hex}),j&&o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(_a,{size:11,weight:"bold"})})]});return C&&j?o.jsx(c1,{className:"sc-swap-swatch",triggerStyle:{background:"none"},value:b.hex,presets:n.map(A=>A.hex),commitMode:"live",align:"start",label:`Edit ${b.name}`,triggerProps:{role:"option","aria-selected":!0,"data-on":"","data-nav":N,tabIndex:N===h?0:-1,title:`${b.name} ${b.hex}`,onFocus:()=>m(N)},onChange:A=>w(A),children:k},"current-custom"):o.jsx("div",{className:"sc-swap-swatch",role:"option","aria-selected":j,"data-on":j||void 0,"data-nav":N,tabIndex:N===h?0:-1,title:`${b.name} ${b.hex}`,onFocus:()=>m(N),onClick:()=>y(b),onKeyDown:A=>{A.key!=="Enter"&&A.key!==" "||(A.preventDefault(),y(b))},children:k},b.hex)})})}),o.jsxs("div",{className:"sc-swap-foot",children:[o.jsxs(c1,{className:"sc-swap-swatch sc-swap-custom",triggerStyle:{background:"none"},value:e??fp(n),presets:n.map(b=>b.hex),commitMode:"live",align:"start",label:"Custom colour",onChange:b=>w(b),children:[o.jsx(tr,{size:12}),o.jsx("b",{children:"Custom colour"})]}),o.jsxs("button",{type:"button",className:"sc-swap-remove",onClick:i,children:[o.jsx(q5,{size:13}),"Remove colour"]})]})]})}function n_(e){const{anchor:t,onClose:n}=e,[s,i]=r.useState(null),c=r.useRef(null);return r.useLayoutEffect(()=>{var f,h;const u=()=>{const m=window.visualViewport,g=a9(t.getBoundingClientRect(),{width:(m==null?void 0:m.width)??window.innerWidth,height:(m==null?void 0:m.height)??window.innerHeight},{width:e_});if(!g){n("outside");return}i(g)};return u(),window.addEventListener("resize",u),window.addEventListener("scroll",u,!0),(f=window.visualViewport)==null||f.addEventListener("resize",u),(h=window.visualViewport)==null||h.addEventListener("scroll",u),()=>{var m,g;window.removeEventListener("resize",u),window.removeEventListener("scroll",u,!0),(m=window.visualViewport)==null||m.removeEventListener("resize",u),(g=window.visualViewport)==null||g.removeEventListener("scroll",u)}},[t,n]),r.useEffect(()=>{const u=f=>{var m,g,v;const h=f.target;(m=c.current)!=null&&m.contains(h)||(g=h.closest)!=null&&g.call(h,".sc-token")||(v=h.closest)!=null&&v.call(h,".sc-cp")||n("outside")};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[n]),s?na.createPortal(o.jsx("div",{ref:c,className:"sc-swap","data-kind":"color","data-side":s.side,role:"dialog","aria-label":"Change colour",style:{left:s.left,top:s.top,width:s.width,maxHeight:s.maxHeight},children:o.jsx(u9,{...e})}),document.body):null}function r_(e){const{onClose:t}=e,{sheet:n,grip:s}=au(()=>t("dismiss"));return o.jsx(ui,{open:!0,onOpenChange:i=>!i&&t("dismiss"),children:o.jsxs(di,{children:[o.jsx(fi,{className:"sc-shotsheet-scrim"}),o.jsxs(hi,{ref:n,className:"sc-shotsheet sc-swapsheet","data-kind":"color","aria-describedby":void 0,onOpenAutoFocus:i=>{var c;i.preventDefault(),(c=n.current)==null||c.focus({preventScroll:!0})},onCloseAutoFocus:i=>i.preventDefault(),onEscapeKeyDown:i=>{i.preventDefault(),t("escape")},children:[o.jsxs("div",{className:"sc-shotsheet-grip",...s,children:[o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0}),o.jsx(mi,{className:"sc-vh",children:"Change colour"})]}),o.jsx(u9,{...e})]})]})})}function iu(e){const{brand:t,products:n}=It(),{scenes:s,presenters:i,demoProducts:c}=pn(),u=r.useMemo(()=>hg(su(t),s),[t,s]),f=r.useMemo(()=>hg(J1(t),i),[t,i]),h=r.useMemo(()=>{var g;return(((g=t==null?void 0:t.json)==null?void 0:g.characters)??[]).filter(v=>(v==null?void 0:v.origin)!=="custom")},[t]),m=r.useMemo(()=>{var g;return((g=t==null?void 0:t.json)==null?void 0:g.products)??[]},[t]);return r.useMemo(()=>({libraryProducts:n,brandProducts:m,demoProducts:c,presenters:f,cast:h,scenes:u,productCategory:e??null}),[n,m,c,f,h,u,e])}const _r=[{id:"square",label:"Square",hint:"1:1",w:1024,h:1024},{id:"portrait",label:"Portrait",hint:"4:5",w:1024,h:1280},{id:"story",label:"Story",hint:"9:16",w:1080,h:1920},{id:"landscape",label:"Landscape",hint:"16:9",w:1600,h:900}],P0=6,a_=r.forwardRef(function({initialTokens:t,onChange:n,brand:s,templates:i,presenters:c,demoProducts:u,onTemplatePick:f,placeholder:h,placeholderSm:m,flag:g,activeProductCategory:v,onAttachRequest:y,onSubmit:w,onDropFiles:E},C){var Zt,tt,qe,Ut,Vt;const b=r.useRef(null),N=r.useRef(0),j=r.useRef(null),[k,A]=r.useState(null),[M,T]=r.useState(null),D=r.useRef(M);r.useEffect(()=>{D.current=M},[M]);const[L,Y]=r.useState(""),[I,se]=r.useState(null),U=r.useRef(!1),te=r.useRef(0),[O,ne]=r.useState(!1),Q=r.useRef(0),{products:H}=It(),K=H.length?H:((Zt=s.json)==null?void 0:Zt.products)??[],X=((tt=s.json)==null?void 0:tt.characters)??[],W=r.useMemo(()=>Rw(s.json),[s]),P=r.useCallback((z,ue)=>{var Sn,Ct,Mr,pr;const xe=document.createElement("span");xe.className=ha,xe.contentEditable="false",xe.dataset.kind=z.t,xe.dataset.tok=Qw(z),xe.dataset.uid=ue??`u${te.current++}`;let Me="",Ke=null,it=null;if(z.t==="template"){const ct=i.find(en=>en.id===z.id);Me=ct?to(ct,"chip"):"missing template",Ke=(ct==null?void 0:ct.previewUrl)??null;const St=yp(ct==null?void 0:ct.previewColor);St&&(xe.dataset.tinted="true",xe.style.setProperty("--tint",St))}else if(z.t==="product"){const ct=K.find(zt=>zt.id===z.id),St=ct?null:u.find(zt=>zt.id===z.id),en=ct??St;Me=en?Oa(en,"chip"):"missing product",Ke=ct?_n((Ct=(Sn=ct.shots)==null?void 0:Sn[0])==null?void 0:Ct.file):(St==null?void 0:St.previewUrl)??null}else if(z.t==="character"){const ct=X.find(en=>en.id===z.id),St=ct?null:c.find(en=>en.id===z.id);Me=(ct==null?void 0:ct.name)??(St==null?void 0:St.name)??"missing person",Ke=ct?_n((pr=(Mr=ct.shots)==null?void 0:Mr[0])==null?void 0:pr.file):(St==null?void 0:St.avatarUrl)??(St==null?void 0:St.previewUrl)??null}else if(z.t==="color")Me=z.name??z.hex,it=z.hex;else if(z.t==="ref")Me="reference",Ke=rn(z.imageHash);else if(z.t==="mark"){const ct=W.find(St=>St.hash===z.imageHash);Me=ct?Pw(s.json,ct):"missing mark",Ke=rn(z.imageHash)}if(Ke){const ct=document.createElement("img");ct.src=Ke,ct.alt="",xe.appendChild(ct)}else if(it){const ct=document.createElement("span");ct.className="sc-token-swatch",ct.style.background=it,xe.appendChild(ct)}xe.appendChild(document.createTextNode(Me));const _t=(g==null?void 0:g(z))??null;_t&&(xe.title=_t,xe.dataset.warn="1");const Nt=R0(z);if(Nt){const ct=Nt==="color"?"colour":lu[Nt];xe.tabIndex=0,xe.setAttribute("role","button"),xe.setAttribute("aria-haspopup","dialog"),xe.setAttribute("aria-expanded","false"),xe.setAttribute("aria-label",`${ct}: ${Me}. Change or remove.`)}const bt=document.createElement("button");return bt.type="button",bt.tabIndex=-1,bt.setAttribute("aria-label",`Remove ${Me}`),bt.dataset.role="remove",bt.appendChild(EI()),xe.appendChild(bt),xe},[i,K,X,c,u,W,s,g]),Z=r.useCallback(()=>{const z=b.current;z&&(N.current=z.querySelectorAll(`.${ha}`).length,n(Lg(z)))},[n]);r.useEffect(()=>{const z=b.current;z&&(Tg(z,t!=null&&t.length?t:as(),ue=>P(ue)),N.current=z.querySelectorAll(`.${ha}`).length,fc(z))},[]),r.useEffect(()=>{const z=b.current;if(z)for(const ue of z.querySelectorAll(`.${ha}`)){const xe=zs(ue.dataset.tok??"");if(!xe)continue;const Me=(g==null?void 0:g(xe))??null;Me?(ue.title=Me,ue.dataset.warn="1"):(ue.removeAttribute("title"),delete ue.dataset.warn)}},[g]),r.useEffect(()=>{const z=()=>{const ue=K0(b.current);ue!==null&&(j.current=ue)};return document.addEventListener("selectionchange",z),()=>document.removeEventListener("selectionchange",z)},[]);const ae=r.useCallback(z=>{const ue=b.current;if(ue){if(z.t==="template"){const xe=S2(ue);if(xe){xe.replaceWith(P(z,xe.dataset.uid)),Bs(ue),Z(),A(null),Y("");return}}iI(ue,P(z),{eatQuery:!!k,fallbackUnits:j.current}),Z(),A(null),Y("")}},[k,P,Z]),G=r.useRef(ae);r.useEffect(()=>{G.current=ae},[ae]);const fe=r.useCallback((z,ue)=>{const xe=b.current,Me=xe==null?void 0:xe.querySelector(`[data-uid="${CSS.escape(z)}"]`);return!xe||!Me?!1:(Me.replaceWith(P(ue,z)),Bs(xe),Z(),!0)},[P,Z]),le=r.useCallback(z=>{const ue=b.current,xe=ue==null?void 0:ue.querySelector(`[data-uid="${CSS.escape(z)}"]`);if(!ue||!xe)return null;const Me=Ch(ue,xe);return E2(ue,xe),Z(),Me},[Z]),me=r.useCallback((z,ue,xe,Me)=>{const Ke=z.dataset.uid;Ke&&(z.dataset.open="",z.setAttribute("aria-expanded","true"),A(null),Y(""),T({uid:Ke,kind:ue,anchor:z,caret:xe,touch:Me}))},[]),J=r.useCallback((z,ue)=>{const xe=D.current;if(D.current=null,T(null),!xe)return;const Me=b.current,Ke=Me==null?void 0:Me.querySelector(`[data-uid="${CSS.escape(xe.uid)}"]`);Ke&&(delete Ke.dataset.open,Ke.setAttribute("aria-expanded","false"));const it=ue!==void 0?ue:xe.caret;if(xe.touch){it!=null&&(j.current=it);return}Me&&(Me.focus({preventScroll:!0}),it!=null?Yl(Me,it):dc(Me))},[]);r.useEffect(()=>{if(!M)return;const z=b.current;z!=null&&z.querySelector(`[data-uid="${CSS.escape(M.uid)}"]`)||J("outside")},[M,J]),r.useImperativeHandle(C,()=>({insert:z=>G.current(z),setTokens:z=>{const ue=b.current;ue&&(Tg(ue,z.length?z:as(),xe=>P(xe)),N.current=ue.querySelectorAll(`.${ha}`).length,fc(ue),n(Lg(ue)))},removeTemplate:()=>{const z=b.current,ue=z?S2(z):null;!z||!ue||(E2(z,ue),Z())},openMenu:z=>{Y(""),A({anchor:z})},focus:()=>dc(b.current)}));const ge=iu(v),He=r.useCallback(z=>zl(z,ge),[ge]),Qe=r.useMemo(()=>new Set(Za(s.id)),[s.id]),ye=r.useMemo(()=>{var z;return k?UI(k.sigil??"$",{products:zl("product",ge),presenters:zl("presenter",ge),scenes:zl("scene",ge),colors:va((z=s.json)==null?void 0:z.palette)},{query:L,bookmarked:Qe}).map(ue=>({...ue,run:()=>ue.token.t==="template"?f(ue.token.id):G.current(ue.token)})):[]},[k,ge,L,Qe,f,(qe=s.json)==null?void 0:qe.palette]),ke=z=>{const ue=b.current,xe=z.target;if(xe.closest('[data-role="remove"]')){z.preventDefault();const Nt=A0(xe);M&&(Nt==null?void 0:Nt.dataset.uid)===M.uid&&J("remove"),E2(ue,Nt),Z(),A(null);return}oI(ue,z.clientX,z.clientY);const Me=A0(xe);if(!Me)return;const Ke=Me.getBoundingClientRect();if(z.clientX-Ke.left<=P0||Ke.right-z.clientX<=P0)return;const it=Me.dataset.uid??null;if(it&&(M==null?void 0:M.uid)===it){z.detail!==0&&J("outside");return}const _t=R0(zs(Me.dataset.tok??""));_t&&me(Me,_t,K0(ue),!1)},lt=z=>{if(z.pointerType==="mouse")return;const ue=z.target;if(ue.closest('[data-role="remove"]'))return;const xe=A0(ue);if(!xe)return;const Me=xe.getBoundingClientRect();if(z.clientX-Me.left<=P0||Me.right-z.clientX<=P0)return;const Ke=R0(zs(xe.dataset.tok??""));if(!Ke||xe.dataset.uid&&(M==null?void 0:M.uid)===xe.dataset.uid)return;z.preventDefault();const it=b.current,_t=document.activeElement===it,Nt=_t?K0(it):j.current;_t&&(it==null||it.blur()),me(xe,Ke,Nt,!0)},jt=z=>{const ue=b.current,xe=A0(z.target);if(xe&&!M){const Me=()=>{Eh(ue,xe,"after"),ue==null||ue.focus({preventScroll:!0})};if(z.key==="Tab"){z.preventDefault(),Eh(ue,xe,z.shiftKey?"before":"after"),ue==null||ue.focus({preventScroll:!0});return}if(z.key==="Enter"||z.key===" "){z.preventDefault();const Ke=R0(zs(xe.dataset.tok??""));Ke&&ue&&me(xe,Ke,Ch(ue,xe)+1,!1);return}if(z.key==="Backspace"||z.key==="Delete"){z.preventDefault();const Ke=xe.dataset.uid?le(xe.dataset.uid):null;ue==null||ue.focus({preventScroll:!0}),Ke!=null&&Yl(ue,Ke);return}if(z.key==="Escape"){z.preventDefault(),Me();return}}if(z.key==="Escape"&&k){z.preventDefault(),A(null),Y("");return}if(z.key==="Enter"&&!z.shiftKey){const Me=z.defaultPrevented;z.preventDefault(),QF({menuOpen:!!k,handled:Me})&&w();return}if(!(k||M)&&!qF(z)&&(z.key==="$"||z.key==="/"||z.key==="@"||z.key==="#")){const Me=b.current,Ke=Jw(Me),it=Ke.slice(-1);if(Ke.length&&!/[\s\u00a0]/.test(it))return;Y(""),A({anchor:{getBoundingClientRect:()=>e9()??(Me==null?void 0:Me.getBoundingClientRect())??new DOMRect},sigil:z.key})}},Pt=r.useCallback(z=>{var ue,xe;return(xe=va((ue=s.json)==null?void 0:ue.palette).find(Me=>Me.hex===z))==null?void 0:xe.name},[(Ut=s.json)==null?void 0:Ut.palette]),Ne=()=>{const z=b.current,ue=(z==null?void 0:z.querySelectorAll(`.${ha}`).length)??0;ue<N.current&&hI(z),N.current=ue,fc(z)&&dc(z);const xe=U.current;U.current=!1;const Me=j2(z,it=>P(it),{commit:xe,nameFor:Pt});Me&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ha}`).length)??0,A(null),Y(""));const Ke=Me?{open:!1}:JF(dI(z),xe);Ke.open?k&&Y(Ke.query):k&&(A(null),Y("")),Z()},Ae=z=>{const ue=window.getSelection();if(!ue||ue.rangeCount===0||ue.isCollapsed)return null;const xe=ue.getRangeAt(0),{text:Me,html:Ke}=mI(xe);return Me?(z.clipboardData.setData("text/plain",Me),z.clipboardData.setData("text/html",Ke),z.preventDefault(),xe):null},Ee=z=>{Ae(z)},at=z=>{const ue=Ae(z);ue&&(ue.deleteContents(),Bs(b.current),Z())},kt=r.useCallback(z=>z.t==="template"?i.some(ue=>ue.id===z.id):z.t==="product"?K.some(ue=>ue.id===z.id)||u.some(ue=>ue.id===z.id):z.t==="character"?X.some(ue=>ue.id===z.id)||c.some(ue=>ue.id===z.id):z.t==="mark"?W.some(ue=>ue.hash===z.imageHash):!0,[i,K,X,c,u,W]),Qt=z=>{Array.from(z.dataTransfer.types).includes("Files")&&(z.preventDefault(),Q.current++,ne(!0))},Jt=z=>z.preventDefault(),Ot=()=>{Q.current=Math.max(0,Q.current-1),Q.current===0&&ne(!1)},xn=z=>{z.preventDefault(),Q.current=0,ne(!1),z.dataTransfer.files.length&&(E==null||E(z.dataTransfer.files))},Rn=z=>{z.preventDefault(),U.current=!0;const ue=gI(z.clipboardData.getData("text/html"));if(ue&&Wn(ue)){const Me=b.current;j2(Me,Ke=>P(Ke),{commit:!0,nameFor:Pt})&&(N.current=(Me==null?void 0:Me.querySelectorAll(`.${ha}`).length)??0,Z());return}const xe=z.clipboardData.getData("text/plain");xe&&document.execCommand("insertText",!1,xe)},Wn=z=>{const ue=b.current,xe=window.getSelection();if(!ue||!xe||xe.rangeCount===0||!ue.contains(xe.getRangeAt(0).startContainer))return!1;const Me=xe.getRangeAt(0);let Ke=!1;const it=[];for(const Ct of z){if(typeof Ct!="string"&&!kt(Ct)){it.push(i_(Ct,i,K));continue}if(typeof Ct!="string"&&Ct.t==="template"){if(Ke)continue;Ke=!0}it.push(Ct)}const _t=Ke?S2(ue):null;Me.deleteContents();const Nt=document.createDocumentFragment();for(const Ct of it)Nt.appendChild(typeof Ct=="string"?document.createTextNode(Ct):P(Ct));const bt=document.createTextNode(" ");Nt.appendChild(bt),Me.insertNode(Nt),_t&&_t.remove();const Sn=l_(ue,bt);return Bs(ue),Yl(ue,Sn),Z(),!0},Pn=r.useCallback(()=>{requestAnimationFrame(()=>{const z=b.current;z&&document.activeElement===z&&fc(z)&&dc(z)})},[]);return o.jsxs("div",{className:"sc-brief","data-drag-over":O||void 0,children:[o.jsx("div",{ref:b,className:"sc-brief-line",contentEditable:!0,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-autocomplete":"list","aria-expanded":k?!0:void 0,"aria-controls":k?G0:void 0,"aria-activedescendant":k?I??void 0:void 0,tabIndex:0,dir:"auto","data-ph":h,...m?{"data-ph-sm":m}:{},onClick:ke,onPointerDown:lt,onKeyDown:jt,onInput:Ne,onCopy:Ee,onCut:at,onPaste:Rn,onDragEnter:Qt,onDragOver:Jt,onDragLeave:Ot,onDrop:xn,onFocus:Pn,onBlur:()=>{const z=b.current;j2(z,ue=>P(ue),{commit:!0,nameFor:Pt})&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ha}`).length)??0,A(null),Y("")),Z()}}),k&&o.jsx(MI,{anchor:k.anchor,composer:{getBoundingClientRect:()=>{var z,ue,xe;return((ue=(z=b.current)==null?void 0:z.closest(".sc-promptcard"))==null?void 0:ue.getBoundingClientRect())??((xe=b.current)==null?void 0:xe.getBoundingClientRect())??new DOMRect}},line:{getBoundingClientRect:()=>{var z;return((z=b.current)==null?void 0:z.getBoundingClientRect())??new DOMRect}},query:L,options:ye,sigil:k.sigil,onActiveId:se,onClose:()=>{A(null),Y("")}}),(M==null?void 0:M.kind)==="color"?o.jsx(t_,{anchor:M.anchor,currentHex:L0(M.anchor),currentName:s_(M.anchor),palette:va((Vt=s.json)==null?void 0:Vt.palette),onPick:(z,ue)=>{var Me;const xe=M.uid;if(ue!=null&&ue.live){const Ke=(Me=b.current)==null?void 0:Me.querySelector(`[data-uid="${CSS.escape(xe)}"]`);Ke&&vI(Ke,z),Z();return}if(o_(z.hex,L0(M.anchor))){J("pick");return}fe(xe,z),J("pick")},onRemove:()=>{const z=le(M.uid);J("remove",z)},onClose:J},M.uid):M?o.jsx(KI,{kind:M.kind,anchor:M.anchor,currentId:L0(M.anchor),candidates:He(M.kind),brandId:s.id,brandSlug:s.slug,warning:M.anchor.title||null,onAttachRequest:y?z=>{J("outside"),y(z)}:void 0,onPick:z=>{const ue=M.uid;if(z.id===L0(M.anchor)){J("pick");return}z.kind==="scene"?f(z.id):fe(ue,z.token),J("pick")},onRemove:()=>{const z=le(M.uid);J("remove",z)},onClose:J},M.uid):null]})});function L0(e){const t=zs(e.dataset.tok??"");return t?t.t==="color"?t.hex:"id"in t?t.id:null:null}function s_(e){const t=zs(e.dataset.tok??"");return(t==null?void 0:t.t)==="color"?t.name:void 0}function o_(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function l_(e,t){let n=0;for(const s of Array.from(e.childNodes)){if(s===t||s.contains(t))break;n+=s.nodeType===Node.TEXT_NODE?(s.textContent??"").length:1}return n+(t.nodeType===Node.TEXT_NODE?(t.textContent??"").length:1)}function i_(e,t,n){var s,i;return e.t==="template"?((s=t.find(c=>c.id===e.id))==null?void 0:s.name)??"template":e.t==="product"?((i=n.find(c=>c.id===e.id))==null?void 0:i.name)??"product":e.t==="character"?"someone":e.t==="color"?e.name??e.hex:e.t==="mark"?"brand mark":"reference"}const c_=8,k2=60,u_=["All","Products","Presenters","Scenes","Colors","Brand","Shots"];function d_({brand:e,shots:t,initialTab:n="All",activeProductCategory:s,onToken:i,onTemplate:c,onUpload:u,onClose:f}){const[h,m]=r.useState(n);r.useEffect(()=>{m(n)},[n]);const[g,v]=r.useState(""),y=iu(s),w=r.useMemo(()=>new Set(Za(e.id)),[e.id]),E=ol(),[C]=li(),b=C.get("new")!==null;r.useEffect(()=>{const D=L=>{L.key==="Escape"&&!b&&(L.stopPropagation(),f())};return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[f,b]),r.useEffect(()=>{const D=L=>{b||!L.target.closest(".sc-attachpanel")&&!L.target.closest(".sc-attach-toggle")&&f()};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[f,b]);const N=r.useMemo(()=>{var se;const D=va((se=e.json)==null?void 0:se.palette),L=Rw(e.json),Y=t.filter(U=>U.status==="done"&&U.images.length>0).slice(-12).reverse(),I=(U,te)=>ad(U,zl(U,y),{currentId:null,query:"",bookmarked:w,shown:Number.MAX_SAFE_INTEGER}).items.map(O=>({key:`${U}:${O.id}`,tab:te,label:O.label,sub:O.sub,search:O.search,thumb:O.thumb,recommended:O.recommended,run:()=>O.kind==="scene"?c(O.id):i(O.token)}));return[...I("product","Products"),...I("presenter","Presenters"),...I("scene","Scenes"),...L.map(U=>({key:`m:${U.hash}`,tab:"Brand",label:Pw(e.json,U),sub:"the mark itself",thumb:rn(U.hash),run:()=>i({t:"mark",imageHash:U.hash})})),...D.map(U=>({key:`c:${U.hex}`,tab:"Colors",label:U.name,sub:U.hex,swatch:U.hex,run:()=>i({t:"color",hex:U.hex,name:U.name})})),...Y.map((U,te)=>({key:`r:${U.id}`,tab:"Shots",label:`Shot ${Y.length-te}`,sub:"as reference",thumb:rn(U.images[0]),run:()=>i({t:"ref",imageHash:U.images[0]})}))]},[e,y,w,t,i,c]),j=D=>xa(`${D.label} ${D.sub??""} ${D.search??""}`,g),k=D=>h==="All"||D.tab===h,A=N.filter(D=>k(D)&&j(D)),M=["Products","Presenters","Scenes","Colors","Shots"],T=D=>o.jsxs("button",{type:"button",className:"sc-ap-card",title:D.sub?`${D.label} · ${D.sub}`:D.label,onClick:D.run,children:[D.swatch?o.jsx("span",{className:"sc-ap-thumb",style:{background:D.swatch}}):D.thumb?o.jsx("img",{className:"sc-ap-thumb",src:D.thumb,alt:"",loading:"lazy"}):o.jsx("span",{className:"sc-ap-thumb sc-ap-thumb-empty",children:o.jsx(Wa,{size:16})}),D.recommended&&o.jsx("span",{className:"sc-ap-rec",children:"Recommended"}),o.jsx("b",{dir:"auto",children:D.label})]},D.key);return o.jsxs("div",{className:"sc-attachpanel",role:"dialog","aria-label":"Attach to brief",onMouseDownCapture:Sh,children:[o.jsxs("div",{className:"sc-ap-head",children:[o.jsx("div",{className:"sc-ap-tabs",children:u_.map(D=>o.jsx("button",{type:"button","data-active":D===h,onClick:()=>m(D),children:D},D))}),o.jsxs("div",{className:"sc-ap-search",children:[o.jsx(Tc,{size:12}),o.jsx("input",{placeholder:"Search",value:g,onChange:D=>v(D.target.value)})]}),o.jsx("button",{type:"button",className:"sc-icon-btn sc-ap-close",onClick:u,"aria-label":"Upload image",title:"Upload an image",style:{width:28,height:28},children:o.jsx(J5,{size:12})}),o.jsx("button",{type:"button",className:"sc-icon-btn sc-ap-close",onClick:f,"aria-label":"Close",style:{width:28,height:28},children:o.jsx(Mn,{size:12})})]}),o.jsxs("div",{className:"sc-ap-body",children:[A.length===0&&o.jsxs("div",{className:"sc-ap-empty",children:["Nothing matches",g.trim()?` "${g.trim()}"`:"","."]}),h==="All"?M.map(D=>{const L=A.filter(se=>se.tab===D);if(!L.length)return null;const Y=L.slice(0,c_),I=L.length-Y.length;return o.jsxs("div",{className:"sc-ap-group",children:[o.jsx("div",{className:"sc-eyebrow",children:D==="Shots"?"Recent shots":D==="Colors"?"Brand colors":D}),o.jsx("div",{className:"sc-ap-grid",children:Y.map(T)}),I>0&&o.jsxs("button",{type:"button",className:"sc-amore",onClick:()=>m(D),children:["Show all ",L.length]})]},D)}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-ap-grid",children:[h==="Products"&&o.jsxs("button",{type:"button",className:"sc-ap-card sc-ap-add",onClick:()=>E("product",{onCreated:D=>D.kind==="product"&&i({t:"product",id:D.id})}),children:[o.jsx("span",{className:"sc-ap-thumb sc-ap-thumb-empty",children:o.jsx(tr,{size:16})}),o.jsx("b",{children:"Add product"})]}),A.slice(0,k2).map(T)]}),A.length>k2&&o.jsxs("p",{className:"sc-ap-capped",children:["Showing ",k2," of ",A.length,". Search to narrow it down."]})]})]})]})}function f_({brandId:e,revision:t}){const[n,s]=r.useState([]),[i,c]=r.useState(!1);return r.useEffect(()=>{let u=!0;return Ce.brandRules(e).then(f=>u&&s(f.directives)).catch(()=>u&&s([])),()=>{u=!1}},[e,t]),n.length?o.jsxs("div",{className:"sc-inherit",children:[o.jsxs("button",{type:"button",className:"sc-inherit-head",onClick:()=>c(u=>!u),"aria-expanded":i,children:[o.jsx(CH,{size:12}),o.jsx("span",{children:"Brand rules apply to every shot"}),o.jsx(ai,{size:10,weight:"bold"})]}),i&&o.jsx("div",{className:"sc-inherit-body",children:n.map(u=>o.jsx("p",{children:u},u))})]}):null}const h_={"codex-cli":{sizing:"advisory"},openrouter:{sizing:"ratio"},replicate:{sizing:"ratio",formats:["square","story","landscape"]},fal:{sizing:"exact"},demo:{sizing:"exact"}},m_={sizing:"exact"},d9=e=>h_[e]??m_;function p_(e,t){const n=d9(e).formats;return!n||n.includes(t)}const xp=e=>d9(e).sizing,Us=[{id:"draft",label:"Draft",edge:768,note:"quick checks"},{id:"standard",label:"Standard",edge:1024,note:"everyday shots"},{id:"high",label:"High",edge:1536,note:"hero and print"}],p1=[1,2,3,4],f9=e=>_r.filter(t=>!p_(e,t.id)).map(t=>t.id),Nh=(e,t)=>t.length===0?void 0:`${e} cannot make ${_r.filter(n=>t.includes(n.id)).map(n=>n.hint).join(" or ")}.`,wp=e=>{var n;e.preventDefault();const t=e.currentTarget??e.target;(n=t==null?void 0:t.querySelector('[role="radiogroup"]'))==null||n.focus()};function N2({aria:e,width:t,trigger:n,open:s,onOpenChange:i,children:c,onCloseAutoFocus:u}){const f=r.useRef(null);return r.useEffect(()=>{var m;const h=(m=f.current)==null?void 0:m.parentElement;h&&(h.style.pointerEvents=s?"":"none")},[s]),o.jsxs(ti,{open:s,onOpenChange:i,children:[o.jsx(ni,{children:o.jsx("button",{type:"button",className:"sc-var","aria-label":e,children:n})}),o.jsx(ri,{ref:f,className:"sc-setpop",align:"end",sideOffset:8,width:t,onOpenAutoFocus:wp,onCloseAutoFocus:u,onInteractOutside:h=>{var m;(m=h.target)!=null&&m.closest(".sc-prompt-pills")&&h.preventDefault()},children:c(()=>i(!1))})]})}function Ah({w:e,h:t,slot:n,box:s}){const i=s/Math.max(e,t);return o.jsx("span",{className:"sc-ratio-slot",style:{width:n,height:n},"aria-hidden":!0,children:o.jsx("span",{className:"sc-ratio",style:{width:Math.round(e*i),height:Math.round(t*i)}})})}const Bg=()=>o.jsx("span",{className:"sc-setpop-tick","aria-hidden":!0,children:o.jsx(_a,{size:12,weight:"bold"})});function ql({label:e,value:t,ids:n,unavailable:s=[],onChange:i,className:c,children:u}){const f=r.useRef(null),h=n.filter(g=>!s.includes(g)),m=g=>{var E,C;const v=g.key==="ArrowDown"||g.key==="ArrowRight"?1:g.key==="ArrowUp"||g.key==="ArrowLeft"?-1:g.key==="Home"?"first":g.key==="End"?"last":null;if(v===null||!h.length)return;g.preventDefault();const y=h.indexOf(t),w=v==="first"?h[0]:v==="last"?h[h.length-1]:v===1?h[y<0||y===h.length-1?0:y+1]:h[y<=0?h.length-1:y-1];i(w),(C=(E=f.current)==null?void 0:E.querySelector(`[data-id="${w}"]`))==null||C.focus()};return o.jsx("div",{className:c,role:"radiogroup","aria-label":e,ref:f,tabIndex:-1,onKeyDown:m,children:u})}function Xl({id:e,on:t,unavailable:n,label:s,onPick:i,className:c,children:u}){return o.jsx("button",{type:"button",role:"radio","data-id":e,className:c,"aria-checked":t,"aria-label":s,"aria-disabled":n||void 0,"data-on":t||void 0,tabIndex:t?0:-1,onClick:()=>{n||i()},children:u})}const g_=({children:e})=>o.jsx("p",{className:"sc-setpop-foot",children:e});function v_({mode:e,engineId:t,engineName:n,formatId:s,onFormat:i,count:c,onCount:u,quality:f,onQuality:h,onCloseAutoFocus:m}){const g=_r.find(k=>k.id===s)??_r[0],v=Us.find(k=>k.id===f)??Us[1],y=f9(t),w=xp(t),[E,C]=r.useState(null),b=r.useRef(null);b.current=E;const N=k=>{k.preventDefault(),b.current===null&&(m==null||m(k))},j=k=>({open:E===k,onCloseAutoFocus:N,onOpenChange:A=>C(M=>A?k:M===k?null:M)});return o.jsxs("div",{className:"sc-prompt-pills",children:[o.jsx(N2,{...j("aspect"),aria:`Aspect ${g.label}, ${g.hint}`,width:"178px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(Ah,{w:g.w,h:g.h,slot:15,box:13}),g.label]}),children:k=>o.jsxs(o.Fragment,{children:[o.jsx(ql,{label:"Aspect ratio",className:"sc-setpop-list",value:s,ids:_r.map(A=>A.id),unavailable:y,onChange:i,children:_r.map(A=>o.jsxs(Xl,{id:A.id,className:"sc-setrow",on:A.id===s,unavailable:y.includes(A.id),label:`${A.label}, ${A.hint}`,onPick:()=>{i(A.id),k()},children:[o.jsx(Ah,{w:A.w,h:A.h,slot:20,box:17}),o.jsx("span",{className:"sc-setrow-n",children:A.label}),o.jsx("span",{className:"sc-setrow-v",children:A.hint}),o.jsx(Bg,{})]},A.id))}),Nh(n,y)&&o.jsx(g_,{children:Nh(n,y)})]})}),e==="generation"&&o.jsx(N2,{...j("variants"),aria:`${c} variants`,width:"156px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(hh,{size:14}),c]}),children:k=>o.jsx(o.Fragment,{children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:p1.map(String),onChange:A=>u(Number(A)),children:p1.map(A=>o.jsx(Xl,{id:String(A),className:"sc-seg-o",on:A===c,label:`${A} variant${A===1?"":"s"}`,onPick:()=>{u(A),k()},children:A},A))})})}),e==="generation"&&w!=="ratio"&&o.jsx(N2,{...j("resolution"),aria:`Resolution ${v.label}, ${v.edge} px`,width:"192px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(xH,{size:14}),v.label]}),children:k=>o.jsx(o.Fragment,{children:o.jsx(ql,{label:"Resolution",className:"sc-setpop-list",value:f,ids:Us.map(A=>A.id),onChange:A=>h(A),children:Us.map(A=>o.jsxs(Xl,{id:A.id,className:"sc-setrow",on:A.id===f,label:`${A.label}, ${A.edge} px, ${A.note}`,onPick:()=>{h(A.id),k()},children:[o.jsx("span",{className:"sc-setrow-n",children:A.label}),o.jsxs("span",{className:"sc-setrow-v",children:[A.edge," px"]}),o.jsx(Bg,{})]},A.id))})})})]})}function h9({mode:e,engineId:t,engineName:n,formatId:s,onFormat:i,count:c,onCount:u,quality:f,onQuality:h}){const m=f9(t),g=xp(t);return o.jsxs(o.Fragment,{children:[o.jsx(A2,{label:"Aspect ratio",note:Nh(n,m),children:o.jsx(ql,{label:"Aspect ratio",className:"sc-seg",value:s,ids:_r.map(v=>v.id),unavailable:m,onChange:i,children:_r.map(v=>o.jsxs(Xl,{id:v.id,className:"sc-seg-o sc-seg-ratio",on:v.id===s,unavailable:m.includes(v.id),label:`${v.label}, ${v.hint}`,onPick:()=>i(v.id),children:[o.jsx(Ah,{w:v.w,h:v.h,slot:17,box:14}),v.hint]},v.id))})}),e==="generation"&&o.jsx(A2,{label:"Variants",children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:p1.map(String),onChange:v=>u(Number(v)),children:p1.map(v=>o.jsx(Xl,{id:String(v),className:"sc-seg-o",on:v===c,label:`${v} variant${v===1?"":"s"}`,onPick:()=>u(v),children:v},v))})}),e==="generation"&&g!=="ratio"&&o.jsx(A2,{label:"Resolution",children:o.jsx(ql,{label:"Resolution",className:"sc-seg",value:f,ids:Us.map(v=>v.id),onChange:v=>h(v),children:Us.map(v=>o.jsx(Xl,{id:v.id,className:"sc-seg-o",on:v.id===f,label:`${v.label}, ${v.edge} px, ${v.note}`,onPick:()=>h(v.id),children:v.label},v.id))})})]})}function A2({label:e,note:t,children:n}){return o.jsxs("div",{className:"sc-shotfield",children:[o.jsx("span",{className:"sc-shotfield-lb",children:e}),n,t&&o.jsx("p",{className:"sc-shotfield-note",children:t})]})}function y_(e){const[t,n]=r.useState(!1),{sheet:s,grip:i}=au(()=>n(!1));return o.jsxs(ui,{open:t,onOpenChange:n,children:[o.jsx(am,{asChild:!0,children:o.jsx("button",{type:"button",className:"sc-var sc-shotset","aria-label":"Shot settings",title:"Shot settings",children:o.jsx(z5,{size:16})})}),o.jsxs(di,{children:[o.jsx(fi,{className:"sc-shotsheet-scrim"}),o.jsxs(hi,{ref:s,className:"sc-shotsheet","aria-describedby":void 0,onOpenAutoFocus:wp,onCloseAutoFocus:c=>c.preventDefault(),children:[o.jsxs("div",{className:"sc-shotsheet-grip",...i,children:[o.jsx("span",{className:"sc-shotsheet-bar","aria-hidden":!0}),o.jsx(mi,{className:"sc-vh",children:"Shot settings"})]}),o.jsx(h9,{...e})]})]})]})}const x_=720*60*60*1e3,Ec=e=>`scenri:draft-${e}`;function w_(e){try{return localStorage.getItem(e)}catch{return null}}function b_(e,t){try{localStorage.setItem(e,t)}catch{}}function Mh(e){try{localStorage.removeItem(e)}catch{}}function Ug(e,t,n){return e.some(s=>s.t==="text"?!!s.v.trim():!0)||Object.values(t).some(s=>!!s.trim())||!!n}function E_(e){const t=w_(Ec(e));if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!="object"||n===null)return null;const s=n;if(s.v!==1||s.brandId!==e||!Array.isArray(s.tokens)||typeof s.tplFields!="object"||!s.tplFields)return Mh(Ec(e)),null;const i=Date.now()-Date.parse(s.updatedAt??"");return!Number.isFinite(i)||i>x_?(Mh(Ec(e)),null):{v:1,brandId:e,updatedAt:s.updatedAt,tokens:s.tokens,tplFields:s.tplFields,branchId:s.branchId??null,setSlug:s.setSlug??null}}function m9(e,t){const n={v:1,brandId:e,updatedAt:new Date().toISOString(),tokens:t.tokens,tplFields:t.tplFields,branchId:t.branchId,setSlug:t.setSlug??null};b_(Ec(e),JSON.stringify(n))}function Wg(e){Mh(Ec(e))}function Gg(e,t,n,s,i){if(e===t)return{changed:!1,toast:null};const c=!!s;return e===null&&!c?{changed:!0,toast:null}:{changed:!0,toast:{title:c?`Switched to ${n}. This starts a new shot instead of refining ${i??"that shot"}.`:`Switched to ${n}.`,prevSceneId:e,branchWasCleared:c}}}const Rh=4,Kg=24,Yg=24,p9={product:[],presenter:[],scene:null};function C_(e){const t=[],n=[];let s=null;for(const i of e)i.t==="product"?t.includes(i.id)||t.push(i.id):i.t==="character"?n.includes(i.id)||n.push(i.id):i.t==="template"&&(s=i.id);return{product:t,presenter:n,scene:s}}function S_(e){return`${e.product.join(",")}|${e.presenter.join(",")}|${e.scene??""}`}function j_(e,t,n){const i=(t.size?[...e].sort((c,u)=>Number(t.has(u.id))-Number(t.has(c.id))):e).slice(0,n);return{visible:i,more:Math.max(0,e.length-i.length)}}const bp=r.forwardRef(function({projectId:t,brand:n,engines:s,parent:i,shots:c,initialBrief:u,suppressDraftRestore:f,startScene:h,startPresenter:m,startProduct:g,openAttachTab:v,onQueued:y,onSending:w,onAttached:E,target:C,onClearTarget:b,sourceImage:N,onRestoreBranchId:j,setSlug:k,persistDraft:A=!0},M){var gn,Gn,Ln;const{products:T}=It(),{demoProducts:D,loaded:L}=pn(),Y=iu(),I=Y.scenes,se=Y.presenters,U=X1(),te=Q1(),{push:O}=mr(),ne=s.filter(de=>de.available),[Q,H]=Ia(cr.engine,u1);r.useEffect(()=>{const de=G$(ne,Q);de!==Q&&H(de)},[ne,Q,H]);const K=ne.length===0&&s.some(de=>de.code==="not-installed"||de.code==="not-authenticated"),X=ne.length===0,W=X?K?{icon:o.jsx($w,{}),title:"Image generation is not set up yet",detail:"About a minute, using the ChatGPT account you already have.",action:"Set up",onAct:()=>te(),info:!0}:{icon:o.jsx(l1,{size:15}),title:"No image provider connected",detail:"Add a provider key and this brief is ready to run.",action:"Open settings",onAct:()=>U("engines"),info:!1}:null,[P,Z]=r.useState(as()),[ae,G]=r.useState(void 0),[fe,le,me]=f2(cr.format,"square"),[J,ge]=r.useState({}),[He,Qe,ye]=f2(cr.count,2),[ke,lt]=r.useState(!1),[jt,Pt]=r.useState(null),[Ne,Ae]=r.useState(null),[Ee,at]=r.useState(!1),[kt,Qt]=r.useState("All"),[Jt,Ot,xn]=f2(cr.quality,"standard"),[Rn,Wn]=r.useState(!1),[Pn,Zt]=r.useState(!1),tt=r.useRef(null),qe=r.useRef(null),Ut=r.useRef(null),Vt=r.useRef({tokens:P,tplFields:J,branchId:(C==null?void 0:C.id)??null});Vt.current={tokens:P,tplFields:J,branchId:(C==null?void 0:C.id)??null};const z=r.useRef(null),ue=r.useRef(null),xe=r.useRef(void 0),Me=r.useRef(void 0),Ke=r.useRef(void 0),it=r.useCallback(de=>{if(ue.current&&(clearTimeout(ue.current),ue.current=null),!A)return;const Le=Vt.current;Ug(Le.tokens,Le.tplFields,Le.branchId)?m9(de,{...Le,setSlug:k}):Wg(de)},[k,A]);r.useEffect(()=>{v&&(Qt(v),at(!0))},[v]),r.useEffect(()=>{if(!u)return;const de=(u.tokens??[]).find(Le=>Le.t==="format");de&&me(de.id),u.variants&&ye(u.variants),u.quality&&xn(u.quality),G(Xw(u)),ge(u.templateFields??{})},[u]),r.useEffect(()=>{var et,Wt;const de=z.current;de&&de!==n.id&&it(de);const Le=!!u||!!f||!A;let ht=null,Je=null,gt=null;if(!Le){const mt=E_(n.id);mt&&Ug(mt.tokens,mt.tplFields,mt.branchId)&&(ht=mt.tokens,Je=mt.tplFields,gt=mt.branchId)}if(h&&h!==xe.current){xe.current=h;const mt=ht??as(),Kt=mt.find(jn=>jn.t==="template"),vn=(Kt==null?void 0:Kt.id)??null,Kn=gt,Dt=((et=I.find(jn=>jn.id===h))==null?void 0:et.name)??"this scene",Zn=Kn?c.find(jn=>jn.id===Kn):null,ar=Gg(vn,h,Dt,Kn,Zn?Cn(Zn):null);if(ar.changed&&(ht=[{t:"template",id:h},...mt.filter(jn=>jn.t!=="template")],(Wt=ar.toast)!=null&&Wt.branchWasCleared&&(gt=null),ar.toast)){const jn=ar.toast;O({kind:"success",title:jn.title,action:{label:"Undo",onClick:()=>{var vs,_;jn.prevSceneId?(vs=tt.current)==null||vs.insert({t:"template",id:jn.prevSceneId}):(_=tt.current)==null||_.removeTemplate(),jn.branchWasCleared&&Kn&&(j==null||j(Kn))}}})}}if(m&&m!==Me.current){Me.current=m;const mt=ht??as();mt.some(vn=>vn.t==="character"&&vn.id===m)||(ht=[...mt,{t:"character",id:m}])}if(g&&g!==Ke.current){Ke.current=g;const mt=ht??as();mt.some(vn=>vn.t==="product"&&vn.id===g)||(ht=[...mt,{t:"product",id:g}])}ht&&(G(ht),ge(Je??{}),gt&&(j==null||j(gt))),z.current=n.id},[n.id,h,m,g]),r.useEffect(()=>{var de;ae&&((de=tt.current)==null||de.setTokens(ae),G(void 0))},[ae]);const _t=r.useMemo(()=>{var gt;const de=_r.find(et=>et.id===fe)??_r[0],ht=(((gt=Us.find(et=>et.id===Jt))==null?void 0:gt.edge)??1024)/Math.max(de.w,de.h),Je=et=>Math.max(256,Math.round(et*ht/8)*8);return{t:"format",id:de.id,w:Je(de.w),h:Je(de.h)}},[fe,Jt]),Nt=r.useMemo(()=>[_t,...P],[_t,P]),bt=r.useMemo(()=>({tokens:Nt,templateFields:J,variants:He,quality:Jt,format:fe}),[Nt,J,He,Jt,fe]),Sn=P.some(de=>de.t==="text"?!!de.v.trim():!0),Ct=r.useMemo(()=>{const de=P.find(Le=>Le.t==="template");return de?I.find(Le=>Le.id===de.id)??null:null},[P,I]),Mr=r.useMemo(()=>{const de=P.find(Le=>Le.t==="template");return(de==null?void 0:de.id)??null},[P]),pr=r.useCallback(de=>{var et,Wt;const Le=(Ct==null?void 0:Ct.id)??null,ht=(C==null?void 0:C.id)??null,Je=((et=I.find(mt=>mt.id===de))==null?void 0:et.name)??"this scene",gt=Gg(Le,de,Je,ht,C?Cn(C):null);if(gt.changed&&((Wt=tt.current)==null||Wt.insert({t:"template",id:de}),gt.toast)){const mt=gt.toast;O({kind:"success",title:mt.title,action:{label:"Undo",onClick:()=>{var Kt,vn;mt.prevSceneId?(Kt=tt.current)==null||Kt.insert({t:"template",id:mt.prevSceneId}):(vn=tt.current)==null||vn.removeTemplate(),mt.branchWasCleared&&ht&&(j==null||j(ht))}}})}},[Ct,C,I,O,j]);r.useImperativeHandle(M,()=>({insertToken:de=>{var Le;return(Le=tt.current)==null?void 0:Le.insert(de)},applyScene:de=>pr(de),openAttach:de=>pt(de),focus:()=>{var de;return(de=tt.current)==null?void 0:de.focus()},submit:()=>{ut()}}));const ct=r.useMemo(()=>C_(P),[P]),St=S_(ct),en=r.useRef(ct);en.current=ct,r.useEffect(()=>{E==null||E(en.current)},[St,E]),r.useEffect(()=>{var de;!L||!Mr||Ct||((de=tt.current)==null||de.removeTemplate(),O({kind:"error",title:"That scene is no longer available.",detail:"Starting from scratch."}))},[L,Mr,Ct,O]);const zt=r.useRef(null);r.useEffect(()=>{if(!Sn){Ae(null);return}return zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{Ce.previewBrief(bt,Q,n.id).then(Ae).catch(()=>Ae(null))},280),()=>{zt.current&&clearTimeout(zt.current)}},[bt,Q,n.id,Sn]),r.useEffect(()=>(ue.current&&clearTimeout(ue.current),ue.current=setTimeout(()=>it(z.current??n.id),500),()=>{ue.current&&clearTimeout(ue.current)}),[P,J,C==null?void 0:C.id,n.id,it]),r.useEffect(()=>()=>it(z.current??n.id),[it]),r.useEffect(()=>{const de=()=>it(z.current??n.id);return window.addEventListener("beforeunload",de),()=>window.removeEventListener("beforeunload",de)},[it,n.id]);const Lt=s.find(de=>de.id===Q),nr=Lt?Gs(Lt.displayName):"This engine",F=!!C&&C.kind!=="root"&&C.status==="running",V=C&&C.kind!=="root"&&C.status==="done"&&C.images.length>0||F,ee=!!(Lt!=null&&Lt.supportsEdit),pe=!!C&&!!((gn=C.brief)!=null&&gn.format)&&C.brief.format!==fe,he=V&&ee&&!Ct&&!pe?"edit":"generation",$e=V?Ct?"A scene starts a new shot.":pe?"A new shape starts a new shot from this setup.":ee?F?"Still rendering. This can be refined the moment it lands.":null:`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot edit. This makes a new shot.`:null,ze=r.useMemo(()=>{const de=_r.find(gt=>gt.id===fe)??_r[0],Le=`Aspect ${de.label} ${de.hint}`;if(he==="edit")return Le;const ht=Us.find(gt=>gt.id===Jt),Je=xp(Q)==="ratio"||!ht?null:`${ht.label} ${ht.edge} px`;return[Le,`${He} variants`,Je&&`resolution ${Je}`].filter(Boolean).join(", ")},[he,fe,He,Jt,Q]);r.useEffect(()=>{Ct&&V&&b&&b()},[Ct,V,b]);const st=(Ne==null?void 0:Ne.warnings.filter(de=>de.includes("built around a product")))??[],je=!ke&&Sn&&!!t&&!F&&!X,Ze=X?"Image generation is not set up yet":ke?"Working on the last one":t?F?"Wait for this version to finish, or press X to start a new shot":Sn?null:"Write a brief first":"Still opening this brand",Ge=de=>{var Le;le(de),(Le=tt.current)==null||Le.focus()},_e=de=>{var Le;Ot(de),(Le=tt.current)==null||Le.focus()},Pe=de=>{var Le;Qe(de),(Le=tt.current)==null||Le.focus()},dt=de=>{var Le;de.preventDefault(),(Le=tt.current)==null||Le.focus()},pt=de=>{Qt(de),at(!0)},Ft=async de=>{var ht;if(!(de!=null&&de.length))return;const Le=Array.from(de).filter(Je=>Je.type.startsWith("image/"));if(!Le.length){O({kind:"error",title:"Only images can be attached here"});return}Wn(!0),Pt(null);try{for(const Je of Le.slice(0,4)){const gt=await iw(Je);(ht=tt.current)==null||ht.insert({t:"ref",imageHash:gt})}}catch(Je){Pt(String(Je.message??Je)),O(dn(Je,"Could not attach that image"))}finally{Wn(!1),Ut.current&&(Ut.current.value="")}},Ht=Ct?st.length>0?"This scene builds around a product. Attach one.":(Ne==null?void 0:Ne.warnings.some(de=>de.includes("built around a person")))??!1?"This scene builds around a person. Attach a presenter.":null:null,xt=de=>{var Le;if(de.t==="template")return Ht;if(!Ne)return null;if(de.t==="ref"&&!Ne.attachments.some(ht=>ht.hash===de.imageHash))return`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot read this reference, so it is left out.`;if(de.t==="product"){const Je=(T.length?T:((Le=n.json)==null?void 0:Le.products)??[]).find(gt=>gt.id===de.id)??D.find(gt=>gt.id===de.id);if(Je&&!Ne.attachments.some(gt=>gt.role==="product"&>.id===Je.id))return`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot read the product image, so ${Je.name} rides as text only.`}if(de.t==="character"){const ht=se.find(Je=>Je.id===de.id);if(ht&&!Ne.attachments.some(Je=>Je.role==="character"&&Je.id===ht.id))return`${(Lt==null?void 0:Lt.displayName)??"This engine"} cannot read the person reference, so ${ht.name} rides as text only.`}return null},ut=async()=>{var Le,ht;if(!je)return;lt(!0),Pt(null);const de=P.flatMap(Je=>Je.t==="text"?[Je.v]:[]).join(" ").replace(/\s+/g," ").trim();w==null||w(de||"Your shot");try{if(!t)throw new Error("the workspace is still loading");const Je=await Ce.addNode({projectId:t,parentId:he==="edit"&&C?C.id:(i==null?void 0:i.id)??null,kind:he,engineId:Q,count:He,brief:bt,...he==="edit"&&N?{sourceImage:N}:{}}),gt=(Le=Je.warnings)==null?void 0:Le[0];gt&&O({kind:"success",title:"Sent, with one thing to know",detail:gt}),(ht=tt.current)==null||ht.setTokens(as()),ge({}),me(null),ye(null),xn(null),A&&Wg(n.id),y(Je.id,he)}catch(Je){const gt=String(Je.message??Je);Pt(gt),O({kind:"error",title:"That did not send",detail:gt}),w==null||w(null)}finally{lt(!1)}},tn=(Gn=P.find(de=>de.t==="product"))==null?void 0:Gn.id,rr=tn?T.find(de=>de.id===tn)??(((Ln=n.json)==null?void 0:Ln.products)??[]).find(de=>de.id===tn)??D.find(de=>de.id===tn)??null:null,On=rr?cp(rr):null;return o.jsxs("div",{className:"sc-composer",children:[o.jsx("input",{ref:Ut,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:de=>void Ft(de.target.files)}),Ee&&o.jsx(d_,{brand:n,activeProductCategory:On,shots:c,initialTab:kt,onUpload:()=>{var de;return(de=Ut.current)==null?void 0:de.click()},onToken:de=>{var Le;return(Le=tt.current)==null?void 0:Le.insert(de)},onTemplate:de=>pr(de),onClose:()=>at(!1)}),W&&o.jsx("div",{className:"sc-notes",children:W&&o.jsxs("div",{className:"sc-banner","data-tone":"action",children:[o.jsx("span",{className:"sc-banner-ic",children:W.icon}),o.jsxs("span",{className:"sc-banner-txt",children:[o.jsx("b",{children:W.title}),o.jsxs("small",{children:[W.detail,W.info&&o.jsxs(ti,{children:[o.jsx(ni,{children:o.jsx("button",{type:"button",className:"sc-note-info","aria-label":"What a ChatGPT account has to do with this",children:o.jsx(qm,{size:13})})}),o.jsxs(ri,{className:"sc-note-pop",align:"start",sideOffset:8,width:"300px",children:[o.jsx("p",{children:"Codex CLI signs in with your ChatGPT account and makes the images there. Every plan includes some Codex usage, so how many images you get depends on the plan you are on."}),o.jsx("p",{children:"No ChatGPT account, or run out for now? Use your own key from an image provider instead."}),o.jsx("p",{className:"sc-note-pop-fine",children:"scenri never sees your password or token. The sign-in happens in your browser and stays with Codex."}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>U("engines"),children:"Use a provider key instead"})]})]})]})]}),o.jsx("button",{type:"button",className:"sc-banner-act","data-primary":"",onClick:W.onAct,children:W.action})]})}),o.jsxs("div",{className:"sc-promptcard",children:[V&&b&&o.jsxs("div",{className:"sc-target","data-note":$e?"":void 0,children:[o.jsxs("span",{className:"sc-target-lb",children:["Refining",C.images[0]?o.jsx("img",{src:rn(C.images[0]),alt:""}):o.jsx("span",{className:"sc-target-thumb sc-shimmer"}),o.jsx("b",{dir:"auto",children:Cn(C)})]}),$e&&o.jsx("small",{className:"sc-target-note",children:$e}),o.jsx("button",{type:"button",className:"sc-target-x",onClick:b,"aria-label":"Make a new shot instead",children:o.jsx(Mn,{size:12})})]}),V&&!b&&$e&&o.jsx("small",{className:"sc-target-note sc-target-note-alone",children:$e}),o.jsx(a_,{ref:tt,onChange:Z,brand:n,shots:c,templates:I,presenters:se,demoProducts:D,onTemplatePick:pr,flag:xt,onAttachRequest:de=>pt(de),activeProductCategory:On,placeholder:Ct?"Add art direction, or run it as written":he==="edit"?"Say what to change about this shot":"What should we shoot? (use $ / @ #)",placeholderSm:Ct||he==="edit"?void 0:"What should we shoot? ($ / @ #)",onSubmit:()=>void ut(),onDropFiles:de=>void Ft(de)}),o.jsx(f_,{brandId:n.id,revision:n.updatedAt}),o.jsxs("div",{className:"sc-prompt-row",children:[o.jsxs("div",{className:"sc-prompt-left",children:[o.jsx("button",{type:"button",ref:qe,className:"sc-icon-btn sc-attach-toggle","aria-expanded":Ee,"aria-label":"Attach",title:"Attach a product, a scene, a colour or an image",onClick:()=>Ee?at(!1):pt("All"),children:Rn?o.jsx(ln,{size:"1"}):o.jsx(tr,{size:16})}),ne.length>1&&o.jsxs(Fx,{value:Q,onValueChange:H,children:[o.jsxs(Ix,{variant:"ghost",className:"sc-mini-sel",children:[o.jsx(l1,{size:14}),o.jsx("span",{className:"sc-mini-sel-t",children:Lt?Gs(Lt.displayName):"Demo"})]}),o.jsx(_x,{children:ne.map(de=>o.jsx(Ox,{value:de.id,children:Gs(de.displayName)},de.id))})]})]}),o.jsxs("div",{className:"sc-prompt-right",children:[o.jsx(v_,{mode:he,engineId:Q,engineName:nr,formatId:fe,onFormat:Ge,count:He,onCount:Pe,quality:Jt,onQuality:_e,onCloseAutoFocus:dt}),o.jsxs(ti,{open:Pn,onOpenChange:Zt,children:[o.jsx(ni,{children:o.jsxs("button",{type:"button",className:"sc-var sc-more","aria-label":`Shot settings. ${ze}`,children:[o.jsx(z5,{size:14}),"More"]})}),o.jsx(ri,{className:"sc-morepop",align:"end",sideOffset:8,width:"300px",onOpenAutoFocus:wp,onCloseAutoFocus:dt,children:o.jsx(h9,{mode:he,engineId:Q,engineName:nr,formatId:fe,onFormat:Ge,count:He,onCount:Pe,quality:Jt,onQuality:_e})})]}),o.jsx(y_,{mode:he,engineId:Q,engineName:nr,formatId:fe,onFormat:Ge,count:He,onCount:Pe,quality:Jt,onQuality:_e}),o.jsxs("button",{type:"button",className:"sc-send","aria-disabled":!je||void 0,onClick:()=>void ut(),"aria-label":he==="edit"?"Refine":"Generate",title:jt??Ht??Ze??`${he==="edit"?"Refine":"Generate"} (enter)`,children:[o.jsx("span",{className:"sc-send-ico",children:ke?o.jsx(ln,{size:"1"}):o.jsx(oH,{size:17,weight:"bold"})}),o.jsx("span",{className:"sc-send-lb",children:he==="edit"?"Refine":"Generate"})]})]})]})]})]})});function g9({full:e=!0,children:t}){return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-dock-fade","data-full":e,"aria-hidden":!0}),o.jsx("div",{className:"sc-canvas-dock","data-full":e,children:t})]})}function cu({id:e,previewUrl:t,title:n,primary:s,secondary:i,useLabel:c,variant:u,onOpen:f,onUse:h,selected:m,onToggle:g,bookmarked:v,onBookmark:y,size:w="grid"}){const[E,C]=r.useState(!1),[b,N]=r.useState(!1),j=r.useRef(null),[k,A]=r.useState(!1);r.useEffect(()=>{const se=window.matchMedia("(hover: none)"),U=()=>A(se.matches);return U(),se.addEventListener("change",U),()=>se.removeEventListener("change",U)},[]);const M=u==="use"&&!!f&&!!h;r.useEffect(()=>{if(!b)return;const se=U=>{var te;(te=j.current)!=null&&te.contains(U.target)||N(!1)};return document.addEventListener("pointerdown",se),()=>document.removeEventListener("pointerdown",se)},[b]);const T=t&&!E?o.jsx("img",{src:t,alt:"",loading:"lazy",onError:()=>C(!0)}):o.jsx("span",{className:"sc-lookcard-blank",children:o.jsx(Wa,{size:20})}),D=o.jsxs("span",{className:"sc-lookcard-cap",title:n,children:[o.jsx("b",{dir:"auto",children:s}),i&&o.jsx("span",{children:i})]});if(u==="select")return o.jsxs("button",{type:"button",className:"sc-lookcard","data-variant":"select","data-size":w,"data-on":m||void 0,"aria-pressed":!!m,"aria-label":n,onClick:()=>g==null?void 0:g(e),children:[o.jsxs("span",{className:"sc-lookcard-media",children:[T,o.jsx("span",{className:"sc-lookcard-veil","aria-hidden":!0}),o.jsx("span",{className:"sc-lookcard-tick","aria-hidden":!0,children:o.jsx(_a,{size:11,weight:"bold"})})]}),D]});const L=()=>{if(M&&k){if(!b){N(!0);return}N(!1)}f?f(e):h==null||h(e)},Y=()=>{N(!1),h==null||h(e)},I=o.jsxs("div",{ref:j,className:"sc-lookcard","data-fb":"catalog-card","data-fb-id":e,"data-variant":u,"data-size":w,"data-armed":b||void 0,children:[o.jsxs("div",{className:"sc-lookcard-media",children:[o.jsxs("button",{type:"button",className:"sc-lookcard-open",onClick:L,"aria-label":n,children:[T,o.jsx("span",{className:"sc-lookcard-veil","aria-hidden":!0})]}),M&&o.jsx("button",{type:"button",className:"sc-lookcard-use",onClick:Y,children:c}),y&&o.jsx("button",{type:"button",className:"sc-cardpuck sc-lookcard-bookmark","data-on":v||void 0,"aria-pressed":!!v,"aria-label":v?`Remove bookmark from ${s}`:`Bookmark ${s}`,onClick:se=>{se.stopPropagation(),y(e)},children:o.jsx(G1,{size:13,weight:v?"fill":"regular"})})]}),D]});return!f&&!h||k?I:o.jsxs(Zm,{children:[o.jsx(Vm,{children:I}),o.jsxs(zm,{children:[f&&o.jsx(qr,{onSelect:()=>f(e),children:"Open"}),M&&o.jsx(qr,{onSelect:()=>h==null?void 0:h(e),children:c}),y&&o.jsx(qr,{onSelect:()=>y(e),children:v?"Remove bookmark":"Bookmark"})]})]})}function sd({size:e="grid",count:t=4}){return o.jsx(o.Fragment,{children:Array.from({length:t},(n,s)=>o.jsx("div",{className:"sc-lookcard","data-variant":"skeleton","data-size":e,"aria-hidden":!0},s))})}const k_={presenter:"Presenter",product:"Product",scene:"Scene"};function v9({entry:e,productName:t,productPreviewUrl:n,productId:s,presenterName:i,presenterPreviewUrl:c,presenterId:u,sceneName:f,scenePreviewUrl:h,sceneId:m,onOpen:g,onOpenProduct:v,onOpenPresenter:y,onOpenScene:w,active:E,hideRecipe:C,decorative:b,size:N="grid"}){const j=[t,i,f].filter(Boolean).join(" · "),k=i?{key:"presenter",name:i,previewUrl:c,linked:!!(y&&u),onOpen:y&&u?()=>y(u):void 0}:null,A=n&&t?{key:"product",name:t,previewUrl:n,linked:!!(v&&s),onOpen:v&&s?()=>v(s):void 0}:null,M=h&&f?{key:"scene",name:f,previewUrl:h,linked:!!(w&&m),onOpen:w&&m?()=>w(m):void 0}:null;return o.jsxs("div",{className:"sc-showcase-tile","data-active":E||void 0,"aria-hidden":b||void 0,...b?{inert:""}:{},children:[o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:e.title,primary:e.title,secondary:C?"":j,useLabel:"Recreate this",variant:"use",onOpen:g,onUse:g,size:N}),(k||A||M)&&o.jsx(A_,{presenter:k,product:A,scene:M})]})}function N_(e){return o.jsx(sd,{...e})}function A_({presenter:e,product:t,scene:n}){const[s,i]=r.useState(null),c=[t,n].filter(Boolean),u=c.length+(e?1:0)+Math.max(0,c.length-1);let f=0;const h=()=>({"--i":f++});return o.jsxs("div",{className:"sc-showcase-chips",onMouseLeave:()=>i(null),children:[e&&o.jsx(qg,{credit:e,open:s==="presenter",onEnter:()=>i("presenter"),children:R_(e)}),c.length>0&&o.jsxs("div",{className:"sc-showcase-recipe",style:{"--n":u},children:[e&&o.jsx("span",{className:"sc-showcase-join",style:h(),"aria-hidden":!0}),c.map((m,g)=>o.jsxs(r.Fragment,{children:[g>0&&o.jsx("span",{className:"sc-showcase-join",style:h(),"aria-hidden":!0}),o.jsx(qg,{credit:m,open:s===m.key,onEnter:()=>i(m.key),style:h(),children:M_({credit:m,step:g===0?1:2})})]},m.key))]})]})}function qg({credit:e,open:t,onEnter:n,children:s,style:i}){const c=r.useRef(null),u=r.useRef(null),[f,h]=r.useState(null),m=UF(),g=m==="large"?144:88,v=m==="large"?168:112;if(r.useLayoutEffect(()=>{if(!t||!e.previewUrl){h(null);return}const w=()=>{const N=c.current;if(!N)return;const j=N.getBoundingClientRect(),k=u.current,A=(k==null?void 0:k.offsetWidth)||g,M=(k==null?void 0:k.offsetHeight)||v,T=8,D=j.top>=M+T+12;h({left:Math.round(j.left+j.width/2-A/2),top:Math.round(D?j.top-T-M:j.bottom+T)})};w();const E=requestAnimationFrame(w),C=c.current,b=C?new ResizeObserver(w):null;return C&&b&&b.observe(C),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{cancelAnimationFrame(E),b==null||b.disconnect(),window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[t,e.previewUrl,e.key,g,v]),!e.previewUrl)return o.jsx("span",{ref:c,className:"sc-credit-tip",onPointerEnter:n,style:i,children:s});const y=k_[e.key];return o.jsxs("span",{ref:c,className:"sc-credit-tip","data-open":t||void 0,onPointerEnter:n,style:i,children:[s,t&&na.createPortal(o.jsx("span",{ref:u,className:"sc-credit-tip-pop","data-size":m,style:f?{left:f.left,top:f.top}:{left:-9999,top:0},role:"tooltip","aria-label":`${y}: ${e.name}`,children:o.jsxs("span",{className:"sc-credit-tip-card",children:[o.jsx("img",{src:e.previewUrl,alt:""}),o.jsx("span",{className:"sc-credit-tip-name",children:e.name}),o.jsx("span",{className:"sc-credit-tip-role",children:y})]})}),document.body)]})}function y9(e,t){e.stopPropagation(),e.preventDefault(),t==null||t()}function M_({credit:e,step:t}){const{name:n,previewUrl:s,linked:i,onOpen:c}=e;return i?o.jsx("button",{type:"button",className:"sc-showcase-chip","data-link":!0,"data-step":t,"aria-label":`See ${n}`,onClick:u=>y9(u,c),children:s?o.jsx("img",{src:s,alt:""}):null}):o.jsx("span",{className:"sc-showcase-chip","data-step":t,children:s?o.jsx("img",{src:s,alt:n}):o.jsx("span",{className:"sc-vh",children:n})})}function R_(e){const{name:t,previewUrl:n,linked:s,onOpen:i}=e;return s?o.jsxs("button",{type:"button",className:"sc-showcase-badge","data-link":!0,"aria-label":`See ${t}`,onClick:c=>y9(c,i),children:[n?o.jsx("img",{src:n,alt:""}):null,o.jsx("span",{className:"sc-showcase-badge-name",children:t})]}):o.jsxs("span",{className:"sc-showcase-badge","aria-hidden":!0,children:[n?o.jsx("img",{src:n,alt:""}):null,o.jsx("span",{className:"sc-showcase-badge-name",children:t})]})}function g1({presenter:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){return o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:e.descriptor||e.name,primary:e.name,secondary:e.descriptor,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u})}function x9(e){return o.jsx(sd,{...e})}function $c({scene:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,bookmarked:u,onBookmark:f,size:h="grid"}){return o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:e.description||to(e,"tooltip"),primary:to(e,"card"),secondary:e.lighting,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,bookmarked:u,onBookmark:f,size:h})}function w9(e){return o.jsx(sd,{...e})}const Xg=new Map,P_=1e3;function dr({className:e="sc-home",children:t}){const n=r.useRef(null),{key:s}=mn(),i=r.useRef(!1);return r.useLayoutEffect(()=>{const c=n.current,u=Xg.get(s);if(!c||!u)return;let f=!1;const h=()=>{f||(f=!0,i.current=!1,g.disconnect(),clearTimeout(v),c.removeEventListener("wheel",h),c.removeEventListener("touchstart",h))},m=()=>{f||(c.scrollTop=u,Math.abs(c.scrollTop-u)<1&&h())};i.current=!0;const g=new ResizeObserver(m),v=setTimeout(h,P_);return c.addEventListener("wheel",h,{passive:!0}),c.addEventListener("touchstart",h,{passive:!0}),m(),g.observe(c),c.firstElementChild&&g.observe(c.firstElementChild),h},[s]),r.useEffect(()=>{const c=n.current;if(!c)return;const u=()=>{i.current||Xg.set(s,c.scrollTop)};return c.addEventListener("scroll",u,{passive:!0}),()=>c.removeEventListener("scroll",u)},[s]),o.jsx("div",{ref:n,className:e,children:t})}function od({title:e,filters:t,active:n,summary:s,onClear:i,density:c,search:u,action:f}){return o.jsxs("div",{className:"sc-filterbar",children:[e?o.jsx("h1",{className:"sc-vh",children:e}):null,t,o.jsxs("div",{className:"sc-filterbar-actions",children:[n&&o.jsxs("span",{className:"sc-lib-count",children:[s,i&&o.jsx("button",{type:"button",className:"sc-lib-clear",onClick:i,children:"Clear"})]}),u,c,f?o.jsx("span",{className:"sc-filterbar-cta",children:f}):null]})]})}function T0(e,t){return t===null?e===null:e===t}function b9({"aria-label":e,activeKey:t,items:n,onSelect:s}){const i=r.useRef(null),c=r.useRef(null),u=n.map(g=>`${g.value??""}:${g.count}`).join("|");r.useLayoutEffect(()=>{const g=i.current,v=c.current;if(!g||!v)return;let y=0;const w=()=>{const A=v.querySelector(":scope > button[data-on]");if(!A)return v.style.setProperty("--sc-ink-x","0px"),v.style.setProperty("--sc-ink-w","0px"),null;const M=A.querySelector(".sc-vlabel")??A;return v.style.setProperty("--sc-ink-x",`${A.offsetLeft+M.offsetLeft}px`),v.style.setProperty("--sc-ink-w",`${M.offsetWidth}px`),A},E=()=>{const A=v.scrollWidth-v.clientWidth;if(A<=1){delete g.dataset.overflowLeft,delete g.dataset.overflowRight;return}v.scrollLeft>2?g.dataset.overflowLeft="":delete g.dataset.overflowLeft,v.scrollLeft<A-2?g.dataset.overflowRight="":delete g.dataset.overflowRight},C=A=>{const M=v.scrollWidth-v.clientWidth;if(M<=0)return;const T=[...v.querySelectorAll(":scope > button")],D=T.indexOf(A);if(D<0)return;const L=72,Y=v.scrollLeft,I=Y+v.clientWidth,se=T[D-1],U=T[D+1],te=U?U.offsetLeft+Math.min(L,U.offsetWidth):A.offsetLeft+A.offsetWidth+8,O=se?Math.max(0,se.offsetLeft+se.offsetWidth-L):Math.max(0,A.offsetLeft-8);let ne=Y;if(te>I)ne=Math.min(M,te-v.clientWidth);else if(O<Y)ne=O;else return;if(Math.abs(ne-Y)<1)return;const Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches;v.scrollTo({left:ne,behavior:Q?"auto":"smooth"})},b=w();b&&C(b),E(),v.dataset.inkReady||requestAnimationFrame(()=>{v.dataset.inkReady=""});const N=()=>{y||(y=requestAnimationFrame(()=>{y=0,E()}))},j=A=>{if(v.scrollWidth<=v.clientWidth+1||Math.abs(A.deltaX)>Math.abs(A.deltaY)||A.deltaY===0)return;const M=v.scrollWidth-v.clientWidth,T=Math.max(0,Math.min(M,v.scrollLeft+A.deltaY));T!==v.scrollLeft&&(A.preventDefault(),v.scrollLeft=T,E())},k=new ResizeObserver(()=>{w(),E()});return k.observe(v),v.addEventListener("scroll",N,{passive:!0}),v.addEventListener("wheel",j,{passive:!1}),()=>{y&&cancelAnimationFrame(y),k.disconnect(),v.removeEventListener("scroll",N),v.removeEventListener("wheel",j)}},[t,u]);const f=g=>{T0(t,g)||s(g)},h=g=>{var E;if(g.key!=="ArrowLeft"&&g.key!=="ArrowRight"&&g.key!=="Home"&&g.key!=="End"||n.length===0)return;g.preventDefault();const v=Math.max(0,n.findIndex(C=>T0(t,C.value)));let y=v;if(g.key==="ArrowRight"?y=Math.min(n.length-1,v+1):g.key==="ArrowLeft"?y=Math.max(0,v-1):g.key==="Home"?y=0:g.key==="End"&&(y=n.length-1),y===v)return;f(n[y].value);const w=(E=c.current)==null?void 0:E.querySelectorAll(":scope > button")[y];w==null||w.focus()},m=n.findIndex(g=>T0(t,g.value));return o.jsx("div",{ref:i,className:"sc-verticals-shell",children:o.jsxs("div",{ref:c,className:"sc-verticals",role:"tablist","aria-label":e,onKeyDown:h,children:[o.jsx("span",{className:"sc-verticals-ink","aria-hidden":!0}),n.map((g,v)=>{const y=T0(t,g.value);return o.jsxs("button",{type:"button",role:"tab","aria-selected":y,"data-on":y?"":void 0,tabIndex:y||m<0&&v===0?0:-1,onClick:()=>f(g.value),children:[o.jsx("span",{className:"sc-vlabel",children:g.label}),o.jsx("span",{className:"sc-vcount",children:g.count})]},g.value??"__all__")})]})})}function ld({mode:e,group:t}){if(e==="none"||!t)return null;const n=[{value:null,label:t.everyLabel,count:t.everyCount},...t.options.map(s=>({value:s.value,label:s.label,count:s.count}))];return o.jsx(b9,{"aria-label":t.label,activeKey:t.selected,items:n,onSelect:t.onSelect})}function uu({value:e,onChange:t,noun:n,total:s}){const i=r.useRef(null),[c,u]=r.useState(e.trim().length>0),f=r.useCallback(()=>{var m;na.flushSync(()=>u(!0)),(m=i.current)==null||m.focus()},[]);r.useEffect(()=>{e.trim().length>0&&u(!0)},[e]),r.useEffect(()=>{const m=g=>{if(g.key!=="/"||g.metaKey||g.ctrlKey||g.altKey)return;const v=g.target;v!=null&&v.isContentEditable||v&&/^(input|textarea|select)$/i.test(v.tagName)||(g.preventDefault(),f())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[f]);const h=m=>{var g;m.key==="Escape"&&(m.stopPropagation(),e?t(""):(u(!1),(g=i.current)==null||g.blur()))};return o.jsxs("div",{className:"sc-libsearch","data-open":c?"":void 0,children:[o.jsx("button",{type:"button",className:"sc-libsearch-toggle","aria-label":`Search ${n}`,"aria-expanded":c,tabIndex:c?-1:0,onClick:f,children:o.jsx(Tc,{size:16})}),o.jsxs("div",{className:"sc-libsearch-field",children:[o.jsx(Tc,{size:15,"aria-hidden":!0}),o.jsx("input",{ref:i,type:"search",value:e,placeholder:`Search ${s} ${n}`,"aria-label":`Search ${n}`,autoComplete:"off",autoCorrect:"off",spellCheck:!1,tabIndex:c?0:-1,onChange:m=>t(m.target.value),onKeyDown:h,onBlur:()=>{e.trim()||u(!1)}}),o.jsx("button",{type:"button",className:"sc-libsearch-clear","aria-label":"Clear search",hidden:!e,tabIndex:e?0:-1,onMouseDown:m=>m.preventDefault(),onClick:()=>{var m;t(""),(m=i.current)==null||m.focus()},children:o.jsx(Mn,{size:12,weight:"bold"})})]})]})}function Ks({shape:e,title:t,body:n,action:s,onRetry:i}){return e==="error"?o.jsxs(o.Fragment,{children:[o.jsx("h1",{children:t??"Couldn't load this library"}),o.jsx("p",{className:"sc-lookpage-lede",children:n}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:i,children:"Retry"})})]}):e==="cold"?o.jsxs("div",{className:"sc-canvas-empty",children:[t&&o.jsx("h3",{children:t}),o.jsx("p",{children:n}),s&&o.jsx("div",{className:"sc-lookpage-acts",children:s})]}):o.jsxs("div",{className:"sc-lib-zero",children:[o.jsx("p",{children:n}),s]})}function id({noun:e,q:t,facet:n,onClearSearch:s,onClearAll:i}){const c=t.trim(),u=c?o.jsxs(o.Fragment,{children:["No ",e," found for ",o.jsxs("em",{children:["“",c,"”"]}),n?` in ${n}`:""]}):o.jsxs(o.Fragment,{children:["No ",e," in ",n]});return o.jsx(Ks,{shape:"zero",body:u,action:o.jsxs("span",{className:"sc-lib-zero-acts",children:[c&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:s,children:"Clear search"}),c&&n&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:i,children:"Clear all"}),!c&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:i,children:"Clear filter"})]})})}const L_=150;function du(e){const[t,n]=li(),s=t.get("q")??"",i=e.join(","),c=r.useMemo(()=>{const j={};for(const k of i.split(",").filter(Boolean))j[k]=t.get(k)||null;return j},[t,i]),u=r.useCallback(j=>{n(k=>{const A=new URLSearchParams(k);for(const[M,T]of Object.entries(j))T===null||T===""?A.delete(M):A.set(M,T);return A},{replace:!0})},[n]),[f,h]=r.useState(s),m=r.useRef(s),g=r.useRef(null),v=r.useCallback(()=>{g.current!==null&&(clearTimeout(g.current),g.current=null)},[]);r.useEffect(()=>{s!==m.current&&(m.current=s,v(),h(s))},[s,v]),r.useEffect(()=>v,[v]);const y=r.useCallback(j=>{h(j),v(),g.current=setTimeout(()=>{g.current=null,m.current=j,u({q:j||null})},L_)},[u,v]),w=r.useCallback((j,k)=>u({[j]:k}),[u]),E=u,C=f.trim().length>0||Object.values(c).some(Boolean),b=r.useCallback(()=>{v(),h(""),m.current="",u({q:null})},[u,v]),N=r.useCallback(()=>{v(),h(""),m.current="";const j={q:null};for(const k of i.split(",").filter(Boolean))j[k]=null;u(j)},[u,v,i]);return{q:f,setQ:y,facets:c,setFacet:w,setFacets:E,active:C,clearSearch:b,clear:N}}const T_=8;function H_(){var Pt;const{engines:e,scenes:t,loaded:n,presenters:s,presentersLoaded:i,demoProducts:c,showcase:u,showcaseCategories:f,showcaseLoaded:h,showcaseError:m,refetchShowcase:g}=pn(),{brand:v,workspace:y,nodes:w,products:E}=It(),C=ol(),b=an(),{push:N}=mr(),j=pp(),k=gp(),A=DF(),M=lo(bi),{q:T,setQ:D,facets:L,setFacet:Y,clearSearch:I,clear:se}=du(["category"]),U=L.category,te=Ne=>Y("category",Ne),O=T.trim().length>0,[ne,Q]=Ia(cr.wallDensity,zo),H=ll(ne),K=Ne=>Q(Ne),X=rd(H),W=ou(H),P=Ne=>{const Ae=new URLSearchParams(Ne??{}).toString();b(`${ur(v)}${Ae?`?${Ae}`:""}`)},Z=E.length?E:((Pt=v.json)==null?void 0:Pt.products)??[],ae=Ne=>{var kt,Qt,Jt;const Ae=(kt=Ne.brief.tokens.find(Ot=>Ot.t==="product"))==null?void 0:kt.id,Ee=(Qt=Ne.brief.tokens.find(Ot=>Ot.t==="character"))==null?void 0:Qt.id,at=(Jt=Ne.brief.tokens.find(Ot=>Ot.t==="template"))==null?void 0:Jt.id;return{product:Ae?c.find(Ot=>Ot.id===Ae):void 0,presenter:Ee?s.find(Ot=>Ot.id===Ee):void 0,scene:at?t.find(Ot=>Ot.id===at):void 0}},G=r.useMemo(()=>{const Ne=new Map;for(const Ae of u){const{product:Ee,presenter:at,scene:kt}=ae(Ae);Ne.set(Ae.id,HF(Ae,{product:Ee,presenter:at,scene:kt},w2(Ae.category)))}return Ne},[u,c,s,t]),fe=r.useMemo(()=>(U?u.filter(Ae=>Ae.category===U):u).filter(Ae=>xa(G.get(Ae.id)??Ae.title,T)),[u,U,T,G]),le=r.useMemo(()=>{const Ne=OF(f);return{key:"category",label:"Categories",everyLabel:"All examples",everyCount:u.length,selected:U,onSelect:te,options:Ne.map(Ae=>({value:Ae,label:w2(Ae)??Ae,count:u.filter(Ee=>Ee.category===Ae).length}))}},[u,f,U,te]),me=Ne=>{const{product:Ae,presenter:Ee,scene:at}=ae(Ne);return{productName:Ae?Oa(Ae,"chip"):null,productPreviewUrl:(Ae==null?void 0:Ae.previewUrl)??null,productId:(Ae==null?void 0:Ae.id)??null,presenterName:(Ee==null?void 0:Ee.name)??null,presenterPreviewUrl:(Ee==null?void 0:Ee.avatarUrl)??(Ee==null?void 0:Ee.previewUrl)??null,presenterId:(Ee==null?void 0:Ee.id)??null,sceneName:at?to(at,"chip"):null,scenePreviewUrl:(at==null?void 0:at.previewUrl)??null,sceneId:(at==null?void 0:at.id)??null}},[J,ge]=r.useState(null),Qe=M?A:Ne=>{const Ae=u.find(Ee=>Ee.id===Ne);Ae&&(ge(wh(Ae)),N({kind:"success",title:`Starting from "${Ae.title}"`}))},ye=w.find(Ne=>Ne.kind==="root")??null,ke=()=>{var Ee;const Ae=[...Za(v.id)].reverse().find(at=>t.some(kt=>kt.id===at))??((Ee=t[0])==null?void 0:Ee.id);P(Ae?{scene:Ae,attach:"products",compose:"1"}:{attach:"products",compose:"1"})},lt=r.useMemo(()=>{const Ne=Za(v.id);return l9(t,Ae=>Ne.includes(Ae.id)).slice(0,8)},[t,v.id]),jt=r.useMemo(()=>{var Jt,Ot,xn,Rn,Wn,Pn,Zt,tt;const Ne=new Set,Ae=qe=>!qe||Ne.has(qe)?null:(Ne.add(qe),qe),Ee=qe=>{for(const Ut of qe){const Vt=u.find(ue=>ue.id===Ut&&ue.previewUrl),z=Ae(Vt==null?void 0:Vt.previewUrl);if(z)return z}return null},at=qe=>{for(const Ut of qe){const Vt=t.find(ue=>ue.id===Ut&&ue.previewUrl),z=Ae(Vt==null?void 0:Vt.previewUrl);if(z)return z}return null},kt=qe=>{for(const Ut of u)if(!(!Ut.previewUrl||Ne.has(Ut.previewUrl))&&!(qe&&!Ut.brief.tokens.some(Vt=>Vt.t===qe)))return Ae(Ut.previewUrl);return null},Qt=Z.find(qe=>{var Ut,Vt;return _n((Vt=(Ut=qe==null?void 0:qe.shots)==null?void 0:Ut[0])==null?void 0:Vt.file)});return{compose:Ae(Qt?_n((Ot=(Jt=Qt.shots)==null?void 0:Jt[0])==null?void 0:Ot.file):null)??Ee(["aurelia-serum-succulent-dew","verity-pearls-suspended-silk","solstice-aviators-screen-print"])??Ae((xn=c.find(qe=>qe.id==="aurelia-amber-serum"))==null?void 0:xn.previewUrl)??Ae((Rn=c.find(qe=>qe.previewUrl))==null?void 0:Rn.previewUrl)??kt("product"),product:Ee(["voss-rowe-runner-volcanic-ash","birchwood-salt-flat","voss-rowe-dune-slip-face"])??Ae((Wn=c.find(qe=>qe.id==="voss-rowe-trail-runner"))==null?void 0:Wn.previewUrl)??kt("product"),presenter:Ae((Pn=s.find(qe=>qe.id==="maren"))==null?void 0:Pn.avatarUrl)??Ae((Zt=s.find(qe=>qe.avatarUrl))==null?void 0:Zt.avatarUrl)??Ae((tt=s.find(qe=>qe.previewUrl))==null?void 0:tt.previewUrl)??kt("character"),scene:at(["furniture-travertine-atrium","wide-establishing-environment","studio-soft-horizon","studio-volcanic-ash-field","furniture-lamplight-hours"])??Ee(["moss-larkin-chair-travertine-atrium","calder-snow-loft","basalt-snells-window"])??kt("template")}},[t,s,Z,c,u]);return o.jsxs(dr,{children:[o.jsxs("main",{className:"sc-main",id:"main","data-no-dock":M||void 0,children:[o.jsxs("h1",{className:"sc-greet",children:["Compose a shot ",o.jsx("em",{children:"on brand"})]}),o.jsxs("div",{className:"sc-create-grid",children:[o.jsxs("button",{type:"button",className:"sc-create-card","data-tone":"compose","data-main":"",onClick:ke,children:[o.jsx(E9,{thumbUrl:jt.compose,fallback:o.jsx(aH,{size:22,weight:"fill"})}),o.jsx("b",{children:"Create an image"})]}),o.jsx(M2,{tone:"product",title:"Add a product",count:Z.length,thumbUrl:jt.product,icon:o.jsx(Xm,{size:22,weight:"fill"}),onClick:()=>C("product")}),o.jsx(M2,{tone:"presenter",title:"Create a presenter",thumbUrl:jt.presenter,icon:o.jsx(LH,{size:22,weight:"fill"}),onClick:()=>C("presenter")}),o.jsx(M2,{tone:"scene",title:"Create a scene",thumbUrl:jt.scene,icon:o.jsx(EH,{size:22,weight:"fill"}),onClick:()=>C("scene")})]}),!h&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":W,style:X,"aria-hidden":!0,children:o.jsx(N_,{size:"grid",count:8})}),h&&m&&o.jsxs("p",{className:"sc-feed-empty",children:["Couldn't load the showcase gallery."," ",o.jsx("button",{type:"button",className:"sc-sec-more",onClick:()=>g(),children:"Retry"})]}),h&&!m&&u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(od,{filters:o.jsx(ld,{mode:"tabs",group:le}),search:u.length>=T_&&o.jsx(uu,{value:T,onChange:D,noun:"examples",total:u.length}),density:o.jsx(nd,{value:H,onChange:K})}),fe.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":W,style:X,children:fe.map(Ne=>o.jsx(v9,{entry:Ne,size:"grid",onOpen:Qe,onOpenProduct:Ae=>b(Js(v,Ae)),onOpenPresenter:Ae=>b(al(v,Ae)),onOpenScene:Ae=>b(rl(v,Ae)),...me(Ne)},Ne.id))}),fe.length===0&&(O?o.jsx(id,{noun:"examples",q:T,facet:U?w2(U):null,onClearSearch:I,onClearAll:se}):o.jsx("p",{className:"sc-looks-empty",children:"No example carries that category yet."}))]}),!i&&o.jsx("div",{className:"sc-masonry","aria-hidden":!0,children:o.jsx(x9,{size:"grid",count:8})}),i&&s.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-sec-head",children:[o.jsx("span",{className:"sc-sec-title",children:"Presenters"}),o.jsx("button",{type:"button",className:"sc-sec-more",onClick:()=>b(vc(v)),children:"Browse presenters"})]}),o.jsx("div",{className:"sc-masonry",children:s.slice(0,8).map(Ne=>o.jsx(g1,{presenter:Ne,variant:"navigate",size:"grid",onOpen:j},Ne.id))})]}),!n&&o.jsx("div",{className:"sc-masonry","aria-hidden":!0,children:o.jsx(w9,{size:"grid",count:8})}),n&&t.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sc-sec-head",children:[o.jsx("span",{className:"sc-sec-title",children:"Scenes"}),o.jsx("button",{type:"button",className:"sc-sec-more",onClick:()=>b(gc(v)),children:"Browse scenes"})]}),o.jsx("div",{className:"sc-masonry",children:lt.map(Ne=>o.jsx($c,{scene:Ne,variant:"navigate",size:"grid",onOpen:k},Ne.id))})]})]}),!M&&o.jsx(g9,{children:o.jsx(bp,{projectId:(y==null?void 0:y.id)||null,brand:v,engines:e,parent:ye,shots:w,initialBrief:J,onQueued:()=>b(ur(v))})})]})}function M2({tone:e,title:t,icon:n,count:s,thumbUrl:i,onClick:c}){return o.jsxs("button",{type:"button",className:"sc-create-card","data-tone":e,onClick:c,children:[o.jsx(E9,{thumbUrl:i,fallback:n}),o.jsxs("b",{children:[t,s?o.jsx(Ex,{variant:"soft",radius:"full",size:"1",children:s}):null]})]})}function E9({thumbUrl:e,fallback:t}){return o.jsx("span",{className:"sc-glyph","data-photo":e?"":void 0,"aria-hidden":!0,children:e?o.jsx("span",{className:"sc-glyph-shot",children:o.jsx("img",{src:e,alt:"",loading:"lazy"})}):t})}function C9({build:e,onCancel:t,onRetry:n,onDismiss:s}){const i=e.stage==="failed",c=e.steps>0?Math.round(e.step/e.steps*100):0,u=i?oo(e.error):null,f=u?u.title:e.message??"Starting",h=[...e.warnings,...e.coverage];return o.jsxs("div",{className:"sc-lookcard","data-variant":"plain","data-size":"grid","data-build":!0,"data-building":!i||void 0,children:[o.jsxs("div",{className:"sc-lookcard-media",children:[e.previewHash?o.jsx("img",{src:rn(e.previewHash),alt:""}):o.jsx("span",{className:"sc-lookcard-blank",children:i?null:o.jsx(ln,{})}),!i&&o.jsx("span",{className:"sc-buildbar","aria-hidden":!0,children:o.jsx("span",{style:{width:`${Math.max(6,c)}%`}})}),!i&&t&&o.jsx("button",{type:"button",className:"sc-cardpuck","aria-label":`Stop building ${e.name}`,onClick:()=>t(e.id),children:o.jsx(Mn,{size:13})}),i&&s&&o.jsx("button",{type:"button",className:"sc-cardpuck","aria-label":`Dismiss ${e.name}`,onClick:()=>s(e.id),children:o.jsx(Mn,{size:13})}),i&&n&&o.jsxs("button",{type:"button",className:"sc-lookcard-use",onClick:()=>n(e),children:[o.jsx(Gm,{size:12})," Try again"]})]}),o.jsxs("span",{className:"sc-lookcard-cap",title:(u==null?void 0:u.raw)||f,children:[o.jsx("b",{dir:"auto",children:e.name}),o.jsx("span",{children:f})]}),h.length>0&&o.jsx("ul",{className:"sc-buildnotes",children:h.slice(0,2).map(m=>o.jsx("li",{children:m},m))})]})}function Ep({label:e}){return o.jsx("div",{className:"sc-starter-rule",children:o.jsx("span",{children:e})})}const R2=60;function Cp(e,t){const[n,s]=r.useState(R2);r.useEffect(()=>{s(R2)},[t]);const{visible:i,remaining:c}=o9(e,n);return{visible:i,remaining:c,showMore:()=>s(f=>f+R2)}}const D_=8,P2="__bookmarked";function $_(){const{scenes:e,collections:t,verticals:n,loaded:s,error:i,refetch:c}=pn(),{brand:u}=It(),f=an(),[h,m]=r.useState(()=>Za(u.id)),g=Ee=>m(Ww(u.id,Ee)),v=gp(),{builds:y,poke:w}=sl(),E=ol(),C=r.useMemo(()=>su(u),[u]),b=y.filter(Ee=>Ee.kind==="scene"&&(!Ee.finished||Ee.stage==="failed")),{q:N,setQ:j,facets:k,setFacets:A,clearSearch:M,clear:T}=du(["vertical","bookmarked"]),D=k.vertical,L=k.bookmarked==="1",Y=N.trim().length>0,[I,se]=Ia(cr.wallDensity,zo),U=ll(I),te=Ee=>se(Ee),O=rd(U),ne=ou(U),Q=Ee=>f(rl(u,Ee)),H=r.useMemo(()=>L?e.filter(Ee=>h.includes(Ee.id)):D?e.filter(Ee=>Ee.verticals.includes(D)):e,[e,D,L,h]),X=!(C.length>0||b.length>0),W=e.reduce((Ee,at)=>Ee+(h.includes(at.id)?1:0),0),P=L&&W===0,Z=P&&X,ae=P&&!X,G=Y||L&&!Z,fe=r.useMemo(()=>Z?e:H,[Z,e,H]),le=r.useMemo(()=>fe.filter(Ee=>xa(d1(Ee),N)),[fe,N]),{visible:me,remaining:J,showMore:ge}=Cp(le,`${D??""}|${L?"bookmarked":""}|${Z?"browse":""}|${N}`),He=Ee=>[...C,...e].filter(at=>!at.verticals.length||at.verticals.includes(Ee)).length,Qe=[{value:P2,label:"Bookmarks",count:W},...n.map(Ee=>({value:Ee,label:Ee,count:He(Ee)}))],ye=e.length>0?"tabs":"none",ke={key:"vertical",label:"Vertical",everyLabel:"Every scene",everyCount:e.length+C.length,selected:L?P2:D,onSelect:Ee=>A(Ee===P2?{bookmarked:"1",vertical:null}:{bookmarked:null,vertical:Ee}),options:Qe},lt=r.useMemo(()=>C.filter(Ee=>D?!Ee.verticals.length||Ee.verticals.includes(D):!0).filter(Ee=>xa(d1(Ee),N)),[C,D,N]),jt=!L&&(b.length>0||lt.length>0),Pt=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>E("scene"),children:[o.jsx(tr,{size:12})," Create scene"]}),Ne=(Ee,at=!1)=>o.jsx("div",{className:"sc-masonry","data-wall":at||void 0,"data-density":!0,"data-density-size":ne,style:O,children:Ee.map(kt=>o.jsx($c,{scene:kt,variant:"use",size:"grid",onOpen:Q,onUse:v,bookmarked:h.includes(kt.id),onBookmark:g},kt.id))}),Ae=o.jsx(od,{title:"Scenes",filters:o.jsx(ld,{mode:ye,group:ke}),density:o.jsx(nd,{value:U,onChange:te}),search:e.length>=D_&&o.jsx(uu,{value:N,onChange:j,noun:"scenes",total:e.length}),action:X?void 0:Pt});return o.jsx(dr,{children:o.jsxs("main",{className:"sc-looks sc-scenes",id:"main","data-hero":X||void 0,children:[!X&&Ae,jt&&o.jsxs("section",{className:"sc-owned",children:[o.jsx("div",{className:"sc-sec-head",children:o.jsx("h2",{className:"sc-sec-title",children:"Your scenes"})}),o.jsxs("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":ne,style:O,children:[b.map(Ee=>o.jsx(C9,{build:Ee,onCancel:at=>void Ce.cancelAssetBuild(u.id,at).then(w),onDismiss:at=>void Ce.deleteAssetBuild(u.id,at).then(w),onRetry:()=>E("scene")},Ee.id)),lt.map(Ee=>o.jsx($c,{scene:Ee,variant:"use",size:"grid",onOpen:Q,onUse:v},Ee.id))]})]}),X&&s&&!i&&e.length>0&&o.jsx(Ks,{shape:"cold",title:o.jsxs(o.Fragment,{children:["Build your own ",o.jsx("em",{children:"scene"})]}),body:"Upload a few references of a place, and its light and materials carry into every image you make.",action:Pt}),jt&&s&&!i&&!L&&H.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri scenes"})}),X&&s&&!i&&e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Ep,{label:"Or start from one of ours"}),Ae]}),!s&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":ne,style:O,"aria-hidden":!0,children:o.jsx(w9,{size:"grid",count:8})}),s&&i&&o.jsx(Ks,{shape:"error",title:"Couldn't load this library",body:"Something went wrong reaching the catalog.",onRetry:()=>c()}),s&&!i&&!G&&t.map(Ee=>{const at=fe.filter(kt=>kt.collections.includes(Ee));return at.length?o.jsxs("section",{className:"sc-coll",children:[o.jsx("h2",{children:Ee}),Ne(at)]},Ee):null}),s&&!i&&G&&me.length>0&&Ne(me,!0),s&&!i&&ae&&o.jsx(Ks,{shape:"zero",body:"Nothing bookmarked yet. Bookmark a scene from its card and it stays here.",action:o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>A({bookmarked:null}),children:"Browse every scene"})}),s&&!i&&e.length>0&&!ae&&le.length===0&<.length===0&&o.jsx(id,{noun:"scenes",q:N,facet:Z?null:L?"Bookmarks":D,onClearSearch:M,onClearAll:T}),G&&J>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:ge,children:["Show ",Math.min(J,60)," more"]})})]})})}function v1({src:e}){const[t,n]=r.useState(!1);return o.jsx("div",{className:"sc-lookpage-ref",children:t?o.jsx("span",{className:"sc-lookpage-ref-blank",children:o.jsx(Wa,{size:20})}):o.jsx("img",{src:e,alt:"",loading:"lazy",onError:()=>n(!0)})})}function S9(){return o.jsx("div",{className:"sc-lookpage-refs",children:o.jsx("div",{className:"sc-lookpage-ref",children:o.jsx("span",{className:"sc-lookpage-ref-blank",children:o.jsx(Wa,{size:20})})})})}function Sp({node:e,onClick:t}){const[n,s]=r.useState(!1);return o.jsx("button",{type:"button",className:"sc-lookcard","aria-label":`Open ${Cn(e)}`,onClick:t,children:n?o.jsx("span",{className:"sc-lookcard-blank",children:o.jsx(Wa,{size:20})}):o.jsx("img",{src:rn(e.images[0]),alt:"",loading:"lazy",onError:()=>s(!0)})})}function To({label:e,children:t}){const n=r.useRef(null),s=r.useRef(null),i=r.useRef(!1),c=r.useRef(()=>{});r.useLayoutEffect(()=>{const f=n.current,h=s.current;if(!f||!h)return;let m=0;const g=()=>{const w=h.scrollWidth-h.clientWidth;if(w<=1){delete f.dataset.overflowLeft,delete f.dataset.overflowRight;return}h.scrollLeft>2?f.dataset.overflowLeft="":delete f.dataset.overflowLeft,h.scrollLeft<w-2?f.dataset.overflowRight="":delete f.dataset.overflowRight};c.current=g,g();const v=()=>{m||(m=requestAnimationFrame(()=>{m=0,g()}))},y=new ResizeObserver(()=>g());return y.observe(h),h.addEventListener("scroll",v,{passive:!0}),()=>{m&&cancelAnimationFrame(m),c.current=()=>{},y.disconnect(),h.removeEventListener("scroll",v)}},[]);const u=f=>{const h=s.current;if(!(h!=null&&h.firstElementChild)||i.current)return;const m=h.firstElementChild.getBoundingClientRect().width+16,g=h.scrollWidth/2;f<0&&h.scrollLeft<m&&(h.scrollLeft+=g);const v=h.scrollLeft,y=f*m,w=performance.now();i.current=!0;const E=C=>{const b=Math.min(1,(C-w)/420);h.scrollLeft=v+y*(1-(1-b)**3),c.current(),b<1?requestAnimationFrame(E):(i.current=!1,h.scrollLeft>=g&&(h.scrollLeft-=g),c.current())};requestAnimationFrame(E)};return o.jsxs("section",{className:"sc-lookpage-band",children:[o.jsx("p",{className:"sc-bandhead",children:e}),o.jsxs("div",{className:"sc-slider",ref:n,children:[o.jsx("button",{type:"button",className:"sc-slider-arrow prev","aria-label":"Previous",onClick:()=>u(-1),children:o.jsx(wi,{size:13,weight:"bold"})}),o.jsx("button",{type:"button",className:"sc-slider-arrow next","aria-label":"Next",onClick:()=>u(1),children:o.jsx(K1,{size:13,weight:"bold"})}),o.jsxs("div",{className:"sc-slider-track",ref:s,children:[t,t]})]})]})}const F_="(max-width: 760px)";function I_(){const{sceneId:e=""}=za(),{scenes:t,loaded:n,error:s,refetch:i,applyBrand:c}=pn(),{brand:u,nodes:f}=It(),h=an(),m=gp(),g=u.id,[v,y]=r.useState([]),[w,E]=r.useState(()=>Za(g)),[C,b]=Os("all"),N=C==="1",k=lo(F_)?4:3,A=ye=>h(rl(u,ye)),M=RD(u,e),T=M??t.find(ye=>ye.id===e);r.useEffect(()=>{let ye=!0;if(y([]),!M)return Ce.sceneFrames(e).then(ke=>{ye&&y(ke.frames)}).catch(()=>{ye&&y([])}),()=>{ye=!1}},[e,M]);const D=r.useMemo(()=>f.filter(ye=>{var ke;return ye.status==="done"&&ye.images.length>0&&(((ke=ye.brief)==null?void 0:ke.tokens)??[]).some(lt=>(lt==null?void 0:lt.t)==="template"&<.id===e)}).slice(-12).reverse(),[f,e]),L=r.useMemo(()=>{if(!T)return[];return t.filter(lt=>lt.id!==T.id).sort((lt,jt)=>ke(jt)-ke(lt)).slice(0,8);function ke(lt){const jt=lt.lighting.split(/[ ,]+/).some(Ne=>Ne.length>3&&T.lighting.toLowerCase().includes(Ne.toLowerCase())),Pt=lt.collections.some(Ne=>T.collections.includes(Ne));return(jt?2:0)+(Pt?1:0)}},[t,T]),Y=r.useMemo(()=>{if(T||!n||s)return[];const ye=Za(g);return l9(t,ke=>ye.includes(ke.id)).slice(0,6)},[T,n,s,t,g]),[I,se]=r.useState((M==null?void 0:M.name)??""),[U,te]=r.useState((M==null?void 0:M.description)??""),[O,ne]=r.useState((M==null?void 0:M.lighting)??""),[Q,H]=r.useState((M==null?void 0:M.prompt)??""),[K,X]=r.useState(null),[W,P]=r.useState(!1),[Z,ae]=r.useState(!1),G=r.useRef(void 0);r.useEffect(()=>{se((M==null?void 0:M.name)??""),te((M==null?void 0:M.description)??""),ne((M==null?void 0:M.lighting)??""),H((M==null?void 0:M.prompt)??"")},[M==null?void 0:M.id]);const fe=ye=>{M&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{Ce.updateScene(u.id,M.id,ye).then(ke=>{c(ke.brand),X(ke.warnings[0]??null)}).catch(ke=>X(String(ke.message??ke)))},500))},le=async()=>{if(M){P(!0),X(null);try{c((await Ce.generateScenePreview(u.id,M.id)).brand)}catch(ye){X(String(ye.message??ye))}finally{P(!1)}}},me=async()=>{if(M){ae(!0);try{await Ce.deleteScene(u.id,M.id),h(gc(u))}catch(ye){X(String(ye.message??ye)),ae(!1)}}};if(!n&&!M)return o.jsx(dr,{children:o.jsx("main",{className:"sc-lookpage",id:"main",children:o.jsx("div",{className:"sc-tplrow","aria-hidden":!0})})});if(s&&!M)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"Couldn't load this scene"}),o.jsx("p",{className:"sc-lookpage-lede",children:"Something went wrong reaching the catalog."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>i(),children:"Retry"})})]})});if(!T)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"This scene isn't here anymore"}),o.jsx("p",{className:"sc-lookpage-lede",children:"It may have been removed from the catalog, or the link is out of date."}),o.jsxs("div",{className:"sc-lookpage-acts",children:[o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>h(`${ur(u)}?compose=1`),children:"Start from scratch"}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>h(gc(u)),children:"Browse all scenes"})]}),Y.length>0&&o.jsx(To,{label:"You might like",children:Y.map(ye=>o.jsx($c,{scene:ye,variant:"navigate",size:"slider",onOpen:A},ye.id))})]})});const J=N?v:v.slice(0,k),ge=M?M.previewUrl?[M.previewUrl]:[]:v.length?J:T.previewUrl?[T.previewUrl]:[],He=!M&&T.subject!=="person"&&ge.length>0,Qe=w.includes(T.id);return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsxs("div",{className:"sc-lookpage-crumb",children:[o.jsx("button",{type:"button",onClick:()=>h(gc(u)),children:"Scenes"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:M?"Yours":T.collections[0]})]}),M?o.jsx(Kl,{className:"sc-ownededit-title",value:I,"aria-label":"Scene name",onChange:ye=>{se(ye.target.value),fe({name:ye.target.value})}}):o.jsx("h1",{children:T.name}),M?o.jsx(Kl,{className:"sc-ownededit-lede",value:U,placeholder:"One sentence for the card","aria-label":"Description",onChange:ye=>{te(ye.target.value),fe({description:ye.target.value})}}):o.jsx("p",{className:"sc-lookpage-lede",children:T.description}),o.jsxs("p",{className:"sc-lookpage-facts",children:[T.lighting," · ",T.subject==="either"?"product or person":`for a ${T.subject}`," ·"," ",T.width===T.height?"square by default":`${T.width}×${T.height} by default`]}),o.jsxs("div",{className:"sc-lookpage-acts",children:[o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>void m(T.id),children:"Use in a shot"}),!M&&o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost","aria-pressed":Qe,onClick:()=>E(Ww(g,T.id)),children:[o.jsx(G1,{size:13,weight:Qe?"fill":"regular"}),o.jsx("span",{children:Qe?"Bookmarked":"Bookmark"})]}),M&&o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:W,onClick:()=>void le(),children:[W?o.jsx(ln,{size:"1"}):o.jsx(Gm,{size:13}),o.jsx("span",{children:M.previewUrl?"Redraw the example":"Draw an example"})]})]}),K&&o.jsx("p",{className:"sc-assetform-err",children:K}),ge.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:ge.map(ye=>o.jsx(v1,{src:ye},ye))}),He&&o.jsx("p",{className:"sc-lookpage-note",children:"Shown with a demo product for reference. Yours replaces it."}),M&&o.jsx("p",{className:"sc-lookpage-note",children:"The place with nothing staged in it. Whatever you attach to a shot goes here."}),!M&&v.length>k&&o.jsx("button",{type:"button",className:"sc-lookpage-expand",onClick:()=>b(N?null:"1"),children:N?"Enough, close it":"See the whole set"})]}):o.jsx(S9,{}),M&&o.jsxs("div",{className:"sc-ownedbits",children:[M.refs.length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"Your references"}),o.jsx("p",{className:"sc-ownedbits-note",children:"What this scene was read from. Kept here to look at: a scene reaches a shot as words, never as pixels, so nothing in these images can turn up in a render on its own."}),o.jsx("div",{className:"sc-lookpage-refs",children:M.refs.map(ye=>o.jsx(v1,{src:ye},ye))})]}),o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"The place itself"}),o.jsx("p",{className:"sc-ownedbits-note",children:"Sent with every shot built here. Describe the world, not what stands in it."}),o.jsx(Wm,{value:Q,rows:5,onChange:ye=>{H(ye.target.value),fe({prompt:ye.target.value})}}),o.jsx(Kl,{mt:"2",value:O,placeholder:"The light, in a short phrase","aria-label":"Lighting",onChange:ye=>{ne(ye.target.value),fe({lighting:ye.target.value})}}),M.instruction&&o.jsxs("p",{className:"sc-ownedbits-note",children:["You asked for: ",M.instruction]})]}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(is,{label:"Delete scene",title:`Delete ${M.name}?`,body:"Shots already made here keep their images and their recipe. Only future shots lose it.",busy:Z,onConfirm:()=>void me()})})]}),D.length>0&&o.jsx(To,{label:"Your shots in this scene",children:D.map(ye=>o.jsx(Sp,{node:ye,onClick:()=>h(q1(u,null,ye.id))},ye.id))}),L.length>0&&o.jsx(To,{label:"Other scenes, similar light",children:L.map(ye=>o.jsx($c,{scene:ye,variant:"navigate",size:"slider",onOpen:A},ye.id))})]})})}const __=8;function O_(){const{presenters:e,presenterCategories:t,presentersLoaded:n,presentersError:s,refetchPresenters:i}=pn(),{brand:c}=It(),u=an(),f=pp(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=du(["category"]),E=g.category,{builds:C,poke:b}=sl(),N=ol(),j=r.useMemo(()=>J1(c),[c]),k=C.filter(G=>G.kind==="presenter"&&(!G.finished||G.stage==="failed")),[A,M]=Ia(cr.wallDensity,zo),T=ll(A),D=G=>M(G),L=rd(T),Y=ou(T),I=G=>u(al(c,G)),se=r.useMemo(()=>E?e.filter(G=>G.suitableCategories.includes(E)):e,[e,E]),U=r.useMemo(()=>se.filter(G=>xa(f1(G),h)),[se,h]),{visible:te,remaining:O,showMore:ne}=Cp(U,`${E??""}|${h}`),Q=s9(t.length),H=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>N("presenter"),children:[o.jsx(tr,{size:12})," Create presenter"]}),K=r.useMemo(()=>j.filter(G=>E?!G.suitableCategories.length||G.suitableCategories.includes(E):!0).filter(G=>xa(f1(G),h)),[j,E,h]),X=j.length>0||k.length>0,W=k.length>0||K.length>0,P=!X,Z={key:"category",label:"Category",everyLabel:"Every presenter",everyCount:e.length+j.length,selected:E,onSelect:G=>v("category",G),options:t.map(G=>({value:G,label:G,count:[...j,...e].filter(fe=>!fe.suitableCategories.length||fe.suitableCategories.includes(G)).length}))},ae=o.jsx(od,{title:"Presenters",filters:o.jsx(ld,{mode:Q,group:Z}),density:o.jsx(nd,{value:T,onChange:D}),search:e.length>=__&&o.jsx(uu,{value:h,onChange:m,noun:"presenters",total:e.length}),action:P?void 0:H});return o.jsx(dr,{children:o.jsxs("main",{className:"sc-looks sc-presenters",id:"main","data-hero":P||void 0,children:[!P&&ae,W&&o.jsxs("section",{className:"sc-owned",children:[o.jsx("div",{className:"sc-sec-head",children:o.jsx("h2",{className:"sc-sec-title",children:"Your presenters"})}),o.jsxs("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":Y,style:L,children:[k.map(G=>o.jsx(C9,{build:G,onCancel:fe=>void Ce.cancelAssetBuild(c.id,fe).then(b),onDismiss:fe=>void Ce.deleteAssetBuild(c.id,fe).then(b),onRetry:()=>N("presenter")},G.id)),K.map(G=>o.jsx(g1,{presenter:G,variant:"use",size:"grid",onOpen:I,onUse:f},G.id))]})]}),P&&n&&!s&&e.length>0&&o.jsx(Ks,{shape:"cold",title:o.jsxs(o.Fragment,{children:["Cast your own ",o.jsx("em",{children:"presenter"})]}),body:"Upload a few photos of one person, and they stay the same person in every image you make.",action:H}),W&&n&&!s&&te.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri presenters"})}),!n&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":Y,style:L,"aria-hidden":!0,children:o.jsx(x9,{size:"grid",count:8})}),n&&s&&o.jsx(Ks,{shape:"error",title:"Couldn't load the presenter library",body:"Something went wrong reaching the catalog.",onRetry:()=>i()}),P&&n&&!s&&e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Ep,{label:"Or cast someone from ours"}),ae]}),n&&!s&&te.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":Y,style:L,children:te.map(G=>o.jsx(g1,{presenter:G,variant:"use",size:"grid",onOpen:I,onUse:f},G.id))}),n&&!s&&!U.length&&e.length>0&&o.jsx(id,{noun:"presenters",q:h,facet:E,onClearSearch:y,onClearAll:w}),n&&!s&&!e.length&&o.jsx(Ks,{shape:"zero",body:"The presenter library is still being cast. Check back soon."}),O>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:ne,children:["Show ",Math.min(O,60)," more"]})})]})})}const Qg=4;function Z_(){var ae;const{presenterId:e=""}=za(),{presenters:t,presentersLoaded:n,presentersError:s,refetchPresenters:i,applyBrand:c}=pn(),{brand:u,nodes:f}=It(),h=an(),m=pp(),[g,v]=r.useState([]),[y,w]=Os("all"),E=y==="1",C=AD(u,e),b=C??t.find(G=>G.id===e);r.useEffect(()=>{let G=!0;if(v([]),!C)return Ce.presenterFrames(e).then(fe=>{G&&v(fe.frames)}).catch(()=>{G&&v([])}),()=>{G=!1}},[e,C]);const j=(((ae=u.json)==null?void 0:ae.characters)??[]).find(G=>G.presenterId===e),k=r.useMemo(()=>f.filter(G=>{var fe;return G.status==="done"&&G.images.length>0&&(((fe=G.brief)==null?void 0:fe.tokens)??[]).some(le=>(le==null?void 0:le.t)==="character"&&(le.id===e||le.id===(j==null?void 0:j.id)))}).slice(-12).reverse(),[f,e,j]),[A,M]=r.useState((C==null?void 0:C.name)??""),[T,D]=r.useState((C==null?void 0:C.descriptor)??""),[L,Y]=r.useState((C==null?void 0:C.identityNotes)??""),[I,se]=r.useState(null),[U,te]=r.useState(!1),O=r.useRef(void 0);r.useEffect(()=>{M((C==null?void 0:C.name)??""),D((C==null?void 0:C.descriptor)??""),Y((C==null?void 0:C.identityNotes)??"")},[C==null?void 0:C.id]);const ne=G=>{C&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{Ce.updatePresenter(u.id,C.id,G).then(fe=>c(fe.brand)).catch(fe=>se(String(fe.message??fe)))},500))},Q=async()=>{if(C){te(!0);try{await Ce.deletePresenter(u.id,C.id),h(vc(u))}catch(G){se(String(G.message??G)),te(!1)}}};if(!n&&!C)return o.jsx(dr,{children:o.jsx("main",{className:"sc-lookpage",id:"main",children:o.jsx("div",{className:"sc-tplrow","aria-hidden":!0})})});if(s&&!C)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"Couldn't load this presenter"}),o.jsx("p",{className:"sc-lookpage-lede",children:"Something went wrong reaching the catalog."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>i(),children:"Retry"})})]})});if(!b)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"This presenter isn't here anymore"}),o.jsx("p",{className:"sc-lookpage-lede",children:"They may have been removed from the catalog, or the link is out of date."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>h(vc(u)),children:"Browse presenters"})})]})});const H=(C==null?void 0:C.shots)??[],K=E?g:g.slice(0,Qg),X=C?H:g.length?K:b.previewUrl?[b.previewUrl]:[],W=t.filter(G=>G.id!==b.id).slice(0,8),P=!!b.avatarUrl,Z=b.avatarUrl??b.previewUrl??g[0]??null;return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage sc-presenterpage",id:"main",children:[o.jsxs("div",{className:"sc-lookpage-crumb",children:[o.jsx("button",{type:"button",onClick:()=>h(vc(u)),children:"Presenters"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:C?"Yours":b.suitableStyles[0]??b.presentation})]}),Z?o.jsx("div",{className:"sc-presenterpage-avatar","data-avatar":P||void 0,"aria-hidden":!0,children:o.jsx("img",{src:Z,alt:""})}):null,C?o.jsx(Kl,{className:"sc-ownededit-title",value:A,"aria-label":"Their name",onChange:G=>{M(G.target.value),ne({name:G.target.value})}}):o.jsx("h1",{children:b.name}),C?o.jsx(Kl,{className:"sc-ownededit-lede",value:T,placeholder:"A short caption for the card","aria-label":"Caption",onChange:G=>{D(G.target.value),ne({descriptor:G.target.value})}}):o.jsx("p",{className:"sc-lookpage-lede",children:b.descriptor}),o.jsx("p",{className:"sc-lookpage-facts",children:[b.ageRange,b.hair,b.suitableCategories.join(", ")].filter(Boolean).join(" · ")}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>m(e),children:"Use in a shot"})}),I&&o.jsx("p",{className:"sc-assetform-err",children:I}),X.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:X.map((G,fe)=>o.jsxs("div",{className:"sc-ownedref","data-engine":C&&fe<2?"":void 0,children:[o.jsx(v1,{src:G}),C&&fe<2&&o.jsx("span",{className:"sc-ownedref-tag",children:"Used in shots"})]},G))}),!C&&g.length>Qg&&o.jsx("button",{type:"button",className:"sc-lookpage-expand",onClick:()=>w(E?null:"1"),children:E?"Enough, close it":"See the whole set"})]}):o.jsx(S9,{}),C&&o.jsxs("div",{className:"sc-ownedbits",children:[C.sourceRefs.length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"Your photos"}),o.jsx("p",{className:"sc-ownedbits-note",children:"What this presenter was built from. Kept as they arrived, and never replaced by anything generated."}),o.jsx("div",{className:"sc-lookpage-refs",children:C.sourceRefs.map(G=>o.jsx(v1,{src:G},G))})]}),o.jsxs("section",{children:[o.jsx("p",{className:"sc-bandhead",children:"What must stay the same"}),o.jsx("p",{className:"sc-ownedbits-note",children:"Sent with every shot they appear in."}),o.jsx(Wm,{value:L,rows:3,placeholder:"For example: the wide-set eyes and the small scar above the left brow must survive every generation.",onChange:G=>{Y(G.target.value),ne({identityNotes:G.target.value})}}),C.negativeConstraints.length>0&&o.jsx("ul",{className:"sc-ownedbits-list",children:C.negativeConstraints.map(G=>o.jsx("li",{children:G},G))})]}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(is,{label:"Delete presenter",title:`Delete ${C.name}?`,body:"Shots already made with them keep their images and their recipe. Only future shots lose them.",busy:U,onConfirm:()=>void Q()})})]}),k.length>0&&o.jsx(To,{label:`Shots featuring ${b.name}`,children:k.map(G=>o.jsx(Sp,{node:G,onClick:()=>h(q1(u,null,G.id))},G.id))}),W.length>0&&o.jsx(To,{label:"Other presenters",children:W.map(G=>o.jsx(g1,{presenter:G,variant:"navigate",size:"slider",onOpen:fe=>h(al(u,fe))},G.id))})]})})}function j9(){const{brand:e}=It(),t=an(),n=ur(e);return r.useCallback(s=>{t(`${n}?product=${encodeURIComponent(s)}&compose=1`)},[n,t])}function k9({product:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){var m,g;const f=si(e.category),h=f&&e.variant?`${f} · ${e.variant}`:f??e.variant??"";return o.jsx(cu,{id:e.id,previewUrl:_n((g=(m=e.shots)==null?void 0:m[0])==null?void 0:g.file),title:Oa(e,"tooltip"),primary:Oa(e,"card"),secondary:h,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u})}function V_(e){return o.jsx(sd,{...e})}function N9({product:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){const f=si(e.category)??e.category;return o.jsx(cu,{id:e.id,previewUrl:e.previewUrl,title:`${Oa(e,"tooltip")} · ${f}`,primary:Oa(e,"card"),secondary:f,useLabel:"Use in a shot",variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u})}const z_=8;function B_(){const{brand:e,products:t,productsLoaded:n}=It(),{demoProducts:s}=pn(),i=n&&t.length===0,c=an(),u=j9(),f=ol(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=du(["category"]),E=g.category,[C,b]=Ia(cr.wallDensity,zo),N=ll(C),j=ae=>b(ae),k=rd(N),A=ou(N),M=r.useMemo(()=>t.map(ae=>({product:ae,category:cp(ae),own:!0})),[t]),T=r.useMemo(()=>s.map(ae=>({product:ae,category:ae.category,own:!1})),[s]),D=r.useMemo(()=>[...M,...T],[M,T]),L=r.useMemo(()=>{const ae=new Map;for(const{category:G}of D)G&&ae.set(G,(ae.get(G)??0)+1);return ae},[D]),Y=r.useMemo(()=>Hc.filter(ae=>L.has(ae.key)),[L]),I=s9(Y.length),se=ae=>c(Js(e,ae)),U=r.useCallback(ae=>ae.filter(({category:G})=>!E||G===E).filter(({product:G,category:fe})=>xa([mp(G),si(fe)].filter(Boolean).join(" "),h)).map(({product:G})=>G),[E,h]),te=r.useMemo(()=>U(M),[U,M]),O=r.useMemo(()=>U(T),[U,T]),{visible:ne,remaining:Q,showMore:H}=Cp(te,`${E??""}|${h}`),K={key:"category",label:"Category",everyLabel:"Every product",everyCount:D.length,selected:E,onSelect:ae=>v("category",ae),options:Y.map(ae=>({value:ae.key,label:ae.label,count:L.get(ae.key)??0}))},X=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>f("product"),children:[o.jsx(tr,{size:12})," Add product"]}),W=i,P=t.length>0,Z=o.jsx(od,{title:"Products",filters:o.jsx(ld,{mode:I,group:K}),density:o.jsx(nd,{value:N,onChange:j}),search:D.length>=z_&&o.jsx(uu,{value:h,onChange:m,noun:"products",total:D.length}),action:W?void 0:X});return o.jsx(dr,{children:o.jsxs("main",{className:"sc-looks sc-products",id:"main","data-hero":W||void 0,children:[!W&&Z,!n&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":A,style:k,"aria-hidden":!0,children:o.jsx(V_,{size:"grid",count:8})}),P&&ne.length>0&&o.jsxs("section",{className:"sc-owned",children:[o.jsx("div",{className:"sc-sec-head",children:o.jsx("h2",{className:"sc-sec-title",children:"Your products"})}),o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":A,style:k,children:ne.map(ae=>o.jsx(k9,{product:ae,variant:"use",size:"grid",onOpen:se,onUse:u},ae.id))}),Q>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:H,children:["Show ",Math.min(Q,60)," more"]})})]}),W&&o.jsx(Ks,{shape:"cold",title:o.jsxs(o.Fragment,{children:["Bring in a ",o.jsx("em",{children:"product"})]}),body:"Upload a few clean shots, or import your store, and it stays exact in every image you make.",action:X}),P&&ne.length>0&&O.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri products"})}),W&&T.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Ep,{label:"Or borrow one of ours"}),Z]}),O.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":A,style:k,children:O.map(ae=>o.jsx(N9,{product:ae,variant:"use",size:"grid",onUse:u,onOpen:se},ae.id))}),n&&te.length===0&&O.length===0&&o.jsx(id,{noun:"products",q:h,facet:E?si(E):null,onClearSearch:y,onClearAll:w})]})})}function U_({value:e,onChange:t}){const n=si(e)??"Other",s=e&&Hc.some(i=>i.key===e)?e:"other";return o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost sc-catpick","aria-label":`Category: ${n}`,children:[n,o.jsx(ai,{size:11,weight:"bold"})]})}),o.jsx(Zo,{align:"center",sideOffset:8,children:o.jsx(a1,{value:s,children:Hc.map(i=>o.jsx(Vl,{value:i.key,onSelect:()=>t(i.key),children:i.label},i.key))})})]})}function W_(e){const t=r.useRef(null),n=r.useRef(null);r.useLayoutEffect(()=>{const i=t.current,c=n.current;if(!i||!c)return;let u=0;const f=()=>{const g=c.scrollWidth-c.clientWidth;if(g<=1){delete i.dataset.overflowLeft,delete i.dataset.overflowRight;return}c.scrollLeft>2?i.dataset.overflowLeft="":delete i.dataset.overflowLeft,c.scrollLeft<g-2?i.dataset.overflowRight="":delete i.dataset.overflowRight},h=()=>{u||(u=requestAnimationFrame(()=>{u=0,f()}))};f();const m=new ResizeObserver(()=>f());m.observe(c);for(const g of c.children)m.observe(g);return c.addEventListener("scroll",h,{passive:!0}),()=>{u&&cancelAnimationFrame(u),m.disconnect(),c.removeEventListener("scroll",h)}},[e]);const s=r.useCallback(i=>{const c=n.current;if(!(c!=null&&c.firstElementChild))return;const u=c.firstElementChild.getBoundingClientRect().width,f=Number.parseFloat(getComputedStyle(c).columnGap)||0,h=window.matchMedia("(prefers-reduced-motion: reduce)").matches;c.scrollBy({left:i*(u+f),behavior:h?"auto":"smooth"})},[]);return{shellRef:t,railRef:n,page:s}}function G_({refs:e,cap:t,note:n,addLabel:s,busy:i,onAdd:c,onPromote:u,onRemove:f}){const[h,m]=r.useState(null),g=r.useMemo(()=>e.find(A=>A.file===h)??e[0],[e,h]);r.useEffect(()=>{var A;e.length&&!e.some(M=>M.file===h)&&m(((A=e[0])==null?void 0:A.file)??null)},[e,h]);const v=g?e.findIndex(A=>A.file===g.file):-1,y=!!u&&v>0,w=!!f&&!!g&&e.length>1,E=!!(s&&c&&e.length>0),C=e.length>1||E,{shellRef:b,railRef:N,page:j}=W_(e.length),k=A=>{const M=A==null?void 0:A[0];M&&(c==null||c(M))};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-refstage",children:g?o.jsx("div",{className:"sc-refstage-frame",children:o.jsx("img",{src:g.url,alt:""})}):c?o.jsxs("label",{className:"sc-refstage-blank sc-refstage-drop","data-busy":i||void 0,onDragOver:A=>{A.preventDefault(),A.dataTransfer.dropEffect="copy"},onDrop:A=>{A.preventDefault(),k(A.dataTransfer.files)},children:[o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:i,onChange:A=>{k(A.target.files),A.target.value=""}}),i?o.jsx(ln,{size:"2"}):o.jsx(tr,{size:22,weight:"bold"}),o.jsx("span",{children:"Add a reference"})]}):o.jsx("span",{className:"sc-refstage-blank",children:o.jsx(Wa,{size:22})})}),C&&o.jsxs("div",{className:"sc-refrail-shell",ref:b,children:[o.jsxs("div",{className:"sc-refrail-track",children:[o.jsx("button",{type:"button",className:"sc-refrail-arrow prev","aria-label":"Previous references",onClick:()=>j(-1),children:o.jsx(wi,{size:13,weight:"bold"})}),o.jsx("button",{type:"button",className:"sc-refrail-arrow next","aria-label":"Next references",onClick:()=>j(1),children:o.jsx(K1,{size:13,weight:"bold"})}),o.jsx("div",{className:"sc-refrail",ref:N,children:e.map((A,M)=>o.jsx("button",{type:"button",className:"sc-refrail-item","data-on":(g==null?void 0:g.file)===A.file?"":void 0,"data-spare":M>=t?"":void 0,"aria-label":`Reference ${M+1}`,"aria-pressed":(g==null?void 0:g.file)===A.file,onClick:()=>m(A.file),children:o.jsx("img",{src:A.url,alt:"",loading:"lazy"})},A.file))})]}),E&&o.jsxs("label",{className:"sc-refrail-item sc-refrail-add","data-busy":i||void 0,children:[o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:i,onChange:A=>{k(A.target.files),A.target.value=""}}),i?o.jsx(ln,{size:"1"}):o.jsx(tr,{size:16,weight:"bold"}),o.jsx("span",{className:"sc-vh",children:s})]})]}),(y||w)&&o.jsx("div",{className:"sc-refacts",children:o.jsxs("span",{className:"sc-refacts-pair",children:[y&&o.jsxs("button",{type:"button",className:"sc-refact sc-refact-lead",onClick:()=>u==null?void 0:u(g.file),children:[o.jsx(sH,{size:14,weight:"bold"}),"Use first"]}),w&&o.jsx("button",{type:"button",className:"sc-refact sc-refact-aside",onClick:()=>f==null?void 0:f(g.file),children:"Remove"})]})}),o.jsx("p",{className:"sc-lookpage-note",children:n})]})}const K_=3;function Y_(e){const t=e,n=(t.brand??t.vendor??"").trim();return!n||e.name.toLowerCase().startsWith(n.toLowerCase())?null:n}function q_(e){return e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\s+/g," ").trim()}function X_(e,t){if(e.length<=t)return e;const n=e.slice(0,t+1).search(/[.!?](\s|$)/);if(n>40)return e.slice(0,n+1);const s=e.lastIndexOf(" ",t);return`${e.slice(0,s>40?s:t).trimEnd()}…`}function Q_({value:e,onChange:t}){const n=r.useRef(null),s=i=>{i&&(i.style.height="auto",i.style.height=`${i.scrollHeight}px`)};return r.useEffect(()=>s(n.current),[e]),o.jsx("textarea",{ref:n,className:"sc-lookpage-titleedit",rows:1,dir:"auto","aria-label":"Product name",value:e,onChange:i=>{s(i.currentTarget),t(i.target.value)},onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),i.currentTarget.blur())}})}function J_(){const{productId:e=""}=za(),{brand:t,products:n,nodes:s,refresh:i,refreshProducts:c}=It(),{demoProducts:u,demoProductsLoaded:f}=pn(),h=an(),m=j9(),{push:g}=mr(),[v,y]=r.useState(!1),[w,E]=r.useState(!1),[C,b]=r.useState(null),N=r.useRef(null),j=n.find(J=>J.id===e),k=r.useMemo(()=>j?void 0:u.find(J=>J.id===e),[j,u,e]),[A,M]=r.useState([]);r.useEffect(()=>{if(!k){M([]);return}let J=!0;return Ce.demoProductFrames(k.id).then(ge=>{J&&M(ge.frames)}).catch(()=>{J&&M([])}),()=>{J=!1}},[k==null?void 0:k.id]);const[T,D]=r.useState((j==null?void 0:j.name)??"");r.useEffect(()=>{D((j==null?void 0:j.name)??"")},[j==null?void 0:j.id]);const L=r.useMemo(()=>s.filter(J=>{var ge;return J.status==="done"&&J.images.length>0&&(((ge=J.brief)==null?void 0:ge.tokens)??[]).some(He=>(He==null?void 0:He.t)==="product"&&He.id===e)}).slice(-12).reverse(),[s,e]),Y=((j==null?void 0:j.origin)??"manual")==="manual",I=J=>{j&&(N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{(Y?Ce.updateProduct(t.id,j.id,J):Ce.updateCatalogProduct(t.id,j.id,J)).then(()=>c()).catch(He=>b(String(He.message??He)))},500))},se=async J=>{y(!0),b(null);try{await J,await c()}catch(ge){b(String(ge.message??ge))}finally{y(!1)}},U=async()=>{if(j){E(!0),b(null);try{j.origin==="catalog"||j.id.startsWith("cat-")?await Ce.deleteCatalogProduct(t.id,j.id):await DH(t.id,j.id),await i(),h(U0(t),{replace:!0})}catch(J){b(String(J.message??J)),E(!1)}}};if(!j&&!k&&!f)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage sc-productpage",id:"main",children:[o.jsxs("div",{className:"sc-refskeleton","aria-hidden":!0,children:[o.jsx("span",{className:"sc-refskeleton-title"}),o.jsx("span",{className:"sc-refskeleton-stage"}),o.jsxs("span",{className:"sc-refskeleton-rail",children:[o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{})]})]}),o.jsx("p",{className:"sc-vh",role:"status",children:"Loading this product"})]})});if(!j&&!k)return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage",id:"main",children:[o.jsx("h1",{children:"This product isn't here anymore"}),o.jsx("p",{className:"sc-lookpage-lede",children:"It may have been removed, or the link is out of date."}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>h(U0(t)),children:"Browse products"})})]})});const te=k?"none":Y?"full":"fields",O=j??k,ne=(j==null?void 0:j.id)??k.id,Q=j?cp(j):(k==null?void 0:k.category)??null,H=Y_(O),K=J=>{const ge=_n(J.file);return ge?[{file:J.file,url:ge,angle:J.angle}]:[]},X=k?A.map(J=>({file:J.angle,url:J.url,angle:J.angle})):((j==null?void 0:j.shots)??[]).flatMap(K),W=J=>{const ge=X.map(Qe=>Qe.file),He=ge.indexOf(J)+1;se(Ce.setProductShots(t.id,ne,ge.filter(Qe=>Qe!==J))).then(()=>g({kind:"success",title:"Reference removed",detail:`Reference ${He} of ${ge.length}`,action:{label:"Undo",onClick:()=>void se(Ce.setProductShots(t.id,ne,ge))}}))},P=k?"Our reference set. Yours replaces it.":X.length===0?Y?"No reference yet.":"No reference yet. Images from your store are still arriving.":X.length===1?"One angle. A shot has to guess at every side it can't see.":X.length===2?"Two angles. A third pins the shape.":"The first three build every shot. Remove any that show a different colour or version.",Z=te==="none"?null:"Add image",ae=j!=null&&j.descriptionHtml?X_(q_(j.descriptionHtml),200):"",G=(k==null?void 0:k.description)||ae||null,fe=k?[k.subcategory]:[j==null?void 0:j.variant,j==null?void 0:j.material,j==null?void 0:j.dimensions],le=[te==="none"?si(Q):null,...fe].filter(Boolean),me=k?u.filter(J=>J.id!==ne).slice(0,8):n.filter(J=>J.id!==ne).slice(0,8);return o.jsx(dr,{children:o.jsxs("main",{className:"sc-lookpage sc-productpage",id:"main",children:[o.jsxs("div",{className:"sc-lookpage-crumb",children:[o.jsx("button",{type:"button",onClick:()=>h(U0(t)),children:"Products"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:k?"Scenri library":Y?"Yours":"From your store"})]}),H&&o.jsx("p",{className:"sc-lookpage-house",children:o.jsx("em",{className:"sc-accent",children:H})}),te==="full"?o.jsx(Q_,{value:T,onChange:J=>{D(J),I({name:J})}}):o.jsx("h1",{dir:"auto",children:O.name}),G&&o.jsx("p",{className:"sc-lookpage-lede",children:G}),le.length>0&&o.jsx("p",{className:"sc-lookpage-facts",children:le.join(" · ")}),o.jsxs("div",{className:"sc-lookpage-acts",children:[te!=="none"&&o.jsx(U_,{value:Q,onChange:J=>I({category:J})}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>m(ne),children:"Use in a shot"})]}),C&&o.jsx("p",{className:"sc-assetform-err",children:C}),o.jsx(G_,{refs:X,cap:K_,note:P,addLabel:Z,busy:v,onAdd:te==="none"?void 0:J=>void se(IH(t.id,ne,J)),onPromote:te==="none"?void 0:J=>void se(Ce.setProductShots(t.id,ne,[J,...X.map(ge=>ge.file).filter(ge=>ge!==J)])),onRemove:te==="none"?void 0:W}),L.length>0&&o.jsx(To,{label:`Shots featuring ${O.name}`,children:L.map(J=>o.jsx(Sp,{node:J,onClick:()=>h(q1(t,null,J.id))},J.id))}),me.length>0&&o.jsx(To,{label:k?"Other products in the library":"Other products",children:me.map(J=>k?o.jsx(N9,{product:J,variant:"navigate",size:"slider",onOpen:ge=>h(Js(t,ge))},J.id):o.jsx(k9,{product:J,variant:"navigate",size:"slider",onOpen:ge=>h(Js(t,ge))},J.id))}),j&&o.jsx("div",{className:"sc-ownedbits",children:o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(is,{label:"Delete product",title:`Delete ${j.name}?`,body:"Shots already made with it keep their images and their recipe. Only future shots lose it.",busy:w,onConfirm:()=>void U()})})})]})})}const A9=[{id:"newest",label:"Newest first"},{id:"oldest",label:"Oldest first"},{id:"cost",label:"Highest cost"},{id:"keepers",label:"Keepers first"}];function eO(e){return A9.some(t=>t.id===e)}const M9=[{id:"all",label:"All"},{id:"keepers",label:"Keepers"},{id:"archived",label:"Archived"}];function tO(e){return M9.some(t=>t.id===e)}function nO(e,t,n){return n==="archived"?t:n==="keepers"?e.filter(s=>s.kept):e}function rO(e,t,n,s){const i=Ph(e,n,s);return{all:i.length,keepers:i.reduce((c,u)=>c+(u.kept?1:0),0),archived:Ph(t,n,s).length}}const Bl=(e,t)=>t.createdAt.localeCompare(e.createdAt);function aO(e,t,n){const s=[e.prompt],i=e.brief;if(i){const c=i.tokens??[];let u=!1;for(const f of c)switch(f.t){case"product":Fs(s,t.product(f.id));break;case"character":Fs(s,t.person(f.id));break;case"template":u=!0,Fs(s,t.scene(f.id));break;case"color":Fs(s,f.name),Fs(s,f.hex);break}i.templateId&&!u&&Fs(s,t.scene(i.templateId));for(const f of Object.values(i.templateFields??{}))Fs(s,f)}return Fs(s,n),s.join(`
|
|
102
|
+
`)}function Fs(e,t){t&&e.push(t)}function Ph(e,t,n){return t.trim()?e.filter(s=>xa(n(s),t)):e}function sO(e,t){const n=[...e];switch(t){case"oldest":return n.sort((s,i)=>Bl(i,s));case"cost":return n.sort((s,i)=>i.costUsd-s.costUsd||Bl(s,i));case"keepers":return n.sort((s,i)=>Number(i.kept)-Number(s.kept)||Bl(s,i));default:return n.sort(Bl)}}const oO=[{label:"Generate",keys:["cmd","enter"]},{label:"Jump to the brief",keys:["/"]},{label:"Product menu",keys:["$"]},{label:"Scene menu",keys:["/"]},{label:"Presenter menu",keys:["@"]},{label:"Colour menu",keys:["#"]},{label:"Walk versions",keys:["←","→"]},{label:"Walk lineage",keys:["↑","↓"]},{label:"Step variants",keys:["[","]"]},{label:"Refine this shot",keys:["b"]},{label:"Keep or unkeep",keys:["k"]},{label:"Open the shot",keys:["enter"]},{label:"Close, or stop refining",keys:["esc"]},{label:"Assets panel",keys:["."]},{label:"This list",keys:["?"]}];function lO({open:e,onOpenChange:t}){return o.jsx(el,{open:e,onOpenChange:t,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,children:[o.jsx(nl,{children:"Shortcuts"}),o.jsx("div",{className:"sc-keys",children:oO.map(n=>o.jsxs("div",{className:"sc-krow",children:[o.jsx("span",{children:n.label}),o.jsx("span",{className:"sc-ksp"}),n.keys.map(s=>o.jsx("kbd",{children:s},s))]},n.label))})]})})}const cd=e=>((e==null?void 0:e.tokens)??[]).filter(t=>t&&typeof t.t=="string"),Jg=(e,t)=>cd(e).filter(n=>n.t===t&&typeof n.id=="string").map(n=>n.id),ev=e=>cd(e).filter(t=>t.t==="text").map(t=>typeof t.v=="string"?t.v:"").join(" ").replace(/\s+/g," ").trim(),tv=(e,t)=>cd(e).filter(n=>n.t===t).length,H0=(e,t,n)=>t(e)??n;function iO(e,t,n){if(!e||!t)return[];const s=[],i=(f,h,m,g)=>{const v=Jg(e,f),y=Jg(t,f),w=y.filter(C=>!v.includes(C)),E=v.filter(C=>!y.includes(C));if(!(!w.length&&!E.length)){if(w.length===1&&E.length===1){s.push(`${m} ${H0(E[0],h,g)} to ${H0(w[0],h,g)}`);return}for(const C of w)s.push(`${m} ${H0(C,h,g)} added`);for(const C of E)s.push(`${m} ${H0(C,h,g)} removed`)}};i("product",n.product,"product","a product"),i("character",n.person,"presenter","a presenter"),i("template",n.scene,"scene","a scene");for(const[f,h]of[["color","colour"],["ref","reference"],["mark","brand mark"]]){const m=tv(e,f),g=tv(t,f);if(m===g)continue;const v=Math.abs(g-m),y=v===1?h:`${h}s`;s.push(g>m?`${v} ${y} added`:`${v} ${y} removed`)}const c=ev(e),u=ev(t);return c!==u&&s.push(u&&u.length<=60?`“${u}”`:"wording changed"),s}function cO(e,t,n){const s=iO(e,t,n);if(!s.length)return null;const i=s.slice(0,3),c=s.length-i.length;return`Changed: ${i.join(", ")}${c>0?`, and ${c} more`:""}`}function R9(e,t){var s;const n=(s=e.brief)==null?void 0:s.sourceImage;return n&&(t!=null&&t.images.includes(n))?n:t==null?void 0:t.images[0]}function uO(e){return cd(e.brief).filter(n=>n.t==="text").map(n=>typeof n.v=="string"?n.v:"").join(" ").replace(/\s+/g," ").trim()||e.prompt||""}function dO({since:e}){const[t,n]=r.useState(Date.now());return r.useEffect(()=>{const s=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(s)},[]),o.jsxs("span",{className:"sc-cell-tag",children:[tp(e,t)," · ",eo(e,t),"s"]})}function fO({nodes:e,selectedId:t,onOpen:n,onRetry:s,onCancel:i,onToggleKeep:c,onArchive:u,onDeletePermanently:f,setsFor:h,picked:m,onPick:g,empty:v,sending:y,onBranch:w,branchingFrom:E,branchingFromImage:C,expanded:b,onToggleExpand:N,versionsOf:j,onVersions:k,engineName:A,tile:M}){const T=e.filter(H=>H.kind!=="root"),D=new Map(e.map(H=>[H.id,H])),L=!!g,[Y,I]=r.useState(null),[se,U]=r.useState(null),{tile:te,cols:O}=BF(VF(se),M,zF()<ZF),ne=[...y?[o.jsxs("div",{className:"sc-cell","data-running":"true","data-sending":"true",children:[o.jsx("span",{className:"sc-shimmer"}),o.jsx("span",{className:"sc-cell-tag",children:"sending"}),o.jsx("span",{className:"sc-cell-said",dir:"auto",children:y})]},"sending")]:[],...T.flatMap(H=>{const K=H.parentId?D.get(H.parentId):null,X=K&&K.kind!=="root"?K:null;if(H.status==="running")return[o.jsxs("div",{className:"sc-cell","data-running":"true","data-fb-node":H.id,children:[o.jsxs("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}, still rendering`,onClick:()=>n(H.id),children:[o.jsx("span",{className:"sc-shimmer"}),o.jsx(dO,{since:H.createdAt})]}),i&&o.jsx("button",{type:"button",className:"sc-cell-retry","data-urgent":eo(H.createdAt)>=60||void 0,onClick:()=>i(H),children:"Cancel"})]},H.id)];if(H.status==="cancelled"||H.status==="error"||H.images.length===0){const le=H.status==="cancelled",me=le?fw():oo(H.error,A==null?void 0:A(H.engineId));return[o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-cancelled":le||void 0,"data-failed":!le||void 0,"data-selected":H.id===t,children:[o.jsx("button",{type:"button",className:"sc-cell-open",onClick:()=>n(H.id),"aria-label":`Open ${Cn(H)}`}),o.jsx("span",{className:"sc-cell-failed",children:o.jsx(Qm,{failure:me,density:"tile",onRetry:()=>s(H),dismiss:u?{label:H.archived?"Restore":"Dismiss",onClick:()=>u(H)}:void 0})})]},H.id)]}const W=(h==null?void 0:h(H.id))??[],P=(m==null?void 0:m.has(H.id))??!1,Z=(j==null?void 0:j(H.id))??0,ae=w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":H.id===E||void 0,onClick:()=>w(H.id),"aria-label":`Refine ${Cn(H)}`,title:"Continue from this shot",children:[o.jsx(lg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]}),G=o.jsxs("div",{className:"sc-cell-facts",children:[(X==null?void 0:X.images[0])&&o.jsxs("span",{className:"sc-fact sc-prov",children:[o.jsx("img",{src:rn(R9(H,X)??X.images[0]),alt:""}),"refined from"]}),H.images.length>1&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-stack",onClick:()=>N==null?void 0:N(H.id),"aria-expanded":"false","aria-label":`Show all ${H.images.length} variants`,children:[o.jsx(hh,{size:12}),H.images.length," variants"]}),Z>0&&k&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-versions",onClick:()=>k(H.id),"aria-label":`Show the ${Z} version${Z===1?"":"s"} of this shot`,children:[o.jsx(hH,{size:11}),Z," version",Z===1?"":"s"]})]},`${H.id}-facts`),fe=o.jsxs(o.Fragment,{children:[L&&o.jsx("button",{type:"button",className:"sc-cell-pick","data-on":P||void 0,"aria-pressed":P,"aria-label":P?"Deselect shot":"Select shot",onClick:()=>g==null?void 0:g(H.id),children:P&&o.jsx(_a,{size:12,weight:"bold"})}),u&&o.jsx("button",{type:"button",className:"sc-cell-archive",onClick:()=>u(H),"aria-label":H.archived?"Restore":"Archive",title:H.archived?"Restore":"Archive",children:H.archived?o.jsx(o1,{size:12}):o.jsx(Wx,{size:12})})]});return b!=null&&b.has(H.id)&&H.images.length>1?H.images.map((le,me)=>o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-fb-variant":me,"data-variant":"","data-first":me===0||void 0,"data-selected":me===0&&H.id===t,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}, take ${me+1} of ${H.images.length}`,onClick:()=>n(H.id,me),children:o.jsx("img",{src:rn(le),alt:"",loading:"lazy"})}),o.jsxs("div",{className:"sc-cell-bar",children:[o.jsxs("div",{className:"sc-cell-facts",children:[o.jsxs("span",{className:"sc-fact",children:[me+1," of ",H.images.length]}),me===0&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-stack",onClick:()=>N==null?void 0:N(H.id),"aria-expanded":"true","aria-label":`Collapse ${H.images.length} variants`,children:[o.jsx(hh,{size:12}),"Collapse"]})]}),w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":E===H.id&&C===le?"":void 0,onClick:()=>w(H.id,me),"aria-label":`Refine ${me+1} of ${H.images.length}`,title:"Continue from this take",children:[o.jsx(lg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]})]}),me===0&&o.jsx(o.Fragment,{children:fe})]},`${H.id}:${le}`)):[o.jsxs(Zm,{children:[o.jsx(Vm,{children:o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-selected":H.id===t,"data-picked":P||void 0,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}`,onClick:()=>n(H.id),children:o.jsx("img",{src:rn(H.images[0]),alt:"",loading:"lazy"})}),o.jsxs("div",{className:"sc-cell-bar",children:[G,ae]}),fe,H.kept&&o.jsx("button",{type:"button",className:"sc-cell-star",onClick:()=>c==null?void 0:c(H),"aria-pressed":"true","aria-label":"Remove from keepers",children:o.jsx(mh,{size:14,weight:"fill"})}),W.length>0&&o.jsx("span",{className:"sc-cell-meta",children:W.map(le=>le.name).join(", ")})]})}),o.jsxs(zm,{children:[o.jsx(qr,{onSelect:()=>n(H.id),children:"Open"}),w&&o.jsx(qr,{onSelect:()=>w(H.id),children:"Refine from this"}),g&&o.jsx(qr,{onSelect:()=>g(H.id),children:P?"Deselect":"Select for set"}),Z>0&&k&&o.jsxs(qr,{onSelect:()=>k(H.id),children:[Z," version",Z===1?"":"s"]}),H.images.length>1&&N&&o.jsx(qr,{onSelect:()=>N(H.id),children:"Show all variants"}),c&&o.jsx(qr,{onSelect:()=>c(H),children:H.kept?"Remove from keepers":"Keep"}),u&&o.jsxs(o.Fragment,{children:[o.jsx(ch,{}),o.jsx(qr,{onSelect:()=>u(H),children:H.archived?"Restore":"Archive"})]}),f&&H.archived&&o.jsxs(o.Fragment,{children:[o.jsx(ch,{}),o.jsx(qr,{color:"red",onSelect:()=>I(H),children:"Delete permanently"})]})]})]},H.id)]})];if(cw(T)&&!y)return o.jsx(o.Fragment,{children:v??o.jsx("p",{className:"sc-feed-empty",children:"Nothing here yet."})});const Q=Math.max(1,Math.min(O,ne.length));return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-feed",ref:U,"data-picking":L&&((m==null?void 0:m.size)??0)>0?"":void 0,style:{"--sc-tile":`${te}px`},children:Array.from({length:Q},(H,K)=>o.jsx("div",{className:"sc-feed-col",children:ne.filter((X,W)=>(ne.length-1-W)%Q===K)},`col-${Q}-${K}`))}),o.jsx(Yc,{open:!!Y,onOpenChange:H=>!H&&I(null),children:o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:"Delete this shot permanently?"}),o.jsx(Qc,{size:"2",children:"This cannot be undone."}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:()=>{Y&&(f==null||f(Y)),I(null)},children:"Delete permanently"})})]})]})})]})}function P9({a:e,b:t,imageA:n,imageB:s,open:i,onOpenChange:c}){const[u,f]=r.useState(null),[h,m]=r.useState(null),[g,v]=r.useState(0);return r.useEffect(()=>{if(!i)return;f(null),m(null);let y=!0;return Ce.diff(n,s).then(w=>{y&&f(w)}).catch(w=>{y&&m(String((w==null?void 0:w.message)??w))}),()=>{y=!1}},[i,n,s,g]),o.jsx(el,{open:i,onOpenChange:c,children:o.jsxs(tl,{maxWidth:"860px","aria-describedby":void 0,onOpenAutoFocus:ru,children:[o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-dlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})}),o.jsx(nl,{children:"Compare"}),o.jsxs("div",{className:"sc-cmp",children:[o.jsxs("figure",{className:"sc-cmp-side",children:[o.jsx("img",{src:rn(n),alt:""}),o.jsx("figcaption",{dir:"auto",children:Cn(e)})]}),o.jsxs("figure",{className:"sc-cmp-side",children:[o.jsx("img",{src:rn(s),alt:""}),o.jsx("figcaption",{dir:"auto",children:Cn(t)})]}),o.jsxs("figure",{className:"sc-cmp-side",children:[h?o.jsx("div",{className:"sc-cmp-err",children:o.jsx(Qm,{failure:oo(h),density:"tile",onRetry:()=>v(y=>y+1)})}):u?o.jsx("img",{src:rn(u.heatmapHash),alt:"Heatmap of the pixels that differ"}):o.jsx("div",{className:"sc-cmp-wait",children:o.jsx(ln,{})}),o.jsx("figcaption",{children:"drift"})]})]}),u&&o.jsxs("p",{className:"sc-cmp-note",children:[o.jsxs("b",{children:[(u.score*100).toFixed(1),"% of pixels changed."]})," ",u.score>.35?"A different photograph, not a variation of the same one.":u.score>.12?"The frame moved. Check the product is still exactly itself.":"Close enough to read as the same setup."]})]})})}const hO=130;function mO(e){const[t,n]=r.useState(e);return r.useEffect(()=>{if(e===t)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){n(e);return}const s=setTimeout(()=>n(e),hO);return()=>clearTimeout(s)},[e,t]),t}function Lh({name:e,count:t,mode:n,onToggle:s,action:i,children:c}){const u=n==="open"||n==="result"?"open":"compact",f=mO(u);return o.jsxs("div",{className:"sc-agroup","data-mode":n,children:[o.jsxs("div",{className:"sc-agroup-h",children:[o.jsxs("button",{type:"button",className:"sc-agroup-t","aria-expanded":n==="open",onClick:s,children:[o.jsx("b",{children:e}),t!==void 0&&t>0&&o.jsx("span",{className:"sc-agroup-n",children:t}),o.jsx(ai,{size:11,className:"sc-agroup-caret","aria-hidden":"true"})]}),i]}),o.jsx("div",{className:"sc-agroup-body",children:o.jsx("div",{className:"sc-agroup-content","data-fading":f!==u||void 0,children:c(f)})})]})}function pO({candidate:e,on:t,named:n,onClick:s}){return o.jsxs("button",{type:"button",className:"sc-acard","data-on":t||void 0,"aria-label":e.full,"aria-pressed":t,title:e.full,onClick:s,children:[o.jsxs("span",{className:"sc-acard-thumb",children:[e.thumb?o.jsx("img",{src:e.thumb,alt:"",loading:"lazy","data-crop":e.crop}):o.jsx("span",{className:"sc-aswatch",style:{display:"grid",placeItems:"center"},children:o.jsx(Wa,{size:14})}),o.jsx("span",{className:"sc-acard-tick","aria-hidden":!0,children:o.jsx(_a,{size:10,weight:"bold"})})]}),n&&o.jsxs("span",{className:"sc-acard-label",children:[e.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(G1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),e.label]})]})}function L2({kind:e,title:t,items:n,attached:s,mode:i,onToggle:c,onPick:u,moreLabel:f,createLabel:h,onCreate:m}){const g=r.useMemo(()=>new Set(s),[s]),[v,y]=r.useState(Kg);return r.useEffect(()=>{i!=="open"&&y(Kg)},[i]),i==="result"&&n.length===0?null:o.jsx(Lh,{name:t,count:n.length,mode:i,onToggle:()=>c(e),action:o.jsx("button",{type:"button",className:"sc-aadd",title:h,"aria-label":h,onClick:m,children:o.jsx(tr,{size:10})}),children:w=>{const{visible:E,more:C}=j_(n,g,w==="open"?v:Rh);return o.jsxs("div",{className:w==="open"?"sc-acard-grid":"sc-arow",children:[E.map(b=>o.jsx(pO,{candidate:b,on:g.has(b.id),named:w==="open",onClick:()=>u(b.id)},b.id)),w==="open"&&C>0&&o.jsxs("button",{type:"button",className:"sc-amore-tile",onClick:()=>y(b=>b+Yg),"aria-label":`Show ${Math.min(C,Yg)} more ${f}`,children:[o.jsxs("span",{className:"sc-amore-n",children:["+",C]}),o.jsx("span",{className:"sc-amore-t",children:"more"})]})]})}})}function gO({brand:e,shots:t,attached:n=p9,onProduct:s,onCharacter:i,onColor:c,onRef:u,onTemplate:f,onClose:h}){const m=iu(),g=ol(),{applyBrand:v}=pn(),{push:y}=mr(),[w,E]=ZL(cr.assetsExpanded,null),C=O=>E(ne=>ne===O?null:O),[b,N]=r.useState(""),j=b.trim().length>0,k=O=>{N(""),E(O)},A=O=>j?"result":w===null?"idle":w===O?"open":"collapsed",M=r.useMemo(()=>new Set(Za(e.id)),[e.id]),T=r.useMemo(()=>{const O=ne=>{const Q=zl(ne,m);return ad(ne,Q,{currentId:null,query:"",bookmarked:M,shown:Q.length}).items};return{product:O("product"),presenter:O("presenter"),scene:O("scene")}},[m,M]),D=r.useMemo(()=>({product:bc(T.product,b),presenter:bc(T.presenter,b),scene:bc(T.scene,b)}),[T,b]),L=r.useMemo(()=>{var O;return va((O=e.json)==null?void 0:O.palette)},[e]),Y=r.useMemo(()=>j?L.filter(O=>xa(`${O.name} ${O.hex}`,b)):L,[L,b,j]),I=O=>{(async()=>{var Q;const ne=S$((Q=e.json)==null?void 0:Q.palette,O);if(ne.swatch){if(ne.added)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ne.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"));return}k("colors")}})()},se=O=>{(async()=>{var Q;const ne=j$((Q=e.json)==null?void 0:Q.palette,O);if(ne.removed)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ne.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"))}})()},U=t.filter(O=>O.status==="done"&&O.images.length>0).slice(-12).reverse(),te=j&&!D.product.length&&!D.presenter.length&&!D.scene.length&&!Y.length;return o.jsxs("aside",{className:"sc-assets","aria-label":"Assets",children:[o.jsxs("div",{className:"sc-assets-head",children:[o.jsx("b",{children:"Assets"}),o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:h,"aria-label":"Close assets",style:{width:28,height:28},children:o.jsx(Mn,{size:12})})]}),o.jsx("div",{className:"sc-assets-searchbar",children:o.jsxs("div",{className:"sc-assets-search",children:[o.jsx(Tc,{size:12}),o.jsx("input",{value:b,onChange:O=>N(O.target.value),onKeyDown:O=>{O.key==="Escape"&&b&&(O.stopPropagation(),N(""))},placeholder:"Search assets","aria-label":"Search assets in this panel"}),j&&o.jsx("button",{type:"button",className:"sc-assets-clear",onClick:()=>N(""),"aria-label":"Clear search",children:o.jsx(Mn,{size:11})})]})}),te&&o.jsxs("p",{className:"sc-assets-zero",children:["Nothing here matches “",b.trim(),"”."]}),o.jsx(L2,{kind:"product",title:"Products",items:D.product,attached:n.product,mode:A("product"),onToggle:C,onPick:s,moreLabel:"products",createLabel:"Add product",onCreate:()=>g("product",{onCreated:O=>{O.kind==="product"&&(k("product"),s(O.id))}})}),o.jsx(L2,{kind:"presenter",title:"Presenters",items:D.presenter,attached:n.presenter,mode:A("presenter"),onToggle:C,onPick:i,moreLabel:"presenters",createLabel:"Create presenter",onCreate:()=>g("presenter",{onCreated:O=>{O.kind==="presenter"&&k("presenter")}})}),o.jsx(L2,{kind:"scene",title:"Scenes",items:D.scene,attached:n.scene?[n.scene]:[],mode:A("scene"),onToggle:C,onPick:f,moreLabel:"scenes",createLabel:"Create scene",onCreate:()=>g("scene",{onCreated:O=>{O.kind==="scene"&&k("scene")}})}),!(j&&Y.length===0)&&o.jsx(Lh,{name:"Brand colors",count:Y.length,mode:A("colors"),onToggle:()=>C("colors"),action:o.jsx(c1,{className:"sc-aadd",triggerStyle:{background:"none"},value:fp(L),presets:L.map(O=>O.hex),commitMode:"close",align:"end",label:"Add colour",onChange:I,children:o.jsx(tr,{size:10})}),children:O=>o.jsx("div",{className:"sc-arow",children:(O==="open"?Y:Y.slice(0,Rh)).map(ne=>o.jsxs("div",{className:"sc-aswatch-tile",children:[o.jsx("button",{type:"button",title:`${ne.name} ${ne.hex}`,onClick:()=>c(ne.hex,ne.name),children:o.jsx("span",{className:"sc-aswatch",style:{background:ne.hex}})}),O==="open"&&o.jsx("button",{type:"button",className:"sc-aswatch-x","aria-label":`Remove ${ne.name}`,title:"Remove",onClick:()=>se(ne.hex),children:o.jsx(Mn,{size:10,weight:"bold"})})]},ne.hex))})}),U.length>0&&!j&&o.jsx(Lh,{name:"Recent shots",count:U.length,mode:A("shots"),onToggle:()=>C("shots"),children:O=>o.jsx("div",{className:"sc-arow",children:(O==="open"?U:U.slice(0,Rh)).map(ne=>o.jsx("button",{type:"button",title:"Attach as a style reference",onClick:()=>u(ne.images[0]),children:o.jsx("img",{src:rn(ne.images[0]),alt:"",loading:"lazy"})},ne.id))})})]})}function vO({sets:e,active:t,ungrouped:n,ungroupedCount:s,onPlaceAll:i,onPlaceUngrouped:c,onOpenSet:u,onNewSet:f,onResetNewSet:h,onRenameSet:m,onDeleteSet:g,askCreate:v,lens:y,lensCounts:w,onLens:E,q:C,onQ:b,searchTotal:N,sort:j,onSort:k,tile:A,onTile:M,assets:T,onAssets:D,showAssets:L}){const Y=t?t.id:n?"__ungrouped__":"__all__",I=t?t.name:n?"Not in a set":"All shots",se=!!t||n,[U,te]=r.useState(!1),[O,ne]=r.useState(!1),[Q,H]=r.useState(!1),[K,X]=r.useState(""),W=r.useRef(null),P=r.useRef(!1),Z=()=>{P.current=!0,ne(!0),X(""),te(!0)},ae=()=>{t&&(P.current=!1,ne(!1),X(t.name),te(!0))};r.useEffect(()=>{v&&Z()},[v]);const G=()=>{const me=K.trim();if(!me)return;const J=P.current;P.current=!1,ne(!1),te(!1),J?f(me):m==null||m(me)},fe=me=>{if(me){te(!0);return}const J=P.current;P.current=!1,ne(!1),te(!1),J&&(h==null||h())},le=M9.map(me=>({value:me.id==="all"?null:me.id,label:me.label,count:w[me.id]}));return o.jsxs("div",{className:"sc-toolbar",children:[o.jsxs("div",{className:"sc-toolbar-scope",children:[o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-place","data-on":se||void 0,"aria-label":I,children:[o.jsx(yH,{className:"sc-toolbar-place-ic",size:14}),o.jsx("span",{className:"sc-toolbar-place-t",children:I}),o.jsx(ai,{size:10,className:"sc-caret"})]})}),o.jsxs(Zo,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[o.jsxs(a1,{value:Y,children:[o.jsx(Vl,{value:"__all__",onSelect:i,children:"All shots"}),o.jsxs(Vl,{value:"__ungrouped__",onSelect:c,children:["Not in a set",s>0?` · ${s}`:""]}),e.length>0&&o.jsx(s1,{}),e.map(me=>o.jsx(Vl,{value:me.id,onSelect:()=>u(me),children:me.name},me.id))]}),o.jsx(s1,{}),o.jsx(Qr,{onSelect:()=>{h==null||h(),Z()},children:"New set"}),t&&m&&o.jsx(Qr,{onSelect:ae,children:"Rename"}),t&&g&&o.jsx(Qr,{color:"red",onSelect:()=>H(!0),children:"Delete set"})]})]}),o.jsx(el,{open:U,onOpenChange:fe,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:me=>{me.preventDefault();const J=W.current;J&&(J.focus(),J.select())},children:[o.jsx(nl,{children:O?"Name this set":"Rename set"}),o.jsx("input",{ref:W,className:"sc-in",style:{width:"100%",marginTop:8},value:K,"aria-label":"Set name",onChange:me=>X(me.target.value),onKeyDown:me=>{me.key==="Enter"&&G()}}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(ma,{variant:"soft",color:"gray",onClick:()=>fe(!1),children:"Cancel"}),o.jsx(ma,{onClick:G,disabled:!K.trim(),children:"Save"})]})]})}),o.jsx(Yc,{open:Q,onOpenChange:H,children:o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:"Delete this set?"}),o.jsx(Qc,{size:"2",children:"Shots stay in the library. Only the set goes."}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:()=>{g==null||g(),H(!1)},children:"Delete set"})})]})]})}),o.jsx(b9,{"aria-label":"Shot lenses",activeKey:y==="all"?null:y,items:le,onSelect:me=>E(me??"all")})]}),o.jsxs("div",{className:"sc-toolbar-actions",children:[o.jsx(uu,{value:C,onChange:b,noun:"shots",total:N}),o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-btn","aria-label":"Sort shots",children:[o.jsx(iH,{size:14}),o.jsx("span",{className:"sc-toolbar-btn-t",children:"Sort"}),o.jsx(ai,{size:10})]})}),o.jsx(Zo,{align:"end",children:o.jsx(a1,{value:j,onValueChange:me=>k(me),children:A9.map(me=>o.jsx(Vl,{value:me.id,children:me.label},me.id))})})]}),o.jsx(KF,{value:A,onChange:M}),L&&o.jsx("button",{type:"button",className:"sc-icon-btn sc-toolbar-assets","data-on":T||void 0,onClick:D,"aria-label":"Assets panel","aria-pressed":T,title:"Assets panel (.)",children:o.jsx(NH,{size:15,mirrored:!0})})]})]})}function yO(e){const{push:t}=mr(),n=r.useCallback(c=>Ce.archiveNode(c.id,!0).then(()=>e()).then(()=>{t({kind:"success",title:"Archived",detail:Cn(c),action:{label:"Undo",onClick:()=>void Ce.archiveNode(c.id,!1).then(e)}})}).catch(u=>t(dn(u,"Could not archive this shot"))),[e,t]),s=r.useCallback(c=>Ce.archiveNode(c.id,!1).then(()=>e()).catch(u=>t(dn(u,"Could not restore this shot"))),[e,t]),i=r.useCallback(c=>Promise.all(c.map(u=>Ce.archiveNode(u,!1))).then(()=>e()).catch(u=>t(dn(u,"Could not restore these shots"))),[e,t]);return{archive:n,unarchive:s,unarchiveBatch:i}}function xO(e){const{push:t}=mr(),n=r.useCallback(i=>Ce.deleteNode(i.id).then(()=>e()).catch(c=>t(dn(c,"Could not delete this shot"))),[e,t]),s=r.useCallback(i=>Ce.deleteNodesBatch(i).then(()=>e()).catch(c=>t(dn(c,"Could not delete these shots"))),[e,t]);return{remove:n,removeBatch:s}}function wO(e,{demoProducts:t,presenters:n,scenes:s}){var h,m,g,v;const i=((h=e.brief)==null?void 0:h.tokens)??[],c=(m=i.find(y=>(y==null?void 0:y.t)==="product"))==null?void 0:m.id,u=(g=i.find(y=>(y==null?void 0:y.t)==="character"))==null?void 0:g.id,f=(v=i.find(y=>(y==null?void 0:y.t)==="template"))==null?void 0:v.id;return{product:c?t.find(y=>y.id===c):void 0,presenter:u?n.find(y=>y.id===u):void 0,scene:f?s.find(y=>y.id===f):void 0}}function bO(e,t){const{product:n,presenter:s,scene:i}=wO(e,t);return{productName:n?Oa(n,"chip"):null,productPreviewUrl:(n==null?void 0:n.previewUrl)??null,productId:(n==null?void 0:n.id)??null,presenterName:(s==null?void 0:s.name)??null,presenterPreviewUrl:(s==null?void 0:s.avatarUrl)??(s==null?void 0:s.previewUrl)??null,presenterId:(s==null?void 0:s.id)??null,sceneName:i?to(i,"chip"):null,scenePreviewUrl:(i==null?void 0:i.previewUrl)??null,sceneId:(i==null?void 0:i.id)??null}}function EO(e){const t=r.useRef(null),n=r.useRef(0),s=r.useRef(null),i=r.useRef(0),c=r.useCallback(()=>{const h=t.current;h&&(n.current=h.scrollWidth/3)},[]);r.useEffect(()=>{const h=t.current;if(!h||!e)return;c(),h.scrollLeft=n.current;const m=new ResizeObserver(()=>{const g=n.current;c(),g<=0&&n.current>0&&(h.scrollLeft=n.current)});m.observe(h);for(const g of h.children)m.observe(g);return()=>m.disconnect()},[e,c]);const u=r.useCallback(()=>{const h=t.current,m=n.current;!h||m<=0||(h.scrollLeft<m*.5?(h.scrollLeft+=m,s.current!==null&&(s.current+=m)):h.scrollLeft>m*1.5&&(h.scrollLeft-=m,s.current!==null&&(s.current-=m)))},[]);r.useEffect(()=>{const h=t.current;if(!h)return;let m=0;const g=()=>{m||(m=requestAnimationFrame(()=>{m=0,u()}))},v=y=>{Math.abs(y.deltaY)<=Math.abs(y.deltaX)||(y.preventDefault(),s.current=null,cancelAnimationFrame(i.current),h.scrollLeft+=y.deltaY)};return h.addEventListener("scroll",g,{passive:!0}),h.addEventListener("wheel",v,{passive:!1}),()=>{m&&cancelAnimationFrame(m),cancelAnimationFrame(i.current),h.removeEventListener("scroll",g),h.removeEventListener("wheel",v)}},[u]);const f=r.useCallback(h=>{const m=t.current;if(!m)return;const g=m.firstElementChild&&Number.parseFloat(getComputedStyle(m).gridAutoColumns)||232,v=Number.parseFloat(getComputedStyle(m).columnGap)||0,y=g+v,w=Math.max(1,Math.floor(m.clientWidth/y)-1)*y;s.current=m.scrollLeft+w*h,cancelAnimationFrame(i.current);const E=()=>{const C=s.current;if(C===null)return;const b=C-m.scrollLeft;if(Math.abs(b)<.5){m.scrollLeft=C,s.current=null;return}m.scrollLeft+=b*.16,i.current=requestAnimationFrame(E)};i.current=requestAnimationFrame(E)},[]);return{ref:t,page:f}}function CO(e){const t=[...e];for(let n=t.length-1;n>0;n--){const s=Math.floor(Math.random()*(n+1));[t[n],t[s]]=[t[s],t[n]]}return t}function SO({entries:e,catalogs:t,stagedId:n,onUse:s,onOpenProduct:i,onOpenPresenter:c,onOpenScene:u}){const f=r.useMemo(()=>CO(e).slice(0,10),[e]),{ref:h,page:m}=EO(f.length);return o.jsxs("div",{className:"sc-canvas-empty",children:[o.jsxs("h3",{children:["Your first ",o.jsx("em",{children:"shot"})]}),o.jsx("p",{children:"Describe what you want in the brief below, or open one of these."}),f.length>0&&o.jsxs("div",{className:"sc-shelf",children:[o.jsx("button",{type:"button",className:"sc-shelf-arrow prev","aria-label":"Previous examples",onClick:()=>m(-1),children:o.jsx(wi,{size:13,weight:"bold"})}),o.jsx("button",{type:"button",className:"sc-shelf-arrow next","aria-label":"More examples",onClick:()=>m(1),children:o.jsx(K1,{size:13,weight:"bold"})}),o.jsx("div",{className:"sc-shelf-row",ref:h,children:[0,1,2].map(g=>f.map(v=>o.jsx(v9,{entry:v,size:"grid",hideRecipe:!0,decorative:g!==1,active:n===v.id,onOpen:()=>s(v),onOpenProduct:i,onOpenPresenter:c,onOpenScene:u,...bO(v,t)},`${g}-${v.id}`)))})]})]})}function sc({text:e,onAll:t,actionLabel:n="Show all shots"}){return o.jsxs("div",{className:"sc-feed-empty",children:[o.jsx("p",{children:e}),t&&o.jsx("button",{type:"button",className:"sc-btn",onClick:t,children:n})]})}function jO({count:e,sets:t,onAdd:n,onNew:s,onClear:i,onKeep:c,allKept:u,comparable:f,onCompare:h,archivedLens:m,pickedIds:g,onRestoreBatch:v,onDeleteBatch:y}){return o.jsxs("div",{className:"sc-picked",role:"status",children:[o.jsxs("span",{className:"sc-picked-n",children:[e," selected"]}),m?o.jsx("button",{type:"button",className:"sc-btn",onClick:()=>v(g),children:"Restore"}):o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"sc-btn",onClick:c,children:u?"Remove from keepers":"Keep"}),e===2&&o.jsx("button",{type:"button",className:"sc-btn","aria-disabled":!f||void 0,onClick:()=>{f&&h()},title:f?"Show the drift between these two":"Both shots need to have finished",children:"Compare"}),o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Add to set"})}),o.jsxs(Zo,{children:[t.map(w=>o.jsx(Qr,{onSelect:()=>n(w),children:w.name},w.id)),t.length>0&&o.jsx(s1,{}),o.jsx(Qr,{onSelect:s,children:"New set…"})]})]})]}),o.jsx("button",{type:"button",className:"sc-btn",onClick:i,children:"Clear"}),m&&o.jsx(is,{label:`Delete ${e} permanently`,title:`Delete ${e} shot${e===1?"":"s"} permanently?`,body:"This cannot be undone.",busy:!1,onConfirm:()=>y(g)})]})}function kO(){const e=lr(Ye.hubShot),t=lr(Ye.setShot);return(e==null?void 0:e.params.shotId)??(t==null?void 0:t.params.shotId)??null}function L9({set:e}){const{engines:t,scenes:n,presenters:s,demoProducts:i,showcase:c,showcaseLoaded:u}=pn(),{brand:f,workspace:h,nodes:m,sets:g,membership:v,loaded:y,refresh:w,applySet:E,dropSet:C,products:b}=It(),N=iu(),j=an(),[k,A]=li(),M=kO(),[T,D]=r.useState(null),[L,Y]=r.useState(!1),{open:I,toggle:se,setOpen:U}=SF(),te=lo(bi),O=I&&!te,[ne,Q]=r.useState(null),[H,K]=r.useState(p9),[X,W]=r.useState(null),[P,Z]=r.useState(null),[ae,G]=r.useState(new Set),[fe,le]=Os("tab","all"),[me,J]=Os("in",""),[ge,He]=Os("branch",""),[Qe]=Os("bi",""),[ye,ke]=Os("lineage",""),[lt,jt]=r.useState(new Set),[Pt,Ne]=Ia(cr.tileSize,Kw),Ae=Yw(Pt),{q:Ee,setQ:at,clearSearch:kt}=du([]),[Qt,Jt]=Ia(cr.feedSort,"newest"),Ot=eO(Qt)?Qt:"newest",[xn,Rn]=r.useState(!1),[Wn,Pn]=Os("i","0"),Zt=Number.parseInt(Wn,10)||0;r.useRef(null);const tt=r.useRef(null),{push:qe}=mr(),{tasks:Ut,poke:Vt}=sl(),[z,ue]=r.useState(null),xe=(h==null?void 0:h.id)??"",Me=e?cc(f,e):ur(f),Ke=r.useCallback((_,ie=0,Te=!1)=>{const Fe=new URLSearchParams(k);ie>0?Fe.set("i",String(ie)):Fe.delete("i");const cn=Fe.toString();j(`${Me}/shots/${_}${cn?`?${cn}`:""}`,{replace:Te})},[Me,j,k]),it=r.useCallback(()=>{const _=new URLSearchParams(k);_.delete("i"),_.delete("panel");const ie=_.toString();j(`${Me}${ie?`?${ie}`:""}`,{replace:!0})},[Me,j,k]),_t=tO(fe)?fe:"all",Nt=!e&&me==="ungrouped";r.useEffect(()=>{fe==="ungrouped"&&(le(null),J("ungrouped"))},[fe,le,J]);const bt=r.useCallback(async()=>{try{await w(),Q(null)}catch(_){Q(String(_.message??_))}},[w]),{archive:Sn,unarchive:Ct,unarchiveBatch:Mr}=yO(bt),{remove:pr,removeBatch:ct}=xO(bt);r.useEffect(()=>{M&&D(M)},[M]);const St=r.useMemo(()=>Ut.filter(_=>_.kind!=="catalog").map(_=>`${_.id}:${_.state}`).sort().join("|"),[Ut]),en=r.useRef(null);r.useEffect(()=>{if(en.current===null){en.current=St;return}en.current!==St&&(en.current=St,bt())},[St,bt]);const zt=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&!_.archived).sort(Bl),[m]),Lt=r.useMemo(()=>{const _=new Map;for(const ie of g)for(const Te of v[ie.id]??[])_.has(Te)||_.set(Te,[]),_.get(Te).push(ie);return _},[g,v]),nr=r.useMemo(()=>{const _=new Map;for(const ie of zt)ie.parentId&&(_.has(ie.parentId)||_.set(ie.parentId,[]),_.get(ie.parentId).push(ie));return _},[zt]),F=r.useMemo(()=>{if(!ye)return null;const _=zt.find(Fe=>Fe.id===ye);if(!_)return null;const ie=new Set([_.id]),Te=[_.id];for(;Te.length;)for(const Fe of nr.get(Te.pop())??[])ie.has(Fe.id)||(ie.add(Fe.id),Te.push(Fe.id));return{root:_,ids:ie}},[ye,zt,nr]);r.useEffect(()=>{!ye||!y||F||(ke(null),qe({kind:"error",title:"That shot is no longer available",detail:"Showing everything instead."}))},[ye,y,F,ke,qe]);const V=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&_.archived).sort(Bl),[m]),ee=r.useMemo(()=>{const _=ie=>{if(F)return ie.filter(Te=>F.ids.has(Te.id));if(e){const Te=new Set(v[e.id]??[]);return ie.filter(Fe=>Te.has(Fe.id))}return Nt?ie.filter(Te=>!Lt.has(Te.id)):ie};return{live:_(zt),archived:_(V)}},[zt,V,e,v,Lt,F,Nt]),pe=r.useMemo(()=>nO(ee.live,ee.archived,_t),[ee,_t]),he=r.useMemo(()=>{var Fe,cn;const _=b.length?b:((Fe=f.json)==null?void 0:Fe.products)??[],ie=((cn=f.json)==null?void 0:cn.characters)??[],Te=N.scenes;return{product:Bt=>{const Tn=_.find(gr=>gr.id===Bt)??i.find(gr=>gr.id===Bt);return Tn?Oa(Tn,"tooltip"):null},person:Bt=>{var Tn,gr;return((Tn=ie.find(Ga=>Ga.id===Bt))==null?void 0:Tn.name)??((gr=s.find(Ga=>Ga.id===Bt))==null?void 0:gr.name)??null},scene:Bt=>{const Tn=Te.find(gr=>gr.id===Bt);return Tn?to(Tn,"tooltip"):null}}},[b,i,f,s,N.scenes]),$e=r.useMemo(()=>{const _=new Map;return ie=>{var cn;const Te=_.get(ie.id);if(Te!==void 0)return Te;const Fe=aO(ie,he,(cn=t.find(Bt=>Bt.id===ie.engineId))==null?void 0:cn.displayName);return _.set(ie.id,Fe),Fe}},[he,t]),ze=r.useMemo(()=>rO(ee.live,ee.archived,Ee,$e),[ee,Ee,$e]),st=r.useMemo(()=>zt.reduce((_,ie)=>_+(Lt.has(ie.id)?0:1),0),[zt,Lt]),je=r.useMemo(()=>sO(Ph(pe,Ee,$e),Ot),[pe,Ee,$e,Ot]),Ze=r.useMemo(()=>{const _=new Map;for(const ie of m)_.has(ie.parentId)||_.set(ie.parentId,[]),_.get(ie.parentId).push(ie);return _},[m]),Ge=m.find(_=>_.kind==="root")??null,_e=r.useMemo(()=>{const _=m.find(Te=>Te.id===T);return _||(je.filter(Te=>Te.status!=="error")[0]??je[0]??Ge)},[m,T,je,Ge]),Pe=r.useMemo(()=>m.find(_=>_.id===ge&&_.kind!=="root"&&(_.status==="running"||_.status==="done"&&_.images.length>0))??null,[m,ge]),dt=(Pe==null?void 0:Pe.images[Number.parseInt(Qe,10)||0])??(Pe==null?void 0:Pe.images[0])??null,pt=r.useCallback(()=>{A(_=>{const ie=new URLSearchParams(_);return ie.delete("branch"),ie.delete("bi"),ie},{replace:!0})},[A]);r.useEffect(()=>{!ge||Pe||!y||(pt(),qe({kind:"error",title:"That shot is no longer available to refine",detail:"Making a new shot."}))},[ge,Pe,y,pt,qe]);const Ft=r.useCallback((_,ie=0)=>{var Te;A(Fe=>{const cn=new URLSearchParams(Fe);return cn.set("branch",_),ie>0?cn.set("bi",String(ie)):cn.delete("bi"),cn},{replace:!0}),(Te=tt.current)==null||Te.focus()},[A]),Ht=_=>{D(_),Pn(null)},xt=_=>M?Ke(_,0,!0):Ht(_),ut=_=>Pn(_===0?null:String(_)),tn=async _=>{var ie,Te;try{const Fe=await Ce.addNode({projectId:xe,parentId:_.parentId,kind:_.kind==="edit"?"edit":"generation",prompt:_.prompt,engineId:_.engineId,count:((ie=_.brief)==null?void 0:ie.variants)??Math.max(1,_.images.length||1),brief:_.brief,..._.kind==="edit"&&((Te=_.brief)!=null&&Te.sourceImage)?{sourceImage:_.brief.sourceImage}:{}});return await bt(),(Fe==null?void 0:Fe.id)??null}catch(Fe){return qe(dn(Fe,"Could not run this again")),null}},rr=async _=>{try{await Ce.cancelNode(_.id),await bt()}catch(ie){qe(dn(ie,"Could not cancel this shot"))}},On=r.useCallback(_=>{var ie,Te,Fe;_!=null&&_.scene&&((ie=tt.current)==null||ie.applyScene(_.scene)),_!=null&&_.scenesPanel&&((Te=tt.current)==null||Te.openAttach("Scenes")),(Fe=tt.current)==null||Fe.focus()},[]);r.useEffect(()=>{k.get("compose")!==null&&(On(),A(_=>{const ie=new URLSearchParams(_);return ie.delete("compose"),ie},{replace:!0}))},[k,On,A]);const gn=k.get("showcase"),Gn=r.useRef(null);r.useEffect(()=>{if(!gn||!u||Gn.current===gn)return;Gn.current=gn;const _=c.find(ie=>ie.id===gn);_?(W(wh(_)),qe({kind:"success",title:`Starting from "${_.title}"`})):qe({kind:"error",title:"That example is no longer available",detail:"Starting from scratch instead."}),A(ie=>{const Te=new URLSearchParams(ie);return Te.delete("showcase"),Te},{replace:!0})},[gn,u,c,A,qe]),r.useEffect(()=>{const _=ie=>{var gr,Ga;const Te=document.activeElement,Fe=((Te==null?void 0:Te.tagName)??"").toUpperCase(),cn=Fe==="INPUT"||Fe==="TEXTAREA"||Fe==="SELECT"||!!(Te!=null&&Te.closest('[contenteditable="true"]'));if(ie.key==="Enter"&&(ie.metaKey||ie.ctrlKey)){(gr=tt.current)==null||gr.submit(),ie.preventDefault();return}if(cn)return;if(ie.key==="?"){Y(!0),ie.preventDefault();return}if(ie.key==="/"&&!M){(Ga=tt.current)==null||Ga.focus(),ie.preventDefault();return}if(ie.key==="Escape"&&L){Y(!1),ie.preventDefault();return}if(ie.key==="Escape"&&M){it(),ie.preventDefault();return}if(ie.key==="Escape"&&ae.size>0){G(new Set),ie.preventDefault();return}if(ie.key==="Escape"&&ge){pt(),ie.preventDefault();return}if(!_e)return;if(ie.key==="b"&&_e.kind!=="root"&&_e.status==="done"&&_e.images.length>0){Ft(_e.id),ie.preventDefault();return}if(ie.key==="k"&&_e.kind!=="root"&&_e.status==="done"){ht(_e),ie.preventDefault();return}const Bt=(Ze.get(_e.parentId)??[]).filter(Ka=>Ka.kind!=="root"),Tn=Bt.findIndex(Ka=>Ka.id===_e.id);if(ie.key==="ArrowLeft"&&Tn>0)xt(Bt[Tn-1].id),ie.preventDefault();else if(ie.key==="ArrowRight"&&Tn>=0&&Tn<Bt.length-1)xt(Bt[Tn+1].id),ie.preventDefault();else if(ie.key==="ArrowUp"&&_e.parentId)xt(_e.parentId),ie.preventDefault();else if(ie.key==="ArrowDown"){const Ka=Ze.get(_e.id)??[];Ka.length&&(xt(Ka[0].id),ie.preventDefault())}else ie.key==="["&&Zt>0?ut(Zt-1):ie.key==="]"&&_e.images.length-1>Zt?ut(Zt+1):ie.key==="Enter"&&!M&&_e.kind!=="root"?Ke(_e.id):ie.key==="."&&!M&&se()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[_e,Ze,Zt,M,L,ae.size,ge,Ft,He]);const Ln=_=>G(ie=>{const Te=new Set(ie);return Te.delete(_)||Te.add(_),Te}),de=r.useMemo(()=>m.filter(_=>ae.has(_.id)),[m,ae]),Le=r.useMemo(()=>{if(de.length!==2)return null;const[_,ie]=de;return _.status!=="done"||ie.status!=="done"||!_.images[0]||!ie.images[0]?null:[_,ie]},[de]),ht=async(_,ie=!_.kept)=>{try{await Ce.keep(_.id,ie),await bt()}catch(Te){qe(dn(Te,"Could not update keeper status"))}},Je=async()=>{const _=!(de.length>0&&de.every(ie=>ie.kept));try{await Promise.all(de.filter(ie=>ie.kept!==_).map(ie=>Ce.keep(ie.id,_))),await bt()}catch(ie){qe(dn(ie,"Could not update keeper status"))}},gt=async _=>{try{await Ce.addToSet(_.id,[...ae]),G(new Set),await bt()}catch(ie){qe(dn(ie,"Could not add to the set"))}},et=r.useRef([]),[Wt,mt]=r.useState(!1);r.useEffect(()=>{Wt&&mt(!1)},[Wt]);const Kt=async(_,ie)=>{const Te=ie.trim();if(Te)try{const Fe=await Ce.createSet(f.id,Te);_.length>0&&await Ce.addToSet(Fe.id,_),G(new Set),await bt(),j(cc(f,Fe))}catch(Fe){qe(dn(Fe,"Could not create the set"))}},vn=()=>{const _=et.current;return et.current=[],_},Kn=async _=>{if(!e)return;const ie=_.trim();if(!(!ie||ie===e.name))try{const Te=await Ce.renameSet(e.id,ie);E(Te),j(cc(f,Te),{replace:!0}),w()}catch(Te){qe(dn(Te,"Could not rename the set"))}},Dt=async()=>{if(e)try{await Ce.deleteSet(e.id),C(e.id),j(ur(f),{replace:!0}),w()}catch(_){qe(dn(_,"Could not delete the set"))}},Zn=cw(m),ar=O||Zn&&!te,jn=Zn?o.jsx(SO,{entries:c,catalogs:{demoProducts:i,presenters:s,scenes:n},stagedId:P,onOpenProduct:_=>j(Js(f,_)),onOpenPresenter:_=>j(al(f,_)),onOpenScene:_=>j(rl(f,_)),onUse:_=>{Z(_.id),W(wh(_))}}):Ee.trim()?o.jsx(sc,{text:`No shots match “${Ee.trim()}”.`,onAll:kt,actionLabel:"Clear search"}):_t==="keepers"?o.jsx(sc,{text:"No keepers yet. Star a shot and it lands here.",onAll:()=>le(null)}):_t==="archived"?o.jsx(sc,{text:"Nothing archived.",onAll:()=>le(null)}):e?o.jsx(sc,{text:"Nothing in this set yet. Pick shots on All, then add them here."}):Nt?o.jsx(sc,{text:"Every shot is already in a set.",onAll:()=>J(null)}):null,vs={nodes:m,loaded:y,brand:f,engines:t,projectId:xe,imageIndex:Zt,setImageIndex:ut,close:it,select:xt,retry:_=>{tn(_).then(ie=>{ie&&xt(ie)})},cancel:_=>void rr(_),reload:()=>bt(),remix:_=>{W({..._.brief,_at:Date.now()}),_.brief&&m9(f.id,{tokens:Xw(_.brief),tplFields:_.brief.templateFields??{},branchId:null}),it()},branch:_=>{Ft(_.id),it()},archive:_=>void Sn(_).then(()=>it()),unarchive:_=>void Ct(_),delete:_=>void pr(_).then(()=>it()),refined:(_,ie)=>{ie==="edit"&&He(_)},tokenNames:he};return o.jsxs("div",{className:"sc-work","data-assets":ar,children:[o.jsxs("main",{className:"sc-canvas",id:"main","data-firstrun":Zn||void 0,children:[ne&&o.jsx("div",{className:"sc-canvas-alert",children:o.jsx(Jm,{failure:oo(ne)})}),(!Zn||e)&&o.jsx(vO,{sets:g,active:e,ungrouped:Nt,ungroupedCount:st,onPlaceAll:()=>e?j(ur(f)):J(null),onPlaceUngrouped:()=>e?j(`${ur(f)}?in=ungrouped`):J("ungrouped"),onOpenSet:_=>j(cc(f,_)),onNewSet:_=>void Kt(vn(),_),onResetNewSet:()=>{et.current=[]},onRenameSet:_=>void Kn(_),onDeleteSet:()=>void Dt(),askCreate:Wt,lens:_t,lensCounts:ze,onLens:_=>le(_==="all"?null:_),q:Ee,onQ:at,searchTotal:pe.length,sort:Ot,onSort:Jt,tile:Ae,onTile:Ne,assets:O,onAssets:se,showAssets:!te}),F&&o.jsxs("div",{className:"sc-lineage-bar",children:[o.jsx("button",{type:"button",className:"sc-crumb-back",onClick:()=>ke(null),children:"All shots"}),o.jsx("span",{className:"sc-crumb-sep",children:"›"}),o.jsx("b",{dir:"auto",children:Cn(F.root)}),o.jsx("span",{className:"sc-crumb-sep",children:"›"}),o.jsx("span",{className:"sc-crumb-here",children:"versions"})]}),o.jsx(fO,{nodes:je,selectedId:(_e==null?void 0:_e.id)??null,onOpen:Ke,onRetry:_=>void tn(_),onCancel:_=>void rr(_),onToggleKeep:_=>void ht(_),onArchive:_=>_.archived?Ct(_):Sn(_),onDeletePermanently:pr,engineName:_=>{var ie;return(ie=t.find(Te=>Te.id===_))==null?void 0:ie.displayName},setsFor:_=>Lt.get(_)??[],picked:ae,onPick:Ln,sending:z,onBranch:Ft,branchingFrom:(Pe==null?void 0:Pe.id)??null,branchingFromImage:dt,expanded:lt,onToggleExpand:_=>jt(ie=>{const Te=new Set(ie);return Te.delete(_)||Te.add(_),Te}),versionsOf:_=>{var ie;return((ie=nr.get(_))==null?void 0:ie.length)??0},onVersions:ke,tile:Ae,empty:jn})]}),Le&&o.jsx(P9,{open:xn,onOpenChange:Rn,a:Le[0],b:Le[1],imageA:Le[0].images[0],imageB:Le[1].images[0]}),ar&&o.jsx("div",{className:"sc-assets-backdrop",onClick:()=>U(!1),"aria-hidden":!0}),o.jsx(lO,{open:L,onOpenChange:Y}),!te&&o.jsx(gO,{brand:f,shots:m,attached:H,onProduct:_=>{var ie;return(ie=tt.current)==null?void 0:ie.insertToken({t:"product",id:_})},onCharacter:_=>{var ie;return(ie=tt.current)==null?void 0:ie.insertToken({t:"character",id:_})},onColor:(_,ie)=>{var Te;return(Te=tt.current)==null?void 0:Te.insertToken({t:"color",hex:_,name:ie})},onRef:_=>{var ie;return(ie=tt.current)==null?void 0:ie.insertToken({t:"ref",imageHash:_})},onTemplate:_=>{var ie;return(ie=tt.current)==null?void 0:ie.applyScene(_)},onClose:()=>U(!1)}),o.jsxs(g9,{full:!ar,children:[ae.size>0&&o.jsx(jO,{count:ae.size,sets:g,onAdd:_=>void gt(_),onNew:()=>{et.current=[...ae],mt(!0)},onClear:()=>G(new Set),onKeep:()=>void Je(),allKept:de.length>0&&de.every(_=>_.kept),comparable:Le,onCompare:()=>Rn(!0),archivedLens:_t==="archived",pickedIds:[...ae],onRestoreBatch:_=>void Mr(_).then(()=>G(new Set)),onDeleteBatch:_=>void ct(_).then(()=>G(new Set))}),o.jsx(bp,{ref:tt,projectId:xe||null,brand:f,engines:t,parent:Ge,shots:m,initialBrief:X,suppressDraftRestore:gn!==null,startScene:k.get("scene")??void 0,startPresenter:k.get("presenter")??void 0,startProduct:k.get("product")??void 0,openAttachTab:k.get("attach")==="scenes"?"Scenes":k.get("attach")==="products"?"Products":void 0,target:Pe,onClearTarget:pt,onRestoreBranchId:He,setSlug:(e==null?void 0:e.slug)??null,onSending:ue,onAttached:K,sourceImage:dt??void 0,onQueued:(_,ie)=>{W(null),A(cn=>{const Bt=new URLSearchParams(cn);return Bt.delete("scene"),Bt.delete("attach"),Bt.delete("presenter"),Bt.delete("product"),Bt},{replace:!0}),Vt();const Te=()=>ue(null),Fe=()=>{ie!=="edit"||!_||A(cn=>{const Bt=new URLSearchParams(cn);return Bt.set("branch",_),Bt.delete("bi"),Bt},{replace:!0})};e&&_?Ce.addToSet(e.id,[_]).then(bt).then(Fe).finally(Te):bt().then(Fe).finally(Te)}})]}),o.jsx(Uh,{context:vs})]})}function NO(e){return e.width&&e.height?`${e.width} x ${e.height}`:"untouched render"}function AO({open:e,onOpenChange:t,hash:n,baseName:s}){const[i,c]=r.useState([]),[u,f]=r.useState([]),[h,m]=r.useState(!1),[g,v]=r.useState(null);r.useEffect(()=>{e&&(v(null),f(["original"]),Ce.exportPresets().then(c).catch(()=>c([])))},[e]);const y=N=>f(j=>j.includes(N)?j.filter(k=>k!==N):[...j,N]),w=u,E=w.length>0?1:0,C=async()=>{m(!0),v(null);try{w.length>0&&await OH(n,w,s),t(!1)}catch(N){v(N instanceof Error?N.message:"Export failed")}finally{m(!1)}},b=i.map(N=>({id:N.id,label:N.label.replace(/\s*\d+×\d+$/,""),note:NO(N)}));return o.jsx(el,{open:e,onOpenChange:t,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:ru,children:[o.jsx(tu,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-dlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})}),o.jsx(nl,{children:"Export this shot"}),o.jsx("p",{className:"sc-dlg-sub",children:"Pick the sizes you need. Several downloads one zip."}),o.jsx("div",{className:"sc-opts",children:b.map(N=>o.jsxs("button",{type:"button",className:"sc-opt","data-active":u.includes(N.id),onClick:()=>y(N.id),"aria-pressed":u.includes(N.id),children:[o.jsx("span",{className:"sc-cb"}),o.jsxs("span",{children:[N.label,o.jsx("small",{children:N.note})]})]},N.id))}),g&&o.jsx("p",{className:"sc-dlg-err",children:g}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary sc-dlg-go","aria-disabled":E===0||h||void 0,title:E===0&&!h?"Pick at least one size to download":void 0,onClick:()=>{E!==0&&!h&&C()},children:h?o.jsx(ln,{size:"1"}):E===0?"Download":E>1?"Download both":w.length>0?"Download zip":"Download PNG"})]})})}function MO(e){const t=_r.find(n=>{var s;return n.id===((s=e.brief)==null?void 0:s.format)});return t?t.w/t.h:1}function RO({node:e,imageIndex:t,onRetry:n,onCancel:s,engineName:i}){const[c,u]=r.useState(null),[f,h]=r.useState(null),[,m]=r.useState(0);if(r.useEffect(()=>{if(e.status!=="running")return;const g=setInterval(()=>m(v=>v+1),1e3);return()=>clearInterval(g)},[e.status]),r.useEffect(()=>{if(!c)return;const g=()=>{const{naturalWidth:y,naturalHeight:w,clientWidth:E,clientHeight:C}=c;if(!y||!w||!E||!C)return;const b=Math.min(E/y,C/w),N=y*b,j=w*b;h({left:(E-N)/2,top:(C-j)/2,width:N,height:j})};g(),c.addEventListener("load",g);const v=new ResizeObserver(g);return v.observe(c),()=>{c.removeEventListener("load",g),v.disconnect()}},[c]),e.kind==="root")return o.jsx(B0,{className:"sc-frame",p:"8",children:o.jsxs(fr,{direction:"column",align:"center",gap:"2",py:"6",children:[o.jsx(Io,{className:"sc-display",size:"7",align:"center",children:"Blank canvas, full brand."}),o.jsx(Io,{color:"gray",size:"2",align:"center",children:"Pick a Template below (engineered briefs, your product attached) or describe a visual."})]})});if(e.status==="running")return o.jsxs("div",{className:"sc-stage-wait",style:{"--sc-wait-ar":MO(e)},children:[o.jsx("span",{className:"sc-shimmer"}),o.jsxs("div",{className:"sc-stage-wait-say",children:[o.jsxs("span",{className:"sc-stage-wait-t",children:[tp(e.createdAt),", ",eo(e.createdAt),"s"]}),s&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost","data-urgent":eo(e.createdAt)>=60||void 0,onClick:s,children:"Cancel"})]})]});if(e.status==="cancelled"||e.status==="error"){const v=e.status==="cancelled"?fw():oo(e.error,i);return o.jsx(Qm,{failure:v,density:"stage",onRetry:n})}return o.jsx(fr,{justify:"center",children:o.jsx(B0,{className:"sc-frame",style:{display:"inline-block",maxWidth:"100%"},children:e.status==="done"&&e.images[t]&&o.jsxs(B0,{position:"relative",style:{lineHeight:0},children:[o.jsx("img",{ref:u,src:rn(e.images[t]),alt:e.prompt,style:{display:"block",maxWidth:"100%"}}),f&&o.jsx("div",{style:{position:"absolute",left:f.left,top:f.top,width:f.width,height:f.height,lineHeight:"normal"}})]})})})}function PO(e){const{node:t}=e;return o.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:0},children:t?o.jsx(xi,{children:o.jsx("div",{style:{padding:"14px 2px 14px 0"},children:o.jsx(TO,{...e,node:t})})}):o.jsx(fr,{align:"center",justify:"center",style:{flex:1},p:"4",children:o.jsx(Io,{size:"1",style:{color:"var(--sc-fg3)",textAlign:"center"},children:"Pick a shot to see its details."})})})}function LO({children:e}){return o.jsx("div",{className:"sc-eyebrow",style:{margin:"16px 0 7px"},children:e})}function TO({node:e,onCompare:t,onDelete:n}){return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-eyebrow",children:"Brief"}),o.jsx("p",{className:"sc-brief-record",children:uO(e)||"(none)"}),t&&o.jsxs(o.Fragment,{children:[o.jsx(LO,{children:"Compare"}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",style:{width:"100%"},onClick:t,children:"Show what changed"})]}),e.archived&&o.jsx("div",{style:{marginTop:16},children:o.jsx(is,{label:"Delete this shot permanently",title:"Delete this shot permanently?",body:"This cannot be undone.",busy:!1,onConfirm:n,fullWidth:!0})})]})}function HO({size:e=14,dim:t=!1}){return o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":!0,style:{opacity:t?.45:1,flexShrink:0},children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"scCoinFace",x1:"0",y1:"0",x2:"0.7",y2:"1",children:[o.jsx("stop",{offset:"0%",stopColor:"#FFE08A"}),o.jsx("stop",{offset:"45%",stopColor:"#F2B03C"}),o.jsx("stop",{offset:"100%",stopColor:"#C6871B"})]}),o.jsxs("linearGradient",{id:"scCoinInner",x1:"0.2",y1:"0",x2:"0.8",y2:"1",children:[o.jsx("stop",{offset:"0%",stopColor:"#FFF3C4"}),o.jsx("stop",{offset:"100%",stopColor:"#E9A72C"})]})]}),o.jsx("circle",{cx:"12",cy:"12",r:"10.5",fill:"url(#scCoinFace)"}),o.jsx("circle",{cx:"12",cy:"12",r:"8",fill:"url(#scCoinInner)"}),o.jsx("path",{d:"M7.5 7.2a10 10 0 0 1 6.4-2.4",stroke:"#FFF7D6",strokeWidth:"1.4",strokeLinecap:"round",fill:"none",opacity:"0.85"}),o.jsx("circle",{cx:"12",cy:"12",r:"10.5",fill:"none",stroke:"#A66F12",strokeWidth:"1",opacity:"0.55"})]})}function DO({brief:e,brand:t}){var g,v;const{scenes:n,presenters:s,demoProducts:i}=pn(),c=(e==null?void 0:e.tokens)??[];if(!c.length)return null;const u=((g=t==null?void 0:t.json)==null?void 0:g.products)??[],f=((v=t==null?void 0:t.json)==null?void 0:v.characters)??[],h=su(t),m=c.flatMap(y=>{var w,E,C,b;if((y==null?void 0:y.t)==="product"){const N=u.find(k=>k.id===y.id),j=N?null:i.find(k=>k.id===y.id);return[{key:`p${y.id}`,kind:"product",label:(N==null?void 0:N.name)??(j==null?void 0:j.name)??"product",thumb:N?_n((E=(w=N==null?void 0:N.shots)==null?void 0:w[0])==null?void 0:E.file):(j==null?void 0:j.previewUrl)??null,to:t&&(N||j)?Js(t,y.id):void 0}]}if((y==null?void 0:y.t)==="character"){const N=f.find(A=>A.id===y.id),j=N?null:s.find(A=>A.id===y.id),k=(j==null?void 0:j.id)??(N==null?void 0:N.presenterId)??((N==null?void 0:N.origin)==="custom"?N.id:void 0);return[{key:`h${y.id}`,kind:"presenter",label:(N==null?void 0:N.name)??(j==null?void 0:j.name)??"someone",thumb:N?_n(N==null?void 0:N.preview)??_n((b=(C=N==null?void 0:N.shots)==null?void 0:C[0])==null?void 0:b.file):(j==null?void 0:j.avatarUrl)??(j==null?void 0:j.previewUrl)??null,to:t&&k?al(t,k):void 0}]}if((y==null?void 0:y.t)==="template"){const N=h.find(j=>j.id===y.id)??n.find(j=>j.id===y.id);return[{key:`t${y.id}`,kind:"scene",label:(N==null?void 0:N.name)??"a scene no longer in the catalog",thumb:(N==null?void 0:N.previewUrl)??null,to:t&&N?rl(t,N.id):void 0,tint:yp(N==null?void 0:N.previewColor)}]}return(y==null?void 0:y.t)==="color"?[{key:`c${y.hex}`,kind:"color",label:y.name??y.hex,swatch:y.hex}]:[]});return m.length?o.jsx("div",{className:"sc-ingredients",children:m.map(y=>{const w=o.jsxs(o.Fragment,{children:[y.thumb?o.jsx("img",{src:y.thumb,alt:""}):y.swatch?o.jsx("i",{style:{background:y.swatch}}):null,y.label]}),E=y.tint?{"--tint":y.tint}:void 0;return y.to?o.jsx(Kh,{className:"sc-ingredient",to:y.to,"data-kind":y.kind,"data-tinted":y.tint?"":void 0,style:E,title:`Open ${y.kind} ${y.label}`,children:w},y.key):o.jsx("span",{className:"sc-ingredient","data-kind":y.kind,"data-tinted":y.tint?"":void 0,style:E,title:`${y.kind}: ${y.label}`,children:w},y.key)})}):null}function $O(e,t){const n=r.useMemo(()=>new Map(e.map(g=>[g.id,g])),[e]),s=r.useMemo(()=>{const g=[];let v=t.parentId?n.get(t.parentId):null;for(;v&&v.kind!=="root";)g.unshift(v),v=v.parentId?n.get(v.parentId):null;return g},[t,n]),i=r.useMemo(()=>e.filter(g=>g.parentId===t.id&&g.kind!=="root"),[e,t.id]),c=r.useMemo(()=>e.filter(g=>g.parentId===t.parentId&&g.kind!=="root"),[e,t.parentId]),u=c.findIndex(g=>g.id===t.id),f=r.useMemo(()=>e.find(g=>g.kind==="root")??null,[e]),h=t.parentId?n.get(t.parentId):null,m=h&&h.kind!=="root"?h:null;return{byId:n,ancestors:s,children:i,siblings:c,sibIndex:u,root:f,parent:h,parentShot:m}}function FO({node:e,nodes:t,brand:n,engines:s,projectId:i,imageIndex:c,onImageIndex:u,onClose:f,onSelect:h,onRetry:m,onCancel:g,onChanged:v,onRemix:y,onArchive:w,onUnarchive:E,onDelete:C,onRefined:b,tokenNames:N}){const{ancestors:j,children:k,siblings:A,sibIndex:M,root:T,parentShot:D}=$O(t,e),L=r.useMemo(()=>s.find(le=>le.id===e.engineId),[s,e.engineId]),{push:Y}=mr(),I=r.useMemo(()=>R9(e,D),[e,D]),se=r.useMemo(()=>D?cO(D.brief,e.brief,N):null,[D,e.brief,N]),[U,te]=r.useState(!1),[O,ne]=r.useState(!1),[Q,H]=r.useState(!1),K=e.images[c]??e.images[0],X=e.prompt.slice(0,40).replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"")||"shot",W=async()=>{try{const le=await(await fetch(rn(K))).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":le})]),Y({kind:"success",title:"Copied to clipboard"})}catch(le){Y(dn(le,"Copy failed"))}};r.useEffect(()=>{const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[]);const P=[{key:"export",label:"Export",icon:o.jsx(x5,{size:14}),onClick:()=>te(!0)},{key:"keep",label:e.kept?"Remove from keepers":"Keep",icon:o.jsx(mh,{size:14,weight:e.kept?"fill":"regular"}),onClick:()=>void Ce.keep(e.id,!e.kept).then(v).catch(le=>Y(dn(le,"Could not update keeper status"))),tint:e.kept?"var(--sc-star)":void 0},{key:"copy",label:"Copy image",icon:o.jsx(pH,{size:14}),onClick:()=>void W()},...I?[{key:"compare",label:"Compare with source",icon:o.jsx(cH,{size:14}),onClick:()=>ne(!0)}]:[]],Z=[{key:"archive",label:e.archived?"Restore":"Archive",icon:e.archived?o.jsx(o1,{size:14}):o.jsx(Wx,{size:14}),onClick:()=>e.archived?E(e):w(e)},...e.archived?[{key:"delete",label:"Delete permanently",icon:o.jsx(Y1,{size:14}),onClick:()=>H(!0),tint:"var(--sc-red)"}]:[]],ae=e.status==="done"&&e.images.length>0,G=ae?[...P,...Z]:Z,fe=(le,me=!1)=>o.jsxs("button",{type:"button",className:"sc-fr","data-fb-node":le.id,"data-current":me,"data-failed":le.status==="error"||!le.images[0]&&le.status!=="running"&&le.status!=="cancelled","data-cancelled":le.status==="cancelled"&&!le.images[0],title:Cn(le),onClick:()=>h(le.id),children:[le.images[0]?o.jsx("img",{src:rn(le.images[0]),alt:""}):le.status==="running"?o.jsx("span",{className:"sc-shimmer"}):le.status==="cancelled"?o.jsx(ow,{size:13}):o.jsx(nu,{size:13}),le.kept&&o.jsx("span",{className:"sc-fr-star",children:o.jsx(mh,{size:11,weight:"fill"})})]},le.id);return na.createPortal(o.jsx(zc,{trapped:!0,loop:!0,asChild:!0,children:o.jsxs("div",{className:"sc-ovl","data-fb":"shot-overlay","data-fb-node":e.id,"data-fb-variant":c,role:"dialog","aria-modal":"true","aria-label":Cn(e),children:[o.jsxs("header",{className:"sc-ovl-bar",children:[o.jsxs("div",{className:"sc-ovl-bar-l",children:[o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:f,"aria-label":"Close",title:"Close (esc)",children:o.jsx(Mn,{size:13})}),A.length>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"sc-icon-btn",disabled:M<=0,onClick:()=>M>0&&h(A[M-1].id),"aria-label":"Previous version",title:"Previous version",children:o.jsx(wi,{size:13})}),o.jsx("button",{type:"button",className:"sc-icon-btn",disabled:M>=A.length-1,onClick:()=>M<A.length-1&&h(A[M+1].id),"aria-label":"Next version",title:"Next version",children:o.jsx(K1,{size:13})})]})]}),G.length>0&&o.jsxs("div",{className:"sc-ovl-bar-r",children:[o.jsx("div",{className:"sc-ovl-acts",children:G.map(le=>o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:le.onClick,"aria-label":le.label,title:le.label,style:le.tint?{color:le.tint}:void 0,children:le.icon},le.key))}),o.jsxs(_o,{children:[o.jsx(Oo,{children:o.jsx("button",{type:"button",className:"sc-icon-btn sc-ovl-overflow","aria-label":"More actions",children:o.jsx(vH,{size:18,weight:"bold"})})}),o.jsx(Zo,{align:"end",sideOffset:6,children:G.map(le=>o.jsxs(Qr,{onSelect:le.onClick,color:le.tint?"red":void 0,children:[le.icon,le.label]},le.key))})]})]})]}),o.jsx(Yc,{open:Q,onOpenChange:H,children:o.jsxs(qc,{maxWidth:"420px",children:[o.jsx(Xc,{children:"Delete this shot permanently?"}),o.jsx(Qc,{size:"2",children:"This cannot be undone."}),o.jsxs(fr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(eu,{children:o.jsx(ma,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(Jc,{children:o.jsx(ma,{color:"red",onClick:()=>C(e),children:"Delete permanently"})})]})]})}),o.jsxs("div",{className:"sc-ovl-stage","data-takes":e.status==="done"&&e.images.length>1?"":void 0,children:[o.jsx(RO,{node:e,imageIndex:c,onRetry:()=>m(e),onCancel:()=>g(e),engineName:L==null?void 0:L.displayName}),e.status==="done"&&e.images.length>1&&o.jsx("div",{style:{display:"flex",gap:8},children:e.images.map((le,me)=>o.jsx("button",{type:"button",onClick:()=>u(me),"aria-label":`Image ${me+1}`,style:{padding:0,border:"none",background:"none",cursor:"pointer",lineHeight:0},children:o.jsx("img",{src:rn(le),alt:"",className:"sc-thumb","data-active":me===c,width:52,height:52})},le))})]}),o.jsxs("aside",{className:"sc-ovl-meta",children:[o.jsxs("div",{className:"sc-ovl-head",children:[o.jsx("b",{children:e.kind==="edit"?"Refined shot":"Shot"}),o.jsx("small",{children:e.images.length>1?`${c+1} of ${e.images.length} variants`:Cn(e)}),o.jsx("span",{className:"sc-ovl-meta-sep","aria-hidden":!0}),o.jsx("small",{className:"sc-ovl-eng",children:e.engineId}),ae&&o.jsxs("small",{className:"sc-ovl-spend",title:e.costUsd>0?"Of your API budget":"No API cost for this shot",children:[o.jsx(HO,{size:12}),e.costUsd>0?`$${e.costUsd.toFixed(2)}`:"Free"]})]}),o.jsx(DO,{brief:e.brief,brand:n}),D&&o.jsxs("div",{className:"sc-ctx",children:[o.jsxs("button",{type:"button",className:"sc-ctx-chip",onClick:()=>h(D.id),title:`Open ${Cn(D)}, the shot this came from`,children:[I&&o.jsx("img",{src:rn(I),alt:""}),o.jsxs("span",{className:"sc-ctx-chip-t",children:["refined from ",o.jsx("b",{children:Cn(D)})]})]}),se&&o.jsx("p",{className:"sc-ctx-changed",children:se})]}),(j.length>0||k.length>0)&&o.jsxs("div",{className:"sc-ovl-trail",children:[o.jsx("span",{className:"sc-eyebrow",children:"Versions"}),o.jsxs("div",{className:"sc-ovl-trail-row",children:[j.map(le=>o.jsxs("span",{style:{display:"contents"},children:[fe(le),o.jsx("span",{className:"sc-wire"})]},le.id)),fe(e,!0),k.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-wire"}),k.slice(0,4).map(le=>fe(le))]})]})]}),(ae||e.brief)&&o.jsxs("div",{className:"sc-sugg",children:[e.brief&&o.jsxs("button",{type:"button",className:"sc-s",onClick:()=>y(e),title:"Put this shot's setup back in the brief, to change and run again",children:[o.jsx(lH,{size:12})," Reuse setup"]}),ae&&o.jsxs("button",{type:"button",className:"sc-s",onClick:()=>m(e),title:"Run the same setup again for a different take",children:[o.jsx(o1,{size:12})," Try again"]})]}),o.jsx("div",{className:"sc-ovl-body",children:o.jsx(PO,{node:e.kind!=="root"?e:null,nodes:t,imageIndex:c,onChanged:v,brand:n,onExport:()=>te(!0),onCompare:I?()=>ne(!0):void 0,onArchive:()=>w(e),onUnarchive:()=>E(e),onDelete:()=>C(e)})}),o.jsxs("div",{className:"sc-ovl-edit",children:[e.status==="done"&&e.images.length>0&&o.jsx("div",{className:"sc-eyebrow sc-ovl-edit-head",children:"Refine this shot"}),o.jsx(bp,{projectId:i,brand:n,engines:s,parent:T,target:e,sourceImage:K,shots:t,persistDraft:!1,onQueued:async(le,me)=>{await v(),le&&h(le),le&&(b==null||b(le,me))}})]})]}),o.jsx(AO,{open:U,onOpenChange:te,hash:K,baseName:X}),D&&I&&o.jsx(P9,{open:O,onOpenChange:ne,a:D,b:e,imageA:I,imageB:K})]})}),document.body)}function nv(){const{shotId:e}=za(),t=$E(),{push:n}=mr(),s=t.nodes.find(h=>h.id===e)??null,i=t.loaded&&(!s||s.kind==="root"),[c,u]=r.useState(null),f=i&&c===e;return r.useEffect(()=>{if(!i||!e||c===e)return;let h=!0;return t.reload().finally(()=>h&&u(e)),()=>{h=!1}},[i,e,c,t.reload]),r.useEffect(()=>{s&&u(null)},[s]),r.useEffect(()=>{f&&(n({kind:"error",title:"That shot is no longer available",detail:"Back to the feed."}),t.close())},[f,t.close,n]),t.loaded?!s||s.kind==="root"?f?null:o.jsx("div",{className:"sc-ovl-wait",role:"status","aria-label":"Loading",children:o.jsx(ln,{size:"3"})}):o.jsx(FO,{node:s,nodes:t.nodes,brand:t.brand,engines:t.engines,projectId:t.projectId,imageIndex:t.imageIndex,onImageIndex:t.setImageIndex,onClose:t.close,onSelect:t.select,onRetry:t.retry,onCancel:t.cancel,onChanged:t.reload,onRefined:t.refined,tokenNames:t.tokenNames,onRemix:t.remix,onArchive:()=>t.archive(s),onUnarchive:()=>t.unarchive(s),onDelete:()=>t.delete(s)}):o.jsx("div",{className:"sc-ovl-wait",role:"status","aria-label":"Loading",children:o.jsx(ln,{size:"3"})})}function IO(){const e=Zv();return o.jsx(fr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(Jm,{failure:oo(String((e==null?void 0:e.message)??e))})})}function _O(){const{setSlug:e=""}=za(),{pathname:t,search:n}=mn(),{brand:s,sets:i,loaded:c,refresh:u}=It(),f=an(),h=lr({path:Ye.set,end:!1}),m=i.find(y=>y.slug===e)??i.find(y=>y.id===e)??null,[g,v]=r.useState(null);if(r.useEffect(()=>{if(!c||m)return;if(g===e){f(ur(s),{replace:!0});return}let y=!0;return u().finally(()=>y&&v(e)),()=>{y=!1}},[c,m,e,g,s,f,u]),r.useEffect(()=>{m&&v(null)},[m]),!c||!m)return null;if(m.slug!==e){const y=h?t.slice(h.pathnameBase.length):"";return o.jsx(Ys,{to:cc(s,m)+y+n,replace:!0})}return o.jsx(L9,{set:m},m.id)}function OO(){const{pathname:e,search:t}=mn();return o.jsx(Ys,{to:zH(e,t),replace:!0})}function ZO(){const{brandSlug:e}=za();return o.jsx(Ys,{to:`/${e}?settings=brand`,replace:!0})}function VO(){const{sceneId:e}=za();return o.jsx(I_,{},e)}function zO(){const{presenterId:e}=za();return o.jsx(Z_,{},e)}function BO(){const{productId:e}=za();return o.jsx(J_,{},e)}const UO=PC([{element:o.jsx(RF,{}),errorElement:o.jsx(IO,{}),children:[{index:!0,element:o.jsx(CF,{})},{path:Ye.setup,element:o.jsx(PF,{})},{path:Ye.legacy,element:o.jsx(OO,{})},{path:Ye.brand,element:o.jsx(jF,{}),children:[{index:!0,element:o.jsx(H_,{})},{path:Ye.hub,element:o.jsx(L9,{set:null}),children:[{path:Ye.hubShot,element:o.jsx(nv,{})}]},{path:Ye.set,element:o.jsx(_O,{}),children:[{path:Ye.setShot,element:o.jsx(nv,{})}]},{path:Ye.kit,element:o.jsx(ZO,{})},{path:Ye.products,element:o.jsx(B_,{})},{path:Ye.product,element:o.jsx(BO,{})},{path:Ye.scenes,element:o.jsx($_,{})},{path:Ye.scene,element:o.jsx(VO,{})},{path:Ye.presenters,element:o.jsx(O_,{})},{path:Ye.presenter,element:o.jsx(zO,{})}]},{path:Ye.notFound,element:o.jsx(Ys,{to:Ye.root,replace:!0})}]}]),T2=localStorage.getItem("sc-theme")??localStorage.getItem("bt-theme");document.documentElement.dataset.theme=T2==="light"||T2==="dark"?T2:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";xb.createRoot(document.getElementById("root")).render(o.jsx($t.StrictMode,{children:o.jsx(KL,{children:o.jsx(TH,{children:o.jsx(tC,{router:UO})})})}));
|