scenri 0.4.4 → 0.4.5
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 +11 -0
- package/README.md +1 -1
- package/dist/{chunk-WIIQZN3K.js → chunk-FYQ5BAFA.js} +23 -6
- package/dist/{cli-PBDPZQ4G.js → cli-KSKENGIR.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/serve.js +19 -2
- package/package.json +1 -1
- package/studio-dist/assets/{index-5fvERzuB.js → index-CXHDyFny.js} +5 -5
- package/studio-dist/index.html +1 -1
|
@@ -89,14 +89,14 @@ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}
|
|
|
89
89
|
`)},B4=function(){var e=parseInt(document.body.getAttribute(Wl)||"0",10);return isFinite(e)?e:0},mj=function(){r.useEffect(function(){return document.body.setAttribute(Wl,(B4()+1).toString()),function(){var e=B4()-1;e<=0?document.body.removeAttribute(Wl):document.body.setAttribute(Wl,e.toString())}},[])},pj=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;mj();var c=r.useMemo(function(){return dj(i)},[i]);return r.createElement(fj,{styles:hj(c,!t,i,n?"":"!important")})},nh=!1;if(typeof window<"u")try{var b0=Object.defineProperty({},"passive",{get:function(){return nh=!0,!0}});window.addEventListener("test",b0,b0),window.removeEventListener("test",b0,b0)}catch{nh=!1}var Rl=nh?{passive:!1}:!1,gj=function(e){return e.tagName==="TEXTAREA"},O3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!gj(e)&&n[t]==="visible")},vj=function(e){return O3(e,"overflowY")},yj=function(e){return O3(e,"overflowX")},U4=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=V3(e,s);if(i){var c=z3(e,s),u=c[1],f=c[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},xj=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},wj=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},V3=function(e,t){return e==="v"?vj(t):yj(t)},z3=function(e,t){return e==="v"?xj(t):wj(t)},bj=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ej=function(e,t,n,s,i){var c=bj(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=z3(e,f),b=w[0],C=w[1],E=w[2],N=C-E-c*b;(b||N)&&V3(e,f)&&(v+=N,y+=b);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},E0=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W4=function(e){return[e.deltaX,e.deltaY]},G4=function(e){return e&&"current"in e?e.current:e},Cj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sj=function(e){return`
|
|
90
90
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
91
91
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
92
|
-
`)},jj=0,Pl=[];function kj(e){var t=r.useRef([]),n=r.useRef([0,0]),s=r.useRef(),i=r.useState(jj++)[0],c=r.useState(Z3)[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=GS([e.lockRef.current],(e.shards||[]).map(G4),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=r.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var N=E0(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 P=window.getSelection(),G=P&&P.anchorNode,I=G?G===T||G.contains(T):!1;if(I)return!1;var oe=U4(D,T);if(!oe)return!0;if(oe?M=D:(M=D==="v"?"h":"v",oe=U4(D,T)),!oe)return!1;if(!s.current&&"changedTouches"in C&&(k||A)&&(s.current=M),!M)return!0;var W=s.current||M;return Ej(W,E,C,W==="h"?k:A)},[]),h=r.useCallback(function(C){var E=C;if(!(!Pl.length||Pl[Pl.length-1]!==c)){var N="deltaY"in E?W4(E):E0(E),j=t.current.filter(function(M){return M.name===E.type&&(M.target===E.target||E.target===M.shadowParent)&&Cj(M.delta,N)})[0];if(j&&j.should){E.cancelable&&E.preventDefault();return}if(!j){var k=(u.current.shards||[]).map(G4).filter(Boolean).filter(function(M){return M.contains(E.target)}),A=k.length>0?f(E,k[0]):!u.current.noIsolation;A&&E.cancelable&&E.preventDefault()}}},[]),m=r.useCallback(function(C,E,N,j){var k={name:C,delta:E,target:N,should:j,shadowParent:Aj(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=E0(C),s.current=void 0},[]),v=r.useCallback(function(C){m(C.type,W4(C),C.target,f(C,e.lockRef.current))},[]),y=r.useCallback(function(C){m(C.type,E0(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,b=e.inert;return r.createElement(r.Fragment,null,b?r.createElement(c,{styles:Sj(i)}):null,w?r.createElement(pj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Aj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Nj=nj(_3,kj);var Wc=r.forwardRef(function(e,t){return r.createElement(R1,Ha({},e,{ref:t,sideCar:Nj}))});Wc.classNames=R1.classNames;var Mj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ll=new WeakMap,C0=new WeakMap,S0={},o2=0,B3=function(e){return e&&(e.host||B3(e.parentNode))},Rj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=B3(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})},Pj=function(e,t,n,s){var i=Rj(t,Array.isArray(e)?e:[e]);S0[n]||(S0[n]=new WeakMap);var c=S0[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),b=w!==null&&w!=="false",C=(Ll.get(y)||0)+1,E=(c.get(y)||0)+1;Ll.set(y,C),c.set(y,E),u.push(y),C===1&&b&&C0.set(y,!0),E===1&&y.setAttribute(n,"true"),b||y.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return g(t),f.clear(),o2++,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||(C0.has(v)||v.removeAttribute(s),C0.delete(v)),w||v.removeAttribute(n)}),o2--,o2||(Ll=new WeakMap,Ll=new WeakMap,C0=new WeakMap,S0={})}},P1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=Mj(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),Pj(s,i,n,"aria-hidden")):function(){return null}},Lj=Object.defineProperty,Or=(e,t)=>Lj(e,"name",{value:t,configurable:!0}),cm="Dialog",[U3,W3]=Cr(cm),[Tj,Ca]=U3(cm),ui=Or(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:cm}),[v,y]=r.useState(0),[w,b]=r.useState(0);return o.jsx(Tj,{scope:t,triggerRef:f,contentRef:h,contentId:ga(),titleId:ga(),descriptionId:ga(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:b,open:m,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(C=>!C),[g]),modal:u,children:n})},"Dialog"),Hj="DialogTrigger",um=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Hj,s),u=gt(n,c.triggerRef);return o.jsx(xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":T1(c.open),...i,ref:u,onClick:$e(t.onClick,c.onOpenToggle)})},"DialogTrigger")),G3="DialogPortal",[Dj,K3]=U3(G3,{forceMount:void 0}),di=Or(e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,c=Ca(G3,t);return o.jsx(Dj,{scope:t,forceMount:n,children:r.Children.map(s,u=>o.jsx(Sr,{present:n||c.open,children:o.jsx(M1,{asChild:!0,container:i,children:u})}))})},"DialogPortal"),rh="DialogOverlay",fi=r.forwardRef(Or(function(t,n){const s=K3(rh,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=Ca(rh,t.__scopeDialog);return u.modal?o.jsx(Sr,{present:i||u.open,children:o.jsx(Fj,{...c,ref:n})}):null},"DialogOverlay")),$j=wa("DialogOverlay.RemoveScroll"),Fj=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(rh,s),u=N3(),f=gt(n,u);return o.jsx(Wc,{as:$j,allowPinchZoom:!0,shards:[c.contentRef],children:o.jsx(xt.div,{"data-state":T1(c.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),kc="DialogContent",hi=r.forwardRef(Or(function(t,n){const s=K3(kc,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=Ca(kc,t.__scopeDialog);return o.jsx(Sr,{present:i||u.open,children:u.modal?o.jsx(Ij,{...c,ref:n}):o.jsx(_j,{...c,ref:n})})},"DialogContent")),Ij=r.forwardRef(Or(function(t,n){const s=Ca(kc,t.__scopeDialog),i=r.useRef(null),c=gt(n,s.contentRef,i);return r.useEffect(()=>{const u=i.current;if(u)return P1(u)},[]),o.jsx(Y3,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:$e(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),(f=s.triggerRef.current)==null||f.focus()}),onPointerDownOutside:$e(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:$e(t.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),_j=r.forwardRef(Or(function(t,n){const s=Ca(kc,t.__scopeDialog),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(Y3,{...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")),Y3=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,...f}=t,h=Ca(kc,s);return ci(),o.jsx(o.Fragment,{children:o.jsx(Uc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(N1,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":T1(h.open),...f,ref:n,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),Zj="DialogTitle",mi=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Zj,s),{setTitleCount:u}=c;return Nn(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(xt.h2,{id:c.titleId,...i,ref:n})},"DialogTitle")),Oj="DialogDescription",dm=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Oj,s),{setDescriptionCount:u}=c;return Nn(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(xt.p,{id:c.descriptionId,...i,ref:n})},"DialogDescription")),Vj="DialogClose",L1=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Vj,s);return o.jsx(xt.button,{type:"button",...i,ref:n,onClick:$e(t.onClick,()=>c.onOpenChange(!1))})},"DialogClose"));function T1(e){return e?"open":"closed"}Or(T1,"getState");var zj=Object.defineProperty,fs=(e,t)=>zj(e,"name",{value:t,configurable:!0}),Bj="AlertDialog",[Uj,cO]=Cr(Bj,[W3]),hs=W3(),Wj=fs(e=>{const{__scopeAlertDialog:t,...n}=e,s=hs(t);return o.jsx(ui,{...s,...n,modal:!0})},"AlertDialog"),Gj=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(um,{...c,...i,ref:n})},"AlertDialogTrigger")),Kj=fs(e=>{const{__scopeAlertDialog:t,...n}=e,s=hs(t);return o.jsx(di,{...s,...n})},"AlertDialogPortal"),Yj=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(fi,{...c,...i,ref:n})},"AlertDialogOverlay")),qj="AlertDialogContent",[Xj,Qj]=Uj(qj),Jj=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,children:i,...c}=t,u=hs(s),f=r.useRef(null),h=gt(n,f),m=r.useRef(null);return o.jsx(Xj,{scope:s,cancelRef:m,children:o.jsx(hi,{role:"alertdialog",...u,...c,ref:h,onOpenAutoFocus:$e(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")),ek=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(mi,{...c,...i,ref:n})},"AlertDialogTitle")),tk=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(dm,{...c,...i,ref:n})},"AlertDialogDescription")),nk=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(L1,{...c,...i,ref:n})},"AlertDialogAction")),rk="AlertDialogCancel",ak=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,{cancelRef:c}=Qj(rk,s),u=hs(s),f=gt(n,c);return o.jsx(L1,{...u,...i,ref:f})},"AlertDialogCancel")),sk=Wj,ok=Gj,lk=Kj,ik=Yj,ck=Jj,uk=nk,dk=ak,fk=ek,hk=tk,mk=Object.defineProperty,pk=(e,t)=>mk(e,"name",{value:t,configurable:!0});function q3(e){const[t,n]=r.useState(void 0);return Nn(()=>{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}pk(q3,"useSize");const gk=["top","right","bottom","left"],Xs=Math.min,ls=Math.max,e1=Math.round,j0=Math.floor,is=e=>({x:e,y:e}),vk={left:"right",right:"left",bottom:"top",top:"bottom"};function X3(e,t,n){return ls(e,Xs(t,n))}function ds(e,t){return typeof e=="function"?e(t):e}function Qs(e){return e.split("-")[0]}function pi(e){return e.split("-")[1]}function fm(e){return e==="x"?"y":"x"}function hm(e){return e==="y"?"height":"width"}function Da(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mm(e){return fm(Da(e))}function yk(e,t,n){n===void 0&&(n=!1);const s=pi(e),i=mm(e),c=hm(i);let u=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=t1(u)),[u,t1(u)]}function xk(e){const t=t1(e);return[ah(e),t,ah(t)]}function ah(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const K4=["left","right"],Y4=["right","left"],wk=["top","bottom"],bk=["bottom","top"];function Ek(e,t,n){switch(e){case"top":case"bottom":return n?t?Y4:K4:t?K4:Y4;case"left":case"right":return t?wk:bk;default:return[]}}function Ck(e,t,n,s){const i=pi(e);let c=Ek(Qs(e),n==="start",s);return i&&(c=c.map(u=>u+"-"+i),t&&(c=c.concat(c.map(ah)))),c}function t1(e){const t=Qs(e);return vk[t]+e.slice(t.length)}function Sk(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 Q3(e){return typeof e!="number"?Sk(e):{top:e,right:e,bottom:e,left:e}}function n1(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 q4(e,t,n){let{reference:s,floating:i}=e;const c=Da(t),u=mm(t),f=hm(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 b=pi(t);return b&&(w[u]+=y*(b==="end"?1:-1)*(n&&m?-1:1)),w}async function jk(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}=ds(t,e),b=Q3(w),E=f[y?v==="floating"?"reference":"floating":v],N=n1(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(E)))==null||n?E:E.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=n1(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:j,offsetParent:k,strategy:h}):j);return{top:(N.top-M.top+b.top)/A.y,bottom:(M.bottom-N.bottom+b.bottom)/A.y,left:(N.left-M.left+b.left)/A.x,right:(M.right-N.right+b.right)/A.x}}const kk=50,Ak=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=n,f=u.detectOverflow?u:{...u,detectOverflow:jk},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}=q4(m,s,h),y=s,w=0;const b={};for(let C=0;C<c.length;C++){const E=c[C];if(!E)continue;const{name:N,fn:j}=E,{x:k,y:A,data:M,reset:T}=await j({x:g,y:v,initialPlacement:s,placement:y,strategy:i,middlewareData:b,rects:m,platform:f,elements:{reference:e,floating:t}});g=k??g,v=A??v,b[N]={...b[N],...M},T&&w<kk&&(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}=q4(m,y,h)),C=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:b}},Nk=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}=ds(e,t)||{};if(m==null)return{};const v=Q3(g),y={x:n,y:s},w=mm(i),b=hm(w),C=await u.getDimensions(m),E=w==="y",N=E?"top":"left",j=E?"bottom":"right",k=E?"clientHeight":"clientWidth",A=c.reference[b]+c.reference[w]-y[w]-c.floating[b],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[b]);const P=A/2-M/2,G=D/2-C[b]/2-1,I=Xs(v[N],G),oe=Xs(v[j],G),W=D-C[b]-oe,J=D/2-C[b]/2+P,Z=X3(I,J,W),ee=!h.arrow&&pi(i)!=null&&J!==Z&&c.reference[b]/2-(J<I?I:oe)-C[b]/2<0,q=ee?J<I?J-I:J-W:0;return{[w]:y[w]+q,data:{[w]:Z,centerOffset:J-Z-q,...ee&&{alignmentOffset:q}},reset:ee}}}),Mk=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:b="none",flipAlignment:C=!0,...E}=ds(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const N=Qs(i),j=Da(f),k=Qs(f)===f,A=await(h.isRTL==null?void 0:h.isRTL(m.floating)),M=y||(k||!C?[t1(f)]:xk(f)),T=b!=="none";!y&&T&&M.push(...Ck(f,C,b,A));const D=[f,...M],P=await h.detectOverflow(t,E),G=[];let I=((s=c.flip)==null?void 0:s.overflows)||[];if(g&&G.push(P[N]),v){const Z=yk(i,u,A);G.push(P[Z[0]],P[Z[1]])}if(I=[...I,{placement:i,overflows:G}],!G.every(Z=>Z<=0)){var oe,W;const Z=(((oe=c.flip)==null?void 0:oe.index)||0)+1,ee=D[Z];if(ee&&(!(v==="alignment"?j!==Da(ee):!1)||I.every(K=>Da(K.placement)===j?K.overflows[0]>0:!0)))return{data:{index:Z,overflows:I},reset:{placement:ee}};let q=(W=I.filter(H=>H.overflows[0]<=0).sort((H,K)=>H.overflows[1]-K.overflows[1])[0])==null?void 0:W.placement;if(!q)switch(w){case"bestFit":{var J;const H=(J=I.filter(K=>{if(T){const X=Da(K.placement);return X===j||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,U)=>X+U,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:J[0];H&&(q=H);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function X4(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Q4(e){return gk.some(t=>e[t]>=0)}const Rk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...c}=ds(e,t);switch(i){case"referenceHidden":{const u=await s.detectOverflow(t,{...c,elementContext:"reference"}),f=X4(u,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Q4(f)}}}case"escaped":{const u=await s.detectOverflow(t,{...c,altBoundary:!0}),f=X4(u,n.floating);return{data:{escapedOffsets:f,escaped:Q4(f)}}}default:return{}}}}},J3=new Set(["left","top"]);async function Pk(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=Da(n)==="y",m=J3.has(u)?-1:1,g=c&&h?-1:1,v=ds(t,e);let{mainAxis:y,crossAxis:w,alignmentAxis:b}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof b=="number"&&(w=f==="end"?b*-1:b),h?{x:w*g,y:y*m}:{x:y*m,y:w*g}}const Lk=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 Pk(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}}}}},Tk=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}=ds(e,t),g={x:n,y:s},v=await c.detectOverflow(t,m),y=Da(i),w=fm(y);let b=g[w],C=g[y];const E=(j,k)=>X3(k+v[j==="y"?"top":"left"],k,k-v[j==="y"?"bottom":"right"]);u&&(b=E(w,b)),f&&(C=E(y,C));const N=h.fn({...t,[w]:b,[y]:C});return{...N,data:{x:N.x-n,y:N.y-s,enabled:{[w]:u,[y]:f}}}}}},Hk=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}=ds(e,t),y={x:i,y:c},w=Da(u),b=fm(w);let C=y[b],E=y[w];const N=ds(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=b==="y"?"height":"width",T=f.reference[b]-f.floating[M]+j.mainAxis,D=f.reference[b]+f.reference[M]-j.mainAxis;C<T?C=T:C>D&&(C=D)}if(v){var k,A;const M=b==="y"?"width":"height",T=J3.has(Qs(u)),D=f.reference[w]-f.floating[M]+(T&&((k=h.offset)==null?void 0:k[w])||0)+(T?0:j.crossAxis),P=f.reference[w]+f.reference[M]+(T?0:((A=h.offset)==null?void 0:A[w])||0)-(T?j.crossAxis:0);E<D?E=D:E>P&&(E=P)}return{[b]:C,[w]:E}}}},Dk=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}=ds(e,t),h=await i.detectOverflow(t,f),m=Qs(n),g=pi(n),v=Da(n)==="y",{width:y,height:w}=s.floating;let b,C;m==="top"||m==="bottom"?(b=m,C=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(C=m,b=g==="end"?"top":"bottom");const E=w-h.top-h.bottom,N=y-h.left-h.right,j=Xs(w-h[b],E),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=E),M&&!g&&(v?D=y-2*ls(h.left,h.right):T=w-2*ls(h.top,h.bottom)),await u({...t,availableWidth:D,availableHeight:T});const P=await i.getDimensions(c.floating);return y!==P.width||w!==P.height?{reset:{rects:!0}}:{}}}};function H1(){return typeof window<"u"}function gi(e){return ey(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ms(e){var t;return(t=(ey(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ey(e){return H1()?e instanceof Node||e instanceof Er(e).Node:!1}function Ia(e){return H1()?e instanceof Element||e instanceof Er(e).Element:!1}function no(e){return H1()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function J4(e){return!H1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}function D1(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=_a(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function $k(e){return/^(table|td|th)$/.test(gi(e))}function $1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Fk=/transform|translate|scale|rotate|perspective|filter/,Ik=/paint|layout|strict|content/,bo=e=>!!e&&e!=="none";let l2;function pm(e){const t=Ia(e)?_a(e):e;return bo(t.transform)||bo(t.translate)||bo(t.scale)||bo(t.rotate)||bo(t.perspective)||!gm()&&(bo(t.backdropFilter)||bo(t.filter))||Fk.test(t.willChange||"")||Ik.test(t.contain||"")}function _k(e){let t=Ho(e);for(;no(t)&&!Ac(t);){if(pm(t))return t;if($1(t))return null;t=Ho(t)}return null}function gm(){return l2==null&&(l2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),l2}function Ac(e){return/^(html|body|#document)$/.test(gi(e))}function _a(e){return Er(e).getComputedStyle(e)}function F1(e){return Ia(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||J4(e)&&e.host||ms(e);return J4(t)?t.host:t}function ty(e){const t=Ho(e);return Ac(t)?(e.ownerDocument||e).body:no(t)&&D1(t)?t:ty(t)}function Nc(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ty(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),u=Er(i);if(c){const f=sh(u);return t.concat(u,u.visualViewport||[],D1(i)?i:[],f&&n?Nc(f):[])}else return t.concat(i,Nc(i,[],n))}function sh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ny(e){const t=_a(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=e1(n)!==c||e1(s)!==u;return f&&(n=c,s=u),{width:n,height:s,$:f}}function vm(e){return Ia(e)?e:e.contextElement}function Gl(e){const t=vm(e);if(!no(t))return is(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:c}=ny(t);let u=(c?e1(n.width):n.width)/s,f=(c?e1(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const Zk=is(0);function ry(e){const t=Er(e);return!gm()||!t.visualViewport?Zk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ok(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Er(e)}function Do(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=vm(e);let u=is(1);t&&(s?Ia(s)&&(u=Gl(s)):u=Gl(e));const f=Ok(c,n,s)?ry(c):is(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=Er(c),w=Ia(s)?Er(s):s;let b=y,C=sh(b);for(;C&&w!==b;){const E=Gl(C),N=C.getBoundingClientRect(),j=_a(C),k=N.left+(C.clientLeft+parseFloat(j.paddingLeft))*E.x,A=N.top+(C.clientTop+parseFloat(j.paddingTop))*E.y;h*=E.x,m*=E.y,g*=E.x,v*=E.y,h+=k,m+=A,b=Er(C),C=sh(b)}}return n1({width:g,height:v,x:h,y:m})}function I1(e,t){const n=F1(e).scrollLeft;return t?t.left+n:Do(ms(e)).left+n}function ay(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-I1(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function Vk(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const c=i==="fixed",u=ms(s),f=t?$1(t.floating):!1;if(s===u||f&&c)return n;let h={scrollLeft:0,scrollTop:0},m=is(1);const g=is(0),v=no(s);if((v||!c)&&((gi(s)!=="body"||D1(u))&&(h=F1(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?ay(u,h):is(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 zk(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Bk(e){const t=F1(e),n=e.ownerDocument.body,s=ls(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ls(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let c=-t.scrollLeft+I1(e);const u=-t.scrollTop;return _a(n).direction==="rtl"&&(c+=ls(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:c,y:u}}const Uk=25;function Wk(e,t,n){n===void 0&&(n="viewport");const s=n==="layoutViewport",i=Er(e),c=ms(e),u=i.visualViewport;let f=c.clientWidth,h=c.clientHeight,m=0,g=0;if(u){const y=!gm()||t==="fixed";s?y||(m=-u.offsetLeft,g=-u.offsetTop):(f=u.width,h=u.height,y&&(m=u.offsetLeft,g=u.offsetTop))}if(I1(c)<=0){const y=c.ownerDocument,w=y.body,b=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(c.clientWidth-w.clientWidth-C),N=getComputedStyle(c).scrollbarGutter==="stable both-edges"?E/2:E;N<=Uk&&(f-=N)}return{width:f,height:h,x:m,y:g}}function Gk(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 eg(e,t,n){let s;if(t==="viewport"||t==="layoutViewport")s=Wk(e,n,t);else if(t==="document")s=Bk(ms(e));else if(Ia(t))s=Gk(t,n);else{const i=ry(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return n1(s)}function Kk(e,t){const n=t.get(e);if(n)return n;let s=Nc(e,[],!1).filter(f=>Ia(f)&&gi(f)!=="body"),i=null;const c=_a(e).position==="fixed";let u=c?Ho(e):e;for(;Ia(u)&&!Ac(u);){const f=_a(u),h=pm(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 Yk(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const u=[...n==="clippingAncestors"?$1(t)?[]:Kk(t,this._c):[].concat(n),s],f=eg(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=eg(t,u[y],i);h=ls(w.top,h),m=Xs(w.right,m),g=Xs(w.bottom,g),v=ls(w.left,v)}return{width:m-v,height:g-h,x:v,y:h}}function qk(e){const{width:t,height:n}=ny(e);return{width:t,height:n}}function Xk(e,t,n){const s=no(t),i=ms(t),c=n==="fixed",u=Do(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=is(0);if((s||!c)&&((gi(t)!=="body"||D1(i))&&(f=F1(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=I1(i));const m=i&&!s&&!c?ay(i,f):is(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 i2(e){return _a(e).position==="static"}function tg(e,t){if(!no(e)||_a(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ms(e)===n&&(n=n.ownerDocument.body),n}function sy(e,t){const n=Er(e);if($1(e))return n;if(!no(e)){let i=Ho(e);for(;i&&!Ac(i);){if(Ia(i)&&!i2(i))return i;i=Ho(i)}return n}let s=tg(e,t);for(;s&&$k(s)&&i2(s);)s=tg(s,t);return s&&Ac(s)&&i2(s)&&!pm(s)?n:s||_k(e)||n}const Qk=async function(e){const t=this.getOffsetParent||sy,n=this.getDimensions,s=await n(e.floating);return{reference:Xk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Jk(e){return _a(e).direction==="rtl"}const eA={convertOffsetParentRelativeRectToViewportRelativeRect:Vk,getDocumentElement:ms,getClippingRect:Yk,getOffsetParent:sy,getElementRects:Qk,getClientRects:zk,getDimensions:qk,getScale:Gl,isElement:Ia,isRTL:Jk};function oy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tA(e,t,n){let s=null,i;const c=ms(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:b,width:C,height:E}=y;if(g||t(),!C||!E)return;const N=j0(b),j=j0(c.clientWidth-(w+C)),k=j0(c.clientHeight-(b+E)),A=j0(w),T={rootMargin:-N+"px "+-j+"px "+-k+"px "+-A+"px",threshold:ls(0,Xs(1,v))||1};let D=!0;function P(G){const I=G[0].intersectionRatio;if(!oy(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(P,{...T,root:c.ownerDocument})}catch{s=new IntersectionObserver(P,T)}s.observe(e)}const h=Er(e),m=()=>f(n);return h.addEventListener("resize",m),f(!0),()=>{h.removeEventListener("resize",m),u()}}function nA(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=vm(e),g=i||c?[...m?Nc(m):[],...t?Nc(t):[]]:[];g.forEach(N=>{i&&N.addEventListener("scroll",n),c&&N.addEventListener("resize",n)});const v=m&&f?tA(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 b,C=h?Do(e):null;h&&E();function E(){const N=Do(e);C&&!oy(C,N)&&n(),C=N,b=requestAnimationFrame(E)}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(b)}}const rA=Lk,aA=Tk,sA=Mk,oA=Dk,lA=Rk,ng=Nk,iA=Hk,cA=(e,t,n)=>{const s=new Map,i=n??{},c={...eA,...i.platform,_c:s};return Ak(e,t,{...i,platform:c})};var uA=typeof document<"u",dA=function(){},B0=uA?r.useLayoutEffect:dA;function r1(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(!r1(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)&&!r1(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function ly(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rg(e,t){const n=ly(e);return Math.round(t*n)/n}function c2(e){const t=r.useRef(e);return B0(()=>{t.current=e}),t}function fA(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);r1(y,s)||w(s);const[b,C]=r.useState(null),[E,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||b,M=u||E,T=r.useRef(null),D=r.useRef(null),P=r.useRef(g),G=h!=null,I=c2(h),oe=c2(i),W=c2(m),J=r.useCallback(()=>{if(!T.current||!D.current)return;const K={placement:t,strategy:n,middleware:y};oe.current&&(K.platform=oe.current),cA(T.current,D.current,K).then(X=>{const U={...X,isPositioned:W.current!==!1};Z.current&&!r1(P.current,U)&&(P.current=U,na.flushSync(()=>{v(U)}))})},[y,t,n,oe,W]);B0(()=>{m===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[m]);const Z=r.useRef(!1);B0(()=>(Z.current=!0,()=>{Z.current=!1}),[]),B0(()=>{if(A&&(T.current=A),M&&(D.current=M),A&&M){if(I.current)return I.current(A,M,J);J()}},[A,M,J,I,G]);const ee=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=rg(q.floating,g.x),U=rg(q.floating,g.y);return f?{...K,transform:"translate("+X+"px, "+U+"px)",...ly(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:U}},[n,f,q.floating,g.x,g.y]);return r.useMemo(()=>({...g,update:J,refs:ee,elements:q,floatingStyles:H}),[g,J,ee,q,H])}const hA=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?ng({element:s.current,padding:i}).fn(n):{}:s?ng({element:s,padding:i}).fn(n):{}}}},mA=(e,t)=>{const n=rA(e);return{name:n.name,fn:n.fn,options:[e,t]}},pA=(e,t)=>{const n=aA(e);return{name:n.name,fn:n.fn,options:[e,t]}},gA=(e,t)=>({fn:iA(e).fn,options:[e,t]}),vA=(e,t)=>{const n=sA(e);return{name:n.name,fn:n.fn,options:[e,t]}},yA=(e,t)=>{const n=oA(e);return{name:n.name,fn:n.fn,options:[e,t]}},xA=(e,t)=>{const n=lA(e);return{name:n.name,fn:n.fn,options:[e,t]}},wA=(e,t)=>{const n=hA(e);return{name:n.name,fn:n.fn,options:[e,t]}};var bA=Object.defineProperty,Ws=(e,t)=>bA(e,"name",{value:t,configurable:!0}),iy="Popper",[cy,ro]=Cr(iy),[EA,uy]=cy(iy),CA=Ws(e=>{const{__scopePopper:t,children:n}=e,[s,i]=r.useState(null),[c,u]=r.useState(void 0);return o.jsx(EA,{scope:t,anchor:s,onAnchorChange:i,placementState:c,setPlacementState:u,children:n})},"Popper"),SA="PopperAnchor",jA=r.forwardRef(Ws(function(t,n){const{__scopePopper:s,virtualRef:i,...c}=t,u=uy(SA,s),f=r.useRef(null),h=u.onAnchorChange,m=r.useCallback(C=>{f.current=C,C&&h(C)},[h]),g=gt(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&&_1(u.placementState),w=y==null?void 0:y[0],b=y==null?void 0:y[1];return i?null:o.jsx(xt.div,{"data-radix-popper-side":w,"data-radix-popper-align":b,...c,ref:g})},"PopperAnchor")),dy="PopperContent",[kA,uO]=cy(dy),AA=r.forwardRef(Ws(function(t,n){var de,be,Te,Ue,ge,st,ht;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:b="optimized",onPlaced:C,...E}=t,N=uy(dy,s),[j,k]=r.useState(null),A=gt(n,k),[M,T]=r.useState(null),D=q3(M),P=(D==null?void 0:D.width)??0,G=(D==null?void 0:D.height)??0,I=i+(u!=="center"?"-"+u:""),oe=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},W=Array.isArray(g)?g:[g],J=W.length>0,Z={padding:oe,boundary:W.filter(fy),altBoundary:J},{refs:ee,floatingStyles:q,placement:H,isPositioned:K,middlewareData:X}=fA({strategy:"fixed",placement:I,whileElementsMounted:Ws((...Rt)=>nA(...Rt,{animationFrame:b==="always"}),"whileElementsMounted"),elements:{reference:N.anchor},middleware:[mA({mainAxis:c+G,alignmentAxis:f}),m&&pA({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?gA():void 0,...Z}),m&&vA({...Z}),yA({...Z,apply:Ws(({elements:Rt,rects:Pe,availableWidth:Ae,availableHeight:Se})=>{const{width:at,height:kt}=Pe.reference,qt=Rt.floating.style;qt.setProperty("--radix-popper-available-width",`${Ae}px`),qt.setProperty("--radix-popper-available-height",`${Se}px`),qt.setProperty("--radix-popper-anchor-width",`${at}px`),qt.setProperty("--radix-popper-anchor-height",`${kt}px`)},"apply")}),M&&wA({element:M,padding:h}),NA({arrowWidth:P,arrowHeight:G}),w&&xA({strategy:"referenceHidden",...Z,boundary:J?Z.boundary:void 0})]}),U=N.setPlacementState;Nn(()=>(U(H),()=>{U(void 0)}),[H,U]);const[L,O]=_1(H),ne=En(C);Nn(()=>{K&&(ne==null||ne())},[K,ne]);const re=(de=X.arrow)==null?void 0:de.x,le=(be=X.arrow)==null?void 0:be.y,ae=((Te=X.arrow)==null?void 0:Te.centerOffset)!==0,[me,he]=r.useState();return Nn(()=>{j&&he(window.getComputedStyle(j).zIndex)},[j]),o.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:K?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(Ue=X.transformOrigin)==null?void 0:Ue.x,(ge=X.transformOrigin)==null?void 0:ge.y].join(" "),...((st=X.hide)==null?void 0:st.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(kA,{scope:s,placedSide:L,placedAlign:O,onArrowChange:T,arrowX:re,arrowY:le,shouldHideArrow:ae,children:o.jsx(xt.div,{"data-side":L,"data-align":O,...E,ref:A,style:{...E.style,animation:K?(ht=E.style)==null?void 0:ht.animation:"none"}})})})},"PopperContent"));function fy(e){return e!==null}Ws(fy,"isNotNull");var NA=Ws(e=>({name:"transformOrigin",options:e,fn(t){var E,N,j;const{placement:n,rects:s,middlewareData:i}=t,u=((E=i.arrow)==null?void 0:E.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=_1(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 b="",C="";return m==="bottom"?(b=u?v:`${y}px`,C=`${-h}px`):m==="top"?(b=u?v:`${y}px`,C=`${s.floating.height+h}px`):m==="right"?(b=`${-h}px`,C=u?v:`${w}px`):m==="left"&&(b=`${s.floating.width+h}px`,C=u?v:`${w}px`),{data:{x:b,y:C}}}}),"transformOrigin");function _1(e){const[t,n="center"]=e.split("-");return[t,n]}Ws(_1,"getSideAndAlignFromPlacement");var ym=CA,Z1=jA,xm=AA,MA=Object.defineProperty,wm=(e,t)=>MA(e,"name",{value:t,configurable:!0}),u2=!1;function hy(){const[e,t]=r.useState(u2);return r.useEffect(()=>{u2||(u2=!0,t(!0))},[]),e}wm(hy,"useIsHydrated");var my=Bo[" useSyncExternalStore ".trim().toString()];function py(){return()=>{}}wm(py,"subscribe");function gy(){return my(py,()=>!0,()=>!1)}wm(gy,"useIsHydratedModern");var RA=typeof my=="function"?gy:hy,PA=Object.defineProperty,Ko=(e,t)=>PA(e,"name",{value:t,configurable:!0}),d2="rovingFocusGroup.onEntryFocus",LA={bubbles:!1,cancelable:!0},O1="RovingFocusGroup",[oh,vy,TA]=A1(O1),[HA,yy]=Cr(O1,[TA]),[DA,$A]=HA(O1),FA=r.forwardRef(Ko(function(t,n){return o.jsx(oh.Provider,{scope:t.__scopeRovingFocusGroup,children:o.jsx(oh.Slot,{scope:t.__scopeRovingFocusGroup,children:o.jsx(IA,{...t,ref:n})})})},"RovingFocusGroup")),IA=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),b=gt(n,w),C=Bc(u),[E,N]=qs({prop:f,defaultProp:h??null,onChange:m,caller:O1}),[j,k]=r.useState(!1),A=En(g),M=vy(s),T=r.useRef(!1),[D,P]=r.useState(0);return r.useEffect(()=>{const G=w.current;if(G)return G.addEventListener(d2,A),()=>G.removeEventListener(d2,A)},[A]),o.jsx(DA,{scope:s,orientation:i,dir:C,loop:c,currentTabStopId:E,onItemFocus:r.useCallback(G=>N(G),[N]),onItemShiftTab:r.useCallback(()=>k(!0),[]),onFocusableItemAdd:r.useCallback(()=>P(G=>G+1),[]),onFocusableItemRemove:r.useCallback(()=>P(G=>G-1),[]),children:o.jsx(xt.div,{tabIndex:j||D===0?-1:0,"data-orientation":i,...y,ref:b,style:{outline:"none",...t.style},onMouseDown:$e(t.onMouseDown,()=>{T.current=!0}),onFocus:$e(t.onFocus,G=>{const I=!T.current;if(G.target===G.currentTarget&&I&&!j){const oe=new CustomEvent(d2,LA);if(G.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const W=M().filter(H=>H.focusable),J=W.find(H=>H.active),Z=W.find(H=>H.id===E),q=[J,Z,...W].filter(Boolean).map(H=>H.ref.current);bm(q,v)}}T.current=!1}),onBlur:$e(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),_A="RovingFocusGroupItem",ZA=r.forwardRef(Ko(function(t,n){const{__scopeRovingFocusGroup:s,focusable:i=!0,active:c=!1,tabStopId:u,children:f,...h}=t,m=ga(),g=u||m,v=$A(_A,s),y=v.currentTabStopId===g,w=vy(s),{onFocusableItemAdd:b,onFocusableItemRemove:C,currentTabStopId:E}=v,N=RA();return Nn(()=>{if(!(!N||!i))return b(),()=>C()},[N,i,b,C]),r.useEffect(()=>{if(!(N||!i))return b(),()=>C()},[N,i,b,C]),o.jsx(oh.ItemSlot,{scope:s,id:g,focusable:i,active:c,children:o.jsx(xt.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...h,ref:n,onMouseDown:$e(t.onMouseDown,j=>{i?v.onItemFocus(g):j.preventDefault()}),onFocus:$e(t.onFocus,()=>v.onItemFocus(g)),onKeyDown:$e(t.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){v.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const k=wy(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?by(M,T+1):M.slice(T+1)}setTimeout(()=>bm(M))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:E!=null}):f})})},"RovingFocusGroupItem")),OA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ko(xy,"getDirectionAwareKey");function wy(e,t,n){const s=xy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return OA[s]}Ko(wy,"getFocusIntent");function bm(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}Ko(bm,"focusFirst");function by(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Ko(by,"wrapArray");var VA=FA,zA=ZA,BA=Object.defineProperty,Mt=(e,t)=>BA(e,"name",{value:t,configurable:!0}),lh=["Enter"," "],UA=["ArrowDown","PageUp","Home"],Ey=["ArrowUp","PageDown","End"],WA=[...UA,...Ey],GA={ltr:[...lh,"ArrowRight"],rtl:[...lh,"ArrowLeft"]},KA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},V1="Menu",[Mc,YA,qA]=A1(V1),[Yo,z1]=Cr(V1,[qA,ro,yy]),Em=ro(),Cy=yy(),[XA,qo]=Yo(V1),[QA,Gc]=Yo(V1),JA=Mt(e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:i,onOpenChange:c,modal:u=!0}=e,f=Em(t),[h,m]=r.useState(null),g=r.useRef(!1),v=En(c),y=Bc(i);return r.useEffect(()=>{const w=Mt(()=>{g.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=Mt(()=>g.current=!1,"handlePointer");return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),r.useEffect(()=>{if(!n)return;const w=Mt(()=>v(!1),"handleBlur");return window.addEventListener("blur",w),()=>window.removeEventListener("blur",w)},[n,v]),o.jsx(ym,{...f,children:o.jsx(XA,{scope:t,open:n,onOpenChange:v,content:h,onContentChange:m,children:o.jsx(QA,{scope:t,onClose:r.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:g,dir:y,modal:u,children:s})})})},"Menu"),Sy=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t,c=Em(s);return o.jsx(Z1,{...c,...i,ref:n})},"MenuAnchor")),jy="MenuPortal",[eN,ky]=Yo(jy,{forceMount:void 0}),tN=Mt(e=>{const{__scopeMenu:t,forceMount:n,children:s,container:i}=e,c=qo(jy,t);return o.jsx(eN,{scope:t,forceMount:n,children:o.jsx(Sr,{present:n||c.open,children:o.jsx(M1,{asChild:!0,container:i,children:s})})})},"MenuPortal"),va="MenuContent",[nN,Cm]=Yo(va),rN=r.forwardRef(Mt(function(t,n){const s=ky(va,t.__scopeMenu),{forceMount:i=s.forceMount,...c}=t,u=qo(va,t.__scopeMenu),f=Gc(va,t.__scopeMenu);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(Sr,{present:i||u.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:f.modal?o.jsx(aN,{...c,ref:n}):o.jsx(sN,{...c,ref:n})})})})},"MenuContent")),aN=r.forwardRef(Mt(function(t,n){const s=qo(va,t.__scopeMenu),i=r.useRef(null),c=gt(n,i);return r.useEffect(()=>{const u=i.current;if(u)return P1(u)},[]),o.jsx(Sm,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:$e(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),sN=r.forwardRef(Mt(function(t,n){const s=qo(va,t.__scopeMenu);return o.jsx(Sm,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),oN=wa("MenuContent.ScrollLock"),Sm=r.forwardRef(Mt(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:b,disableOutsideScroll:C,...E}=t,N=qo(va,s),j=Gc(va,s),k=Em(s),A=Cy(s),M=YA(s),[T,D]=r.useState(null),P=r.useRef(null),G=gt(n,P,N.onContentChange),I=r.useRef(0),oe=r.useRef(""),W=r.useRef(0),J=r.useRef(null),Z=r.useRef("right"),ee=r.useRef(0),q=C?Wc:r.Fragment,H=C?{as:oN,allowPinchZoom:!0}:void 0,K=Mt(U=>{var he,de;const L=oe.current+U,O=M().filter(be=>!be.disabled),ne=document.activeElement,re=(he=O.find(be=>be.ref.current===ne))==null?void 0:he.textValue,le=O.map(be=>be.textValue),ae=Hy(le,L,re),me=(de=O.find(be=>be.textValue===ae))==null?void 0:de.ref.current;Mt((function be(Te){oe.current=Te,window.clearTimeout(I.current),Te!==""&&(I.current=window.setTimeout(()=>be(""),1e3))}),"updateSearch")(L),me&&setTimeout(()=>me.focus())},"handleTypeaheadSearch");r.useEffect(()=>()=>window.clearTimeout(I.current),[]),ci();const X=r.useCallback(U=>{var O,ne;return Z.current===((O=J.current)==null?void 0:O.side)&&$y(U,(ne=J.current)==null?void 0:ne.area)},[]);return o.jsx(nN,{scope:s,searchRef:oe,onItemEnter:r.useCallback(U=>{X(U)&&U.preventDefault()},[X]),onItemLeave:r.useCallback(U=>{var L;X(U)||((L=P.current)==null||L.focus(),D(null))},[X]),onTriggerLeave:r.useCallback(U=>{X(U)&&U.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:r.useCallback(U=>{J.current=U},[]),children:o.jsx(q,{...H,children:o.jsx(Uc,{asChild:!0,trapped:c,onMountAutoFocus:$e(u,U=>{var L;U.preventDefault(),(L=P.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:b,children:o.jsx(VA,{asChild:!0,...A,dir:j.dir,orientation:"vertical",loop:i,currentTabStopId:T,onCurrentTabStopIdChange:D,onEntryFocus:$e(m,U=>{j.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(xm,{role:"menu","aria-orientation":"vertical","data-state":km(N.open),"data-radix-menu-content":"",dir:j.dir,...k,...E,ref:G,style:{outline:"none",...E.style},onKeyDown:$e(E.onKeyDown,U=>{const O=U.target.closest("[data-radix-menu-content]")===U.currentTarget,ne=U.ctrlKey||U.altKey||U.metaKey,re=U.key.length===1;O&&(U.key==="Tab"&&U.preventDefault(),!ne&&re&&K(U.key));const le=P.current;if(U.target!==le||!WA.includes(U.key))return;U.preventDefault();const me=M().filter(he=>!he.disabled).map(he=>he.ref.current);Ey.includes(U.key)&&me.reverse(),Ly(me)}),onBlur:$e(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(I.current),oe.current="")}),onPointerMove:$e(t.onPointerMove,Jl(U=>{const L=U.target,O=ee.current!==U.clientX;if(U.currentTarget.contains(L)&&O){const ne=U.clientX>ee.current?"right":"left";Z.current=ne,ee.current=U.clientX}}))})})})})})})},"MenuContentImpl")),Ay=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(xt.div,{role:"group",...i,ref:n})},"MenuGroup")),lN=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(xt.div,{...i,ref:n})},"MenuLabel")),ih="MenuItem",ag="menu.itemSelect",jm=r.forwardRef(Mt(function(t,n){const{disabled:s=!1,onSelect:i,...c}=t,u=r.useRef(null),f=Gc(ih,t.__scopeMenu),h=Cm(ih,t.__scopeMenu),m=gt(n,u),g=r.useRef(!1),v=Mt(()=>{const y=u.current;if(!s&&y){const w=new CustomEvent(ag,{bubbles:!0,cancelable:!0});y.addEventListener(ag,b=>i==null?void 0:i(b),{once:!0}),am(y,w),w.defaultPrevented?g.current=!1:f.onClose()}},"handleSelect");return o.jsx(Ny,{...c,ref:m,disabled:s,onClick:$e(t.onClick,v),onPointerDown:y=>{var w;(w=t.onPointerDown)==null||w.call(t,y),g.current=!0},onPointerUp:$e(t.onPointerUp,y=>{var w;g.current||(w=y.currentTarget)==null||w.click()}),onKeyDown:$e(t.onKeyDown,y=>{s||y.target!==y.currentTarget||h.searchRef.current!==""&&y.key===" "||lh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})},"MenuItem")),Ny=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,disabled:i=!1,textValue:c,...u}=t,f=Cm(ih,s),h=Cy(s),m=r.useRef(null),g=gt(n,m),[v,y]=r.useState(!1),[w,b]=r.useState("");return r.useEffect(()=>{const C=m.current;C&&b((C.textContent??"").trim())},[u.children]),o.jsx(Mc.ItemSlot,{scope:s,disabled:i,textValue:c??w,children:o.jsx(zA,{asChild:!0,...h,focusable:!i,children:o.jsx(xt.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:$e(t.onPointerMove,Jl(C=>{i?f.onItemLeave(C):(f.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$e(t.onPointerLeave,Jl(C=>f.onItemLeave(C))),onFocus:$e(t.onFocus,()=>y(!0)),onBlur:$e(t.onBlur,()=>y(!1))})})})},"MenuItemImpl")),iN=r.forwardRef(Mt(function(t,n){const{checked:s=!1,onCheckedChange:i,...c}=t;return o.jsx(Ry,{scope:t.__scopeMenu,checked:s,children:o.jsx(jm,{role:"menuitemcheckbox","aria-checked":Rc(s)?"mixed":s,...c,ref:n,"data-state":B1(s),onSelect:$e(c.onSelect,()=>i==null?void 0:i(Rc(s)?!0:!s),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),cN="MenuRadioGroup",[uN,dN]=Yo(cN,{value:void 0,onValueChange:Mt(()=>{},"onValueChange")}),fN=r.forwardRef(Mt(function(t,n){const{value:s,onValueChange:i,...c}=t,u=En(i);return o.jsx(uN,{scope:t.__scopeMenu,value:s,onValueChange:u,children:o.jsx(Ay,{...c,ref:n})})},"MenuRadioGroup")),hN="MenuRadioItem",mN=r.forwardRef(Mt(function(t,n){const{value:s,...i}=t,c=dN(hN,t.__scopeMenu),u=s===c.value;return o.jsx(Ry,{scope:t.__scopeMenu,checked:u,children:o.jsx(jm,{role:"menuitemradio","aria-checked":u,...i,ref:n,"data-state":B1(u),onSelect:$e(i.onSelect,()=>{var f;return(f=c.onValueChange)==null?void 0:f.call(c,s)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),My="MenuItemIndicator",[Ry,pN]=Yo(My,{checked:!1}),gN=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,forceMount:i,...c}=t,u=pN(My,s);return o.jsx(Sr,{present:i||Rc(u.checked)||u.checked===!0,children:o.jsx(xt.span,{...c,ref:n,"data-state":B1(u.checked)})})},"MenuItemIndicator")),vN=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(xt.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})},"MenuSeparator")),yN="MenuSub",[dO,Py]=Yo(yN),k0="MenuSubTrigger",xN=r.forwardRef(Mt(function(t,n){const s=qo(k0,t.__scopeMenu),i=Gc(k0,t.__scopeMenu),c=Py(k0,t.__scopeMenu),u=Cm(k0,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=gt(n,c.onTriggerChange);return o.jsx(Sy,{asChild:!0,...g,children:o.jsx(Ny,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?c.contentId:void 0,"data-state":km(s.open),...t,ref:y,onClick:w=>{var b;(b=t.onClick)==null||b.call(t,w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:$e(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:$e(t.onPointerLeave,Jl(w=>{var C,E;v();const b=(C=s.content)==null?void 0:C.getBoundingClientRect();if(b){const N=(E=s.content)==null?void 0:E.dataset.side,j=N==="right",k=j?-5:5,A=b[j?"left":"right"],M=b[j?"right":"left"];u.onPointerGraceIntentChange({area:[{x:w.clientX+k,y:w.clientY},{x:A,y:b.top},{x:M,y:b.top},{x:M,y:b.bottom},{x:A,y:b.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:$e(t.onKeyDown,w=>{var C;t.disabled||w.target!==w.currentTarget||u.searchRef.current!==""&&w.key===" "||GA[i.dir].includes(w.key)&&(s.onOpenChange(!0),(C=s.content)==null||C.focus(),w.preventDefault())})})})},"MenuSubTrigger")),wN="MenuSubContent",bN=r.forwardRef(Mt(function(t,n){const s=ky(va,t.__scopeMenu),{forceMount:i=s.forceMount,align:c="start",...u}=t,f=qo(va,t.__scopeMenu),h=Gc(va,t.__scopeMenu),m=Py(wN,t.__scopeMenu),g=r.useRef(null),v=gt(n,g);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(Sr,{present:i||f.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:o.jsx(Sm,{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:$e(t.onFocusOutside,y=>{y.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:$e(t.onEscapeKeyDown,y=>{h.onClose(),y.preventDefault()}),onKeyDown:$e(t.onKeyDown,y=>{var C;const w=y.currentTarget.contains(y.target),b=KA[h.dir].includes(y.key);w&&b&&(f.onOpenChange(!1),(C=m.trigger)==null||C.focus(),y.preventDefault())})})})})})},"MenuSubContent"));function km(e){return e?"open":"closed"}Mt(km,"getOpenState");function Rc(e){return e==="indeterminate"}Mt(Rc,"isIndeterminate");function B1(e){return Rc(e)?"indeterminate":e?"checked":"unchecked"}Mt(B1,"getCheckedState");function Ly(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Mt(Ly,"focusFirst");function Ty(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Mt(Ty,"wrapArray");function Hy(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=Ty(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}Mt(Hy,"getNextMatch");function Dy(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}Mt(Dy,"isPointInPolygon");function $y(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dy(n,t)}Mt($y,"isPointerInGraceArea");function Jl(e){return t=>t.pointerType==="mouse"?e(t):void 0}Mt(Jl,"whenMouse");var Fy=JA,Iy=Sy,_y=tN,Zy=rN,Oy=Ay,Vy=lN,zy=jm,By=iN,Uy=fN,Wy=mN,Gy=gN,Ky=vN,Yy=xN,qy=bN,EN=Object.defineProperty,Wn=(e,t)=>EN(e,"name",{value:t,configurable:!0}),Am="ContextMenu",[CN,fO]=Cr(Am,[z1]),jr=z1(),[SN,Xy]=CN(Am),jN=Wn(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:Am}),g=jr(t);return o.jsx(SN,{scope:t,open:h,onOpenChange:m,modal:u,hasInteractedRef:f,children:o.jsx(Fy,{...g,dir:c,open:h,onOpenChange:m,modal:u,children:n})})},"ContextMenu"),kN="ContextMenuTrigger",AN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,disabled:i=!1,...c}=t,u=Xy(kN,s),f=jr(s),[h,m]=r.useState({x:0,y:0}),g=r.useMemo(()=>({current:{getBoundingClientRect:Wn(()=>DOMRect.fromRect({width:0,height:0,...h}),"getBoundingClientRect")}}),[h]),v=r.useRef(0),y=r.useCallback(()=>window.clearTimeout(v.current),[]),w=Wn(b=>{u.hasInteractedRef.current=!0,m({x:b.clientX,y:b.clientY}),u.onOpenChange(!0)},"handleOpen");return r.useEffect(()=>y,[y]),r.useEffect(()=>void(i&&y()),[i,y]),o.jsxs(o.Fragment,{children:[o.jsx(Iy,{...f,virtualRef:g}),o.jsx(xt.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:n,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:i?t.onContextMenu:$e(t.onContextMenu,b=>{y(),w(b),b.preventDefault()}),onPointerDown:i?t.onPointerDown:$e(t.onPointerDown,ic(b=>{y(),u.open&&u.onOpenChange(!1),v.current=window.setTimeout(()=>w(b),700)})),onPointerMove:i?t.onPointerMove:$e(t.onPointerMove,ic(y)),onPointerCancel:i?t.onPointerCancel:$e(t.onPointerCancel,ic(y)),onPointerUp:i?t.onPointerUp:$e(t.onPointerUp,ic(y))})]})},"ContextMenuTrigger")),NN=Wn(e=>{const{__scopeContextMenu:t,...n}=e,s=jr(t);return o.jsx(_y,{...s,...n})},"ContextMenuPortal"),MN="ContextMenuContent",RN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=Xy(MN,s),u=jr(s),f=r.useRef(!1);return o.jsx(Zy,{...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")),PN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Oy,{...c,...i,ref:n})},"ContextMenuGroup")),LN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Vy,{...c,...i,ref:n})},"ContextMenuLabel")),TN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(zy,{...c,...i,ref:n})},"ContextMenuItem")),HN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(By,{...c,...i,ref:n})},"ContextMenuCheckboxItem")),DN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Uy,{...c,...i,ref:n})},"ContextMenuRadioGroup")),$N=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Wy,{...c,...i,ref:n})},"ContextMenuRadioItem")),FN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Gy,{...c,...i,ref:n})},"ContextMenuItemIndicator")),IN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Ky,{...c,...i,ref:n})},"ContextMenuSeparator")),_N=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Yy,{...c,...i,ref:n})},"ContextMenuSubTrigger")),ZN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(qy,{...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}Wn(ic,"whenTouchOrPen");var ON=jN,VN=AN,Qy=NN,zN=RN,BN=PN,UN=LN,WN=TN,GN=HN,KN=DN,YN=$N,Jy=FN,qN=IN,XN=_N,QN=ZN,JN=Object.defineProperty,kr=(e,t)=>JN(e,"name",{value:t,configurable:!0}),Nm="DropdownMenu",[eM,hO]=Cr(Nm,[z1]),Ar=z1(),[tM,e5]=eM(Nm),nM=kr(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:Nm});return o.jsx(tM,{scope:t,triggerId:ga(),triggerRef:m,contentId:ga(),open:g,onOpenChange:v,onOpenToggle:r.useCallback(()=>v(y=>!y),[v]),modal:f,children:o.jsx(Fy,{...h,open:g,onOpenChange:v,dir:s,modal:f,children:n})})},"DropdownMenu"),rM="DropdownMenuTrigger",aM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,disabled:i=!1,...c}=t,u=e5(rM,s),f=Ar(s),h=gt(n,u.triggerRef);return o.jsx(Iy,{asChild:!0,...f,children:o.jsx(xt.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:$e(t.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:$e(t.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),sM=kr(e=>{const{__scopeDropdownMenu:t,...n}=e,s=Ar(t);return o.jsx(_y,{...s,...n})},"DropdownMenuPortal"),oM="DropdownMenuContent",lM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=e5(oM,s),u=Ar(s),f=r.useRef(!1);return o.jsx(Zy,{id:c.contentId,"aria-labelledby":c.triggerId,...u,...i,ref:n,onCloseAutoFocus:$e(t.onCloseAutoFocus,h=>{var m;f.current||(m=c.triggerRef.current)==null||m.focus(),f.current=!1,h.preventDefault()}),onInteractOutside:$e(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")),iM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Oy,{...c,...i,ref:n})},"DropdownMenuGroup")),cM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Vy,{...c,...i,ref:n})},"DropdownMenuLabel")),uM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(zy,{...c,...i,ref:n})},"DropdownMenuItem")),dM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(By,{...c,...i,ref:n})},"DropdownMenuCheckboxItem")),fM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Uy,{...c,...i,ref:n})},"DropdownMenuRadioGroup")),hM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Wy,{...c,...i,ref:n})},"DropdownMenuRadioItem")),mM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Gy,{...c,...i,ref:n})},"DropdownMenuItemIndicator")),pM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ky,{...c,...i,ref:n})},"DropdownMenuSeparator")),gM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Yy,{...c,...i,ref:n})},"DropdownMenuSubTrigger")),vM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(qy,{...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")),yM=nM,xM=aM,t5=sM,wM=lM,bM=iM,EM=cM,CM=uM,SM=dM,jM=fM,kM=hM,n5=mM,AM=pM,NM=gM,MM=vM,RM=Object.defineProperty,PM=(e,t)=>RM(e,"name",{value:t,configurable:!0});function r5(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])}PM(r5,"usePrevious");var LM=Object.defineProperty,TM=(e,t)=>LM(e,"name",{value:t,configurable:!0});function a1(e,[t,n]){return Math.min(n,Math.max(t,e))}TM(a1,"clamp");var HM=Object.defineProperty,Ua=(e,t)=>HM(e,"name",{value:t,configurable:!0}),Mm="Popover",[a5,mO]=Cr(Mm,[ro]),U1=ro(),[DM,ao]=a5(Mm),$M=Ua(e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!1}=e,f=U1(t),h=r.useRef(null),[m,g]=r.useState(!1),[v,y]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:Mm});return o.jsx(ym,{...f,children:o.jsx(DM,{scope:t,contentId:ga(),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"),FM="PopoverAnchor",IM=r.forwardRef(Ua(function(t,n){const{__scopePopover:s,...i}=t,c=ao(FM,s),u=U1(s),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=c;return r.useEffect(()=>(f(),()=>h()),[f,h]),o.jsx(Z1,{...u,...i,ref:n})},"PopoverAnchor")),_M="PopoverTrigger",ZM=r.forwardRef(Ua(function(t,n){const{__scopePopover:s,...i}=t,c=ao(_M,s),u=U1(s),f=gt(n,c.triggerRef),h=o.jsx(xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":Rm(c.open),...i,ref:f,onClick:$e(t.onClick,c.onOpenToggle)});return c.hasCustomAnchor?h:o.jsx(Z1,{asChild:!0,...u,children:h})},"PopoverTrigger")),s5="PopoverPortal",[OM,VM]=a5(s5,{forceMount:void 0}),zM=Ua(e=>{const{__scopePopover:t,forceMount:n,children:s,container:i}=e,c=ao(s5,t);return o.jsx(OM,{scope:t,forceMount:n,children:o.jsx(Sr,{present:n||c.open,children:o.jsx(M1,{asChild:!0,container:i,children:s})})})},"PopoverPortal"),Pc="PopoverContent",BM=r.forwardRef(Ua(function(t,n){const s=VM(Pc,t.__scopePopover),{forceMount:i=s.forceMount,...c}=t,u=ao(Pc,t.__scopePopover);return o.jsx(Sr,{present:i||u.open,children:u.modal?o.jsx(WM,{...c,ref:n}):o.jsx(GM,{...c,ref:n})})},"PopoverContent")),UM=wa("PopoverContent.RemoveScroll"),WM=r.forwardRef(Ua(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(null),c=gt(n,i),u=r.useRef(!1);return r.useEffect(()=>{const f=i.current;if(f)return P1(f)},[]),o.jsx(Wc,{as:UM,allowPinchZoom:!0,children:o.jsx(o5,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$e(t.onCloseAutoFocus,f=>{var h;f.preventDefault(),u.current||(h=s.triggerRef.current)==null||h.focus()}),onPointerDownOutside:$e(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:$e(t.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),GM=r.forwardRef(Ua(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(o5,{...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")),o5=r.forwardRef(Ua(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),b=U1(s);return ci(),o.jsx(Uc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onDismiss:()=>w.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(xm,{"data-state":Rm(w.open),role:"dialog",id:w.contentId,...b,...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")),KM="PopoverClose",YM=r.forwardRef(Ua(function(t,n){const{__scopePopover:s,...i}=t,c=ao(KM,s);return o.jsx(xt.button,{type:"button",...i,ref:n,onClick:$e(t.onClick,()=>c.onOpenChange(!1))})},"PopoverClose"));function Rm(e){return e?"open":"closed"}Ua(Rm,"getState");var qM=$M,XM=IM,QM=ZM,JM=zM,eR=BM,tR=YM,nR=Object.defineProperty,Et=(e,t)=>nR(e,"name",{value:t,configurable:!0});function l5(e,t){return r.useReducer((n,s)=>t[n][s]??n,e)}Et(l5,"useStateMachine");var i5="ScrollArea",[c5,pO]=Cr(i5),[rR,ra]=c5(i5),aR=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),[b,C]=r.useState(null),[E,N]=r.useState(null),[j,k]=r.useState(0),[A,M]=r.useState(0),[T,D]=r.useState(!1),[P,G]=r.useState(!1),I=gt(n,m),oe=Bc(c);return o.jsx(rR,{scope:s,type:i,dir:oe,scrollHideDelay:u,scrollArea:h,viewport:g,onViewportChange:v,content:y,onContentChange:w,scrollbarX:b,onScrollbarXChange:C,scrollbarXEnabled:T,onScrollbarXEnabledChange:D,scrollbarY:E,onScrollbarYChange:N,scrollbarYEnabled:P,onScrollbarYEnabledChange:G,onCornerWidthChange:k,onCornerHeightChange:M,children:o.jsx(xt.div,{dir:oe,...f,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":A+"px",...t.style}})})},"ScrollArea")),sR="ScrollAreaViewport",oR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,children:i,nonce:c,...u}=t,f=ra(sR,s),h=r.useRef(null),m=gt(n,h,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(lR,{nonce:c}),o.jsx(xt.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")),lR=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),ps="ScrollAreaScrollbar",iR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ps,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(cR,{...i,ref:n,forceMount:s}):c.type==="scroll"?o.jsx(uR,{...i,ref:n,forceMount:s}):c.type==="auto"?o.jsx(u5,{...i,ref:n,forceMount:s}):c.type==="always"?o.jsx(Pm,{...i,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),cR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ps,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(Sr,{present:s||u,children:o.jsx(u5,{"data-state":u?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarHover")),uR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ps,t.__scopeScrollArea),u=t.orientation==="horizontal",f=Yc(()=>m("SCROLL_END"),100),[h,m]=l5("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 b=g[v];y!==b&&(m("SCROLL"),f()),y=b},"handleScroll");return g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[c.viewport,u,m,f]),o.jsx(Sr,{present:s||h!=="hidden",children:o.jsx(Pm,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:$e(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:$e(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),u5=r.forwardRef(Et(function(t,n){const s=ra(ps,t.__scopeScrollArea),{forceMount:i,...c}=t,[u,f]=r.useState(!1),h=t.orientation==="horizontal",m=Yc(()=>{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(Sr,{present:i||u,children:o.jsx(Pm,{"data-state":u?"visible":"hidden",...c,ref:n})})},"ScrollAreaScrollbarAuto")),Pm=r.forwardRef(Et(function(t,n){const{orientation:s="vertical",...i}=t,c=ra(ps,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=Lm(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,b){return m5(w,f.current,h,b)}return Et(y,"getScrollPosition"),s==="horizontal"?o.jsx(dR,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollLeft,b=uh(w,h,c.dir);u.current.style.transform=`translate3d(${b}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(fR,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollTop,b=uh(w,h);u.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:w=>{c.viewport&&(c.viewport.scrollTop=w)},onDragScroll:w=>{c.viewport&&(c.viewport.scrollTop=y(w))}}):null},"ScrollAreaScrollbarVisible")),dR=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ps,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=gt(n,m,u.onScrollbarXChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(f5,{"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":Kc(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),Hm(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")),fR=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ps,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=gt(n,m,u.onScrollbarYChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(f5,{"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":Kc(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),Hm(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")),[hR,d5]=c5(ps),f5=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,b=ra(ps,s),[C,E]=r.useState(null),N=gt(n,E),j=r.useRef(null),k=r.useRef(""),A=b.viewport,M=i.content-i.viewport,T=En(v),D=En(m),P=Yc(y,10);function G(I){if(j.current){const oe=I.clientX-j.current.left,W=I.clientY-j.current.top;g({x:oe,y:W})}}return Et(G,"handleDragScroll"),r.useEffect(()=>{const I=Et(oe=>{const W=oe.target;(C==null?void 0:C.contains(W))&&T(oe,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,P),$o(b.content,P),o.jsx(hR,{scope:s,scrollbar:C,hasThumb:c,onThumbChange:En(u),onThumbPointerUp:En(f),onThumbPositionChange:D,onThumbPointerDown:En(h),children:o.jsx(xt.div,{...w,ref:N,style:{position:"absolute",...w.style},onPointerDown:$e(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",b.viewport&&(b.viewport.style.scrollBehavior="auto"),G(I))}),onPointerMove:$e(t.onPointerMove,G),onPointerUp:$e(t.onPointerUp,I=>{const oe=I.target;oe.hasPointerCapture(I.pointerId)&&oe.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=k.current,b.viewport&&(b.viewport.style.scrollBehavior=""),j.current=null})})})},"ScrollAreaScrollbarImpl")),ch="ScrollAreaThumb",mR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=d5(ch,t.__scopeScrollArea);return o.jsx(Sr,{present:s||c.hasThumb,children:o.jsx(pR,{ref:n,...i})})},"ScrollAreaThumb")),pR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,style:i,...c}=t,u=ra(ch,s),f=d5(ch,s),{onThumbPositionChange:h}=f,m=gt(n,f.onThumbChange),g=r.useRef(void 0),v=Yc(()=>{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 b=yR(y,h);g.current=b,h()}},"handleScroll");return h(),y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)}},[u.viewport,v,h]),o.jsx(xt.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:$e(t.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),C=y.clientX-b.left,E=y.clientY-b.top;f.onThumbPointerDown({x:C,y:E})}),onPointerUp:$e(t.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),h5="ScrollAreaCorner",gR=r.forwardRef(Et(function(t,n){const s=ra(h5,t.__scopeScrollArea),i=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&i?o.jsx(vR,{...t,ref:n}):null},"ScrollAreaCorner")),vR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,...i}=t,c=ra(h5,s),[u,f]=r.useState(0),[h,m]=r.useState(0),g=!!(u&&h),{onCornerWidthChange:v,onCornerHeightChange:y}=c;return $o(c.scrollbarX,()=>{var b;const w=((b=c.scrollbarX)==null?void 0:b.offsetHeight)||0;c.onCornerHeightChange(w),m(w)}),$o(c.scrollbarY,()=>{var b;const w=((b=c.scrollbarY)==null?void 0:b.offsetWidth)||0;c.onCornerWidthChange(w),f(w)}),r.useEffect(()=>()=>{v(0),y(0)},[v,y]),g?o.jsx(xt.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 Lm(e,t){const n=e/t;return isNaN(n)?0:n}Et(Lm,"getThumbRatio");function Kc(e){const t=Lm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}Et(Kc,"getThumbSize");function m5(e,t,n,s="ltr"){const i=Kc(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 Tm([h,m],v)(e)}Et(m5,"getScrollPositionFromPointer");function uh(e,t,n="ltr"){const s=Kc(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=a1(e,h);return Tm([0,u],[0,f])(m)}Et(uh,"getThumbOffsetFromScroll");function Tm(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(Tm,"linearScale");function Hm(e,t){return e>0&&e<t}Et(Hm,"isScrollingWithinScrollbarBounds");var yR=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 Yc(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(Yc,"useDebounceCallback");function $o(e,t){const n=En(t);Nn(()=>{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 p5=aR,g5=oR,dh=iR,fh=mR,xR=gR,wR=Object.defineProperty,Ht=(e,t)=>wR(e,"name",{value:t,configurable:!0}),bR=[" ","Enter","ArrowUp","ArrowDown"],ER=[" ","Enter"],ei="Select",[W1,Dm,CR]=A1(ei),[Xo,gO]=Cr(ei,[CR,ro]),$m=ro(),[SR,so]=Xo(ei),[jR,kR]=Xo(ei);function v5(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:b,internal_do_not_use_render:C}=e,E=$m(t),[N,j]=r.useState(null),[k,A]=r.useState(null),[M,T]=r.useState(!1),D=Bc(m),[P,G]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:ei}),[I,oe]=qs({prop:u,defaultProp:f,onChange:h,caller:ei}),W=r.useRef(null),J=r.useRef(I);r.useEffect(()=>{const O=b?N==null?void 0:N.ownerDocument.getElementById(b):N==null?void 0:N.form;if(O instanceof HTMLFormElement){const ne=Ht(()=>oe(J.current),"reset");return O.addEventListener("reset",ne),()=>O.removeEventListener("reset",ne)}},[b,N,oe]);const Z=N?!!b||!!N.closest("form"):!0,[ee,q]=r.useState(new Set),H=ga(),K=Array.from(ee).map(O=>O.props.value).join(";"),X=r.useCallback(O=>{q(ne=>new Set(ne).add(O))},[]),U=r.useCallback(O=>{q(ne=>{const re=new Set(ne);return re.delete(O),re})},[]),L={required:w,trigger:N,onTriggerChange:j,valueNode:k,onValueNodeChange:A,valueNodeHasChildren:M,onValueNodeHasChildrenChange:T,contentId:H,value:I,onValueChange:oe,open:P,onOpenChange:G,dir:D,triggerPointerDownPosRef:W,disabled:y,name:g,autoComplete:v,form:b,nativeOptions:ee,nativeSelectKey:K,isFormControl:Z};return o.jsx(ym,{...E,children:o.jsx(SR,{scope:t,...L,children:o.jsx(W1.Provider,{scope:t,children:o.jsx(jR,{scope:t,onNativeOptionAdd:X,onNativeOptionRemove:U,children:w5(C)?C(L):n})})})})}Ht(v5,"SelectProvider");var AR=Ht(e=>{const{__scopeSelect:t,children:n,...s}=e;return o.jsx(v5,{__scopeSelect:t,...s,internal_do_not_use_render:({isFormControl:i})=>o.jsxs(o.Fragment,{children:[n,i?o.jsx(aP,{__scopeSelect:t}):null]})})},"Select"),NR="SelectTrigger",MR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,disabled:i=!1,...c}=t,u=$m(s),f=so(NR,s),h=f.disabled||i,m=gt(n,f.onTriggerChange),g=Dm(s),v=r.useRef("touch"),[y,w,b]=Fm(E=>{const N=g().filter(A=>!A.disabled),j=N.find(A=>A.value===f.value),k=Im(N,E,j);k!==void 0&&f.onValueChange(k.value)}),C=Ht(E=>{h||(f.onOpenChange(!0),b()),E&&(f.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})},"handleOpen");return o.jsx(Z1,{asChild:!0,...u,children:o.jsx(xt.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":qc(f.value)?"":void 0,...c,ref:m,onClick:$e(c.onClick,E=>{E.currentTarget.focus(),v.current!=="mouse"&&C(E)}),onPointerDown:$e(c.onPointerDown,E=>{v.current=E.pointerType;const N=E.target;N.hasPointerCapture(E.pointerId)&&N.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:$e(c.onKeyDown,E=>{const N=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&w(E.key),!(N&&E.key===" ")&&bR.includes(E.key)&&(C(),E.preventDefault())})})})},"SelectTrigger")),RR="SelectValue",PR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,className:i,style:c,children:u,placeholder:f="",...h}=t,m=so(RR,s),{onValueNodeHasChildrenChange:g}=m,v=u!==void 0,y=gt(n,m.onValueNodeChange);Nn(()=>{g(v)},[g,v]);const w=qc(m.value);return o.jsx(xt.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")),LR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,children:i,...c}=t;return o.jsx(xt.span,{"aria-hidden":!0,...c,ref:n,children:i||"▼"})},"SelectIcon")),TR="SelectPortal",[HR,DR]=Xo(TR,{forceMount:void 0}),$R=Ht(e=>{const{__scopeSelect:t,forceMount:n,...s}=e;return o.jsx(HR,{scope:e.__scopeSelect,forceMount:n,children:o.jsx(M1,{asChild:!0,...s})})},"SelectPortal"),Fo="SelectContent",FR=r.forwardRef(Ht(function(t,n){const s=DR(Fo,t.__scopeSelect),{forceMount:i=s.forceMount,...c}=t,u=so(Fo,t.__scopeSelect),[f,h]=r.useState();return Nn(()=>{h(new DocumentFragment)},[]),o.jsx(Sr,{present:i||u.open,children:({present:m})=>m?o.jsx(ZR,{...c,ref:n}):o.jsx(IR,{...c,fragment:f})})},"SelectContent")),IR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,children:i,fragment:c}=t;return c?na.createPortal(o.jsx(y5,{scope:s,children:o.jsx(W1.Slot,{scope:s,children:o.jsx("div",{ref:n,children:i})})}),c):null},"SelectContentFragment")),ha=10,[y5,G1]=Xo(Fo),_R=wa("SelectContent.RemoveScroll"),ZR=r.forwardRef(Ht(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:b,sticky:C,hideWhenDetached:E,avoidCollisions:N,...j}=t,k=so(Fo,s),[A,M]=r.useState(null),[T,D]=r.useState(null),P=gt(n,M),[G,I]=r.useState(null),[oe,W]=r.useState(null),J=Dm(s),[Z,ee]=r.useState(!1),q=r.useRef(!1);r.useEffect(()=>{if(A)return P1(A)},[A]),ci();const H=r.useCallback(he=>{const[de,...be]=J().map(ge=>ge.ref.current),[Te]=be.slice(-1),Ue=document.activeElement;for(const ge of he)if(ge===Ue||(ge==null||ge.scrollIntoView({block:"nearest"}),ge===de&&T&&(T.scrollTop=0),ge===Te&&T&&(T.scrollTop=T.scrollHeight),ge==null||ge.focus(),document.activeElement!==Ue))return},[J,T]),K=r.useCallback(()=>H([G,A]),[H,G,A]);r.useEffect(()=>{Z&&K()},[Z,K]);const{onOpenChange:X,triggerPointerDownPosRef:U}=k;r.useEffect(()=>{if(A){let he={x:0,y:0};const de=Ht(Te=>{var Ue,ge;he={x:Math.abs(Math.round(Te.pageX)-(((Ue=U.current)==null?void 0:Ue.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((ge=U.current)==null?void 0:ge.y)??0))}},"handlePointerMove"),be=Ht(Te=>{he.x<=10&&he.y<=10?Te.preventDefault():Te.composedPath().includes(A)||X(!1),document.removeEventListener("pointermove",de),U.current=null},"handlePointerUp");return U.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",be,{capture:!0})}}},[A,X,U]),r.useEffect(()=>{const he=Ht(()=>X(!1),"close");return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[X]);const[L,O]=Fm(he=>{const de=J().filter(Ue=>!Ue.disabled),be=de.find(Ue=>Ue.ref.current===document.activeElement),Te=Im(de,he,be);Te&&setTimeout(()=>{var Ue;return(Ue=Te.ref.current)==null?void 0:Ue.focus()})}),ne=r.useCallback((he,de,be)=>{const Te=!q.current&&!be;(k.value!==void 0&&k.value===de||Te)&&(I(he),Te&&(q.current=!0))},[k.value]),re=r.useCallback(()=>A==null?void 0:A.focus(),[A]),le=r.useCallback((he,de,be)=>{const Te=!q.current&&!be;(k.value!==void 0&&k.value===de||Te)&&W(he)},[k.value]),ae=i==="popper"?sg:OR,me=ae===sg?{side:h,sideOffset:m,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:C,hideWhenDetached:E,avoidCollisions:N}:{};return o.jsx(y5,{scope:s,content:A,viewport:T,onViewportChange:D,itemRefCallback:ne,selectedItem:G,onItemLeave:re,itemTextRefCallback:le,focusSelectedItem:K,selectedItemText:oe,position:i,isPositioned:Z,searchRef:L,children:o.jsx(Wc,{as:_R,allowPinchZoom:!0,children:o.jsx(Uc,{asChild:!0,trapped:k.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:$e(c,he=>{var de;(de=k.trigger)==null||de.focus({preventScroll:!0}),he.preventDefault()}),children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:o.jsx(ae,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:he=>he.preventDefault(),...j,...me,onPlaced:()=>ee(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:$e(j.onKeyDown,he=>{const de=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!de&&he.key.length===1&&O(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Te=J().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const Ue=he.target,ge=Te.indexOf(Ue);Te=Te.slice(ge+1)}setTimeout(()=>H(Te)),he.preventDefault()}})})})})})})},"SelectContentImpl")),OR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,onPlaced:i,...c}=t,u=so(Fo,s),f=G1(Fo,s),[h,m]=r.useState(null),[g,v]=r.useState(null),y=gt(n,v),w=Dm(s),b=r.useRef(!1),C=r.useRef(!0),{viewport:E,selectedItem:N,selectedItemText:j,focusSelectedItem:k}=f,A=r.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&g&&E&&N&&j){const P=u.trigger.getBoundingClientRect(),G=g.getBoundingClientRect(),I=u.valueNode.getBoundingClientRect(),oe=j.getBoundingClientRect();if(u.dir!=="rtl"){const Ue=oe.left-G.left,ge=I.left-Ue,st=P.left-ge,ht=P.width+st,Rt=Math.max(ht,G.width),Pe=window.innerWidth-ha,Ae=a1(ge,[ha,Math.max(ha,Pe-Rt)]);h.style.minWidth=ht+"px",h.style.left=Ae+"px"}else{const Ue=G.right-oe.right,ge=window.innerWidth-I.right-Ue,st=window.innerWidth-P.right-ge,ht=P.width+st,Rt=Math.max(ht,G.width),Pe=window.innerWidth-ha,Ae=a1(ge,[ha,Math.max(ha,Pe-Rt)]);h.style.minWidth=ht+"px",h.style.right=Ae+"px"}const W=w(),J=window.innerHeight-ha*2,Z=E.scrollHeight,ee=window.getComputedStyle(g),q=parseInt(ee.borderTopWidth,10),H=parseInt(ee.paddingTop,10),K=parseInt(ee.borderBottomWidth,10),X=parseInt(ee.paddingBottom,10),U=q+H+Z+X+K,L=Math.min(N.offsetHeight*5,U),O=window.getComputedStyle(E),ne=parseInt(O.paddingTop,10),re=parseInt(O.paddingBottom,10),le=P.top+P.height/2-ha,ae=J-le,me=N.offsetHeight/2,he=N.offsetTop+me,de=q+H+he,be=U-de;if(de<=le){const Ue=W.length>0&&N===W[W.length-1].ref.current;h.style.bottom="0px";const ge=g.clientHeight-E.offsetTop-E.offsetHeight,st=Math.max(ae,me+(Ue?re:0)+ge+K),ht=de+st;h.style.height=ht+"px"}else{const Ue=W.length>0&&N===W[0].ref.current;h.style.top="0px";const st=Math.max(le,q+E.offsetTop+(Ue?ne:0)+me)+be;h.style.height=st+"px",E.scrollTop=de-le+E.offsetTop}h.style.margin=`${ha}px 0`,h.style.minHeight=L+"px",h.style.maxHeight=J+"px",i==null||i(),requestAnimationFrame(()=>b.current=!0)}},[w,u.trigger,u.valueNode,h,g,E,N,j,u.dir,i]);Nn(()=>A(),[A]);const[M,T]=r.useState();Nn(()=>{g&&T(window.getComputedStyle(g).zIndex)},[g]);const D=r.useCallback(P=>{P&&C.current===!0&&(A(),k==null||k(),C.current=!1)},[A,k]);return o.jsx(VR,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:b,onScrollButtonChange:D,children:o.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:o.jsx(xt.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})},"SelectItemAlignedPosition")),sg=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,align:i="start",collisionPadding:c=ha,...u}=t,f=$m(s);return o.jsx(xm,{...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")),[VR,zR]=Xo(Fo,{}),og="SelectViewport",BR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,nonce:i,...c}=t,u=G1(og,s),f=zR(og,s),h=gt(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(W1.Slot,{scope:s,children:o.jsx(xt.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:$e(c.onScroll,g=>{const v=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=f;if(w!=null&&w.current&&y){const b=Math.abs(m.current-v.scrollTop);if(b>0){const C=window.innerHeight-ha*2,E=parseFloat(y.style.minHeight),N=parseFloat(y.style.height),j=Math.max(E,N);if(j<C){const k=j+b,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")),UR="SelectGroup",[WR,GR]=Xo(UR),KR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t,c=ga();return o.jsx(WR,{scope:s,id:c,children:o.jsx(xt.div,{role:"group","aria-labelledby":c,...i,ref:n})})},"SelectGroup")),YR="SelectLabel",qR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t,c=GR(YR,s);return o.jsx(xt.div,{id:c.id,...i,ref:n})},"SelectLabel")),hh="SelectItem",[XR,x5]=Xo(hh),QR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,value:i,disabled:c=!1,textValue:u,...f}=t,h=so(hh,s),m=G1(hh,s),g=h.value===i,[v,y]=r.useState(u??""),[w,b]=r.useState(!1),C=En(A=>{var M;return(M=m.itemRefCallback)==null?void 0:M.call(m,A,i,c)}),E=gt(n,C),N=ga(),j=r.useRef("touch"),k=Ht(()=>{c||(h.onValueChange(i),h.onOpenChange(!1))},"handleSelect");return o.jsx(XR,{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(W1.ItemSlot,{scope:s,value:i,disabled:c,textValue:v,children:o.jsx(xt.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:E,onFocus:$e(f.onFocus,()=>b(!0)),onBlur:$e(f.onBlur,()=>b(!1)),onClick:$e(f.onClick,()=>{j.current!=="mouse"&&k()}),onPointerUp:$e(f.onPointerUp,()=>{j.current==="mouse"&&k()}),onPointerDown:$e(f.onPointerDown,A=>{j.current=A.pointerType}),onPointerMove:$e(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:$e(f.onPointerLeave,A=>{var M;A.currentTarget===document.activeElement&&((M=m.onItemLeave)==null||M.call(m))}),onKeyDown:$e(f.onKeyDown,A=>{var T;c||A.target!==A.currentTarget||((T=m.searchRef)==null?void 0:T.current)!==""&&A.key===" "||(ER.includes(A.key)&&k(),A.key===" "&&A.preventDefault())})})})})},"SelectItem")),A0="SelectItemText",JR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,className:i,style:c,...u}=t,f=so(A0,s),h=G1(A0,s),m=x5(A0,s),g=kR(A0,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)}),b=gt(n,y,m.onItemTextChange,w),C=v==null?void 0:v.textContent,E=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 Nn(()=>(N(E),()=>j(E)),[N,j,E]),o.jsxs(o.Fragment,{children:[o.jsx(xt.span,{id:m.textId,...u,ref:b}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!qc(f.value)?na.createPortal(u.children,f.valueNode):null]})},"SelectItemText")),eP="SelectItemIndicator",tP=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t;return x5(eP,s).isSelected?o.jsx(xt.span,{"aria-hidden":!0,...i,ref:n}):null},"SelectItemIndicator")),nP=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t;return o.jsx(xt.div,{"aria-hidden":!0,...i,ref:n})},"SelectSeparator")),rP="SelectBubbleInput",aP=r.forwardRef(Ht(function({__scopeSelect:t,...n},s){const i=so(rP,t),{value:c,onValueChange:u,required:f,disabled:h,name:m,autoComplete:g,form:v}=i,{nativeOptions:y,nativeSelectKey:w}=i,b=r.useRef(null),C=gt(s,b),E=c??"",N=r5(E),j=Array.from(y).some(k=>(k.props.value??"")==="");return r.useEffect(()=>{const k=b.current;if(!k)return;const A=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(A,"value").set;if(N!==E&&T){const D=new Event("change",{bubbles:!0});T.call(k,E),k.dispatchEvent(D)}},[N,E]),o.jsxs(xt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:m,autoComplete:g,disabled:h,form:v,onChange:k=>u(k.target.value),...n,style:{...c3,...n.style},ref:C,defaultValue:E,children:[qc(c)&&!j?o.jsx("option",{value:""}):null,Array.from(y)]},w)},"SelectBubbleInput"));function w5(e){return typeof e=="function"}Ht(w5,"isFunction");function qc(e){return e===""||e===void 0}Ht(qc,"shouldShowPlaceholder");function Fm(e){const t=En(e),n=r.useRef(""),s=r.useRef(0),i=r.useCallback(u=>{const f=n.current+u;t(f),Ht((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]}Ht(Fm,"useTypeaheadSearch");function Im(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=b5(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}Ht(Im,"findNextItem");function b5(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Ht(b5,"wrapArray");var sP=Object.defineProperty,Qo=(e,t)=>sP(e,"name",{value:t,configurable:!0}),[_m,vO]=Cr("Tooltip",[ro]);ro();var oP="TooltipProvider",lP=700,[iP,yO]=_m(oP),cP=Qo(e=>{const{__scopeTooltip:t,delayDuration:n=lP,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(iP,{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"),uP="Tooltip",[xO,wO]=_m(uP),dP="TooltipPortal",[bO,EO]=_m(dP,{forceMount:void 0});function fP(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(fP,"getExitSideFromRect");function hP(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(hP,"getPaddedExitPoints");function mP(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(mP,"getPointsFromRect");function pP(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(pP,"isPointInPolygon");function gP(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),E5(t)}Qo(gP,"getHull");function E5(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(E5,"getHullPresorted");var vP=cP,f2={exports:{}};/*!
|
|
92
|
+
`)},jj=0,Pl=[];function kj(e){var t=r.useRef([]),n=r.useRef([0,0]),s=r.useRef(),i=r.useState(jj++)[0],c=r.useState(Z3)[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=GS([e.lockRef.current],(e.shards||[]).map(G4),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=r.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var N=E0(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 P=window.getSelection(),G=P&&P.anchorNode,I=G?G===T||G.contains(T):!1;if(I)return!1;var oe=U4(D,T);if(!oe)return!0;if(oe?M=D:(M=D==="v"?"h":"v",oe=U4(D,T)),!oe)return!1;if(!s.current&&"changedTouches"in C&&(k||A)&&(s.current=M),!M)return!0;var W=s.current||M;return Ej(W,E,C,W==="h"?k:A)},[]),h=r.useCallback(function(C){var E=C;if(!(!Pl.length||Pl[Pl.length-1]!==c)){var N="deltaY"in E?W4(E):E0(E),j=t.current.filter(function(M){return M.name===E.type&&(M.target===E.target||E.target===M.shadowParent)&&Cj(M.delta,N)})[0];if(j&&j.should){E.cancelable&&E.preventDefault();return}if(!j){var k=(u.current.shards||[]).map(G4).filter(Boolean).filter(function(M){return M.contains(E.target)}),A=k.length>0?f(E,k[0]):!u.current.noIsolation;A&&E.cancelable&&E.preventDefault()}}},[]),m=r.useCallback(function(C,E,N,j){var k={name:C,delta:E,target:N,should:j,shadowParent:Aj(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=E0(C),s.current=void 0},[]),v=r.useCallback(function(C){m(C.type,W4(C),C.target,f(C,e.lockRef.current))},[]),y=r.useCallback(function(C){m(C.type,E0(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,b=e.inert;return r.createElement(r.Fragment,null,b?r.createElement(c,{styles:Sj(i)}):null,w?r.createElement(pj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Aj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Nj=nj(_3,kj);var Wc=r.forwardRef(function(e,t){return r.createElement(R1,Ha({},e,{ref:t,sideCar:Nj}))});Wc.classNames=R1.classNames;var Mj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ll=new WeakMap,C0=new WeakMap,S0={},o2=0,B3=function(e){return e&&(e.host||B3(e.parentNode))},Rj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=B3(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})},Pj=function(e,t,n,s){var i=Rj(t,Array.isArray(e)?e:[e]);S0[n]||(S0[n]=new WeakMap);var c=S0[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),b=w!==null&&w!=="false",C=(Ll.get(y)||0)+1,E=(c.get(y)||0)+1;Ll.set(y,C),c.set(y,E),u.push(y),C===1&&b&&C0.set(y,!0),E===1&&y.setAttribute(n,"true"),b||y.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return g(t),f.clear(),o2++,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||(C0.has(v)||v.removeAttribute(s),C0.delete(v)),w||v.removeAttribute(n)}),o2--,o2||(Ll=new WeakMap,Ll=new WeakMap,C0=new WeakMap,S0={})}},P1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=Mj(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),Pj(s,i,n,"aria-hidden")):function(){return null}},Lj=Object.defineProperty,Or=(e,t)=>Lj(e,"name",{value:t,configurable:!0}),cm="Dialog",[U3,W3]=Cr(cm),[Tj,Ca]=U3(cm),ui=Or(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:cm}),[v,y]=r.useState(0),[w,b]=r.useState(0);return o.jsx(Tj,{scope:t,triggerRef:f,contentRef:h,contentId:ga(),titleId:ga(),descriptionId:ga(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:b,open:m,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(C=>!C),[g]),modal:u,children:n})},"Dialog"),Hj="DialogTrigger",um=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Hj,s),u=gt(n,c.triggerRef);return o.jsx(xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":T1(c.open),...i,ref:u,onClick:$e(t.onClick,c.onOpenToggle)})},"DialogTrigger")),G3="DialogPortal",[Dj,K3]=U3(G3,{forceMount:void 0}),di=Or(e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,c=Ca(G3,t);return o.jsx(Dj,{scope:t,forceMount:n,children:r.Children.map(s,u=>o.jsx(Sr,{present:n||c.open,children:o.jsx(M1,{asChild:!0,container:i,children:u})}))})},"DialogPortal"),rh="DialogOverlay",fi=r.forwardRef(Or(function(t,n){const s=K3(rh,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=Ca(rh,t.__scopeDialog);return u.modal?o.jsx(Sr,{present:i||u.open,children:o.jsx(Fj,{...c,ref:n})}):null},"DialogOverlay")),$j=wa("DialogOverlay.RemoveScroll"),Fj=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(rh,s),u=N3(),f=gt(n,u);return o.jsx(Wc,{as:$j,allowPinchZoom:!0,shards:[c.contentRef],children:o.jsx(xt.div,{"data-state":T1(c.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),kc="DialogContent",hi=r.forwardRef(Or(function(t,n){const s=K3(kc,t.__scopeDialog),{forceMount:i=s.forceMount,...c}=t,u=Ca(kc,t.__scopeDialog);return o.jsx(Sr,{present:i||u.open,children:u.modal?o.jsx(Ij,{...c,ref:n}):o.jsx(_j,{...c,ref:n})})},"DialogContent")),Ij=r.forwardRef(Or(function(t,n){const s=Ca(kc,t.__scopeDialog),i=r.useRef(null),c=gt(n,s.contentRef,i);return r.useEffect(()=>{const u=i.current;if(u)return P1(u)},[]),o.jsx(Y3,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:$e(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),(f=s.triggerRef.current)==null||f.focus()}),onPointerDownOutside:$e(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:$e(t.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),_j=r.forwardRef(Or(function(t,n){const s=Ca(kc,t.__scopeDialog),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(Y3,{...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")),Y3=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,...f}=t,h=Ca(kc,s);return ci(),o.jsx(o.Fragment,{children:o.jsx(Uc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(N1,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":T1(h.open),...f,ref:n,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),Zj="DialogTitle",mi=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Zj,s),{setTitleCount:u}=c;return Nn(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(xt.h2,{id:c.titleId,...i,ref:n})},"DialogTitle")),Oj="DialogDescription",dm=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Oj,s),{setDescriptionCount:u}=c;return Nn(()=>(u(f=>f+1),()=>u(f=>f-1)),[u]),o.jsx(xt.p,{id:c.descriptionId,...i,ref:n})},"DialogDescription")),Vj="DialogClose",L1=r.forwardRef(Or(function(t,n){const{__scopeDialog:s,...i}=t,c=Ca(Vj,s);return o.jsx(xt.button,{type:"button",...i,ref:n,onClick:$e(t.onClick,()=>c.onOpenChange(!1))})},"DialogClose"));function T1(e){return e?"open":"closed"}Or(T1,"getState");var zj=Object.defineProperty,fs=(e,t)=>zj(e,"name",{value:t,configurable:!0}),Bj="AlertDialog",[Uj,uO]=Cr(Bj,[W3]),hs=W3(),Wj=fs(e=>{const{__scopeAlertDialog:t,...n}=e,s=hs(t);return o.jsx(ui,{...s,...n,modal:!0})},"AlertDialog"),Gj=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(um,{...c,...i,ref:n})},"AlertDialogTrigger")),Kj=fs(e=>{const{__scopeAlertDialog:t,...n}=e,s=hs(t);return o.jsx(di,{...s,...n})},"AlertDialogPortal"),Yj=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(fi,{...c,...i,ref:n})},"AlertDialogOverlay")),qj="AlertDialogContent",[Xj,Qj]=Uj(qj),Jj=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,children:i,...c}=t,u=hs(s),f=r.useRef(null),h=gt(n,f),m=r.useRef(null);return o.jsx(Xj,{scope:s,cancelRef:m,children:o.jsx(hi,{role:"alertdialog",...u,...c,ref:h,onOpenAutoFocus:$e(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")),ek=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(mi,{...c,...i,ref:n})},"AlertDialogTitle")),tk=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(dm,{...c,...i,ref:n})},"AlertDialogDescription")),nk=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,c=hs(s);return o.jsx(L1,{...c,...i,ref:n})},"AlertDialogAction")),rk="AlertDialogCancel",ak=r.forwardRef(fs(function(t,n){const{__scopeAlertDialog:s,...i}=t,{cancelRef:c}=Qj(rk,s),u=hs(s),f=gt(n,c);return o.jsx(L1,{...u,...i,ref:f})},"AlertDialogCancel")),sk=Wj,ok=Gj,lk=Kj,ik=Yj,ck=Jj,uk=nk,dk=ak,fk=ek,hk=tk,mk=Object.defineProperty,pk=(e,t)=>mk(e,"name",{value:t,configurable:!0});function q3(e){const[t,n]=r.useState(void 0);return Nn(()=>{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}pk(q3,"useSize");const gk=["top","right","bottom","left"],Xs=Math.min,ls=Math.max,e1=Math.round,j0=Math.floor,is=e=>({x:e,y:e}),vk={left:"right",right:"left",bottom:"top",top:"bottom"};function X3(e,t,n){return ls(e,Xs(t,n))}function ds(e,t){return typeof e=="function"?e(t):e}function Qs(e){return e.split("-")[0]}function pi(e){return e.split("-")[1]}function fm(e){return e==="x"?"y":"x"}function hm(e){return e==="y"?"height":"width"}function Da(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mm(e){return fm(Da(e))}function yk(e,t,n){n===void 0&&(n=!1);const s=pi(e),i=mm(e),c=hm(i);let u=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=t1(u)),[u,t1(u)]}function xk(e){const t=t1(e);return[ah(e),t,ah(t)]}function ah(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const K4=["left","right"],Y4=["right","left"],wk=["top","bottom"],bk=["bottom","top"];function Ek(e,t,n){switch(e){case"top":case"bottom":return n?t?Y4:K4:t?K4:Y4;case"left":case"right":return t?wk:bk;default:return[]}}function Ck(e,t,n,s){const i=pi(e);let c=Ek(Qs(e),n==="start",s);return i&&(c=c.map(u=>u+"-"+i),t&&(c=c.concat(c.map(ah)))),c}function t1(e){const t=Qs(e);return vk[t]+e.slice(t.length)}function Sk(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 Q3(e){return typeof e!="number"?Sk(e):{top:e,right:e,bottom:e,left:e}}function n1(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 q4(e,t,n){let{reference:s,floating:i}=e;const c=Da(t),u=mm(t),f=hm(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 b=pi(t);return b&&(w[u]+=y*(b==="end"?1:-1)*(n&&m?-1:1)),w}async function jk(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}=ds(t,e),b=Q3(w),E=f[y?v==="floating"?"reference":"floating":v],N=n1(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(E)))==null||n?E:E.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=n1(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:j,offsetParent:k,strategy:h}):j);return{top:(N.top-M.top+b.top)/A.y,bottom:(M.bottom-N.bottom+b.bottom)/A.y,left:(N.left-M.left+b.left)/A.x,right:(M.right-N.right+b.right)/A.x}}const kk=50,Ak=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=n,f=u.detectOverflow?u:{...u,detectOverflow:jk},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}=q4(m,s,h),y=s,w=0;const b={};for(let C=0;C<c.length;C++){const E=c[C];if(!E)continue;const{name:N,fn:j}=E,{x:k,y:A,data:M,reset:T}=await j({x:g,y:v,initialPlacement:s,placement:y,strategy:i,middlewareData:b,rects:m,platform:f,elements:{reference:e,floating:t}});g=k??g,v=A??v,b[N]={...b[N],...M},T&&w<kk&&(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}=q4(m,y,h)),C=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:b}},Nk=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}=ds(e,t)||{};if(m==null)return{};const v=Q3(g),y={x:n,y:s},w=mm(i),b=hm(w),C=await u.getDimensions(m),E=w==="y",N=E?"top":"left",j=E?"bottom":"right",k=E?"clientHeight":"clientWidth",A=c.reference[b]+c.reference[w]-y[w]-c.floating[b],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[b]);const P=A/2-M/2,G=D/2-C[b]/2-1,I=Xs(v[N],G),oe=Xs(v[j],G),W=D-C[b]-oe,J=D/2-C[b]/2+P,Z=X3(I,J,W),ee=!h.arrow&&pi(i)!=null&&J!==Z&&c.reference[b]/2-(J<I?I:oe)-C[b]/2<0,q=ee?J<I?J-I:J-W:0;return{[w]:y[w]+q,data:{[w]:Z,centerOffset:J-Z-q,...ee&&{alignmentOffset:q}},reset:ee}}}),Mk=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:b="none",flipAlignment:C=!0,...E}=ds(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const N=Qs(i),j=Da(f),k=Qs(f)===f,A=await(h.isRTL==null?void 0:h.isRTL(m.floating)),M=y||(k||!C?[t1(f)]:xk(f)),T=b!=="none";!y&&T&&M.push(...Ck(f,C,b,A));const D=[f,...M],P=await h.detectOverflow(t,E),G=[];let I=((s=c.flip)==null?void 0:s.overflows)||[];if(g&&G.push(P[N]),v){const Z=yk(i,u,A);G.push(P[Z[0]],P[Z[1]])}if(I=[...I,{placement:i,overflows:G}],!G.every(Z=>Z<=0)){var oe,W;const Z=(((oe=c.flip)==null?void 0:oe.index)||0)+1,ee=D[Z];if(ee&&(!(v==="alignment"?j!==Da(ee):!1)||I.every(K=>Da(K.placement)===j?K.overflows[0]>0:!0)))return{data:{index:Z,overflows:I},reset:{placement:ee}};let q=(W=I.filter(H=>H.overflows[0]<=0).sort((H,K)=>H.overflows[1]-K.overflows[1])[0])==null?void 0:W.placement;if(!q)switch(w){case"bestFit":{var J;const H=(J=I.filter(K=>{if(T){const X=Da(K.placement);return X===j||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,U)=>X+U,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:J[0];H&&(q=H);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function X4(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Q4(e){return gk.some(t=>e[t]>=0)}const Rk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...c}=ds(e,t);switch(i){case"referenceHidden":{const u=await s.detectOverflow(t,{...c,elementContext:"reference"}),f=X4(u,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Q4(f)}}}case"escaped":{const u=await s.detectOverflow(t,{...c,altBoundary:!0}),f=X4(u,n.floating);return{data:{escapedOffsets:f,escaped:Q4(f)}}}default:return{}}}}},J3=new Set(["left","top"]);async function Pk(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=Da(n)==="y",m=J3.has(u)?-1:1,g=c&&h?-1:1,v=ds(t,e);let{mainAxis:y,crossAxis:w,alignmentAxis:b}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof b=="number"&&(w=f==="end"?b*-1:b),h?{x:w*g,y:y*m}:{x:y*m,y:w*g}}const Lk=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 Pk(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}}}}},Tk=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}=ds(e,t),g={x:n,y:s},v=await c.detectOverflow(t,m),y=Da(i),w=fm(y);let b=g[w],C=g[y];const E=(j,k)=>X3(k+v[j==="y"?"top":"left"],k,k-v[j==="y"?"bottom":"right"]);u&&(b=E(w,b)),f&&(C=E(y,C));const N=h.fn({...t,[w]:b,[y]:C});return{...N,data:{x:N.x-n,y:N.y-s,enabled:{[w]:u,[y]:f}}}}}},Hk=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}=ds(e,t),y={x:i,y:c},w=Da(u),b=fm(w);let C=y[b],E=y[w];const N=ds(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=b==="y"?"height":"width",T=f.reference[b]-f.floating[M]+j.mainAxis,D=f.reference[b]+f.reference[M]-j.mainAxis;C<T?C=T:C>D&&(C=D)}if(v){var k,A;const M=b==="y"?"width":"height",T=J3.has(Qs(u)),D=f.reference[w]-f.floating[M]+(T&&((k=h.offset)==null?void 0:k[w])||0)+(T?0:j.crossAxis),P=f.reference[w]+f.reference[M]+(T?0:((A=h.offset)==null?void 0:A[w])||0)-(T?j.crossAxis:0);E<D?E=D:E>P&&(E=P)}return{[b]:C,[w]:E}}}},Dk=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}=ds(e,t),h=await i.detectOverflow(t,f),m=Qs(n),g=pi(n),v=Da(n)==="y",{width:y,height:w}=s.floating;let b,C;m==="top"||m==="bottom"?(b=m,C=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(C=m,b=g==="end"?"top":"bottom");const E=w-h.top-h.bottom,N=y-h.left-h.right,j=Xs(w-h[b],E),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=E),M&&!g&&(v?D=y-2*ls(h.left,h.right):T=w-2*ls(h.top,h.bottom)),await u({...t,availableWidth:D,availableHeight:T});const P=await i.getDimensions(c.floating);return y!==P.width||w!==P.height?{reset:{rects:!0}}:{}}}};function H1(){return typeof window<"u"}function gi(e){return ey(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ms(e){var t;return(t=(ey(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ey(e){return H1()?e instanceof Node||e instanceof Er(e).Node:!1}function Ia(e){return H1()?e instanceof Element||e instanceof Er(e).Element:!1}function no(e){return H1()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function J4(e){return!H1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}function D1(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=_a(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function $k(e){return/^(table|td|th)$/.test(gi(e))}function $1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Fk=/transform|translate|scale|rotate|perspective|filter/,Ik=/paint|layout|strict|content/,bo=e=>!!e&&e!=="none";let l2;function pm(e){const t=Ia(e)?_a(e):e;return bo(t.transform)||bo(t.translate)||bo(t.scale)||bo(t.rotate)||bo(t.perspective)||!gm()&&(bo(t.backdropFilter)||bo(t.filter))||Fk.test(t.willChange||"")||Ik.test(t.contain||"")}function _k(e){let t=Ho(e);for(;no(t)&&!Ac(t);){if(pm(t))return t;if($1(t))return null;t=Ho(t)}return null}function gm(){return l2==null&&(l2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),l2}function Ac(e){return/^(html|body|#document)$/.test(gi(e))}function _a(e){return Er(e).getComputedStyle(e)}function F1(e){return Ia(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||J4(e)&&e.host||ms(e);return J4(t)?t.host:t}function ty(e){const t=Ho(e);return Ac(t)?(e.ownerDocument||e).body:no(t)&&D1(t)?t:ty(t)}function Nc(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ty(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),u=Er(i);if(c){const f=sh(u);return t.concat(u,u.visualViewport||[],D1(i)?i:[],f&&n?Nc(f):[])}else return t.concat(i,Nc(i,[],n))}function sh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ny(e){const t=_a(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=e1(n)!==c||e1(s)!==u;return f&&(n=c,s=u),{width:n,height:s,$:f}}function vm(e){return Ia(e)?e:e.contextElement}function Gl(e){const t=vm(e);if(!no(t))return is(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:c}=ny(t);let u=(c?e1(n.width):n.width)/s,f=(c?e1(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const Zk=is(0);function ry(e){const t=Er(e);return!gm()||!t.visualViewport?Zk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ok(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Er(e)}function Do(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=vm(e);let u=is(1);t&&(s?Ia(s)&&(u=Gl(s)):u=Gl(e));const f=Ok(c,n,s)?ry(c):is(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=Er(c),w=Ia(s)?Er(s):s;let b=y,C=sh(b);for(;C&&w!==b;){const E=Gl(C),N=C.getBoundingClientRect(),j=_a(C),k=N.left+(C.clientLeft+parseFloat(j.paddingLeft))*E.x,A=N.top+(C.clientTop+parseFloat(j.paddingTop))*E.y;h*=E.x,m*=E.y,g*=E.x,v*=E.y,h+=k,m+=A,b=Er(C),C=sh(b)}}return n1({width:g,height:v,x:h,y:m})}function I1(e,t){const n=F1(e).scrollLeft;return t?t.left+n:Do(ms(e)).left+n}function ay(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-I1(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function Vk(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const c=i==="fixed",u=ms(s),f=t?$1(t.floating):!1;if(s===u||f&&c)return n;let h={scrollLeft:0,scrollTop:0},m=is(1);const g=is(0),v=no(s);if((v||!c)&&((gi(s)!=="body"||D1(u))&&(h=F1(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?ay(u,h):is(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 zk(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Bk(e){const t=F1(e),n=e.ownerDocument.body,s=ls(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ls(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let c=-t.scrollLeft+I1(e);const u=-t.scrollTop;return _a(n).direction==="rtl"&&(c+=ls(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:c,y:u}}const Uk=25;function Wk(e,t,n){n===void 0&&(n="viewport");const s=n==="layoutViewport",i=Er(e),c=ms(e),u=i.visualViewport;let f=c.clientWidth,h=c.clientHeight,m=0,g=0;if(u){const y=!gm()||t==="fixed";s?y||(m=-u.offsetLeft,g=-u.offsetTop):(f=u.width,h=u.height,y&&(m=u.offsetLeft,g=u.offsetTop))}if(I1(c)<=0){const y=c.ownerDocument,w=y.body,b=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(c.clientWidth-w.clientWidth-C),N=getComputedStyle(c).scrollbarGutter==="stable both-edges"?E/2:E;N<=Uk&&(f-=N)}return{width:f,height:h,x:m,y:g}}function Gk(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 eg(e,t,n){let s;if(t==="viewport"||t==="layoutViewport")s=Wk(e,n,t);else if(t==="document")s=Bk(ms(e));else if(Ia(t))s=Gk(t,n);else{const i=ry(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return n1(s)}function Kk(e,t){const n=t.get(e);if(n)return n;let s=Nc(e,[],!1).filter(f=>Ia(f)&&gi(f)!=="body"),i=null;const c=_a(e).position==="fixed";let u=c?Ho(e):e;for(;Ia(u)&&!Ac(u);){const f=_a(u),h=pm(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 Yk(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const u=[...n==="clippingAncestors"?$1(t)?[]:Kk(t,this._c):[].concat(n),s],f=eg(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=eg(t,u[y],i);h=ls(w.top,h),m=Xs(w.right,m),g=Xs(w.bottom,g),v=ls(w.left,v)}return{width:m-v,height:g-h,x:v,y:h}}function qk(e){const{width:t,height:n}=ny(e);return{width:t,height:n}}function Xk(e,t,n){const s=no(t),i=ms(t),c=n==="fixed",u=Do(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=is(0);if((s||!c)&&((gi(t)!=="body"||D1(i))&&(f=F1(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=I1(i));const m=i&&!s&&!c?ay(i,f):is(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 i2(e){return _a(e).position==="static"}function tg(e,t){if(!no(e)||_a(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ms(e)===n&&(n=n.ownerDocument.body),n}function sy(e,t){const n=Er(e);if($1(e))return n;if(!no(e)){let i=Ho(e);for(;i&&!Ac(i);){if(Ia(i)&&!i2(i))return i;i=Ho(i)}return n}let s=tg(e,t);for(;s&&$k(s)&&i2(s);)s=tg(s,t);return s&&Ac(s)&&i2(s)&&!pm(s)?n:s||_k(e)||n}const Qk=async function(e){const t=this.getOffsetParent||sy,n=this.getDimensions,s=await n(e.floating);return{reference:Xk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Jk(e){return _a(e).direction==="rtl"}const eA={convertOffsetParentRelativeRectToViewportRelativeRect:Vk,getDocumentElement:ms,getClippingRect:Yk,getOffsetParent:sy,getElementRects:Qk,getClientRects:zk,getDimensions:qk,getScale:Gl,isElement:Ia,isRTL:Jk};function oy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tA(e,t,n){let s=null,i;const c=ms(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:b,width:C,height:E}=y;if(g||t(),!C||!E)return;const N=j0(b),j=j0(c.clientWidth-(w+C)),k=j0(c.clientHeight-(b+E)),A=j0(w),T={rootMargin:-N+"px "+-j+"px "+-k+"px "+-A+"px",threshold:ls(0,Xs(1,v))||1};let D=!0;function P(G){const I=G[0].intersectionRatio;if(!oy(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(P,{...T,root:c.ownerDocument})}catch{s=new IntersectionObserver(P,T)}s.observe(e)}const h=Er(e),m=()=>f(n);return h.addEventListener("resize",m),f(!0),()=>{h.removeEventListener("resize",m),u()}}function nA(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=vm(e),g=i||c?[...m?Nc(m):[],...t?Nc(t):[]]:[];g.forEach(N=>{i&&N.addEventListener("scroll",n),c&&N.addEventListener("resize",n)});const v=m&&f?tA(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 b,C=h?Do(e):null;h&&E();function E(){const N=Do(e);C&&!oy(C,N)&&n(),C=N,b=requestAnimationFrame(E)}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(b)}}const rA=Lk,aA=Tk,sA=Mk,oA=Dk,lA=Rk,ng=Nk,iA=Hk,cA=(e,t,n)=>{const s=new Map,i=n??{},c={...eA,...i.platform,_c:s};return Ak(e,t,{...i,platform:c})};var uA=typeof document<"u",dA=function(){},B0=uA?r.useLayoutEffect:dA;function r1(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(!r1(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)&&!r1(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function ly(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rg(e,t){const n=ly(e);return Math.round(t*n)/n}function c2(e){const t=r.useRef(e);return B0(()=>{t.current=e}),t}function fA(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);r1(y,s)||w(s);const[b,C]=r.useState(null),[E,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||b,M=u||E,T=r.useRef(null),D=r.useRef(null),P=r.useRef(g),G=h!=null,I=c2(h),oe=c2(i),W=c2(m),J=r.useCallback(()=>{if(!T.current||!D.current)return;const K={placement:t,strategy:n,middleware:y};oe.current&&(K.platform=oe.current),cA(T.current,D.current,K).then(X=>{const U={...X,isPositioned:W.current!==!1};Z.current&&!r1(P.current,U)&&(P.current=U,na.flushSync(()=>{v(U)}))})},[y,t,n,oe,W]);B0(()=>{m===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[m]);const Z=r.useRef(!1);B0(()=>(Z.current=!0,()=>{Z.current=!1}),[]),B0(()=>{if(A&&(T.current=A),M&&(D.current=M),A&&M){if(I.current)return I.current(A,M,J);J()}},[A,M,J,I,G]);const ee=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=rg(q.floating,g.x),U=rg(q.floating,g.y);return f?{...K,transform:"translate("+X+"px, "+U+"px)",...ly(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:U}},[n,f,q.floating,g.x,g.y]);return r.useMemo(()=>({...g,update:J,refs:ee,elements:q,floatingStyles:H}),[g,J,ee,q,H])}const hA=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?ng({element:s.current,padding:i}).fn(n):{}:s?ng({element:s,padding:i}).fn(n):{}}}},mA=(e,t)=>{const n=rA(e);return{name:n.name,fn:n.fn,options:[e,t]}},pA=(e,t)=>{const n=aA(e);return{name:n.name,fn:n.fn,options:[e,t]}},gA=(e,t)=>({fn:iA(e).fn,options:[e,t]}),vA=(e,t)=>{const n=sA(e);return{name:n.name,fn:n.fn,options:[e,t]}},yA=(e,t)=>{const n=oA(e);return{name:n.name,fn:n.fn,options:[e,t]}},xA=(e,t)=>{const n=lA(e);return{name:n.name,fn:n.fn,options:[e,t]}},wA=(e,t)=>{const n=hA(e);return{name:n.name,fn:n.fn,options:[e,t]}};var bA=Object.defineProperty,Ws=(e,t)=>bA(e,"name",{value:t,configurable:!0}),iy="Popper",[cy,ro]=Cr(iy),[EA,uy]=cy(iy),CA=Ws(e=>{const{__scopePopper:t,children:n}=e,[s,i]=r.useState(null),[c,u]=r.useState(void 0);return o.jsx(EA,{scope:t,anchor:s,onAnchorChange:i,placementState:c,setPlacementState:u,children:n})},"Popper"),SA="PopperAnchor",jA=r.forwardRef(Ws(function(t,n){const{__scopePopper:s,virtualRef:i,...c}=t,u=uy(SA,s),f=r.useRef(null),h=u.onAnchorChange,m=r.useCallback(C=>{f.current=C,C&&h(C)},[h]),g=gt(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&&_1(u.placementState),w=y==null?void 0:y[0],b=y==null?void 0:y[1];return i?null:o.jsx(xt.div,{"data-radix-popper-side":w,"data-radix-popper-align":b,...c,ref:g})},"PopperAnchor")),dy="PopperContent",[kA,dO]=cy(dy),AA=r.forwardRef(Ws(function(t,n){var de,be,Te,Ue,ge,st,ht;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:b="optimized",onPlaced:C,...E}=t,N=uy(dy,s),[j,k]=r.useState(null),A=gt(n,k),[M,T]=r.useState(null),D=q3(M),P=(D==null?void 0:D.width)??0,G=(D==null?void 0:D.height)??0,I=i+(u!=="center"?"-"+u:""),oe=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},W=Array.isArray(g)?g:[g],J=W.length>0,Z={padding:oe,boundary:W.filter(fy),altBoundary:J},{refs:ee,floatingStyles:q,placement:H,isPositioned:K,middlewareData:X}=fA({strategy:"fixed",placement:I,whileElementsMounted:Ws((...Rt)=>nA(...Rt,{animationFrame:b==="always"}),"whileElementsMounted"),elements:{reference:N.anchor},middleware:[mA({mainAxis:c+G,alignmentAxis:f}),m&&pA({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?gA():void 0,...Z}),m&&vA({...Z}),yA({...Z,apply:Ws(({elements:Rt,rects:Pe,availableWidth:Ae,availableHeight:Se})=>{const{width:at,height:kt}=Pe.reference,qt=Rt.floating.style;qt.setProperty("--radix-popper-available-width",`${Ae}px`),qt.setProperty("--radix-popper-available-height",`${Se}px`),qt.setProperty("--radix-popper-anchor-width",`${at}px`),qt.setProperty("--radix-popper-anchor-height",`${kt}px`)},"apply")}),M&&wA({element:M,padding:h}),NA({arrowWidth:P,arrowHeight:G}),w&&xA({strategy:"referenceHidden",...Z,boundary:J?Z.boundary:void 0})]}),U=N.setPlacementState;Nn(()=>(U(H),()=>{U(void 0)}),[H,U]);const[L,O]=_1(H),ne=En(C);Nn(()=>{K&&(ne==null||ne())},[K,ne]);const re=(de=X.arrow)==null?void 0:de.x,le=(be=X.arrow)==null?void 0:be.y,ae=((Te=X.arrow)==null?void 0:Te.centerOffset)!==0,[me,he]=r.useState();return Nn(()=>{j&&he(window.getComputedStyle(j).zIndex)},[j]),o.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:K?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(Ue=X.transformOrigin)==null?void 0:Ue.x,(ge=X.transformOrigin)==null?void 0:ge.y].join(" "),...((st=X.hide)==null?void 0:st.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(kA,{scope:s,placedSide:L,placedAlign:O,onArrowChange:T,arrowX:re,arrowY:le,shouldHideArrow:ae,children:o.jsx(xt.div,{"data-side":L,"data-align":O,...E,ref:A,style:{...E.style,animation:K?(ht=E.style)==null?void 0:ht.animation:"none"}})})})},"PopperContent"));function fy(e){return e!==null}Ws(fy,"isNotNull");var NA=Ws(e=>({name:"transformOrigin",options:e,fn(t){var E,N,j;const{placement:n,rects:s,middlewareData:i}=t,u=((E=i.arrow)==null?void 0:E.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=_1(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 b="",C="";return m==="bottom"?(b=u?v:`${y}px`,C=`${-h}px`):m==="top"?(b=u?v:`${y}px`,C=`${s.floating.height+h}px`):m==="right"?(b=`${-h}px`,C=u?v:`${w}px`):m==="left"&&(b=`${s.floating.width+h}px`,C=u?v:`${w}px`),{data:{x:b,y:C}}}}),"transformOrigin");function _1(e){const[t,n="center"]=e.split("-");return[t,n]}Ws(_1,"getSideAndAlignFromPlacement");var ym=CA,Z1=jA,xm=AA,MA=Object.defineProperty,wm=(e,t)=>MA(e,"name",{value:t,configurable:!0}),u2=!1;function hy(){const[e,t]=r.useState(u2);return r.useEffect(()=>{u2||(u2=!0,t(!0))},[]),e}wm(hy,"useIsHydrated");var my=Bo[" useSyncExternalStore ".trim().toString()];function py(){return()=>{}}wm(py,"subscribe");function gy(){return my(py,()=>!0,()=>!1)}wm(gy,"useIsHydratedModern");var RA=typeof my=="function"?gy:hy,PA=Object.defineProperty,Ko=(e,t)=>PA(e,"name",{value:t,configurable:!0}),d2="rovingFocusGroup.onEntryFocus",LA={bubbles:!1,cancelable:!0},O1="RovingFocusGroup",[oh,vy,TA]=A1(O1),[HA,yy]=Cr(O1,[TA]),[DA,$A]=HA(O1),FA=r.forwardRef(Ko(function(t,n){return o.jsx(oh.Provider,{scope:t.__scopeRovingFocusGroup,children:o.jsx(oh.Slot,{scope:t.__scopeRovingFocusGroup,children:o.jsx(IA,{...t,ref:n})})})},"RovingFocusGroup")),IA=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),b=gt(n,w),C=Bc(u),[E,N]=qs({prop:f,defaultProp:h??null,onChange:m,caller:O1}),[j,k]=r.useState(!1),A=En(g),M=vy(s),T=r.useRef(!1),[D,P]=r.useState(0);return r.useEffect(()=>{const G=w.current;if(G)return G.addEventListener(d2,A),()=>G.removeEventListener(d2,A)},[A]),o.jsx(DA,{scope:s,orientation:i,dir:C,loop:c,currentTabStopId:E,onItemFocus:r.useCallback(G=>N(G),[N]),onItemShiftTab:r.useCallback(()=>k(!0),[]),onFocusableItemAdd:r.useCallback(()=>P(G=>G+1),[]),onFocusableItemRemove:r.useCallback(()=>P(G=>G-1),[]),children:o.jsx(xt.div,{tabIndex:j||D===0?-1:0,"data-orientation":i,...y,ref:b,style:{outline:"none",...t.style},onMouseDown:$e(t.onMouseDown,()=>{T.current=!0}),onFocus:$e(t.onFocus,G=>{const I=!T.current;if(G.target===G.currentTarget&&I&&!j){const oe=new CustomEvent(d2,LA);if(G.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const W=M().filter(H=>H.focusable),J=W.find(H=>H.active),Z=W.find(H=>H.id===E),q=[J,Z,...W].filter(Boolean).map(H=>H.ref.current);bm(q,v)}}T.current=!1}),onBlur:$e(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),_A="RovingFocusGroupItem",ZA=r.forwardRef(Ko(function(t,n){const{__scopeRovingFocusGroup:s,focusable:i=!0,active:c=!1,tabStopId:u,children:f,...h}=t,m=ga(),g=u||m,v=$A(_A,s),y=v.currentTabStopId===g,w=vy(s),{onFocusableItemAdd:b,onFocusableItemRemove:C,currentTabStopId:E}=v,N=RA();return Nn(()=>{if(!(!N||!i))return b(),()=>C()},[N,i,b,C]),r.useEffect(()=>{if(!(N||!i))return b(),()=>C()},[N,i,b,C]),o.jsx(oh.ItemSlot,{scope:s,id:g,focusable:i,active:c,children:o.jsx(xt.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...h,ref:n,onMouseDown:$e(t.onMouseDown,j=>{i?v.onItemFocus(g):j.preventDefault()}),onFocus:$e(t.onFocus,()=>v.onItemFocus(g)),onKeyDown:$e(t.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){v.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const k=wy(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?by(M,T+1):M.slice(T+1)}setTimeout(()=>bm(M))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:E!=null}):f})})},"RovingFocusGroupItem")),OA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ko(xy,"getDirectionAwareKey");function wy(e,t,n){const s=xy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return OA[s]}Ko(wy,"getFocusIntent");function bm(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}Ko(bm,"focusFirst");function by(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Ko(by,"wrapArray");var VA=FA,zA=ZA,BA=Object.defineProperty,Mt=(e,t)=>BA(e,"name",{value:t,configurable:!0}),lh=["Enter"," "],UA=["ArrowDown","PageUp","Home"],Ey=["ArrowUp","PageDown","End"],WA=[...UA,...Ey],GA={ltr:[...lh,"ArrowRight"],rtl:[...lh,"ArrowLeft"]},KA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},V1="Menu",[Mc,YA,qA]=A1(V1),[Yo,z1]=Cr(V1,[qA,ro,yy]),Em=ro(),Cy=yy(),[XA,qo]=Yo(V1),[QA,Gc]=Yo(V1),JA=Mt(e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:i,onOpenChange:c,modal:u=!0}=e,f=Em(t),[h,m]=r.useState(null),g=r.useRef(!1),v=En(c),y=Bc(i);return r.useEffect(()=>{const w=Mt(()=>{g.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=Mt(()=>g.current=!1,"handlePointer");return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),r.useEffect(()=>{if(!n)return;const w=Mt(()=>v(!1),"handleBlur");return window.addEventListener("blur",w),()=>window.removeEventListener("blur",w)},[n,v]),o.jsx(ym,{...f,children:o.jsx(XA,{scope:t,open:n,onOpenChange:v,content:h,onContentChange:m,children:o.jsx(QA,{scope:t,onClose:r.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:g,dir:y,modal:u,children:s})})})},"Menu"),Sy=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t,c=Em(s);return o.jsx(Z1,{...c,...i,ref:n})},"MenuAnchor")),jy="MenuPortal",[eN,ky]=Yo(jy,{forceMount:void 0}),tN=Mt(e=>{const{__scopeMenu:t,forceMount:n,children:s,container:i}=e,c=qo(jy,t);return o.jsx(eN,{scope:t,forceMount:n,children:o.jsx(Sr,{present:n||c.open,children:o.jsx(M1,{asChild:!0,container:i,children:s})})})},"MenuPortal"),va="MenuContent",[nN,Cm]=Yo(va),rN=r.forwardRef(Mt(function(t,n){const s=ky(va,t.__scopeMenu),{forceMount:i=s.forceMount,...c}=t,u=qo(va,t.__scopeMenu),f=Gc(va,t.__scopeMenu);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(Sr,{present:i||u.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:f.modal?o.jsx(aN,{...c,ref:n}):o.jsx(sN,{...c,ref:n})})})})},"MenuContent")),aN=r.forwardRef(Mt(function(t,n){const s=qo(va,t.__scopeMenu),i=r.useRef(null),c=gt(n,i);return r.useEffect(()=>{const u=i.current;if(u)return P1(u)},[]),o.jsx(Sm,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:$e(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),sN=r.forwardRef(Mt(function(t,n){const s=qo(va,t.__scopeMenu);return o.jsx(Sm,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),oN=wa("MenuContent.ScrollLock"),Sm=r.forwardRef(Mt(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:b,disableOutsideScroll:C,...E}=t,N=qo(va,s),j=Gc(va,s),k=Em(s),A=Cy(s),M=YA(s),[T,D]=r.useState(null),P=r.useRef(null),G=gt(n,P,N.onContentChange),I=r.useRef(0),oe=r.useRef(""),W=r.useRef(0),J=r.useRef(null),Z=r.useRef("right"),ee=r.useRef(0),q=C?Wc:r.Fragment,H=C?{as:oN,allowPinchZoom:!0}:void 0,K=Mt(U=>{var he,de;const L=oe.current+U,O=M().filter(be=>!be.disabled),ne=document.activeElement,re=(he=O.find(be=>be.ref.current===ne))==null?void 0:he.textValue,le=O.map(be=>be.textValue),ae=Hy(le,L,re),me=(de=O.find(be=>be.textValue===ae))==null?void 0:de.ref.current;Mt((function be(Te){oe.current=Te,window.clearTimeout(I.current),Te!==""&&(I.current=window.setTimeout(()=>be(""),1e3))}),"updateSearch")(L),me&&setTimeout(()=>me.focus())},"handleTypeaheadSearch");r.useEffect(()=>()=>window.clearTimeout(I.current),[]),ci();const X=r.useCallback(U=>{var O,ne;return Z.current===((O=J.current)==null?void 0:O.side)&&$y(U,(ne=J.current)==null?void 0:ne.area)},[]);return o.jsx(nN,{scope:s,searchRef:oe,onItemEnter:r.useCallback(U=>{X(U)&&U.preventDefault()},[X]),onItemLeave:r.useCallback(U=>{var L;X(U)||((L=P.current)==null||L.focus(),D(null))},[X]),onTriggerLeave:r.useCallback(U=>{X(U)&&U.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:r.useCallback(U=>{J.current=U},[]),children:o.jsx(q,{...H,children:o.jsx(Uc,{asChild:!0,trapped:c,onMountAutoFocus:$e(u,U=>{var L;U.preventDefault(),(L=P.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:b,children:o.jsx(VA,{asChild:!0,...A,dir:j.dir,orientation:"vertical",loop:i,currentTabStopId:T,onCurrentTabStopIdChange:D,onEntryFocus:$e(m,U=>{j.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(xm,{role:"menu","aria-orientation":"vertical","data-state":km(N.open),"data-radix-menu-content":"",dir:j.dir,...k,...E,ref:G,style:{outline:"none",...E.style},onKeyDown:$e(E.onKeyDown,U=>{const O=U.target.closest("[data-radix-menu-content]")===U.currentTarget,ne=U.ctrlKey||U.altKey||U.metaKey,re=U.key.length===1;O&&(U.key==="Tab"&&U.preventDefault(),!ne&&re&&K(U.key));const le=P.current;if(U.target!==le||!WA.includes(U.key))return;U.preventDefault();const me=M().filter(he=>!he.disabled).map(he=>he.ref.current);Ey.includes(U.key)&&me.reverse(),Ly(me)}),onBlur:$e(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(I.current),oe.current="")}),onPointerMove:$e(t.onPointerMove,Jl(U=>{const L=U.target,O=ee.current!==U.clientX;if(U.currentTarget.contains(L)&&O){const ne=U.clientX>ee.current?"right":"left";Z.current=ne,ee.current=U.clientX}}))})})})})})})},"MenuContentImpl")),Ay=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(xt.div,{role:"group",...i,ref:n})},"MenuGroup")),lN=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(xt.div,{...i,ref:n})},"MenuLabel")),ih="MenuItem",ag="menu.itemSelect",jm=r.forwardRef(Mt(function(t,n){const{disabled:s=!1,onSelect:i,...c}=t,u=r.useRef(null),f=Gc(ih,t.__scopeMenu),h=Cm(ih,t.__scopeMenu),m=gt(n,u),g=r.useRef(!1),v=Mt(()=>{const y=u.current;if(!s&&y){const w=new CustomEvent(ag,{bubbles:!0,cancelable:!0});y.addEventListener(ag,b=>i==null?void 0:i(b),{once:!0}),am(y,w),w.defaultPrevented?g.current=!1:f.onClose()}},"handleSelect");return o.jsx(Ny,{...c,ref:m,disabled:s,onClick:$e(t.onClick,v),onPointerDown:y=>{var w;(w=t.onPointerDown)==null||w.call(t,y),g.current=!0},onPointerUp:$e(t.onPointerUp,y=>{var w;g.current||(w=y.currentTarget)==null||w.click()}),onKeyDown:$e(t.onKeyDown,y=>{s||y.target!==y.currentTarget||h.searchRef.current!==""&&y.key===" "||lh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})},"MenuItem")),Ny=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,disabled:i=!1,textValue:c,...u}=t,f=Cm(ih,s),h=Cy(s),m=r.useRef(null),g=gt(n,m),[v,y]=r.useState(!1),[w,b]=r.useState("");return r.useEffect(()=>{const C=m.current;C&&b((C.textContent??"").trim())},[u.children]),o.jsx(Mc.ItemSlot,{scope:s,disabled:i,textValue:c??w,children:o.jsx(zA,{asChild:!0,...h,focusable:!i,children:o.jsx(xt.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:$e(t.onPointerMove,Jl(C=>{i?f.onItemLeave(C):(f.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$e(t.onPointerLeave,Jl(C=>f.onItemLeave(C))),onFocus:$e(t.onFocus,()=>y(!0)),onBlur:$e(t.onBlur,()=>y(!1))})})})},"MenuItemImpl")),iN=r.forwardRef(Mt(function(t,n){const{checked:s=!1,onCheckedChange:i,...c}=t;return o.jsx(Ry,{scope:t.__scopeMenu,checked:s,children:o.jsx(jm,{role:"menuitemcheckbox","aria-checked":Rc(s)?"mixed":s,...c,ref:n,"data-state":B1(s),onSelect:$e(c.onSelect,()=>i==null?void 0:i(Rc(s)?!0:!s),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),cN="MenuRadioGroup",[uN,dN]=Yo(cN,{value:void 0,onValueChange:Mt(()=>{},"onValueChange")}),fN=r.forwardRef(Mt(function(t,n){const{value:s,onValueChange:i,...c}=t,u=En(i);return o.jsx(uN,{scope:t.__scopeMenu,value:s,onValueChange:u,children:o.jsx(Ay,{...c,ref:n})})},"MenuRadioGroup")),hN="MenuRadioItem",mN=r.forwardRef(Mt(function(t,n){const{value:s,...i}=t,c=dN(hN,t.__scopeMenu),u=s===c.value;return o.jsx(Ry,{scope:t.__scopeMenu,checked:u,children:o.jsx(jm,{role:"menuitemradio","aria-checked":u,...i,ref:n,"data-state":B1(u),onSelect:$e(i.onSelect,()=>{var f;return(f=c.onValueChange)==null?void 0:f.call(c,s)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),My="MenuItemIndicator",[Ry,pN]=Yo(My,{checked:!1}),gN=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,forceMount:i,...c}=t,u=pN(My,s);return o.jsx(Sr,{present:i||Rc(u.checked)||u.checked===!0,children:o.jsx(xt.span,{...c,ref:n,"data-state":B1(u.checked)})})},"MenuItemIndicator")),vN=r.forwardRef(Mt(function(t,n){const{__scopeMenu:s,...i}=t;return o.jsx(xt.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})},"MenuSeparator")),yN="MenuSub",[fO,Py]=Yo(yN),k0="MenuSubTrigger",xN=r.forwardRef(Mt(function(t,n){const s=qo(k0,t.__scopeMenu),i=Gc(k0,t.__scopeMenu),c=Py(k0,t.__scopeMenu),u=Cm(k0,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=gt(n,c.onTriggerChange);return o.jsx(Sy,{asChild:!0,...g,children:o.jsx(Ny,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?c.contentId:void 0,"data-state":km(s.open),...t,ref:y,onClick:w=>{var b;(b=t.onClick)==null||b.call(t,w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:$e(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:$e(t.onPointerLeave,Jl(w=>{var C,E;v();const b=(C=s.content)==null?void 0:C.getBoundingClientRect();if(b){const N=(E=s.content)==null?void 0:E.dataset.side,j=N==="right",k=j?-5:5,A=b[j?"left":"right"],M=b[j?"right":"left"];u.onPointerGraceIntentChange({area:[{x:w.clientX+k,y:w.clientY},{x:A,y:b.top},{x:M,y:b.top},{x:M,y:b.bottom},{x:A,y:b.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:$e(t.onKeyDown,w=>{var C;t.disabled||w.target!==w.currentTarget||u.searchRef.current!==""&&w.key===" "||GA[i.dir].includes(w.key)&&(s.onOpenChange(!0),(C=s.content)==null||C.focus(),w.preventDefault())})})})},"MenuSubTrigger")),wN="MenuSubContent",bN=r.forwardRef(Mt(function(t,n){const s=ky(va,t.__scopeMenu),{forceMount:i=s.forceMount,align:c="start",...u}=t,f=qo(va,t.__scopeMenu),h=Gc(va,t.__scopeMenu),m=Py(wN,t.__scopeMenu),g=r.useRef(null),v=gt(n,g);return o.jsx(Mc.Provider,{scope:t.__scopeMenu,children:o.jsx(Sr,{present:i||f.open,children:o.jsx(Mc.Slot,{scope:t.__scopeMenu,children:o.jsx(Sm,{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:$e(t.onFocusOutside,y=>{y.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:$e(t.onEscapeKeyDown,y=>{h.onClose(),y.preventDefault()}),onKeyDown:$e(t.onKeyDown,y=>{var C;const w=y.currentTarget.contains(y.target),b=KA[h.dir].includes(y.key);w&&b&&(f.onOpenChange(!1),(C=m.trigger)==null||C.focus(),y.preventDefault())})})})})})},"MenuSubContent"));function km(e){return e?"open":"closed"}Mt(km,"getOpenState");function Rc(e){return e==="indeterminate"}Mt(Rc,"isIndeterminate");function B1(e){return Rc(e)?"indeterminate":e?"checked":"unchecked"}Mt(B1,"getCheckedState");function Ly(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Mt(Ly,"focusFirst");function Ty(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Mt(Ty,"wrapArray");function Hy(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=Ty(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}Mt(Hy,"getNextMatch");function Dy(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}Mt(Dy,"isPointInPolygon");function $y(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dy(n,t)}Mt($y,"isPointerInGraceArea");function Jl(e){return t=>t.pointerType==="mouse"?e(t):void 0}Mt(Jl,"whenMouse");var Fy=JA,Iy=Sy,_y=tN,Zy=rN,Oy=Ay,Vy=lN,zy=jm,By=iN,Uy=fN,Wy=mN,Gy=gN,Ky=vN,Yy=xN,qy=bN,EN=Object.defineProperty,Wn=(e,t)=>EN(e,"name",{value:t,configurable:!0}),Am="ContextMenu",[CN,hO]=Cr(Am,[z1]),jr=z1(),[SN,Xy]=CN(Am),jN=Wn(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:Am}),g=jr(t);return o.jsx(SN,{scope:t,open:h,onOpenChange:m,modal:u,hasInteractedRef:f,children:o.jsx(Fy,{...g,dir:c,open:h,onOpenChange:m,modal:u,children:n})})},"ContextMenu"),kN="ContextMenuTrigger",AN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,disabled:i=!1,...c}=t,u=Xy(kN,s),f=jr(s),[h,m]=r.useState({x:0,y:0}),g=r.useMemo(()=>({current:{getBoundingClientRect:Wn(()=>DOMRect.fromRect({width:0,height:0,...h}),"getBoundingClientRect")}}),[h]),v=r.useRef(0),y=r.useCallback(()=>window.clearTimeout(v.current),[]),w=Wn(b=>{u.hasInteractedRef.current=!0,m({x:b.clientX,y:b.clientY}),u.onOpenChange(!0)},"handleOpen");return r.useEffect(()=>y,[y]),r.useEffect(()=>void(i&&y()),[i,y]),o.jsxs(o.Fragment,{children:[o.jsx(Iy,{...f,virtualRef:g}),o.jsx(xt.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:n,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:i?t.onContextMenu:$e(t.onContextMenu,b=>{y(),w(b),b.preventDefault()}),onPointerDown:i?t.onPointerDown:$e(t.onPointerDown,ic(b=>{y(),u.open&&u.onOpenChange(!1),v.current=window.setTimeout(()=>w(b),700)})),onPointerMove:i?t.onPointerMove:$e(t.onPointerMove,ic(y)),onPointerCancel:i?t.onPointerCancel:$e(t.onPointerCancel,ic(y)),onPointerUp:i?t.onPointerUp:$e(t.onPointerUp,ic(y))})]})},"ContextMenuTrigger")),NN=Wn(e=>{const{__scopeContextMenu:t,...n}=e,s=jr(t);return o.jsx(_y,{...s,...n})},"ContextMenuPortal"),MN="ContextMenuContent",RN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=Xy(MN,s),u=jr(s),f=r.useRef(!1);return o.jsx(Zy,{...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")),PN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Oy,{...c,...i,ref:n})},"ContextMenuGroup")),LN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Vy,{...c,...i,ref:n})},"ContextMenuLabel")),TN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(zy,{...c,...i,ref:n})},"ContextMenuItem")),HN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(By,{...c,...i,ref:n})},"ContextMenuCheckboxItem")),DN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Uy,{...c,...i,ref:n})},"ContextMenuRadioGroup")),$N=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Wy,{...c,...i,ref:n})},"ContextMenuRadioItem")),FN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Gy,{...c,...i,ref:n})},"ContextMenuItemIndicator")),IN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Ky,{...c,...i,ref:n})},"ContextMenuSeparator")),_N=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(Yy,{...c,...i,ref:n})},"ContextMenuSubTrigger")),ZN=r.forwardRef(Wn(function(t,n){const{__scopeContextMenu:s,...i}=t,c=jr(s);return o.jsx(qy,{...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}Wn(ic,"whenTouchOrPen");var ON=jN,VN=AN,Qy=NN,zN=RN,BN=PN,UN=LN,WN=TN,GN=HN,KN=DN,YN=$N,Jy=FN,qN=IN,XN=_N,QN=ZN,JN=Object.defineProperty,kr=(e,t)=>JN(e,"name",{value:t,configurable:!0}),Nm="DropdownMenu",[eM,mO]=Cr(Nm,[z1]),Ar=z1(),[tM,e5]=eM(Nm),nM=kr(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:Nm});return o.jsx(tM,{scope:t,triggerId:ga(),triggerRef:m,contentId:ga(),open:g,onOpenChange:v,onOpenToggle:r.useCallback(()=>v(y=>!y),[v]),modal:f,children:o.jsx(Fy,{...h,open:g,onOpenChange:v,dir:s,modal:f,children:n})})},"DropdownMenu"),rM="DropdownMenuTrigger",aM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,disabled:i=!1,...c}=t,u=e5(rM,s),f=Ar(s),h=gt(n,u.triggerRef);return o.jsx(Iy,{asChild:!0,...f,children:o.jsx(xt.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:$e(t.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:$e(t.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),sM=kr(e=>{const{__scopeDropdownMenu:t,...n}=e,s=Ar(t);return o.jsx(_y,{...s,...n})},"DropdownMenuPortal"),oM="DropdownMenuContent",lM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=e5(oM,s),u=Ar(s),f=r.useRef(!1);return o.jsx(Zy,{id:c.contentId,"aria-labelledby":c.triggerId,...u,...i,ref:n,onCloseAutoFocus:$e(t.onCloseAutoFocus,h=>{var m;f.current||(m=c.triggerRef.current)==null||m.focus(),f.current=!1,h.preventDefault()}),onInteractOutside:$e(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")),iM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Oy,{...c,...i,ref:n})},"DropdownMenuGroup")),cM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Vy,{...c,...i,ref:n})},"DropdownMenuLabel")),uM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(zy,{...c,...i,ref:n})},"DropdownMenuItem")),dM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(By,{...c,...i,ref:n})},"DropdownMenuCheckboxItem")),fM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Uy,{...c,...i,ref:n})},"DropdownMenuRadioGroup")),hM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Wy,{...c,...i,ref:n})},"DropdownMenuRadioItem")),mM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Gy,{...c,...i,ref:n})},"DropdownMenuItemIndicator")),pM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Ky,{...c,...i,ref:n})},"DropdownMenuSeparator")),gM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(Yy,{...c,...i,ref:n})},"DropdownMenuSubTrigger")),vM=r.forwardRef(kr(function(t,n){const{__scopeDropdownMenu:s,...i}=t,c=Ar(s);return o.jsx(qy,{...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")),yM=nM,xM=aM,t5=sM,wM=lM,bM=iM,EM=cM,CM=uM,SM=dM,jM=fM,kM=hM,n5=mM,AM=pM,NM=gM,MM=vM,RM=Object.defineProperty,PM=(e,t)=>RM(e,"name",{value:t,configurable:!0});function r5(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])}PM(r5,"usePrevious");var LM=Object.defineProperty,TM=(e,t)=>LM(e,"name",{value:t,configurable:!0});function a1(e,[t,n]){return Math.min(n,Math.max(t,e))}TM(a1,"clamp");var HM=Object.defineProperty,Ua=(e,t)=>HM(e,"name",{value:t,configurable:!0}),Mm="Popover",[a5,pO]=Cr(Mm,[ro]),U1=ro(),[DM,ao]=a5(Mm),$M=Ua(e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!1}=e,f=U1(t),h=r.useRef(null),[m,g]=r.useState(!1),[v,y]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:Mm});return o.jsx(ym,{...f,children:o.jsx(DM,{scope:t,contentId:ga(),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"),FM="PopoverAnchor",IM=r.forwardRef(Ua(function(t,n){const{__scopePopover:s,...i}=t,c=ao(FM,s),u=U1(s),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=c;return r.useEffect(()=>(f(),()=>h()),[f,h]),o.jsx(Z1,{...u,...i,ref:n})},"PopoverAnchor")),_M="PopoverTrigger",ZM=r.forwardRef(Ua(function(t,n){const{__scopePopover:s,...i}=t,c=ao(_M,s),u=U1(s),f=gt(n,c.triggerRef),h=o.jsx(xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":Rm(c.open),...i,ref:f,onClick:$e(t.onClick,c.onOpenToggle)});return c.hasCustomAnchor?h:o.jsx(Z1,{asChild:!0,...u,children:h})},"PopoverTrigger")),s5="PopoverPortal",[OM,VM]=a5(s5,{forceMount:void 0}),zM=Ua(e=>{const{__scopePopover:t,forceMount:n,children:s,container:i}=e,c=ao(s5,t);return o.jsx(OM,{scope:t,forceMount:n,children:o.jsx(Sr,{present:n||c.open,children:o.jsx(M1,{asChild:!0,container:i,children:s})})})},"PopoverPortal"),Pc="PopoverContent",BM=r.forwardRef(Ua(function(t,n){const s=VM(Pc,t.__scopePopover),{forceMount:i=s.forceMount,...c}=t,u=ao(Pc,t.__scopePopover);return o.jsx(Sr,{present:i||u.open,children:u.modal?o.jsx(WM,{...c,ref:n}):o.jsx(GM,{...c,ref:n})})},"PopoverContent")),UM=wa("PopoverContent.RemoveScroll"),WM=r.forwardRef(Ua(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(null),c=gt(n,i),u=r.useRef(!1);return r.useEffect(()=>{const f=i.current;if(f)return P1(f)},[]),o.jsx(Wc,{as:UM,allowPinchZoom:!0,children:o.jsx(o5,{...t,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$e(t.onCloseAutoFocus,f=>{var h;f.preventDefault(),u.current||(h=s.triggerRef.current)==null||h.focus()}),onPointerDownOutside:$e(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:$e(t.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),GM=r.forwardRef(Ua(function(t,n){const s=ao(Pc,t.__scopePopover),i=r.useRef(!1),c=r.useRef(!1);return o.jsx(o5,{...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")),o5=r.forwardRef(Ua(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),b=U1(s);return ci(),o.jsx(Uc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:u,children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onDismiss:()=>w.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(xm,{"data-state":Rm(w.open),role:"dialog",id:w.contentId,...b,...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")),KM="PopoverClose",YM=r.forwardRef(Ua(function(t,n){const{__scopePopover:s,...i}=t,c=ao(KM,s);return o.jsx(xt.button,{type:"button",...i,ref:n,onClick:$e(t.onClick,()=>c.onOpenChange(!1))})},"PopoverClose"));function Rm(e){return e?"open":"closed"}Ua(Rm,"getState");var qM=$M,XM=IM,QM=ZM,JM=zM,eR=BM,tR=YM,nR=Object.defineProperty,Et=(e,t)=>nR(e,"name",{value:t,configurable:!0});function l5(e,t){return r.useReducer((n,s)=>t[n][s]??n,e)}Et(l5,"useStateMachine");var i5="ScrollArea",[c5,gO]=Cr(i5),[rR,ra]=c5(i5),aR=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),[b,C]=r.useState(null),[E,N]=r.useState(null),[j,k]=r.useState(0),[A,M]=r.useState(0),[T,D]=r.useState(!1),[P,G]=r.useState(!1),I=gt(n,m),oe=Bc(c);return o.jsx(rR,{scope:s,type:i,dir:oe,scrollHideDelay:u,scrollArea:h,viewport:g,onViewportChange:v,content:y,onContentChange:w,scrollbarX:b,onScrollbarXChange:C,scrollbarXEnabled:T,onScrollbarXEnabledChange:D,scrollbarY:E,onScrollbarYChange:N,scrollbarYEnabled:P,onScrollbarYEnabledChange:G,onCornerWidthChange:k,onCornerHeightChange:M,children:o.jsx(xt.div,{dir:oe,...f,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":A+"px",...t.style}})})},"ScrollArea")),sR="ScrollAreaViewport",oR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,children:i,nonce:c,...u}=t,f=ra(sR,s),h=r.useRef(null),m=gt(n,h,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(lR,{nonce:c}),o.jsx(xt.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")),lR=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),ps="ScrollAreaScrollbar",iR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ps,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(cR,{...i,ref:n,forceMount:s}):c.type==="scroll"?o.jsx(uR,{...i,ref:n,forceMount:s}):c.type==="auto"?o.jsx(u5,{...i,ref:n,forceMount:s}):c.type==="always"?o.jsx(Pm,{...i,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),cR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ps,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(Sr,{present:s||u,children:o.jsx(u5,{"data-state":u?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarHover")),uR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=ra(ps,t.__scopeScrollArea),u=t.orientation==="horizontal",f=Yc(()=>m("SCROLL_END"),100),[h,m]=l5("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 b=g[v];y!==b&&(m("SCROLL"),f()),y=b},"handleScroll");return g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[c.viewport,u,m,f]),o.jsx(Sr,{present:s||h!=="hidden",children:o.jsx(Pm,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:$e(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:$e(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),u5=r.forwardRef(Et(function(t,n){const s=ra(ps,t.__scopeScrollArea),{forceMount:i,...c}=t,[u,f]=r.useState(!1),h=t.orientation==="horizontal",m=Yc(()=>{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(Sr,{present:i||u,children:o.jsx(Pm,{"data-state":u?"visible":"hidden",...c,ref:n})})},"ScrollAreaScrollbarAuto")),Pm=r.forwardRef(Et(function(t,n){const{orientation:s="vertical",...i}=t,c=ra(ps,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=Lm(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,b){return m5(w,f.current,h,b)}return Et(y,"getScrollPosition"),s==="horizontal"?o.jsx(dR,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollLeft,b=uh(w,h,c.dir);u.current.style.transform=`translate3d(${b}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(fR,{...v,ref:n,onThumbPositionChange:()=>{if(c.viewport&&u.current){const w=c.viewport.scrollTop,b=uh(w,h);u.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:w=>{c.viewport&&(c.viewport.scrollTop=w)},onDragScroll:w=>{c.viewport&&(c.viewport.scrollTop=y(w))}}):null},"ScrollAreaScrollbarVisible")),dR=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ps,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=gt(n,m,u.onScrollbarXChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(f5,{"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":Kc(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),Hm(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")),fR=r.forwardRef(Et(function(t,n){const{sizes:s,onSizesChange:i,...c}=t,u=ra(ps,t.__scopeScrollArea),[f,h]=r.useState(),m=r.useRef(null),g=gt(n,m,u.onScrollbarYChange);return r.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),o.jsx(f5,{"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":Kc(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),Hm(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")),[hR,d5]=c5(ps),f5=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,b=ra(ps,s),[C,E]=r.useState(null),N=gt(n,E),j=r.useRef(null),k=r.useRef(""),A=b.viewport,M=i.content-i.viewport,T=En(v),D=En(m),P=Yc(y,10);function G(I){if(j.current){const oe=I.clientX-j.current.left,W=I.clientY-j.current.top;g({x:oe,y:W})}}return Et(G,"handleDragScroll"),r.useEffect(()=>{const I=Et(oe=>{const W=oe.target;(C==null?void 0:C.contains(W))&&T(oe,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,P),$o(b.content,P),o.jsx(hR,{scope:s,scrollbar:C,hasThumb:c,onThumbChange:En(u),onThumbPointerUp:En(f),onThumbPositionChange:D,onThumbPointerDown:En(h),children:o.jsx(xt.div,{...w,ref:N,style:{position:"absolute",...w.style},onPointerDown:$e(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",b.viewport&&(b.viewport.style.scrollBehavior="auto"),G(I))}),onPointerMove:$e(t.onPointerMove,G),onPointerUp:$e(t.onPointerUp,I=>{const oe=I.target;oe.hasPointerCapture(I.pointerId)&&oe.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=k.current,b.viewport&&(b.viewport.style.scrollBehavior=""),j.current=null})})})},"ScrollAreaScrollbarImpl")),ch="ScrollAreaThumb",mR=r.forwardRef(Et(function(t,n){const{forceMount:s,...i}=t,c=d5(ch,t.__scopeScrollArea);return o.jsx(Sr,{present:s||c.hasThumb,children:o.jsx(pR,{ref:n,...i})})},"ScrollAreaThumb")),pR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,style:i,...c}=t,u=ra(ch,s),f=d5(ch,s),{onThumbPositionChange:h}=f,m=gt(n,f.onThumbChange),g=r.useRef(void 0),v=Yc(()=>{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 b=yR(y,h);g.current=b,h()}},"handleScroll");return h(),y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)}},[u.viewport,v,h]),o.jsx(xt.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:$e(t.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),C=y.clientX-b.left,E=y.clientY-b.top;f.onThumbPointerDown({x:C,y:E})}),onPointerUp:$e(t.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),h5="ScrollAreaCorner",gR=r.forwardRef(Et(function(t,n){const s=ra(h5,t.__scopeScrollArea),i=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&i?o.jsx(vR,{...t,ref:n}):null},"ScrollAreaCorner")),vR=r.forwardRef(Et(function(t,n){const{__scopeScrollArea:s,...i}=t,c=ra(h5,s),[u,f]=r.useState(0),[h,m]=r.useState(0),g=!!(u&&h),{onCornerWidthChange:v,onCornerHeightChange:y}=c;return $o(c.scrollbarX,()=>{var b;const w=((b=c.scrollbarX)==null?void 0:b.offsetHeight)||0;c.onCornerHeightChange(w),m(w)}),$o(c.scrollbarY,()=>{var b;const w=((b=c.scrollbarY)==null?void 0:b.offsetWidth)||0;c.onCornerWidthChange(w),f(w)}),r.useEffect(()=>()=>{v(0),y(0)},[v,y]),g?o.jsx(xt.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 Lm(e,t){const n=e/t;return isNaN(n)?0:n}Et(Lm,"getThumbRatio");function Kc(e){const t=Lm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}Et(Kc,"getThumbSize");function m5(e,t,n,s="ltr"){const i=Kc(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 Tm([h,m],v)(e)}Et(m5,"getScrollPositionFromPointer");function uh(e,t,n="ltr"){const s=Kc(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=a1(e,h);return Tm([0,u],[0,f])(m)}Et(uh,"getThumbOffsetFromScroll");function Tm(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(Tm,"linearScale");function Hm(e,t){return e>0&&e<t}Et(Hm,"isScrollingWithinScrollbarBounds");var yR=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 Yc(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(Yc,"useDebounceCallback");function $o(e,t){const n=En(t);Nn(()=>{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 p5=aR,g5=oR,dh=iR,fh=mR,xR=gR,wR=Object.defineProperty,Ht=(e,t)=>wR(e,"name",{value:t,configurable:!0}),bR=[" ","Enter","ArrowUp","ArrowDown"],ER=[" ","Enter"],ei="Select",[W1,Dm,CR]=A1(ei),[Xo,vO]=Cr(ei,[CR,ro]),$m=ro(),[SR,so]=Xo(ei),[jR,kR]=Xo(ei);function v5(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:b,internal_do_not_use_render:C}=e,E=$m(t),[N,j]=r.useState(null),[k,A]=r.useState(null),[M,T]=r.useState(!1),D=Bc(m),[P,G]=qs({prop:s,defaultProp:i??!1,onChange:c,caller:ei}),[I,oe]=qs({prop:u,defaultProp:f,onChange:h,caller:ei}),W=r.useRef(null),J=r.useRef(I);r.useEffect(()=>{const O=b?N==null?void 0:N.ownerDocument.getElementById(b):N==null?void 0:N.form;if(O instanceof HTMLFormElement){const ne=Ht(()=>oe(J.current),"reset");return O.addEventListener("reset",ne),()=>O.removeEventListener("reset",ne)}},[b,N,oe]);const Z=N?!!b||!!N.closest("form"):!0,[ee,q]=r.useState(new Set),H=ga(),K=Array.from(ee).map(O=>O.props.value).join(";"),X=r.useCallback(O=>{q(ne=>new Set(ne).add(O))},[]),U=r.useCallback(O=>{q(ne=>{const re=new Set(ne);return re.delete(O),re})},[]),L={required:w,trigger:N,onTriggerChange:j,valueNode:k,onValueNodeChange:A,valueNodeHasChildren:M,onValueNodeHasChildrenChange:T,contentId:H,value:I,onValueChange:oe,open:P,onOpenChange:G,dir:D,triggerPointerDownPosRef:W,disabled:y,name:g,autoComplete:v,form:b,nativeOptions:ee,nativeSelectKey:K,isFormControl:Z};return o.jsx(ym,{...E,children:o.jsx(SR,{scope:t,...L,children:o.jsx(W1.Provider,{scope:t,children:o.jsx(jR,{scope:t,onNativeOptionAdd:X,onNativeOptionRemove:U,children:w5(C)?C(L):n})})})})}Ht(v5,"SelectProvider");var AR=Ht(e=>{const{__scopeSelect:t,children:n,...s}=e;return o.jsx(v5,{__scopeSelect:t,...s,internal_do_not_use_render:({isFormControl:i})=>o.jsxs(o.Fragment,{children:[n,i?o.jsx(aP,{__scopeSelect:t}):null]})})},"Select"),NR="SelectTrigger",MR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,disabled:i=!1,...c}=t,u=$m(s),f=so(NR,s),h=f.disabled||i,m=gt(n,f.onTriggerChange),g=Dm(s),v=r.useRef("touch"),[y,w,b]=Fm(E=>{const N=g().filter(A=>!A.disabled),j=N.find(A=>A.value===f.value),k=Im(N,E,j);k!==void 0&&f.onValueChange(k.value)}),C=Ht(E=>{h||(f.onOpenChange(!0),b()),E&&(f.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})},"handleOpen");return o.jsx(Z1,{asChild:!0,...u,children:o.jsx(xt.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":qc(f.value)?"":void 0,...c,ref:m,onClick:$e(c.onClick,E=>{E.currentTarget.focus(),v.current!=="mouse"&&C(E)}),onPointerDown:$e(c.onPointerDown,E=>{v.current=E.pointerType;const N=E.target;N.hasPointerCapture(E.pointerId)&&N.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:$e(c.onKeyDown,E=>{const N=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&w(E.key),!(N&&E.key===" ")&&bR.includes(E.key)&&(C(),E.preventDefault())})})})},"SelectTrigger")),RR="SelectValue",PR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,className:i,style:c,children:u,placeholder:f="",...h}=t,m=so(RR,s),{onValueNodeHasChildrenChange:g}=m,v=u!==void 0,y=gt(n,m.onValueNodeChange);Nn(()=>{g(v)},[g,v]);const w=qc(m.value);return o.jsx(xt.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")),LR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,children:i,...c}=t;return o.jsx(xt.span,{"aria-hidden":!0,...c,ref:n,children:i||"▼"})},"SelectIcon")),TR="SelectPortal",[HR,DR]=Xo(TR,{forceMount:void 0}),$R=Ht(e=>{const{__scopeSelect:t,forceMount:n,...s}=e;return o.jsx(HR,{scope:e.__scopeSelect,forceMount:n,children:o.jsx(M1,{asChild:!0,...s})})},"SelectPortal"),Fo="SelectContent",FR=r.forwardRef(Ht(function(t,n){const s=DR(Fo,t.__scopeSelect),{forceMount:i=s.forceMount,...c}=t,u=so(Fo,t.__scopeSelect),[f,h]=r.useState();return Nn(()=>{h(new DocumentFragment)},[]),o.jsx(Sr,{present:i||u.open,children:({present:m})=>m?o.jsx(ZR,{...c,ref:n}):o.jsx(IR,{...c,fragment:f})})},"SelectContent")),IR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,children:i,fragment:c}=t;return c?na.createPortal(o.jsx(y5,{scope:s,children:o.jsx(W1.Slot,{scope:s,children:o.jsx("div",{ref:n,children:i})})}),c):null},"SelectContentFragment")),ha=10,[y5,G1]=Xo(Fo),_R=wa("SelectContent.RemoveScroll"),ZR=r.forwardRef(Ht(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:b,sticky:C,hideWhenDetached:E,avoidCollisions:N,...j}=t,k=so(Fo,s),[A,M]=r.useState(null),[T,D]=r.useState(null),P=gt(n,M),[G,I]=r.useState(null),[oe,W]=r.useState(null),J=Dm(s),[Z,ee]=r.useState(!1),q=r.useRef(!1);r.useEffect(()=>{if(A)return P1(A)},[A]),ci();const H=r.useCallback(he=>{const[de,...be]=J().map(ge=>ge.ref.current),[Te]=be.slice(-1),Ue=document.activeElement;for(const ge of he)if(ge===Ue||(ge==null||ge.scrollIntoView({block:"nearest"}),ge===de&&T&&(T.scrollTop=0),ge===Te&&T&&(T.scrollTop=T.scrollHeight),ge==null||ge.focus(),document.activeElement!==Ue))return},[J,T]),K=r.useCallback(()=>H([G,A]),[H,G,A]);r.useEffect(()=>{Z&&K()},[Z,K]);const{onOpenChange:X,triggerPointerDownPosRef:U}=k;r.useEffect(()=>{if(A){let he={x:0,y:0};const de=Ht(Te=>{var Ue,ge;he={x:Math.abs(Math.round(Te.pageX)-(((Ue=U.current)==null?void 0:Ue.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((ge=U.current)==null?void 0:ge.y)??0))}},"handlePointerMove"),be=Ht(Te=>{he.x<=10&&he.y<=10?Te.preventDefault():Te.composedPath().includes(A)||X(!1),document.removeEventListener("pointermove",de),U.current=null},"handlePointerUp");return U.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",be,{capture:!0})}}},[A,X,U]),r.useEffect(()=>{const he=Ht(()=>X(!1),"close");return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[X]);const[L,O]=Fm(he=>{const de=J().filter(Ue=>!Ue.disabled),be=de.find(Ue=>Ue.ref.current===document.activeElement),Te=Im(de,he,be);Te&&setTimeout(()=>{var Ue;return(Ue=Te.ref.current)==null?void 0:Ue.focus()})}),ne=r.useCallback((he,de,be)=>{const Te=!q.current&&!be;(k.value!==void 0&&k.value===de||Te)&&(I(he),Te&&(q.current=!0))},[k.value]),re=r.useCallback(()=>A==null?void 0:A.focus(),[A]),le=r.useCallback((he,de,be)=>{const Te=!q.current&&!be;(k.value!==void 0&&k.value===de||Te)&&W(he)},[k.value]),ae=i==="popper"?sg:OR,me=ae===sg?{side:h,sideOffset:m,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:C,hideWhenDetached:E,avoidCollisions:N}:{};return o.jsx(y5,{scope:s,content:A,viewport:T,onViewportChange:D,itemRefCallback:ne,selectedItem:G,onItemLeave:re,itemTextRefCallback:le,focusSelectedItem:K,selectedItemText:oe,position:i,isPositioned:Z,searchRef:L,children:o.jsx(Wc,{as:_R,allowPinchZoom:!0,children:o.jsx(Uc,{asChild:!0,trapped:k.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:$e(c,he=>{var de;(de=k.trigger)==null||de.focus({preventScroll:!0}),he.preventDefault()}),children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:o.jsx(ae,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:he=>he.preventDefault(),...j,...me,onPlaced:()=>ee(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:$e(j.onKeyDown,he=>{const de=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!de&&he.key.length===1&&O(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Te=J().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const Ue=he.target,ge=Te.indexOf(Ue);Te=Te.slice(ge+1)}setTimeout(()=>H(Te)),he.preventDefault()}})})})})})})},"SelectContentImpl")),OR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,onPlaced:i,...c}=t,u=so(Fo,s),f=G1(Fo,s),[h,m]=r.useState(null),[g,v]=r.useState(null),y=gt(n,v),w=Dm(s),b=r.useRef(!1),C=r.useRef(!0),{viewport:E,selectedItem:N,selectedItemText:j,focusSelectedItem:k}=f,A=r.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&g&&E&&N&&j){const P=u.trigger.getBoundingClientRect(),G=g.getBoundingClientRect(),I=u.valueNode.getBoundingClientRect(),oe=j.getBoundingClientRect();if(u.dir!=="rtl"){const Ue=oe.left-G.left,ge=I.left-Ue,st=P.left-ge,ht=P.width+st,Rt=Math.max(ht,G.width),Pe=window.innerWidth-ha,Ae=a1(ge,[ha,Math.max(ha,Pe-Rt)]);h.style.minWidth=ht+"px",h.style.left=Ae+"px"}else{const Ue=G.right-oe.right,ge=window.innerWidth-I.right-Ue,st=window.innerWidth-P.right-ge,ht=P.width+st,Rt=Math.max(ht,G.width),Pe=window.innerWidth-ha,Ae=a1(ge,[ha,Math.max(ha,Pe-Rt)]);h.style.minWidth=ht+"px",h.style.right=Ae+"px"}const W=w(),J=window.innerHeight-ha*2,Z=E.scrollHeight,ee=window.getComputedStyle(g),q=parseInt(ee.borderTopWidth,10),H=parseInt(ee.paddingTop,10),K=parseInt(ee.borderBottomWidth,10),X=parseInt(ee.paddingBottom,10),U=q+H+Z+X+K,L=Math.min(N.offsetHeight*5,U),O=window.getComputedStyle(E),ne=parseInt(O.paddingTop,10),re=parseInt(O.paddingBottom,10),le=P.top+P.height/2-ha,ae=J-le,me=N.offsetHeight/2,he=N.offsetTop+me,de=q+H+he,be=U-de;if(de<=le){const Ue=W.length>0&&N===W[W.length-1].ref.current;h.style.bottom="0px";const ge=g.clientHeight-E.offsetTop-E.offsetHeight,st=Math.max(ae,me+(Ue?re:0)+ge+K),ht=de+st;h.style.height=ht+"px"}else{const Ue=W.length>0&&N===W[0].ref.current;h.style.top="0px";const st=Math.max(le,q+E.offsetTop+(Ue?ne:0)+me)+be;h.style.height=st+"px",E.scrollTop=de-le+E.offsetTop}h.style.margin=`${ha}px 0`,h.style.minHeight=L+"px",h.style.maxHeight=J+"px",i==null||i(),requestAnimationFrame(()=>b.current=!0)}},[w,u.trigger,u.valueNode,h,g,E,N,j,u.dir,i]);Nn(()=>A(),[A]);const[M,T]=r.useState();Nn(()=>{g&&T(window.getComputedStyle(g).zIndex)},[g]);const D=r.useCallback(P=>{P&&C.current===!0&&(A(),k==null||k(),C.current=!1)},[A,k]);return o.jsx(VR,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:b,onScrollButtonChange:D,children:o.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:o.jsx(xt.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})},"SelectItemAlignedPosition")),sg=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,align:i="start",collisionPadding:c=ha,...u}=t,f=$m(s);return o.jsx(xm,{...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")),[VR,zR]=Xo(Fo,{}),og="SelectViewport",BR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,nonce:i,...c}=t,u=G1(og,s),f=zR(og,s),h=gt(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(W1.Slot,{scope:s,children:o.jsx(xt.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:$e(c.onScroll,g=>{const v=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=f;if(w!=null&&w.current&&y){const b=Math.abs(m.current-v.scrollTop);if(b>0){const C=window.innerHeight-ha*2,E=parseFloat(y.style.minHeight),N=parseFloat(y.style.height),j=Math.max(E,N);if(j<C){const k=j+b,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")),UR="SelectGroup",[WR,GR]=Xo(UR),KR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t,c=ga();return o.jsx(WR,{scope:s,id:c,children:o.jsx(xt.div,{role:"group","aria-labelledby":c,...i,ref:n})})},"SelectGroup")),YR="SelectLabel",qR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t,c=GR(YR,s);return o.jsx(xt.div,{id:c.id,...i,ref:n})},"SelectLabel")),hh="SelectItem",[XR,x5]=Xo(hh),QR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,value:i,disabled:c=!1,textValue:u,...f}=t,h=so(hh,s),m=G1(hh,s),g=h.value===i,[v,y]=r.useState(u??""),[w,b]=r.useState(!1),C=En(A=>{var M;return(M=m.itemRefCallback)==null?void 0:M.call(m,A,i,c)}),E=gt(n,C),N=ga(),j=r.useRef("touch"),k=Ht(()=>{c||(h.onValueChange(i),h.onOpenChange(!1))},"handleSelect");return o.jsx(XR,{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(W1.ItemSlot,{scope:s,value:i,disabled:c,textValue:v,children:o.jsx(xt.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:E,onFocus:$e(f.onFocus,()=>b(!0)),onBlur:$e(f.onBlur,()=>b(!1)),onClick:$e(f.onClick,()=>{j.current!=="mouse"&&k()}),onPointerUp:$e(f.onPointerUp,()=>{j.current==="mouse"&&k()}),onPointerDown:$e(f.onPointerDown,A=>{j.current=A.pointerType}),onPointerMove:$e(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:$e(f.onPointerLeave,A=>{var M;A.currentTarget===document.activeElement&&((M=m.onItemLeave)==null||M.call(m))}),onKeyDown:$e(f.onKeyDown,A=>{var T;c||A.target!==A.currentTarget||((T=m.searchRef)==null?void 0:T.current)!==""&&A.key===" "||(ER.includes(A.key)&&k(),A.key===" "&&A.preventDefault())})})})})},"SelectItem")),A0="SelectItemText",JR=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,className:i,style:c,...u}=t,f=so(A0,s),h=G1(A0,s),m=x5(A0,s),g=kR(A0,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)}),b=gt(n,y,m.onItemTextChange,w),C=v==null?void 0:v.textContent,E=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 Nn(()=>(N(E),()=>j(E)),[N,j,E]),o.jsxs(o.Fragment,{children:[o.jsx(xt.span,{id:m.textId,...u,ref:b}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!qc(f.value)?na.createPortal(u.children,f.valueNode):null]})},"SelectItemText")),eP="SelectItemIndicator",tP=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t;return x5(eP,s).isSelected?o.jsx(xt.span,{"aria-hidden":!0,...i,ref:n}):null},"SelectItemIndicator")),nP=r.forwardRef(Ht(function(t,n){const{__scopeSelect:s,...i}=t;return o.jsx(xt.div,{"aria-hidden":!0,...i,ref:n})},"SelectSeparator")),rP="SelectBubbleInput",aP=r.forwardRef(Ht(function({__scopeSelect:t,...n},s){const i=so(rP,t),{value:c,onValueChange:u,required:f,disabled:h,name:m,autoComplete:g,form:v}=i,{nativeOptions:y,nativeSelectKey:w}=i,b=r.useRef(null),C=gt(s,b),E=c??"",N=r5(E),j=Array.from(y).some(k=>(k.props.value??"")==="");return r.useEffect(()=>{const k=b.current;if(!k)return;const A=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(A,"value").set;if(N!==E&&T){const D=new Event("change",{bubbles:!0});T.call(k,E),k.dispatchEvent(D)}},[N,E]),o.jsxs(xt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:m,autoComplete:g,disabled:h,form:v,onChange:k=>u(k.target.value),...n,style:{...c3,...n.style},ref:C,defaultValue:E,children:[qc(c)&&!j?o.jsx("option",{value:""}):null,Array.from(y)]},w)},"SelectBubbleInput"));function w5(e){return typeof e=="function"}Ht(w5,"isFunction");function qc(e){return e===""||e===void 0}Ht(qc,"shouldShowPlaceholder");function Fm(e){const t=En(e),n=r.useRef(""),s=r.useRef(0),i=r.useCallback(u=>{const f=n.current+u;t(f),Ht((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]}Ht(Fm,"useTypeaheadSearch");function Im(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=b5(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}Ht(Im,"findNextItem");function b5(e,t){return e.map((n,s)=>e[(t+s)%e.length])}Ht(b5,"wrapArray");var sP=Object.defineProperty,Qo=(e,t)=>sP(e,"name",{value:t,configurable:!0}),[_m,yO]=Cr("Tooltip",[ro]);ro();var oP="TooltipProvider",lP=700,[iP,xO]=_m(oP),cP=Qo(e=>{const{__scopeTooltip:t,delayDuration:n=lP,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(iP,{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"),uP="Tooltip",[wO,bO]=_m(uP),dP="TooltipPortal",[EO,CO]=_m(dP,{forceMount:void 0});function fP(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(fP,"getExitSideFromRect");function hP(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(hP,"getPaddedExitPoints");function mP(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(mP,"getPointsFromRect");function pP(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(pP,"isPointInPolygon");function gP(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),E5(t)}Qo(gP,"getHull");function E5(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(E5,"getHullPresorted");var vP=cP,f2={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
96
|
*/var lg;function yP(){return lg||(lg=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})()})(f2)),f2.exports}var xP=yP();const Je=mv(xP),Sa={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}},Zm={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}},wP=["1","2","3","4"],C5={...Sa,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:wP,default:"3",responsive:!0},width:Lo.width,minWidth:Lo.minWidth,maxWidth:{...Lo.maxWidth,default:"600px"},...Zm},S5=["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"],ja={color:{type:"enum",values:S5,default:void 0}},Om={color:{type:"enum",values:S5,default:""}},Jo={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}},bP=["normal","start","end","both"],j5={trim:{type:"enum",className:"rt-r-lt",values:bP,responsive:!0}},EP=["left","center","right"],k5={align:{type:"enum",className:"rt-r-ta",values:EP,responsive:!0}},CP=["wrap","nowrap","pretty","balance"],A5={wrap:{type:"enum",className:"rt-r-tw",values:CP,responsive:!0}},N5={truncate:{type:"boolean",className:"rt-truncate"}},SP=["light","regular","medium","bold"],M5={weight:{type:"enum",className:"rt-r-weight",values:SP,responsive:!0}},jP=["h1","h2","h3","h4","h5","h6"],kP=["1","2","3","4","5","6","7","8","9"],AP={as:{type:"enum",values:jP,default:"h1"},...Sa,size:{type:"enum",className:"rt-r-size",values:kP,default:"6",responsive:!0},...M5,...k5,...j5,...N5,...A5,...ja,...Jo},NP=["initial","xs","sm","md","lg","xl"],Vm=new Set(NP);function R5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pc(e){return typeof e=="object"&&e!==null&&Object.keys(e).some(t=>Vm.has(t))}function _s({className:e,customProperties:t,...n}){const s=s1({allowArbitraryValues:!0,className:e,...n}),i=MP({customProperties:t,...n});return[s,i]}function s1({allowArbitraryValues:e,value:t,className:n,propValues:s,parseValue:i=c=>c}){const c=[];if(t){if(typeof t=="string"&&s.includes(t))return ig(n,t,i);if(pc(t)){const u=t;for(const f in u){if(!R5(u,f)||!Vm.has(f))continue;const h=u[f];if(h!==void 0){if(s.includes(h)){const m=ig(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 ig(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 MP({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(!R5(c,u)||!Vm.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 o1(...e){let t={};for(const n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}function RP(...e){return Object.assign({},...e)}function hn(e,...t){let n,s;const i={...e},c=RP(...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=s1({allowArbitraryValues:!1,value:f,className:h.className,propValues:h.values,parseValue:h.parseValue});n=Je(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=o1(s,y),n=Je(n,v);continue}if(h.type==="boolean"&&f){n=Je(n,h.className);continue}}}return i.className=Je(n,e.className),i.style=o1(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"]}},zm=r.forwardRef((e,t)=>{const{children:n,className:s,asChild:i,as:c="h1",color:u,...f}=hn(e,AP,aa);return r.createElement(Go,{"data-accent-color":u,...f,ref:t,className:Je("rt-Heading",s)},i?n:r.createElement(c,null,n))});zm.displayName="Heading";const PP=["span","div","label","p"],LP=["1","2","3","4","5","6","7","8","9"],TP={as:{type:"enum",values:PP,default:"span"},...Sa,size:{type:"enum",className:"rt-r-size",values:LP,responsive:!0},...M5,...k5,...j5,...N5,...A5,...ja,...Jo},Io=r.forwardRef((e,t)=>{const{children:n,className:s,asChild:i,as:c="span",color:u,...f}=hn(e,TP,aa);return r.createElement(Go,{"data-accent-color":u,...f,ref:t,className:Je("rt-Text",s)},i?n:r.createElement(c,null,n))});Io.displayName="Text";function HP(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 DP=["none","small","medium","large","full"],vi={radius:{type:"enum",values:DP,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=()=>{},l1=r.createContext(void 0);function Bm(){const e=r.useContext(l1);if(e===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return e}const Wa=r.forwardRef((e,t)=>r.useContext(l1)===void 0?r.createElement(vP,{delayDuration:200},r.createElement(DS,{dir:"ltr"},r.createElement(P5,{...e,ref:t}))):r.createElement(Um,{...e,ref:t}));Wa.displayName="Theme";const P5=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[b,C]=r.useState(i);r.useEffect(()=>C(i),[i]);const[E,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(Um,{...m,ref:t,isRoot:!0,hasBackground:h,appearance:g,accentColor:y,grayColor:b,panelBackground:E,radius:j,scaling:A,onAppearanceChange:v,onAccentColorChange:w,onGrayColorChange:C,onPanelBackgroundChange:N,onRadiusChange:k,onScalingChange:M})});P5.displayName="ThemeRoot";const Um=r.forwardRef((e,t)=>{const n=r.useContext(l1),{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:b=Tl,onPanelBackgroundChange:C=Tl,onRadiusChange:E=Tl,onScalingChange:N=Tl,...j}=e,k=s?Go:"div",A=h==="auto"?HP(f):h,M=e.appearance==="light"||e.appearance==="dark",T=c===void 0?i||M:c;return r.createElement(l1.Provider,{value:r.useMemo(()=>({appearance:u,accentColor:f,grayColor:h,resolvedGrayColor:A,panelBackground:m,radius:g,scaling:v,onAppearanceChange:y,onAccentColorChange:w,onGrayColorChange:b,onPanelBackgroundChange:C,onRadiusChange:E,onScalingChange:N}),[u,f,h,A,m,g,v,y,w,b,C,E,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:Je("radix-themes",{light:u==="light",dark:u==="dark"},j.className)}))});Um.displayName="ThemeImpl";const gs=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},Xc=e=>r.createElement(sk,{...e});Xc.displayName="AlertDialog.Root";const L5=r.forwardRef(({children:e,...t},n)=>r.createElement(ok,{...t,ref:n,asChild:!0},gs(e)));L5.displayName="AlertDialog.Trigger";const Qc=r.forwardRef(({align:e,...t},n)=>{const{align:s,...i}=C5,{className:c}=hn({align:e},{align:s}),{className:u,forceMount:f,container:h,...m}=hn(t,i);return r.createElement(lk,{container:h,forceMount:f},r.createElement(Wa,{asChild:!0},r.createElement(ik,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},r.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},r.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${c}`},r.createElement(ck,{...m,ref:n,className:Je("rt-BaseDialogContent","rt-AlertDialogContent",u)}))))))});Qc.displayName="AlertDialog.Content";const Jc=r.forwardRef((e,t)=>r.createElement(fk,{asChild:!0},r.createElement(zm,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));Jc.displayName="AlertDialog.Title";const eu=r.forwardRef((e,t)=>r.createElement(hk,{asChild:!0},r.createElement(Io,{as:"p",size:"3",...e,asChild:!1,ref:t})));eu.displayName="AlertDialog.Description";const tu=r.forwardRef(({children:e,...t},n)=>r.createElement(uk,{...t,ref:n,asChild:!0},gs(e)));tu.displayName="AlertDialog.Action";const nu=r.forwardRef(({children:e,...t},n)=>r.createElement(dk,{...t,ref:n,asChild:!0},gs(e)));nu.displayName="AlertDialog.Cancel";function $P(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 FP=["1","2","3"],IP=["solid","soft","surface","outline"],_P={...Sa,size:{type:"enum",className:"rt-r-size",values:FP,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:IP,default:"soft"},...Om,...Jo,...vi},T5=r.forwardRef((e,t)=>{const{asChild:n,className:s,color:i,radius:c,...u}=hn(e,_P,aa),f=n?Go:"span";return r.createElement(f,{"data-accent-color":i,"data-radius":c,...u,ref:t,className:Je("rt-reset","rt-Badge",s)})});T5.displayName="Badge";const H5=Go,ZP=["div","span"],OP=["none","inline","inline-block","block","contents"],VP={as:{type:"enum",values:ZP,default:"div"},...Sa,display:{type:"enum",className:"rt-r-display",values:OP,responsive:!0}},Co=["0","1","2","3","4","5","6","7","8","9"],U0={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}},h2=["visible","hidden","clip","scroll","auto"],zP=["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"],BP=["0","1"],UP=["0","1"],WP=["start","center","end","baseline","stretch"],GP=["start","center","end","baseline","stretch"],D5={...U0,...Lo,...Zm,position:{type:"enum",className:"rt-r-position",values:zP,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:h2,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:h2,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:h2,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:BP,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:UP,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:WP,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:GP,responsive:!0}},W0=r.forwardRef((e,t)=>{const{className:n,asChild:s,as:i="div",...c}=hn(e,VP,D5,aa);return r.createElement(s?H5:i,{...c,ref:t,className:Je("rt-Box",n)})});W0.displayName="Box";const KP=["1","2","3","4"],YP=["classic","solid","soft","surface","outline","ghost"],cg={...Sa,size:{type:"enum",className:"rt-r-size",values:KP,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:YP,default:"solid"},...Om,...Jo,...vi,loading:{type:"boolean",className:"rt-loading",default:!1}},m2=["0","1","2","3","4","5","6","7","8","9"],qP={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:m2,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:m2,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:m2,responsive:!0}},XP=["div","span"],QP=["none","inline-flex","flex"],JP=["row","column","row-reverse","column-reverse"],eL=["start","center","end","baseline","stretch"],tL=["start","center","end","between"],nL=["nowrap","wrap","wrap-reverse"],$5={as:{type:"enum",values:XP,default:"div"},...Sa,display:{type:"enum",className:"rt-r-display",values:QP,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:JP,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:eL,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:tL,parseValue:rL,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:nL,responsive:!0},...qP};function rL(e){return e==="between"?"space-between":e}const dr=r.forwardRef((e,t)=>{const{className:n,asChild:s,as:i="div",...c}=hn(e,$5,D5,aa);return r.createElement(s?H5:i,{...c,ref:t,className:Je("rt-Flex",n)})});dr.displayName="Flex";const aL=["1","2","3"],sL={size:{type:"enum",className:"rt-r-size",values:aL,default:"2",responsive:!0},loading:{type:"boolean",default:!0}},on=r.forwardRef((e,t)=>{const{className:n,children:s,loading:i,...c}=hn(e,sL,aa);if(!i)return s;const u=r.createElement("span",{...c,ref:t,className:Je("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(dr,{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(dr,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,u))))});on.displayName="Spinner";const oL=gS;function F5(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s)]))}function lL(e){return e==="3"?"3":"2"}function iL(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}const I5=r.forwardRef((e,t)=>{const{size:n=cg.size.default}=e,{className:s,children:i,asChild:c,color:u,radius:f,disabled:h=e.loading,...m}=hn(e,cg,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:Je("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(oL,null,i),r.createElement(dr,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,r.createElement(on,{size:F5(n,iL)})))):i)});I5.displayName="BaseButton";const pa=r.forwardRef(({className:e,...t},n)=>r.createElement(I5,{...t,ref:n,className:Je("rt-Button",e)}));pa.displayName="Button";const cL=["1","2","3"],uL=["soft","surface","outline"],ug={...Sa,size:{type:"enum",className:"rt-r-size",values:cL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:uL,default:"soft"},...Om,...Jo},_5=r.createContext({}),Z5=r.forwardRef((e,t)=>{const{size:n=ug.size.default}=e,{asChild:s,children:i,className:c,color:u,...f}=hn(e,ug,aa),h=s?Go:"div";return r.createElement(h,{"data-accent-color":u,...f,className:Je("rt-CalloutRoot",c),ref:t},r.createElement(_5.Provider,{value:r.useMemo(()=>({size:n}),[n])},i))});Z5.displayName="Callout.Root";const dL=r.forwardRef(({className:e,...t},n)=>r.createElement("div",{...t,className:Je("rt-CalloutIcon",e),ref:n}));dL.displayName="Callout.Icon";const O5=r.forwardRef(({className:e,...t},n)=>{const{size:s}=r.useContext(_5);return r.createElement(Io,{as:"p",size:F5(s,lL),...t,asChild:!1,ref:n,className:Je("rt-CalloutText",e)})});O5.displayName="Callout.Text";const fL=Ft.forwardRef((e,t)=>Ft.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},Ft.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"})));fL.displayName="ThickDividerHorizontalIcon";const yi=Ft.forwardRef((e,t)=>Ft.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},Ft.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 V5=Ft.forwardRef((e,t)=>Ft.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},Ft.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"})));V5.displayName="ChevronDownIcon";const Wm=Ft.forwardRef((e,t)=>Ft.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:t},Ft.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"})));Wm.displayName="ThickChevronRightIcon";const hL=["1","2","3"],ac={...Sa,size:{values:hL,default:"1"},...vi,scrollbars:{default:"both"}};function mL(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 pL(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,b]=_s({className:"rt-r-ml",customProperties:["--margin-left"],propValues:So,value:e.ml});return[Je(t,s,c,f,m,v,w),o1(n,i,u,h,g,y,b)]}const xi=r.forwardRef((e,t)=>{const{rest:n,...s}=mL(e),[i,c]=pL(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:b=ac.radius.default,scrollbars:C=ac.scrollbars.default,...E}=n;return r.createElement(p5,{type:g,scrollHideDelay:v,className:Je("rt-ScrollAreaRoot",i,h),style:o1(c,m),asChild:u},$P({asChild:u,children:f},N=>r.createElement(r.Fragment,null,r.createElement(g5,{...E,ref:t,className:"rt-ScrollAreaViewport"},N),r.createElement("div",{className:"rt-ScrollAreaViewportFocusRing"}),C!=="vertical"?r.createElement(dh,{"data-radius":b,orientation:"horizontal",className:Je("rt-ScrollAreaScrollbar",s1({className:"rt-r-size",value:w,propValues:ac.size.values}))},r.createElement(fh,{className:"rt-ScrollAreaThumb"})):null,C!=="horizontal"?r.createElement(dh,{"data-radius":b,orientation:"vertical",className:Je("rt-ScrollAreaScrollbar",s1({className:"rt-r-size",value:w,propValues:ac.size.values}))},r.createElement(fh,{className:"rt-ScrollAreaThumb"})):null,C==="both"?r.createElement(xR,{className:"rt-ScrollAreaCorner"}):null)))});xi.displayName="ScrollArea";const gL=["1","2"],vL=["solid","soft"],$a={size:{type:"enum",className:"rt-r-size",values:gL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:vL,default:"solid"},...ja,...Jo},z5={...Sa,...ja},B5={...ja},U5={...ja},Gm=e=>r.createElement(ON,{...e});Gm.displayName="ContextMenu.Root";const Km=r.forwardRef(({children:e,...t},n)=>r.createElement(VN,{...t,ref:n,asChild:!0},gs(e)));Km.displayName="ContextMenu.Trigger";const W5=r.createContext({}),Ym=r.forwardRef((e,t)=>{const n=Bm(),{size:s=$a.size.default,variant:i=$a.variant.default,highContrast:c=$a.highContrast.default}=e,{className:u,children:f,color:h,container:m,forceMount:g,...v}=hn(e,$a),y=h||n.accentColor;return r.createElement(Qy,{container:m,forceMount:g},r.createElement(Wa,{asChild:!0},r.createElement(zN,{"data-accent-color":y,alignOffset:-Number(s)*4,collisionPadding:10,...v,asChild:!1,ref:t,className:Je("rt-PopperContent","rt-BaseMenuContent","rt-ContextMenuContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Je("rt-BaseMenuViewport","rt-ContextMenuViewport")},r.createElement(W5.Provider,{value:r.useMemo(()=>({size:s,variant:i,color:y,highContrast:c}),[s,i,y,c])},f))))))});Ym.displayName="ContextMenu.Content";const yL=r.forwardRef(({className:e,...t},n)=>r.createElement(UN,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuLabel","rt-ContextMenuLabel",e)}));yL.displayName="ContextMenu.Label";const qr=r.forwardRef((e,t)=>{const{className:n,children:s,color:i=z5.color.default,shortcut:c,...u}=e;return r.createElement(WN,{"data-accent-color":i,...u,ref:t,className:Je("rt-reset","rt-BaseMenuItem","rt-ContextMenuItem",n)},r.createElement(k1,null,s),c&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},c))});qr.displayName="ContextMenu.Item";const xL=r.forwardRef(({className:e,...t},n)=>r.createElement(BN,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuGroup","rt-ContextMenuGroup",e)}));xL.displayName="ContextMenu.Group";const wL=r.forwardRef(({className:e,...t},n)=>r.createElement(KN,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuRadioGroup","rt-ContextMenuRadioGroup",e)}));wL.displayName="ContextMenu.RadioGroup";const bL=r.forwardRef((e,t)=>{const{children:n,className:s,color:i=U5.color.default,...c}=e;return r.createElement(YN,{...c,asChild:!1,ref:t,"data-accent-color":i,className:Je("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-ContextMenuItem","rt-ContextMenuRadioItem",s)},r.createElement(k1,null,n),r.createElement(Jy,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})))});bL.displayName="ContextMenu.RadioItem";const EL=r.forwardRef((e,t)=>{const{children:n,className:s,shortcut:i,color:c=B5.color.default,...u}=e;return r.createElement(GN,{...u,asChild:!1,ref:t,"data-accent-color":c,className:Je("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-ContextMenuItem","rt-ContextMenuCheckboxItem",s)},r.createElement(k1,null,n),r.createElement(Jy,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),i&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},i))});EL.displayName="ContextMenu.CheckboxItem";const CL=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(XN,{...i,asChild:!1,ref:t,className:Je("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-ContextMenuItem","rt-ContextMenuSubTrigger",n)},s,r.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},r.createElement(Wm,{className:"rt-BaseMenuSubTriggerIcon rt-ContextMenuSubTriggerIcon"})))});CL.displayName="ContextMenu.SubTrigger";const SL=r.forwardRef((e,t)=>{const{size:n,variant:s,color:i,highContrast:c}=r.useContext(W5),{className:u,children:f,container:h,forceMount:m,...g}=hn({size:n,variant:s,color:i,highContrast:c,...e},$a);return r.createElement(Qy,{container:h,forceMount:m},r.createElement(Wa,{asChild:!0},r.createElement(QN,{"data-accent-color":i,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...g,asChild:!1,ref:t,className:Je("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-ContextMenuContent","rt-ContextMenuSubContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Je("rt-BaseMenuViewport","rt-ContextMenuViewport")},f)))))});SL.displayName="ContextMenu.SubContent";const mh=r.forwardRef(({className:e,...t},n)=>r.createElement(qN,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuSeparator","rt-ContextMenuSeparator",e)}));mh.displayName="ContextMenu.Separator";const el=e=>r.createElement(ui,{...e,modal:!0});el.displayName="Dialog.Root";const jL=r.forwardRef(({children:e,...t},n)=>r.createElement(um,{...t,ref:n,asChild:!0},gs(e)));jL.displayName="Dialog.Trigger";const tl=r.forwardRef(({align:e,...t},n)=>{const{align:s,...i}=C5,{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(Wa,{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:Je("rt-BaseDialogContent","rt-DialogContent",u)}))))))});tl.displayName="Dialog.Content";const nl=r.forwardRef((e,t)=>r.createElement(mi,{asChild:!0},r.createElement(zm,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));nl.displayName="Dialog.Title";const kL=r.forwardRef((e,t)=>r.createElement(dm,{asChild:!0},r.createElement(Io,{as:"p",size:"3",...e,asChild:!1,ref:t})));kL.displayName="Dialog.Description";const ru=r.forwardRef(({children:e,...t},n)=>r.createElement(L1,{...t,ref:n,asChild:!0},gs(e)));ru.displayName="Dialog.Close";const _o=e=>r.createElement(yM,{...e});_o.displayName="DropdownMenu.Root";const Zo=r.forwardRef(({children:e,...t},n)=>r.createElement(xM,{...t,ref:n,asChild:!0},gs(e)));Zo.displayName="DropdownMenu.Trigger";const G5=r.createContext({}),Oo=r.forwardRef((e,t)=>{const n=Bm(),{size:s=$a.size.default,variant:i=$a.variant.default,highContrast:c=$a.highContrast.default}=e,{className:u,children:f,color:h,container:m,forceMount:g,...v}=hn(e,$a),y=h||n.accentColor;return r.createElement(t5,{container:m,forceMount:g},r.createElement(Wa,{asChild:!0},r.createElement(wM,{"data-accent-color":y,align:"start",sideOffset:4,collisionPadding:10,...v,asChild:!1,ref:t,className:Je("rt-PopperContent","rt-BaseMenuContent","rt-DropdownMenuContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Je("rt-BaseMenuViewport","rt-DropdownMenuViewport")},r.createElement(G5.Provider,{value:r.useMemo(()=>({size:s,variant:i,color:y,highContrast:c}),[s,i,y,c])},f))))))});Oo.displayName="DropdownMenu.Content";const AL=r.forwardRef(({className:e,...t},n)=>r.createElement(EM,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuLabel","rt-DropdownMenuLabel",e)}));AL.displayName="DropdownMenu.Label";const Qr=r.forwardRef((e,t)=>{const{className:n,children:s,color:i=z5.color.default,shortcut:c,...u}=e;return r.createElement(CM,{"data-accent-color":i,...u,ref:t,className:Je("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem",n)},r.createElement(k1,null,s),c&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},c))});Qr.displayName="DropdownMenu.Item";const NL=r.forwardRef(({className:e,...t},n)=>r.createElement(bM,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuGroup","rt-DropdownMenuGroup",e)}));NL.displayName="DropdownMenu.Group";const i1=r.forwardRef(({className:e,...t},n)=>r.createElement(jM,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuRadioGroup","rt-DropdownMenuRadioGroup",e)}));i1.displayName="DropdownMenu.RadioGroup";const Vl=r.forwardRef((e,t)=>{const{children:n,className:s,color:i=U5.color.default,...c}=e;return r.createElement(kM,{...c,asChild:!1,ref:t,"data-accent-color":i,className:Je("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-DropdownMenuItem","rt-DropdownMenuRadioItem",s)},n,r.createElement(n5,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon"})))});Vl.displayName="DropdownMenu.RadioItem";const ML=r.forwardRef((e,t)=>{const{children:n,className:s,shortcut:i,color:c=B5.color.default,...u}=e;return r.createElement(SM,{...u,asChild:!1,ref:t,"data-accent-color":c,className:Je("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-DropdownMenuItem","rt-DropdownMenuCheckboxItem",s)},n,r.createElement(n5,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},r.createElement(yi,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),i&&r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},i))});ML.displayName="DropdownMenu.CheckboxItem";const RL=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(NM,{...i,asChild:!1,ref:t,className:Je("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger",n)},s,r.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},r.createElement(Wm,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"})))});RL.displayName="DropdownMenu.SubTrigger";const PL=r.forwardRef((e,t)=>{const{size:n,variant:s,color:i,highContrast:c}=r.useContext(G5),{className:u,children:f,container:h,forceMount:m,...g}=hn({size:n,variant:s,color:i,highContrast:c,...e},$a);return r.createElement(t5,{container:h,forceMount:m},r.createElement(Wa,{asChild:!0},r.createElement(MM,{"data-accent-color":i,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...g,asChild:!1,ref:t,className:Je("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-DropdownMenuContent","rt-DropdownMenuSubContent",u)},r.createElement(xi,{type:"auto"},r.createElement("div",{className:Je("rt-BaseMenuViewport","rt-DropdownMenuViewport")},f)))))});PL.displayName="DropdownMenu.SubContent";const c1=r.forwardRef(({className:e,...t},n)=>r.createElement(AM,{...t,asChild:!1,ref:n,className:Je("rt-BaseMenuSeparator","rt-DropdownMenuSeparator",e)}));c1.displayName="DropdownMenu.Separator";const LL=["1","2","3","4"],TL={...Sa,size:{type:"enum",className:"rt-r-size",values:LL,default:"2",responsive:!0},width:Lo.width,minWidth:Lo.minWidth,maxWidth:{...Lo.maxWidth,default:"480px"},...Zm},ti=e=>r.createElement(qM,{...e});ti.displayName="Popover.Root";const ni=r.forwardRef(({children:e,...t},n)=>r.createElement(QM,{...t,ref:n,asChild:!0},gs(e)));ni.displayName="Popover.Trigger";const ri=r.forwardRef((e,t)=>{const{className:n,forceMount:s,container:i,...c}=hn(e,TL);return r.createElement(JM,{container:i,forceMount:s},r.createElement(Wa,{asChild:!0},r.createElement(eR,{align:"start",sideOffset:8,collisionPadding:10,...c,ref:t,className:Je("rt-PopperContent","rt-PopoverContent",n)})))});ri.displayName="Popover.Content";const HL=r.forwardRef(({children:e,...t},n)=>r.createElement(tR,{...t,ref:n,asChild:!0},gs(e)));HL.displayName="Popover.Close";const DL=r.forwardRef(({children:e,...t},n)=>r.createElement(XM,{...t,ref:n}));DL.displayName="Popover.Anchor";const $L=["1","2","3"],qm={size:{type:"enum",className:"rt-r-size",values:$L,default:"2",responsive:!0}},FL=["classic","surface","soft","ghost"],IL={variant:{type:"enum",className:"rt-variant",values:FL,default:"surface"},...ja,...vi,placeholder:{type:"string"}},_L=["solid","soft"],ZL={variant:{type:"enum",className:"rt-variant",values:_L,default:"solid"},...ja,...Jo},Xm=r.createContext({}),K5=e=>{const{children:t,size:n=qm.size.default,...s}=e;return r.createElement(AR,{...s},r.createElement(Xm.Provider,{value:r.useMemo(()=>({size:n}),[n])},t))};K5.displayName="Select.Root";const Y5=r.forwardRef((e,t)=>{const n=r.useContext(Xm),{children:s,className:i,color:c,radius:u,placeholder:f,...h}=hn({size:n==null?void 0:n.size,...e},{size:qm.size},IL,aa);return r.createElement(MR,{asChild:!0},r.createElement("button",{"data-accent-color":c,"data-radius":u,...h,ref:t,className:Je("rt-reset","rt-SelectTrigger",i)},r.createElement("span",{className:"rt-SelectTriggerInner"},r.createElement(PR,{placeholder:f},s)),r.createElement(LR,{asChild:!0},r.createElement(V5,{className:"rt-SelectIcon"}))))});Y5.displayName="Select.Trigger";const q5=r.forwardRef((e,t)=>{const n=r.useContext(Xm),{className:s,children:i,color:c,container:u,...f}=hn({size:n==null?void 0:n.size,...e},{size:qm.size},ZL),h=Bm(),m=c||h.accentColor;return r.createElement($R,{container:u},r.createElement(Wa,{asChild:!0},r.createElement(FR,{"data-accent-color":m,sideOffset:4,...f,asChild:!1,ref:t,className:Je({"rt-PopperContent":f.position==="popper"},"rt-SelectContent",s)},r.createElement(p5,{type:"auto",className:"rt-ScrollAreaRoot"},r.createElement(BR,{asChild:!0,className:"rt-SelectViewport"},r.createElement(g5,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},i)),r.createElement(dh,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},r.createElement(fh,{className:"rt-ScrollAreaThumb"}))))))});q5.displayName="Select.Content";const X5=r.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return r.createElement(QR,{...i,asChild:!1,ref:t,className:Je("rt-SelectItem",n)},r.createElement(tP,{className:"rt-SelectItemIndicator"},r.createElement(yi,{className:"rt-SelectItemIndicatorIcon"})),r.createElement(JR,null,s))});X5.displayName="Select.Item";const OL=r.forwardRef(({className:e,...t},n)=>r.createElement(KR,{...t,asChild:!1,ref:n,className:Je("rt-SelectGroup",e)}));OL.displayName="Select.Group";const VL=r.forwardRef(({className:e,...t},n)=>r.createElement(qR,{...t,asChild:!1,ref:n,className:Je("rt-SelectLabel",e)}));VL.displayName="Select.Label";const zL=r.forwardRef(({className:e,...t},n)=>r.createElement(nP,{...t,asChild:!1,ref:n,className:Je("rt-SelectSeparator",e)}));zL.displayName="Select.Separator";const BL=["1","2","3"],UL=["classic","surface","soft"],WL=["none","vertical","horizontal","both"],GL={size:{type:"enum",className:"rt-r-size",values:BL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:UL,default:"surface"},resize:{type:"enum",className:"rt-r-resize",values:WL,responsive:!0},...ja,...vi},Qm=r.forwardRef((e,t)=>{const{className:n,color:s,radius:i,style:c,...u}=hn(e,GL,aa);return r.createElement("div",{"data-accent-color":s,"data-radius":i,className:Je("rt-TextAreaRoot",n),style:c},r.createElement("textarea",{className:"rt-reset rt-TextAreaInput",ref:t,...u}))});Qm.displayName="TextArea";const KL=["1","2","3"],YL=["classic","surface","soft"],qL={size:{type:"enum",className:"rt-r-size",values:KL,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:YL,default:"surface"},...ja,...vi},XL=["left","right"],QL={side:{type:"enum",values:XL},...ja,gap:$5.gap,px:U0.px,pl:U0.pl,pr:U0.pr},Kl=r.forwardRef((e,t)=>{const n=r.useRef(null),{children:s,className:i,color:c,radius:u,style:f,...h}=hn(e,qL,aa);return r.createElement("div",{"data-accent-color":c,"data-radius":u,style:f,className:Je("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:rm(n,t),className:"rt-reset rt-TextFieldInput"}),s)});Kl.displayName="TextField.Root";const JL=r.forwardRef((e,t)=>{const{className:n,color:s,side:i,...c}=hn(e,QL);return r.createElement("div",{"data-accent-color":s,"data-side":i,...c,ref:t,className:Je("rt-TextFieldSlot",n)})});JL.displayName="TextField.Slot";const ir={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 Q5(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}const ph="scenri:pref-changed";function J5(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}try{window.dispatchEvent(new CustomEvent(ph,{detail:{key:e,value:t}}))}catch{}}function gh(e,t){try{const n=localStorage.getItem(e);return n===null?null:(localStorage.setItem(t,n),localStorage.removeItem(e),n)}catch{return null}}function Za(e,t){const[n,s]=r.useState(()=>Q5(e,t));return r.useEffect(()=>{J5(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(ph,i),()=>window.removeEventListener(ph,i)},[e]),[n,s]}function eT(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 p2(e,t){const[n,s]=Za(e,t),[i,c]=r.useState(null);return[i??n,f=>{c(null),s(f)},c]}const tT=()=>Q5(ir.lastBrand,null),nT=e=>J5(ir.lastBrand,e),vh="sc-theme",rT="bt-theme",aT=()=>window.matchMedia("(prefers-color-scheme: light)").matches,ex=r.createContext({choice:"system",mode:"dark",setChoice:()=>{},toggle:()=>{}}),sT=()=>r.useContext(ex);function oT(){const e=localStorage.getItem(vh)??gh(rT,vh);return e==="light"||e==="dark"||e==="system"?e:"system"}function lT({children:e}){const[t,n]=r.useState(oT),[s,i]=r.useState(()=>aT()?"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(vh,t)},[c,t]);const u=r.useMemo(()=>({choice:t,mode:c,setChoice:n,toggle:()=>n(c==="dark"?"light":"dark")}),[t,c]);return o.jsx(ex.Provider,{value:u,children:o.jsx(Wa,{appearance:c,accentColor:"gray",grayColor:"gray",radius:"large",scaling:"100%",children:e})})}const iT=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"}))]]),cT=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"}))]]),uT=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"}))]]),dT=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"}))]]),fT=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"}))]]),hT=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"}))]]),mT=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"}))]]),pT=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"}))]]),gT=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"}))]]),vT=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"}))]]),yT=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"}))]]),xT=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"}))]]),wT=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"}))]]),bT=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"}))]]),ET=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"}))]]),CT=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"}))]]),ST=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"}))]]),jT=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"}))]]),kT=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"}))]]),AT=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"}))]]),NT=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"}))]]),MT=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"}))]]),RT=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"}))]]),PT=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"}))]]),LT=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"}))]]),TT=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"}))]]),HT=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"}))]]),DT=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"}))]]),$T=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"}))]]),FT=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"}))]]),IT=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"}))]]),_T=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,68H190.06A33.82,33.82,0,0,0,196,49.69,36.62,36.62,0,0,0,158.31,12,33.44,33.44,0,0,0,134,23.25a54.65,54.65,0,0,0-6,8.3,54.65,54.65,0,0,0-6-8.3A33.44,33.44,0,0,0,97.69,12,36.62,36.62,0,0,0,60,49.69,33.82,33.82,0,0,0,65.94,68H40A20,20,0,0,0,20,88v32a20,20,0,0,0,16,19.6V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V139.6A20,20,0,0,0,236,120V88A20,20,0,0,0,216,68Zm-4,48H140V92h72ZM152,39.17A9.59,9.59,0,0,1,159,36h.35A12.62,12.62,0,0,1,172,49,9.59,9.59,0,0,1,168.83,56c-6.9,6.12-18.25,9.26-27.63,10.76C142.7,57.42,145.84,46.07,152,39.17ZM87.7,39.7A12.8,12.8,0,0,1,96.61,36H97A9.59,9.59,0,0,1,104,39.17c6.12,6.9,9.26,18.24,10.75,27.61C105.45,65.27,94,62.13,87.17,56A9.59,9.59,0,0,1,84,49,12.72,12.72,0,0,1,87.7,39.7ZM44,92h72v24H44Zm16,48h56v56H60Zm80,56V140h56v56Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,128v72a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V128Z",opacity:"0.2"}),r.createElement("path",{d:"M216,72H180.92c.39-.33.79-.65,1.17-1A29.53,29.53,0,0,0,192,49.57,32.62,32.62,0,0,0,158.44,16,29.53,29.53,0,0,0,137,25.91a54.94,54.94,0,0,0-9,14.48,54.94,54.94,0,0,0-9-14.48A29.53,29.53,0,0,0,97.56,16,32.62,32.62,0,0,0,64,49.57,29.53,29.53,0,0,0,73.91,71c.38.33.78.65,1.17,1H40A16,16,0,0,0,24,88v32a16,16,0,0,0,16,16v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V136a16,16,0,0,0,16-16V88A16,16,0,0,0,216,72ZM149,36.51a13.69,13.69,0,0,1,10-4.5h.49A16.62,16.62,0,0,1,176,49.08a13.69,13.69,0,0,1-4.5,10c-9.49,8.4-25.24,11.36-35,12.4C137.7,60.89,141,45.5,149,36.51Zm-64.09.36A16.63,16.63,0,0,1,96.59,32h.49a13.69,13.69,0,0,1,10,4.5c8.39,9.48,11.35,25.2,12.39,34.92-9.72-1-25.44-4-34.92-12.39a13.69,13.69,0,0,1-4.5-10A16.6,16.6,0,0,1,84.87,36.87ZM40,88h80v32H40Zm16,48h64v64H56Zm144,64H136V136h64Zm16-80H136V88h80v32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H180.92c.39-.33.79-.65,1.17-1A29.53,29.53,0,0,0,192,49.57,32.62,32.62,0,0,0,158.44,16,29.53,29.53,0,0,0,137,25.91a54.94,54.94,0,0,0-9,14.48,54.94,54.94,0,0,0-9-14.48A29.53,29.53,0,0,0,97.56,16,32.62,32.62,0,0,0,64,49.57,29.53,29.53,0,0,0,73.91,71c.38.33.78.65,1.17,1H40A16,16,0,0,0,24,88v32a16,16,0,0,0,16,16v64a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V120H40V88h80v32h16V88h80v32H136v92a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V136a16,16,0,0,0,16-16V88A16,16,0,0,0,216,72ZM84.51,59a13.69,13.69,0,0,1-4.5-10A16.62,16.62,0,0,1,96.59,32h.49a13.69,13.69,0,0,1,10,4.5c8.39,9.48,11.35,25.2,12.39,34.92C109.71,70.39,94,67.43,84.51,59Zm87,0c-9.49,8.4-25.24,11.36-35,12.4C137.7,60.89,141,45.5,149,36.51a13.69,13.69,0,0,1,10-4.5h.49A16.62,16.62,0,0,1,176,49.08,13.69,13.69,0,0,1,171.49,59Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,74H174.74a46.41,46.41,0,0,0,6-4.48,27.56,27.56,0,0,0,9.22-20A30.63,30.63,0,0,0,158.5,18a27.56,27.56,0,0,0-20,9.22A57.1,57.1,0,0,0,128,45.76a57.1,57.1,0,0,0-10.48-18.53A27.56,27.56,0,0,0,97.5,18,30.63,30.63,0,0,0,66,49.51a27.56,27.56,0,0,0,9.22,20,45.74,45.74,0,0,0,6,4.48H40A14,14,0,0,0,26,88v32a14,14,0,0,0,14,14h2v66a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V134h2a14,14,0,0,0,14-14V88A14,14,0,0,0,216,74ZM135.77,63c2.25-12.12,6.29-21.75,11.69-27.85A15.68,15.68,0,0,1,158.86,30h.55A18.6,18.6,0,0,1,178,49.14a15.68,15.68,0,0,1-5.18,11.4C162.1,70,143.92,72.83,134.34,73.65,134.59,70.76,135,67.08,135.77,63ZM83.45,35.45A18.69,18.69,0,0,1,96.59,30h.55a15.68,15.68,0,0,1,11.4,5.18C118,45.9,120.83,64.08,121.65,73.66c-2.89-.25-6.57-.68-10.61-1.43C98.92,70,89.29,65.94,83.19,60.53A15.64,15.64,0,0,1,78,49.14,18.65,18.65,0,0,1,83.45,35.45ZM38,120V88a2,2,0,0,1,2-2h82v36H40A2,2,0,0,1,38,120Zm16,80V134h68v68H56A2,2,0,0,1,54,200Zm148,0a2,2,0,0,1-2,2H134V134h68Zm16-80a2,2,0,0,1-2,2H134V86h82a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H180.92c.39-.33.79-.65,1.17-1A29.53,29.53,0,0,0,192,49.57,32.62,32.62,0,0,0,158.44,16,29.53,29.53,0,0,0,137,25.91a54.94,54.94,0,0,0-9,14.48,54.94,54.94,0,0,0-9-14.48A29.53,29.53,0,0,0,97.56,16,32.62,32.62,0,0,0,64,49.57,29.53,29.53,0,0,0,73.91,71c.38.33.78.65,1.17,1H40A16,16,0,0,0,24,88v32a16,16,0,0,0,16,16v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V136a16,16,0,0,0,16-16V88A16,16,0,0,0,216,72ZM149,36.51a13.69,13.69,0,0,1,10-4.5h.49A16.62,16.62,0,0,1,176,49.08a13.69,13.69,0,0,1-4.5,10c-9.49,8.4-25.24,11.36-35,12.4C137.7,60.89,141,45.5,149,36.51Zm-64.09.36A16.63,16.63,0,0,1,96.59,32h.49a13.69,13.69,0,0,1,10,4.5c8.39,9.48,11.35,25.2,12.39,34.92-9.72-1-25.44-4-34.92-12.39a13.69,13.69,0,0,1-4.5-10A16.6,16.6,0,0,1,84.87,36.87ZM40,88h80v32H40Zm16,48h64v64H56Zm144,64H136V136h64Zm16-80H136V88h80v32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,76H166.81a50.54,50.54,0,0,0,12.63-8A25.53,25.53,0,0,0,188,49.44,28.62,28.62,0,0,0,158.56,20,25.53,25.53,0,0,0,140,28.56c-5.91,6.67-9.63,15.36-12,23.69-2.35-8.33-6.07-17-12-23.69A25.53,25.53,0,0,0,97.44,20,28.62,28.62,0,0,0,68,49.44,25.53,25.53,0,0,0,76.56,68a50.54,50.54,0,0,0,12.63,8H40A12,12,0,0,0,28,88v32a12,12,0,0,0,12,12h4v68a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V132h4a12,12,0,0,0,12-12V88A12,12,0,0,0,216,76ZM146,33.86A17.59,17.59,0,0,1,158.8,28h.61A20.62,20.62,0,0,1,180,49.2,17.6,17.6,0,0,1,174.14,62c-12.09,10.7-33.07,13.21-42,13.79C132.76,66.93,135.26,46,146,33.86ZM76,49.2A20.62,20.62,0,0,1,96.59,28h.61A17.59,17.59,0,0,1,110,33.86c10.71,12.09,13.21,33.07,13.79,42-8.89-.58-29.87-3.09-42-13.79A17.6,17.6,0,0,1,76,49.2ZM36,120V88a4,4,0,0,1,4-4h84v40H40A4,4,0,0,1,36,120Zm16,80V132h72v72H56A4,4,0,0,1,52,200Zm152,0a4,4,0,0,1-4,4H132V132h72Zm16-80a4,4,0,0,1-4,4H132V84h84a4,4,0,0,1,4,4Z"}))]]),ZT=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"}))]]),OT=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"}))]]),VT=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"}))]]),zT=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"}))]]),BT=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"}))]]),UT=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"}))]]),WT=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"}))]]),GT=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"}))]]),KT=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"}))]]),YT=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"}))]]),qT=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"}))]]),XT=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"}))]]),QT=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"}))]]),JT=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"}))]]),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,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"}))]]),tH=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"}))]]),nH=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"}))]]),rH=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"}))]]),aH=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"}))]]),sH=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"}))]]),oH=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"}))]]),lH=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"}))]]),iH=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"}))]]),cH=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"}))]]),uH=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"}))]]),dH=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"}))]]),fH=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"}))]]),hH=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"}))]]),mH=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"}))]]),pH=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"}))]]),gH=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"}))]]),vH=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,...b}=r.useContext(vH);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,...b,...m},!!n&&r.createElement("title",null,n),f,h.get(c??y))});Be.displayName="IconBase";const tx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:iT}));tx.displayName="ApertureIcon";const yH=tx,nx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:cT}));nx.displayName="ArchiveIcon";const yh=nx,rx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:uT}));rx.displayName="ArrowCircleUpIcon";const ax=rx,sx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:dT}));sx.displayName="ArrowClockwiseIcon";const Jm=sx,ox=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:fT}));ox.displayName="ArrowCounterClockwiseIcon";const Tc=ox,lx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:hT}));lx.displayName="ArrowLineUpIcon";const xH=lx,ix=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:mT}));ix.displayName="ArrowRightIcon";const dg=ix,cx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:pT}));cx.displayName="ArrowSquareOutIcon";const K1=cx,ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:gT}));ux.displayName="ArrowUpIcon";const wH=ux,dx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:vT}));dx.displayName="ArrowsClockwiseIcon";const G0=dx,fx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:yT}));fx.displayName="ArrowsDownUpIcon";const bH=fx,hx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:xT}));hx.displayName="ArrowsLeftRightIcon";const EH=hx,mx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:wT}));mx.displayName="BellIcon";const fg=mx,px=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:bT}));px.displayName="BookmarkSimpleIcon";const Y1=px,gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ET}));gx.displayName="BroomIcon";const CH=gx,vx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:CT}));vx.displayName="CaretDownIcon";const ai=vx,yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ST}));yx.displayName="CaretLeftIcon";const wi=yx,xx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:jT}));xx.displayName="CaretRightIcon";const q1=xx,wx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:kT}));wx.displayName="CheckIcon";const ya=wx,bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:AT}));bx.displayName="CheckCircleIcon";const SH=bx,Ex=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:NT}));Ex.displayName="CircleIcon";const jH=Ex,Cx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:MT}));Cx.displayName="ClockCounterClockwiseIcon";const kH=Cx,Sx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:RT}));Sx.displayName="CopyIcon";const hg=Sx,jx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:PT}));jx.displayName="CopySimpleIcon";const AH=jx,kx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:LT}));kx.displayName="DatabaseIcon";const NH=kx,Ax=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:TT}));Ax.displayName="DotsThreeIcon";const MH=Ax,Nx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:HT}));Nx.displayName="DownloadSimpleIcon";const Mx=Nx,Rx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:DT}));Rx.displayName="FilmSlateIcon";const ep=Rx,Px=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:$T}));Px.displayName="FolderSimpleIcon";const Lx=Px,Tx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:FT}));Tx.displayName="FrameCornersIcon";const RH=Tx,Hx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:IT}));Hx.displayName="GearSixIcon";const PH=Hx,Dx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:_T}));Dx.displayName="GiftIcon";const LH=Dx,$x=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ZT}));$x.displayName="HouseIcon";const TH=$x,Fx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:OT}));Fx.displayName="IdentificationBadgeIcon";const tp=Fx,Ix=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:VT}));Ix.displayName="ImageSquareIcon";const Ga=Ix,_x=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:zT}));_x.displayName="InfoIcon";const np=_x,Zx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:BT}));Zx.displayName="KeyIcon";const Ox=Zx,Vx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:UT}));Vx.displayName="LightningIcon";const u1=Vx,zx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:WT}));zx.displayName="MagnifyingGlassIcon";const Hc=zx,Bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:GT}));Bx.displayName="MountainsIcon";const HH=Bx,Ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:KT}));Ux.displayName="PackageIcon";const rp=Ux,Wx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:YT}));Wx.displayName="PaintBrushBroadIcon";const DH=Wx,Gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:qT}));Gx.displayName="PaletteIcon";const $H=Gx,Kx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:XT}));Kx.displayName="PencilLineIcon";const mg=Kx,Yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:QT}));Yx.displayName="PiggyBankIcon";const FH=Yx,qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:JT}));qx.displayName="PlusIcon";const nr=qx,Xx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:eH}));Xx.displayName="PlusCircleIcon";const IH=Xx,Qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:tH}));Qx.displayName="SidebarSimpleIcon";const _H=Qx,Jx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:nH}));Jx.displayName="SignInIcon";const ZH=Jx,ew=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:rH}));ew.displayName="SlidersHorizontalIcon";const tw=ew,nw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:aH}));nw.displayName="SparkleIcon";const OH=nw,rw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:sH}));rw.displayName="StackIcon";const xh=rw,aw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:oH}));aw.displayName="StarIcon";const wh=aw,sw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:lH}));sw.displayName="StorefrontIcon";const VH=sw,ow=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:iH}));ow.displayName="SunIcon";const zH=ow,lw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:cH}));lw.displayName="TrashIcon";const iw=lw,cw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:uH}));cw.displayName="TrashSimpleIcon";const X1=cw,uw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:dH}));uw.displayName="UploadSimpleIcon";const dw=uw,fw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:fH}));fw.displayName="UserIcon";const BH=fw,hw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:hH}));hw.displayName="WarningIcon";const mw=hw,pw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:mH}));pw.displayName="WarningCircleIcon";const au=pw,gw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:pH}));gw.displayName="XIcon";const Mn=gw,vw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:gH}));vw.displayName="XCircleIcon";const yw=vw,xw=r.createContext({push:()=>{}}),hr=()=>r.useContext(xw),pg=4;function UH({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<=pg)return m;const g=[...m];for(;g.length>pg;){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(xw.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(SH,{className:"sc-toast-ok",size:17,weight:"fill"}):o.jsx(au,{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 WH=(e,t,n)=>Re("DELETE",`/api/brands/${e}/${t}/${n}`),GH=(e,t)=>WH(e,"products",t);async function KH(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 YH=e=>`/api/brands/${e}/export`;async function qH(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 ww(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 XH(e,t){try{fetch(`/api/brands/${e}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({brand:t}),keepalive:!0})}catch{}}const tn=e=>`/api/images/${e}`,Zn=e=>e!=null&&e.startsWith("asset:")?tn(e.slice(6)):null;async function QH(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 bw(e){return e.every(t=>t.kind==="root")}let Ew=new Map;function JH(e){const t=new Map;for(const n of e)for(const s of n.legacyNames??[])s!==n.name&&t.set(s,n.name);Ew=t}function Cn(e){var s;const t=(s=/^\[([^\]]+)\]/.exec(e.prompt))==null?void 0:s[1];return t?Ew.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`)},Ke={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(Ke.brand,{brandSlug:e.slug}),eD=e=>ea(Ke.kit,{brandSlug:e.slug}),K0=e=>ea(Ke.products,{brandSlug:e.slug}),Js=(e,t)=>ea(Ke.product,{brandSlug:e.slug,productId:t}),gc=e=>ea(Ke.scenes,{brandSlug:e.slug}),rl=(e,t)=>ea(Ke.scene,{brandSlug:e.slug,sceneId:t}),vc=e=>ea(Ke.presenters,{brandSlug:e.slug}),al=(e,t)=>ea(Ke.presenter,{brandSlug:e.slug,presenterId:t}),cr=e=>ea(Ke.hub,{brandSlug:e.slug}),cc=(e,t)=>ea(Ke.set,{brandSlug:e.slug,setSlug:t.slug}),Q1=(e,t,n)=>t?ea(Ke.setShot,{brandSlug:e.slug,setSlug:t.slug,shotId:n}):ea(Ke.hubShot,{brandSlug:e.slug,shotId:n});function tD(e,t=""){const[,,n,...s]=e.split("/");if(!n)return Ke.root;const i=`/${n}${nD(s)}`;return t?i+t:i}function nD(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 g2="Scenri",gg=" - ",vg=40,rD=[["whatsnew","What's new"],["setup","Providers"],["settings","Settings"]],aD=[[Ke.setup,"Set up",!1],[Ke.hubShot,"Shot",!1],[Ke.setShot,"Shot",!1],[Ke.hub,"Create",!1],[Ke.set,"Create",!0],[Ke.kit,"Brand kit",!1],[Ke.product,"Products",!0],[Ke.products,"Products",!1],[Ke.scene,"Scenes",!0],[Ke.scenes,"Scenes",!1],[Ke.presenter,"Presenters",!0],[Ke.presenters,"Presenters",!1],[Ke.brand,"Home",!1]];function sD(e){if(!e)return null;const t=e.replace(/[\u0000-\u001F\u007F-\u009F]/g," ").replace(/\s+/g," ").trim();return t?t.length>vg?`${t.slice(0,vg-1).trimEnd()}…`:t:null}function oD(e,t="",n=null){const s=new URLSearchParams(t);for(const[i,c]of rD)if(s.has(i))return c+gg+g2;for(const[i,c,u]of aD)if(Ql(i,e))return((u?sD(n):null)??c)+gg+g2;return g2}const Cw=r.createContext(null);function lD(){const{pathname:e,search:t}=ln(),[n,s]=r.useState(null);return r.useEffect(()=>{document.title=oD(e,t,n)},[e,t,n]),s}function J1(e){const t=r.useContext(Cw);r.useEffect(()=>{if(t)return t(e??null),()=>t(null)},[t,e])}const iD={scenes:[],collections:[],verticals:[],loaded:!1,error:!1};function cD(){const[e,t]=r.useState(iD),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.scenes().then(u=>{JH(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 uD={presenters:[],categories:[],styles:[],loaded:!1,error:!1};function dD(){const[e,t]=r.useState(uD),[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 fD={demoProducts:[],categories:[],loaded:!1,error:!1};function hD(){const[e,t]=r.useState(fD),[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 mD={showcase:[],categories:[],loaded:!1,error:!1};function pD(){const[e,t]=r.useState(mD),[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 ed(){const{open:e}=vs("settings");return r.useCallback((t="brand")=>e(t),[e])}const yg="codex-cli";function td(){const{open:e}=vs("setup");return r.useCallback((t=yg)=>{e(typeof t=="string"?t:yg)},[e])}function su(e){var t;e.preventDefault(),(t=e.currentTarget)==null||t.focus({preventScroll:!0})}function ap({failure:e,density:t,onRetry:n,dismiss:s}){const i=ed(),c=td(),{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(au,{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(Tc,{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 sp({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(au,{size:16,weight:"fill"}):o.jsx(np,{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 Sw="the engine",gD=[{re:/HTTP 401\b|missing authentication|no auth credentials|invalid api key|unauthorized/i,kind:"auth",title:e=>`${La(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=>`${La(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=>`${La(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=>`${La(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=>`${La(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=>`${La(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=>`${La(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:/codex.*(not logged in|login required)/i,kind:"auth",title:()=>"Codex is signed out on this machine.",fix:"Sign in with your ChatGPT account, then run this again.",remedy:{label:"Sign in",opens:"setup"},retryable:!1},{re:/could not verify codex/i,kind:"setup",title:()=>"Scenri could not verify Codex.",fix:"Open setup and check again. If Codex was just installed, restart Scenri.",remedy:{label:"Check Codex",opens:"setup"},retryable:!0},{re:/codex cli .* is too old|Scenri needs \d+\.\d+\.\d+ or newer/i,kind:"setup",title:()=>"Codex CLI needs an update.",fix:"Update Codex, then run this again.",remedy:{label:"Update 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|produced no output/i,kind:"timeout",title:e=>`${La(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=>`${La(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=>`${La(e)} finished without making a picture.`,fix:"Run it again. This usually clears on a second try.",retryable:!0}];function La(e){return e===Sw?"The engine":e}function oo(e,t){const n=(e??"").trim(),s=(t??"").replace(/\s*\(BYOK\)\s*$/i,"").trim()||Sw;if(!n)return{kind:"unknown",title:"This shot did not finish.",raw:"",retryable:!0};for(const i of gD){if(!i.re.test(n))continue;const c=i.title(s)||vD(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 jw(){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 vD(e){const t=e.trim();if(!t)return t;const n=t[0].toUpperCase()+t.slice(1);return/[.!?]$/.test(n)?n:`${n}.`}function kw(e){return e?e.phase==="ready"?e.blockReason!=="dev"&&e.blockReason!=="unsupervised"&&e.blockReason!=="launcher-too-old":e.canApply:!1}function yD(e){return e.phase==="staging"?{kind:"downloading"}:e.phase==="ready"?{kind:"ready",version:e.stagedVersion??e.latest??e.current}:e.phase==="error"&&e.available?{kind:"stage-error"}:{kind:"announce",oneClick:kw(e)}}const xD=360*60*1e3,xg=300*1e3,v2=e=>new Promise(t=>setTimeout(t,e)),Aw="scenri:update-dismissed";function wD(){try{return sessionStorage.getItem(Aw)}catch{return null}}function bD(e){try{sessionStorage.setItem(Aw,e)}catch{}}const Nw=r.createContext(null);function op(){const e=r.useContext(Nw);if(!e)throw new Error("useUpdateCenter must be used inside UpdateCenterProvider");return e}function ED({children:e}){const[t,n]=r.useState(null),[s,i]=r.useState(!1),[c,u]=r.useState(wD),f=r.useRef(void 0);r.useEffect(()=>{let T=!0;const D=async()=>{if(T){if(!document.hidden)try{const G=await Ce.updateStatus();T&&n(G)}catch{}T&&(f.current=window.setTimeout(D,xD))}};D();const P=()=>{document.hidden||!T||(window.clearTimeout(f.current),D())};return document.addEventListener("visibilitychange",P),window.addEventListener("focus",P),()=>{T=!1,window.clearTimeout(f.current),document.removeEventListener("visibilitychange",P),window.removeEventListener("focus",P)}},[]);const[h,m]=r.useState(null),g=r.useCallback(async()=>{i(!0);try{n(await Ce.updateCheck()),m(null)}catch(T){m(String((T==null?void 0:T.message)??T))}finally{i(!1)}},[]),v=r.useCallback(()=>{const T=t==null?void 0:t.latest;T&&(bD(T),u(T))},[t]),y=(t==null?void 0:t.latest)!=null&&t.latest===c,[w,b]=r.useState("idle"),[C,E]=r.useState(null),N=r.useCallback(async T=>{b("restarting");try{await Ce.updateRestart()}catch(P){if(typeof P.status=="number"){b("idle"),E(String((P==null?void 0:P.message)??P));return}}const D=Date.now()+3e4;for(;Date.now()<D;){await v2(800);try{if((await Ce.version()).version!==T){location.reload();return}}catch{}}b("idle"),E("The restart did not complete. Check the terminal Scenri runs in.")},[]),j=r.useCallback(async()=>{if(w!=="idle")return;E(null);const T=t==null?void 0:t.current;try{if((t==null?void 0:t.phase)!=="ready"){b("applying"),await Ce.updateApply();const D=Date.now()+xg;let P=!1;for(;Date.now()<D;){await v2(1500);const G=await Ce.updateStatus();if(n(G),G.phase==="ready"){P=!0;break}if(G.phase==="error"){E(G.error??"The update could not be staged."),b("idle");return}}if(!P){E("Couldn't download the update. Try again."),b("idle");return}}await N(T)}catch(D){E(String((D==null?void 0:D.message)??D)),b("idle")}},[w,t,N]),k=r.useRef(!1);r.useEffect(()=>{if((t==null?void 0:t.phase)!=="staging"||w!=="idle"||k.current)return;k.current=!0;let T=!0;const D=Date.now()+xg;return(async()=>{for(;T&&Date.now()<D;){if(await v2(1500),!T)return;try{const G=await Ce.updateStatus();if(!T||(n(G),G.phase!=="staging"))return}catch{}}})().finally(()=>{k.current=!1}),()=>{T=!1}},[t==null?void 0:t.phase,w]);const{pathname:A}=ln(),M=A===Ke.setup;return o.jsxs(Nw.Provider,{value:{status:t,checking:s,checkNow:g,checkError:h,dismissed:y,dismiss:v,apply:j,busy:w,applyError:C},children:[e,w!=="restarting"&&(t==null?void 0:t.available)&&!y&&!M&&o.jsx(SD,{}),w==="restarting"&&o.jsx(CD,{version:(t==null?void 0:t.stagedVersion)??(t==null?void 0:t.latest)??null})]})}function CD({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(ax,{size:22}),o.jsx("b",{children:e?`Updating to Scenri ${e}`:"Updating Scenri"}),o.jsx("small",{children:"Restarting. This page reconnects by itself."})]})})}function SD(){const{status:e,dismiss:t,apply:n,busy:s,applyError:i}=op(),c=ed();if(!e)return null;const u=yD(e),f=u.kind==="downloading"?"Downloading update…":u.kind==="ready"?`Scenri ${u.version} is ready`:u.kind==="stage-error"?"Couldn't download the update":"A new update is available",h=s==="applying"?"Updating…":u.kind==="stage-error"?"Try again":"Update",m=u.kind!=="announce"||u.oneClick;return o.jsxs("div",{className:"sc-upd-float",role:"status",children:[o.jsx(LH,{className:"sc-upd-float-dot",size:16,weight:"fill","aria-hidden":"true"}),o.jsxs("span",{className:"sc-upd-float-txt",children:[f,i&&u.kind!=="downloading"&&o.jsx("small",{children:i})]}),o.jsx("button",{type:"button",className:"sc-upd-float-later",onClick:t,children:u.kind==="ready"?"Later":"Not now"}),u.kind!=="downloading"&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:s!=="idle",onClick:()=>m?void n():c("about"),children:h})]})}const Mw=50;function os(e){return Date.parse(e.includes("T")?e:`${e.replace(" ","T")}Z`)}function eo(e,t=Date.now()){const n=os(e);return Number.isNaN(n)?0:Math.max(0,Math.round((t-n)/1e3))}function lp(e,t=Date.now()){const n=eo(e,t);return n<20?"generating":n<60?"still generating":"taking longer than usual"}function jD(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 Rw(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 kD(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 AD(e,t,n=Date.now()){const s=e.setNames.length>0?`${e.setNames.join(", ")} · `:"",i=e.status==="running"?`${s}${lp(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 ND(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:kD(e),startedAt:e.createdAt,href:eD(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 RD(e,t=12){const n=e.filter(i=>i.state==="running"),s=e.filter(i=>i.state!=="running").sort((i,c)=>os(c.startedAt)-os(i.startedAt)).slice(0,t);return n.sort((i,c)=>os(i.startedAt)-os(c.startedAt)),[...n,...s]}function PD(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 LD(e,t,n=Mw){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)=>os(c.at)-os(i.at)).slice(0,n)}function TD(e,t){const n=e.filter(i=>!i.watched);if(!t)return n.length;const s=os(t);return n.filter(i=>os(i.at)>s).length}const Pw=e=>`scenri:notifications-${e}`,Lw=e=>`scenri:notifications-seen-${e}`;function Tw(e){try{return localStorage.getItem(e)}catch{return null}}function Hw(e,t){try{localStorage.setItem(e,t)}catch{}}function wg(e){const t=Tw(Pw(e));if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}const bg=(e,t)=>Hw(Pw(e),JSON.stringify(t.slice(0,Mw))),Eg=e=>Tw(Lw(e)),HD=(e,t)=>Hw(Lw(e),t),DD=1500,$D=5e3,Dw=r.createContext(null);function sl(){const e=r.useContext(Dw);if(!e)throw new Error("useTaskCenter must be used inside TaskCenterProvider");return e}function FD({brand:e,children:t}){const n=nn(),{push:s}=hr(),{refresh:i}=mn(),c=e.id,[u,f]=r.useState([]),[h,m]=r.useState([]),[g,v]=r.useState(()=>wg(c)),[y,w]=r.useState(()=>Eg(c)),[b,C]=r.useState(!1),E=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(b);T.current=b;const D=r.useRef(n);D.current=n;const{pathname:P}=ln(),G=r.useRef(!1);G.current=/\/(create|sets)(\/|$)/.test(P);const I=r.useRef(s);I.current=s,r.useEffect(()=>{E.current=null,N.current=new Set,j.current=0,k.current=new Set,f([]),m([]),v(wg(c)),w(Eg(c))},[c]);const oe=r.useCallback(async()=>{var U;let q,H;try{const[{nodes:L,jobs:O},{builds:ne}]=await Promise.all([Ce.activity(c),Ce.assetBuilds(c)]);H=ne,q=[...L.map(re=>AD(re,e)),...O.map(re=>ND(re,e)),...ne.map(re=>MD(re,e))]}catch{return}m(H);const K=H.filter(L=>L.finished&&L.assetId&&!k.current.has(L.id));if(K.length){for(const L of K)k.current.add(L.id);await A.current()}const X=PD(E.current,q);if(E.current=new Map(q.map(L=>[L.id,L])),j.current=q.filter(L=>L.state==="running").length,f(RD(q)),X.length!==0&&(v(L=>{const O=G.current?X.map(re=>re.state==="error"?re:{...re,watched:!0}):X,ne=LD(L,O);return bg(c,ne),ne}),!T.current))for(const L of X){if(N.current.has(L.id)||(N.current.add(L.id),L.state==="cancelled")||L.state!=="error"&&G.current)continue;const O=L.href,ne=O?{label:"View",onClick:()=>D.current(O)}:void 0;if(L.state==="error"){I.current({kind:"error",title:`${L.title} failed`,detail:L.subtitle,action:ne});continue}if(L.kind==="presenter"||L.kind==="scene"){const re=L.id.startsWith("build:")?((U=H.find(le=>`build:${le.id}`===L.id))==null?void 0:U.assetId)??null:null;I.current({kind:"success",title:`${L.title} is ready`,detail:L.subtitle,actions:O?[{label:L.kind==="presenter"?"View presenter":"View scene",onClick:()=>D.current(O)},{label:"Use in a shot",onClick:()=>D.current(`${cr(e)}?${L.kind==="presenter"?"presenter":"scene"}=${re}&compose=1`)}]:void 0});continue}I.current({kind:"success",title:L.kind==="catalog"?"Catalog import finished":"Generation finished",detail:L.title,action:ne})}},[c,e]);r.useEffect(()=>{let q=null,H=!0;const K=async()=>{if(!H||(document.hidden||await oe(),!H))return;const U=!document.hidden&&j.current>0;q=setTimeout(K,U?DD:$D)},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)}},[oe]);const W=r.useCallback(()=>{var q;return(q=M.current)==null?void 0:q.call(M)},[]),J=r.useCallback(()=>{const q=new Date().toISOString();w(q),HD(c,q)},[c]),Z=r.useCallback(()=>{v([]),bg(c,[]),J()},[c,J]),ee=r.useMemo(()=>({tasks:u,running:u.filter(q=>q.state==="running").length,builds:h,feed:g,unread:TD(g,y),markSeen:J,clearFeed:Z,panelOpen:b,setPanelOpen:C,poke:W}),[u,h,g,y,J,Z,b,W]);return o.jsx(Dw.Provider,{value:ee,children:t})}function $w(e){const{brand:t}=It(),{pathname:n}=ln(),s=nn(),i=!!or(Ke.brand),c=!!or({path:Ke.hub,end:!1}),u=!!or({path:Ke.set,end:!1}),f=c||u,h=!!or({path:Ke.products,end:!1}),m=!!or({path:Ke.scenes,end:!1}),g=!!or({path:Ke.presenters,end:!1}),v=y=>y?"fill":"regular";return[{key:"home",label:"Home",icon:o.jsx(TH,{size:e,weight:v(i)}),active:i,go:()=>s(Vo(t))},{key:"create",label:"Create",icon:o.jsx(IH,{size:e,weight:v(f)}),active:f,go:()=>s(f?`${n}?compose=1`:`${cr(t)}?compose=1`)},{key:"products",label:"Products",icon:o.jsx(rp,{size:e,weight:v(h)}),active:h,go:()=>s(K0(t))},{key:"presenters",label:"Presenters",icon:o.jsx(tp,{size:e,weight:v(g)}),active:g,go:()=>s(vc(t))},{key:"scenes",label:"Scenes",icon:o.jsx(ep,{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 ID(e){return([...e.trim()].find(n=>new RegExp("\\p{L}|\\p{N}","u").test(n))??"?").toUpperCase()}function _D(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 y2({brand:e,size:t=20}){var i,c,u,f,h,m;const n=Zn((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:_D(s)}},"aria-hidden":!0,children:n?o.jsx("img",{src:n,alt:""}):ID(Po(e))})}function ZD(){const e=$w(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 OD(){var m,g;const{brands:e}=mn(),{brand:t}=It(),n=nn(),s=ed(),i=op(),c=ad(),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(Zo,{children:o.jsxs("button",{type:"button",className:"sc-org-btn","aria-label":`${Po(t)}, brand and settings`,children:[o.jsx(y2,{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(Oo,{align:"end",sideOffset:8,className:"sc-menu",children:[o.jsxs("div",{className:"sc-menu-head",children:[o.jsx(y2,{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(y2,{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(nr,{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(ax,{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(OH,{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(PH,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"Settings"})]})]})]})}function ou(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 ip({open:e=!0,className:t,maxWidth:n,described:s,children:i,onDismiss:c,onOpenAutoFocus:u,onCloseAutoFocus:f,onPaste:h}){const{sheet:m,grip:g}=ou(c),v=u??su,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 cp({className:e,children:t}){return o.jsx(mi,{className:e,children:t})}function d1({children:e}){return o.jsx(L1,{asChild:!0,children:e})}function VD({className:e,children:t}){return o.jsx(dm,{className:e,children:t})}const bh=e=>Array.isArray(e)?e.map(t=>Zn(t==null?void 0:t.file)).filter(t=>!!t):[];function nd(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(BD)}function zD(e,t){return nd(e).find(n=>n.id===t)}function BD(e){const t=bh(e.shots),n=bh(e.sourceRefs),s=Zn(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:Zn(e.avatar),custom:!0,shots:t,sourceRefs:n}}function lu(e){var n;return(((n=e==null?void 0:e.json)==null?void 0:n.scenes)??[]).map(WD)}function UD(e,t){return lu(e).find(n=>n.id===t)}function WD(e){const t=bh(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:Zn(e.preview)??t[0]??null,previewColor:null,custom:!0,refs:t,instruction:e.instruction?String(e.instruction):void 0}}function Cg(e,t){const n=new Set(e.map(s=>s.id));return[...e,...t.filter(s=>!n.has(s.id))]}function GD(){const{brand:e,products:t}=It(),{scenes:n,presenters:s,demoProducts:i,showcase:c}=mn();return r.useMemo(()=>{const u={presenters:nd(e),scenes:lu(e)},f=new Set,h=b=>!b||f.has(b)?null:(f.add(b),b),m=(b,C)=>{for(const E of b){const N=h(C(E));if(N)return N}return null},g=b=>m(c.filter(C=>{var E;return(((E=C.brief)==null?void 0:E.tokens)??[]).some(N=>(N==null?void 0:N.t)===b)}),C=>C.previewUrl),v=m([...t].reverse(),b=>{var C,E;return Zn((E=(C=b==null?void 0:b.shots)==null?void 0:C[0])==null?void 0:E.file)}),y=m(u.presenters,b=>b.previewUrl),w=m(u.scenes,b=>b.previewUrl);return{product:{url:v??g("product")??m(i,b=>b.previewUrl)??null,count:t.length,own:!!v},presenter:{url:y??g("character")??m(s,b=>b.previewUrl??b.avatarUrl)??null,count:u.presenters.length,own:!!y},scene:{url:w??m(n,b=>b.previewUrl)??g("template")??null,count:u.scenes.length,own:!!w}}},[e,t,n,s,i,c])}const KD=[{kind:"product",label:"Product",line:"What you are photographing",noun:"product",icon:rp},{kind:"presenter",label:"Presenter",line:"Who appears in the shot",noun:"presenter",icon:tp},{kind:"scene",label:"Scene",line:"Where it takes place",noun:"scene",icon:ep}],Sg=(e,t)=>e===0?"None yet":`${e} ${t}${e===1?"":"s"}`;function YD({suggest:e,onPick:t}){const n=r.useRef(null),{close:s}=vs("new"),i=GD(),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(ip,{className:"sc-newpick",maxWidth:"620px",onDismiss:s,onOpenAutoFocus:u=>{u.preventDefault(),c()},children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(cp,{className:"sc-newdlg-title",children:"Add to this brand"}),o.jsx(d1,{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:KD.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}. ${Sg(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:Sg(y,m)})]},u)})})})]})}function up({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}=vs("new");return o.jsxs(ip,{maxWidth:h,onDismiss:w,onPaste:b=>{var E;if(!v)return;const C=Array.from(((E=b.clipboardData)==null?void 0:E.files)??[]).filter(N=>N.type.startsWith("image/"));C.length&&(b.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(cp,{className:"sc-newdlg-title",children:e}),o.jsx(d1,{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(on,{size:"1"}):null,i]}),s&&o.jsx("p",{className:"sc-dlg-foot",children:s})]})]})}function Fw({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 jg({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}=Fw({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(on,{}):h,o.jsx("span",{className:"sc-dropzone-label",children:e}),t&&o.jsx("small",{children:t})]})}function dp({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(jg,{label:n,hint:s,busy:i,onFiles:c,onReject:f,children:o.jsx(nr,{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:tn(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(jg,{label:`${h} more`,busy:i,onFiles:c,onReject:f,children:o.jsx(nr,{size:15})})]})}const qD=720*60*60*1e3,fp=(e,t)=>`scenri:new-${e}-${t}`;function XD(e){try{return localStorage.getItem(e)}catch{return null}}function QD(e,t){try{localStorage.setItem(e,t)}catch{}}function uc(e){try{localStorage.removeItem(e)}catch{}}function kg(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 Ag=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function JD(e,t){const n=fp(e,t),s=XD(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>qD?(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:Ag(c.facets),imageHashes:Ag(c.imageHashes),importUrl:typeof c.importUrl=="string"?c.importUrl:"",pending:typeof c.pending=="string"?c.pending:null}}function x2(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};QD(fp(e,t),JSON.stringify(s))}function w2(e,t){uc(fp(e,t))}function e$(e,t){if(!e)return!1;if(e.pending===null)return!0;const n=t??"unknown";return n==="failed"||n==="cancelled"||n==="unknown"}const Ng={name:"",instruction:"",facets:[],imageHashes:[],importUrl:""};function hp(e,t,n){const[s,i]=r.useState(Ng),[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=JD(e,t),A=k!=null&&k.pending?v.current(k.pending):null;k&&e$(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(()=>{kg(k)?x2(e,t,{...k,pending:g.current}):w2(e,t)},400)},[e,t]),w=r.useCallback(k=>{i(A=>{const M={...A,...k};return y(M),M})},[y]),b=r.useCallback(()=>{m.current&&clearTimeout(m.current),i(k=>(kg(k)?x2(e,t,{...k,pending:g.current}):w2(e,t),k))},[e,t]);r.useEffect(()=>(window.addEventListener("beforeunload",b),()=>{window.removeEventListener("beforeunload",b),b()}),[b]);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 ww(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]),E=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){w2(e,t),g.current=null,i(Ng);return}g.current=k,i(A=>(x2(e,t,{...A,pending:k}),A))},[e,t]);return{fields:s,set:w,uploading:c,err:f,setErr:h,addFiles:C,removeHash:E,toggleFacet:N,submitted:j}}const Mg=4;function t$({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{presenterCategories:u}=mn(),[f,h]=r.useState(!1),m=hp(c.id,"presenter",{max:Mg,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:b}=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(b),t({kind:"presenter",jobId:b,name:m.fields.name.trim()})}catch(b){m.setErr(String(b.message??b))}finally{h(!1)}},w=b=>{b.key!=="Enter"||b.shiftKey||(b.preventDefault(),g&&!f&&y())};return o.jsx(up,{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:b=>void m.addFiles(b),children:o.jsxs("div",{className:"sc-assetform",children:[o.jsx(dp,{hashes:m.fields.imageHashes,max:Mg,label:"Add photos",hint:"One works. Two to four, from different angles, hold the likeness far better.",busy:m.uploading,onAdd:b=>void m.addFiles(b),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:b=>m.set({name:b.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:b=>m.set({instruction:b.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(b=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets.includes(b)||void 0,"aria-pressed":m.fields.facets.includes(b),onClick:()=>m.toggleFacet(b),children:b},b))})]})]})})}const Dc=[{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"}]}],mp=new Map(Dc.map(e=>[e.key,e]));mp.get("other");function si(e){var t;return e?((t=mp.get(e))==null?void 0:t.label)??e:null}function n$(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 pp(e){return e.category&&mp.has(e.category)?e.category:n$(e.productType,e.tags)??null}const Rg=6,r$=3;function a$({onBack:e,onStarted:t}){var C,E;const{brand:n}=It(),[s,i]=r.useState(!1),[c,u]=r.useState(!1),[f,h]=r.useState(!1),m=hp(n.id,"product",{max:Rg,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)}}},b=N=>{N.key==="Enter"&&(N.preventDefault(),g&&!s&&y())};return o.jsxs(up,{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(dp,{hashes:m.fields.imageHashes,max:Rg,label:"Add packshots",hint:`Straight, well-lit packshots. The first ${r$} 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:b})]})}),o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Category"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:Dc.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:((E=(C=n.json)==null?void 0:C.meta)==null?void 0:E.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 b2=4;function s$({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{verticals:u}=mn(),[f,h]=r.useState(!1),m=hp(c.id,"scene",{max:b2,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())},b=C=>{C.key!=="Enter"||!(C.metaKey||C.ctrlKey)||(C.preventDefault(),g&&!f&&y())};return o.jsx(up,{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(dp,{hashes:m.fields.imageHashes,max:b2,label:"Add a place",hint:`Screenshots, photography, anything showing the world you want. Up to ${b2}.`,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:b})]})]}),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 E2="1",o$=["product","presenter","scene"],l$=e=>!!e&&o$.includes(e),Iw=r.createContext(null);function ol(){const e=r.useContext(Iw);if(!e)throw new Error("useCreateAsset must be used inside AssetCreateHost");return e.open}function i$({children:e}){const{brand:t}=It(),n=nn(),{push:s}=hr(),{refresh:i}=mn(),{builds:c,poke:u}=sl(),f=vs("new"),h=f.value,m=!!or({path:Ke.products,end:!1}),g=!!or({path:Ke.presenters,end:!1}),v=!!or({path:Ke.scenes,end:!1}),y=m?"product":g?"presenter":v?"scene":null,[w,b]=r.useState(null),[C,E]=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,P=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"?E2:q)},[M]),G=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;E(!1);const H=K=>Ce.assetBuildCapabilities().then(X=>q&&b(X)).catch(()=>{q&&(K?setTimeout(()=>H(!1),600):E(!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]),oe=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]),W=r.useCallback(q=>{const H=k.current;if(G(),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(`${cr(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,G,n,u,s,i]),J=r.useMemo(()=>({open:P}),[P]),Z=l$(h)?h:null,ee={onBack:N?()=>T(E2):void 0,onStarted:W,caps:w,capsNote:I,pendingState:oe};return o.jsxs(Iw.Provider,{value:J,children:[e,h===E2&&o.jsx(YD,{suggest:y,onPick:q=>{j(!0),T(q)}}),Z==="product"&&o.jsx(a$,{...ee},"product"),Z==="presenter"&&o.jsx(t$,{...ee},"presenter"),Z==="scene"&&o.jsx(s$,{...ee},"scene")]})}function c$(){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(nr,{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 u$(){const{running:e,unread:t,panelOpen:n,setPanelOpen:s,markSeen:i}=sl(),{pathname:c}=ln(),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(fg,{size:16,weight:e?"fill":"regular"}),h]}),n?o.jsx(d$,{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(fg,{size:16,weight:e?"fill":"regular"}),h]})}),o.jsx(ri,{align:"end",className:"sc-notif-pop",children:o.jsx(_w,{onClose:()=>s(!1),onSeen:i})})]})}function d$({onClose:e,onSeen:t}){const{sheet:n,grip:s}=ou(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(_w,{onClose:e,onSeen:t})]})]}),document.body)}function _w({onClose:e,onSeen:t}){const{tasks:n,feed:s,unread:i,clearFeed:c}=sl(),{brand:u}=It(),f=nn(),{push:h}=hr(),[m,g]=r.useState("tasks"),v=r.useRef(null),y=m$(1e3),w=E=>{if(E.startsWith("node:")){Ce.cancelNode(E.slice(5)).catch(N=>h(dn(N,"Could not cancel this shot")));return}E.startsWith("build:")&&Ce.cancelAssetBuild(u.id,E.slice(6)).catch(N=>h(dn(N,"Could not stop this build")))};r.useEffect(()=>{m==="feed"&&t()},[m,t]);const b=E=>{f(E),e()},C=E=>{var A,M;const N=["tasks","feed"],j=N.indexOf(m);let k=null;E.key==="ArrowRight"?k=N[(j+1)%N.length]:E.key==="ArrowLeft"?k=N[(j-1+N.length)%N.length]:E.key==="Home"?k=N[0]:E.key==="End"&&(k=N[N.length-1]),k&&(E.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(Pg,{id:"tasks",tab:m,onSelect:g,count:n.length,children:"Tasks"}),o.jsx(Pg,{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(E=>o.jsx(f$,{task:E,now:y,onOpen:b,onCancel:w},E.id)):s.length===0?o.jsx("p",{className:"sc-notif-empty",children:"You have no notifications yet."}):s.map(E=>o.jsx(h$,{item:E,now:y,onOpen:b},E.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 Pg({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 Zw({task:e}){return e.thumb?o.jsx("img",{src:tn(e.thumb),alt:""}):e.state==="running"?o.jsx("span",{className:"sc-shimmer"}):e.state==="error"?o.jsx(au,{size:17,weight:"fill"}):e.state==="cancelled"?o.jsx(yw,{size:17,color:"var(--sc-fg3)"}):e.kind==="catalog"?o.jsx(VH,{size:17}):e.kind==="presenter"?o.jsx(tp,{size:17}):e.kind==="scene"?o.jsx(ep,{size:17}):o.jsx(Ga,{size:17})}function f$({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(Zw,{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?jD(e.startedAt,t):Rw(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 h$({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(Zw,{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:Rw(e.at,t)})]})}function m$(e){const[t,n]=r.useState(()=>Date.now());return r.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}const p$=["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"],g$=["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 v$(e){return o.jsx("svg",{viewBox:"0 0 263.79 64",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:[...p$,...g$].map(t=>o.jsx("path",{d:t},t))})}function y$(){const{brand:e}=It(),t=nn(),n=or({path:Ke.set,end:!1}),i=!!or({path:Ke.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(v$,{})})}),o.jsx(x$,{}),o.jsxs("div",{className:"sc-topbar-end",children:[o.jsx(c$,{}),o.jsx(u$,{}),o.jsx(OD,{})]})]})}function x$(){const e=$w(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 w$=60;function b$(){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>w$?`${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 E$(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 C$({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(b=>b.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((b,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 b=w.split(",");for(const C of b.slice(0,-1))g(C);h(b[b.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 S$=["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"],Lg=e=>e.trim().toLowerCase();function j$(e){const t=new Set((e??[]).map(Lg));return S$.filter(n=>!t.has(Lg(n)))}function k$({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(C$,{label:"Things this brand never shows",value:n,placeholder:"Or type your own",suggestions:j$(n),max:24,onChange:s})})}const Ow=["primary","mark","wordmark","monochrome","alternate"],gp=["light","dark","any"],N0={primary:"Primary logo",mark:"Mark",wordmark:"Wordmark",monochrome:"Monochrome",alternate:"Alternate"},A$=/^[a-f0-9]{32}$/,N$=e=>{const t=String(e??"");if(!t.startsWith("asset:"))return null;const n=t.slice(6);return A$.test(n)?n:null},M$=e=>Ow.includes(e)?e:"primary",R$=e=>gp.includes(e)?e:"any";function Vw(e){return(Array.isArray(e==null?void 0:e.logos)?e.logos:[]).filter(n=>n&&String(n.file??"").trim()).map(n=>{const s=N$(n.file),i=String(n.clearSpace??"").trim();return{hash:s,file:String(n.file),role:M$(n.role),background:R$(n.background),...i?{clearSpace:i}:{},attachable:s!==null}})}function zw(e){return Vw(e).filter(t=>t.attachable)}function Bw(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 P$({brand:e,doc:t}){const{push:n}=hr(),[s,i]=r.useState(!1),c=t.json??{},u=c.meta??{},f=u.name??e.slug,h=Vw(c),m=h.find(C=>C.role==="primary")??h[0],g=h.filter(C=>C!==m),v=C=>{const E={...u};for(const[N,j]of Object.entries(C)){const k=j.trim();k?E[N]=k:delete E[N]}E.name||(E.name=u.name),t.patch({meta:E})},y=async(C,E)=>{i(!0);try{await t.flush(),t.applyRow(await E())}catch(N){n(dn(N,C))}finally{i(!1)}},w=C=>void y("Could not upload that mark",()=>KH(e.id,C[0])),{dropProps:b}=Fw({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",...b,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(L$,{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:gp.map(C=>o.jsx("option",{value:C,children:C==="any"?"Any background":`On ${C}`},C))})]}),o.jsx(Tg,{label:"Name",value:u.name??"",placeholder:e.slug,maxLength:120,onCommit:C=>v({name:C})}),o.jsx(Tg,{label:"Tagline",value:u.tagline??"",placeholder:"Add a tagline",maxLength:200,onCommit:C=>v({tagline:C})}),g.map(C=>o.jsx(T$,{mark:C,busy:s,onRole:E=>void y("Could not retag that mark",()=>Ce.updateLogo(e.id,C.hash??"",{role:E})),onBackground:E=>void y("Could not update that mark",()=>Ce.updateLogo(e.id,C.hash??"",{background:E})),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(nr,{size:12}),"Add",o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:s,onChange:C=>{const E=Array.from(C.target.files??[]);C.target.value="",E.length&&w(E)}})]})]})]})}function Tg({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 L$({mark:e,name:t,busy:n,onUpload:s}){if(e){const i=e.hash?tn(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(dw,{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 T$({mark:e,busy:t,onRole:n,onBackground:s,onRemove:i}){const c=e.hash?tn(e.hash):e.file;return o.jsxs("div",{className:"sc-set-row",children:[o.jsx("span",{className:"txt",children:o.jsx("b",{children:N0[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:N0[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:Ow.map(u=>o.jsx("option",{value:u,children:N0[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:gp.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 ${N0[e.role]}`,children:o.jsx(X1,{size:13})})]})]})}const Hg={primary:"Primary",secondary:"Secondary",accent:"Accent",neutral:"Neutral"},H$=(e,t)=>t<=1?Hg[e]:`${Hg[e]} ${t}`;function D$(e){return/^(Primary|Secondary|Accent|Neutral)( [2-9]\d*)?$/.test(String(e??"").trim())}const $$=/^#[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 $$.test(s)?s:null}const F$=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function I$(e){const t=String(e??"").trim();return F$.test(t)?fn(t):null}function xa(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||H$(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 vp(e,t){const n={},s=[],i=[],c=g=>{const v=g.name.trim();return v&&!D$(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 Dg=e=>e.slot!=="neutral";function yp(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 _$(e,t){const n=fn(t);if(!n)return{palette:e,added:!1,swatch:null};const s=xa(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=vp(c,e),f=xa(u).find(h=>h.hex===n)??null;return{palette:u,added:!0,swatch:f}}function Z$(e,t){const n=fn(t);if(!n)return{palette:e,removed:!1};const s=xa(e),i=s.filter(c=>c.hex!==n);return i.length===s.length?{palette:e,removed:!1}:{palette:vp(i,e),removed:!0}}function rd(){return(rd=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 Uw(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 $c=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},Eh=function(e){return e&&e.ownerDocument.defaultView||self},$g=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:$c((i.pageX-(s.left+Eh(e).pageXOffset))/s.width),top:$c((i.pageY-(s.top+Eh(e).pageYOffset))/s.height)}},Fg=function(e){!xc(e)&&e.preventDefault()},Ww=Ft.memo(function(e){var t=e.onMove,n=e.onKey,s=e.onEnd,i=Uw(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 E=function(k){Fg(k),(xc(k)?k.touches.length>0:k.buttons>0)&&c.current?u($g(c.current,k,m.current)):(j(!1),h())},N=function(){j(!1),h()};function j(k){var A=g.current,M=Eh(c.current),T=k?M.addEventListener:M.removeEventListener;T(A?"touchmove":"mousemove",E),T(A?"touchend":"mouseup",N)}return[function(k){var A=k.nativeEvent,M=c.current;if(M&&(Fg(A),!(function(D,P){return P&&!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($g(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],b=v[2],C=v[3];return r.useEffect(function(){return C},[C]),Ft.createElement("div",rd({},i,{onTouchStart:y,onMouseDown:y,className:"react-colorful__interactive",ref:c,onKeyDown:w,onKeyUp:b,tabIndex:0,role:"slider"}))}),xp=function(e){return e.filter(Boolean).join(" ")},Gw=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,c=xp(["react-colorful__pointer",e.className]);return Ft.createElement("div",{className:c,style:{top:100*i+"%",left:100*n+"%"}},Ft.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Un=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},O$=function(e){return W$(Ch(e))},Ch=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?Un(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?Un(parseInt(e.substring(6,8),16)/255,2):1}},V$=function(e){return U$(B$(e))},z$=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Un(e.h),s:Un(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Un(i/2),a:Un(s,2)}},Sh=function(e){var t=z$(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B$=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:Un(255*[s,f,u,u,h,s][m]),g:Un(255*[h,s,s,f,u,u][m]),b:Un(255*[u,u,h,s,s,f][m]),a:Un(i,2)}},M0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},U$=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,c=i<1?M0(Un(255*i)):"";return"#"+M0(t)+M0(n)+M0(s)+c},W$=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:Un(60*(f<0?f+6:f)),s:Un(c?u/c*100:0),v:Un(c/255*100),a:i}},G$=Ft.memo(function(e){var t=e.hue,n=e.onChange,s=e.onChangeEnd,i=xp(["react-colorful__hue",e.className]);return Ft.createElement("div",{className:i},Ft.createElement(Ww,{onMove:function(c){n({h:360*c.left})},onKey:function(c){n({h:$c(t+360*c.left,0,360)})},onEnd:s,"aria-label":"Hue","aria-valuenow":Un(t),"aria-valuemax":"360","aria-valuemin":"0"},Ft.createElement(Gw,{className:"react-colorful__hue-pointer",left:t/360,color:Sh({h:t,s:100,v:100,a:1})})))}),K$=Ft.memo(function(e){var t=e.hsva,n=e.onChange,s=e.onChangeEnd,i={backgroundColor:Sh({h:t.h,s:100,v:100,a:1})};return Ft.createElement("div",{className:"react-colorful__saturation",style:i},Ft.createElement(Ww,{onMove:function(c){n({s:100*c.left,v:100-100*c.top})},onKey:function(c){n({s:$c(t.s+100*c.left,0,100),v:$c(t.v-100*c.top,0,100)})},onEnd:s,"aria-label":"Color","aria-valuetext":"Saturation "+Un(t.s)+"%, Brightness "+Un(t.v)+"%"},Ft.createElement(Gw,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Sh(t)})))}),Kw=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Y$=function(e,t){return e.toLowerCase()===t.toLowerCase()||Kw(Ch(e),Ch(t))};function q$(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;Kw(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(b){return Object.assign({},b,w)})},[]),y=r.useCallback(function(){g.current&&(g.current=!1,c(m.current.color))},[c]);return[f,v,y]}var X$=typeof window<"u"?r.useLayoutEffect:r.useEffect,Q$=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ig=new WeakMap,J$=function(e){X$(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(!Ig.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=Q$();u&&c.setAttribute("nonce",u),Ig.set(s,c),i.appendChild(c)}}},[])},eF=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=Uw(e,["className","colorModel","color","onChange","onChangeEnd"]),h=r.useRef(null);J$(h);var m=q$(n,i,c,u),g=m[0],v=m[1],y=m[2],w=xp(["react-colorful",t]);return Ft.createElement("div",rd({},f,{ref:h,className:w}),Ft.createElement(K$,{hsva:g,onChange:v,onChangeEnd:y}),Ft.createElement(G$,{hue:g.h,onChange:v,onChangeEnd:y,className:"react-colorful__last-control"}))},tF={defaultColor:"000",toHsva:O$,fromHsva:function(e){return V$({h:e.h,s:e.s,v:e.v,a:1})},equal:Y$},nF=function(e){return Ft.createElement(eF,rd({},e,{colorModel:tF}))};function f1({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,b]=r.useState(!1);r.useEffect(()=>{w||y(g)},[g,w]);const C=k=>{const A=fn(k);A&&(y(A),f==="live"&&t(A))},E=k=>{const A=fn(k);A&&(y(A),t(A),f==="close"&&b(!1))},N=k=>{if(b(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(nF,{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"?E(v):b(!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"?E(k):C(k)},k))})]})]})}function rF({doc:e,suggestions:t}){var w;const n=(w=e.json)==null?void 0:w.palette,[s,i]=r.useState(()=>xa(n)),c=JSON.stringify(n??{});r.useEffect(()=>{i(xa(n))},[c]);const u=(b,C=0)=>{i(b),e.patch({palette:vp(b,n)},{debounce:C})},f=(b,C,E=0)=>u(s.map((N,j)=>j===b?{...N,...C}:N),E),h=()=>u([...s,{hex:yp(s),name:"",slot:s.length?"accent":"primary"}]),m=(t??[]).filter(b=>{const C=fn(b.hex);return C&&!s.some(E=>E.hex===C)}),g=(b,C)=>o.jsx(aF,{swatch:b,presets:s.map(E=>E.hex),onHex:E=>f(C,{hex:E},300),onRemove:()=>u(s.filter((E,N)=>N!==C))},`${b.slot}-${C}`),v=s.map((b,C)=>[b,C]),y=v.filter(([b])=>!Dg(b));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(([b])=>Dg(b)).map(([b,C])=>g(b,C)),y.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-pal-group",children:"Neutrals"}),y.map(([b,C])=>g(b,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(nr,{size:12}),"Add colour"]}),m.length>0&&o.jsxs("span",{className:"sc-pal-sugg",children:[o.jsx("small",{children:"From the website"}),m.map(b=>{const C=fn(b.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 aF({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(f1,{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(X1,{size:13})})]})}function sF(){const{brand:e}=It(),{applyBrand:t}=mn(),{push:n}=hr(),[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]),b=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]),E=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&&XH(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:b,flush:C,applyRow:E}}function oF(e){return e==="saving"?"Saving…":e==="pending"?"Unsaved changes":e==="error"?"Not saved":"Saved"}function lF(){var y,w;const{brand:e}=It(),{push:t}=hr(),n=sF(),[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 b=h.trim(),C=b&&!/^https?:\/\//i.test(b)?`https://${b}`:b;m(C);const E={...((N=n.json)==null?void 0:N.meta)??{}};C?E.website=C:delete E.website,n.patch({meta:E})},v=async()=>{var b,C;i(!0);try{await n.flush();const E=await Ce.refreshBrandFromUrl(e.id);n.applyRow(E),u(((b=E.suggestions)==null?void 0:b.palette)??[]),t({kind:"success",title:"Read the website again",detail:(C=E.warnings)!=null&&C.length?E.warnings.join(" "):"Your edits were kept."})}catch(E){t(dn(E,"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(P$,{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(rF,{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(k$,{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:b=>m(b.target.value),onBlur:g,onKeyDown:b=>{b.key==="Enter"&&b.currentTarget.blur()}}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:!f||s,onClick:()=>void v(),children:[s?o.jsx(on,{size:"1"}):o.jsx(Jm,{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:YH(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:oF(n.state)})]})]})]})}const Gs=e=>e.replace(/\s*\(BYOK\)\s*$/i,""),Fc="codex-cli";function iF(e,t){var n;return e.some(s=>s.id===t)?t:((n=e[0])==null?void 0:n.id)??Fc}const cF=e=>e.toFixed(3).replace(/0+$/,"").replace(/\.$/,"");function uF(e){return e.free?e.localOnly?"Runs on your ChatGPT plan":"No cost per image":`$${cF(e.perGeneration)} / image`}function dF(e,t){if(t)return e.available?"Manage":"Connect";if(e.available)return e.id===Fc?"Manage":null;switch(e.code){case"update-needed":return"Update";case"not-installed":case"not-authenticated":case"unverified":return"Set up";default:return null}}function Yw(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 fF(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 hF(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 mF=[{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"}],qw=e=>mF.find(t=>t.engineId===e),Xw={"codex-cli":{Mark:Yw,size:16,plate:"#FFFFFF",ink:"#000000"},openrouter:{Mark:fF,size:18,plate:"#FFFFFF",ink:"#7624F4"},replicate:{Mark:hF,size:15,plate:"#E42022",ink:"#FFFFFF"}},jh=e=>{const t=Xw[e];return t?{plate:t.plate,ink:t.ink}:void 0},pF={demo:jH};function Qw({engineId:e,scale:t=1}){const n=Xw[e];if(n){const i=Math.round(n.size*t);return o.jsx(n.Mark,{width:i,height:i})}const s=pF[e]??u1;return o.jsx(s,{size:Math.round(15*t)})}const gF=e=>[...e].sort((t,n)=>+(n.id===Fc)-+(t.id===Fc));function vF({engines:e}){const t=td(),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:gF(e).map(i=>{const c=qw(i.id),u=Gs(i.displayName),f=dF(i,!!c),h=i.available?"Connected":null,m=!h&&i.reason&&(!f||i.code==="unverified"),g=jh(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(Qw,{engineId:i.id})}),o.jsxs("span",{className:"sc-eng-name",children:[o.jsx("b",{children:u}),o.jsx("small",{children:uF(i)})]}),h&&o.jsxs("span",{className:"sc-stat",children:[o.jsx("span",{className:"d"}),h]}),m&&o.jsx("span",{className:"sc-stat sc-stat-why",children:i.reason}),f&&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":`${f} ${u}`,children:f})]},i.id)})})}const yF={npx:"run with npx",global:"installed with npm",managed:"managed install",dev:"running from source",unknown:"local studio"};function xF(e){switch(e){case"npx":return"npx scenri update";case"global":case"managed":return"scenri update";default:return"npx scenri@latest"}}function wF({version:e}){var b;const t=op(),n=ad(),s=t.status,[i,c]=r.useState(null),[u,f]=r.useState(!1);r.useEffect(()=>{Ce.settings().then(C=>c(!!C.updateCheck)).catch(()=>{})},[]);const h=async()=>{if(i===null)return;const C=!i;c(C);try{await Ce.saveSettings({updateCheck:C})}catch{c(!C)}},m=xF(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"]}):t.checkError||s!=null&&s.error?o.jsx("span",{className:"sc-tag",children:"couldn't check for updates"}):s!=null&&s.checkedAt?o.jsx("span",{className:"sc-tag",children:"up to date"}):null;let y,w;return s!=null&&s.available?(e==null?void 0:e.installKind)==="dev"?(y="Running from source. Pull and rebuild when you're ready; nothing here touches your checkout.",w=null):kw(s)?s.phase==="ready"?(y=t.applyError??`${s.stagedVersion} is downloaded and verified. Restarting finishes it.`,w="restart"):s.phase==="staging"?(y="Downloading in the background. Nothing interrupts your work.",w="downloading"):s.phase==="error"?(y=t.applyError??s.error??"Couldn't download the update. Try again.",w="update"):(y=`You are on ${s.current}.`,w="update"):(y=o.jsxs(o.Fragment,{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."]}),w="copy"):(y=s&&!s.enabled?"Automatic checks are off. Checking here still works.":"New versions announce themselves here.",w="check"),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}`:""," · ",yF[(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:[y,(s==null?void 0:s.available)&&s.phase!=="ready"&&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,w==="check"&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:t.checking,onClick:()=>void t.checkNow(),children:"Check for updates"}),(w==="update"||w==="restart")&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:t.busy!=="idle",onClick:()=>void t.apply(),children:t.busy!=="idle"?"Updating…":(s==null?void 0:s.phase)==="error"?"Try again":"Update"}),w==="downloading"&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:!0,children:"Downloading…"}),w==="copy"&&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:"What's new"}),o.jsx("small",{children:((b=n.entry)==null?void 0:b.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"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Automatic updates"}),o.jsx("small",{"data-prose":"",children:"One version check a day; new versions download in the background, and restarting is always your call. 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 bF(){const{choice:e,setChoice:t}=sT(),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 EF({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 cs({label:e,title:t,body:n,busy:s,onConfirm:i,fullWidth:c}){return o.jsxs(Xc,{children:[o.jsx(L5,{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(Jc,{children:t}),o.jsx(eu,{size:"2",children:n}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{color:"red",onClick:i,children:e})})]})]})]})}function CF({onDone:e}){const{brand:t}=It(),n=nn(),[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(cs,{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(cs,{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(cs,{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 SF=e=>e>1e9?`${(e/1e9).toFixed(1)} GB`:e>1e6?`${Math.round(e/1e6)} MB`:`${Math.round(e/1e3)} KB`,C2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jF(e){return e===0?0:e<3?1:e<6?2:e<12?3:4}function _g(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:jF(y),title:y?`${y} run${y===1?"":"s"} on ${g.getDate()} ${C2[g.getMonth()]}`:`nothing on ${g.getDate()} ${C2[g.getMonth()]}`}),g.getDay()===0){const w=g.getMonth()!==f&&g.getDate()<=7;w&&(f=g.getMonth()),u.push({key:v,label:w?C2[g.getMonth()]:""})}}return{cells:c,months:u,sum:h}}function kF(){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} · ${SF(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 Zg({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 AF({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=_g(f,53),g=_g(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(Zg,{weeks:53,months:n.months,cells:n.cells}),o.jsx(Zg,{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($H,{size:14})},{id:"engines",label:"Providers",title:"Providers",icon:o.jsx(u1,{size:14})},{id:"budget",label:"Budget",title:"Budget",icon:o.jsx(FH,{size:14})},{id:"usage",label:"Usage",title:"Usage",icon:o.jsx(NH,{size:14})},{id:"library",label:"Library",title:"Library",icon:o.jsx(CH,{size:14})},{id:"appearance",label:"Appearance",title:"Appearance",icon:o.jsx(zH,{size:14})},{id:"about",label:"About",title:"About",icon:o.jsx(np,{size:14})},{id:"danger",label:"Danger zone",title:"Danger zone",icon:o.jsx(X1,{size:14}),danger:!0}];function NF({engines:e,shots:t,onSaved:n}){const s=vs("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:su,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(S2,{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(S2,{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(S2,{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(ru,{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(MF,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id))}),o.jsxs("div",{className:"sc-set-scroll",children:[f==="brand"&&o.jsx(lF,{}),f==="engines"&&o.jsx(vF,{engines:e}),f==="budget"&&o.jsx(EF,{engines:e,onSaved:n}),f==="usage"&&o.jsx(AF,{shots:t}),f==="library"&&o.jsx(kF,{}),f==="appearance"&&o.jsx(bF,{}),f==="about"&&o.jsx(wF,{version:c}),f==="danger"&&o.jsx(CF,{onDone:n})]})]})]})]})})}function S2({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 MF({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 RF=["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=RF[Number(t[2])-1];return n?`${Number(t[3])} ${n} ${t[1]}`:e}function LF(){const e=vs("whatsnew"),{status:t,version:n,entry:s,changelogUrl:i,releasesUrl:c,markSeen:u}=ad(),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(ip,{open:f,className:"sc-wn",maxWidth:"420px",described:!0,onDismiss:h,children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(cp,{className:"sc-newdlg-title",children:"What's new"}),o.jsx(d1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx(VD,{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(K1,{size:13})]}),o.jsx(d1,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Got it"})})]})]})}const TF=2e3,HF=5*6e4;function DF({engines:e,onSaved:t}){const n=vs("setup"),s=n.close,i=n.value,c=i?qw(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:su,children:c?o.jsx($F,{provider:c,name:h?Gs(h.displayName):c.engineId,connected:!!(h!=null&&h.available),onSaved:t,onDone:s}):o.jsx(FF,{engines:e,onSaved:t,onDone:s})})})}function Jw({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(ru,{children:o.jsx("button",{type:"button",className:"sc-set-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]})}function $F({provider:e,name:t,connected:n,onSaved:s,onDone:i}){var E,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 b=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(Jw,{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":(E=jh(e.engineId))==null?void 0:E.plate,"--sc-ink":(N=jh(e.engineId))==null?void 0:N.ink},children:o.jsx(Qw,{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(),b()},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(on,{size:"1"}):o.jsx(Ox,{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(K1,{size:13})]})]})]}),n&&o.jsx("div",{className:"sc-setup-cut",children:o.jsx(cs,{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(mw,{size:15})," ",m]})})]})]})}function FF({engines:e,onSaved:t,onDone:n}){const s=td(),[i,c]=r.useState("checking"),[u,f]=r.useState(null),[h,m]=r.useState(!1),[g,v]=r.useState("mac"),y=r.useRef(null),w=r.useCallback(()=>{y.current!==null&&(window.clearInterval(y.current),y.current=null)},[]),b=r.useCallback(async()=>{const{state:A,platform:M}=await Ce.codexStatus();return M&&v(M),c(A),A},[]);r.useEffect(()=>(f(null),c("checking"),b().catch(()=>c("unverified")),w),[b,w]);const C=r.useCallback(()=>{f(null),c("checking"),b().catch(()=>c("unverified"))},[b]);r.useEffect(()=>{i==="ready"&&t()},[i,t]);const E=async()=>{f(null),c("installing");try{const A=await Ce.installCodex();if(A.ok||A.state!=="not-installed"){c(A.state);return}f({detail:A.detail,command:A.fallbackCommand,docsUrl:A.docsUrl}),c(A.state)}catch(A){f({detail:A.message,command:"npm install -g @openai/codex"}),c("not-installed")}},N=async()=>{f(null),c("signing-in");const A=Date.now();w(),y.current=window.setInterval(()=>{if(Date.now()-A>HF){w(),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:M})=>{M==="ready"&&(w(),c("ready"))}).catch(()=>{})},TF);try{const M=await Ce.loginCodex();if(w(),M.ok||M.state==="ready"){c(M.state);return}f({detail:M.detail,command:M.fallbackCommand}),c(M.state)}catch(M){w(),f({detail:M.message,command:"codex login --device-auth"}),c("not-authenticated")}},j=A=>{var M;(M=navigator.clipboard)==null||M.writeText(A).then(()=>{m(!0),window.setTimeout(()=>m(!1),1600)})},k=e.filter(A=>A.available&&A.id!=="codex-cli"&&!A.localOnly);return o.jsxs(o.Fragment,{children:[o.jsx(Jw,{title:"Set up image generation"}),o.jsx(IF,{phase:i}),o.jsxs("div",{className:"sc-setup-body",children:[i==="checking"&&o.jsxs("p",{className:"sc-setup-lead",children:[o.jsx(on,{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:E,disabled:i==="installing",children:[i==="installing"?o.jsx(on,{size:"1"}):o.jsx(Mx,{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:N,disabled:i==="signing-in",children:[i==="signing-in"?o.jsx(on,{size:"1"}):o.jsx(ZH,{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(ya,{size:15})," Codex CLI is ready. Your images run on your own ChatGPT plan, and Scenri adds nothing to the bill."]}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:n,children:"Start creating"}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:C,children:[o.jsx(G0,{size:14})," Check again"]})]})]}),i==="unverified"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Scenri could not verify Codex on this computer. Something answered too slowly or not at all, so nothing is assumed to work."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:C,children:[o.jsx(G0,{size:15})," Check again"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>c("no-plan"),children:"I do not have ChatGPT"})]}),o.jsx("p",{className:"sc-setup-note",children:"If you just installed Codex, quit and reopen Scenri so it can see the new command."})]}),i==="update-needed"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Codex CLI on this computer is too old for Scenri. Update it once, then check again."}),o.jsxs("div",{className:"sc-setup-cmd",children:[o.jsx("code",{children:"npm install -g @openai/codex@latest"}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>j("npm install -g @openai/codex@latest"),children:[h?o.jsx(ya,{size:14}):o.jsx(hg,{size:14}),h?"Copied":"Copy"]})]}),g==="windows"&&o.jsxs("p",{className:"sc-setup-note",children:["Installed with the standalone installer instead? Update it in PowerShell:"," ",o.jsx("code",{children:"irm https://chatgpt.com/codex/install.ps1 | iex"})]}),o.jsx("div",{className:"sc-setup-acts",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:C,children:[o.jsx(G0,{size:15})," Check again"]})})]}),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(Ox,{size:15})," Add a provider key"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>void b(),children:"Back to Codex setup"})]}),k.length>0&&o.jsxs("p",{className:"sc-setup-note",children:[k.map(A=>Gs(A.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(mw,{size:15})," ",u.detail??"That did not work."]}),u.command&&o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"sc-setup-note",children:["Run this in ",g==="windows"?"PowerShell":"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:()=>j(u.command),children:[h?o.jsx(ya,{size:14}):o.jsx(hg,{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(K1,{size:13})]})]})]})]})}function IF({phase:e}){if(e==="no-plan")return null;const t=e==="not-authenticated"||e==="signing-in"||e==="update-needed"||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(ya,{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(ya,{size:12}):o.jsx("span",{className:"d"})," Sign in"]})]})}function _F(){const{brands:e}=mn(),t=e9(e);return t?o.jsx(Ys,{to:Vo(t),replace:!0}):o.jsx(Ys,{to:"/setup",replace:!0})}function e9(e){const t=tT();return e.find(n=>n.id===t)??e[0]??null}const t9=r.createContext(null);function It(){const e=r.useContext(t9);if(!e)throw new Error("useBrand must be used inside BrandLayout");return e}const n9=r.createContext(null);function ZF(){const e=r.useContext(n9);if(!e)throw new Error("useAssetsPanel must be used inside BrandLayout");return e}function OF(){const{brandSlug:e}=Ba(),{pathname:t,search:n}=ln(),s=or({path:Ke.brand,end:!1}),{brands:i,engines:c,refresh:u}=mn(),[f,h]=r.useState(null),[m,g]=r.useState([]),[v,y]=r.useState([]),[w,b]=r.useState({}),[C,E]=r.useState(!1),[N,j]=Za(ir.assetsOpen,window.innerWidth>=1280),k=r.useCallback(()=>j(J=>!J),[]),A=r.useMemo(()=>({open:N,toggle:k,setOpen:j}),[N,k]);b$();const M=i.find(J=>J.slug===e)??i.find(J=>J.id===e)??null,{products:T,loaded:D,reload:P}=E$(M==null?void 0:M.id),G=r.useCallback(async()=>{if(!M)return;const J=await Ce.workspace(M.id);h(J.project),g(J.nodes),y(J.sets),b(J.membership),E(!0)},[M==null?void 0:M.id]),I=r.useCallback(J=>y(Z=>Z.map(ee=>ee.id===J.id?J:ee)),[]),oe=r.useCallback(J=>y(Z=>Z.filter(ee=>ee.id!==J)),[]);r.useEffect(()=>{E(!1)},[M==null?void 0:M.id]),r.useEffect(()=>{M&&nT(M.id)},[M==null?void 0:M.id]),r.useEffect(()=>{G()},[G,M==null?void 0:M.updatedAt]);const W=s?t.slice(s.pathnameBase.length):"";if(!M){const J=e9(i);return o.jsx(Ys,{to:J?Vo(J)+W+n:Ke.root,replace:!0})}return e!==M.slug?o.jsx(Ys,{to:Vo(M)+W+n,replace:!0}):o.jsxs(t9.Provider,{value:{brand:M,workspace:f,nodes:m,sets:v,membership:w,products:T,productsLoaded:D,refreshProducts:P,loaded:C,refresh:G,applySet:I,dropSet:oe},children:[o.jsx(NF,{engines:c,shots:m,onSaved:u}),o.jsx(DF,{engines:c,onSaved:u}),o.jsx(LF,{}),o.jsxs(FD,{brand:M,children:[o.jsx(UF,{}),o.jsx(i$,{children:o.jsx(n9.Provider,{value:A,children:o.jsxs("div",{className:"sc-shell",children:[o.jsx(y$,{}),o.jsx(Xh,{}),o.jsx(ZD,{})]})})})]})]})}function VF(e){return!e.unread||e.spent||!e.loaded||!e.visible||e.dialogOpen?!1:e.running===0&&e.builds===0}const zF=Number(window.localStorage.getItem("scenri:whatsnew-settle-ms")??2500)||2500,r9=r.createContext(null);function ad(){const e=r.useContext(r9);if(!e)throw new Error("useWhatsNew must be used inside WhatsNewProvider");return e}function BF({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,b]=r.useState(!1),C=vs("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 E=C.open,N=r.useCallback(()=>E(t??"latest"),[E,t]),j=r.useCallback(()=>{b(!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(r9.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 UF(){const e=ad(),{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(!VF({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()},zF);return()=>window.clearTimeout(g)},[e,s,c,h,t,n.length]),null}const a9=r.createContext(null);function mn(){const e=r.useContext(a9);if(!e)throw new Error("useAppData must be used inside AppShell");return e}function WF(){const e=lD(),[t,n]=r.useState(null),[s,i]=r.useState([]),[c,u]=r.useState(null),f=cD(),h=dD(),m=hD(),g=pD(),v=r.useCallback(w=>{n(b=>b&&b.map(C=>C.id===w.id?w:C))},[]),y=r.useCallback(async()=>{try{const[w,b]=await Promise.all([Ce.brands(),Ce.engines()]);n(w),i(b)}catch(w){u(String(w.message??w))}},[]);return r.useEffect(()=>{y()},[y]),c?o.jsx(dr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(sp,{failure:oo(c)})}):t===null?o.jsx(dr,{align:"center",justify:"center",height:"100vh",children:o.jsx(on,{size:"3"})}):o.jsx(a9.Provider,{value:{brands:t,engines:s,...f,presenters:h.presenters,presenterCategories:h.categories,presenterStyles:h.styles,presentersLoaded:h.loaded,presentersError:h.error,refetchPresenters:h.refetch,demoProducts:m.demoProducts,demoProductCategories:m.categories,demoProductsLoaded:m.loaded,demoProductsError:m.error,showcase:g.showcase,showcaseCategories:g.categories,showcaseLoaded:g.loaded,showcaseError:g.error,refetchShowcase:g.refetch,refresh:y,applyBrand:v},children:o.jsx(Cw.Provider,{value:e,children:o.jsx(ED,{children:o.jsxs(BF,{children:[o.jsx(t3,{}),o.jsx(Xh,{})]})})})})}function vs(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 Zs(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 GF(){var T,D,P,G,I,oe,W,J;const{brands:e,refresh:t}=mn(),n=nn(),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),[b,C]=r.useState(null),E=async Z=>{C(Z),await t(),n(Vo(Z),{replace:!0})},N=async()=>{var Z,ee,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:{...(Z=K.json)==null?void 0:Z.meta,website:((q=(ee=K.json)==null?void 0:ee.meta)==null?void 0:q.website)||H}});Ce.catalogImport(X.id,H).catch(()=>{}),await E(X)}catch(H){w(String(H.message??H)),v(!1)}},j=async()=>{v(!0),w(null);try{await E(await Ce.createBrand({specVersion:"0.1",meta:{name:u.trim()||"Untitled brand"}}))}catch(Z){w(String(Z.message??Z)),v(!1)}},k=()=>n("/",{replace:!0}),A=b?xa((T=b.json)==null?void 0:T.palette):[],M=b?Zn((G=(P=(D=b.json)==null?void 0:D.logos)==null?void 0:P[0])==null?void 0:G.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:Z=>f(Z.target.value),onKeyDown:Z=>Z.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(on,{size:"1"}):o.jsxs(o.Fragment,{children:["Create it ",o.jsx(dg,{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:Z=>c(Z.target.value),onKeyDown:Z=>Z.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(on,{size:"1"}):o.jsxs(o.Fragment,{children:["Build the kit ",o.jsx(dg,{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(Z5,{color:"red",mt:"3",size:"1",children:o.jsx(O5,{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&&!b&&o.jsxs("div",{className:"sc-scrape-row",children:[o.jsx(on,{size:"1"})," Reading the site and building the kit"]}),!g&&!b&&o.jsx("p",{style:{color:"var(--sc-fg3)",fontSize:12.5,margin:0},children:"The kit appears here as it is found."}),b&&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(Ga,{size:16,color:"var(--sc-fg3)"})}),o.jsxs("span",{children:[o.jsx("b",{dir:"auto",style:{fontFamily:"var(--sc-font-display)",fontSize:16},children:(oe=(I=b.json)==null?void 0:I.meta)==null?void 0:oe.name}),((J=(W=b.json)==null?void 0:W.meta)==null?void 0:J.tagline)&&o.jsx("small",{dir:"auto",style:{display:"block",color:"var(--sc-fg3)",fontSize:11.5},children:String(b.json.meta.tagline).slice(0,60)})]})]}),A.length>0&&o.jsx("div",{style:{display:"flex",gap:8},children:A.slice(0,5).map(Z=>o.jsx("span",{style:{flex:1,height:44,borderRadius:9,border:"1px solid var(--sc-line)",background:Z.hex}},Z.hex))})]})]})]})})]})}const Zl=e=>{const t=(e??"").trim();return t||null};function KF(e){const t=e;return{name:e.name,brand:Zl(t.brand)??Zl(t.vendor),qualifier:Zl(t.format)??Zl(t.subcategory)??Zl(t.variant)}}function YF(e){return!e.brand||e.name.toLowerCase().startsWith(e.brand.toLowerCase())?e.name:`${e.brand} ${e.name}`}function Oa(e,t){const n=KF(e);if(t==="chip")return n.name;const s=YF(n);return t==="tooltip"?[s,n.qualifier].filter(Boolean).join(" · "):s}function to(e,t){return t==="tooltip"?[e.name,Zl(e.lighting)].filter(Boolean).join(" · "):e.name}function h1(e){return[e.name,...e.legacyNames??[],...e.keywords??[],e.description,e.lighting,e.subject].concat(e.collections??[],e.verticals??[]).filter(Boolean).join(" ")}function wp(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 m1(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 qF(e,t,n){return[e.title,e.category,n,t.product?wp(t.product):null,t.presenter?m1(t.presenter):null,t.scene?h1(t.scene):null].filter(Boolean).join(" ")}function bp(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?presenter=${encodeURIComponent(s)}&compose=1`)},[n,t])}function Ep(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?scene=${encodeURIComponent(s)}&compose=1`)},[n,t])}function kh(e){return{...e.brief,...e.variants?{variants:e.variants}:{},...e.quality?{quality:e.quality}:{},_at:Date.now()}}function XF(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?showcase=${encodeURIComponent(s)}`)},[n,t])}const Y0=e=>`sc-favscenes-${e}`,QF=e=>`sc-favlooks-${e}`,JF=e=>`bt-favlooks-${e}`;function Va(e){try{const t=localStorage.getItem(Y0(e))??gh(QF(e),Y0(e))??gh(JF(e),Y0(e)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function eI(e,t){try{localStorage.setItem(Y0(e),JSON.stringify(t))}catch{}}function s9(e,t){const n=Va(e),s=n.includes(t)?n.filter(i=>i!==t):[...n,t];return eI(e,s),s}const o9=[{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"}],tI=new Map(o9.map(e=>[e.key,e]));function j2(e){var t;return e?((t=tI.get(e))==null?void 0:t.label)??e:null}function nI(e){const t=new Map(o9.map((n,s)=>[n.key,s]));return[...e].sort((n,s)=>(t.get(n)??99)-(t.get(s)??99)||n.localeCompare(s))}const k2=14,rI=768,Ah=[{px:190,label:"Compact",cells:3},{px:320,label:"Large",cells:2}],l9=320;function i9(e){const t=typeof e=="number"&&Number.isFinite(e)?e:l9;let n=Ah[0].px;for(const s of Ah)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 aI(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 sI(){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 oI(e,t,n){if(e<=0)return{tile:t,cols:1};const s=n?2:Math.max(1,Math.floor((e+k2)/(t+k2)));return{tile:Math.floor((e-k2*(s-1))/s),cols:s}}function iu(e){return ll(e)===5?"large":"compact"}function lI(){const[e]=Za(ir.wallDensity,zo);return iu(e)}const iI=[{value:7,label:"Compact",hint:"More cards per row",cells:3},{value:5,label:"Large",hint:"Fewer, larger cards",cells:2}],cI=Ah.map(e=>({value:e.px,label:e.label,hint:e.label==="Compact"?"More shots per row":"Fewer, larger shots",cells:e.cells}));function sd({value:e,onChange:t}){return o.jsx(c9,{label:"Grid size",value:ll(e),options:iI,onChange:n=>t(n)})}function uI({value:e,onChange:t}){return o.jsx(c9,{label:"Shot size",value:i9(e),options:cI,onChange:t})}function c9({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(dI,{cells:c.cells})},c.value)})]})}function dI({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 od(e){return{"--sc-wall-cols":String(ll(e))}}const q0="sc-insert-menu";function fI(e){var t;return!!(((t=e.nativeEvent)==null?void 0:t.isComposing)??e.isComposing)||e.keyCode===229}function Og(e){return e==="/"?"Scenes":e==="@"?"Presenters":e==="#"?"Colors":"Products"}function hI(e){return e==="/"?"No matching scenes":e==="#"?"No matching colours":e==="@"?"No matching presenters":"No matching products"}function mI({menuOpen:e,handled:t}){return!e&&!t}function pI(e,t){return t||!e?{open:!1}:{open:!0,sigil:e.sigil,query:e.query}}function gI(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 vI=e=>e.t!=="format",ss=()=>[{t:"text",v:""}];function u9(e){const t=(e.tokens??[]).filter(vI),n=t.length?t:ss(),s=n.some(i=>i.t==="template");return e.templateId&&!s?[{t:"template",id:e.templateId},...n]:n}const ma="sc-token",Cp=`.${ma}`,d9=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 X0(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+=p1(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+=p1(i)}return s}function Yl(e,t){if(!e)return;let n=0;for(const s of Array.from(e.childNodes)){const i=p1(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=yI(e);Ir(e,t,t.length)}function yI(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 p1=e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").length:1;function Bs(e){if(!e)return;const t=X0(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=Ao(i.previousSibling),f=Ao(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))Ao(s)&&Ao(s.nextSibling)&&e.insertBefore(document.createTextNode(" "),s.nextSibling);Ao(e.lastChild)&&e.appendChild(document.createTextNode(" ")),Ao(e.firstChild)&&e.insertBefore(document.createTextNode(""),e.firstChild),!fc(e)&&t!==null&&Yl(e,t)}function xI(e){return e.querySelector(Cp)?!1:!(e.textContent??"").replace(/[\u200B\uFEFF\u00a0]/g,"").trim()}function fc(e){if(!e)return!1;const t=xI(e);return t&&e.firstChild&&e.replaceChildren(),e.toggleAttribute("data-empty",t),t}const Ao=e=>!!e&&e.nodeType===Node.ELEMENT_NODE&&e.classList.contains(ma);function Vg(e){var i;if(!e)return ss();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
|
-
`;continue}n+=u.textContent??""}return s(),t.some(c=>c.t==="text")||t.push({t:"text",v:""}),t}function zg(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 f9(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 h9(){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 Nh(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 Bg=9;function
|
|
101
|
-
`||e===" ";function AI(e){const t=f9(e);for(let n=t.length-1;n>=0;n--){const s=t[n];if(g1(s))return null;if(kI(s))return n===0||g1(t[n-1])?{sigil:s,query:t.slice(n+1)}:null}return null}function NI(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 A2(e,t){if(!e||!t)return;e.normalize();const n=Mh(e,t);t.remove(),Bs(e),Yl(e,n)}function Mh(e,t){let n=0;for(const s of Array.from(e.childNodes)){if(s===t)break;n+=p1(s)}return n}function MI(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 Rh(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 N2=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function RI(e){let t="",n="";const s=i=>{var f;if(i.nodeType===Node.TEXT_NODE){const h=i.textContent??"";t+=h,n+=N2(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="${N2(u)}">${N2(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 LI(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 M2=e=>(e==null?void 0:e.querySelector('[data-kind="template"]'))??null,R0=e=>{var t;return((t=e==null?void 0:e.closest)==null?void 0:t.call(e,Cp))??null};function R2(e,t,n={}){var i;if(!e)return!1;let s=!1;for(let c=0;c<32;c++){const u=HI(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)};FI(e,u.node,u.start,u.end,t(f)),s=!0}return s&&Bs(e),s}function TI(e,t){var i;e.dataset.kind="color",e.dataset.tok=d9(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 HI(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=$I(i.textContent??"",t,(f,h)=>DI(i,h,f)),u=c[c.length-1];if(u)return{node:i,...u}}return null}function DI(e,t,n){if(n>0)return g1(t[n-1]);const s=e.previousSibling;if(!s||Ao(s))return!0;if(s.nodeType===Node.TEXT_NODE){const i=s.textContent??"";return!i.length||g1(i[i.length-1]??"")}return!0}function $I(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=I$(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 FI(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 Sp(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 II(){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 m9=320,Ph=320,_I=280,Mo=8,No=12,ZI=8,Ug=80,OI=120,p9=48;function VI(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>p9)}function zI(e){return{top:e.top,bottom:Math.min(e.bottom,e.top+22),left:e.left,right:e.left+2}}function g9(e,t,n,s){return Math.min(Math.max(e,s),Math.max(s,n.width-t-s))}function Lh(e,t,n,s){const i=n?ZI:No,c=n?Math.max(0,e.right-e.left):Math.min(m9,t.width-i*2),u=n?e.left:g9(e.left,c,t,i),f=n?Math.min(_I,Math.floor(t.height*.4)):Ph,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 Wg(e,t,n,s){const i=Math.min(m9,n.width-No*2),c=g9(e.left,i,n,No),u=e.top-Mo-No,f=n.height-e.bottom-Mo-No,h=u>=OI||u>=f?"above":"below",m=Math.min(Ph,s??Ph),g=h==="above"?u:f,v=Math.min(m,s==null?Math.max(Ug,g):g);if(h==="above"){const w=Math.max(No,e.top-Mo-Math.min(m,u)),b=Math.min(m,e.top-Mo-w);return s==null&&b<Ug?Lh(t,n,!1):{left:c,top:w,width:i,maxHeight:b,side:h,shell:"caret"}}const y=e.bottom+Mo;return y+Math.min(v,f)>n.height-No?Lh(t,n,!1,s):{left:c,top:y,width:i,maxHeight:Math.min(m,f),side:h,shell:"caret"}}function BI(e,t,n,s={}){if(s.phone)return Lh(t,n,!0,s.height);const i=s.line??t;if(VI(e,n)&&e)return Wg(e,t,n,s.height);const c=e&&e.right-e.left>p9?e:i;return Wg(zI(c),t,n,s.height)}function UI({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),b=`${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 E=r.useCallback(j=>{const A=h9()??(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 BI(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!==b&&(C.current={key:b});const j=()=>y(E(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,b,E]),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:b,height:j};const k=E(j);!k||k.top===v.top&&k.maxHeight===v.maxHeight||y(k)},[v,b,E]),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]?`${q0}-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")||(Rh(k),f())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[f]),v?na.createPortal(o.jsx("div",{className:"sc-cmd",id:q0,"data-shell":v.shell,style:{left:v.left,top:v.top,width:v.width,maxHeight:v.maxHeight},ref:w,role:"listbox","aria-label":Og(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:`${q0}-opt-${k}`,className:"sc-cmd-row",role:"option","aria-selected":k===m,"data-active":k===m,onMouseEnter:()=>g(k),onMouseDown:T=>Rh(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(WI,{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:Og(c)}),o.jsx("div",{className:"sc-cmd-empty",children:hI(c)})]})}),document.body):null}function WI({text:e,query:t}){return o.jsx("span",{className:"sc-cmd-label",children:gI(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 GI=440,KI=460,P0=8,jo=12,YI=200,qI=240;function v9(e,t,n){if(e.bottom<0||e.top>t.height)return null;const s=Math.min((n==null?void 0:n.width)??GI,t.width-jo*2),i=e.top-P0-jo,c=t.height-e.bottom-P0-jo,u=i>=qI||i>=c?"above":"below",h=Math.max(YI,Math.min(KI,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-P0-h):e.bottom+P0;return{left:m,top:g,width:s,maxHeight:h,side:u}}const XI={fragrance:["Fragrance"],footwear:["Footwear"],apparel:["Apparel"],furniture:["Furniture","Home"],beauty:["Beauty"],electronics:["Electronics"],accessories:["Accessories"],beverage:["Food & drink"],jewelry:["Jewelry"],food:["Food & drink"]},QI={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 JI(e,t){if(!t)return!1;const n=XI[t];return!!n&&n.some(s=>e.verticals.includes(s))}function e_(e,t){if(!t)return!1;const n=QI[t];return!!n&&n.some(s=>e.suitableCategories.includes(s))}function Gg(e){return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}const t_=4;function ba(e,t){const n=Gg(t).trim().split(/\s+/).filter(Boolean);if(!n.length)return!0;const s=Gg(e);return n.every(i=>s.includes(i)||i.length>=t_&&i.endsWith("s")&&s.includes(i.slice(0,-1)))}function y9(e){return e<2?"none":"tabs"}function x9(e,t){return{visible:e.slice(0,t),remaining:Math.max(0,e.length-t)}}function w9(e,t){return[...e].sort((n,s)=>Number(t(s))-Number(t(n)))}const cu={product:"product",presenter:"presenter",scene:"scene"},hc=48;function n_(e){return e?e.t==="product"?"product":e.t==="character"?"presenter":e.t==="template"?"scene":null:null}function L0(e){const t=n_(e);return t||((e==null?void 0:e.t)==="color"?"color":null)}const wc=e=>{const t=(e??"").trim();return t||void 0},Kg=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 Yg(s,"brand",Zn((c=(i=s.shots)==null?void 0:i[0])==null?void 0:c.file))}),...t.demoProducts.map(s=>Yg(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:m1(n),thumb:n.avatarUrl??n.previewUrl??null,crop:n.avatarUrl?void 0:"top",source:Kg(n)?"brand":"catalog",recommended:e_(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:Zn((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:h1(n),thumb:n.previewUrl??null,tint:Sp(n.previewColor),source:Kg(n)?"brand":"catalog",recommended:JI(n,t.productCategory),token:{t:"template",id:n.id}}))}function Yg(e,t,n){return{kind:"product",id:e.id,label:Oa(e,"chip"),full:Oa(e,"tooltip"),sub:r_(e),search:wp(e),thumb:n,source:t,token:{t:"product",id:e.id}}}function r_(e){const t=e;return wc(t.brand)??wc(t.vendor)}function bc(e,t){const n=t.trim();return n?e.filter(s=>ba(s.search,n)):e}function qg(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 ld(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)=>qg(e,m,n.bookmarked)-qg(e,g,n.bookmarked)).map(m=>n.bookmarked.has(m.id)?{...m,bookmarked:!0}:m),{visible:f,remaining:h}=x9(u,n.shown??hc);return{current:s,items:f,remaining:h,total:u.length}}const a_={$:"product","/":"scene","@":"presenter"},Xg=40,Qg={Products:8,Presenters:8,Colors:16,Scenes:8},s_={$:"Products","/":"Scenes","@":"Presenters","#":"Colors"};function b9(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 o_(e,t,n,s){return ld(e,t,{currentId:null,query:"",bookmarked:n,shown:s}).items.map(b9)}function l_(e,t,n={query:""}){const s=n.query.trim(),i=n.bookmarked??new Set;if(e==="#"){const f=(t.colors??[]).map(i_);return s?f.filter(h=>ba(h.search??h.label,s)).slice(0,Xg):f.slice(0,Qg.Colors)}const c=a_[e],u=c==="product"?t.products:c==="presenter"?t.presenters:t.scenes??[];return s?bc(u,s).map(b9).slice(0,Xg):o_(c,u,i,Qg[s_[e]])}function i_(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 c_="(pointer: coarse)";function u_(e){return lo(bi)?o.jsx(p_,{...e}):o.jsx(m_,{...e})}function d_(){return!lo(c_)}const f_=e=>`Remove ${cu[e]}`;function h_(e,t,n){const s={slug:t};return e==="product"?Js(s,n):e==="presenter"?al(s,n):rl(s,n)}function E9({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,b]=r.useState(hc),C=r.useRef(null),E=r.useRef(null),[N,j]=r.useState(0),k=r.useMemo(()=>e==="scene"?new Set(Va(s)):new Set,[e,s]);r.useEffect(()=>{b(hc),j(0)},[v]);const A=r.useMemo(()=>ld(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 W;const oe=(W=E.current)==null?void 0:W.querySelectorAll("[data-nav]")[I];oe&&(j(I),oe.focus({preventScroll:!0}),oe.scrollIntoView({block:"nearest"}))},[]),T=r.useCallback(()=>{const I=E.current;return I?Math.max(1,getComputedStyle(I).gridTemplateColumns.split(" ").filter(Boolean).length):1},[]),D=I=>{var Z;if(I.key==="Escape"){I.preventDefault(),I.stopPropagation(),h("escape");return}const oe=I.target===C.current;if(oe&&I.key==="ArrowDown"){I.preventDefault(),M(0);return}if(oe&&I.key==="Enter"){I.preventDefault(),A.items[0]&&u(A.items[0]);return}if(oe)return;const W=T(),J=I.key==="ArrowRight"?1:I.key==="ArrowLeft"?-1:I.key==="ArrowDown"?W:I.key==="ArrowUp"?-W:0;if(J){I.preventDefault();const ee=N+J;ee<0&&J===-W?(Z=C.current)==null||Z.focus():ee>=0&&ee<A.items.length&&M(ee);return}I.key==="Home"?(I.preventDefault(),M(0)):I.key==="End"&&(I.preventDefault(),M(A.items.length-1))},P=cu[e],G=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(Hc,{size:13}),o.jsx("input",{ref:C,type:"text",value:v,onChange:I=>y(I.target.value),placeholder:`Search ${P}s`,"aria-label":`Search ${P}s`,autoComplete:"off",spellCheck:!1})]})}),A.current&&o.jsxs("div",{className:"sc-swap-cur",title:A.current.full,children:[o.jsx(Jg,{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:h_(e,i,A.current.id),target:"_blank",rel:"noreferrer",title:`Open this ${P} in a new tab`,"aria-label":`Open ${A.current.label} in a new tab`,children:o.jsx(K1,{size:14})}),o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(ya,{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 ${P}s.`}),o.jsx("div",{className:"sc-swap-grid",ref:E,role:"listbox","aria-label":`Choose a ${P}`,children:A.items.map((I,oe)=>o.jsxs("div",{className:"sc-swap-card",role:"option","aria-selected":!1,"data-nav":oe,tabIndex:oe===N?0:-1,title:I.full,style:I.tint?{"--tint":I.tint}:void 0,onFocus:()=>j(oe),onClick:()=>u(I),onKeyDown:W=>{W.key!=="Enter"&&W.key!==" "||(W.preventDefault(),u(I))},children:[o.jsx(Jg,{src:I.thumb,tinted:!!I.tint}),o.jsxs("b",{dir:"auto",children:[I.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(Y1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),I.label]}),G&&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:()=>b(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 ",P," 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(iw,{size:13}),f_(e)]})]})]})}function Jg({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(Ga,{size:18})}):o.jsx("img",{className:"sc-swap-thumb","data-tinted":t||void 0,src:e,alt:"",loading:"lazy",onError:()=>s(!0)})}function m_(e){const{anchor:t,kind:n,onClose:s}=e,i=d_(),[c,u]=r.useState(null),f=r.useRef(null);return r.useLayoutEffect(()=>{var m,g;const h=()=>{const v=window.visualViewport,y=v9(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 ${cu[n]}`,style:{left:c.left,top:c.top,width:c.width,maxHeight:c.maxHeight},children:o.jsx(E9,{...e,autoFocusSearch:i})}),document.body):null}function p_(e){const{kind:t,onClose:n}=e,{sheet:s,grip:i}=ou(()=>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 ",cu[t]]})]}),o.jsx(E9,{...e,autoFocusSearch:!1})]})]})})}const g_=260;function v_(e){return lo(bi)?o.jsx(x_,{...e}):o.jsx(y_,{...e})}function Dl(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function C9({currentHex:e,currentName:t,palette:n,onPick:s,onRemove:i,onClose:c}){const u=r.useMemo(()=>{const E=new Set,N=[],j=A=>{const M=fn(A.hex);!M||E.has(M)||(E.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(E=>Dl(E.hex,e))));r.useEffect(()=>{m(E=>Math.max(0,Math.min(E,Math.max(0,u.length-1))))},[u.length]),r.useLayoutEffect(()=>{var N,j;const E=Math.max(0,u.findIndex(k=>Dl(k.hex,e)));(j=(N=f.current)==null?void 0:N.querySelectorAll("[data-nav]")[E])==null||j.focus({preventScroll:!0})},[]);const g=r.useCallback(E=>{var j;const N=(j=f.current)==null?void 0:j.querySelectorAll("[data-nav]")[E];N&&(m(E),N.focus({preventScroll:!0}))},[]),v=E=>{if(E.key==="Escape"){E.preventDefault(),E.stopPropagation(),c("escape");return}if(E.key==="ArrowDown"||E.key==="ArrowUp"){E.preventDefault();const N=h+(E.key==="ArrowDown"?1:-1);N>=0&&N<u.length&&g(N)}},y=E=>s({t:"color",hex:E.hex,name:E.name||void 0}),w=(E,N)=>{const j=u.find(k=>Dl(k.hex,E));s({t:"color",hex:E,name:(j==null?void 0:j.name)||void 0},{live:!0})},b=e?fn(e):null,C=!!b&&!n.some(E=>Dl(E.hex,b));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((E,N)=>{const j=Dl(E.hex,e),k=o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-swap-dot",style:{background:E.hex},"aria-hidden":!0}),o.jsx("b",{dir:"auto",children:E.name}),o.jsx("span",{children:E.hex}),j&&o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(ya,{size:11,weight:"bold"})})]});return C&&j?o.jsx(f1,{className:"sc-swap-swatch",triggerStyle:{background:"none"},value:E.hex,presets:n.map(A=>A.hex),commitMode:"live",align:"start",label:`Edit ${E.name}`,triggerProps:{role:"option","aria-selected":!0,"data-on":"","data-nav":N,tabIndex:N===h?0:-1,title:`${E.name} ${E.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:`${E.name} ${E.hex}`,onFocus:()=>m(N),onClick:()=>y(E),onKeyDown:A=>{A.key!=="Enter"&&A.key!==" "||(A.preventDefault(),y(E))},children:k},E.hex)})})}),o.jsxs("div",{className:"sc-swap-foot",children:[o.jsxs(f1,{className:"sc-swap-swatch sc-swap-custom",triggerStyle:{background:"none"},value:e??yp(n),presets:n.map(E=>E.hex),commitMode:"live",align:"start",label:"Custom colour",onChange:E=>w(E),children:[o.jsx(nr,{size:12}),o.jsx("b",{children:"Custom colour"})]}),o.jsxs("button",{type:"button",className:"sc-swap-remove",onClick:i,children:[o.jsx(iw,{size:13}),"Remove colour"]})]})]})}function y_(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=v9(t.getBoundingClientRect(),{width:(m==null?void 0:m.width)??window.innerWidth,height:(m==null?void 0:m.height)??window.innerHeight},{width:g_});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(C9,{...e})}),document.body):null}function x_(e){const{onClose:t}=e,{sheet:n,grip:s}=ou(()=>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(C9,{...e})]})]})})}function uu(e){const{brand:t,products:n}=It(),{scenes:s,presenters:i,demoProducts:c}=mn(),u=r.useMemo(()=>Cg(lu(t),s),[t,s]),f=r.useMemo(()=>Cg(nd(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}];function Q0(e){const t=_r.find(n=>n.id===e);return t?t.w/t.h:1}const T0=6,w_=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:b},C){var Ot,tt,Qe,Ut,Vt;const E=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[P,G]=r.useState(""),[I,oe]=r.useState(null),W=r.useRef(!1),J=r.useRef(0),[Z,ee]=r.useState(!1),q=r.useRef(0),{products:H}=It(),K=H.length?H:((Ot=s.json)==null?void 0:Ot.products)??[],X=((tt=s.json)==null?void 0:tt.characters)??[],U=r.useMemo(()=>zw(s.json),[s]),L=r.useCallback((z,ue)=>{var Sn,Ct,Nr,mr;const xe=document.createElement("span");xe.className=ma,xe.contentEditable="false",xe.dataset.kind=z.t,xe.dataset.tok=d9(z),xe.dataset.uid=ue??`u${J.current++}`;let Ne="",Ye=null,it=null;if(z.t==="template"){const ct=i.find(Qt=>Qt.id===z.id);Ne=ct?to(ct,"chip"):"missing template",Ye=(ct==null?void 0:ct.previewUrl)??null;const jt=Sp(ct==null?void 0:ct.previewColor);jt&&(xe.dataset.tinted="true",xe.style.setProperty("--tint",jt))}else if(z.t==="product"){const ct=K.find(zt=>zt.id===z.id),jt=ct?null:u.find(zt=>zt.id===z.id),Qt=ct??jt;Ne=Qt?Oa(Qt,"chip"):"missing product",Ye=ct?Zn((Ct=(Sn=ct.shots)==null?void 0:Sn[0])==null?void 0:Ct.file):(jt==null?void 0:jt.previewUrl)??null}else if(z.t==="character"){const ct=X.find(Qt=>Qt.id===z.id),jt=ct?null:c.find(Qt=>Qt.id===z.id);Ne=(ct==null?void 0:ct.name)??(jt==null?void 0:jt.name)??"missing person",Ye=ct?Zn((mr=(Nr=ct.shots)==null?void 0:Nr[0])==null?void 0:mr.file):(jt==null?void 0:jt.avatarUrl)??(jt==null?void 0:jt.previewUrl)??null}else if(z.t==="color")Ne=z.name??z.hex,it=z.hex;else if(z.t==="ref")Ne="reference",Ye=tn(z.imageHash);else if(z.t==="mark"){const ct=U.find(jt=>jt.hash===z.imageHash);Ne=ct?Bw(s.json,ct):"missing mark",Ye=tn(z.imageHash)}if(Ye){const ct=document.createElement("img");ct.src=Ye,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(Ne));const _t=(g==null?void 0:g(z))??null;_t&&(xe.title=_t,xe.dataset.warn="1");const At=L0(z);if(At){const ct=At==="color"?"colour":cu[At];xe.tabIndex=0,xe.setAttribute("role","button"),xe.setAttribute("aria-haspopup","dialog"),xe.setAttribute("aria-expanded","false"),xe.setAttribute("aria-label",`${ct}: ${Ne}. Change or remove.`)}const bt=document.createElement("button");return bt.type="button",bt.tabIndex=-1,bt.setAttribute("aria-label",`Remove ${Ne}`),bt.dataset.role="remove",bt.appendChild(II()),xe.appendChild(bt),xe},[i,K,X,c,u,U,s,g]),O=r.useCallback(()=>{const z=E.current;z&&(N.current=z.querySelectorAll(`.${ma}`).length,n(Vg(z)))},[n]);r.useEffect(()=>{const z=E.current;z&&(zg(z,t!=null&&t.length?t:ss(),ue=>L(ue)),N.current=z.querySelectorAll(`.${ma}`).length,fc(z))},[]),r.useEffect(()=>{const z=E.current;if(z)for(const ue of z.querySelectorAll(`.${ma}`)){const xe=zs(ue.dataset.tok??"");if(!xe)continue;const Ne=(g==null?void 0:g(xe))??null;Ne?(ue.title=Ne,ue.dataset.warn="1"):(ue.removeAttribute("title"),delete ue.dataset.warn)}},[g]),r.useEffect(()=>{const z=()=>{const ue=X0(E.current);ue!==null&&(j.current=ue)};return document.addEventListener("selectionchange",z),()=>document.removeEventListener("selectionchange",z)},[]);const ne=r.useCallback(z=>{const ue=E.current;if(ue){if(z.t==="template"){const xe=M2(ue);if(xe){xe.replaceWith(L(z,xe.dataset.uid)),Bs(ue),O(),A(null),G("");return}}SI(ue,L(z),{eatQuery:!!k,fallbackUnits:j.current}),O(),A(null),G("")}},[k,L,O]),re=r.useRef(ne);r.useEffect(()=>{re.current=ne},[ne]);const le=r.useCallback((z,ue)=>{const xe=E.current,Ne=xe==null?void 0:xe.querySelector(`[data-uid="${CSS.escape(z)}"]`);return!xe||!Ne?!1:(Ne.replaceWith(L(ue,z)),Bs(xe),O(),!0)},[L,O]),ae=r.useCallback(z=>{const ue=E.current,xe=ue==null?void 0:ue.querySelector(`[data-uid="${CSS.escape(z)}"]`);if(!ue||!xe)return null;const Ne=Mh(ue,xe);return A2(ue,xe),O(),Ne},[O]),me=r.useCallback((z,ue,xe,Ne)=>{const Ye=z.dataset.uid;Ye&&(z.dataset.open="",z.setAttribute("aria-expanded","true"),A(null),G(""),T({uid:Ye,kind:ue,anchor:z,caret:xe,touch:Ne}))},[]),he=r.useCallback((z,ue)=>{const xe=D.current;if(D.current=null,T(null),!xe)return;const Ne=E.current,Ye=Ne==null?void 0:Ne.querySelector(`[data-uid="${CSS.escape(xe.uid)}"]`);Ye&&(delete Ye.dataset.open,Ye.setAttribute("aria-expanded","false"));const it=ue!==void 0?ue:xe.caret;if(xe.touch){it!=null&&(j.current=it);return}Ne&&(Ne.focus({preventScroll:!0}),it!=null?Yl(Ne,it):dc(Ne))},[]);r.useEffect(()=>{if(!M)return;const z=E.current;z!=null&&z.querySelector(`[data-uid="${CSS.escape(M.uid)}"]`)||he("outside")},[M,he]),r.useImperativeHandle(C,()=>({insert:z=>re.current(z),setTokens:z=>{const ue=E.current;ue&&(zg(ue,z.length?z:ss(),xe=>L(xe)),N.current=ue.querySelectorAll(`.${ma}`).length,fc(ue),n(Vg(ue)))},removeTemplate:()=>{const z=E.current,ue=z?M2(z):null;!z||!ue||(A2(z,ue),O())},openMenu:z=>{G(""),A({anchor:z})},focus:()=>dc(E.current)}));const de=uu(v),be=r.useCallback(z=>zl(z,de),[de]),Te=r.useMemo(()=>new Set(Va(s.id)),[s.id]),Ue=r.useMemo(()=>{var z;return k?l_(k.sigil??"$",{products:zl("product",de),presenters:zl("presenter",de),scenes:zl("scene",de),colors:xa((z=s.json)==null?void 0:z.palette)},{query:P,bookmarked:Te}).map(ue=>({...ue,run:()=>ue.token.t==="template"?f(ue.token.id):re.current(ue.token)})):[]},[k,de,P,Te,f,(Qe=s.json)==null?void 0:Qe.palette]),ge=z=>{const ue=E.current,xe=z.target;if(xe.closest('[data-role="remove"]')){z.preventDefault();const At=R0(xe);M&&(At==null?void 0:At.dataset.uid)===M.uid&&he("remove"),A2(ue,At),O(),A(null);return}EI(ue,z.clientX,z.clientY);const Ne=R0(xe);if(!Ne)return;const Ye=Ne.getBoundingClientRect();if(z.clientX-Ye.left<=T0||Ye.right-z.clientX<=T0)return;const it=Ne.dataset.uid??null;if(it&&(M==null?void 0:M.uid)===it){z.detail!==0&&he("outside");return}const _t=L0(zs(Ne.dataset.tok??""));_t&&me(Ne,_t,X0(ue),!1)},st=z=>{if(z.pointerType==="mouse")return;const ue=z.target;if(ue.closest('[data-role="remove"]'))return;const xe=R0(ue);if(!xe)return;const Ne=xe.getBoundingClientRect();if(z.clientX-Ne.left<=T0||Ne.right-z.clientX<=T0)return;const Ye=L0(zs(xe.dataset.tok??""));if(!Ye||xe.dataset.uid&&(M==null?void 0:M.uid)===xe.dataset.uid)return;z.preventDefault();const it=E.current,_t=document.activeElement===it,At=_t?X0(it):j.current;_t&&(it==null||it.blur()),me(xe,Ye,At,!0)},ht=z=>{const ue=E.current,xe=R0(z.target);if(xe&&!M){const Ne=()=>{Nh(ue,xe,"after"),ue==null||ue.focus({preventScroll:!0})};if(z.key==="Tab"){z.preventDefault(),Nh(ue,xe,z.shiftKey?"before":"after"),ue==null||ue.focus({preventScroll:!0});return}if(z.key==="Enter"||z.key===" "){z.preventDefault();const Ye=L0(zs(xe.dataset.tok??""));Ye&&ue&&me(xe,Ye,Mh(ue,xe)+1,!1);return}if(z.key==="Backspace"||z.key==="Delete"){z.preventDefault();const Ye=xe.dataset.uid?ae(xe.dataset.uid):null;ue==null||ue.focus({preventScroll:!0}),Ye!=null&&Yl(ue,Ye);return}if(z.key==="Escape"){z.preventDefault(),Ne();return}}if(z.key==="Escape"&&k){z.preventDefault(),A(null),G("");return}if(z.key==="Enter"&&!z.shiftKey){const Ne=z.defaultPrevented;z.preventDefault(),mI({menuOpen:!!k,handled:Ne})&&w();return}if(!(k||M)&&!fI(z)&&(z.key==="$"||z.key==="/"||z.key==="@"||z.key==="#")){const Ne=E.current,Ye=f9(Ne),it=Ye.slice(-1);if(Ye.length&&!/[\s\u00a0]/.test(it))return;G(""),A({anchor:{getBoundingClientRect:()=>h9()??(Ne==null?void 0:Ne.getBoundingClientRect())??new DOMRect},sigil:z.key})}},Rt=r.useCallback(z=>{var ue,xe;return(xe=xa((ue=s.json)==null?void 0:ue.palette).find(Ne=>Ne.hex===z))==null?void 0:xe.name},[(Ut=s.json)==null?void 0:Ut.palette]),Pe=()=>{const z=E.current,ue=(z==null?void 0:z.querySelectorAll(`.${ma}`).length)??0;ue<N.current&&MI(z),N.current=ue,fc(z)&&dc(z);const xe=W.current;W.current=!1;const Ne=R2(z,it=>L(it),{commit:xe,nameFor:Rt});Ne&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ma}`).length)??0,A(null),G(""));const Ye=Ne?{open:!1}:pI(AI(z),xe);Ye.open?k&&G(Ye.query):k&&(A(null),G("")),O()},Ae=z=>{const ue=window.getSelection();if(!ue||ue.rangeCount===0||ue.isCollapsed)return null;const xe=ue.getRangeAt(0),{text:Ne,html:Ye}=RI(xe);return Ne?(z.clipboardData.setData("text/plain",Ne),z.clipboardData.setData("text/html",Ye),z.preventDefault(),xe):null},Se=z=>{Ae(z)},at=z=>{const ue=Ae(z);ue&&(ue.deleteContents(),Bs(E.current),O())},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"?U.some(ue=>ue.hash===z.imageHash):!0,[i,K,X,c,u,U]),qt=z=>{Array.from(z.dataTransfer.types).includes("Files")&&(z.preventDefault(),q.current++,ee(!0))},Xt=z=>z.preventDefault(),Zt=()=>{q.current=Math.max(0,q.current-1),q.current===0&&ee(!1)},yn=z=>{z.preventDefault(),q.current=0,ee(!1),z.dataTransfer.files.length&&(b==null||b(z.dataTransfer.files))},Rn=z=>{z.preventDefault(),W.current=!0;const ue=LI(z.clipboardData.getData("text/html"));if(ue&&Gn(ue)){const Ne=E.current;R2(Ne,Ye=>L(Ye),{commit:!0,nameFor:Rt})&&(N.current=(Ne==null?void 0:Ne.querySelectorAll(`.${ma}`).length)??0,O());return}const xe=z.clipboardData.getData("text/plain");xe&&document.execCommand("insertText",!1,xe)},Gn=z=>{const ue=E.current,xe=window.getSelection();if(!ue||!xe||xe.rangeCount===0||!ue.contains(xe.getRangeAt(0).startContainer))return!1;const Ne=xe.getRangeAt(0);let Ye=!1;const it=[];for(const Ct of z){if(typeof Ct!="string"&&!kt(Ct)){it.push(S_(Ct,i,K));continue}if(typeof Ct!="string"&&Ct.t==="template"){if(Ye)continue;Ye=!0}it.push(Ct)}const _t=Ye?M2(ue):null;Ne.deleteContents();const At=document.createDocumentFragment();for(const Ct of it)At.appendChild(typeof Ct=="string"?document.createTextNode(Ct):L(Ct));const bt=document.createTextNode(" ");At.appendChild(bt),Ne.insertNode(At),_t&&_t.remove();const Sn=C_(ue,bt);return Bs(ue),Yl(ue,Sn),O(),!0},Pn=r.useCallback(()=>{requestAnimationFrame(()=>{const z=E.current;z&&document.activeElement===z&&fc(z)&&dc(z)})},[]);return o.jsxs("div",{className:"sc-brief","data-drag-over":Z||void 0,children:[o.jsx("div",{ref:E,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?q0:void 0,"aria-activedescendant":k?I??void 0:void 0,tabIndex:0,dir:"auto","data-ph":h,...m?{"data-ph-sm":m}:{},onClick:ge,onPointerDown:st,onKeyDown:ht,onInput:Pe,onCopy:Se,onCut:at,onPaste:Rn,onDragEnter:qt,onDragOver:Xt,onDragLeave:Zt,onDrop:yn,onFocus:Pn,onBlur:()=>{const z=E.current;R2(z,ue=>L(ue),{commit:!0,nameFor:Rt})&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ma}`).length)??0,A(null),G("")),O()}}),k&&o.jsx(UI,{anchor:k.anchor,composer:{getBoundingClientRect:()=>{var z,ue,xe;return((ue=(z=E.current)==null?void 0:z.closest(".sc-promptcard"))==null?void 0:ue.getBoundingClientRect())??((xe=E.current)==null?void 0:xe.getBoundingClientRect())??new DOMRect}},line:{getBoundingClientRect:()=>{var z;return((z=E.current)==null?void 0:z.getBoundingClientRect())??new DOMRect}},query:P,options:Ue,sigil:k.sigil,onActiveId:oe,onClose:()=>{A(null),G("")}}),(M==null?void 0:M.kind)==="color"?o.jsx(v_,{anchor:M.anchor,currentHex:H0(M.anchor),currentName:b_(M.anchor),palette:xa((Vt=s.json)==null?void 0:Vt.palette),onPick:(z,ue)=>{var Ne;const xe=M.uid;if(ue!=null&&ue.live){const Ye=(Ne=E.current)==null?void 0:Ne.querySelector(`[data-uid="${CSS.escape(xe)}"]`);Ye&&TI(Ye,z),O();return}if(E_(z.hex,H0(M.anchor))){he("pick");return}le(xe,z),he("pick")},onRemove:()=>{const z=ae(M.uid);he("remove",z)},onClose:he},M.uid):M?o.jsx(u_,{kind:M.kind,anchor:M.anchor,currentId:H0(M.anchor),candidates:be(M.kind),brandId:s.id,brandSlug:s.slug,warning:M.anchor.title||null,onAttachRequest:y?z=>{he("outside"),y(z)}:void 0,onPick:z=>{const ue=M.uid;if(z.id===H0(M.anchor)){he("pick");return}z.kind==="scene"?f(z.id):le(ue,z.token),he("pick")},onRemove:()=>{const z=ae(M.uid);he("remove",z)},onClose:he},M.uid):null]})});function H0(e){const t=zs(e.dataset.tok??"");return t?t.t==="color"?t.hex:"id"in t?t.id:null:null}function b_(e){const t=zs(e.dataset.tok??"");return(t==null?void 0:t.t)==="color"?t.name:void 0}function E_(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function C_(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 S_(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 j_=8,P2=60,k_=["All","Products","Presenters","Scenes","Colors","Brand","Shots"];function A_({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=uu(s),w=r.useMemo(()=>new Set(Va(e.id)),[e.id]),b=ol(),[C]=li(),E=C.get("new")!==null;r.useEffect(()=>{const D=P=>{P.key==="Escape"&&!E&&(P.stopPropagation(),f())};return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[f,E]),r.useEffect(()=>{const D=P=>{E||!P.target.closest(".sc-attachpanel")&&!P.target.closest(".sc-attach-toggle")&&f()};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[f,E]);const N=r.useMemo(()=>{var oe;const D=xa((oe=e.json)==null?void 0:oe.palette),P=zw(e.json),G=t.filter(W=>W.status==="done"&&W.images.length>0).slice(-12).reverse(),I=(W,J)=>ld(W,zl(W,y),{currentId:null,query:"",bookmarked:w,shown:Number.MAX_SAFE_INTEGER}).items.map(Z=>({key:`${W}:${Z.id}`,tab:J,label:Z.label,sub:Z.sub,search:Z.search,thumb:Z.thumb,recommended:Z.recommended,run:()=>Z.kind==="scene"?c(Z.id):i(Z.token)}));return[...I("product","Products"),...I("presenter","Presenters"),...I("scene","Scenes"),...P.map(W=>({key:`m:${W.hash}`,tab:"Brand",label:Bw(e.json,W),sub:"the mark itself",thumb:tn(W.hash),run:()=>i({t:"mark",imageHash:W.hash})})),...D.map(W=>({key:`c:${W.hex}`,tab:"Colors",label:W.name,sub:W.hex,swatch:W.hex,run:()=>i({t:"color",hex:W.hex,name:W.name})})),...G.map((W,J)=>({key:`r:${W.id}`,tab:"Shots",label:`Shot ${G.length-J}`,sub:"as reference",thumb:tn(W.images[0]),run:()=>i({t:"ref",imageHash:W.images[0]})}))]},[e,y,w,t,i,c]),j=D=>ba(`${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(Ga,{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:Rh,children:[o.jsxs("div",{className:"sc-ap-head",children:[o.jsx("div",{className:"sc-ap-tabs",children:k_.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(Hc,{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(dw,{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 P=A.filter(oe=>oe.tab===D);if(!P.length)return null;const G=P.slice(0,j_),I=P.length-G.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:G.map(T)}),I>0&&o.jsxs("button",{type:"button",className:"sc-amore",onClick:()=>m(D),children:["Show all ",P.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:()=>b("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(nr,{size:16})}),o.jsx("b",{children:"Add product"})]}),A.slice(0,P2).map(T)]}),A.length>P2&&o.jsxs("p",{className:"sc-ap-capped",children:["Showing ",P2," of ",A.length,". Search to narrow it down."]})]})]})]})}function N_({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(DH,{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 M_={"codex-cli":{sizing:"advisory"},openrouter:{sizing:"ratio"},replicate:{sizing:"ratio",formats:["square","story","landscape"]},fal:{sizing:"exact"},demo:{sizing:"exact"}},R_={sizing:"exact"},S9=e=>M_[e]??R_;function P_(e,t){const n=S9(e).formats;return!n||n.includes(t)}const jp=e=>S9(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"}],v1=[1,2,3,4],j9=e=>_r.filter(t=>!P_(e,t.id)).map(t=>t.id),Th=(e,t)=>t.length===0?void 0:`${e} cannot make ${_r.filter(n=>t.includes(n.id)).map(n=>n.hint).join(" or ")}.`,kp=e=>{var n;e.preventDefault();const t=e.currentTarget??e.target;(n=t==null?void 0:t.querySelector('[role="radiogroup"]'))==null||n.focus()};function L2({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:kp,onCloseAutoFocus:u,onInteractOutside:h=>{var m;(m=h.target)!=null&&m.closest(".sc-prompt-pills")&&h.preventDefault()},children:c(()=>i(!1))})]})}function Hh({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 ev=()=>o.jsx("span",{className:"sc-setpop-tick","aria-hidden":!0,children:o.jsx(ya,{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 b,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=(b=f.current)==null?void 0:b.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 L_=({children:e})=>o.jsx("p",{className:"sc-setpop-foot",children:e});function T_({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=j9(t),w=jp(t),[b,C]=r.useState(null),E=r.useRef(null);E.current=b;const N=k=>{k.preventDefault(),E.current===null&&(m==null||m(k))},j=k=>({open:b===k,onCloseAutoFocus:N,onOpenChange:A=>C(M=>A?k:M===k?null:M)});return o.jsxs("div",{className:"sc-prompt-pills",children:[o.jsx(L2,{...j("aspect"),aria:`Aspect ${g.label}, ${g.hint}`,width:"178px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(Hh,{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(Hh,{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(ev,{})]},A.id))}),Th(n,y)&&o.jsx(L_,{children:Th(n,y)})]})}),e==="generation"&&o.jsx(L2,{...j("variants"),aria:`${c} variants`,width:"156px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(xh,{size:14}),c]}),children:k=>o.jsx(o.Fragment,{children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:v1.map(String),onChange:A=>u(Number(A)),children:v1.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(L2,{...j("resolution"),aria:`Resolution ${v.label}, ${v.edge} px`,width:"192px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(RH,{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(ev,{})]},A.id))})})})]})}function k9({mode:e,engineId:t,engineName:n,formatId:s,onFormat:i,count:c,onCount:u,quality:f,onQuality:h}){const m=j9(t),g=jp(t);return o.jsxs(o.Fragment,{children:[o.jsx(T2,{label:"Aspect ratio",note:Th(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(Hh,{w:v.w,h:v.h,slot:17,box:14}),v.hint]},v.id))})}),e==="generation"&&o.jsx(T2,{label:"Variants",children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:v1.map(String),onChange:v=>u(Number(v)),children:v1.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(T2,{label:"Resolution",note:g==="advisory"?"This engine renders at its own size, so this is a request rather than a guarantee.":void 0,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:g==="advisory"?`${v.label}, asks for ${v.edge} px, ${v.note}`:`${v.label}, ${v.edge} px, ${v.note}`,onPick:()=>h(v.id),children:v.label},v.id))})})]})}function T2({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 H_(e){const[t,n]=r.useState(!1),{sheet:s,grip:i}=ou(()=>n(!1));return o.jsxs(ui,{open:t,onOpenChange:n,children:[o.jsx(um,{asChild:!0,children:o.jsx("button",{type:"button",className:"sc-var sc-shotset","aria-label":"Shot settings",title:"Shot settings",children:o.jsx(tw,{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:kp,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(k9,{...e})]})]})]})}const D_=720*60*60*1e3,Ec=e=>`scenri:draft-${e}`;function $_(e){try{return localStorage.getItem(e)}catch{return null}}function F_(e,t){try{localStorage.setItem(e,t)}catch{}}function Dh(e){try{localStorage.removeItem(e)}catch{}}function tv(e,t,n){return e.some(s=>s.t==="text"?!!s.v.trim():!0)||Object.values(t).some(s=>!!s.trim())||!!n}function I_(e){const t=$_(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 Dh(Ec(e)),null;const i=Date.now()-Date.parse(s.updatedAt??"");return!Number.isFinite(i)||i>D_?(Dh(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 A9(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};F_(Ec(e),JSON.stringify(n))}function nv(e){Dh(Ec(e))}function rv(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 $h=4,av=24,sv=24,N9={product:[],presenter:[],scene:null};function __(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 Z_(e){return`${e.product.join(",")}|${e.presenter.join(",")}|${e.scene??""}`}function O_(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 Ap=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:b,target:C,onClearTarget:E,sourceImage:N,onRestoreBranchId:j,setSlug:k,persistDraft:A=!0},M){var Kn,Ln,xn;const{products:T}=It(),{demoProducts:D,loaded:P}=mn(),G=uu(),I=G.scenes,oe=G.presenters,W=ed(),J=td(),{push:Z}=hr(),ee=s.filter(fe=>fe.available),[q,H]=Za(ir.engine,Fc);r.useEffect(()=>{const fe=iF(ee,q);fe!==q&&H(fe)},[ee,q,H]);const K=ee.length===0&&s.some(fe=>fe.code==="not-installed"||fe.code==="not-authenticated"),X=ee.length===0,U=X?K?{icon:o.jsx(Yw,{}),title:"Image generation is not set up yet",detail:"About a minute, using the ChatGPT account you already have.",action:"Set up",onAct:()=>J(),info:!0}:{icon:o.jsx(u1,{size:15}),title:"No image provider connected",detail:"Add a provider key and this brief is ready to run.",action:"Open settings",onAct:()=>W("engines"),info:!1}:null,[L,O]=r.useState(ss()),[ne,re]=r.useState(void 0),[le,ae,me]=p2(ir.format,"square"),[he,de]=r.useState({}),[be,Te,Ue]=p2(ir.count,2),[ge,st]=r.useState(!1),[ht,Rt]=r.useState(null),[Pe,Ae]=r.useState(null),[Se,at]=r.useState(!1),[kt,qt]=r.useState("All"),[Xt,Zt,yn]=p2(ir.quality,"standard"),[Rn,Gn]=r.useState(!1),[Pn,Ot]=r.useState(!1),tt=r.useRef(null),Qe=r.useRef(null),Ut=r.useRef(null),Vt=r.useRef({tokens:L,tplFields:he,branchId:(C==null?void 0:C.id)??null});Vt.current={tokens:L,tplFields:he,branchId:(C==null?void 0:C.id)??null};const z=r.useRef(null),ue=r.useRef(null),xe=r.useRef(void 0),Ne=r.useRef(void 0),Ye=r.useRef(void 0),it=r.useCallback(fe=>{if(ue.current&&(clearTimeout(ue.current),ue.current=null),!A)return;const Xe=Vt.current;tv(Xe.tokens,Xe.tplFields,Xe.branchId)?A9(fe,{...Xe,setSlug:k}):nv(fe)},[k,A]);r.useEffect(()=>{v&&(qt(v),at(!0))},[v]),r.useEffect(()=>{if(!u)return;const fe=(u.tokens??[]).find(Xe=>Xe.t==="format");fe&&me(fe.id),u.variants&&Ue(u.variants),u.quality&&yn(u.quality),re(u9(u)),de(u.templateFields??{})},[u]),r.useEffect(()=>{var St,Jt;const fe=z.current;fe&&fe!==n.id&&it(fe);const Xe=!!u||!!f||!A;let et=null,ut=null,De=null;if(!Xe){const pt=I_(n.id);pt&&tv(pt.tokens,pt.tplFields,pt.branchId)&&(et=pt.tokens,ut=pt.tplFields,De=pt.branchId)}if(h&&h!==xe.current){xe.current=h;const pt=et??ss(),jn=pt.find(Tn=>Tn.t==="template"),gn=(jn==null?void 0:jn.id)??null,Nt=De,Yn=((St=I.find(Tn=>Tn.id===h))==null?void 0:St.name)??"this scene",Mr=Nt?c.find(Tn=>Tn.id===Nt):null,sa=rv(gn,h,Yn,Nt,Mr?Cn(Mr):null);if(sa.changed&&(et=[{t:"template",id:h},...pt.filter(Tn=>Tn.t!=="template")],(Jt=sa.toast)!=null&&Jt.branchWasCleared&&(De=null),sa.toast)){const Tn=sa.toast;Z({kind:"success",title:Tn.title,action:{label:"Undo",onClick:()=>{var _,ie;Tn.prevSceneId?(_=tt.current)==null||_.insert({t:"template",id:Tn.prevSceneId}):(ie=tt.current)==null||ie.removeTemplate(),Tn.branchWasCleared&&Nt&&(j==null||j(Nt))}}})}}if(m&&m!==Ne.current){Ne.current=m;const pt=et??ss();pt.some(gn=>gn.t==="character"&&gn.id===m)||(et=[...pt,{t:"character",id:m}])}if(g&&g!==Ye.current){Ye.current=g;const pt=et??ss();pt.some(gn=>gn.t==="product"&&gn.id===g)||(et=[...pt,{t:"product",id:g}])}et&&(re(et),de(ut??{}),De&&(j==null||j(De))),z.current=n.id},[n.id,h,m,g]),r.useEffect(()=>{var fe;ne&&((fe=tt.current)==null||fe.setTokens(ne),re(void 0))},[ne]);const _t=r.useMemo(()=>{var De;const fe=_r.find(St=>St.id===le)??_r[0],et=(((De=Us.find(St=>St.id===Xt))==null?void 0:De.edge)??1024)/Math.max(fe.w,fe.h),ut=St=>Math.max(256,Math.round(St*et/8)*8);return{t:"format",id:fe.id,w:ut(fe.w),h:ut(fe.h)}},[le,Xt]),At=r.useMemo(()=>[_t,...L],[_t,L]),bt=r.useMemo(()=>({tokens:At,templateFields:he,variants:be,quality:Xt,format:le}),[At,he,be,Xt,le]),Sn=L.some(fe=>fe.t==="text"?!!fe.v.trim():!0),Ct=r.useMemo(()=>{const fe=L.find(Xe=>Xe.t==="template");return fe?I.find(Xe=>Xe.id===fe.id)??null:null},[L,I]),Nr=r.useMemo(()=>{const fe=L.find(Xe=>Xe.t==="template");return(fe==null?void 0:fe.id)??null},[L]),mr=r.useCallback(fe=>{var St,Jt;const Xe=(Ct==null?void 0:Ct.id)??null,et=(C==null?void 0:C.id)??null,ut=((St=I.find(pt=>pt.id===fe))==null?void 0:St.name)??"this scene",De=rv(Xe,fe,ut,et,C?Cn(C):null);if(De.changed&&((Jt=tt.current)==null||Jt.insert({t:"template",id:fe}),De.toast)){const pt=De.toast;Z({kind:"success",title:pt.title,action:{label:"Undo",onClick:()=>{var jn,gn;pt.prevSceneId?(jn=tt.current)==null||jn.insert({t:"template",id:pt.prevSceneId}):(gn=tt.current)==null||gn.removeTemplate(),pt.branchWasCleared&&et&&(j==null||j(et))}}})}},[Ct,C,I,Z,j]);r.useImperativeHandle(M,()=>({insertToken:fe=>{var Xe;return(Xe=tt.current)==null?void 0:Xe.insert(fe)},applyScene:fe=>mr(fe),openAttach:fe=>Dt(fe),focus:()=>{var fe;return(fe=tt.current)==null?void 0:fe.focus()},submit:()=>{rn()}}));const ct=r.useMemo(()=>__(L),[L]),jt=Z_(ct),Qt=r.useRef(ct);Qt.current=ct,r.useEffect(()=>{b==null||b(Qt.current)},[jt,b]),r.useEffect(()=>{var fe;!P||!Nr||Ct||((fe=tt.current)==null||fe.removeTemplate(),Z({kind:"error",title:"That scene is no longer available.",detail:"Starting from scratch."}))},[P,Nr,Ct,Z]);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)}),[L,he,C==null?void 0:C.id,n.id,it]),r.useEffect(()=>()=>it(z.current??n.id),[it]),r.useEffect(()=>{const fe=()=>it(z.current??n.id);return window.addEventListener("beforeunload",fe),()=>window.removeEventListener("beforeunload",fe)},[it,n.id]);const Tt=s.find(fe=>fe.id===q),rr=Tt?Gs(Tt.displayName):"This engine",F=!!C&&C.kind!=="root"&&C.status==="running",V=C&&C.kind!=="root"&&C.status==="done"&&C.images.length>0||F,Q=!!(Tt!=null&&Tt.supportsEdit),ve=!!C&&!!((Kn=C.brief)!=null&&Kn.format)&&C.brief.format!==le&&V&&Q&&!Ct,Me=V&&Q&&!Ct?"edit":"generation",Ze=V?Ct?"A scene starts a new shot.":ve?"Expands this shot into the new shape. What is already in the picture stays exactly as it is.":Q?F?"Still rendering. This can be refined the moment it lands.":null:`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot edit. This makes a new shot.`:null,ot=r.useMemo(()=>{const fe=_r.find(St=>St.id===le)??_r[0],Xe=`Aspect ${fe.label} ${fe.hint}`;if(Me==="edit")return Xe;const et=Us.find(St=>St.id===Xt),ut=jp(q),De=ut==="ratio"||!et?null:ut==="advisory"?`${et.label}, asking for ${et.edge} px`:`${et.label} ${et.edge} px`;return[Xe,`${be} variants`,De&&`resolution ${De}`].filter(Boolean).join(", ")},[Me,le,be,Xt,q]);r.useEffect(()=>{Ct&&V&&E&&E()},[Ct,V,E]);const ke=(Pe==null?void 0:Pe.warnings.filter(fe=>fe.includes("built around a product")))??[],Oe=!ge&&Sn&&!!t&&!F&&!X,qe=X?"Image generation is not set up yet":ge?"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",_e=fe=>{var Xe;ae(fe),(Xe=tt.current)==null||Xe.focus()},Le=fe=>{var Xe;Zt(fe),(Xe=tt.current)==null||Xe.focus()},dt=fe=>{var Xe;Te(fe),(Xe=tt.current)==null||Xe.focus()},vt=fe=>{var Xe;fe.preventDefault(),(Xe=tt.current)==null||Xe.focus()},Dt=fe=>{qt(fe),at(!0)},$t=async fe=>{var et;if(!(fe!=null&&fe.length))return;const Xe=Array.from(fe).filter(ut=>ut.type.startsWith("image/"));if(!Xe.length){Z({kind:"error",title:"Only images can be attached here"});return}Gn(!0),Rt(null);try{for(const ut of Xe.slice(0,4)){const De=await ww(ut);(et=tt.current)==null||et.insert({t:"ref",imageHash:De})}}catch(ut){Rt(String(ut.message??ut)),Z(dn(ut,"Could not attach that image"))}finally{Gn(!1),Ut.current&&(Ut.current.value="")}},yt=Ct?ke.length>0?"This scene builds around a product. Attach one.":(Pe==null?void 0:Pe.warnings.some(fe=>fe.includes("built around a person")))??!1?"This scene builds around a person. Attach a presenter.":null:null,mt=fe=>{var Xe;if(fe.t==="template")return yt;if(!Pe)return null;if(fe.t==="ref"&&!Pe.attachments.some(et=>et.hash===fe.imageHash))return`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot read this reference, so it is left out.`;if(fe.t==="product"){const ut=(T.length?T:((Xe=n.json)==null?void 0:Xe.products)??[]).find(De=>De.id===fe.id)??D.find(De=>De.id===fe.id);if(ut&&!Pe.attachments.some(De=>De.role==="product"&&De.id===ut.id))return`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot read the product image, so ${ut.name} rides as text only.`}if(fe.t==="character"){const et=oe.find(ut=>ut.id===fe.id);if(et&&!Pe.attachments.some(ut=>ut.role==="character"&&ut.id===et.id))return`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot read the person reference, so ${et.name} rides as text only.`}return null},rn=async()=>{var Xe,et;if(!Oe)return;st(!0),Rt(null);const fe=L.flatMap(ut=>ut.t==="text"?[ut.v]:[]).join(" ").replace(/\s+/g," ").trim();w==null||w(fe||"Your shot");try{if(!t)throw new Error("the workspace is still loading");const ut=await Ce.addNode({projectId:t,parentId:Me==="edit"&&C?C.id:(i==null?void 0:i.id)??null,kind:Me,engineId:q,count:be,brief:bt,...Me==="edit"&&N?{sourceImage:N}:{}}),De=(Xe=ut.warnings)==null?void 0:Xe[0];De&&Z({kind:"success",title:"Sent, with one thing to know",detail:De}),(et=tt.current)==null||et.setTokens(ss()),de({}),me(null),Ue(null),yn(null),A&&nv(n.id),y(ut.id,Me)}catch(ut){const De=String(ut.message??ut);Rt(De),Z({kind:"error",title:"That did not send",detail:De}),w==null||w(null)}finally{st(!1)}},On=(Ln=L.find(fe=>fe.t==="product"))==null?void 0:Ln.id,Vn=On?T.find(fe=>fe.id===On)??(((xn=n.json)==null?void 0:xn.products)??[]).find(fe=>fe.id===On)??D.find(fe=>fe.id===On)??null:null,pn=Vn?pp(Vn):null;return o.jsxs("div",{className:"sc-composer",children:[o.jsx("input",{ref:Ut,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:fe=>void $t(fe.target.files)}),Se&&o.jsx(A_,{brand:n,activeProductCategory:pn,shots:c,initialTab:kt,onUpload:()=>{var fe;return(fe=Ut.current)==null?void 0:fe.click()},onToken:fe=>{var Xe;return(Xe=tt.current)==null?void 0:Xe.insert(fe)},onTemplate:fe=>mr(fe),onClose:()=>at(!1)}),U&&o.jsx("div",{className:"sc-notes",children:U&&o.jsxs("div",{className:"sc-banner","data-tone":"action",children:[o.jsx("span",{className:"sc-banner-ic",children:U.icon}),o.jsxs("span",{className:"sc-banner-txt",children:[o.jsx("b",{children:U.title}),o.jsxs("small",{children:[U.detail,U.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(np,{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:()=>W("engines"),children:"Use a provider key instead"})]})]})]})]}),o.jsx("button",{type:"button",className:"sc-banner-act","data-primary":"",onClick:U.onAct,children:U.action})]})}),o.jsxs("div",{className:"sc-promptcard",children:[V&&E&&o.jsxs("div",{className:"sc-target","data-note":Ze?"":void 0,children:[o.jsxs("span",{className:"sc-target-lb",children:["Refining",C.images[0]?o.jsx("img",{src:tn(C.images[0]),alt:""}):o.jsx("span",{className:"sc-target-thumb sc-shimmer"}),o.jsx("b",{dir:"auto",children:Cn(C)})]}),Ze&&o.jsx("small",{className:"sc-target-note",children:Ze}),o.jsx("button",{type:"button",className:"sc-target-x",onClick:E,"aria-label":"Make a new shot instead",children:o.jsx(Mn,{size:12})})]}),V&&!E&&Ze&&o.jsx("small",{className:"sc-target-note sc-target-note-alone",children:Ze}),o.jsx(w_,{ref:tt,onChange:O,brand:n,shots:c,templates:I,presenters:oe,demoProducts:D,onTemplatePick:mr,flag:mt,onAttachRequest:fe=>Dt(fe),activeProductCategory:pn,placeholder:Ct?"Add art direction, or run it as written":Me==="edit"?"Say what to change about this shot":"What should we shoot? (use $ / @ #)",placeholderSm:Ct||Me==="edit"?void 0:"What should we shoot? ($ / @ #)",onSubmit:()=>void rn(),onDropFiles:fe=>void $t(fe)}),o.jsx(N_,{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":Se,"aria-label":"Attach",title:"Attach a product, a scene, a colour or an image",onClick:()=>Se?at(!1):Dt("All"),children:Rn?o.jsx(on,{size:"1"}):o.jsx(nr,{size:16})}),ee.length>1&&o.jsxs(K5,{value:q,onValueChange:H,children:[o.jsxs(Y5,{variant:"ghost",className:"sc-mini-sel",children:[o.jsx(u1,{size:14}),o.jsx("span",{className:"sc-mini-sel-t",children:Tt?Gs(Tt.displayName):"Demo"})]}),o.jsx(q5,{children:ee.map(fe=>o.jsx(X5,{value:fe.id,children:Gs(fe.displayName)},fe.id))})]})]}),o.jsxs("div",{className:"sc-prompt-right",children:[o.jsx(T_,{mode:Me,engineId:q,engineName:rr,formatId:le,onFormat:_e,count:be,onCount:dt,quality:Xt,onQuality:Le,onCloseAutoFocus:vt}),o.jsxs(ti,{open:Pn,onOpenChange:Ot,children:[o.jsx(ni,{children:o.jsxs("button",{type:"button",className:"sc-var sc-more","aria-label":`Shot settings. ${ot}`,children:[o.jsx(tw,{size:14}),"More"]})}),o.jsx(ri,{className:"sc-morepop",align:"end",sideOffset:8,width:"300px",onOpenAutoFocus:kp,onCloseAutoFocus:vt,children:o.jsx(k9,{mode:Me,engineId:q,engineName:rr,formatId:le,onFormat:_e,count:be,onCount:dt,quality:Xt,onQuality:Le})})]}),o.jsx(H_,{mode:Me,engineId:q,engineName:rr,formatId:le,onFormat:_e,count:be,onCount:dt,quality:Xt,onQuality:Le}),o.jsxs("button",{type:"button",className:"sc-send","aria-disabled":!Oe||void 0,onClick:()=>void rn(),"aria-label":Me==="edit"?"Refine":"Generate",title:ht??yt??qe??`${Me==="edit"?"Refine":"Generate"} (enter)`,children:[o.jsx("span",{className:"sc-send-ico",children:ge?o.jsx(on,{size:"1"}):o.jsx(wH,{size:17,weight:"bold"})}),o.jsx("span",{className:"sc-send-lb",children:Me==="edit"?"Refine":"Generate"})]})]})]})]})]})});function M9({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 du({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[b,C]=r.useState(!1),[E,N]=r.useState(!1),j=r.useRef(null),[k,A]=r.useState(!1);r.useEffect(()=>{const oe=window.matchMedia("(hover: none)"),W=()=>A(oe.matches);return W(),oe.addEventListener("change",W),()=>oe.removeEventListener("change",W)},[]);const M=u==="use"&&!!f&&!!h;r.useEffect(()=>{if(!E)return;const oe=W=>{var J;(J=j.current)!=null&&J.contains(W.target)||N(!1)};return document.addEventListener("pointerdown",oe),()=>document.removeEventListener("pointerdown",oe)},[E]);const T=t&&!b?o.jsx("img",{src:t,alt:"",loading:"lazy",onError:()=>C(!0)}):o.jsx("span",{className:"sc-lookcard-blank",children:o.jsx(Ga,{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(ya,{size:11,weight:"bold"})})]}),D]});const P=()=>{if(M&&k){if(!E){N(!0);return}N(!1)}f?f(e):h==null||h(e)},G=()=>{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":E||void 0,children:[o.jsxs("div",{className:"sc-lookcard-media",children:[o.jsxs("button",{type:"button",className:"sc-lookcard-open",onClick:P,"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:G,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:oe=>{oe.stopPropagation(),y(e)},children:o.jsx(Y1,{size:13,weight:v?"fill":"regular"})})]}),D]});return!f&&!h||k?I:o.jsxs(Gm,{children:[o.jsx(Km,{children:I}),o.jsxs(Ym,{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 id({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 V_={presenter:"Presenter",product:"Product",scene:"Scene"};function R9({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:b,hideRecipe:C,decorative:E,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":b||void 0,"aria-hidden":E||void 0,...E?{inert:""}:{},children:[o.jsx(du,{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(B_,{presenter:k,product:A,scene:M})]})}function z_(e){return o.jsx(id,{...e})}function B_({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(ov,{credit:e,open:s==="presenter",onEnter:()=>i("presenter"),children:W_(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(ov,{credit:m,open:s===m.key,onEnter:()=>i(m.key),style:h(),children:U_({credit:m,step:g===0?1:2})})]},m.key))]})]})}function ov({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=lI(),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 b=requestAnimationFrame(w),C=c.current,E=C?new ResizeObserver(w):null;return C&&E&&E.observe(C),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{cancelAnimationFrame(b),E==null||E.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=V_[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 P9(e,t){e.stopPropagation(),e.preventDefault(),t==null||t()}function U_({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=>P9(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 W_(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=>P9(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 y1({presenter:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){return o.jsx(du,{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 L9(e){return o.jsx(id,{...e})}function Ic({scene:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,bookmarked:u,onBookmark:f,size:h="grid"}){return o.jsx(du,{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 T9(e){return o.jsx(id,{...e})}const lv=new Map,G_=1e3;function ur({className:e="sc-home",children:t}){const n=r.useRef(null),{key:s}=ln(),i=r.useRef(!1);return r.useLayoutEffect(()=>{const c=n.current,u=lv.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,G_);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||lv.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 cd({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 D0(e,t){return t===null?e===null:e===t}function H9({"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},b=()=>{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 P=72,G=v.scrollLeft,I=G+v.clientWidth,oe=T[D-1],W=T[D+1],J=W?W.offsetLeft+Math.min(P,W.offsetWidth):A.offsetLeft+A.offsetWidth+8,Z=oe?Math.max(0,oe.offsetLeft+oe.offsetWidth-P):Math.max(0,A.offsetLeft-8);let ee=G;if(J>I)ee=Math.min(M,J-v.clientWidth);else if(Z<G)ee=Z;else return;if(Math.abs(ee-G)<1)return;const q=window.matchMedia("(prefers-reduced-motion: reduce)").matches;v.scrollTo({left:ee,behavior:q?"auto":"smooth"})},E=w();E&&C(E),b(),v.dataset.inkReady||requestAnimationFrame(()=>{v.dataset.inkReady=""});const N=()=>{y||(y=requestAnimationFrame(()=>{y=0,b()}))},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,b())},k=new ResizeObserver(()=>{w(),b()});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=>{D0(t,g)||s(g)},h=g=>{var b;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=>D0(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=(b=c.current)==null?void 0:b.querySelectorAll(":scope > button")[y];w==null||w.focus()},m=n.findIndex(g=>D0(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=D0(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 ud({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(H9,{"aria-label":t.label,activeKey:t.selected,items:n,onSelect:t.onSelect})}function fu({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(Hc,{size:16})}),o.jsxs("div",{className:"sc-libsearch-field",children:[o.jsx(Hc,{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 dd({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 K_=150;function hu(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})},K_)},[u,v]),w=r.useCallback((j,k)=>u({[j]:k}),[u]),b=u,C=f.trim().length>0||Object.values(c).some(Boolean),E=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:b,active:C,clearSearch:E,clear:N}}const Y_=8;function q_(){var Rt;const{engines:e,scenes:t,loaded:n,presenters:s,presentersLoaded:i,demoProducts:c,showcase:u,showcaseCategories:f,showcaseLoaded:h,showcaseError:m,refetchShowcase:g}=mn(),{brand:v,workspace:y,nodes:w,products:b}=It(),C=ol(),E=nn(),{push:N}=hr(),j=bp(),k=Ep(),A=XF(),M=lo(bi),{q:T,setQ:D,facets:P,setFacet:G,clearSearch:I,clear:oe}=hu(["category"]),W=P.category,J=Pe=>G("category",Pe),Z=T.trim().length>0,[ee,q]=Za(ir.wallDensity,zo),H=ll(ee),K=Pe=>q(Pe),X=od(H),U=iu(H),L=Pe=>{const Ae=new URLSearchParams(Pe??{}).toString();E(`${cr(v)}${Ae?`?${Ae}`:""}`)},O=b.length?b:((Rt=v.json)==null?void 0:Rt.products)??[],ne=Pe=>{var kt,qt,Xt;const Ae=(kt=Pe.brief.tokens.find(Zt=>Zt.t==="product"))==null?void 0:kt.id,Se=(qt=Pe.brief.tokens.find(Zt=>Zt.t==="character"))==null?void 0:qt.id,at=(Xt=Pe.brief.tokens.find(Zt=>Zt.t==="template"))==null?void 0:Xt.id;return{product:Ae?c.find(Zt=>Zt.id===Ae):void 0,presenter:Se?s.find(Zt=>Zt.id===Se):void 0,scene:at?t.find(Zt=>Zt.id===at):void 0}},re=r.useMemo(()=>{const Pe=new Map;for(const Ae of u){const{product:Se,presenter:at,scene:kt}=ne(Ae);Pe.set(Ae.id,qF(Ae,{product:Se,presenter:at,scene:kt},j2(Ae.category)))}return Pe},[u,c,s,t]),le=r.useMemo(()=>(W?u.filter(Ae=>Ae.category===W):u).filter(Ae=>ba(re.get(Ae.id)??Ae.title,T)),[u,W,T,re]),ae=r.useMemo(()=>{const Pe=nI(f);return{key:"category",label:"Categories",everyLabel:"All examples",everyCount:u.length,selected:W,onSelect:J,options:Pe.map(Ae=>({value:Ae,label:j2(Ae)??Ae,count:u.filter(Se=>Se.category===Ae).length}))}},[u,f,W,J]),me=Pe=>{const{product:Ae,presenter:Se,scene:at}=ne(Pe);return{productName:Ae?Oa(Ae,"chip"):null,productPreviewUrl:(Ae==null?void 0:Ae.previewUrl)??null,productId:(Ae==null?void 0:Ae.id)??null,presenterName:(Se==null?void 0:Se.name)??null,presenterPreviewUrl:(Se==null?void 0:Se.avatarUrl)??(Se==null?void 0:Se.previewUrl)??null,presenterId:(Se==null?void 0:Se.id)??null,sceneName:at?to(at,"chip"):null,scenePreviewUrl:(at==null?void 0:at.previewUrl)??null,sceneId:(at==null?void 0:at.id)??null}},[he,de]=r.useState(null),Te=M?A:Pe=>{const Ae=u.find(Se=>Se.id===Pe);Ae&&(de(kh(Ae)),N({kind:"success",title:`Starting from "${Ae.title}"`}))},Ue=w.find(Pe=>Pe.kind==="root")??null,ge=()=>{var Se;const Ae=[...Va(v.id)].reverse().find(at=>t.some(kt=>kt.id===at))??((Se=t[0])==null?void 0:Se.id);L(Ae?{scene:Ae,attach:"products",compose:"1"}:{attach:"products",compose:"1"})},st=r.useMemo(()=>{const Pe=Va(v.id);return w9(t,Ae=>Pe.includes(Ae.id)).slice(0,8)},[t,v.id]),ht=r.useMemo(()=>{var Xt,Zt,yn,Rn,Gn,Pn,Ot,tt;const Pe=new Set,Ae=Qe=>!Qe||Pe.has(Qe)?null:(Pe.add(Qe),Qe),Se=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||Pe.has(Ut.previewUrl))&&!(Qe&&!Ut.brief.tokens.some(Vt=>Vt.t===Qe)))return Ae(Ut.previewUrl);return null},qt=O.find(Qe=>{var Ut,Vt;return Zn((Vt=(Ut=Qe==null?void 0:Qe.shots)==null?void 0:Ut[0])==null?void 0:Vt.file)});return{compose:Ae(qt?Zn((Zt=(Xt=qt.shots)==null?void 0:Xt[0])==null?void 0:Zt.file):null)??Se(["aurelia-serum-succulent-dew","verity-pearls-suspended-silk","solstice-aviators-screen-print"])??Ae((yn=c.find(Qe=>Qe.id==="aurelia-amber-serum"))==null?void 0:yn.previewUrl)??Ae((Rn=c.find(Qe=>Qe.previewUrl))==null?void 0:Rn.previewUrl)??kt("product"),product:Se(["voss-rowe-runner-volcanic-ash","birchwood-salt-flat","voss-rowe-dune-slip-face"])??Ae((Gn=c.find(Qe=>Qe.id==="voss-rowe-trail-runner"))==null?void 0:Gn.previewUrl)??kt("product"),presenter:Ae((Pn=s.find(Qe=>Qe.id==="maren"))==null?void 0:Pn.avatarUrl)??Ae((Ot=s.find(Qe=>Qe.avatarUrl))==null?void 0:Ot.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"])??Se(["moss-larkin-chair-travertine-atrium","calder-snow-loft","basalt-snells-window"])??kt("template")}},[t,s,O,c,u]);return o.jsxs(ur,{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:ge,children:[o.jsx(D9,{thumbUrl:ht.compose,fallback:o.jsx(yH,{size:22,weight:"fill"})}),o.jsx("b",{children:"Create an image"})]}),o.jsx(H2,{tone:"product",title:"Add a product",count:O.length,thumbUrl:ht.product,icon:o.jsx(rp,{size:22,weight:"fill"}),onClick:()=>C("product")}),o.jsx(H2,{tone:"presenter",title:"Create a presenter",thumbUrl:ht.presenter,icon:o.jsx(BH,{size:22,weight:"fill"}),onClick:()=>C("presenter")}),o.jsx(H2,{tone:"scene",title:"Create a scene",thumbUrl:ht.scene,icon:o.jsx(HH,{size:22,weight:"fill"}),onClick:()=>C("scene")})]}),!h&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":U,style:X,"aria-hidden":!0,children:o.jsx(z_,{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(cd,{filters:o.jsx(ud,{mode:"tabs",group:ae}),search:u.length>=Y_&&o.jsx(fu,{value:T,onChange:D,noun:"examples",total:u.length}),density:o.jsx(sd,{value:H,onChange:K})}),le.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":U,style:X,children:le.map(Pe=>o.jsx(R9,{entry:Pe,size:"grid",onOpen:Te,onOpenProduct:Ae=>E(Js(v,Ae)),onOpenPresenter:Ae=>E(al(v,Ae)),onOpenScene:Ae=>E(rl(v,Ae)),...me(Pe)},Pe.id))}),le.length===0&&(Z?o.jsx(dd,{noun:"examples",q:T,facet:W?j2(W):null,onClearSearch:I,onClearAll:oe}):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(L9,{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:()=>E(vc(v)),children:"Browse presenters"})]}),o.jsx("div",{className:"sc-masonry",children:s.slice(0,8).map(Pe=>o.jsx(y1,{presenter:Pe,variant:"navigate",size:"grid",onOpen:j},Pe.id))})]}),!n&&o.jsx("div",{className:"sc-masonry","aria-hidden":!0,children:o.jsx(T9,{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:()=>E(gc(v)),children:"Browse scenes"})]}),o.jsx("div",{className:"sc-masonry",children:st.map(Pe=>o.jsx(Ic,{scene:Pe,variant:"navigate",size:"grid",onOpen:k},Pe.id))})]})]}),!M&&o.jsx(M9,{children:o.jsx(Ap,{projectId:(y==null?void 0:y.id)||null,brand:v,engines:e,parent:Ue,shots:w,initialBrief:he,onQueued:()=>E(cr(v))})})]})}function H2({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(D9,{thumbUrl:i,fallback:n}),o.jsxs("b",{children:[t,s?o.jsx(T5,{variant:"soft",radius:"full",size:"1",children:s}):null]})]})}function D9({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 $9({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:tn(e.previewHash),alt:""}):o.jsx("span",{className:"sc-lookcard-blank",children:i?null:o.jsx(on,{})}),!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(Jm,{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 Np({label:e}){return o.jsx("div",{className:"sc-starter-rule",children:o.jsx("span",{children:e})})}const D2=60;function Mp(e,t){const[n,s]=r.useState(D2);r.useEffect(()=>{s(D2)},[t]);const{visible:i,remaining:c}=x9(e,n);return{visible:i,remaining:c,showMore:()=>s(f=>f+D2)}}const X_=8,$2="__bookmarked";function Q_(){const{scenes:e,collections:t,verticals:n,loaded:s,error:i,refetch:c}=mn(),{brand:u}=It(),f=nn(),[h,m]=r.useState(()=>Va(u.id)),g=Se=>m(s9(u.id,Se)),v=Ep(),{builds:y,poke:w}=sl(),b=ol(),C=r.useMemo(()=>lu(u),[u]),E=y.filter(Se=>Se.kind==="scene"&&(!Se.finished||Se.stage==="failed")),{q:N,setQ:j,facets:k,setFacets:A,clearSearch:M,clear:T}=hu(["vertical","bookmarked"]),D=k.vertical,P=k.bookmarked==="1",G=N.trim().length>0,[I,oe]=Za(ir.wallDensity,zo),W=ll(I),J=Se=>oe(Se),Z=od(W),ee=iu(W),q=Se=>f(rl(u,Se)),H=r.useMemo(()=>P?e.filter(Se=>h.includes(Se.id)):D?e.filter(Se=>Se.verticals.includes(D)):e,[e,D,P,h]),X=!(C.length>0||E.length>0),U=e.reduce((Se,at)=>Se+(h.includes(at.id)?1:0),0),L=P&&U===0,O=L&&X,ne=L&&!X,re=G||P&&!O,le=r.useMemo(()=>O?e:H,[O,e,H]),ae=r.useMemo(()=>le.filter(Se=>ba(h1(Se),N)),[le,N]),{visible:me,remaining:he,showMore:de}=Mp(ae,`${D??""}|${P?"bookmarked":""}|${O?"browse":""}|${N}`),be=Se=>[...C,...e].filter(at=>!at.verticals.length||at.verticals.includes(Se)).length,Te=[{value:$2,label:"Bookmarks",count:U},...n.map(Se=>({value:Se,label:Se,count:be(Se)}))],Ue=e.length>0?"tabs":"none",ge={key:"vertical",label:"Vertical",everyLabel:"Every scene",everyCount:e.length+C.length,selected:P?$2:D,onSelect:Se=>A(Se===$2?{bookmarked:"1",vertical:null}:{bookmarked:null,vertical:Se}),options:Te},st=r.useMemo(()=>C.filter(Se=>D?!Se.verticals.length||Se.verticals.includes(D):!0).filter(Se=>ba(h1(Se),N)),[C,D,N]),ht=!P&&(E.length>0||st.length>0),Rt=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>b("scene"),children:[o.jsx(nr,{size:12})," Create scene"]}),Pe=(Se,at=!1)=>o.jsx("div",{className:"sc-masonry","data-wall":at||void 0,"data-density":!0,"data-density-size":ee,style:Z,children:Se.map(kt=>o.jsx(Ic,{scene:kt,variant:"use",size:"grid",onOpen:q,onUse:v,bookmarked:h.includes(kt.id),onBookmark:g},kt.id))}),Ae=o.jsx(cd,{title:"Scenes",filters:o.jsx(ud,{mode:Ue,group:ge}),density:o.jsx(sd,{value:W,onChange:J}),search:e.length>=X_&&o.jsx(fu,{value:N,onChange:j,noun:"scenes",total:e.length}),action:X?void 0:Rt});return o.jsx(ur,{children:o.jsxs("main",{className:"sc-looks sc-scenes",id:"main","data-hero":X||void 0,children:[!X&&Ae,ht&&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":ee,style:Z,children:[E.map(Se=>o.jsx($9,{build:Se,onCancel:at=>void Ce.cancelAssetBuild(u.id,at).then(w),onDismiss:at=>void Ce.deleteAssetBuild(u.id,at).then(w),onRetry:()=>b("scene")},Se.id)),st.map(Se=>o.jsx(Ic,{scene:Se,variant:"use",size:"grid",onOpen:q,onUse:v},Se.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:Rt}),ht&&s&&!i&&!P&&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(Np,{label:"Or start from one of ours"}),Ae]}),!s&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":ee,style:Z,"aria-hidden":!0,children:o.jsx(T9,{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&&!re&&t.map(Se=>{const at=le.filter(kt=>kt.collections.includes(Se));return at.length?o.jsxs("section",{className:"sc-coll",children:[o.jsx("h2",{children:Se}),Pe(at)]},Se):null}),s&&!i&&re&&me.length>0&&Pe(me,!0),s&&!i&&ne&&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&&!ne&&ae.length===0&&st.length===0&&o.jsx(dd,{noun:"scenes",q:N,facet:O?null:P?"Bookmarks":D,onClearSearch:M,onClearAll:T}),re&&he>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:de,children:["Show ",Math.min(he,60)," more"]})})]})})}function x1({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(Ga,{size:20})}):o.jsx("img",{src:e,alt:"",loading:"lazy",onError:()=>n(!0)})})}function F9(){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(Ga,{size:20})})})})}function Rp({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(Ga,{size:20})}):o.jsx("img",{src:tn(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 b=C=>{const E=Math.min(1,(C-w)/420);h.scrollLeft=v+y*(1-(1-E)**3),c.current(),E<1?requestAnimationFrame(b):(i.current=!1,h.scrollLeft>=g&&(h.scrollLeft-=g),c.current())};requestAnimationFrame(b)};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(q1,{size:13,weight:"bold"})}),o.jsxs("div",{className:"sc-slider-track",ref:s,children:[t,t]})]})]})}const J_="(max-width: 760px)";function eZ(){const{sceneId:e=""}=Ba(),{scenes:t,loaded:n,error:s,refetch:i,applyBrand:c}=mn(),{brand:u,nodes:f}=It(),h=nn(),m=Ep(),g=u.id,[v,y]=r.useState([]),[w,b]=r.useState(()=>Va(g)),[C,E]=Zs("all"),N=C==="1",k=lo(J_)?4:3,A=ge=>h(rl(u,ge)),M=UD(u,e),T=M??t.find(ge=>ge.id===e);J1(T==null?void 0:T.name);const D=!!M;r.useEffect(()=>{let ge=!0;if(y([]),!D)return Ce.sceneFrames(e).then(st=>{ge&&y(st.frames)}).catch(()=>{ge&&y([])}),()=>{ge=!1}},[e,D]);const P=r.useMemo(()=>f.filter(ge=>{var st;return ge.status==="done"&&ge.images.length>0&&(((st=ge.brief)==null?void 0:st.tokens)??[]).some(ht=>(ht==null?void 0:ht.t)==="template"&&ht.id===e)}).slice(-12).reverse(),[f,e]),G=r.useMemo(()=>{if(!T)return[];return t.filter(ht=>ht.id!==T.id).sort((ht,Rt)=>st(Rt)-st(ht)).slice(0,8);function st(ht){const Rt=ht.lighting.split(/[ ,]+/).some(Ae=>Ae.length>3&&T.lighting.toLowerCase().includes(Ae.toLowerCase())),Pe=ht.collections.some(Ae=>T.collections.includes(Ae));return(Rt?2:0)+(Pe?1:0)}},[t,T]),I=r.useMemo(()=>{if(T||!n||s)return[];const ge=Va(g);return w9(t,st=>ge.includes(st.id)).slice(0,6)},[T,n,s,t,g]),[oe,W]=r.useState((M==null?void 0:M.name)??""),[J,Z]=r.useState((M==null?void 0:M.description)??""),[ee,q]=r.useState((M==null?void 0:M.lighting)??""),[H,K]=r.useState((M==null?void 0:M.prompt)??""),[X,U]=r.useState(null),[L,O]=r.useState(!1),[ne,re]=r.useState(!1),le=r.useRef(void 0);r.useEffect(()=>{W((M==null?void 0:M.name)??""),Z((M==null?void 0:M.description)??""),q((M==null?void 0:M.lighting)??""),K((M==null?void 0:M.prompt)??"")},[M==null?void 0:M.id]);const ae=ge=>{M&&(le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{Ce.updateScene(u.id,M.id,ge).then(st=>{c(st.brand),U(st.warnings[0]??null)}).catch(st=>U(String(st.message??st)))},500))},me=async()=>{if(M){O(!0),U(null);try{c((await Ce.generateScenePreview(u.id,M.id)).brand)}catch(ge){U(String(ge.message??ge))}finally{O(!1)}}},he=async()=>{if(M){re(!0);try{await Ce.deleteScene(u.id,M.id),h(gc(u))}catch(ge){U(String(ge.message??ge)),re(!1)}}};if(!n&&!M)return o.jsx(ur,{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(ur,{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(ur,{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(`${cr(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"})]}),I.length>0&&o.jsx(To,{label:"You might like",children:I.map(ge=>o.jsx(Ic,{scene:ge,variant:"navigate",size:"slider",onOpen:A},ge.id))})]})});const de=N?v:v.slice(0,k),be=M?M.previewUrl?[M.previewUrl]:[]:v.length?de:T.previewUrl?[T.previewUrl]:[],Te=!M&&T.subject!=="person"&&be.length>0,Ue=w.includes(T.id);return o.jsx(ur,{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:oe,"aria-label":"Scene name",onChange:ge=>{W(ge.target.value),ae({name:ge.target.value})}}):o.jsx("h1",{children:T.name}),M?o.jsx(Kl,{className:"sc-ownededit-lede",value:J,placeholder:"One sentence for the card","aria-label":"Description",onChange:ge=>{Z(ge.target.value),ae({description:ge.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":Ue,onClick:()=>b(s9(g,T.id)),children:[o.jsx(Y1,{size:13,weight:Ue?"fill":"regular"}),o.jsx("span",{children:Ue?"Bookmarked":"Bookmark"})]}),M&&o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:L,onClick:()=>void me(),children:[L?o.jsx(on,{size:"1"}):o.jsx(Jm,{size:13}),o.jsx("span",{children:M.previewUrl?"Redraw the example":"Draw an example"})]})]}),X&&o.jsx("p",{className:"sc-assetform-err",children:X}),be.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:be.map(ge=>o.jsx(x1,{src:ge},ge))}),Te&&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:()=>E(N?null:"1"),children:N?"Enough, close it":"See the whole set"})]}):o.jsx(F9,{}),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(ge=>o.jsx(x1,{src:ge},ge))})]}),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(Qm,{value:H,rows:5,onChange:ge=>{K(ge.target.value),ae({prompt:ge.target.value})}}),o.jsx(Kl,{mt:"2",value:ee,placeholder:"The light, in a short phrase","aria-label":"Lighting",onChange:ge=>{q(ge.target.value),ae({lighting:ge.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(cs,{label:"Delete scene",title:`Delete ${M.name}?`,body:"Shots already made here keep their images and their recipe. Only future shots lose it.",busy:ne,onConfirm:()=>void he()})})]}),P.length>0&&o.jsx(To,{label:"Your shots in this scene",children:P.map(ge=>o.jsx(Rp,{node:ge,onClick:()=>h(Q1(u,null,ge.id))},ge.id))}),G.length>0&&o.jsx(To,{label:"Other scenes, similar light",children:G.map(ge=>o.jsx(Ic,{scene:ge,variant:"navigate",size:"slider",onOpen:A},ge.id))})]})})}const tZ=8;function nZ(){const{presenters:e,presenterCategories:t,presentersLoaded:n,presentersError:s,refetchPresenters:i}=mn(),{brand:c}=It(),u=nn(),f=bp(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=hu(["category"]),b=g.category,{builds:C,poke:E}=sl(),N=ol(),j=r.useMemo(()=>nd(c),[c]),k=C.filter(re=>re.kind==="presenter"&&(!re.finished||re.stage==="failed")),[A,M]=Za(ir.wallDensity,zo),T=ll(A),D=re=>M(re),P=od(T),G=iu(T),I=re=>u(al(c,re)),oe=r.useMemo(()=>b?e.filter(re=>re.suitableCategories.includes(b)):e,[e,b]),W=r.useMemo(()=>oe.filter(re=>ba(m1(re),h)),[oe,h]),{visible:J,remaining:Z,showMore:ee}=Mp(W,`${b??""}|${h}`),q=y9(t.length),H=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>N("presenter"),children:[o.jsx(nr,{size:12})," Create presenter"]}),K=r.useMemo(()=>j.filter(re=>b?!re.suitableCategories.length||re.suitableCategories.includes(b):!0).filter(re=>ba(m1(re),h)),[j,b,h]),X=j.length>0||k.length>0,U=k.length>0||K.length>0,L=!X,O={key:"category",label:"Category",everyLabel:"Every presenter",everyCount:e.length+j.length,selected:b,onSelect:re=>v("category",re),options:t.map(re=>({value:re,label:re,count:[...j,...e].filter(le=>!le.suitableCategories.length||le.suitableCategories.includes(re)).length}))},ne=o.jsx(cd,{title:"Presenters",filters:o.jsx(ud,{mode:q,group:O}),density:o.jsx(sd,{value:T,onChange:D}),search:e.length>=tZ&&o.jsx(fu,{value:h,onChange:m,noun:"presenters",total:e.length}),action:L?void 0:H});return o.jsx(ur,{children:o.jsxs("main",{className:"sc-looks sc-presenters",id:"main","data-hero":L||void 0,children:[!L&&ne,U&&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":G,style:P,children:[k.map(re=>o.jsx($9,{build:re,onCancel:le=>void Ce.cancelAssetBuild(c.id,le).then(E),onDismiss:le=>void Ce.deleteAssetBuild(c.id,le).then(E),onRetry:()=>N("presenter")},re.id)),K.map(re=>o.jsx(y1,{presenter:re,variant:"use",size:"grid",onOpen:I,onUse:f},re.id))]})]}),L&&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}),U&&n&&!s&&J.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":G,style:P,"aria-hidden":!0,children:o.jsx(L9,{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()}),L&&n&&!s&&e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Np,{label:"Or cast someone from ours"}),ne]}),n&&!s&&J.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":G,style:P,children:J.map(re=>o.jsx(y1,{presenter:re,variant:"use",size:"grid",onOpen:I,onUse:f},re.id))}),n&&!s&&!W.length&&e.length>0&&o.jsx(dd,{noun:"presenters",q:h,facet:b,onClearSearch:y,onClearAll:w}),n&&!s&&!e.length&&o.jsx(Ks,{shape:"zero",body:"The presenter library is still being cast. Check back soon."}),Z>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:ee,children:["Show ",Math.min(Z,60)," more"]})})]})})}const iv=4;function rZ(){var re;const{presenterId:e=""}=Ba(),{presenters:t,presentersLoaded:n,presentersError:s,refetchPresenters:i,applyBrand:c}=mn(),{brand:u,nodes:f}=It(),h=nn(),m=bp(),[g,v]=r.useState([]),[y,w]=Zs("all"),b=y==="1",C=zD(u,e),E=C??t.find(le=>le.id===e);J1(E==null?void 0:E.name);const N=!!C;r.useEffect(()=>{let le=!0;if(v([]),!N)return Ce.presenterFrames(e).then(ae=>{le&&v(ae.frames)}).catch(()=>{le&&v([])}),()=>{le=!1}},[e,N]);const k=(((re=u.json)==null?void 0:re.characters)??[]).find(le=>le.presenterId===e),A=r.useMemo(()=>f.filter(le=>{var ae;return le.status==="done"&&le.images.length>0&&(((ae=le.brief)==null?void 0:ae.tokens)??[]).some(me=>(me==null?void 0:me.t)==="character"&&(me.id===e||me.id===(k==null?void 0:k.id)))}).slice(-12).reverse(),[f,e,k]),[M,T]=r.useState((C==null?void 0:C.name)??""),[D,P]=r.useState((C==null?void 0:C.descriptor)??""),[G,I]=r.useState((C==null?void 0:C.identityNotes)??""),[oe,W]=r.useState(null),[J,Z]=r.useState(!1),ee=r.useRef(void 0);r.useEffect(()=>{T((C==null?void 0:C.name)??""),P((C==null?void 0:C.descriptor)??""),I((C==null?void 0:C.identityNotes)??"")},[C==null?void 0:C.id]);const q=le=>{C&&(ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{Ce.updatePresenter(u.id,C.id,le).then(ae=>c(ae.brand)).catch(ae=>W(String(ae.message??ae)))},500))},H=async()=>{if(C){Z(!0);try{await Ce.deletePresenter(u.id,C.id),h(vc(u))}catch(le){W(String(le.message??le)),Z(!1)}}};if(!n&&!C)return o.jsx(ur,{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(ur,{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(!E)return o.jsx(ur,{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 K=(C==null?void 0:C.shots)??[],X=b?g:g.slice(0,iv),U=C?K:g.length?X:E.previewUrl?[E.previewUrl]:[],L=t.filter(le=>le.id!==E.id).slice(0,8),O=!!E.avatarUrl,ne=E.avatarUrl??E.previewUrl??g[0]??null;return o.jsx(ur,{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":E.suitableStyles[0]??E.presentation})]}),ne?o.jsx("div",{className:"sc-presenterpage-avatar","data-avatar":O||void 0,"aria-hidden":!0,children:o.jsx("img",{src:ne,alt:""})}):null,C?o.jsx(Kl,{className:"sc-ownededit-title",value:M,"aria-label":"Their name",onChange:le=>{T(le.target.value),q({name:le.target.value})}}):o.jsx("h1",{children:E.name}),C?o.jsx(Kl,{className:"sc-ownededit-lede",value:D,placeholder:"A short caption for the card","aria-label":"Caption",onChange:le=>{P(le.target.value),q({descriptor:le.target.value})}}):o.jsx("p",{className:"sc-lookpage-lede",children:E.descriptor}),o.jsx("p",{className:"sc-lookpage-facts",children:[E.ageRange,E.hair,E.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"})}),oe&&o.jsx("p",{className:"sc-assetform-err",children:oe}),U.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:U.map((le,ae)=>o.jsxs("div",{className:"sc-ownedref","data-engine":C&&ae<2?"":void 0,children:[o.jsx(x1,{src:le}),C&&ae<2&&o.jsx("span",{className:"sc-ownedref-tag",children:"Used in shots"})]},le))}),!C&&g.length>iv&&o.jsx("button",{type:"button",className:"sc-lookpage-expand",onClick:()=>w(b?null:"1"),children:b?"Enough, close it":"See the whole set"})]}):o.jsx(F9,{}),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(le=>o.jsx(x1,{src:le},le))})]}),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(Qm,{value:G,rows:3,placeholder:"For example: the wide-set eyes and the small scar above the left brow must survive every generation.",onChange:le=>{I(le.target.value),q({identityNotes:le.target.value})}}),C.negativeConstraints.length>0&&o.jsx("ul",{className:"sc-ownedbits-list",children:C.negativeConstraints.map(le=>o.jsx("li",{children:le},le))})]}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(cs,{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:J,onConfirm:()=>void H()})})]}),A.length>0&&o.jsx(To,{label:`Shots featuring ${E.name}`,children:A.map(le=>o.jsx(Rp,{node:le,onClick:()=>h(Q1(u,null,le.id))},le.id))}),L.length>0&&o.jsx(To,{label:"Other presenters",children:L.map(le=>o.jsx(y1,{presenter:le,variant:"navigate",size:"slider",onOpen:ae=>h(al(u,ae))},le.id))})]})})}function I9(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?product=${encodeURIComponent(s)}&compose=1`)},[n,t])}function _9({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(du,{id:e.id,previewUrl:Zn((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 aZ(e){return o.jsx(id,{...e})}function Z9({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(du,{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 sZ=8;function oZ(){const{brand:e,products:t,productsLoaded:n}=It(),{demoProducts:s}=mn(),i=n&&t.length===0,c=nn(),u=I9(),f=ol(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=hu(["category"]),b=g.category,[C,E]=Za(ir.wallDensity,zo),N=ll(C),j=ne=>E(ne),k=od(N),A=iu(N),M=r.useMemo(()=>t.map(ne=>({product:ne,category:pp(ne),own:!0})),[t]),T=r.useMemo(()=>s.map(ne=>({product:ne,category:ne.category,own:!1})),[s]),D=r.useMemo(()=>[...M,...T],[M,T]),P=r.useMemo(()=>{const ne=new Map;for(const{category:re}of D)re&&ne.set(re,(ne.get(re)??0)+1);return ne},[D]),G=r.useMemo(()=>Dc.filter(ne=>P.has(ne.key)),[P]),I=y9(G.length),oe=ne=>c(Js(e,ne)),W=r.useCallback(ne=>ne.filter(({category:re})=>!b||re===b).filter(({product:re,category:le})=>ba([wp(re),si(le)].filter(Boolean).join(" "),h)).map(({product:re})=>re),[b,h]),J=r.useMemo(()=>W(M),[W,M]),Z=r.useMemo(()=>W(T),[W,T]),{visible:ee,remaining:q,showMore:H}=Mp(J,`${b??""}|${h}`),K={key:"category",label:"Category",everyLabel:"Every product",everyCount:D.length,selected:b,onSelect:ne=>v("category",ne),options:G.map(ne=>({value:ne.key,label:ne.label,count:P.get(ne.key)??0}))},X=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>f("product"),children:[o.jsx(nr,{size:12})," Add product"]}),U=i,L=t.length>0,O=o.jsx(cd,{title:"Products",filters:o.jsx(ud,{mode:I,group:K}),density:o.jsx(sd,{value:N,onChange:j}),search:D.length>=sZ&&o.jsx(fu,{value:h,onChange:m,noun:"products",total:D.length}),action:U?void 0:X});return o.jsx(ur,{children:o.jsxs("main",{className:"sc-looks sc-products",id:"main","data-hero":U||void 0,children:[!U&&O,!n&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":A,style:k,"aria-hidden":!0,children:o.jsx(aZ,{size:"grid",count:8})}),L&&ee.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:ee.map(ne=>o.jsx(_9,{product:ne,variant:"use",size:"grid",onOpen:oe,onUse:u},ne.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"]})})]}),U&&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}),L&&ee.length>0&&Z.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri products"})}),U&&T.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Np,{label:"Or borrow one of ours"}),O]}),Z.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":A,style:k,children:Z.map(ne=>o.jsx(Z9,{product:ne,variant:"use",size:"grid",onUse:u,onOpen:oe},ne.id))}),n&&J.length===0&&Z.length===0&&o.jsx(dd,{noun:"products",q:h,facet:b?si(b):null,onClearSearch:y,onClearAll:w})]})})}function lZ({value:e,onChange:t}){const n=si(e)??"Other",s=e&&Dc.some(i=>i.key===e)?e:"other";return o.jsxs(_o,{children:[o.jsx(Zo,{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(Oo,{align:"center",sideOffset:8,children:o.jsx(i1,{value:s,children:Dc.map(i=>o.jsx(Vl,{value:i.key,onSelect:()=>t(i.key),children:i.label},i.key))})})]})}function iZ(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 cZ({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,b=!!(s&&c&&e.length>0),C=e.length>1||b,{shellRef:E,railRef:N,page:j}=iZ(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(on,{size:"2"}):o.jsx(nr,{size:22,weight:"bold"}),o.jsx("span",{children:"Add a reference"})]}):o.jsx("span",{className:"sc-refstage-blank",children:o.jsx(Ga,{size:22})})}),C&&o.jsxs("div",{className:"sc-refrail-shell",ref:E,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(q1,{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))})]}),b&&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(on,{size:"1"}):o.jsx(nr,{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(xH,{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 uZ=3;function dZ(e){const t=e,n=(t.brand??t.vendor??"").trim();return!n||e.name.toLowerCase().startsWith(n.toLowerCase())?null:n}function fZ(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 hZ(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 mZ({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 pZ(){var he;const{productId:e=""}=Ba(),{brand:t,products:n,nodes:s,refresh:i,refreshProducts:c}=It(),{demoProducts:u,demoProductsLoaded:f}=mn(),h=nn(),m=I9(),{push:g}=hr(),[v,y]=r.useState(!1),[w,b]=r.useState(!1),[C,E]=r.useState(null),N=r.useRef(null),j=n.find(de=>de.id===e),k=r.useMemo(()=>j?void 0:u.find(de=>de.id===e),[j,u,e]);J1((he=j??k)==null?void 0:he.name);const[A,M]=r.useState([]);r.useEffect(()=>{if(!k){M([]);return}let de=!0;return Ce.demoProductFrames(k.id).then(be=>{de&&M(be.frames)}).catch(()=>{de&&M([])}),()=>{de=!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 P=r.useMemo(()=>s.filter(de=>{var be;return de.status==="done"&&de.images.length>0&&(((be=de.brief)==null?void 0:be.tokens)??[]).some(Te=>(Te==null?void 0:Te.t)==="product"&&Te.id===e)}).slice(-12).reverse(),[s,e]),G=((j==null?void 0:j.origin)??"manual")==="manual",I=de=>{j&&(N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{(G?Ce.updateProduct(t.id,j.id,de):Ce.updateCatalogProduct(t.id,j.id,de)).then(()=>c()).catch(Te=>E(String(Te.message??Te)))},500))},oe=async de=>{y(!0),E(null);try{await de,await c()}catch(be){E(String(be.message??be))}finally{y(!1)}},W=async()=>{if(j){b(!0),E(null);try{j.origin==="catalog"||j.id.startsWith("cat-")?await Ce.deleteCatalogProduct(t.id,j.id):await GH(t.id,j.id),await i(),h(K0(t),{replace:!0})}catch(de){E(String(de.message??de)),b(!1)}}};if(!j&&!k&&!f)return o.jsx(ur,{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(ur,{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(K0(t)),children:"Browse products"})})]})});const J=k?"none":G?"full":"fields",Z=j??k,ee=(j==null?void 0:j.id)??k.id,q=j?pp(j):(k==null?void 0:k.category)??null,H=dZ(Z),K=de=>{const be=Zn(de.file);return be?[{file:de.file,url:be,angle:de.angle}]:[]},X=k?A.map(de=>({file:de.angle,url:de.url,angle:de.angle})):((j==null?void 0:j.shots)??[]).flatMap(K),U=de=>{const be=X.map(Ue=>Ue.file),Te=be.indexOf(de)+1;oe(Ce.setProductShots(t.id,ee,be.filter(Ue=>Ue!==de))).then(()=>g({kind:"success",title:"Reference removed",detail:`Reference ${Te} of ${be.length}`,action:{label:"Undo",onClick:()=>void oe(Ce.setProductShots(t.id,ee,be))}}))},L=k?"Our reference set. Yours replaces it.":X.length===0?G?"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.",O=J==="none"?null:"Add image",ne=j!=null&&j.descriptionHtml?hZ(fZ(j.descriptionHtml),200):"",re=(k==null?void 0:k.description)||ne||null,le=k?[k.subcategory]:[j==null?void 0:j.variant,j==null?void 0:j.material,j==null?void 0:j.dimensions],ae=[J==="none"?si(q):null,...le].filter(Boolean),me=k?u.filter(de=>de.id!==ee).slice(0,8):n.filter(de=>de.id!==ee).slice(0,8);return o.jsx(ur,{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(K0(t)),children:"Products"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:k?"Scenri library":G?"Yours":"From your store"})]}),H&&o.jsx("p",{className:"sc-lookpage-house",children:o.jsx("em",{className:"sc-accent",children:H})}),J==="full"?o.jsx(mZ,{value:T,onChange:de=>{D(de),I({name:de})}}):o.jsx("h1",{dir:"auto",children:Z.name}),re&&o.jsx("p",{className:"sc-lookpage-lede",children:re}),ae.length>0&&o.jsx("p",{className:"sc-lookpage-facts",children:ae.join(" · ")}),o.jsxs("div",{className:"sc-lookpage-acts",children:[J!=="none"&&o.jsx(lZ,{value:q,onChange:de=>I({category:de})}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>m(ee),children:"Use in a shot"})]}),C&&o.jsx("p",{className:"sc-assetform-err",children:C}),o.jsx(cZ,{refs:X,cap:uZ,note:L,addLabel:O,busy:v,onAdd:J==="none"?void 0:de=>void oe(qH(t.id,ee,de)),onPromote:J==="none"?void 0:de=>void oe(Ce.setProductShots(t.id,ee,[de,...X.map(be=>be.file).filter(be=>be!==de)])),onRemove:J==="none"?void 0:U}),P.length>0&&o.jsx(To,{label:`Shots featuring ${Z.name}`,children:P.map(de=>o.jsx(Rp,{node:de,onClick:()=>h(Q1(t,null,de.id))},de.id))}),me.length>0&&o.jsx(To,{label:k?"Other products in the library":"Other products",children:me.map(de=>k?o.jsx(Z9,{product:de,variant:"navigate",size:"slider",onOpen:be=>h(Js(t,be))},de.id):o.jsx(_9,{product:de,variant:"navigate",size:"slider",onOpen:be=>h(Js(t,be))},de.id))}),j&&o.jsx("div",{className:"sc-ownedbits",children:o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(cs,{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 W()})})})]})})}const O9=[{id:"newest",label:"Newest first"},{id:"oldest",label:"Oldest first"},{id:"cost",label:"Highest cost"},{id:"keepers",label:"Keepers first"}];function gZ(e){return O9.some(t=>t.id===e)}const V9=[{id:"all",label:"All"},{id:"keepers",label:"Keepers"},{id:"archived",label:"Archived"}];function vZ(e){return V9.some(t=>t.id===e)}function yZ(e,t,n){return n==="archived"?t:n==="keepers"?e.filter(s=>s.kept):e}function xZ(e,t,n,s){const i=Fh(e,n,s);return{all:i.length,keepers:i.reduce((c,u)=>c+(u.kept?1:0),0),archived:Fh(t,n,s).length}}const Bl=(e,t)=>t.createdAt.localeCompare(e.createdAt);function wZ(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 Fh(e,t,n){return t.trim()?e.filter(s=>ba(n(s),t)):e}function bZ(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 EZ=[{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 CZ({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:EZ.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 fd=e=>((e==null?void 0:e.tokens)??[]).filter(t=>t&&typeof t.t=="string"),cv=(e,t)=>fd(e).filter(n=>n.t===t&&typeof n.id=="string").map(n=>n.id),uv=e=>fd(e).filter(t=>t.t==="text").map(t=>typeof t.v=="string"?t.v:"").join(" ").replace(/\s+/g," ").trim(),dv=(e,t)=>fd(e).filter(n=>n.t===t).length,$0=(e,t,n)=>t(e)??n;function SZ(e,t,n){if(!e||!t)return[];const s=[],i=(f,h,m,g)=>{const v=cv(e,f),y=cv(t,f),w=y.filter(C=>!v.includes(C)),b=v.filter(C=>!y.includes(C));if(!(!w.length&&!b.length)){if(w.length===1&&b.length===1){s.push(`${m} ${$0(b[0],h,g)} to ${$0(w[0],h,g)}`);return}for(const C of w)s.push(`${m} ${$0(C,h,g)} added`);for(const C of b)s.push(`${m} ${$0(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=dv(e,f),g=dv(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=uv(e),u=uv(t);return c!==u&&s.push(u&&u.length<=60?`“${u}”`:"wording changed"),s}function jZ(e,t,n){const s=SZ(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 z9(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 kZ(e){return fd(e.brief).filter(n=>n.t==="text").map(n=>typeof n.v=="string"?n.v:"").join(" ").replace(/\s+/g," ").trim()||e.prompt||""}function AZ({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:[lp(e,t)," · ",eo(e,t),"s"]})}function fv({src:e,alt:t="",aspect:n}){const[s,i]=r.useState(!1),c=r.useCallback(u=>{u!=null&&u.complete&&i(!0)},[]);return o.jsxs("span",{className:"sc-cellimg","data-loaded":s||void 0,style:n?{"--sc-cell-ar":n}:void 0,children:[!s&&o.jsx("span",{className:"sc-shimmer"}),o.jsx("img",{ref:c,src:e,alt:t,loading:"lazy",decoding:"async",onLoad:()=>i(!0),onError:()=>i(!0)})]})}function NZ({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:b,branchingFromImage:C,expanded:E,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])),P=!!g,[G,I]=r.useState(null),[oe,W]=r.useState(null),{tile:J,cols:Z}=oI(aI(oe),M,sI()<rI),ee=[...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=>{var he,de;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,style:{"--sc-cell-ar":Q0((he=H.brief)==null?void 0:he.format)},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(AZ,{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 be=H.status==="cancelled",Te=be?jw():oo(H.error,A==null?void 0:A(H.engineId));return[o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-cancelled":be||void 0,"data-failed":!be||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(ap,{failure:Te,density:"tile",onRetry:()=>s(H),dismiss:u?{label:H.archived?"Restore":"Dismiss",onClick:()=>u(H)}:void 0})})]},H.id)]}const U=(h==null?void 0:h(H.id))??[],L=(m==null?void 0:m.has(H.id))??!1,O=(j==null?void 0:j(H.id))??0,ne=w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":H.id===b||void 0,onClick:()=>w(H.id),"aria-label":`Refine ${Cn(H)}`,title:"Continue from this shot",children:[o.jsx(mg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]}),re=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:tn(z9(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(xh,{size:12}),H.images.length," variants"]}),O>0&&k&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-versions",onClick:()=>k(H.id),"aria-label":`Show the ${O} version${O===1?"":"s"} of this shot`,children:[o.jsx(kH,{size:11}),O," version",O===1?"":"s"]}),U.length>0&&o.jsxs("span",{className:"sc-fact",title:U.map(be=>be.name).join(", "),children:[o.jsx(Lx,{size:11}),U.length," set",U.length===1?"":"s"]})]},`${H.id}-facts`),le=P&&o.jsx("button",{type:"button",className:"sc-cell-pick","data-on":L||void 0,"aria-pressed":L,"aria-label":L?"Deselect shot":"Select shot",onClick:()=>g==null?void 0:g(H.id),children:L&&o.jsx(ya,{size:12,weight:"bold"})}),ae=o.jsxs("div",{className:"sc-cell-acts",children:[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(Tc,{size:12}):o.jsx(yh,{size:12})}),ne]},`${H.id}-acts`),me=c&&o.jsx("button",{type:"button",className:"sc-cell-star","data-on":H.kept||void 0,onClick:()=>c(H),"aria-pressed":H.kept,"aria-label":H.kept?"Remove from keepers":"Keep",title:H.kept?"Remove from keepers":"Keep",children:o.jsx(wh,{size:14,weight:H.kept?"fill":"regular"})});return E!=null&&E.has(H.id)&&H.images.length>1?H.images.map((be,Te)=>{var Ue;return o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-fb-variant":Te,"data-variant":"","data-first":Te===0||void 0,"data-selected":Te===0&&H.id===t,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}, take ${Te+1} of ${H.images.length}`,onClick:()=>n(H.id,Te),children:o.jsx(fv,{src:tn(be),aspect:Q0((Ue=H.brief)==null?void 0:Ue.format)})}),o.jsxs("div",{className:"sc-cell-bar",children:[o.jsxs("div",{className:"sc-cell-facts",children:[o.jsxs("span",{className:"sc-fact",children:[Te+1," of ",H.images.length]}),Te===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(xh,{size:12}),"Collapse"]})]}),o.jsxs("div",{className:"sc-cell-acts",children:[Te===0&&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(Tc,{size:12}):o.jsx(yh,{size:12})}),w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":b===H.id&&C===be?"":void 0,onClick:()=>w(H.id,Te),"aria-label":`Refine ${Te+1} of ${H.images.length}`,title:"Continue from this take",children:[o.jsx(mg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]})]})]}),Te===0&&o.jsxs(o.Fragment,{children:[le,me]})]},`${H.id}:${be}`)}):[o.jsxs(Gm,{children:[o.jsx(Km,{children:o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-selected":H.id===t,"data-picked":L||void 0,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}`,onClick:()=>n(H.id),children:o.jsx(fv,{src:tn(H.images[0]),aspect:Q0((de=H.brief)==null?void 0:de.format)})}),o.jsxs("div",{className:"sc-cell-bar",children:[re,ae]}),le,me]})}),o.jsxs(Ym,{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:L?"Deselect":"Select for set"}),O>0&&k&&o.jsxs(qr,{onSelect:()=>k(H.id),children:[O," version",O===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(mh,{}),o.jsx(qr,{onSelect:()=>u(H),children:H.archived?"Restore":"Archive"})]}),f&&H.archived&&o.jsxs(o.Fragment,{children:[o.jsx(mh,{}),o.jsx(qr,{color:"red",onSelect:()=>I(H),children:"Delete permanently"})]})]})]},H.id)]})];if(bw(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(Z,ee.length));return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-feed",ref:W,"data-picking":P&&((m==null?void 0:m.size)??0)>0?"":void 0,style:{"--sc-tile":`${J}px`},children:Array.from({length:q},(H,K)=>o.jsx("div",{className:"sc-feed-col",children:ee.filter((X,U)=>(ee.length-1-U)%q===K)},`col-${q}-${K}`))}),o.jsx(Xc,{open:!!G,onOpenChange:H=>!H&&I(null),children:o.jsxs(Qc,{maxWidth:"420px",children:[o.jsx(Jc,{children:"Delete this shot permanently?"}),o.jsx(eu,{size:"2",children:"This cannot be undone."}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{color:"red",onClick:()=>{G&&(f==null||f(G)),I(null)},children:"Delete permanently"})})]})]})})]})}function B9({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:su,children:[o.jsx(ru,{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:tn(n),alt:""}),o.jsx("figcaption",{dir:"auto",children:Cn(e)})]}),o.jsxs("figure",{className:"sc-cmp-side",children:[o.jsx("img",{src:tn(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(ap,{failure:oo(h),density:"tile",onRetry:()=>v(y=>y+1)})}):u?o.jsx("img",{src:tn(u.heatmapHash),alt:"Heatmap of the pixels that differ"}):o.jsx("div",{className:"sc-cmp-wait",children:o.jsx(on,{})}),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 MZ=130;function RZ(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),MZ);return()=>clearTimeout(s)},[e,t]),t}function Ih({name:e,count:t,mode:n,onToggle:s,action:i,children:c}){const u=n==="open"||n==="result"?"open":"compact",f=RZ(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 PZ({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(Ga,{size:14})}),o.jsx("span",{className:"sc-acard-tick","aria-hidden":!0,children:o.jsx(ya,{size:10,weight:"bold"})})]}),n&&o.jsxs("span",{className:"sc-acard-label",children:[e.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(Y1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),e.label]})]})}function F2({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(av);return r.useEffect(()=>{i!=="open"&&y(av)},[i]),i==="result"&&n.length===0?null:o.jsx(Ih,{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(nr,{size:10})}),children:w=>{const{visible:b,more:C}=O_(n,g,w==="open"?v:$h);return o.jsxs("div",{className:w==="open"?"sc-acard-grid":"sc-arow",children:[b.map(E=>o.jsx(PZ,{candidate:E,on:g.has(E.id),named:w==="open",onClick:()=>u(E.id)},E.id)),w==="open"&&C>0&&o.jsxs("button",{type:"button",className:"sc-amore-tile",onClick:()=>y(E=>E+sv),"aria-label":`Show ${Math.min(C,sv)} more ${f}`,children:[o.jsxs("span",{className:"sc-amore-n",children:["+",C]}),o.jsx("span",{className:"sc-amore-t",children:"more"})]})]})}})}function LZ({brand:e,shots:t,attached:n=N9,onProduct:s,onCharacter:i,onColor:c,onRef:u,onTemplate:f,onClose:h}){const m=uu(),g=ol(),{applyBrand:v}=mn(),{push:y}=hr(),[w,b]=eT(ir.assetsExpanded,null),C=Z=>b(ee=>ee===Z?null:Z),[E,N]=r.useState(""),j=E.trim().length>0,k=Z=>{N(""),b(Z)},A=Z=>j?"result":w===null?"idle":w===Z?"open":"collapsed",M=r.useMemo(()=>new Set(Va(e.id)),[e.id]),T=r.useMemo(()=>{const Z=ee=>{const q=zl(ee,m);return ld(ee,q,{currentId:null,query:"",bookmarked:M,shown:q.length}).items};return{product:Z("product"),presenter:Z("presenter"),scene:Z("scene")}},[m,M]),D=r.useMemo(()=>({product:bc(T.product,E),presenter:bc(T.presenter,E),scene:bc(T.scene,E)}),[T,E]),P=r.useMemo(()=>{var Z;return xa((Z=e.json)==null?void 0:Z.palette)},[e]),G=r.useMemo(()=>j?P.filter(Z=>ba(`${Z.name} ${Z.hex}`,E)):P,[P,E,j]),I=Z=>{(async()=>{var q;const ee=_$((q=e.json)==null?void 0:q.palette,Z);if(ee.swatch){if(ee.added)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ee.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"));return}k("colors")}})()},oe=Z=>{(async()=>{var q;const ee=Z$((q=e.json)==null?void 0:q.palette,Z);if(ee.removed)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ee.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"))}})()},W=t.filter(Z=>Z.status==="done"&&Z.images.length>0).slice(-12).reverse(),J=j&&!D.product.length&&!D.presenter.length&&!D.scene.length&&!G.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(Hc,{size:12}),o.jsx("input",{value:E,onChange:Z=>N(Z.target.value),onKeyDown:Z=>{Z.key==="Escape"&&E&&(Z.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})})]})}),J&&o.jsxs("p",{className:"sc-assets-zero",children:["Nothing here matches “",E.trim(),"”."]}),o.jsx(F2,{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:Z=>{Z.kind==="product"&&(k("product"),s(Z.id))}})}),o.jsx(F2,{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:Z=>{Z.kind==="presenter"&&k("presenter")}})}),o.jsx(F2,{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:Z=>{Z.kind==="scene"&&k("scene")}})}),!(j&&G.length===0)&&o.jsx(Ih,{name:"Brand colors",count:G.length,mode:A("colors"),onToggle:()=>C("colors"),action:o.jsx(f1,{className:"sc-aadd",triggerStyle:{background:"none"},value:yp(P),presets:P.map(Z=>Z.hex),commitMode:"close",align:"end",label:"Add colour",onChange:I,children:o.jsx(nr,{size:10})}),children:Z=>o.jsx("div",{className:"sc-arow",children:(Z==="open"?G:G.slice(0,$h)).map(ee=>o.jsxs("div",{className:"sc-aswatch-tile",children:[o.jsx("button",{type:"button",title:`${ee.name} ${ee.hex}`,onClick:()=>c(ee.hex,ee.name),children:o.jsx("span",{className:"sc-aswatch",style:{background:ee.hex}})}),Z==="open"&&o.jsx("button",{type:"button",className:"sc-aswatch-x","aria-label":`Remove ${ee.name}`,title:"Remove",onClick:()=>oe(ee.hex),children:o.jsx(Mn,{size:10,weight:"bold"})})]},ee.hex))})}),W.length>0&&!j&&o.jsx(Ih,{name:"Recent shots",count:W.length,mode:A("shots"),onToggle:()=>C("shots"),children:Z=>o.jsx("div",{className:"sc-arow",children:(Z==="open"?W:W.slice(0,$h)).map(ee=>o.jsx("button",{type:"button",title:"Attach as a style reference",onClick:()=>u(ee.images[0]),children:o.jsx("img",{src:tn(ee.images[0]),alt:"",loading:"lazy"})},ee.id))})})]})}function TZ({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:b,q:C,onQ:E,searchTotal:N,sort:j,onSort:k,tile:A,onTile:M,assets:T,onAssets:D,showAssets:P}){const G=t?t.id:n?"__ungrouped__":"__all__",I=t?t.name:n?"Not in a set":"All shots",oe=!!t||n,[W,J]=r.useState(!1),[Z,ee]=r.useState(!1),[q,H]=r.useState(!1),[K,X]=r.useState(""),U=r.useRef(null),L=r.useRef(!1),O=()=>{L.current=!0,ee(!0),X(""),J(!0)},ne=()=>{t&&(L.current=!1,ee(!1),X(t.name),J(!0))};r.useEffect(()=>{v&&O()},[v]);const re=()=>{const me=K.trim();if(!me)return;const he=L.current;L.current=!1,ee(!1),J(!1),he?f(me):m==null||m(me)},le=me=>{if(me){J(!0);return}const he=L.current;L.current=!1,ee(!1),J(!1),he&&(h==null||h())},ae=V9.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(Zo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-place","data-on":oe||void 0,"aria-label":I,children:[o.jsx(Lx,{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(Oo,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[o.jsxs(i1,{value:G,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(c1,{}),e.map(me=>o.jsx(Vl,{value:me.id,onSelect:()=>u(me),children:me.name},me.id))]}),o.jsx(c1,{}),o.jsx(Qr,{onSelect:()=>{h==null||h(),O()},children:"New set"}),t&&m&&o.jsx(Qr,{onSelect:ne,children:"Rename"}),t&&g&&o.jsx(Qr,{color:"red",onSelect:()=>H(!0),children:"Delete set"})]})]}),o.jsx(el,{open:W,onOpenChange:le,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:me=>{me.preventDefault();const he=U.current;he&&(he.focus(),he.select())},children:[o.jsx(nl,{children:Z?"Name this set":"Rename set"}),o.jsx("input",{ref:U,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"&&re()}}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(pa,{variant:"soft",color:"gray",onClick:()=>le(!1),children:"Cancel"}),o.jsx(pa,{onClick:re,disabled:!K.trim(),children:"Save"})]})]})}),o.jsx(Xc,{open:q,onOpenChange:H,children:o.jsxs(Qc,{maxWidth:"420px",children:[o.jsx(Jc,{children:"Delete this set?"}),o.jsx(eu,{size:"2",children:"Shots stay in the library. Only the set goes."}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{color:"red",onClick:()=>{g==null||g(),H(!1)},children:"Delete set"})})]})]})}),o.jsx(H9,{"aria-label":"Shot lenses",activeKey:y==="all"?null:y,items:ae,onSelect:me=>b(me??"all")})]}),o.jsxs("div",{className:"sc-toolbar-actions",children:[o.jsx(fu,{value:C,onChange:E,noun:"shots",total:N}),o.jsxs(_o,{children:[o.jsx(Zo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-btn","aria-label":"Sort shots",children:[o.jsx(bH,{size:14}),o.jsx("span",{className:"sc-toolbar-btn-t",children:"Sort"}),o.jsx(ai,{size:10})]})}),o.jsx(Oo,{align:"end",children:o.jsx(i1,{value:j,onValueChange:me=>k(me),children:O9.map(me=>o.jsx(Vl,{value:me.id,children:me.label},me.id))})})]}),o.jsx(uI,{value:A,onChange:M}),P&&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(_H,{size:15,mirrored:!0})})]})]})}function HZ(e){const{push:t}=hr(),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 DZ(e){const{push:t}=hr(),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 $Z(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 FZ(e,t){const{product:n,presenter:s,scene:i}=$Z(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 IZ(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 b=()=>{const C=s.current;if(C===null)return;const E=C-m.scrollLeft;if(Math.abs(E)<.5){m.scrollLeft=C,s.current=null;return}m.scrollLeft+=E*.16,i.current=requestAnimationFrame(b)};i.current=requestAnimationFrame(b)},[]);return{ref:t,page:f}}function _Z(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 ZZ({entries:e,catalogs:t,stagedId:n,onUse:s,onOpenProduct:i,onOpenPresenter:c,onOpenScene:u}){const f=r.useMemo(()=>_Z(e).slice(0,10),[e]),{ref:h,page:m}=IZ(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(q1,{size:13,weight:"bold"})}),o.jsx("div",{className:"sc-shelf-row",ref:h,children:[0,1,2].map(g=>f.map(v=>o.jsx(R9,{entry:v,size:"grid",hideRecipe:!0,decorative:g!==1,active:n===v.id,onOpen:()=>s(v),onOpenProduct:i,onOpenPresenter:c,onOpenScene:u,...FZ(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 OZ({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(Zo,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Add to set"})}),o.jsxs(Oo,{children:[t.map(w=>o.jsx(Qr,{onSelect:()=>n(w),children:w.name},w.id)),t.length>0&&o.jsx(c1,{}),o.jsx(Qr,{onSelect:s,children:"New set…"})]})]})]}),o.jsx("button",{type:"button",className:"sc-btn",onClick:i,children:"Clear"}),m&&o.jsx(cs,{label:`Delete ${e} permanently`,title:`Delete ${e} shot${e===1?"":"s"} permanently?`,body:"This cannot be undone.",busy:!1,onConfirm:()=>y(g)})]})}function VZ(){const e=or(Ke.hubShot),t=or(Ke.setShot);return(e==null?void 0:e.params.shotId)??(t==null?void 0:t.params.shotId)??null}function U9({set:e}){const{engines:t,scenes:n,presenters:s,demoProducts:i,showcase:c,showcaseLoaded:u}=mn(),{brand:f,workspace:h,nodes:m,sets:g,membership:v,loaded:y,refresh:w,applySet:b,dropSet:C,products:E}=It(),N=uu(),j=nn(),[k,A]=li(),M=VZ(),[T,D]=r.useState(null),[P,G]=r.useState(!1),{open:I,toggle:oe,setOpen:W}=ZF(),J=lo(bi),Z=I&&!J,[ee,q]=r.useState(null),[H,K]=r.useState(N9),[X,U]=r.useState(null),[L,O]=r.useState(null),[ne,re]=r.useState(new Set),[le,ae]=Zs("tab","all"),[me,he]=Zs("in",""),[de,be]=Zs("branch",""),[Te]=Zs("bi",""),[Ue,ge]=Zs("lineage",""),[st,ht]=r.useState(new Set),[Rt,Pe]=Za(ir.tileSize,l9),Ae=i9(Rt),{q:Se,setQ:at,clearSearch:kt}=hu([]),[qt,Xt]=Za(ir.feedSort,"newest"),Zt=gZ(qt)?qt:"newest",[yn,Rn]=r.useState(!1),[Gn,Pn]=Zs("i","0"),Ot=Number.parseInt(Gn,10)||0;r.useRef(null);const tt=r.useRef(null),{push:Qe}=hr(),{tasks:Ut,poke:Vt}=sl(),[z,ue]=r.useState(null),xe=(h==null?void 0:h.id)??"",Ne=e?cc(f,e):cr(f),Ye=r.useCallback((_,ie=0,He=!1)=>{const Fe=new URLSearchParams(k);ie>0?Fe.set("i",String(ie)):Fe.delete("i");const cn=Fe.toString();j(`${Ne}/shots/${_}${cn?`?${cn}`:""}`,{replace:He})},[Ne,j,k]),it=r.useCallback(()=>{const _=new URLSearchParams(k);_.delete("i"),_.delete("panel");const ie=_.toString();j(`${Ne}${ie?`?${ie}`:""}`,{replace:!0})},[Ne,j,k]),_t=vZ(le)?le:"all",At=!e&&me==="ungrouped";r.useEffect(()=>{le==="ungrouped"&&(ae(null),he("ungrouped"))},[le,ae,he]);const bt=r.useCallback(async()=>{try{await w(),q(null)}catch(_){q(String(_.message??_))}},[w]),{archive:Sn,unarchive:Ct,unarchiveBatch:Nr}=HZ(bt),{remove:mr,removeBatch:ct}=DZ(bt);r.useEffect(()=>{M&&D(M)},[M]);const jt=r.useMemo(()=>Ut.filter(_=>_.kind!=="catalog").map(_=>`${_.id}:${_.state}`).sort().join("|"),[Ut]),Qt=r.useRef(null);r.useEffect(()=>{if(Qt.current===null){Qt.current=jt;return}Qt.current!==jt&&(Qt.current=jt,bt())},[jt,bt]);const zt=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&!_.archived).sort(Bl),[m]),Tt=r.useMemo(()=>{const _=new Map;for(const ie of g)for(const He of v[ie.id]??[])_.has(He)||_.set(He,[]),_.get(He).push(ie);return _},[g,v]),rr=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(!Ue)return null;const _=zt.find(Fe=>Fe.id===Ue);if(!_)return null;const ie=new Set([_.id]),He=[_.id];for(;He.length;)for(const Fe of rr.get(He.pop())??[])ie.has(Fe.id)||(ie.add(Fe.id),He.push(Fe.id));return{root:_,ids:ie}},[Ue,zt,rr]);r.useEffect(()=>{!Ue||!y||F||(ge(null),Qe({kind:"error",title:"That shot is no longer available",detail:"Showing everything instead."}))},[Ue,y,F,ge,Qe]);const V=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&_.archived).sort(Bl),[m]),Q=r.useMemo(()=>{const _=ie=>{if(F)return ie.filter(He=>F.ids.has(He.id));if(e){const He=new Set(v[e.id]??[]);return ie.filter(Fe=>He.has(Fe.id))}return At?ie.filter(He=>!Tt.has(He.id)):ie};return{live:_(zt),archived:_(V)}},[zt,V,e,v,Tt,F,At]),pe=r.useMemo(()=>yZ(Q.live,Q.archived,_t),[Q,_t]),ve=r.useMemo(()=>{var Fe,cn;const _=E.length?E:((Fe=f.json)==null?void 0:Fe.products)??[],ie=((cn=f.json)==null?void 0:cn.characters)??[],He=N.scenes;return{product:Bt=>{const Hn=_.find(pr=>pr.id===Bt)??i.find(pr=>pr.id===Bt);return Hn?Oa(Hn,"tooltip"):null},person:Bt=>{var Hn,pr;return((Hn=ie.find(Ka=>Ka.id===Bt))==null?void 0:Hn.name)??((pr=s.find(Ka=>Ka.id===Bt))==null?void 0:pr.name)??null},scene:Bt=>{const Hn=He.find(pr=>pr.id===Bt);return Hn?to(Hn,"tooltip"):null}}},[E,i,f,s,N.scenes]),Me=r.useMemo(()=>{const _=new Map;return ie=>{var cn;const He=_.get(ie.id);if(He!==void 0)return He;const Fe=wZ(ie,ve,(cn=t.find(Bt=>Bt.id===ie.engineId))==null?void 0:cn.displayName);return _.set(ie.id,Fe),Fe}},[ve,t]),Ze=r.useMemo(()=>xZ(Q.live,Q.archived,Se,Me),[Q,Se,Me]),ot=r.useMemo(()=>zt.reduce((_,ie)=>_+(Tt.has(ie.id)?0:1),0),[zt,Tt]),ke=r.useMemo(()=>bZ(Fh(pe,Se,Me),Zt),[pe,Se,Me,Zt]),Oe=r.useMemo(()=>{const _=new Map;for(const ie of m)_.has(ie.parentId)||_.set(ie.parentId,[]),_.get(ie.parentId).push(ie);return _},[m]),qe=m.find(_=>_.kind==="root")??null,_e=r.useMemo(()=>{const _=m.find(He=>He.id===T);return _||(ke.filter(He=>He.status!=="error")[0]??ke[0]??qe)},[m,T,ke,qe]),Le=r.useMemo(()=>m.find(_=>_.id===de&&_.kind!=="root"&&(_.status==="running"||_.status==="done"&&_.images.length>0))??null,[m,de]),dt=(Le==null?void 0:Le.images[Number.parseInt(Te,10)||0])??(Le==null?void 0:Le.images[0])??null,vt=r.useCallback(()=>{A(_=>{const ie=new URLSearchParams(_);return ie.delete("branch"),ie.delete("bi"),ie},{replace:!0})},[A]);r.useEffect(()=>{!de||Le||!y||(vt(),Qe({kind:"error",title:"That shot is no longer available to refine",detail:"Making a new shot."}))},[de,Le,y,vt,Qe]);const Dt=r.useCallback((_,ie=0)=>{var He;A(Fe=>{const cn=new URLSearchParams(Fe);return cn.set("branch",_),ie>0?cn.set("bi",String(ie)):cn.delete("bi"),cn},{replace:!0}),(He=tt.current)==null||He.focus()},[A]),$t=_=>{D(_),Pn(null)},yt=_=>M?Ye(_,0,!0):$t(_),mt=_=>Pn(_===0?null:String(_)),rn=async _=>{var ie,He;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"&&((He=_.brief)!=null&&He.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}},On=async _=>{try{await Ce.cancelNode(_.id),await bt()}catch(ie){Qe(dn(ie,"Could not cancel this shot"))}},Vn=r.useCallback(_=>{var ie,He,Fe;_!=null&&_.scene&&((ie=tt.current)==null||ie.applyScene(_.scene)),_!=null&&_.scenesPanel&&((He=tt.current)==null||He.openAttach("Scenes")),(Fe=tt.current)==null||Fe.focus()},[]);r.useEffect(()=>{k.get("compose")!==null&&(Vn(),A(_=>{const ie=new URLSearchParams(_);return ie.delete("compose"),ie},{replace:!0}))},[k,Vn,A]);const pn=k.get("showcase"),Kn=r.useRef(null);r.useEffect(()=>{if(!pn||!u||Kn.current===pn)return;Kn.current=pn;const _=c.find(ie=>ie.id===pn);_?(U(kh(_)),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 He=new URLSearchParams(ie);return He.delete("showcase"),He},{replace:!0})},[pn,u,c,A,Qe]),r.useEffect(()=>{const _=ie=>{var pr,Ka;const He=document.activeElement,Fe=((He==null?void 0:He.tagName)??"").toUpperCase(),cn=Fe==="INPUT"||Fe==="TEXTAREA"||Fe==="SELECT"||!!(He!=null&&He.closest('[contenteditable="true"]'));if(ie.key==="Enter"&&(ie.metaKey||ie.ctrlKey)){(pr=tt.current)==null||pr.submit(),ie.preventDefault();return}if(cn)return;if(ie.key==="?"){G(!0),ie.preventDefault();return}if(ie.key==="/"&&!M){(Ka=tt.current)==null||Ka.focus(),ie.preventDefault();return}if(ie.key==="Escape"&&P){G(!1),ie.preventDefault();return}if(ie.key==="Escape"&&M){it(),ie.preventDefault();return}if(ie.key==="Escape"&&ne.size>0){re(new Set),ie.preventDefault();return}if(ie.key==="Escape"&&de){vt(),ie.preventDefault();return}if(!_e)return;if(ie.key==="b"&&_e.kind!=="root"&&_e.status==="done"&&_e.images.length>0){Dt(_e.id),ie.preventDefault();return}if(ie.key==="k"&&_e.kind!=="root"&&_e.status==="done"){Xe(_e),ie.preventDefault();return}const Bt=(Oe.get(_e.parentId)??[]).filter(Ya=>Ya.kind!=="root"),Hn=Bt.findIndex(Ya=>Ya.id===_e.id);if(ie.key==="ArrowLeft"&&Hn>0)yt(Bt[Hn-1].id),ie.preventDefault();else if(ie.key==="ArrowRight"&&Hn>=0&&Hn<Bt.length-1)yt(Bt[Hn+1].id),ie.preventDefault();else if(ie.key==="ArrowUp"&&_e.parentId)yt(_e.parentId),ie.preventDefault();else if(ie.key==="ArrowDown"){const Ya=Oe.get(_e.id)??[];Ya.length&&(yt(Ya[0].id),ie.preventDefault())}else ie.key==="["&&Ot>0?mt(Ot-1):ie.key==="]"&&_e.images.length-1>Ot?mt(Ot+1):ie.key==="Enter"&&!M&&_e.kind!=="root"?Ye(_e.id):ie.key==="."&&!M&&oe()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[_e,Oe,Ot,M,P,ne.size,de,Dt,be]);const Ln=_=>re(ie=>{const He=new Set(ie);return He.delete(_)||He.add(_),He}),xn=r.useMemo(()=>m.filter(_=>ne.has(_.id)),[m,ne]),fe=r.useMemo(()=>{if(xn.length!==2)return null;const[_,ie]=xn;return _.status!=="done"||ie.status!=="done"||!_.images[0]||!ie.images[0]?null:[_,ie]},[xn]),Xe=async(_,ie=!_.kept)=>{try{await Ce.keep(_.id,ie),await bt()}catch(He){Qe(dn(He,"Could not update keeper status"))}},et=async()=>{const _=!(xn.length>0&&xn.every(ie=>ie.kept));try{await Promise.all(xn.filter(ie=>ie.kept!==_).map(ie=>Ce.keep(ie.id,_))),await bt()}catch(ie){Qe(dn(ie,"Could not update keeper status"))}},ut=async _=>{try{await Ce.addToSet(_.id,[...ne]),re(new Set),await bt()}catch(ie){Qe(dn(ie,"Could not add to the set"))}},De=r.useRef([]),[St,Jt]=r.useState(!1);r.useEffect(()=>{St&&Jt(!1)},[St]);const pt=async(_,ie)=>{const He=ie.trim();if(He)try{const Fe=await Ce.createSet(f.id,He);_.length>0&&await Ce.addToSet(Fe.id,_),re(new Set),await bt(),j(cc(f,Fe))}catch(Fe){Qe(dn(Fe,"Could not create the set"))}},jn=()=>{const _=De.current;return De.current=[],_},gn=async _=>{if(!e)return;const ie=_.trim();if(!(!ie||ie===e.name))try{const He=await Ce.renameSet(e.id,ie);b(He),j(cc(f,He),{replace:!0}),w()}catch(He){Qe(dn(He,"Could not rename the set"))}},Nt=async()=>{if(e)try{await Ce.deleteSet(e.id),C(e.id),j(cr(f),{replace:!0}),w()}catch(_){Qe(dn(_,"Could not delete the set"))}},Yn=bw(m),Mr=Z||Yn&&!J,sa=Yn?o.jsx(ZZ,{entries:c,catalogs:{demoProducts:i,presenters:s,scenes:n},stagedId:L,onOpenProduct:_=>j(Js(f,_)),onOpenPresenter:_=>j(al(f,_)),onOpenScene:_=>j(rl(f,_)),onUse:_=>{O(_.id),U(kh(_))}}):Se.trim()?o.jsx(sc,{text:`No shots match “${Se.trim()}”.`,onAll:kt,actionLabel:"Clear search"}):_t==="keepers"?o.jsx(sc,{text:"No keepers yet. Star a shot and it lands here.",onAll:()=>ae(null)}):_t==="archived"?o.jsx(sc,{text:"Nothing archived.",onAll:()=>ae(null)}):e?o.jsx(sc,{text:"Nothing in this set yet. Pick shots on All, then add them here."}):At?o.jsx(sc,{text:"Every shot is already in a set.",onAll:()=>he(null)}):null,Tn={nodes:m,loaded:y,brand:f,engines:t,projectId:xe,imageIndex:Ot,setImageIndex:mt,close:it,select:yt,retry:_=>{rn(_).then(ie=>{ie&&yt(ie)})},cancel:_=>void On(_),reload:()=>bt(),remix:_=>{U({..._.brief,_at:Date.now()}),_.brief&&A9(f.id,{tokens:u9(_.brief),tplFields:_.brief.templateFields??{},branchId:null}),it()},branch:_=>{Dt(_.id),it()},archive:_=>void Sn(_).then(()=>it()),unarchive:_=>void Ct(_),delete:_=>void mr(_).then(()=>it()),refined:(_,ie)=>{ie==="edit"&&be(_)},tokenNames:ve};return o.jsxs("div",{className:"sc-work","data-assets":Mr,children:[o.jsxs("main",{className:"sc-canvas",id:"main","data-firstrun":Yn||void 0,children:[ee&&o.jsx("div",{className:"sc-canvas-alert",children:o.jsx(sp,{failure:oo(ee)})}),(!Yn||e)&&o.jsx(TZ,{sets:g,active:e,ungrouped:At,ungroupedCount:ot,onPlaceAll:()=>e?j(cr(f)):he(null),onPlaceUngrouped:()=>e?j(`${cr(f)}?in=ungrouped`):he("ungrouped"),onOpenSet:_=>j(cc(f,_)),onNewSet:_=>void pt(jn(),_),onResetNewSet:()=>{De.current=[]},onRenameSet:_=>void gn(_),onDeleteSet:()=>void Nt(),askCreate:St,lens:_t,lensCounts:Ze,onLens:_=>ae(_==="all"?null:_),q:Se,onQ:at,searchTotal:pe.length,sort:Zt,onSort:Xt,tile:Ae,onTile:Pe,assets:Z,onAssets:oe,showAssets:!J}),F&&o.jsxs("div",{className:"sc-lineage-bar",children:[o.jsx("button",{type:"button",className:"sc-crumb-back",onClick:()=>ge(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(NZ,{nodes:ke,selectedId:(_e==null?void 0:_e.id)??null,onOpen:Ye,onRetry:_=>void rn(_),onCancel:_=>void On(_),onToggleKeep:_=>void Xe(_),onArchive:_=>_.archived?Ct(_):Sn(_),onDeletePermanently:mr,engineName:_=>{var ie;return(ie=t.find(He=>He.id===_))==null?void 0:ie.displayName},setsFor:_=>Tt.get(_)??[],picked:ne,onPick:Ln,sending:z,onBranch:Dt,branchingFrom:(Le==null?void 0:Le.id)??null,branchingFromImage:dt,expanded:st,onToggleExpand:_=>ht(ie=>{const He=new Set(ie);return He.delete(_)||He.add(_),He}),versionsOf:_=>{var ie;return((ie=rr.get(_))==null?void 0:ie.length)??0},onVersions:ge,tile:Ae,empty:sa})]}),fe&&o.jsx(B9,{open:yn,onOpenChange:Rn,a:fe[0],b:fe[1],imageA:fe[0].images[0],imageB:fe[1].images[0]}),Mr&&o.jsx("div",{className:"sc-assets-backdrop",onClick:()=>W(!1),"aria-hidden":!0}),o.jsx(CZ,{open:P,onOpenChange:G}),!J&&o.jsx(LZ,{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 He;return(He=tt.current)==null?void 0:He.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:()=>W(!1)}),o.jsxs(M9,{full:!Mr,children:[ne.size>0&&o.jsx(OZ,{count:ne.size,sets:g,onAdd:_=>void ut(_),onNew:()=>{De.current=[...ne],Jt(!0)},onClear:()=>re(new Set),onKeep:()=>void et(),allKept:xn.length>0&&xn.every(_=>_.kept),comparable:fe,onCompare:()=>Rn(!0),archivedLens:_t==="archived",pickedIds:[...ne],onRestoreBatch:_=>void Nr(_).then(()=>re(new Set)),onDeleteBatch:_=>void ct(_).then(()=>re(new Set))}),o.jsx(Ap,{ref:tt,projectId:xe||null,brand:f,engines:t,parent:qe,shots:m,initialBrief:X,suppressDraftRestore:pn!==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:Le,onClearTarget:vt,onRestoreBranchId:be,setSlug:(e==null?void 0:e.slug)??null,onSending:ue,onAttached:K,sourceImage:dt??void 0,onQueued:(_,ie)=>{U(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 He=()=>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(He):bt().then(Fe).finally(He)}})]}),o.jsx(Xh,{context:Tn})]})}function zZ(e){return e.width&&e.height?`${e.width} x ${e.height}`:"untouched render"}function BZ({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,b=w.length>0?1:0,C=async()=>{m(!0),v(null);try{w.length>0&&await QH(n,w,s),t(!1)}catch(N){v(N instanceof Error?N.message:"Export failed")}finally{m(!1)}},E=i.map(N=>({id:N.id,label:N.label.replace(/\s*\d+×\d+$/,""),note:zZ(N)}));return o.jsx(el,{open:e,onOpenChange:t,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:su,children:[o.jsx(ru,{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:E.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":b===0||h||void 0,title:b===0&&!h?"Pick at least one size to download":void 0,onClick:()=>{b!==0&&!h&&C()},children:h?o.jsx(on,{size:"1"}):b===0?"Download":b>1?"Download both":w.length>0?"Download zip":"Download PNG"})]})})}function UZ(e){var t;return Q0((t=e.brief)==null?void 0:t.format)}function WZ({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:b,clientHeight:C}=c;if(!y||!w||!b||!C)return;const E=Math.min(b/y,C/w),N=y*E,j=w*E;h({left:(b-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(W0,{className:"sc-frame",p:"8",children:o.jsxs(dr,{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":UZ(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:[lp(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"?jw():oo(e.error,i);return o.jsx(ap,{failure:v,density:"stage",onRetry:n})}return o.jsx(dr,{justify:"center",children:o.jsx(W0,{className:"sc-frame",style:{display:"inline-block",maxWidth:"100%"},children:e.status==="done"&&e.images[t]&&o.jsxs(W0,{position:"relative",style:{lineHeight:0},children:[o.jsx("img",{ref:u,src:tn(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 GZ(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(YZ,{...e,node:t})})}):o.jsx(dr,{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 KZ({children:e}){return o.jsx("div",{className:"sc-eyebrow",style:{margin:"16px 0 7px"},children:e})}function YZ({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:kZ(e)||"(none)"}),t&&o.jsxs(o.Fragment,{children:[o.jsx(KZ,{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(cs,{label:"Delete this shot permanently",title:"Delete this shot permanently?",body:"This cannot be undone.",busy:!1,onConfirm:n,fullWidth:!0})})]})}function qZ({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 XZ({brief:e,brand:t}){var g,v;const{scenes:n,presenters:s,demoProducts:i}=mn(),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=lu(t),m=c.flatMap(y=>{var w,b,C,E;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?Zn((b=(w=N==null?void 0:N.shots)==null?void 0:w[0])==null?void 0:b.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?Zn(N==null?void 0:N.preview)??Zn((E=(C=N==null?void 0:N.shots)==null?void 0:C[0])==null?void 0:E.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:Sp(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]}),b=y.tint?{"--tint":y.tint}:void 0;return y.to?o.jsx(em,{className:"sc-ingredient",to:y.to,"data-kind":y.kind,"data-tinted":y.tint?"":void 0,style:b,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:b,title:`${y.kind}: ${y.label}`,children:w},y.key)})}):null}function QZ(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 JZ({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:b,onDelete:C,onRefined:E,tokenNames:N}){const{ancestors:j,children:k,siblings:A,sibIndex:M,root:T,parentShot:D}=QZ(t,e),P=r.useMemo(()=>s.find(ae=>ae.id===e.engineId),[s,e.engineId]),{push:G}=hr(),I=r.useMemo(()=>z9(e,D),[e,D]),oe=r.useMemo(()=>D?jZ(D.brief,e.brief,N):null,[D,e.brief,N]),[W,J]=r.useState(!1),[Z,ee]=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",U=async()=>{try{const ae=await(await fetch(tn(K))).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":ae})]),G({kind:"success",title:"Copied to clipboard"})}catch(ae){G(dn(ae,"Copy failed"))}};r.useEffect(()=>{const ae=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ae}},[]);const L=[{key:"export",label:"Export",icon:o.jsx(Mx,{size:14}),onClick:()=>J(!0)},{key:"keep",label:e.kept?"Remove from keepers":"Keep",icon:o.jsx(wh,{size:14,weight:e.kept?"fill":"regular"}),onClick:()=>void Ce.keep(e.id,!e.kept).then(v).catch(ae=>G(dn(ae,"Could not update keeper status"))),tint:e.kept?"var(--sc-star)":void 0},{key:"copy",label:"Copy image",icon:o.jsx(AH,{size:14}),onClick:()=>void U()},...I?[{key:"compare",label:"Compare with source",icon:o.jsx(EH,{size:14}),onClick:()=>ee(!0)}]:[]],O=[{key:"archive",label:e.archived?"Restore":"Archive",icon:e.archived?o.jsx(Tc,{size:14}):o.jsx(yh,{size:14}),onClick:()=>e.archived?b(e):w(e)},...e.archived?[{key:"delete",label:"Delete permanently",icon:o.jsx(X1,{size:14}),onClick:()=>H(!0),tint:"var(--sc-red)"}]:[]],ne=e.status==="done"&&e.images.length>0,re=ne?[...L,...O]:O,le=(ae,me=!1)=>o.jsxs("button",{type:"button",className:"sc-fr","data-fb-node":ae.id,"data-current":me,"data-failed":ae.status==="error"||!ae.images[0]&&ae.status!=="running"&&ae.status!=="cancelled","data-cancelled":ae.status==="cancelled"&&!ae.images[0],title:Cn(ae),onClick:()=>h(ae.id),children:[ae.images[0]?o.jsx("img",{src:tn(ae.images[0]),alt:""}):ae.status==="running"?o.jsx("span",{className:"sc-shimmer"}):ae.status==="cancelled"?o.jsx(yw,{size:13}):o.jsx(au,{size:13}),ae.kept&&o.jsx("span",{className:"sc-fr-star",children:o.jsx(wh,{size:11,weight:"fill"})})]},ae.id);return na.createPortal(o.jsx(Uc,{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(q1,{size:13})})]})]}),re.length>0&&o.jsxs("div",{className:"sc-ovl-bar-r",children:[o.jsx("div",{className:"sc-ovl-acts",children:re.map(ae=>o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:ae.onClick,"aria-label":ae.label,title:ae.label,style:ae.tint?{color:ae.tint}:void 0,children:ae.icon},ae.key))}),o.jsxs(_o,{children:[o.jsx(Zo,{children:o.jsx("button",{type:"button",className:"sc-icon-btn sc-ovl-overflow","aria-label":"More actions",children:o.jsx(MH,{size:18,weight:"bold"})})}),o.jsx(Oo,{align:"end",sideOffset:6,children:re.map(ae=>o.jsxs(Qr,{onSelect:ae.onClick,color:ae.tint?"red":void 0,children:[ae.icon,ae.label]},ae.key))})]})]})]}),o.jsx(Xc,{open:q,onOpenChange:H,children:o.jsxs(Qc,{maxWidth:"420px",children:[o.jsx(Jc,{children:"Delete this shot permanently?"}),o.jsx(eu,{size:"2",children:"This cannot be undone."}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{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(WZ,{node:e,imageIndex:c,onRetry:()=>m(e),onCancel:()=>g(e),engineName:P==null?void 0:P.displayName}),e.status==="done"&&e.images.length>1&&o.jsx("div",{className:"sc-thumbs",children:e.images.map((ae,me)=>o.jsx("button",{type:"button",className:"sc-thumb-btn",onClick:()=>u(me),"aria-label":`Image ${me+1}`,"aria-pressed":me===c,children:o.jsx("img",{src:tn(ae),alt:"",className:"sc-thumb","data-active":me===c,width:52,height:52})},ae))})]}),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}),ne&&o.jsxs("small",{className:"sc-ovl-spend",title:e.costUsd>0?"Of your API budget":"No API cost for this shot",children:[o.jsx(qZ,{size:12}),e.costUsd>0?`$${e.costUsd.toFixed(2)}`:"Free"]})]}),o.jsx(XZ,{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:tn(I),alt:""}),o.jsxs("span",{className:"sc-ctx-chip-t",children:["refined from ",o.jsx("b",{children:Cn(D)})]})]}),oe&&o.jsx("p",{className:"sc-ctx-changed",children:oe})]}),(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(ae=>o.jsxs("span",{style:{display:"contents"},children:[le(ae),o.jsx("span",{className:"sc-wire"})]},ae.id)),le(e,!0),k.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-wire"}),k.slice(0,4).map(ae=>le(ae))]})]})]}),(ne||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(G0,{size:12})," Reuse setup"]}),ne&&o.jsxs("button",{type:"button",className:"sc-s",onClick:()=>m(e),title:"Run the same setup again for a different take",children:[o.jsx(Tc,{size:12})," Try again"]})]}),o.jsx("div",{className:"sc-ovl-body",children:o.jsx(GZ,{node:e.kind!=="root"?e:null,nodes:t,imageIndex:c,onChanged:v,brand:n,onExport:()=>J(!0),onCompare:I?()=>ee(!0):void 0,onArchive:()=>w(e),onUnarchive:()=>b(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(Ap,{projectId:i,brand:n,engines:s,parent:T,target:e,sourceImage:K,shots:t,persistDraft:!1,onQueued:async(ae,me)=>{await v(),ae&&h(ae),ae&&(E==null||E(ae,me))}})]})]}),o.jsx(BZ,{open:W,onOpenChange:J,hash:K,baseName:X}),D&&I&&o.jsx(B9,{open:Z,onOpenChange:ee,a:D,b:e,imageA:I,imageB:K})]})}),document.body)}function hv(){const{shotId:e}=Ba(),t=YE(),{push:n}=hr(),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(on,{size:"3"})}):o.jsx(JZ,{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(on,{size:"3"})})}function eO(){const e=Qv();return o.jsx(dr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(sp,{failure:oo(String((e==null?void 0:e.message)??e))})})}function tO(){const{setSlug:e=""}=Ba(),{pathname:t,search:n}=ln(),{brand:s,sets:i,loaded:c,refresh:u}=It(),f=nn(),h=or({path:Ke.set,end:!1}),m=i.find(y=>y.slug===e)??i.find(y=>y.id===e)??null;J1(m==null?void 0:m.name);const[g,v]=r.useState(null);if(r.useEffect(()=>{if(!c||m)return;if(g===e){f(cr(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(U9,{set:m},m.id)}function nO(){const{pathname:e,search:t}=ln();return o.jsx(Ys,{to:tD(e,t),replace:!0})}function rO(){const{brandSlug:e}=Ba();return o.jsx(Ys,{to:`/${e}?settings=brand`,replace:!0})}function aO(){const{sceneId:e}=Ba();return o.jsx(eZ,{},e)}function sO(){const{presenterId:e}=Ba();return o.jsx(rZ,{},e)}function oO(){const{productId:e}=Ba();return o.jsx(pZ,{},e)}const lO=BC([{element:o.jsx(WF,{}),errorElement:o.jsx(eO,{}),children:[{index:!0,element:o.jsx(_F,{})},{path:Ke.setup,element:o.jsx(GF,{})},{path:Ke.legacy,element:o.jsx(nO,{})},{path:Ke.brand,element:o.jsx(OF,{}),children:[{index:!0,element:o.jsx(q_,{})},{path:Ke.hub,element:o.jsx(U9,{set:null}),children:[{path:Ke.hubShot,element:o.jsx(hv,{})}]},{path:Ke.set,element:o.jsx(tO,{}),children:[{path:Ke.setShot,element:o.jsx(hv,{})}]},{path:Ke.kit,element:o.jsx(rO,{})},{path:Ke.products,element:o.jsx(oZ,{})},{path:Ke.product,element:o.jsx(oO,{})},{path:Ke.scenes,element:o.jsx(Q_,{})},{path:Ke.scene,element:o.jsx(aO,{})},{path:Ke.presenters,element:o.jsx(nZ,{})},{path:Ke.presenter,element:o.jsx(sO,{})}]},{path:Ke.notFound,element:o.jsx(Ys,{to:Ke.root,replace:!0})}]}]),I2=localStorage.getItem("sc-theme")??localStorage.getItem("bt-theme");document.documentElement.dataset.theme=I2==="light"||I2==="dark"?I2:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";Lb.createRoot(document.getElementById("root")).render(o.jsx(Ft.StrictMode,{children:o.jsx(lT,{children:o.jsx(UH,{children:o.jsx(mC,{router:lO})})})}));
|
|
99
|
+
`)?v.value.length:0;requestAnimationFrame(()=>{try{v.setSelectionRange(y,y)}catch{}v.focus()})}},r.createElement("input",{spellCheck:"false",...h,ref:rm(n,t),className:"rt-reset rt-TextFieldInput"}),s)});Kl.displayName="TextField.Root";const JL=r.forwardRef((e,t)=>{const{className:n,color:s,side:i,...c}=hn(e,QL);return r.createElement("div",{"data-accent-color":s,"data-side":i,...c,ref:t,className:Je("rt-TextFieldSlot",n)})});JL.displayName="TextField.Slot";const ir={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 Q5(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}const ph="scenri:pref-changed";function J5(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}try{window.dispatchEvent(new CustomEvent(ph,{detail:{key:e,value:t}}))}catch{}}function gh(e,t){try{const n=localStorage.getItem(e);return n===null?null:(localStorage.setItem(t,n),localStorage.removeItem(e),n)}catch{return null}}function Za(e,t){const[n,s]=r.useState(()=>Q5(e,t));return r.useEffect(()=>{J5(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(ph,i),()=>window.removeEventListener(ph,i)},[e]),[n,s]}function eT(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 p2(e,t){const[n,s]=Za(e,t),[i,c]=r.useState(null);return[i??n,f=>{c(null),s(f)},c]}const tT=()=>Q5(ir.lastBrand,null),nT=e=>J5(ir.lastBrand,e),vh="sc-theme",rT="bt-theme",aT=()=>window.matchMedia("(prefers-color-scheme: light)").matches,ex=r.createContext({choice:"system",mode:"dark",setChoice:()=>{},toggle:()=>{}}),sT=()=>r.useContext(ex);function oT(){const e=localStorage.getItem(vh)??gh(rT,vh);return e==="light"||e==="dark"||e==="system"?e:"system"}function lT({children:e}){const[t,n]=r.useState(oT),[s,i]=r.useState(()=>aT()?"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(vh,t)},[c,t]);const u=r.useMemo(()=>({choice:t,mode:c,setChoice:n,toggle:()=>n(c==="dark"?"light":"dark")}),[t,c]);return o.jsx(ex.Provider,{value:u,children:o.jsx(Wa,{appearance:c,accentColor:"gray",grayColor:"gray",radius:"large",scaling:"100%",children:e})})}const iT=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"}))]]),cT=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"}))]]),uT=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"}))]]),dT=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"}))]]),fT=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"}))]]),hT=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"}))]]),mT=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"}))]]),pT=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"}))]]),gT=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"}))]]),vT=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"}))]]),yT=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"}))]]),xT=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"}))]]),wT=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"}))]]),bT=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"}))]]),ET=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"}))]]),CT=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"}))]]),ST=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"}))]]),jT=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"}))]]),kT=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"}))]]),AT=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"}))]]),NT=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"}))]]),MT=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"}))]]),RT=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"}))]]),PT=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"}))]]),LT=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"}))]]),TT=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"}))]]),HT=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"}))]]),DT=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"}))]]),$T=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"}))]]),FT=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"}))]]),IT=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"}))]]),_T=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,68H190.06A33.82,33.82,0,0,0,196,49.69,36.62,36.62,0,0,0,158.31,12,33.44,33.44,0,0,0,134,23.25a54.65,54.65,0,0,0-6,8.3,54.65,54.65,0,0,0-6-8.3A33.44,33.44,0,0,0,97.69,12,36.62,36.62,0,0,0,60,49.69,33.82,33.82,0,0,0,65.94,68H40A20,20,0,0,0,20,88v32a20,20,0,0,0,16,19.6V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V139.6A20,20,0,0,0,236,120V88A20,20,0,0,0,216,68Zm-4,48H140V92h72ZM152,39.17A9.59,9.59,0,0,1,159,36h.35A12.62,12.62,0,0,1,172,49,9.59,9.59,0,0,1,168.83,56c-6.9,6.12-18.25,9.26-27.63,10.76C142.7,57.42,145.84,46.07,152,39.17ZM87.7,39.7A12.8,12.8,0,0,1,96.61,36H97A9.59,9.59,0,0,1,104,39.17c6.12,6.9,9.26,18.24,10.75,27.61C105.45,65.27,94,62.13,87.17,56A9.59,9.59,0,0,1,84,49,12.72,12.72,0,0,1,87.7,39.7ZM44,92h72v24H44Zm16,48h56v56H60Zm80,56V140h56v56Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,128v72a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V128Z",opacity:"0.2"}),r.createElement("path",{d:"M216,72H180.92c.39-.33.79-.65,1.17-1A29.53,29.53,0,0,0,192,49.57,32.62,32.62,0,0,0,158.44,16,29.53,29.53,0,0,0,137,25.91a54.94,54.94,0,0,0-9,14.48,54.94,54.94,0,0,0-9-14.48A29.53,29.53,0,0,0,97.56,16,32.62,32.62,0,0,0,64,49.57,29.53,29.53,0,0,0,73.91,71c.38.33.78.65,1.17,1H40A16,16,0,0,0,24,88v32a16,16,0,0,0,16,16v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V136a16,16,0,0,0,16-16V88A16,16,0,0,0,216,72ZM149,36.51a13.69,13.69,0,0,1,10-4.5h.49A16.62,16.62,0,0,1,176,49.08a13.69,13.69,0,0,1-4.5,10c-9.49,8.4-25.24,11.36-35,12.4C137.7,60.89,141,45.5,149,36.51Zm-64.09.36A16.63,16.63,0,0,1,96.59,32h.49a13.69,13.69,0,0,1,10,4.5c8.39,9.48,11.35,25.2,12.39,34.92-9.72-1-25.44-4-34.92-12.39a13.69,13.69,0,0,1-4.5-10A16.6,16.6,0,0,1,84.87,36.87ZM40,88h80v32H40Zm16,48h64v64H56Zm144,64H136V136h64Zm16-80H136V88h80v32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H180.92c.39-.33.79-.65,1.17-1A29.53,29.53,0,0,0,192,49.57,32.62,32.62,0,0,0,158.44,16,29.53,29.53,0,0,0,137,25.91a54.94,54.94,0,0,0-9,14.48,54.94,54.94,0,0,0-9-14.48A29.53,29.53,0,0,0,97.56,16,32.62,32.62,0,0,0,64,49.57,29.53,29.53,0,0,0,73.91,71c.38.33.78.65,1.17,1H40A16,16,0,0,0,24,88v32a16,16,0,0,0,16,16v64a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V120H40V88h80v32h16V88h80v32H136v92a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V136a16,16,0,0,0,16-16V88A16,16,0,0,0,216,72ZM84.51,59a13.69,13.69,0,0,1-4.5-10A16.62,16.62,0,0,1,96.59,32h.49a13.69,13.69,0,0,1,10,4.5c8.39,9.48,11.35,25.2,12.39,34.92C109.71,70.39,94,67.43,84.51,59Zm87,0c-9.49,8.4-25.24,11.36-35,12.4C137.7,60.89,141,45.5,149,36.51a13.69,13.69,0,0,1,10-4.5h.49A16.62,16.62,0,0,1,176,49.08,13.69,13.69,0,0,1,171.49,59Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,74H174.74a46.41,46.41,0,0,0,6-4.48,27.56,27.56,0,0,0,9.22-20A30.63,30.63,0,0,0,158.5,18a27.56,27.56,0,0,0-20,9.22A57.1,57.1,0,0,0,128,45.76a57.1,57.1,0,0,0-10.48-18.53A27.56,27.56,0,0,0,97.5,18,30.63,30.63,0,0,0,66,49.51a27.56,27.56,0,0,0,9.22,20,45.74,45.74,0,0,0,6,4.48H40A14,14,0,0,0,26,88v32a14,14,0,0,0,14,14h2v66a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V134h2a14,14,0,0,0,14-14V88A14,14,0,0,0,216,74ZM135.77,63c2.25-12.12,6.29-21.75,11.69-27.85A15.68,15.68,0,0,1,158.86,30h.55A18.6,18.6,0,0,1,178,49.14a15.68,15.68,0,0,1-5.18,11.4C162.1,70,143.92,72.83,134.34,73.65,134.59,70.76,135,67.08,135.77,63ZM83.45,35.45A18.69,18.69,0,0,1,96.59,30h.55a15.68,15.68,0,0,1,11.4,5.18C118,45.9,120.83,64.08,121.65,73.66c-2.89-.25-6.57-.68-10.61-1.43C98.92,70,89.29,65.94,83.19,60.53A15.64,15.64,0,0,1,78,49.14,18.65,18.65,0,0,1,83.45,35.45ZM38,120V88a2,2,0,0,1,2-2h82v36H40A2,2,0,0,1,38,120Zm16,80V134h68v68H56A2,2,0,0,1,54,200Zm148,0a2,2,0,0,1-2,2H134V134h68Zm16-80a2,2,0,0,1-2,2H134V86h82a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H180.92c.39-.33.79-.65,1.17-1A29.53,29.53,0,0,0,192,49.57,32.62,32.62,0,0,0,158.44,16,29.53,29.53,0,0,0,137,25.91a54.94,54.94,0,0,0-9,14.48,54.94,54.94,0,0,0-9-14.48A29.53,29.53,0,0,0,97.56,16,32.62,32.62,0,0,0,64,49.57,29.53,29.53,0,0,0,73.91,71c.38.33.78.65,1.17,1H40A16,16,0,0,0,24,88v32a16,16,0,0,0,16,16v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V136a16,16,0,0,0,16-16V88A16,16,0,0,0,216,72ZM149,36.51a13.69,13.69,0,0,1,10-4.5h.49A16.62,16.62,0,0,1,176,49.08a13.69,13.69,0,0,1-4.5,10c-9.49,8.4-25.24,11.36-35,12.4C137.7,60.89,141,45.5,149,36.51Zm-64.09.36A16.63,16.63,0,0,1,96.59,32h.49a13.69,13.69,0,0,1,10,4.5c8.39,9.48,11.35,25.2,12.39,34.92-9.72-1-25.44-4-34.92-12.39a13.69,13.69,0,0,1-4.5-10A16.6,16.6,0,0,1,84.87,36.87ZM40,88h80v32H40Zm16,48h64v64H56Zm144,64H136V136h64Zm16-80H136V88h80v32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,76H166.81a50.54,50.54,0,0,0,12.63-8A25.53,25.53,0,0,0,188,49.44,28.62,28.62,0,0,0,158.56,20,25.53,25.53,0,0,0,140,28.56c-5.91,6.67-9.63,15.36-12,23.69-2.35-8.33-6.07-17-12-23.69A25.53,25.53,0,0,0,97.44,20,28.62,28.62,0,0,0,68,49.44,25.53,25.53,0,0,0,76.56,68a50.54,50.54,0,0,0,12.63,8H40A12,12,0,0,0,28,88v32a12,12,0,0,0,12,12h4v68a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V132h4a12,12,0,0,0,12-12V88A12,12,0,0,0,216,76ZM146,33.86A17.59,17.59,0,0,1,158.8,28h.61A20.62,20.62,0,0,1,180,49.2,17.6,17.6,0,0,1,174.14,62c-12.09,10.7-33.07,13.21-42,13.79C132.76,66.93,135.26,46,146,33.86ZM76,49.2A20.62,20.62,0,0,1,96.59,28h.61A17.59,17.59,0,0,1,110,33.86c10.71,12.09,13.21,33.07,13.79,42-8.89-.58-29.87-3.09-42-13.79A17.6,17.6,0,0,1,76,49.2ZM36,120V88a4,4,0,0,1,4-4h84v40H40A4,4,0,0,1,36,120Zm16,80V132h72v72H56A4,4,0,0,1,52,200Zm152,0a4,4,0,0,1-4,4H132V132h72Zm16-80a4,4,0,0,1-4,4H132V84h84a4,4,0,0,1,4,4Z"}))]]),ZT=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"}))]]),OT=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"}))]]),VT=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"}))]]),zT=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"}))]]),BT=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"}))]]),UT=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"}))]]),WT=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"}))]]),GT=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"}))]]),KT=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"}))]]),YT=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"}))]]),qT=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"}))]]),XT=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"}))]]),QT=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"}))]]),JT=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"}))]]),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,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"}))]]),tH=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"}))]]),nH=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"}))]]),rH=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"}))]]),aH=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"}))]]),sH=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"}))]]),oH=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"}))]]),lH=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"}))]]),iH=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"}))]]),cH=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"}))]]),uH=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"}))]]),dH=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"}))]]),fH=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"}))]]),hH=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"}))]]),mH=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"}))]]),pH=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"}))]]),gH=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"}))]]),vH=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,...b}=r.useContext(vH);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,...b,...m},!!n&&r.createElement("title",null,n),f,h.get(c??y))});Be.displayName="IconBase";const tx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:iT}));tx.displayName="ApertureIcon";const yH=tx,nx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:cT}));nx.displayName="ArchiveIcon";const yh=nx,rx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:uT}));rx.displayName="ArrowCircleUpIcon";const ax=rx,sx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:dT}));sx.displayName="ArrowClockwiseIcon";const Jm=sx,ox=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:fT}));ox.displayName="ArrowCounterClockwiseIcon";const Tc=ox,lx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:hT}));lx.displayName="ArrowLineUpIcon";const xH=lx,ix=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:mT}));ix.displayName="ArrowRightIcon";const dg=ix,cx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:pT}));cx.displayName="ArrowSquareOutIcon";const K1=cx,ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:gT}));ux.displayName="ArrowUpIcon";const wH=ux,dx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:vT}));dx.displayName="ArrowsClockwiseIcon";const G0=dx,fx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:yT}));fx.displayName="ArrowsDownUpIcon";const bH=fx,hx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:xT}));hx.displayName="ArrowsLeftRightIcon";const EH=hx,mx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:wT}));mx.displayName="BellIcon";const fg=mx,px=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:bT}));px.displayName="BookmarkSimpleIcon";const Y1=px,gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ET}));gx.displayName="BroomIcon";const CH=gx,vx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:CT}));vx.displayName="CaretDownIcon";const ai=vx,yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ST}));yx.displayName="CaretLeftIcon";const wi=yx,xx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:jT}));xx.displayName="CaretRightIcon";const q1=xx,wx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:kT}));wx.displayName="CheckIcon";const ya=wx,bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:AT}));bx.displayName="CheckCircleIcon";const SH=bx,Ex=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:NT}));Ex.displayName="CircleIcon";const jH=Ex,Cx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:MT}));Cx.displayName="ClockCounterClockwiseIcon";const kH=Cx,Sx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:RT}));Sx.displayName="CopyIcon";const hg=Sx,jx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:PT}));jx.displayName="CopySimpleIcon";const AH=jx,kx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:LT}));kx.displayName="DatabaseIcon";const NH=kx,Ax=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:TT}));Ax.displayName="DotsThreeIcon";const MH=Ax,Nx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:HT}));Nx.displayName="DownloadSimpleIcon";const Mx=Nx,Rx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:DT}));Rx.displayName="FilmSlateIcon";const ep=Rx,Px=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:$T}));Px.displayName="FolderSimpleIcon";const Lx=Px,Tx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:FT}));Tx.displayName="FrameCornersIcon";const RH=Tx,Hx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:IT}));Hx.displayName="GearSixIcon";const PH=Hx,Dx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:_T}));Dx.displayName="GiftIcon";const LH=Dx,$x=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:ZT}));$x.displayName="HouseIcon";const TH=$x,Fx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:OT}));Fx.displayName="IdentificationBadgeIcon";const tp=Fx,Ix=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:VT}));Ix.displayName="ImageSquareIcon";const Ga=Ix,_x=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:zT}));_x.displayName="InfoIcon";const np=_x,Zx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:BT}));Zx.displayName="KeyIcon";const Ox=Zx,Vx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:UT}));Vx.displayName="LightningIcon";const u1=Vx,zx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:WT}));zx.displayName="MagnifyingGlassIcon";const Hc=zx,Bx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:GT}));Bx.displayName="MountainsIcon";const HH=Bx,Ux=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:KT}));Ux.displayName="PackageIcon";const rp=Ux,Wx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:YT}));Wx.displayName="PaintBrushBroadIcon";const DH=Wx,Gx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:qT}));Gx.displayName="PaletteIcon";const $H=Gx,Kx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:XT}));Kx.displayName="PencilLineIcon";const mg=Kx,Yx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:QT}));Yx.displayName="PiggyBankIcon";const FH=Yx,qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:JT}));qx.displayName="PlusIcon";const nr=qx,Xx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:eH}));Xx.displayName="PlusCircleIcon";const IH=Xx,Qx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:tH}));Qx.displayName="SidebarSimpleIcon";const _H=Qx,Jx=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:nH}));Jx.displayName="SignInIcon";const ZH=Jx,ew=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:rH}));ew.displayName="SlidersHorizontalIcon";const tw=ew,nw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:aH}));nw.displayName="SparkleIcon";const OH=nw,rw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:sH}));rw.displayName="StackIcon";const xh=rw,aw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:oH}));aw.displayName="StarIcon";const wh=aw,sw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:lH}));sw.displayName="StorefrontIcon";const VH=sw,ow=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:iH}));ow.displayName="SunIcon";const zH=ow,lw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:cH}));lw.displayName="TrashIcon";const iw=lw,cw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:uH}));cw.displayName="TrashSimpleIcon";const X1=cw,uw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:dH}));uw.displayName="UploadSimpleIcon";const dw=uw,fw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:fH}));fw.displayName="UserIcon";const BH=fw,hw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:hH}));hw.displayName="WarningIcon";const mw=hw,pw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:mH}));pw.displayName="WarningCircleIcon";const au=pw,gw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:pH}));gw.displayName="XIcon";const Mn=gw,vw=r.forwardRef((e,t)=>r.createElement(Be,{ref:t,...e,weights:gH}));vw.displayName="XCircleIcon";const yw=vw,xw=r.createContext({push:()=>{}}),hr=()=>r.useContext(xw),pg=4;function UH({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<=pg)return m;const g=[...m];for(;g.length>pg;){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(xw.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(SH,{className:"sc-toast-ok",size:17,weight:"fill"}):o.jsx(au,{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 WH=(e,t,n)=>Re("DELETE",`/api/brands/${e}/${t}/${n}`),GH=(e,t)=>WH(e,"products",t);async function KH(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 YH=e=>`/api/brands/${e}/export`;async function qH(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 ww(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 XH(e,t){try{fetch(`/api/brands/${e}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({brand:t}),keepalive:!0})}catch{}}const tn=e=>`/api/images/${e}`,Zn=e=>e!=null&&e.startsWith("asset:")?tn(e.slice(6)):null;async function QH(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 bw(e){return e.every(t=>t.kind==="root")}let Ew=new Map;function JH(e){const t=new Map;for(const n of e)for(const s of n.legacyNames??[])s!==n.name&&t.set(s,n.name);Ew=t}function Cn(e){var s;const t=(s=/^\[([^\]]+)\]/.exec(e.prompt))==null?void 0:s[1];return t?Ew.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`)},Ke={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(Ke.brand,{brandSlug:e.slug}),eD=e=>ea(Ke.kit,{brandSlug:e.slug}),K0=e=>ea(Ke.products,{brandSlug:e.slug}),Js=(e,t)=>ea(Ke.product,{brandSlug:e.slug,productId:t}),gc=e=>ea(Ke.scenes,{brandSlug:e.slug}),rl=(e,t)=>ea(Ke.scene,{brandSlug:e.slug,sceneId:t}),vc=e=>ea(Ke.presenters,{brandSlug:e.slug}),al=(e,t)=>ea(Ke.presenter,{brandSlug:e.slug,presenterId:t}),cr=e=>ea(Ke.hub,{brandSlug:e.slug}),cc=(e,t)=>ea(Ke.set,{brandSlug:e.slug,setSlug:t.slug}),Q1=(e,t,n)=>t?ea(Ke.setShot,{brandSlug:e.slug,setSlug:t.slug,shotId:n}):ea(Ke.hubShot,{brandSlug:e.slug,shotId:n});function tD(e,t=""){const[,,n,...s]=e.split("/");if(!n)return Ke.root;const i=`/${n}${nD(s)}`;return t?i+t:i}function nD(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 g2="Scenri",gg=" - ",vg=40,rD=[["whatsnew","What's new"],["setup","Providers"],["settings","Settings"]],aD=[[Ke.setup,"Set up",!1],[Ke.hubShot,"Shot",!1],[Ke.setShot,"Shot",!1],[Ke.hub,"Create",!1],[Ke.set,"Create",!0],[Ke.kit,"Brand kit",!1],[Ke.product,"Products",!0],[Ke.products,"Products",!1],[Ke.scene,"Scenes",!0],[Ke.scenes,"Scenes",!1],[Ke.presenter,"Presenters",!0],[Ke.presenters,"Presenters",!1],[Ke.brand,"Home",!1]];function sD(e){if(!e)return null;const t=e.replace(/[\u0000-\u001F\u007F-\u009F]/g," ").replace(/\s+/g," ").trim();return t?t.length>vg?`${t.slice(0,vg-1).trimEnd()}…`:t:null}function oD(e,t="",n=null){const s=new URLSearchParams(t);for(const[i,c]of rD)if(s.has(i))return c+gg+g2;for(const[i,c,u]of aD)if(Ql(i,e))return((u?sD(n):null)??c)+gg+g2;return g2}const Cw=r.createContext(null);function lD(){const{pathname:e,search:t}=ln(),[n,s]=r.useState(null);return r.useEffect(()=>{document.title=oD(e,t,n)},[e,t,n]),s}function J1(e){const t=r.useContext(Cw);r.useEffect(()=>{if(t)return t(e??null),()=>t(null)},[t,e])}const iD={scenes:[],collections:[],verticals:[],loaded:!1,error:!1};function cD(){const[e,t]=r.useState(iD),[n,s]=r.useState(0);r.useEffect(()=>{let c=!0;return Ce.scenes().then(u=>{JH(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 uD={presenters:[],categories:[],styles:[],loaded:!1,error:!1};function dD(){const[e,t]=r.useState(uD),[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 fD={demoProducts:[],categories:[],loaded:!1,error:!1};function hD(){const[e,t]=r.useState(fD),[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 mD={showcase:[],categories:[],loaded:!1,error:!1};function pD(){const[e,t]=r.useState(mD),[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 ed(){const{open:e}=vs("settings");return r.useCallback((t="brand")=>e(t),[e])}const yg="codex-cli";function td(){const{open:e}=vs("setup");return r.useCallback((t=yg)=>{e(typeof t=="string"?t:yg)},[e])}function su(e){var t;e.preventDefault(),(t=e.currentTarget)==null||t.focus({preventScroll:!0})}function ap({failure:e,density:t,onRetry:n,dismiss:s}){const i=ed(),c=td(),{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(au,{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(Tc,{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 sp({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(au,{size:16,weight:"fill"}):o.jsx(np,{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 Sw="the engine",gD=[{re:/HTTP 401\b|missing authentication|no auth credentials|invalid api key|unauthorized/i,kind:"auth",title:e=>`${La(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=>`${La(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=>`${La(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=>`${La(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=>`${La(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=>`${La(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=>`${La(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:/codex.*(not logged in|login required)/i,kind:"auth",title:()=>"Codex is signed out on this machine.",fix:"Sign in with your ChatGPT account, then run this again.",remedy:{label:"Sign in",opens:"setup"},retryable:!1},{re:/could not verify codex/i,kind:"setup",title:()=>"Scenri could not verify Codex.",fix:"Open setup and check again. If Codex was just installed, restart Scenri.",remedy:{label:"Check Codex",opens:"setup"},retryable:!0},{re:/codex cli .* is too old|Scenri needs \d+\.\d+\.\d+ or newer/i,kind:"setup",title:()=>"Codex CLI needs an update.",fix:"Update Codex, then run this again.",remedy:{label:"Update 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|produced no output/i,kind:"timeout",title:e=>`${La(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=>`${La(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=>`${La(e)} finished without making a picture.`,fix:"Run it again. This usually clears on a second try.",retryable:!0}];function La(e){return e===Sw?"The engine":e}function oo(e,t){const n=(e??"").trim(),s=(t??"").replace(/\s*\(BYOK\)\s*$/i,"").trim()||Sw;if(!n)return{kind:"unknown",title:"This shot did not finish.",raw:"",retryable:!0};for(const i of gD){if(!i.re.test(n))continue;const c=i.title(s)||vD(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 jw(){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 vD(e){const t=e.trim();if(!t)return t;const n=t[0].toUpperCase()+t.slice(1);return/[.!?]$/.test(n)?n:`${n}.`}function kw(e){return e?e.phase==="ready"?e.blockReason!=="dev"&&e.blockReason!=="unsupervised"&&e.blockReason!=="launcher-too-old":e.canApply:!1}function yD(e){return!!(e!=null&&e.available)&&e.blockReason!=="dev"}function xD(e){return e.phase==="staging"?{kind:"downloading"}:e.phase==="ready"?{kind:"ready",version:e.stagedVersion??e.latest??e.current}:e.phase==="error"&&e.available?{kind:"stage-error"}:{kind:"announce",oneClick:kw(e)}}const wD=1800*1e3,xg=300*1e3,v2=e=>new Promise(t=>setTimeout(t,e)),Aw="scenri:update-dismissed";function bD(){try{return sessionStorage.getItem(Aw)}catch{return null}}function ED(e){try{sessionStorage.setItem(Aw,e)}catch{}}const Nw=r.createContext(null);function op(){const e=r.useContext(Nw);if(!e)throw new Error("useUpdateCenter must be used inside UpdateCenterProvider");return e}function CD({children:e}){const[t,n]=r.useState(null),[s,i]=r.useState(!1),[c,u]=r.useState(bD),f=r.useRef(void 0);r.useEffect(()=>{let T=!0;const D=async()=>{if(T){if(!document.hidden)try{const G=await Ce.updateStatus();T&&n(G)}catch{}T&&(f.current=window.setTimeout(D,wD))}};D();const P=()=>{document.hidden||!T||(window.clearTimeout(f.current),D())};return document.addEventListener("visibilitychange",P),window.addEventListener("focus",P),()=>{T=!1,window.clearTimeout(f.current),document.removeEventListener("visibilitychange",P),window.removeEventListener("focus",P)}},[]);const[h,m]=r.useState(null),g=r.useCallback(async()=>{i(!0);try{n(await Ce.updateCheck()),m(null)}catch(T){m(String((T==null?void 0:T.message)??T))}finally{i(!1)}},[]),v=r.useCallback(()=>{const T=t==null?void 0:t.latest;T&&(ED(T),u(T))},[t]),y=(t==null?void 0:t.latest)!=null&&t.latest===c,[w,b]=r.useState("idle"),[C,E]=r.useState(null),N=r.useCallback(async T=>{b("restarting");try{await Ce.updateRestart()}catch(P){if(typeof P.status=="number"){b("idle"),E(String((P==null?void 0:P.message)??P));return}}const D=Date.now()+3e4;for(;Date.now()<D;){await v2(800);try{if((await Ce.version()).version!==T){location.reload();return}}catch{}}b("idle"),E("The restart did not complete. Check the terminal Scenri runs in.")},[]),j=r.useCallback(async()=>{if(w!=="idle")return;E(null);const T=t==null?void 0:t.current;try{if((t==null?void 0:t.phase)!=="ready"){b("applying"),await Ce.updateApply();const D=Date.now()+xg;let P=!1;for(;Date.now()<D;){await v2(1500);const G=await Ce.updateStatus();if(n(G),G.phase==="ready"){P=!0;break}if(G.phase==="error"){E(G.error??"The update could not be staged."),b("idle");return}}if(!P){E("Couldn't download the update. Try again."),b("idle");return}}await N(T)}catch(D){E(String((D==null?void 0:D.message)??D)),b("idle")}},[w,t,N]),k=r.useRef(!1);r.useEffect(()=>{if((t==null?void 0:t.phase)!=="staging"||w!=="idle"||k.current)return;k.current=!0;let T=!0;const D=Date.now()+xg;return(async()=>{for(;T&&Date.now()<D;){if(await v2(1500),!T)return;try{const G=await Ce.updateStatus();if(!T||(n(G),G.phase!=="staging"))return}catch{}}})().finally(()=>{k.current=!1}),()=>{T=!1}},[t==null?void 0:t.phase,w]);const{pathname:A}=ln(),M=A===Ke.setup;return o.jsxs(Nw.Provider,{value:{status:t,checking:s,checkNow:g,checkError:h,dismissed:y,dismiss:v,apply:j,busy:w,applyError:C},children:[e,w!=="restarting"&&yD(t)&&!y&&!M&&o.jsx(jD,{}),w==="restarting"&&o.jsx(SD,{version:(t==null?void 0:t.stagedVersion)??(t==null?void 0:t.latest)??null})]})}function SD({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(ax,{size:22}),o.jsx("b",{children:e?`Updating to Scenri ${e}`:"Updating Scenri"}),o.jsx("small",{children:"Restarting. This page reconnects by itself."})]})})}function jD(){const{status:e,dismiss:t,apply:n,busy:s,applyError:i}=op(),c=ed();if(!e)return null;const u=xD(e),f=u.kind==="downloading"?"Downloading update…":u.kind==="ready"?`Scenri ${u.version} is ready`:u.kind==="stage-error"?"Couldn't download the update":"A new update is available",h=s==="applying"?"Updating…":u.kind==="stage-error"?"Try again":"Update",m=u.kind!=="announce"||u.oneClick;return o.jsxs("div",{className:"sc-upd-float",role:"status",children:[o.jsx(LH,{className:"sc-upd-float-dot",size:16,weight:"fill","aria-hidden":"true"}),o.jsxs("span",{className:"sc-upd-float-txt",children:[f,i&&u.kind!=="downloading"&&o.jsx("small",{children:i})]}),o.jsx("button",{type:"button",className:"sc-upd-float-later",onClick:t,children:u.kind==="ready"?"Later":"Not now"}),u.kind!=="downloading"&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:s!=="idle",onClick:()=>m?void n():c("about"),children:h})]})}const Mw=50;function os(e){return Date.parse(e.includes("T")?e:`${e.replace(" ","T")}Z`)}function eo(e,t=Date.now()){const n=os(e);return Number.isNaN(n)?0:Math.max(0,Math.round((t-n)/1e3))}function lp(e,t=Date.now()){const n=eo(e,t);return n<20?"generating":n<60?"still generating":"taking longer than usual"}function kD(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 Rw(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 AD(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 ND(e,t,n=Date.now()){const s=e.setNames.length>0?`${e.setNames.join(", ")} · `:"",i=e.status==="running"?`${s}${lp(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 MD(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:AD(e),startedAt:e.createdAt,href:eD(t)}}function RD(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)=>os(c.startedAt)-os(i.startedAt)).slice(0,t);return n.sort((i,c)=>os(i.startedAt)-os(c.startedAt)),[...n,...s]}function LD(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 TD(e,t,n=Mw){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)=>os(c.at)-os(i.at)).slice(0,n)}function HD(e,t){const n=e.filter(i=>!i.watched);if(!t)return n.length;const s=os(t);return n.filter(i=>os(i.at)>s).length}const Pw=e=>`scenri:notifications-${e}`,Lw=e=>`scenri:notifications-seen-${e}`;function Tw(e){try{return localStorage.getItem(e)}catch{return null}}function Hw(e,t){try{localStorage.setItem(e,t)}catch{}}function wg(e){const t=Tw(Pw(e));if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}const bg=(e,t)=>Hw(Pw(e),JSON.stringify(t.slice(0,Mw))),Eg=e=>Tw(Lw(e)),DD=(e,t)=>Hw(Lw(e),t),$D=1500,FD=5e3,Dw=r.createContext(null);function sl(){const e=r.useContext(Dw);if(!e)throw new Error("useTaskCenter must be used inside TaskCenterProvider");return e}function ID({brand:e,children:t}){const n=nn(),{push:s}=hr(),{refresh:i}=mn(),c=e.id,[u,f]=r.useState([]),[h,m]=r.useState([]),[g,v]=r.useState(()=>wg(c)),[y,w]=r.useState(()=>Eg(c)),[b,C]=r.useState(!1),E=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(b);T.current=b;const D=r.useRef(n);D.current=n;const{pathname:P}=ln(),G=r.useRef(!1);G.current=/\/(create|sets)(\/|$)/.test(P);const I=r.useRef(s);I.current=s,r.useEffect(()=>{E.current=null,N.current=new Set,j.current=0,k.current=new Set,f([]),m([]),v(wg(c)),w(Eg(c))},[c]);const oe=r.useCallback(async()=>{var U;let q,H;try{const[{nodes:L,jobs:O},{builds:ne}]=await Promise.all([Ce.activity(c),Ce.assetBuilds(c)]);H=ne,q=[...L.map(re=>ND(re,e)),...O.map(re=>MD(re,e)),...ne.map(re=>RD(re,e))]}catch{return}m(H);const K=H.filter(L=>L.finished&&L.assetId&&!k.current.has(L.id));if(K.length){for(const L of K)k.current.add(L.id);await A.current()}const X=LD(E.current,q);if(E.current=new Map(q.map(L=>[L.id,L])),j.current=q.filter(L=>L.state==="running").length,f(PD(q)),X.length!==0&&(v(L=>{const O=G.current?X.map(re=>re.state==="error"?re:{...re,watched:!0}):X,ne=TD(L,O);return bg(c,ne),ne}),!T.current))for(const L of X){if(N.current.has(L.id)||(N.current.add(L.id),L.state==="cancelled")||L.state!=="error"&&G.current)continue;const O=L.href,ne=O?{label:"View",onClick:()=>D.current(O)}:void 0;if(L.state==="error"){I.current({kind:"error",title:`${L.title} failed`,detail:L.subtitle,action:ne});continue}if(L.kind==="presenter"||L.kind==="scene"){const re=L.id.startsWith("build:")?((U=H.find(le=>`build:${le.id}`===L.id))==null?void 0:U.assetId)??null:null;I.current({kind:"success",title:`${L.title} is ready`,detail:L.subtitle,actions:O?[{label:L.kind==="presenter"?"View presenter":"View scene",onClick:()=>D.current(O)},{label:"Use in a shot",onClick:()=>D.current(`${cr(e)}?${L.kind==="presenter"?"presenter":"scene"}=${re}&compose=1`)}]:void 0});continue}I.current({kind:"success",title:L.kind==="catalog"?"Catalog import finished":"Generation finished",detail:L.title,action:ne})}},[c,e]);r.useEffect(()=>{let q=null,H=!0;const K=async()=>{if(!H||(document.hidden||await oe(),!H))return;const U=!document.hidden&&j.current>0;q=setTimeout(K,U?$D:FD)},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)}},[oe]);const W=r.useCallback(()=>{var q;return(q=M.current)==null?void 0:q.call(M)},[]),J=r.useCallback(()=>{const q=new Date().toISOString();w(q),DD(c,q)},[c]),Z=r.useCallback(()=>{v([]),bg(c,[]),J()},[c,J]),ee=r.useMemo(()=>({tasks:u,running:u.filter(q=>q.state==="running").length,builds:h,feed:g,unread:HD(g,y),markSeen:J,clearFeed:Z,panelOpen:b,setPanelOpen:C,poke:W}),[u,h,g,y,J,Z,b,W]);return o.jsx(Dw.Provider,{value:ee,children:t})}function $w(e){const{brand:t}=It(),{pathname:n}=ln(),s=nn(),i=!!or(Ke.brand),c=!!or({path:Ke.hub,end:!1}),u=!!or({path:Ke.set,end:!1}),f=c||u,h=!!or({path:Ke.products,end:!1}),m=!!or({path:Ke.scenes,end:!1}),g=!!or({path:Ke.presenters,end:!1}),v=y=>y?"fill":"regular";return[{key:"home",label:"Home",icon:o.jsx(TH,{size:e,weight:v(i)}),active:i,go:()=>s(Vo(t))},{key:"create",label:"Create",icon:o.jsx(IH,{size:e,weight:v(f)}),active:f,go:()=>s(f?`${n}?compose=1`:`${cr(t)}?compose=1`)},{key:"products",label:"Products",icon:o.jsx(rp,{size:e,weight:v(h)}),active:h,go:()=>s(K0(t))},{key:"presenters",label:"Presenters",icon:o.jsx(tp,{size:e,weight:v(g)}),active:g,go:()=>s(vc(t))},{key:"scenes",label:"Scenes",icon:o.jsx(ep,{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 _D(e){return([...e.trim()].find(n=>new RegExp("\\p{L}|\\p{N}","u").test(n))??"?").toUpperCase()}function ZD(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 y2({brand:e,size:t=20}){var i,c,u,f,h,m;const n=Zn((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:ZD(s)}},"aria-hidden":!0,children:n?o.jsx("img",{src:n,alt:""}):_D(Po(e))})}function OD(){const e=$w(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 VD(){var m,g;const{brands:e}=mn(),{brand:t}=It(),n=nn(),s=ed(),i=op(),c=ad(),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(Zo,{children:o.jsxs("button",{type:"button",className:"sc-org-btn","aria-label":`${Po(t)}, brand and settings`,children:[o.jsx(y2,{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(Oo,{align:"end",sideOffset:8,className:"sc-menu",children:[o.jsxs("div",{className:"sc-menu-head",children:[o.jsx(y2,{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(y2,{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(nr,{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(ax,{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(OH,{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(PH,{size:18,className:"sc-menu-ic"}),o.jsx("span",{className:"sc-menu-lb",children:"Settings"})]})]})]})}function ou(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 ip({open:e=!0,className:t,maxWidth:n,described:s,children:i,onDismiss:c,onOpenAutoFocus:u,onCloseAutoFocus:f,onPaste:h}){const{sheet:m,grip:g}=ou(c),v=u??su,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 cp({className:e,children:t}){return o.jsx(mi,{className:e,children:t})}function d1({children:e}){return o.jsx(L1,{asChild:!0,children:e})}function zD({className:e,children:t}){return o.jsx(dm,{className:e,children:t})}const bh=e=>Array.isArray(e)?e.map(t=>Zn(t==null?void 0:t.file)).filter(t=>!!t):[];function nd(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(UD)}function BD(e,t){return nd(e).find(n=>n.id===t)}function UD(e){const t=bh(e.shots),n=bh(e.sourceRefs),s=Zn(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:Zn(e.avatar),custom:!0,shots:t,sourceRefs:n}}function lu(e){var n;return(((n=e==null?void 0:e.json)==null?void 0:n.scenes)??[]).map(GD)}function WD(e,t){return lu(e).find(n=>n.id===t)}function GD(e){const t=bh(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:Zn(e.preview)??t[0]??null,previewColor:null,custom:!0,refs:t,instruction:e.instruction?String(e.instruction):void 0}}function Cg(e,t){const n=new Set(e.map(s=>s.id));return[...e,...t.filter(s=>!n.has(s.id))]}function KD(){const{brand:e,products:t}=It(),{scenes:n,presenters:s,demoProducts:i,showcase:c}=mn();return r.useMemo(()=>{const u={presenters:nd(e),scenes:lu(e)},f=new Set,h=b=>!b||f.has(b)?null:(f.add(b),b),m=(b,C)=>{for(const E of b){const N=h(C(E));if(N)return N}return null},g=b=>m(c.filter(C=>{var E;return(((E=C.brief)==null?void 0:E.tokens)??[]).some(N=>(N==null?void 0:N.t)===b)}),C=>C.previewUrl),v=m([...t].reverse(),b=>{var C,E;return Zn((E=(C=b==null?void 0:b.shots)==null?void 0:C[0])==null?void 0:E.file)}),y=m(u.presenters,b=>b.previewUrl),w=m(u.scenes,b=>b.previewUrl);return{product:{url:v??g("product")??m(i,b=>b.previewUrl)??null,count:t.length,own:!!v},presenter:{url:y??g("character")??m(s,b=>b.previewUrl??b.avatarUrl)??null,count:u.presenters.length,own:!!y},scene:{url:w??m(n,b=>b.previewUrl)??g("template")??null,count:u.scenes.length,own:!!w}}},[e,t,n,s,i,c])}const YD=[{kind:"product",label:"Product",line:"What you are photographing",noun:"product",icon:rp},{kind:"presenter",label:"Presenter",line:"Who appears in the shot",noun:"presenter",icon:tp},{kind:"scene",label:"Scene",line:"Where it takes place",noun:"scene",icon:ep}],Sg=(e,t)=>e===0?"None yet":`${e} ${t}${e===1?"":"s"}`;function qD({suggest:e,onPick:t}){const n=r.useRef(null),{close:s}=vs("new"),i=KD(),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(ip,{className:"sc-newpick",maxWidth:"620px",onDismiss:s,onOpenAutoFocus:u=>{u.preventDefault(),c()},children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(cp,{className:"sc-newdlg-title",children:"Add to this brand"}),o.jsx(d1,{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:YD.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}. ${Sg(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:Sg(y,m)})]},u)})})})]})}function up({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}=vs("new");return o.jsxs(ip,{maxWidth:h,onDismiss:w,onPaste:b=>{var E;if(!v)return;const C=Array.from(((E=b.clipboardData)==null?void 0:E.files)??[]).filter(N=>N.type.startsWith("image/"));C.length&&(b.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(cp,{className:"sc-newdlg-title",children:e}),o.jsx(d1,{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(on,{size:"1"}):null,i]}),s&&o.jsx("p",{className:"sc-dlg-foot",children:s})]})]})}function Fw({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 jg({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}=Fw({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(on,{}):h,o.jsx("span",{className:"sc-dropzone-label",children:e}),t&&o.jsx("small",{children:t})]})}function dp({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(jg,{label:n,hint:s,busy:i,onFiles:c,onReject:f,children:o.jsx(nr,{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:tn(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(jg,{label:`${h} more`,busy:i,onFiles:c,onReject:f,children:o.jsx(nr,{size:15})})]})}const XD=720*60*60*1e3,fp=(e,t)=>`scenri:new-${e}-${t}`;function QD(e){try{return localStorage.getItem(e)}catch{return null}}function JD(e,t){try{localStorage.setItem(e,t)}catch{}}function uc(e){try{localStorage.removeItem(e)}catch{}}function kg(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 Ag=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function e$(e,t){const n=fp(e,t),s=QD(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>XD?(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:Ag(c.facets),imageHashes:Ag(c.imageHashes),importUrl:typeof c.importUrl=="string"?c.importUrl:"",pending:typeof c.pending=="string"?c.pending:null}}function x2(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};JD(fp(e,t),JSON.stringify(s))}function w2(e,t){uc(fp(e,t))}function t$(e,t){if(!e)return!1;if(e.pending===null)return!0;const n=t??"unknown";return n==="failed"||n==="cancelled"||n==="unknown"}const Ng={name:"",instruction:"",facets:[],imageHashes:[],importUrl:""};function hp(e,t,n){const[s,i]=r.useState(Ng),[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=e$(e,t),A=k!=null&&k.pending?v.current(k.pending):null;k&&t$(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(()=>{kg(k)?x2(e,t,{...k,pending:g.current}):w2(e,t)},400)},[e,t]),w=r.useCallback(k=>{i(A=>{const M={...A,...k};return y(M),M})},[y]),b=r.useCallback(()=>{m.current&&clearTimeout(m.current),i(k=>(kg(k)?x2(e,t,{...k,pending:g.current}):w2(e,t),k))},[e,t]);r.useEffect(()=>(window.addEventListener("beforeunload",b),()=>{window.removeEventListener("beforeunload",b),b()}),[b]);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 ww(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]),E=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){w2(e,t),g.current=null,i(Ng);return}g.current=k,i(A=>(x2(e,t,{...A,pending:k}),A))},[e,t]);return{fields:s,set:w,uploading:c,err:f,setErr:h,addFiles:C,removeHash:E,toggleFacet:N,submitted:j}}const Mg=4;function n$({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{presenterCategories:u}=mn(),[f,h]=r.useState(!1),m=hp(c.id,"presenter",{max:Mg,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:b}=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(b),t({kind:"presenter",jobId:b,name:m.fields.name.trim()})}catch(b){m.setErr(String(b.message??b))}finally{h(!1)}},w=b=>{b.key!=="Enter"||b.shiftKey||(b.preventDefault(),g&&!f&&y())};return o.jsx(up,{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:b=>void m.addFiles(b),children:o.jsxs("div",{className:"sc-assetform",children:[o.jsx(dp,{hashes:m.fields.imageHashes,max:Mg,label:"Add photos",hint:"One works. Two to four, from different angles, hold the likeness far better.",busy:m.uploading,onAdd:b=>void m.addFiles(b),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:b=>m.set({name:b.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:b=>m.set({instruction:b.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(b=>o.jsx("button",{type:"button",className:"sc-chip","data-on":m.fields.facets.includes(b)||void 0,"aria-pressed":m.fields.facets.includes(b),onClick:()=>m.toggleFacet(b),children:b},b))})]})]})})}const Dc=[{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"}]}],mp=new Map(Dc.map(e=>[e.key,e]));mp.get("other");function si(e){var t;return e?((t=mp.get(e))==null?void 0:t.label)??e:null}function r$(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 pp(e){return e.category&&mp.has(e.category)?e.category:r$(e.productType,e.tags)??null}const Rg=6,a$=3;function s$({onBack:e,onStarted:t}){var C,E;const{brand:n}=It(),[s,i]=r.useState(!1),[c,u]=r.useState(!1),[f,h]=r.useState(!1),m=hp(n.id,"product",{max:Rg,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)}}},b=N=>{N.key==="Enter"&&(N.preventDefault(),g&&!s&&y())};return o.jsxs(up,{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(dp,{hashes:m.fields.imageHashes,max:Rg,label:"Add packshots",hint:`Straight, well-lit packshots. The first ${a$} 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:b})]})}),o.jsxs("fieldset",{className:"sc-assetform-facets",children:[o.jsx("legend",{children:"Category"}),o.jsx("div",{className:"sc-assetform-facets-chips",children:Dc.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:((E=(C=n.json)==null?void 0:C.meta)==null?void 0:E.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 b2=4;function o$({onBack:e,onStarted:t,caps:n,capsNote:s,pendingState:i}){const{brand:c}=It(),{verticals:u}=mn(),[f,h]=r.useState(!1),m=hp(c.id,"scene",{max:b2,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())},b=C=>{C.key!=="Enter"||!(C.metaKey||C.ctrlKey)||(C.preventDefault(),g&&!f&&y())};return o.jsx(up,{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(dp,{hashes:m.fields.imageHashes,max:b2,label:"Add a place",hint:`Screenshots, photography, anything showing the world you want. Up to ${b2}.`,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:b})]})]}),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 E2="1",l$=["product","presenter","scene"],i$=e=>!!e&&l$.includes(e),Iw=r.createContext(null);function ol(){const e=r.useContext(Iw);if(!e)throw new Error("useCreateAsset must be used inside AssetCreateHost");return e.open}function c$({children:e}){const{brand:t}=It(),n=nn(),{push:s}=hr(),{refresh:i}=mn(),{builds:c,poke:u}=sl(),f=vs("new"),h=f.value,m=!!or({path:Ke.products,end:!1}),g=!!or({path:Ke.presenters,end:!1}),v=!!or({path:Ke.scenes,end:!1}),y=m?"product":g?"presenter":v?"scene":null,[w,b]=r.useState(null),[C,E]=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,P=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"?E2:q)},[M]),G=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;E(!1);const H=K=>Ce.assetBuildCapabilities().then(X=>q&&b(X)).catch(()=>{q&&(K?setTimeout(()=>H(!1),600):E(!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]),oe=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]),W=r.useCallback(q=>{const H=k.current;if(G(),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(`${cr(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,G,n,u,s,i]),J=r.useMemo(()=>({open:P}),[P]),Z=i$(h)?h:null,ee={onBack:N?()=>T(E2):void 0,onStarted:W,caps:w,capsNote:I,pendingState:oe};return o.jsxs(Iw.Provider,{value:J,children:[e,h===E2&&o.jsx(qD,{suggest:y,onPick:q=>{j(!0),T(q)}}),Z==="product"&&o.jsx(s$,{...ee},"product"),Z==="presenter"&&o.jsx(n$,{...ee},"presenter"),Z==="scene"&&o.jsx(o$,{...ee},"scene")]})}function u$(){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(nr,{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 d$(){const{running:e,unread:t,panelOpen:n,setPanelOpen:s,markSeen:i}=sl(),{pathname:c}=ln(),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(fg,{size:16,weight:e?"fill":"regular"}),h]}),n?o.jsx(f$,{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(fg,{size:16,weight:e?"fill":"regular"}),h]})}),o.jsx(ri,{align:"end",className:"sc-notif-pop",children:o.jsx(_w,{onClose:()=>s(!1),onSeen:i})})]})}function f$({onClose:e,onSeen:t}){const{sheet:n,grip:s}=ou(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(_w,{onClose:e,onSeen:t})]})]}),document.body)}function _w({onClose:e,onSeen:t}){const{tasks:n,feed:s,unread:i,clearFeed:c}=sl(),{brand:u}=It(),f=nn(),{push:h}=hr(),[m,g]=r.useState("tasks"),v=r.useRef(null),y=p$(1e3),w=E=>{if(E.startsWith("node:")){Ce.cancelNode(E.slice(5)).catch(N=>h(dn(N,"Could not cancel this shot")));return}E.startsWith("build:")&&Ce.cancelAssetBuild(u.id,E.slice(6)).catch(N=>h(dn(N,"Could not stop this build")))};r.useEffect(()=>{m==="feed"&&t()},[m,t]);const b=E=>{f(E),e()},C=E=>{var A,M;const N=["tasks","feed"],j=N.indexOf(m);let k=null;E.key==="ArrowRight"?k=N[(j+1)%N.length]:E.key==="ArrowLeft"?k=N[(j-1+N.length)%N.length]:E.key==="Home"?k=N[0]:E.key==="End"&&(k=N[N.length-1]),k&&(E.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(Pg,{id:"tasks",tab:m,onSelect:g,count:n.length,children:"Tasks"}),o.jsx(Pg,{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(E=>o.jsx(h$,{task:E,now:y,onOpen:b,onCancel:w},E.id)):s.length===0?o.jsx("p",{className:"sc-notif-empty",children:"You have no notifications yet."}):s.map(E=>o.jsx(m$,{item:E,now:y,onOpen:b},E.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 Pg({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 Zw({task:e}){return e.thumb?o.jsx("img",{src:tn(e.thumb),alt:""}):e.state==="running"?o.jsx("span",{className:"sc-shimmer"}):e.state==="error"?o.jsx(au,{size:17,weight:"fill"}):e.state==="cancelled"?o.jsx(yw,{size:17,color:"var(--sc-fg3)"}):e.kind==="catalog"?o.jsx(VH,{size:17}):e.kind==="presenter"?o.jsx(tp,{size:17}):e.kind==="scene"?o.jsx(ep,{size:17}):o.jsx(Ga,{size:17})}function h$({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(Zw,{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?kD(e.startedAt,t):Rw(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 m$({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(Zw,{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:Rw(e.at,t)})]})}function p$(e){const[t,n]=r.useState(()=>Date.now());return r.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}const g$=["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"],v$=["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 y$(e){return o.jsx("svg",{viewBox:"0 0 263.79 64",fill:"currentColor","aria-hidden":"true",focusable:"false",...e,children:[...g$,...v$].map(t=>o.jsx("path",{d:t},t))})}function x$(){const{brand:e}=It(),t=nn(),n=or({path:Ke.set,end:!1}),i=!!or({path:Ke.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(y$,{})})}),o.jsx(w$,{}),o.jsxs("div",{className:"sc-topbar-end",children:[o.jsx(u$,{}),o.jsx(d$,{}),o.jsx(VD,{})]})]})}function w$(){const e=$w(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 b$=60;function E$(){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>b$?`${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 C$(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 S$({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(b=>b.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((b,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 b=w.split(",");for(const C of b.slice(0,-1))g(C);h(b[b.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 j$=["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"],Lg=e=>e.trim().toLowerCase();function k$(e){const t=new Set((e??[]).map(Lg));return j$.filter(n=>!t.has(Lg(n)))}function A$({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(S$,{label:"Things this brand never shows",value:n,placeholder:"Or type your own",suggestions:k$(n),max:24,onChange:s})})}const Ow=["primary","mark","wordmark","monochrome","alternate"],gp=["light","dark","any"],N0={primary:"Primary logo",mark:"Mark",wordmark:"Wordmark",monochrome:"Monochrome",alternate:"Alternate"},N$=/^[a-f0-9]{32}$/,M$=e=>{const t=String(e??"");if(!t.startsWith("asset:"))return null;const n=t.slice(6);return N$.test(n)?n:null},R$=e=>Ow.includes(e)?e:"primary",P$=e=>gp.includes(e)?e:"any";function Vw(e){return(Array.isArray(e==null?void 0:e.logos)?e.logos:[]).filter(n=>n&&String(n.file??"").trim()).map(n=>{const s=M$(n.file),i=String(n.clearSpace??"").trim();return{hash:s,file:String(n.file),role:R$(n.role),background:P$(n.background),...i?{clearSpace:i}:{},attachable:s!==null}})}function zw(e){return Vw(e).filter(t=>t.attachable)}function Bw(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 L$({brand:e,doc:t}){const{push:n}=hr(),[s,i]=r.useState(!1),c=t.json??{},u=c.meta??{},f=u.name??e.slug,h=Vw(c),m=h.find(C=>C.role==="primary")??h[0],g=h.filter(C=>C!==m),v=C=>{const E={...u};for(const[N,j]of Object.entries(C)){const k=j.trim();k?E[N]=k:delete E[N]}E.name||(E.name=u.name),t.patch({meta:E})},y=async(C,E)=>{i(!0);try{await t.flush(),t.applyRow(await E())}catch(N){n(dn(N,C))}finally{i(!1)}},w=C=>void y("Could not upload that mark",()=>KH(e.id,C[0])),{dropProps:b}=Fw({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",...b,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(T$,{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:gp.map(C=>o.jsx("option",{value:C,children:C==="any"?"Any background":`On ${C}`},C))})]}),o.jsx(Tg,{label:"Name",value:u.name??"",placeholder:e.slug,maxLength:120,onCommit:C=>v({name:C})}),o.jsx(Tg,{label:"Tagline",value:u.tagline??"",placeholder:"Add a tagline",maxLength:200,onCommit:C=>v({tagline:C})}),g.map(C=>o.jsx(H$,{mark:C,busy:s,onRole:E=>void y("Could not retag that mark",()=>Ce.updateLogo(e.id,C.hash??"",{role:E})),onBackground:E=>void y("Could not update that mark",()=>Ce.updateLogo(e.id,C.hash??"",{background:E})),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(nr,{size:12}),"Add",o.jsx("input",{type:"file",accept:"image/*",hidden:!0,disabled:s,onChange:C=>{const E=Array.from(C.target.files??[]);C.target.value="",E.length&&w(E)}})]})]})]})}function Tg({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 T$({mark:e,name:t,busy:n,onUpload:s}){if(e){const i=e.hash?tn(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(dw,{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 H$({mark:e,busy:t,onRole:n,onBackground:s,onRemove:i}){const c=e.hash?tn(e.hash):e.file;return o.jsxs("div",{className:"sc-set-row",children:[o.jsx("span",{className:"txt",children:o.jsx("b",{children:N0[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:N0[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:Ow.map(u=>o.jsx("option",{value:u,children:N0[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:gp.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 ${N0[e.role]}`,children:o.jsx(X1,{size:13})})]})]})}const Hg={primary:"Primary",secondary:"Secondary",accent:"Accent",neutral:"Neutral"},D$=(e,t)=>t<=1?Hg[e]:`${Hg[e]} ${t}`;function $$(e){return/^(Primary|Secondary|Accent|Neutral)( [2-9]\d*)?$/.test(String(e??"").trim())}const F$=/^#[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 F$.test(s)?s:null}const I$=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function _$(e){const t=String(e??"").trim();return I$.test(t)?fn(t):null}function xa(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||D$(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 vp(e,t){const n={},s=[],i=[],c=g=>{const v=g.name.trim();return v&&!$$(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 Dg=e=>e.slot!=="neutral";function yp(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 Z$(e,t){const n=fn(t);if(!n)return{palette:e,added:!1,swatch:null};const s=xa(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=vp(c,e),f=xa(u).find(h=>h.hex===n)??null;return{palette:u,added:!0,swatch:f}}function O$(e,t){const n=fn(t);if(!n)return{palette:e,removed:!1};const s=xa(e),i=s.filter(c=>c.hex!==n);return i.length===s.length?{palette:e,removed:!1}:{palette:vp(i,e),removed:!0}}function rd(){return(rd=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 Uw(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 $c=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},Eh=function(e){return e&&e.ownerDocument.defaultView||self},$g=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:$c((i.pageX-(s.left+Eh(e).pageXOffset))/s.width),top:$c((i.pageY-(s.top+Eh(e).pageYOffset))/s.height)}},Fg=function(e){!xc(e)&&e.preventDefault()},Ww=Ft.memo(function(e){var t=e.onMove,n=e.onKey,s=e.onEnd,i=Uw(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 E=function(k){Fg(k),(xc(k)?k.touches.length>0:k.buttons>0)&&c.current?u($g(c.current,k,m.current)):(j(!1),h())},N=function(){j(!1),h()};function j(k){var A=g.current,M=Eh(c.current),T=k?M.addEventListener:M.removeEventListener;T(A?"touchmove":"mousemove",E),T(A?"touchend":"mouseup",N)}return[function(k){var A=k.nativeEvent,M=c.current;if(M&&(Fg(A),!(function(D,P){return P&&!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($g(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],b=v[2],C=v[3];return r.useEffect(function(){return C},[C]),Ft.createElement("div",rd({},i,{onTouchStart:y,onMouseDown:y,className:"react-colorful__interactive",ref:c,onKeyDown:w,onKeyUp:b,tabIndex:0,role:"slider"}))}),xp=function(e){return e.filter(Boolean).join(" ")},Gw=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,c=xp(["react-colorful__pointer",e.className]);return Ft.createElement("div",{className:c,style:{top:100*i+"%",left:100*n+"%"}},Ft.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Un=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},V$=function(e){return G$(Ch(e))},Ch=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?Un(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?Un(parseInt(e.substring(6,8),16)/255,2):1}},z$=function(e){return W$(U$(e))},B$=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Un(e.h),s:Un(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Un(i/2),a:Un(s,2)}},Sh=function(e){var t=B$(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},U$=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:Un(255*[s,f,u,u,h,s][m]),g:Un(255*[h,s,s,f,u,u][m]),b:Un(255*[u,u,h,s,s,f][m]),a:Un(i,2)}},M0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},W$=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,c=i<1?M0(Un(255*i)):"";return"#"+M0(t)+M0(n)+M0(s)+c},G$=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:Un(60*(f<0?f+6:f)),s:Un(c?u/c*100:0),v:Un(c/255*100),a:i}},K$=Ft.memo(function(e){var t=e.hue,n=e.onChange,s=e.onChangeEnd,i=xp(["react-colorful__hue",e.className]);return Ft.createElement("div",{className:i},Ft.createElement(Ww,{onMove:function(c){n({h:360*c.left})},onKey:function(c){n({h:$c(t+360*c.left,0,360)})},onEnd:s,"aria-label":"Hue","aria-valuenow":Un(t),"aria-valuemax":"360","aria-valuemin":"0"},Ft.createElement(Gw,{className:"react-colorful__hue-pointer",left:t/360,color:Sh({h:t,s:100,v:100,a:1})})))}),Y$=Ft.memo(function(e){var t=e.hsva,n=e.onChange,s=e.onChangeEnd,i={backgroundColor:Sh({h:t.h,s:100,v:100,a:1})};return Ft.createElement("div",{className:"react-colorful__saturation",style:i},Ft.createElement(Ww,{onMove:function(c){n({s:100*c.left,v:100-100*c.top})},onKey:function(c){n({s:$c(t.s+100*c.left,0,100),v:$c(t.v-100*c.top,0,100)})},onEnd:s,"aria-label":"Color","aria-valuetext":"Saturation "+Un(t.s)+"%, Brightness "+Un(t.v)+"%"},Ft.createElement(Gw,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Sh(t)})))}),Kw=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},q$=function(e,t){return e.toLowerCase()===t.toLowerCase()||Kw(Ch(e),Ch(t))};function X$(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;Kw(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(b){return Object.assign({},b,w)})},[]),y=r.useCallback(function(){g.current&&(g.current=!1,c(m.current.color))},[c]);return[f,v,y]}var Q$=typeof window<"u"?r.useLayoutEffect:r.useEffect,J$=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ig=new WeakMap,eF=function(e){Q$(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(!Ig.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=J$();u&&c.setAttribute("nonce",u),Ig.set(s,c),i.appendChild(c)}}},[])},tF=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=Uw(e,["className","colorModel","color","onChange","onChangeEnd"]),h=r.useRef(null);eF(h);var m=X$(n,i,c,u),g=m[0],v=m[1],y=m[2],w=xp(["react-colorful",t]);return Ft.createElement("div",rd({},f,{ref:h,className:w}),Ft.createElement(Y$,{hsva:g,onChange:v,onChangeEnd:y}),Ft.createElement(K$,{hue:g.h,onChange:v,onChangeEnd:y,className:"react-colorful__last-control"}))},nF={defaultColor:"000",toHsva:V$,fromHsva:function(e){return z$({h:e.h,s:e.s,v:e.v,a:1})},equal:q$},rF=function(e){return Ft.createElement(tF,rd({},e,{colorModel:nF}))};function f1({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,b]=r.useState(!1);r.useEffect(()=>{w||y(g)},[g,w]);const C=k=>{const A=fn(k);A&&(y(A),f==="live"&&t(A))},E=k=>{const A=fn(k);A&&(y(A),t(A),f==="close"&&b(!1))},N=k=>{if(b(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(rF,{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"?E(v):b(!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"?E(k):C(k)},k))})]})]})}function aF({doc:e,suggestions:t}){var w;const n=(w=e.json)==null?void 0:w.palette,[s,i]=r.useState(()=>xa(n)),c=JSON.stringify(n??{});r.useEffect(()=>{i(xa(n))},[c]);const u=(b,C=0)=>{i(b),e.patch({palette:vp(b,n)},{debounce:C})},f=(b,C,E=0)=>u(s.map((N,j)=>j===b?{...N,...C}:N),E),h=()=>u([...s,{hex:yp(s),name:"",slot:s.length?"accent":"primary"}]),m=(t??[]).filter(b=>{const C=fn(b.hex);return C&&!s.some(E=>E.hex===C)}),g=(b,C)=>o.jsx(sF,{swatch:b,presets:s.map(E=>E.hex),onHex:E=>f(C,{hex:E},300),onRemove:()=>u(s.filter((E,N)=>N!==C))},`${b.slot}-${C}`),v=s.map((b,C)=>[b,C]),y=v.filter(([b])=>!Dg(b));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(([b])=>Dg(b)).map(([b,C])=>g(b,C)),y.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-pal-group",children:"Neutrals"}),y.map(([b,C])=>g(b,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(nr,{size:12}),"Add colour"]}),m.length>0&&o.jsxs("span",{className:"sc-pal-sugg",children:[o.jsx("small",{children:"From the website"}),m.map(b=>{const C=fn(b.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 sF({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(f1,{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(X1,{size:13})})]})}function oF(){const{brand:e}=It(),{applyBrand:t}=mn(),{push:n}=hr(),[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]),b=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]),E=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&&XH(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:b,flush:C,applyRow:E}}function lF(e){return e==="saving"?"Saving…":e==="pending"?"Unsaved changes":e==="error"?"Not saved":"Saved"}function iF(){var y,w;const{brand:e}=It(),{push:t}=hr(),n=oF(),[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 b=h.trim(),C=b&&!/^https?:\/\//i.test(b)?`https://${b}`:b;m(C);const E={...((N=n.json)==null?void 0:N.meta)??{}};C?E.website=C:delete E.website,n.patch({meta:E})},v=async()=>{var b,C;i(!0);try{await n.flush();const E=await Ce.refreshBrandFromUrl(e.id);n.applyRow(E),u(((b=E.suggestions)==null?void 0:b.palette)??[]),t({kind:"success",title:"Read the website again",detail:(C=E.warnings)!=null&&C.length?E.warnings.join(" "):"Your edits were kept."})}catch(E){t(dn(E,"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(L$,{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(aF,{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(A$,{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:b=>m(b.target.value),onBlur:g,onKeyDown:b=>{b.key==="Enter"&&b.currentTarget.blur()}}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:!f||s,onClick:()=>void v(),children:[s?o.jsx(on,{size:"1"}):o.jsx(Jm,{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:YH(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:lF(n.state)})]})]})]})}const Gs=e=>e.replace(/\s*\(BYOK\)\s*$/i,""),Fc="codex-cli";function cF(e,t){var n;return e.some(s=>s.id===t)?t:((n=e[0])==null?void 0:n.id)??Fc}const uF=e=>e.toFixed(3).replace(/0+$/,"").replace(/\.$/,"");function dF(e){return e.free?e.localOnly?"Runs on your ChatGPT plan":"No cost per image":`$${uF(e.perGeneration)} / image`}function fF(e,t){if(t)return e.available?"Manage":"Connect";if(e.available)return e.id===Fc?"Manage":null;switch(e.code){case"update-needed":return"Update";case"not-installed":case"not-authenticated":case"unverified":return"Set up";default:return null}}function Yw(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 hF(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 mF(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 pF=[{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"}],qw=e=>pF.find(t=>t.engineId===e),Xw={"codex-cli":{Mark:Yw,size:16,plate:"#FFFFFF",ink:"#000000"},openrouter:{Mark:hF,size:18,plate:"#FFFFFF",ink:"#7624F4"},replicate:{Mark:mF,size:15,plate:"#E42022",ink:"#FFFFFF"}},jh=e=>{const t=Xw[e];return t?{plate:t.plate,ink:t.ink}:void 0},gF={demo:jH};function Qw({engineId:e,scale:t=1}){const n=Xw[e];if(n){const i=Math.round(n.size*t);return o.jsx(n.Mark,{width:i,height:i})}const s=gF[e]??u1;return o.jsx(s,{size:Math.round(15*t)})}const vF=e=>[...e].sort((t,n)=>+(n.id===Fc)-+(t.id===Fc));function yF({engines:e}){const t=td(),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:vF(e).map(i=>{const c=qw(i.id),u=Gs(i.displayName),f=fF(i,!!c),h=i.available?"Connected":null,m=!h&&i.reason&&(!f||i.code==="unverified"),g=jh(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(Qw,{engineId:i.id})}),o.jsxs("span",{className:"sc-eng-name",children:[o.jsx("b",{children:u}),o.jsx("small",{children:dF(i)})]}),h&&o.jsxs("span",{className:"sc-stat",children:[o.jsx("span",{className:"d"}),h]}),m&&o.jsx("span",{className:"sc-stat sc-stat-why",children:i.reason}),f&&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":`${f} ${u}`,children:f})]},i.id)})})}const xF={npx:"run with npx",global:"installed with npm",managed:"managed install",dev:"running from source",unknown:"local studio"};function wF(e){switch(e){case"npx":return"npx scenri update";case"global":case"managed":return"scenri update";default:return"npx scenri@latest"}}function bF({version:e}){var b;const t=op(),n=ad(),s=t.status,[i,c]=r.useState(null),[u,f]=r.useState(!1);r.useEffect(()=>{Ce.settings().then(C=>c(!!C.updateCheck)).catch(()=>{})},[]);const h=async()=>{if(i===null)return;const C=!i;c(C);try{await Ce.saveSettings({updateCheck:C})}catch{c(!C)}},m=wF(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"]}):t.checkError||s!=null&&s.error?o.jsx("span",{className:"sc-tag",children:"couldn't check for updates"}):s!=null&&s.checkedAt?o.jsx("span",{className:"sc-tag",children:"up to date"}):null;let y,w;return s!=null&&s.available?(e==null?void 0:e.installKind)==="dev"?(y="Running from source. Pull and rebuild when you're ready; nothing here touches your checkout.",w=null):kw(s)?s.phase==="ready"?(y=t.applyError??`${s.stagedVersion} is downloaded and verified. Restarting finishes it.`,w="restart"):s.phase==="staging"?(y="Downloading in the background. Nothing interrupts your work.",w="downloading"):s.phase==="error"?(y=t.applyError??s.error??"Couldn't download the update. Try again.",w="update"):(y=`You are on ${s.current}.`,w="update"):(y=o.jsxs(o.Fragment,{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."]}),w="copy"):(y=s&&!s.enabled?"Automatic checks are off. Checking here still works.":"New versions announce themselves here.",w="check"),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}`:""," · ",xF[(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:[y,(s==null?void 0:s.available)&&s.phase!=="ready"&&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,w==="check"&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:t.checking,onClick:()=>void t.checkNow(),children:"Check for updates"}),(w==="update"||w==="restart")&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:t.busy!=="idle",onClick:()=>void t.apply(),children:t.busy!=="idle"?"Updating…":(s==null?void 0:s.phase)==="error"?"Try again":"Update"}),w==="downloading"&&o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:!0,children:"Downloading…"}),w==="copy"&&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:"What's new"}),o.jsx("small",{children:((b=n.entry)==null?void 0:b.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"})]}),o.jsxs("div",{className:"sc-set-row",children:[o.jsxs("span",{className:"txt",children:[o.jsx("b",{children:"Automatic updates"}),o.jsx("small",{"data-prose":"",children:"A version check every six hours; new versions download in the background, and restarting is always your call. 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 EF(){const{choice:e,setChoice:t}=sT(),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 CF({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 cs({label:e,title:t,body:n,busy:s,onConfirm:i,fullWidth:c}){return o.jsxs(Xc,{children:[o.jsx(L5,{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(Jc,{children:t}),o.jsx(eu,{size:"2",children:n}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{color:"red",onClick:i,children:e})})]})]})]})}function SF({onDone:e}){const{brand:t}=It(),n=nn(),[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(cs,{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(cs,{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(cs,{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 jF=e=>e>1e9?`${(e/1e9).toFixed(1)} GB`:e>1e6?`${Math.round(e/1e6)} MB`:`${Math.round(e/1e3)} KB`,C2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function kF(e){return e===0?0:e<3?1:e<6?2:e<12?3:4}function _g(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:kF(y),title:y?`${y} run${y===1?"":"s"} on ${g.getDate()} ${C2[g.getMonth()]}`:`nothing on ${g.getDate()} ${C2[g.getMonth()]}`}),g.getDay()===0){const w=g.getMonth()!==f&&g.getDate()<=7;w&&(f=g.getMonth()),u.push({key:v,label:w?C2[g.getMonth()]:""})}}return{cells:c,months:u,sum:h}}function AF(){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} · ${jF(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 Zg({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 NF({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=_g(f,53),g=_g(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(Zg,{weeks:53,months:n.months,cells:n.cells}),o.jsx(Zg,{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($H,{size:14})},{id:"engines",label:"Providers",title:"Providers",icon:o.jsx(u1,{size:14})},{id:"budget",label:"Budget",title:"Budget",icon:o.jsx(FH,{size:14})},{id:"usage",label:"Usage",title:"Usage",icon:o.jsx(NH,{size:14})},{id:"library",label:"Library",title:"Library",icon:o.jsx(CH,{size:14})},{id:"appearance",label:"Appearance",title:"Appearance",icon:o.jsx(zH,{size:14})},{id:"about",label:"About",title:"About",icon:o.jsx(np,{size:14})},{id:"danger",label:"Danger zone",title:"Danger zone",icon:o.jsx(X1,{size:14}),danger:!0}];function MF({engines:e,shots:t,onSaved:n}){const s=vs("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:su,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(S2,{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(S2,{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(S2,{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(ru,{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(RF,{p:g,on:f===g.id,pick:()=>h(g.id)},g.id))}),o.jsxs("div",{className:"sc-set-scroll",children:[f==="brand"&&o.jsx(iF,{}),f==="engines"&&o.jsx(yF,{engines:e}),f==="budget"&&o.jsx(CF,{engines:e,onSaved:n}),f==="usage"&&o.jsx(NF,{shots:t}),f==="library"&&o.jsx(AF,{}),f==="appearance"&&o.jsx(EF,{}),f==="about"&&o.jsx(bF,{version:c}),f==="danger"&&o.jsx(SF,{onDone:n})]})]})]})]})})}function S2({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 RF({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 PF=["January","February","March","April","May","June","July","August","September","October","November","December"];function LF(e){const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return e;const n=PF[Number(t[2])-1];return n?`${Number(t[3])} ${n} ${t[1]}`:e}function TF(){const e=vs("whatsnew"),{status:t,version:n,entry:s,changelogUrl:i,releasesUrl:c,markSeen:u}=ad(),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:" · "}),LF(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(ip,{open:f,className:"sc-wn",maxWidth:"420px",described:!0,onDismiss:h,children:[o.jsxs("div",{className:"sc-newdlg-head",children:[o.jsx(cp,{className:"sc-newdlg-title",children:"What's new"}),o.jsx(d1,{children:o.jsx("button",{type:"button",className:"sc-set-close sc-newdlg-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]}),o.jsx(zD,{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(K1,{size:13})]}),o.jsx(d1,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Got it"})})]})]})}const HF=2e3,DF=5*6e4;function $F({engines:e,onSaved:t}){const n=vs("setup"),s=n.close,i=n.value,c=i?qw(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:su,children:c?o.jsx(FF,{provider:c,name:h?Gs(h.displayName):c.engineId,connected:!!(h!=null&&h.available),onSaved:t,onDone:s}):o.jsx(IF,{engines:e,onSaved:t,onDone:s})})})}function Jw({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(ru,{children:o.jsx("button",{type:"button",className:"sc-set-close","aria-label":"Close",children:o.jsx(Mn,{size:16})})})]})}function FF({provider:e,name:t,connected:n,onSaved:s,onDone:i}){var E,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 b=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(Jw,{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":(E=jh(e.engineId))==null?void 0:E.plate,"--sc-ink":(N=jh(e.engineId))==null?void 0:N.ink},children:o.jsx(Qw,{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(),b()},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(on,{size:"1"}):o.jsx(Ox,{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(K1,{size:13})]})]})]}),n&&o.jsx("div",{className:"sc-setup-cut",children:o.jsx(cs,{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(mw,{size:15})," ",m]})})]})]})}function IF({engines:e,onSaved:t,onDone:n}){const s=td(),[i,c]=r.useState("checking"),[u,f]=r.useState(null),[h,m]=r.useState(!1),[g,v]=r.useState("mac"),y=r.useRef(null),w=r.useCallback(()=>{y.current!==null&&(window.clearInterval(y.current),y.current=null)},[]),b=r.useCallback(async()=>{const{state:A,platform:M}=await Ce.codexStatus();return M&&v(M),c(A),A},[]);r.useEffect(()=>(f(null),c("checking"),b().catch(()=>c("unverified")),w),[b,w]);const C=r.useCallback(()=>{f(null),c("checking"),b().catch(()=>c("unverified"))},[b]);r.useEffect(()=>{i==="ready"&&t()},[i,t]);const E=async()=>{f(null),c("installing");try{const A=await Ce.installCodex();if(A.ok||A.state!=="not-installed"){c(A.state);return}f({detail:A.detail,command:A.fallbackCommand,docsUrl:A.docsUrl}),c(A.state)}catch(A){f({detail:A.message,command:"npm install -g @openai/codex"}),c("not-installed")}},N=async()=>{f(null),c("signing-in");const A=Date.now();w(),y.current=window.setInterval(()=>{if(Date.now()-A>DF){w(),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:M})=>{M==="ready"&&(w(),c("ready"))}).catch(()=>{})},HF);try{const M=await Ce.loginCodex();if(w(),M.ok||M.state==="ready"){c(M.state);return}f({detail:M.detail,command:M.fallbackCommand}),c(M.state)}catch(M){w(),f({detail:M.message,command:"codex login --device-auth"}),c("not-authenticated")}},j=A=>{var M;(M=navigator.clipboard)==null||M.writeText(A).then(()=>{m(!0),window.setTimeout(()=>m(!1),1600)})},k=e.filter(A=>A.available&&A.id!=="codex-cli"&&!A.localOnly);return o.jsxs(o.Fragment,{children:[o.jsx(Jw,{title:"Set up image generation"}),o.jsx(_F,{phase:i}),o.jsxs("div",{className:"sc-setup-body",children:[i==="checking"&&o.jsxs("p",{className:"sc-setup-lead",children:[o.jsx(on,{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:E,disabled:i==="installing",children:[i==="installing"?o.jsx(on,{size:"1"}):o.jsx(Mx,{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:N,disabled:i==="signing-in",children:[i==="signing-in"?o.jsx(on,{size:"1"}):o.jsx(ZH,{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(ya,{size:15})," Codex CLI is ready. Your images run on your own ChatGPT plan, and Scenri adds nothing to the bill."]}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:n,children:"Start creating"}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:C,children:[o.jsx(G0,{size:14})," Check again"]})]})]}),i==="unverified"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Scenri could not verify Codex on this computer. Something answered too slowly or not at all, so nothing is assumed to work."}),o.jsxs("div",{className:"sc-setup-acts",children:[o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:C,children:[o.jsx(G0,{size:15})," Check again"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>c("no-plan"),children:"I do not have ChatGPT"})]}),o.jsx("p",{className:"sc-setup-note",children:"If you just installed Codex, quit and reopen Scenri so it can see the new command."})]}),i==="update-needed"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"sc-setup-lead",children:"Codex CLI on this computer is too old for Scenri. Update it once, then check again."}),o.jsxs("div",{className:"sc-setup-cmd",children:[o.jsx("code",{children:"npm install -g @openai/codex@latest"}),o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:()=>j("npm install -g @openai/codex@latest"),children:[h?o.jsx(ya,{size:14}):o.jsx(hg,{size:14}),h?"Copied":"Copy"]})]}),g==="windows"&&o.jsxs("p",{className:"sc-setup-note",children:["Installed with the standalone installer instead? Update it in PowerShell:"," ",o.jsx("code",{children:"irm https://chatgpt.com/codex/install.ps1 | iex"})]}),o.jsx("div",{className:"sc-setup-acts",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:C,children:[o.jsx(G0,{size:15})," Check again"]})})]}),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(Ox,{size:15})," Add a provider key"]}),o.jsx("button",{type:"button",className:"sc-setup-alt",onClick:()=>void b(),children:"Back to Codex setup"})]}),k.length>0&&o.jsxs("p",{className:"sc-setup-note",children:[k.map(A=>Gs(A.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(mw,{size:15})," ",u.detail??"That did not work."]}),u.command&&o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"sc-setup-note",children:["Run this in ",g==="windows"?"PowerShell":"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:()=>j(u.command),children:[h?o.jsx(ya,{size:14}):o.jsx(hg,{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(K1,{size:13})]})]})]})]})}function _F({phase:e}){if(e==="no-plan")return null;const t=e==="not-authenticated"||e==="signing-in"||e==="update-needed"||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(ya,{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(ya,{size:12}):o.jsx("span",{className:"d"})," Sign in"]})]})}function ZF(){const{brands:e}=mn(),t=e9(e);return t?o.jsx(Ys,{to:Vo(t),replace:!0}):o.jsx(Ys,{to:"/setup",replace:!0})}function e9(e){const t=tT();return e.find(n=>n.id===t)??e[0]??null}const t9=r.createContext(null);function It(){const e=r.useContext(t9);if(!e)throw new Error("useBrand must be used inside BrandLayout");return e}const n9=r.createContext(null);function OF(){const e=r.useContext(n9);if(!e)throw new Error("useAssetsPanel must be used inside BrandLayout");return e}function VF(){const{brandSlug:e}=Ba(),{pathname:t,search:n}=ln(),s=or({path:Ke.brand,end:!1}),{brands:i,engines:c,refresh:u}=mn(),[f,h]=r.useState(null),[m,g]=r.useState([]),[v,y]=r.useState([]),[w,b]=r.useState({}),[C,E]=r.useState(!1),[N,j]=Za(ir.assetsOpen,window.innerWidth>=1280),k=r.useCallback(()=>j(J=>!J),[]),A=r.useMemo(()=>({open:N,toggle:k,setOpen:j}),[N,k]);E$();const M=i.find(J=>J.slug===e)??i.find(J=>J.id===e)??null,{products:T,loaded:D,reload:P}=C$(M==null?void 0:M.id),G=r.useCallback(async()=>{if(!M)return;const J=await Ce.workspace(M.id);h(J.project),g(J.nodes),y(J.sets),b(J.membership),E(!0)},[M==null?void 0:M.id]),I=r.useCallback(J=>y(Z=>Z.map(ee=>ee.id===J.id?J:ee)),[]),oe=r.useCallback(J=>y(Z=>Z.filter(ee=>ee.id!==J)),[]);r.useEffect(()=>{E(!1)},[M==null?void 0:M.id]),r.useEffect(()=>{M&&nT(M.id)},[M==null?void 0:M.id]),r.useEffect(()=>{G()},[G,M==null?void 0:M.updatedAt]);const W=s?t.slice(s.pathnameBase.length):"";if(!M){const J=e9(i);return o.jsx(Ys,{to:J?Vo(J)+W+n:Ke.root,replace:!0})}return e!==M.slug?o.jsx(Ys,{to:Vo(M)+W+n,replace:!0}):o.jsxs(t9.Provider,{value:{brand:M,workspace:f,nodes:m,sets:v,membership:w,products:T,productsLoaded:D,refreshProducts:P,loaded:C,refresh:G,applySet:I,dropSet:oe},children:[o.jsx(MF,{engines:c,shots:m,onSaved:u}),o.jsx($F,{engines:c,onSaved:u}),o.jsx(TF,{}),o.jsxs(ID,{brand:M,children:[o.jsx(WF,{}),o.jsx(c$,{children:o.jsx(n9.Provider,{value:A,children:o.jsxs("div",{className:"sc-shell",children:[o.jsx(x$,{}),o.jsx(Xh,{}),o.jsx(OD,{})]})})})]})]})}function zF(e){return!e.unread||e.spent||!e.loaded||!e.visible||e.dialogOpen?!1:e.running===0&&e.builds===0}const BF=Number(window.localStorage.getItem("scenri:whatsnew-settle-ms")??2500)||2500,r9=r.createContext(null);function ad(){const e=r.useContext(r9);if(!e)throw new Error("useWhatsNew must be used inside WhatsNewProvider");return e}function UF({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,b]=r.useState(!1),C=vs("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 E=C.open,N=r.useCallback(()=>E(t??"latest"),[E,t]),j=r.useCallback(()=>{b(!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(r9.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 WF(){const e=ad(),{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(!zF({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()},BF);return()=>window.clearTimeout(g)},[e,s,c,h,t,n.length]),null}const a9=r.createContext(null);function mn(){const e=r.useContext(a9);if(!e)throw new Error("useAppData must be used inside AppShell");return e}function GF(){const e=lD(),[t,n]=r.useState(null),[s,i]=r.useState([]),[c,u]=r.useState(null),f=cD(),h=dD(),m=hD(),g=pD(),v=r.useCallback(w=>{n(b=>b&&b.map(C=>C.id===w.id?w:C))},[]),y=r.useCallback(async()=>{try{const[w,b]=await Promise.all([Ce.brands(),Ce.engines()]);n(w),i(b)}catch(w){u(String(w.message??w))}},[]);return r.useEffect(()=>{y()},[y]),c?o.jsx(dr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(sp,{failure:oo(c)})}):t===null?o.jsx(dr,{align:"center",justify:"center",height:"100vh",children:o.jsx(on,{size:"3"})}):o.jsx(a9.Provider,{value:{brands:t,engines:s,...f,presenters:h.presenters,presenterCategories:h.categories,presenterStyles:h.styles,presentersLoaded:h.loaded,presentersError:h.error,refetchPresenters:h.refetch,demoProducts:m.demoProducts,demoProductCategories:m.categories,demoProductsLoaded:m.loaded,demoProductsError:m.error,showcase:g.showcase,showcaseCategories:g.categories,showcaseLoaded:g.loaded,showcaseError:g.error,refetchShowcase:g.refetch,refresh:y,applyBrand:v},children:o.jsx(Cw.Provider,{value:e,children:o.jsx(CD,{children:o.jsxs(UF,{children:[o.jsx(t3,{}),o.jsx(Xh,{})]})})})})}function vs(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 Zs(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 KF(){var T,D,P,G,I,oe,W,J;const{brands:e,refresh:t}=mn(),n=nn(),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),[b,C]=r.useState(null),E=async Z=>{C(Z),await t(),n(Vo(Z),{replace:!0})},N=async()=>{var Z,ee,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:{...(Z=K.json)==null?void 0:Z.meta,website:((q=(ee=K.json)==null?void 0:ee.meta)==null?void 0:q.website)||H}});Ce.catalogImport(X.id,H).catch(()=>{}),await E(X)}catch(H){w(String(H.message??H)),v(!1)}},j=async()=>{v(!0),w(null);try{await E(await Ce.createBrand({specVersion:"0.1",meta:{name:u.trim()||"Untitled brand"}}))}catch(Z){w(String(Z.message??Z)),v(!1)}},k=()=>n("/",{replace:!0}),A=b?xa((T=b.json)==null?void 0:T.palette):[],M=b?Zn((G=(P=(D=b.json)==null?void 0:D.logos)==null?void 0:P[0])==null?void 0:G.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:Z=>f(Z.target.value),onKeyDown:Z=>Z.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(on,{size:"1"}):o.jsxs(o.Fragment,{children:["Create it ",o.jsx(dg,{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:Z=>c(Z.target.value),onKeyDown:Z=>Z.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(on,{size:"1"}):o.jsxs(o.Fragment,{children:["Build the kit ",o.jsx(dg,{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(Z5,{color:"red",mt:"3",size:"1",children:o.jsx(O5,{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&&!b&&o.jsxs("div",{className:"sc-scrape-row",children:[o.jsx(on,{size:"1"})," Reading the site and building the kit"]}),!g&&!b&&o.jsx("p",{style:{color:"var(--sc-fg3)",fontSize:12.5,margin:0},children:"The kit appears here as it is found."}),b&&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(Ga,{size:16,color:"var(--sc-fg3)"})}),o.jsxs("span",{children:[o.jsx("b",{dir:"auto",style:{fontFamily:"var(--sc-font-display)",fontSize:16},children:(oe=(I=b.json)==null?void 0:I.meta)==null?void 0:oe.name}),((J=(W=b.json)==null?void 0:W.meta)==null?void 0:J.tagline)&&o.jsx("small",{dir:"auto",style:{display:"block",color:"var(--sc-fg3)",fontSize:11.5},children:String(b.json.meta.tagline).slice(0,60)})]})]}),A.length>0&&o.jsx("div",{style:{display:"flex",gap:8},children:A.slice(0,5).map(Z=>o.jsx("span",{style:{flex:1,height:44,borderRadius:9,border:"1px solid var(--sc-line)",background:Z.hex}},Z.hex))})]})]})]})})]})}const Zl=e=>{const t=(e??"").trim();return t||null};function YF(e){const t=e;return{name:e.name,brand:Zl(t.brand)??Zl(t.vendor),qualifier:Zl(t.format)??Zl(t.subcategory)??Zl(t.variant)}}function qF(e){return!e.brand||e.name.toLowerCase().startsWith(e.brand.toLowerCase())?e.name:`${e.brand} ${e.name}`}function Oa(e,t){const n=YF(e);if(t==="chip")return n.name;const s=qF(n);return t==="tooltip"?[s,n.qualifier].filter(Boolean).join(" · "):s}function to(e,t){return t==="tooltip"?[e.name,Zl(e.lighting)].filter(Boolean).join(" · "):e.name}function h1(e){return[e.name,...e.legacyNames??[],...e.keywords??[],e.description,e.lighting,e.subject].concat(e.collections??[],e.verticals??[]).filter(Boolean).join(" ")}function wp(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 m1(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 XF(e,t,n){return[e.title,e.category,n,t.product?wp(t.product):null,t.presenter?m1(t.presenter):null,t.scene?h1(t.scene):null].filter(Boolean).join(" ")}function bp(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?presenter=${encodeURIComponent(s)}&compose=1`)},[n,t])}function Ep(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?scene=${encodeURIComponent(s)}&compose=1`)},[n,t])}function kh(e){return{...e.brief,...e.variants?{variants:e.variants}:{},...e.quality?{quality:e.quality}:{},_at:Date.now()}}function QF(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?showcase=${encodeURIComponent(s)}`)},[n,t])}const Y0=e=>`sc-favscenes-${e}`,JF=e=>`sc-favlooks-${e}`,eI=e=>`bt-favlooks-${e}`;function Va(e){try{const t=localStorage.getItem(Y0(e))??gh(JF(e),Y0(e))??gh(eI(e),Y0(e)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function tI(e,t){try{localStorage.setItem(Y0(e),JSON.stringify(t))}catch{}}function s9(e,t){const n=Va(e),s=n.includes(t)?n.filter(i=>i!==t):[...n,t];return tI(e,s),s}const o9=[{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"}],nI=new Map(o9.map(e=>[e.key,e]));function j2(e){var t;return e?((t=nI.get(e))==null?void 0:t.label)??e:null}function rI(e){const t=new Map(o9.map((n,s)=>[n.key,s]));return[...e].sort((n,s)=>(t.get(n)??99)-(t.get(s)??99)||n.localeCompare(s))}const k2=14,aI=768,Ah=[{px:190,label:"Compact",cells:3},{px:320,label:"Large",cells:2}],l9=320;function i9(e){const t=typeof e=="number"&&Number.isFinite(e)?e:l9;let n=Ah[0].px;for(const s of Ah)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 sI(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 oI(){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 lI(e,t,n){if(e<=0)return{tile:t,cols:1};const s=n?2:Math.max(1,Math.floor((e+k2)/(t+k2)));return{tile:Math.floor((e-k2*(s-1))/s),cols:s}}function iu(e){return ll(e)===5?"large":"compact"}function iI(){const[e]=Za(ir.wallDensity,zo);return iu(e)}const cI=[{value:7,label:"Compact",hint:"More cards per row",cells:3},{value:5,label:"Large",hint:"Fewer, larger cards",cells:2}],uI=Ah.map(e=>({value:e.px,label:e.label,hint:e.label==="Compact"?"More shots per row":"Fewer, larger shots",cells:e.cells}));function sd({value:e,onChange:t}){return o.jsx(c9,{label:"Grid size",value:ll(e),options:cI,onChange:n=>t(n)})}function dI({value:e,onChange:t}){return o.jsx(c9,{label:"Shot size",value:i9(e),options:uI,onChange:t})}function c9({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(fI,{cells:c.cells})},c.value)})]})}function fI({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 od(e){return{"--sc-wall-cols":String(ll(e))}}const q0="sc-insert-menu";function hI(e){var t;return!!(((t=e.nativeEvent)==null?void 0:t.isComposing)??e.isComposing)||e.keyCode===229}function Og(e){return e==="/"?"Scenes":e==="@"?"Presenters":e==="#"?"Colors":"Products"}function mI(e){return e==="/"?"No matching scenes":e==="#"?"No matching colours":e==="@"?"No matching presenters":"No matching products"}function pI({menuOpen:e,handled:t}){return!e&&!t}function gI(e,t){return t||!e?{open:!1}:{open:!0,sigil:e.sigil,query:e.query}}function vI(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 yI=e=>e.t!=="format",ss=()=>[{t:"text",v:""}];function u9(e){const t=(e.tokens??[]).filter(yI),n=t.length?t:ss(),s=n.some(i=>i.t==="template");return e.templateId&&!s?[{t:"template",id:e.templateId},...n]:n}const ma="sc-token",Cp=`.${ma}`,d9=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 X0(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+=p1(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+=p1(i)}return s}function Yl(e,t){if(!e)return;let n=0;for(const s of Array.from(e.childNodes)){const i=p1(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=xI(e);Ir(e,t,t.length)}function xI(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 p1=e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").length:1;function Bs(e){if(!e)return;const t=X0(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=Ao(i.previousSibling),f=Ao(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))Ao(s)&&Ao(s.nextSibling)&&e.insertBefore(document.createTextNode(" "),s.nextSibling);Ao(e.lastChild)&&e.appendChild(document.createTextNode(" ")),Ao(e.firstChild)&&e.insertBefore(document.createTextNode(""),e.firstChild),!fc(e)&&t!==null&&Yl(e,t)}function wI(e){return e.querySelector(Cp)?!1:!(e.textContent??"").replace(/[\u200B\uFEFF\u00a0]/g,"").trim()}function fc(e){if(!e)return!1;const t=wI(e);return t&&e.firstChild&&e.replaceChildren(),e.toggleAttribute("data-empty",t),t}const Ao=e=>!!e&&e.nodeType===Node.ELEMENT_NODE&&e.classList.contains(ma);function Vg(e){var i;if(!e)return ss();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
|
+
`;continue}n+=u.textContent??""}return s(),t.some(c=>c.t==="text")||t.push({t:"text",v:""}),t}function zg(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 f9(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 h9(){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 Nh(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 Bg=9;function bI(e){if(!e.firstChild)return[];const t=document.createRange();return t.selectNodeContents(e),Array.from(t.getClientRects()).filter(n=>n.height>0)}function EI(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 CI(e,t,n){if(!e)return!1;const s=bI(e),i=EI(s,n);if(!i)return!1;const c=i.top+i.height/2;for(const f of Array.from(e.querySelectorAll(Cp))){const h=f.getBoundingClientRect();if(!(h.bottom<i.top||h.top>i.bottom)&&!(t<h.left-Bg||t>h.right+Bg))return Nh(e,f,t<h.left+h.width/2?"before":"after"),!0}if(Math.abs(c-n)<1)return!1;const u=SI(t,c);return!u||!e.contains(u.node)||u.node.nodeType!==Node.TEXT_NODE?!1:(Ir(e,u.node,u.offset),!0)}function SI(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 jI(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=MI(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 kI=["$","/","@","#"],AI=e=>kI.includes(e),g1=e=>e===" "||e===`
|
|
101
|
+
`||e===" ";function NI(e){const t=f9(e);for(let n=t.length-1;n>=0;n--){const s=t[n];if(g1(s))return null;if(AI(s))return n===0||g1(t[n-1])?{sigil:s,query:t.slice(n+1)}:null}return null}function MI(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 A2(e,t){if(!e||!t)return;e.normalize();const n=Mh(e,t);t.remove(),Bs(e),Yl(e,n)}function Mh(e,t){let n=0;for(const s of Array.from(e.childNodes)){if(s===t)break;n+=p1(s)}return n}function RI(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 Rh(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 N2=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function PI(e){let t="",n="";const s=i=>{var f;if(i.nodeType===Node.TEXT_NODE){const h=i.textContent??"";t+=h,n+=N2(h);return}const c=i,u=(f=c.dataset)==null?void 0:f.tok;if(u){const h=LI(c);t+=h,n+=`<span data-sc-tok="${N2(u)}">${N2(h)}</span>`;return}i.childNodes.forEach(s)};return e.cloneContents().childNodes.forEach(s),{text:t,html:`<span data-sc-brief="1">${n}</span>`}}function LI(e){let t="";for(const n of Array.from(e.childNodes))n.nodeType===Node.TEXT_NODE&&(t+=n.textContent??"");return t.trim()}function TI(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 M2=e=>(e==null?void 0:e.querySelector('[data-kind="template"]'))??null,R0=e=>{var t;return((t=e==null?void 0:e.closest)==null?void 0:t.call(e,Cp))??null};function R2(e,t,n={}){var i;if(!e)return!1;let s=!1;for(let c=0;c<32;c++){const u=DI(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)};II(e,u.node,u.start,u.end,t(f)),s=!0}return s&&Bs(e),s}function HI(e,t){var i;e.dataset.kind="color",e.dataset.tok=d9(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 DI(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=FI(i.textContent??"",t,(f,h)=>$I(i,h,f)),u=c[c.length-1];if(u)return{node:i,...u}}return null}function $I(e,t,n){if(n>0)return g1(t[n-1]);const s=e.previousSibling;if(!s||Ao(s))return!0;if(s.nodeType===Node.TEXT_NODE){const i=s.textContent??"";return!i.length||g1(i[i.length-1]??"")}return!0}function FI(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=_$(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 II(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 Sp(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 _I(){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 m9=320,Ph=320,ZI=280,Mo=8,No=12,OI=8,Ug=80,VI=120,p9=48;function zI(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>p9)}function BI(e){return{top:e.top,bottom:Math.min(e.bottom,e.top+22),left:e.left,right:e.left+2}}function g9(e,t,n,s){return Math.min(Math.max(e,s),Math.max(s,n.width-t-s))}function Lh(e,t,n,s){const i=n?OI:No,c=n?Math.max(0,e.right-e.left):Math.min(m9,t.width-i*2),u=n?e.left:g9(e.left,c,t,i),f=n?Math.min(ZI,Math.floor(t.height*.4)):Ph,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 Wg(e,t,n,s){const i=Math.min(m9,n.width-No*2),c=g9(e.left,i,n,No),u=e.top-Mo-No,f=n.height-e.bottom-Mo-No,h=u>=VI||u>=f?"above":"below",m=Math.min(Ph,s??Ph),g=h==="above"?u:f,v=Math.min(m,s==null?Math.max(Ug,g):g);if(h==="above"){const w=Math.max(No,e.top-Mo-Math.min(m,u)),b=Math.min(m,e.top-Mo-w);return s==null&&b<Ug?Lh(t,n,!1):{left:c,top:w,width:i,maxHeight:b,side:h,shell:"caret"}}const y=e.bottom+Mo;return y+Math.min(v,f)>n.height-No?Lh(t,n,!1,s):{left:c,top:y,width:i,maxHeight:Math.min(m,f),side:h,shell:"caret"}}function UI(e,t,n,s={}){if(s.phone)return Lh(t,n,!0,s.height);const i=s.line??t;if(zI(e,n)&&e)return Wg(e,t,n,s.height);const c=e&&e.right-e.left>p9?e:i;return Wg(BI(c),t,n,s.height)}function WI({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),b=`${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 E=r.useCallback(j=>{const A=h9()??(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 UI(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!==b&&(C.current={key:b});const j=()=>y(E(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,b,E]),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:b,height:j};const k=E(j);!k||k.top===v.top&&k.maxHeight===v.maxHeight||y(k)},[v,b,E]),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]?`${q0}-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")||(Rh(k),f())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[f]),v?na.createPortal(o.jsx("div",{className:"sc-cmd",id:q0,"data-shell":v.shell,style:{left:v.left,top:v.top,width:v.width,maxHeight:v.maxHeight},ref:w,role:"listbox","aria-label":Og(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:`${q0}-opt-${k}`,className:"sc-cmd-row",role:"option","aria-selected":k===m,"data-active":k===m,onMouseEnter:()=>g(k),onMouseDown:T=>Rh(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(GI,{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:Og(c)}),o.jsx("div",{className:"sc-cmd-empty",children:mI(c)})]})}),document.body):null}function GI({text:e,query:t}){return o.jsx("span",{className:"sc-cmd-label",children:vI(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 KI=440,YI=460,P0=8,jo=12,qI=200,XI=240;function v9(e,t,n){if(e.bottom<0||e.top>t.height)return null;const s=Math.min((n==null?void 0:n.width)??KI,t.width-jo*2),i=e.top-P0-jo,c=t.height-e.bottom-P0-jo,u=i>=XI||i>=c?"above":"below",h=Math.max(qI,Math.min(YI,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-P0-h):e.bottom+P0;return{left:m,top:g,width:s,maxHeight:h,side:u}}const QI={fragrance:["Fragrance"],footwear:["Footwear"],apparel:["Apparel"],furniture:["Furniture","Home"],beauty:["Beauty"],electronics:["Electronics"],accessories:["Accessories"],beverage:["Food & drink"],jewelry:["Jewelry"],food:["Food & drink"]},JI={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 e_(e,t){if(!t)return!1;const n=QI[t];return!!n&&n.some(s=>e.verticals.includes(s))}function t_(e,t){if(!t)return!1;const n=JI[t];return!!n&&n.some(s=>e.suitableCategories.includes(s))}function Gg(e){return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}const n_=4;function ba(e,t){const n=Gg(t).trim().split(/\s+/).filter(Boolean);if(!n.length)return!0;const s=Gg(e);return n.every(i=>s.includes(i)||i.length>=n_&&i.endsWith("s")&&s.includes(i.slice(0,-1)))}function y9(e){return e<2?"none":"tabs"}function x9(e,t){return{visible:e.slice(0,t),remaining:Math.max(0,e.length-t)}}function w9(e,t){return[...e].sort((n,s)=>Number(t(s))-Number(t(n)))}const cu={product:"product",presenter:"presenter",scene:"scene"},hc=48;function r_(e){return e?e.t==="product"?"product":e.t==="character"?"presenter":e.t==="template"?"scene":null:null}function L0(e){const t=r_(e);return t||((e==null?void 0:e.t)==="color"?"color":null)}const wc=e=>{const t=(e??"").trim();return t||void 0},Kg=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 Yg(s,"brand",Zn((c=(i=s.shots)==null?void 0:i[0])==null?void 0:c.file))}),...t.demoProducts.map(s=>Yg(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:m1(n),thumb:n.avatarUrl??n.previewUrl??null,crop:n.avatarUrl?void 0:"top",source:Kg(n)?"brand":"catalog",recommended:t_(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:Zn((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:h1(n),thumb:n.previewUrl??null,tint:Sp(n.previewColor),source:Kg(n)?"brand":"catalog",recommended:e_(n,t.productCategory),token:{t:"template",id:n.id}}))}function Yg(e,t,n){return{kind:"product",id:e.id,label:Oa(e,"chip"),full:Oa(e,"tooltip"),sub:a_(e),search:wp(e),thumb:n,source:t,token:{t:"product",id:e.id}}}function a_(e){const t=e;return wc(t.brand)??wc(t.vendor)}function bc(e,t){const n=t.trim();return n?e.filter(s=>ba(s.search,n)):e}function qg(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 ld(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)=>qg(e,m,n.bookmarked)-qg(e,g,n.bookmarked)).map(m=>n.bookmarked.has(m.id)?{...m,bookmarked:!0}:m),{visible:f,remaining:h}=x9(u,n.shown??hc);return{current:s,items:f,remaining:h,total:u.length}}const s_={$:"product","/":"scene","@":"presenter"},Xg=40,Qg={Products:8,Presenters:8,Colors:16,Scenes:8},o_={$:"Products","/":"Scenes","@":"Presenters","#":"Colors"};function b9(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 l_(e,t,n,s){return ld(e,t,{currentId:null,query:"",bookmarked:n,shown:s}).items.map(b9)}function i_(e,t,n={query:""}){const s=n.query.trim(),i=n.bookmarked??new Set;if(e==="#"){const f=(t.colors??[]).map(c_);return s?f.filter(h=>ba(h.search??h.label,s)).slice(0,Xg):f.slice(0,Qg.Colors)}const c=s_[e],u=c==="product"?t.products:c==="presenter"?t.presenters:t.scenes??[];return s?bc(u,s).map(b9).slice(0,Xg):l_(c,u,i,Qg[o_[e]])}function c_(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 u_="(pointer: coarse)";function d_(e){return lo(bi)?o.jsx(g_,{...e}):o.jsx(p_,{...e})}function f_(){return!lo(u_)}const h_=e=>`Remove ${cu[e]}`;function m_(e,t,n){const s={slug:t};return e==="product"?Js(s,n):e==="presenter"?al(s,n):rl(s,n)}function E9({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,b]=r.useState(hc),C=r.useRef(null),E=r.useRef(null),[N,j]=r.useState(0),k=r.useMemo(()=>e==="scene"?new Set(Va(s)):new Set,[e,s]);r.useEffect(()=>{b(hc),j(0)},[v]);const A=r.useMemo(()=>ld(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 W;const oe=(W=E.current)==null?void 0:W.querySelectorAll("[data-nav]")[I];oe&&(j(I),oe.focus({preventScroll:!0}),oe.scrollIntoView({block:"nearest"}))},[]),T=r.useCallback(()=>{const I=E.current;return I?Math.max(1,getComputedStyle(I).gridTemplateColumns.split(" ").filter(Boolean).length):1},[]),D=I=>{var Z;if(I.key==="Escape"){I.preventDefault(),I.stopPropagation(),h("escape");return}const oe=I.target===C.current;if(oe&&I.key==="ArrowDown"){I.preventDefault(),M(0);return}if(oe&&I.key==="Enter"){I.preventDefault(),A.items[0]&&u(A.items[0]);return}if(oe)return;const W=T(),J=I.key==="ArrowRight"?1:I.key==="ArrowLeft"?-1:I.key==="ArrowDown"?W:I.key==="ArrowUp"?-W:0;if(J){I.preventDefault();const ee=N+J;ee<0&&J===-W?(Z=C.current)==null||Z.focus():ee>=0&&ee<A.items.length&&M(ee);return}I.key==="Home"?(I.preventDefault(),M(0)):I.key==="End"&&(I.preventDefault(),M(A.items.length-1))},P=cu[e],G=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(Hc,{size:13}),o.jsx("input",{ref:C,type:"text",value:v,onChange:I=>y(I.target.value),placeholder:`Search ${P}s`,"aria-label":`Search ${P}s`,autoComplete:"off",spellCheck:!1})]})}),A.current&&o.jsxs("div",{className:"sc-swap-cur",title:A.current.full,children:[o.jsx(Jg,{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:m_(e,i,A.current.id),target:"_blank",rel:"noreferrer",title:`Open this ${P} in a new tab`,"aria-label":`Open ${A.current.label} in a new tab`,children:o.jsx(K1,{size:14})}),o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(ya,{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 ${P}s.`}),o.jsx("div",{className:"sc-swap-grid",ref:E,role:"listbox","aria-label":`Choose a ${P}`,children:A.items.map((I,oe)=>o.jsxs("div",{className:"sc-swap-card",role:"option","aria-selected":!1,"data-nav":oe,tabIndex:oe===N?0:-1,title:I.full,style:I.tint?{"--tint":I.tint}:void 0,onFocus:()=>j(oe),onClick:()=>u(I),onKeyDown:W=>{W.key!=="Enter"&&W.key!==" "||(W.preventDefault(),u(I))},children:[o.jsx(Jg,{src:I.thumb,tinted:!!I.tint}),o.jsxs("b",{dir:"auto",children:[I.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(Y1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),I.label]}),G&&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:()=>b(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 ",P," 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(iw,{size:13}),h_(e)]})]})]})}function Jg({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(Ga,{size:18})}):o.jsx("img",{className:"sc-swap-thumb","data-tinted":t||void 0,src:e,alt:"",loading:"lazy",onError:()=>s(!0)})}function p_(e){const{anchor:t,kind:n,onClose:s}=e,i=f_(),[c,u]=r.useState(null),f=r.useRef(null);return r.useLayoutEffect(()=>{var m,g;const h=()=>{const v=window.visualViewport,y=v9(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 ${cu[n]}`,style:{left:c.left,top:c.top,width:c.width,maxHeight:c.maxHeight},children:o.jsx(E9,{...e,autoFocusSearch:i})}),document.body):null}function g_(e){const{kind:t,onClose:n}=e,{sheet:s,grip:i}=ou(()=>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 ",cu[t]]})]}),o.jsx(E9,{...e,autoFocusSearch:!1})]})]})})}const v_=260;function y_(e){return lo(bi)?o.jsx(w_,{...e}):o.jsx(x_,{...e})}function Dl(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function C9({currentHex:e,currentName:t,palette:n,onPick:s,onRemove:i,onClose:c}){const u=r.useMemo(()=>{const E=new Set,N=[],j=A=>{const M=fn(A.hex);!M||E.has(M)||(E.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(E=>Dl(E.hex,e))));r.useEffect(()=>{m(E=>Math.max(0,Math.min(E,Math.max(0,u.length-1))))},[u.length]),r.useLayoutEffect(()=>{var N,j;const E=Math.max(0,u.findIndex(k=>Dl(k.hex,e)));(j=(N=f.current)==null?void 0:N.querySelectorAll("[data-nav]")[E])==null||j.focus({preventScroll:!0})},[]);const g=r.useCallback(E=>{var j;const N=(j=f.current)==null?void 0:j.querySelectorAll("[data-nav]")[E];N&&(m(E),N.focus({preventScroll:!0}))},[]),v=E=>{if(E.key==="Escape"){E.preventDefault(),E.stopPropagation(),c("escape");return}if(E.key==="ArrowDown"||E.key==="ArrowUp"){E.preventDefault();const N=h+(E.key==="ArrowDown"?1:-1);N>=0&&N<u.length&&g(N)}},y=E=>s({t:"color",hex:E.hex,name:E.name||void 0}),w=(E,N)=>{const j=u.find(k=>Dl(k.hex,E));s({t:"color",hex:E,name:(j==null?void 0:j.name)||void 0},{live:!0})},b=e?fn(e):null,C=!!b&&!n.some(E=>Dl(E.hex,b));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((E,N)=>{const j=Dl(E.hex,e),k=o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-swap-dot",style:{background:E.hex},"aria-hidden":!0}),o.jsx("b",{dir:"auto",children:E.name}),o.jsx("span",{children:E.hex}),j&&o.jsx("span",{className:"sc-swap-tick","aria-hidden":!0,children:o.jsx(ya,{size:11,weight:"bold"})})]});return C&&j?o.jsx(f1,{className:"sc-swap-swatch",triggerStyle:{background:"none"},value:E.hex,presets:n.map(A=>A.hex),commitMode:"live",align:"start",label:`Edit ${E.name}`,triggerProps:{role:"option","aria-selected":!0,"data-on":"","data-nav":N,tabIndex:N===h?0:-1,title:`${E.name} ${E.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:`${E.name} ${E.hex}`,onFocus:()=>m(N),onClick:()=>y(E),onKeyDown:A=>{A.key!=="Enter"&&A.key!==" "||(A.preventDefault(),y(E))},children:k},E.hex)})})}),o.jsxs("div",{className:"sc-swap-foot",children:[o.jsxs(f1,{className:"sc-swap-swatch sc-swap-custom",triggerStyle:{background:"none"},value:e??yp(n),presets:n.map(E=>E.hex),commitMode:"live",align:"start",label:"Custom colour",onChange:E=>w(E),children:[o.jsx(nr,{size:12}),o.jsx("b",{children:"Custom colour"})]}),o.jsxs("button",{type:"button",className:"sc-swap-remove",onClick:i,children:[o.jsx(iw,{size:13}),"Remove colour"]})]})]})}function x_(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=v9(t.getBoundingClientRect(),{width:(m==null?void 0:m.width)??window.innerWidth,height:(m==null?void 0:m.height)??window.innerHeight},{width:v_});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(C9,{...e})}),document.body):null}function w_(e){const{onClose:t}=e,{sheet:n,grip:s}=ou(()=>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(C9,{...e})]})]})})}function uu(e){const{brand:t,products:n}=It(),{scenes:s,presenters:i,demoProducts:c}=mn(),u=r.useMemo(()=>Cg(lu(t),s),[t,s]),f=r.useMemo(()=>Cg(nd(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}];function Q0(e){const t=_r.find(n=>n.id===e);return t?t.w/t.h:1}const T0=6,b_=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:b},C){var Ot,tt,Qe,Ut,Vt;const E=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[P,G]=r.useState(""),[I,oe]=r.useState(null),W=r.useRef(!1),J=r.useRef(0),[Z,ee]=r.useState(!1),q=r.useRef(0),{products:H}=It(),K=H.length?H:((Ot=s.json)==null?void 0:Ot.products)??[],X=((tt=s.json)==null?void 0:tt.characters)??[],U=r.useMemo(()=>zw(s.json),[s]),L=r.useCallback((z,ue)=>{var Sn,Ct,Nr,mr;const xe=document.createElement("span");xe.className=ma,xe.contentEditable="false",xe.dataset.kind=z.t,xe.dataset.tok=d9(z),xe.dataset.uid=ue??`u${J.current++}`;let Ne="",Ye=null,it=null;if(z.t==="template"){const ct=i.find(Qt=>Qt.id===z.id);Ne=ct?to(ct,"chip"):"missing template",Ye=(ct==null?void 0:ct.previewUrl)??null;const jt=Sp(ct==null?void 0:ct.previewColor);jt&&(xe.dataset.tinted="true",xe.style.setProperty("--tint",jt))}else if(z.t==="product"){const ct=K.find(zt=>zt.id===z.id),jt=ct?null:u.find(zt=>zt.id===z.id),Qt=ct??jt;Ne=Qt?Oa(Qt,"chip"):"missing product",Ye=ct?Zn((Ct=(Sn=ct.shots)==null?void 0:Sn[0])==null?void 0:Ct.file):(jt==null?void 0:jt.previewUrl)??null}else if(z.t==="character"){const ct=X.find(Qt=>Qt.id===z.id),jt=ct?null:c.find(Qt=>Qt.id===z.id);Ne=(ct==null?void 0:ct.name)??(jt==null?void 0:jt.name)??"missing person",Ye=ct?Zn((mr=(Nr=ct.shots)==null?void 0:Nr[0])==null?void 0:mr.file):(jt==null?void 0:jt.avatarUrl)??(jt==null?void 0:jt.previewUrl)??null}else if(z.t==="color")Ne=z.name??z.hex,it=z.hex;else if(z.t==="ref")Ne="reference",Ye=tn(z.imageHash);else if(z.t==="mark"){const ct=U.find(jt=>jt.hash===z.imageHash);Ne=ct?Bw(s.json,ct):"missing mark",Ye=tn(z.imageHash)}if(Ye){const ct=document.createElement("img");ct.src=Ye,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(Ne));const _t=(g==null?void 0:g(z))??null;_t&&(xe.title=_t,xe.dataset.warn="1");const At=L0(z);if(At){const ct=At==="color"?"colour":cu[At];xe.tabIndex=0,xe.setAttribute("role","button"),xe.setAttribute("aria-haspopup","dialog"),xe.setAttribute("aria-expanded","false"),xe.setAttribute("aria-label",`${ct}: ${Ne}. Change or remove.`)}const bt=document.createElement("button");return bt.type="button",bt.tabIndex=-1,bt.setAttribute("aria-label",`Remove ${Ne}`),bt.dataset.role="remove",bt.appendChild(_I()),xe.appendChild(bt),xe},[i,K,X,c,u,U,s,g]),O=r.useCallback(()=>{const z=E.current;z&&(N.current=z.querySelectorAll(`.${ma}`).length,n(Vg(z)))},[n]);r.useEffect(()=>{const z=E.current;z&&(zg(z,t!=null&&t.length?t:ss(),ue=>L(ue)),N.current=z.querySelectorAll(`.${ma}`).length,fc(z))},[]),r.useEffect(()=>{const z=E.current;if(z)for(const ue of z.querySelectorAll(`.${ma}`)){const xe=zs(ue.dataset.tok??"");if(!xe)continue;const Ne=(g==null?void 0:g(xe))??null;Ne?(ue.title=Ne,ue.dataset.warn="1"):(ue.removeAttribute("title"),delete ue.dataset.warn)}},[g]),r.useEffect(()=>{const z=()=>{const ue=X0(E.current);ue!==null&&(j.current=ue)};return document.addEventListener("selectionchange",z),()=>document.removeEventListener("selectionchange",z)},[]);const ne=r.useCallback(z=>{const ue=E.current;if(ue){if(z.t==="template"){const xe=M2(ue);if(xe){xe.replaceWith(L(z,xe.dataset.uid)),Bs(ue),O(),A(null),G("");return}}jI(ue,L(z),{eatQuery:!!k,fallbackUnits:j.current}),O(),A(null),G("")}},[k,L,O]),re=r.useRef(ne);r.useEffect(()=>{re.current=ne},[ne]);const le=r.useCallback((z,ue)=>{const xe=E.current,Ne=xe==null?void 0:xe.querySelector(`[data-uid="${CSS.escape(z)}"]`);return!xe||!Ne?!1:(Ne.replaceWith(L(ue,z)),Bs(xe),O(),!0)},[L,O]),ae=r.useCallback(z=>{const ue=E.current,xe=ue==null?void 0:ue.querySelector(`[data-uid="${CSS.escape(z)}"]`);if(!ue||!xe)return null;const Ne=Mh(ue,xe);return A2(ue,xe),O(),Ne},[O]),me=r.useCallback((z,ue,xe,Ne)=>{const Ye=z.dataset.uid;Ye&&(z.dataset.open="",z.setAttribute("aria-expanded","true"),A(null),G(""),T({uid:Ye,kind:ue,anchor:z,caret:xe,touch:Ne}))},[]),he=r.useCallback((z,ue)=>{const xe=D.current;if(D.current=null,T(null),!xe)return;const Ne=E.current,Ye=Ne==null?void 0:Ne.querySelector(`[data-uid="${CSS.escape(xe.uid)}"]`);Ye&&(delete Ye.dataset.open,Ye.setAttribute("aria-expanded","false"));const it=ue!==void 0?ue:xe.caret;if(xe.touch){it!=null&&(j.current=it);return}Ne&&(Ne.focus({preventScroll:!0}),it!=null?Yl(Ne,it):dc(Ne))},[]);r.useEffect(()=>{if(!M)return;const z=E.current;z!=null&&z.querySelector(`[data-uid="${CSS.escape(M.uid)}"]`)||he("outside")},[M,he]),r.useImperativeHandle(C,()=>({insert:z=>re.current(z),setTokens:z=>{const ue=E.current;ue&&(zg(ue,z.length?z:ss(),xe=>L(xe)),N.current=ue.querySelectorAll(`.${ma}`).length,fc(ue),n(Vg(ue)))},removeTemplate:()=>{const z=E.current,ue=z?M2(z):null;!z||!ue||(A2(z,ue),O())},openMenu:z=>{G(""),A({anchor:z})},focus:()=>dc(E.current)}));const de=uu(v),be=r.useCallback(z=>zl(z,de),[de]),Te=r.useMemo(()=>new Set(Va(s.id)),[s.id]),Ue=r.useMemo(()=>{var z;return k?i_(k.sigil??"$",{products:zl("product",de),presenters:zl("presenter",de),scenes:zl("scene",de),colors:xa((z=s.json)==null?void 0:z.palette)},{query:P,bookmarked:Te}).map(ue=>({...ue,run:()=>ue.token.t==="template"?f(ue.token.id):re.current(ue.token)})):[]},[k,de,P,Te,f,(Qe=s.json)==null?void 0:Qe.palette]),ge=z=>{const ue=E.current,xe=z.target;if(xe.closest('[data-role="remove"]')){z.preventDefault();const At=R0(xe);M&&(At==null?void 0:At.dataset.uid)===M.uid&&he("remove"),A2(ue,At),O(),A(null);return}CI(ue,z.clientX,z.clientY);const Ne=R0(xe);if(!Ne)return;const Ye=Ne.getBoundingClientRect();if(z.clientX-Ye.left<=T0||Ye.right-z.clientX<=T0)return;const it=Ne.dataset.uid??null;if(it&&(M==null?void 0:M.uid)===it){z.detail!==0&&he("outside");return}const _t=L0(zs(Ne.dataset.tok??""));_t&&me(Ne,_t,X0(ue),!1)},st=z=>{if(z.pointerType==="mouse")return;const ue=z.target;if(ue.closest('[data-role="remove"]'))return;const xe=R0(ue);if(!xe)return;const Ne=xe.getBoundingClientRect();if(z.clientX-Ne.left<=T0||Ne.right-z.clientX<=T0)return;const Ye=L0(zs(xe.dataset.tok??""));if(!Ye||xe.dataset.uid&&(M==null?void 0:M.uid)===xe.dataset.uid)return;z.preventDefault();const it=E.current,_t=document.activeElement===it,At=_t?X0(it):j.current;_t&&(it==null||it.blur()),me(xe,Ye,At,!0)},ht=z=>{const ue=E.current,xe=R0(z.target);if(xe&&!M){const Ne=()=>{Nh(ue,xe,"after"),ue==null||ue.focus({preventScroll:!0})};if(z.key==="Tab"){z.preventDefault(),Nh(ue,xe,z.shiftKey?"before":"after"),ue==null||ue.focus({preventScroll:!0});return}if(z.key==="Enter"||z.key===" "){z.preventDefault();const Ye=L0(zs(xe.dataset.tok??""));Ye&&ue&&me(xe,Ye,Mh(ue,xe)+1,!1);return}if(z.key==="Backspace"||z.key==="Delete"){z.preventDefault();const Ye=xe.dataset.uid?ae(xe.dataset.uid):null;ue==null||ue.focus({preventScroll:!0}),Ye!=null&&Yl(ue,Ye);return}if(z.key==="Escape"){z.preventDefault(),Ne();return}}if(z.key==="Escape"&&k){z.preventDefault(),A(null),G("");return}if(z.key==="Enter"&&!z.shiftKey){const Ne=z.defaultPrevented;z.preventDefault(),pI({menuOpen:!!k,handled:Ne})&&w();return}if(!(k||M)&&!hI(z)&&(z.key==="$"||z.key==="/"||z.key==="@"||z.key==="#")){const Ne=E.current,Ye=f9(Ne),it=Ye.slice(-1);if(Ye.length&&!/[\s\u00a0]/.test(it))return;G(""),A({anchor:{getBoundingClientRect:()=>h9()??(Ne==null?void 0:Ne.getBoundingClientRect())??new DOMRect},sigil:z.key})}},Rt=r.useCallback(z=>{var ue,xe;return(xe=xa((ue=s.json)==null?void 0:ue.palette).find(Ne=>Ne.hex===z))==null?void 0:xe.name},[(Ut=s.json)==null?void 0:Ut.palette]),Pe=()=>{const z=E.current,ue=(z==null?void 0:z.querySelectorAll(`.${ma}`).length)??0;ue<N.current&&RI(z),N.current=ue,fc(z)&&dc(z);const xe=W.current;W.current=!1;const Ne=R2(z,it=>L(it),{commit:xe,nameFor:Rt});Ne&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ma}`).length)??0,A(null),G(""));const Ye=Ne?{open:!1}:gI(NI(z),xe);Ye.open?k&&G(Ye.query):k&&(A(null),G("")),O()},Ae=z=>{const ue=window.getSelection();if(!ue||ue.rangeCount===0||ue.isCollapsed)return null;const xe=ue.getRangeAt(0),{text:Ne,html:Ye}=PI(xe);return Ne?(z.clipboardData.setData("text/plain",Ne),z.clipboardData.setData("text/html",Ye),z.preventDefault(),xe):null},Se=z=>{Ae(z)},at=z=>{const ue=Ae(z);ue&&(ue.deleteContents(),Bs(E.current),O())},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"?U.some(ue=>ue.hash===z.imageHash):!0,[i,K,X,c,u,U]),qt=z=>{Array.from(z.dataTransfer.types).includes("Files")&&(z.preventDefault(),q.current++,ee(!0))},Xt=z=>z.preventDefault(),Zt=()=>{q.current=Math.max(0,q.current-1),q.current===0&&ee(!1)},yn=z=>{z.preventDefault(),q.current=0,ee(!1),z.dataTransfer.files.length&&(b==null||b(z.dataTransfer.files))},Rn=z=>{z.preventDefault(),W.current=!0;const ue=TI(z.clipboardData.getData("text/html"));if(ue&&Gn(ue)){const Ne=E.current;R2(Ne,Ye=>L(Ye),{commit:!0,nameFor:Rt})&&(N.current=(Ne==null?void 0:Ne.querySelectorAll(`.${ma}`).length)??0,O());return}const xe=z.clipboardData.getData("text/plain");xe&&document.execCommand("insertText",!1,xe)},Gn=z=>{const ue=E.current,xe=window.getSelection();if(!ue||!xe||xe.rangeCount===0||!ue.contains(xe.getRangeAt(0).startContainer))return!1;const Ne=xe.getRangeAt(0);let Ye=!1;const it=[];for(const Ct of z){if(typeof Ct!="string"&&!kt(Ct)){it.push(j_(Ct,i,K));continue}if(typeof Ct!="string"&&Ct.t==="template"){if(Ye)continue;Ye=!0}it.push(Ct)}const _t=Ye?M2(ue):null;Ne.deleteContents();const At=document.createDocumentFragment();for(const Ct of it)At.appendChild(typeof Ct=="string"?document.createTextNode(Ct):L(Ct));const bt=document.createTextNode(" ");At.appendChild(bt),Ne.insertNode(At),_t&&_t.remove();const Sn=S_(ue,bt);return Bs(ue),Yl(ue,Sn),O(),!0},Pn=r.useCallback(()=>{requestAnimationFrame(()=>{const z=E.current;z&&document.activeElement===z&&fc(z)&&dc(z)})},[]);return o.jsxs("div",{className:"sc-brief","data-drag-over":Z||void 0,children:[o.jsx("div",{ref:E,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?q0:void 0,"aria-activedescendant":k?I??void 0:void 0,tabIndex:0,dir:"auto","data-ph":h,...m?{"data-ph-sm":m}:{},onClick:ge,onPointerDown:st,onKeyDown:ht,onInput:Pe,onCopy:Se,onCut:at,onPaste:Rn,onDragEnter:qt,onDragOver:Xt,onDragLeave:Zt,onDrop:yn,onFocus:Pn,onBlur:()=>{const z=E.current;R2(z,ue=>L(ue),{commit:!0,nameFor:Rt})&&(N.current=(z==null?void 0:z.querySelectorAll(`.${ma}`).length)??0,A(null),G("")),O()}}),k&&o.jsx(WI,{anchor:k.anchor,composer:{getBoundingClientRect:()=>{var z,ue,xe;return((ue=(z=E.current)==null?void 0:z.closest(".sc-promptcard"))==null?void 0:ue.getBoundingClientRect())??((xe=E.current)==null?void 0:xe.getBoundingClientRect())??new DOMRect}},line:{getBoundingClientRect:()=>{var z;return((z=E.current)==null?void 0:z.getBoundingClientRect())??new DOMRect}},query:P,options:Ue,sigil:k.sigil,onActiveId:oe,onClose:()=>{A(null),G("")}}),(M==null?void 0:M.kind)==="color"?o.jsx(y_,{anchor:M.anchor,currentHex:H0(M.anchor),currentName:E_(M.anchor),palette:xa((Vt=s.json)==null?void 0:Vt.palette),onPick:(z,ue)=>{var Ne;const xe=M.uid;if(ue!=null&&ue.live){const Ye=(Ne=E.current)==null?void 0:Ne.querySelector(`[data-uid="${CSS.escape(xe)}"]`);Ye&&HI(Ye,z),O();return}if(C_(z.hex,H0(M.anchor))){he("pick");return}le(xe,z),he("pick")},onRemove:()=>{const z=ae(M.uid);he("remove",z)},onClose:he},M.uid):M?o.jsx(d_,{kind:M.kind,anchor:M.anchor,currentId:H0(M.anchor),candidates:be(M.kind),brandId:s.id,brandSlug:s.slug,warning:M.anchor.title||null,onAttachRequest:y?z=>{he("outside"),y(z)}:void 0,onPick:z=>{const ue=M.uid;if(z.id===H0(M.anchor)){he("pick");return}z.kind==="scene"?f(z.id):le(ue,z.token),he("pick")},onRemove:()=>{const z=ae(M.uid);he("remove",z)},onClose:he},M.uid):null]})});function H0(e){const t=zs(e.dataset.tok??"");return t?t.t==="color"?t.hex:"id"in t?t.id:null:null}function E_(e){const t=zs(e.dataset.tok??"");return(t==null?void 0:t.t)==="color"?t.name:void 0}function C_(e,t){const n=e?fn(e):null,s=t?fn(t):null;return!!n&&n===s}function S_(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 j_(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 k_=8,P2=60,A_=["All","Products","Presenters","Scenes","Colors","Brand","Shots"];function N_({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=uu(s),w=r.useMemo(()=>new Set(Va(e.id)),[e.id]),b=ol(),[C]=li(),E=C.get("new")!==null;r.useEffect(()=>{const D=P=>{P.key==="Escape"&&!E&&(P.stopPropagation(),f())};return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[f,E]),r.useEffect(()=>{const D=P=>{E||!P.target.closest(".sc-attachpanel")&&!P.target.closest(".sc-attach-toggle")&&f()};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[f,E]);const N=r.useMemo(()=>{var oe;const D=xa((oe=e.json)==null?void 0:oe.palette),P=zw(e.json),G=t.filter(W=>W.status==="done"&&W.images.length>0).slice(-12).reverse(),I=(W,J)=>ld(W,zl(W,y),{currentId:null,query:"",bookmarked:w,shown:Number.MAX_SAFE_INTEGER}).items.map(Z=>({key:`${W}:${Z.id}`,tab:J,label:Z.label,sub:Z.sub,search:Z.search,thumb:Z.thumb,recommended:Z.recommended,run:()=>Z.kind==="scene"?c(Z.id):i(Z.token)}));return[...I("product","Products"),...I("presenter","Presenters"),...I("scene","Scenes"),...P.map(W=>({key:`m:${W.hash}`,tab:"Brand",label:Bw(e.json,W),sub:"the mark itself",thumb:tn(W.hash),run:()=>i({t:"mark",imageHash:W.hash})})),...D.map(W=>({key:`c:${W.hex}`,tab:"Colors",label:W.name,sub:W.hex,swatch:W.hex,run:()=>i({t:"color",hex:W.hex,name:W.name})})),...G.map((W,J)=>({key:`r:${W.id}`,tab:"Shots",label:`Shot ${G.length-J}`,sub:"as reference",thumb:tn(W.images[0]),run:()=>i({t:"ref",imageHash:W.images[0]})}))]},[e,y,w,t,i,c]),j=D=>ba(`${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(Ga,{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:Rh,children:[o.jsxs("div",{className:"sc-ap-head",children:[o.jsx("div",{className:"sc-ap-tabs",children:A_.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(Hc,{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(dw,{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 P=A.filter(oe=>oe.tab===D);if(!P.length)return null;const G=P.slice(0,k_),I=P.length-G.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:G.map(T)}),I>0&&o.jsxs("button",{type:"button",className:"sc-amore",onClick:()=>m(D),children:["Show all ",P.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:()=>b("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(nr,{size:16})}),o.jsx("b",{children:"Add product"})]}),A.slice(0,P2).map(T)]}),A.length>P2&&o.jsxs("p",{className:"sc-ap-capped",children:["Showing ",P2," of ",A.length,". Search to narrow it down."]})]})]})]})}function M_({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(DH,{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 R_={"codex-cli":{sizing:"advisory"},openrouter:{sizing:"ratio"},replicate:{sizing:"ratio",formats:["square","story","landscape"]},fal:{sizing:"exact"},demo:{sizing:"exact"}},P_={sizing:"exact"},S9=e=>R_[e]??P_;function L_(e,t){const n=S9(e).formats;return!n||n.includes(t)}const jp=e=>S9(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"}],v1=[1,2,3,4],j9=e=>_r.filter(t=>!L_(e,t.id)).map(t=>t.id),Th=(e,t)=>t.length===0?void 0:`${e} cannot make ${_r.filter(n=>t.includes(n.id)).map(n=>n.hint).join(" or ")}.`,kp=e=>{var n;e.preventDefault();const t=e.currentTarget??e.target;(n=t==null?void 0:t.querySelector('[role="radiogroup"]'))==null||n.focus()};function L2({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:kp,onCloseAutoFocus:u,onInteractOutside:h=>{var m;(m=h.target)!=null&&m.closest(".sc-prompt-pills")&&h.preventDefault()},children:c(()=>i(!1))})]})}function Hh({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 ev=()=>o.jsx("span",{className:"sc-setpop-tick","aria-hidden":!0,children:o.jsx(ya,{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 b,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=(b=f.current)==null?void 0:b.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 T_=({children:e})=>o.jsx("p",{className:"sc-setpop-foot",children:e});function H_({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=j9(t),w=jp(t),[b,C]=r.useState(null),E=r.useRef(null);E.current=b;const N=k=>{k.preventDefault(),E.current===null&&(m==null||m(k))},j=k=>({open:b===k,onCloseAutoFocus:N,onOpenChange:A=>C(M=>A?k:M===k?null:M)});return o.jsxs("div",{className:"sc-prompt-pills",children:[o.jsx(L2,{...j("aspect"),aria:`Aspect ${g.label}, ${g.hint}`,width:"178px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(Hh,{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(Hh,{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(ev,{})]},A.id))}),Th(n,y)&&o.jsx(T_,{children:Th(n,y)})]})}),e==="generation"&&o.jsx(L2,{...j("variants"),aria:`${c} variants`,width:"156px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(xh,{size:14}),c]}),children:k=>o.jsx(o.Fragment,{children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:v1.map(String),onChange:A=>u(Number(A)),children:v1.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(L2,{...j("resolution"),aria:`Resolution ${v.label}, ${v.edge} px`,width:"192px",trigger:o.jsxs(o.Fragment,{children:[o.jsx(RH,{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(ev,{})]},A.id))})})})]})}function k9({mode:e,engineId:t,engineName:n,formatId:s,onFormat:i,count:c,onCount:u,quality:f,onQuality:h}){const m=j9(t),g=jp(t);return o.jsxs(o.Fragment,{children:[o.jsx(T2,{label:"Aspect ratio",note:Th(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(Hh,{w:v.w,h:v.h,slot:17,box:14}),v.hint]},v.id))})}),e==="generation"&&o.jsx(T2,{label:"Variants",children:o.jsx(ql,{label:"Variants",className:"sc-seg",value:String(c),ids:v1.map(String),onChange:v=>u(Number(v)),children:v1.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(T2,{label:"Resolution",note:g==="advisory"?"This engine renders at its own size, so this is a request rather than a guarantee.":void 0,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:g==="advisory"?`${v.label}, asks for ${v.edge} px, ${v.note}`:`${v.label}, ${v.edge} px, ${v.note}`,onPick:()=>h(v.id),children:v.label},v.id))})})]})}function T2({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 D_(e){const[t,n]=r.useState(!1),{sheet:s,grip:i}=ou(()=>n(!1));return o.jsxs(ui,{open:t,onOpenChange:n,children:[o.jsx(um,{asChild:!0,children:o.jsx("button",{type:"button",className:"sc-var sc-shotset","aria-label":"Shot settings",title:"Shot settings",children:o.jsx(tw,{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:kp,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(k9,{...e})]})]})]})}const $_=720*60*60*1e3,Ec=e=>`scenri:draft-${e}`;function F_(e){try{return localStorage.getItem(e)}catch{return null}}function I_(e,t){try{localStorage.setItem(e,t)}catch{}}function Dh(e){try{localStorage.removeItem(e)}catch{}}function tv(e,t,n){return e.some(s=>s.t==="text"?!!s.v.trim():!0)||Object.values(t).some(s=>!!s.trim())||!!n}function __(e){const t=F_(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 Dh(Ec(e)),null;const i=Date.now()-Date.parse(s.updatedAt??"");return!Number.isFinite(i)||i>$_?(Dh(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 A9(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};I_(Ec(e),JSON.stringify(n))}function nv(e){Dh(Ec(e))}function rv(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 $h=4,av=24,sv=24,N9={product:[],presenter:[],scene:null};function Z_(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 O_(e){return`${e.product.join(",")}|${e.presenter.join(",")}|${e.scene??""}`}function V_(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 Ap=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:b,target:C,onClearTarget:E,sourceImage:N,onRestoreBranchId:j,setSlug:k,persistDraft:A=!0},M){var Kn,Ln,xn;const{products:T}=It(),{demoProducts:D,loaded:P}=mn(),G=uu(),I=G.scenes,oe=G.presenters,W=ed(),J=td(),{push:Z}=hr(),ee=s.filter(fe=>fe.available),[q,H]=Za(ir.engine,Fc);r.useEffect(()=>{const fe=cF(ee,q);fe!==q&&H(fe)},[ee,q,H]);const K=ee.length===0&&s.some(fe=>fe.code==="not-installed"||fe.code==="not-authenticated"),X=ee.length===0,U=X?K?{icon:o.jsx(Yw,{}),title:"Image generation is not set up yet",detail:"About a minute, using the ChatGPT account you already have.",action:"Set up",onAct:()=>J(),info:!0}:{icon:o.jsx(u1,{size:15}),title:"No image provider connected",detail:"Add a provider key and this brief is ready to run.",action:"Open settings",onAct:()=>W("engines"),info:!1}:null,[L,O]=r.useState(ss()),[ne,re]=r.useState(void 0),[le,ae,me]=p2(ir.format,"square"),[he,de]=r.useState({}),[be,Te,Ue]=p2(ir.count,2),[ge,st]=r.useState(!1),[ht,Rt]=r.useState(null),[Pe,Ae]=r.useState(null),[Se,at]=r.useState(!1),[kt,qt]=r.useState("All"),[Xt,Zt,yn]=p2(ir.quality,"standard"),[Rn,Gn]=r.useState(!1),[Pn,Ot]=r.useState(!1),tt=r.useRef(null),Qe=r.useRef(null),Ut=r.useRef(null),Vt=r.useRef({tokens:L,tplFields:he,branchId:(C==null?void 0:C.id)??null});Vt.current={tokens:L,tplFields:he,branchId:(C==null?void 0:C.id)??null};const z=r.useRef(null),ue=r.useRef(null),xe=r.useRef(void 0),Ne=r.useRef(void 0),Ye=r.useRef(void 0),it=r.useCallback(fe=>{if(ue.current&&(clearTimeout(ue.current),ue.current=null),!A)return;const Xe=Vt.current;tv(Xe.tokens,Xe.tplFields,Xe.branchId)?A9(fe,{...Xe,setSlug:k}):nv(fe)},[k,A]);r.useEffect(()=>{v&&(qt(v),at(!0))},[v]),r.useEffect(()=>{if(!u)return;const fe=(u.tokens??[]).find(Xe=>Xe.t==="format");fe&&me(fe.id),u.variants&&Ue(u.variants),u.quality&&yn(u.quality),re(u9(u)),de(u.templateFields??{})},[u]),r.useEffect(()=>{var St,Jt;const fe=z.current;fe&&fe!==n.id&&it(fe);const Xe=!!u||!!f||!A;let et=null,ut=null,De=null;if(!Xe){const pt=__(n.id);pt&&tv(pt.tokens,pt.tplFields,pt.branchId)&&(et=pt.tokens,ut=pt.tplFields,De=pt.branchId)}if(h&&h!==xe.current){xe.current=h;const pt=et??ss(),jn=pt.find(Tn=>Tn.t==="template"),gn=(jn==null?void 0:jn.id)??null,Nt=De,Yn=((St=I.find(Tn=>Tn.id===h))==null?void 0:St.name)??"this scene",Mr=Nt?c.find(Tn=>Tn.id===Nt):null,sa=rv(gn,h,Yn,Nt,Mr?Cn(Mr):null);if(sa.changed&&(et=[{t:"template",id:h},...pt.filter(Tn=>Tn.t!=="template")],(Jt=sa.toast)!=null&&Jt.branchWasCleared&&(De=null),sa.toast)){const Tn=sa.toast;Z({kind:"success",title:Tn.title,action:{label:"Undo",onClick:()=>{var _,ie;Tn.prevSceneId?(_=tt.current)==null||_.insert({t:"template",id:Tn.prevSceneId}):(ie=tt.current)==null||ie.removeTemplate(),Tn.branchWasCleared&&Nt&&(j==null||j(Nt))}}})}}if(m&&m!==Ne.current){Ne.current=m;const pt=et??ss();pt.some(gn=>gn.t==="character"&&gn.id===m)||(et=[...pt,{t:"character",id:m}])}if(g&&g!==Ye.current){Ye.current=g;const pt=et??ss();pt.some(gn=>gn.t==="product"&&gn.id===g)||(et=[...pt,{t:"product",id:g}])}et&&(re(et),de(ut??{}),De&&(j==null||j(De))),z.current=n.id},[n.id,h,m,g]),r.useEffect(()=>{var fe;ne&&((fe=tt.current)==null||fe.setTokens(ne),re(void 0))},[ne]);const _t=r.useMemo(()=>{var De;const fe=_r.find(St=>St.id===le)??_r[0],et=(((De=Us.find(St=>St.id===Xt))==null?void 0:De.edge)??1024)/Math.max(fe.w,fe.h),ut=St=>Math.max(256,Math.round(St*et/8)*8);return{t:"format",id:fe.id,w:ut(fe.w),h:ut(fe.h)}},[le,Xt]),At=r.useMemo(()=>[_t,...L],[_t,L]),bt=r.useMemo(()=>({tokens:At,templateFields:he,variants:be,quality:Xt,format:le}),[At,he,be,Xt,le]),Sn=L.some(fe=>fe.t==="text"?!!fe.v.trim():!0),Ct=r.useMemo(()=>{const fe=L.find(Xe=>Xe.t==="template");return fe?I.find(Xe=>Xe.id===fe.id)??null:null},[L,I]),Nr=r.useMemo(()=>{const fe=L.find(Xe=>Xe.t==="template");return(fe==null?void 0:fe.id)??null},[L]),mr=r.useCallback(fe=>{var St,Jt;const Xe=(Ct==null?void 0:Ct.id)??null,et=(C==null?void 0:C.id)??null,ut=((St=I.find(pt=>pt.id===fe))==null?void 0:St.name)??"this scene",De=rv(Xe,fe,ut,et,C?Cn(C):null);if(De.changed&&((Jt=tt.current)==null||Jt.insert({t:"template",id:fe}),De.toast)){const pt=De.toast;Z({kind:"success",title:pt.title,action:{label:"Undo",onClick:()=>{var jn,gn;pt.prevSceneId?(jn=tt.current)==null||jn.insert({t:"template",id:pt.prevSceneId}):(gn=tt.current)==null||gn.removeTemplate(),pt.branchWasCleared&&et&&(j==null||j(et))}}})}},[Ct,C,I,Z,j]);r.useImperativeHandle(M,()=>({insertToken:fe=>{var Xe;return(Xe=tt.current)==null?void 0:Xe.insert(fe)},applyScene:fe=>mr(fe),openAttach:fe=>Dt(fe),focus:()=>{var fe;return(fe=tt.current)==null?void 0:fe.focus()},submit:()=>{rn()}}));const ct=r.useMemo(()=>Z_(L),[L]),jt=O_(ct),Qt=r.useRef(ct);Qt.current=ct,r.useEffect(()=>{b==null||b(Qt.current)},[jt,b]),r.useEffect(()=>{var fe;!P||!Nr||Ct||((fe=tt.current)==null||fe.removeTemplate(),Z({kind:"error",title:"That scene is no longer available.",detail:"Starting from scratch."}))},[P,Nr,Ct,Z]);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)}),[L,he,C==null?void 0:C.id,n.id,it]),r.useEffect(()=>()=>it(z.current??n.id),[it]),r.useEffect(()=>{const fe=()=>it(z.current??n.id);return window.addEventListener("beforeunload",fe),()=>window.removeEventListener("beforeunload",fe)},[it,n.id]);const Tt=s.find(fe=>fe.id===q),rr=Tt?Gs(Tt.displayName):"This engine",F=!!C&&C.kind!=="root"&&C.status==="running",V=C&&C.kind!=="root"&&C.status==="done"&&C.images.length>0||F,Q=!!(Tt!=null&&Tt.supportsEdit),ve=!!C&&!!((Kn=C.brief)!=null&&Kn.format)&&C.brief.format!==le&&V&&Q&&!Ct,Me=V&&Q&&!Ct?"edit":"generation",Ze=V?Ct?"A scene starts a new shot.":ve?"Expands this shot into the new shape. What is already in the picture stays exactly as it is.":Q?F?"Still rendering. This can be refined the moment it lands.":null:`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot edit. This makes a new shot.`:null,ot=r.useMemo(()=>{const fe=_r.find(St=>St.id===le)??_r[0],Xe=`Aspect ${fe.label} ${fe.hint}`;if(Me==="edit")return Xe;const et=Us.find(St=>St.id===Xt),ut=jp(q),De=ut==="ratio"||!et?null:ut==="advisory"?`${et.label}, asking for ${et.edge} px`:`${et.label} ${et.edge} px`;return[Xe,`${be} variants`,De&&`resolution ${De}`].filter(Boolean).join(", ")},[Me,le,be,Xt,q]);r.useEffect(()=>{Ct&&V&&E&&E()},[Ct,V,E]);const ke=(Pe==null?void 0:Pe.warnings.filter(fe=>fe.includes("built around a product")))??[],Oe=!ge&&Sn&&!!t&&!F&&!X,qe=X?"Image generation is not set up yet":ge?"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",_e=fe=>{var Xe;ae(fe),(Xe=tt.current)==null||Xe.focus()},Le=fe=>{var Xe;Zt(fe),(Xe=tt.current)==null||Xe.focus()},dt=fe=>{var Xe;Te(fe),(Xe=tt.current)==null||Xe.focus()},vt=fe=>{var Xe;fe.preventDefault(),(Xe=tt.current)==null||Xe.focus()},Dt=fe=>{qt(fe),at(!0)},$t=async fe=>{var et;if(!(fe!=null&&fe.length))return;const Xe=Array.from(fe).filter(ut=>ut.type.startsWith("image/"));if(!Xe.length){Z({kind:"error",title:"Only images can be attached here"});return}Gn(!0),Rt(null);try{for(const ut of Xe.slice(0,4)){const De=await ww(ut);(et=tt.current)==null||et.insert({t:"ref",imageHash:De})}}catch(ut){Rt(String(ut.message??ut)),Z(dn(ut,"Could not attach that image"))}finally{Gn(!1),Ut.current&&(Ut.current.value="")}},yt=Ct?ke.length>0?"This scene builds around a product. Attach one.":(Pe==null?void 0:Pe.warnings.some(fe=>fe.includes("built around a person")))??!1?"This scene builds around a person. Attach a presenter.":null:null,mt=fe=>{var Xe;if(fe.t==="template")return yt;if(!Pe)return null;if(fe.t==="ref"&&!Pe.attachments.some(et=>et.hash===fe.imageHash))return`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot read this reference, so it is left out.`;if(fe.t==="product"){const ut=(T.length?T:((Xe=n.json)==null?void 0:Xe.products)??[]).find(De=>De.id===fe.id)??D.find(De=>De.id===fe.id);if(ut&&!Pe.attachments.some(De=>De.role==="product"&&De.id===ut.id))return`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot read the product image, so ${ut.name} rides as text only.`}if(fe.t==="character"){const et=oe.find(ut=>ut.id===fe.id);if(et&&!Pe.attachments.some(ut=>ut.role==="character"&&ut.id===et.id))return`${(Tt==null?void 0:Tt.displayName)??"This engine"} cannot read the person reference, so ${et.name} rides as text only.`}return null},rn=async()=>{var Xe,et;if(!Oe)return;st(!0),Rt(null);const fe=L.flatMap(ut=>ut.t==="text"?[ut.v]:[]).join(" ").replace(/\s+/g," ").trim();w==null||w(fe||"Your shot");try{if(!t)throw new Error("the workspace is still loading");const ut=await Ce.addNode({projectId:t,parentId:Me==="edit"&&C?C.id:(i==null?void 0:i.id)??null,kind:Me,engineId:q,count:be,brief:bt,...Me==="edit"&&N?{sourceImage:N}:{}}),De=(Xe=ut.warnings)==null?void 0:Xe[0];De&&Z({kind:"success",title:"Sent, with one thing to know",detail:De}),(et=tt.current)==null||et.setTokens(ss()),de({}),me(null),Ue(null),yn(null),A&&nv(n.id),y(ut.id,Me)}catch(ut){const De=String(ut.message??ut);Rt(De),Z({kind:"error",title:"That did not send",detail:De}),w==null||w(null)}finally{st(!1)}},On=(Ln=L.find(fe=>fe.t==="product"))==null?void 0:Ln.id,Vn=On?T.find(fe=>fe.id===On)??(((xn=n.json)==null?void 0:xn.products)??[]).find(fe=>fe.id===On)??D.find(fe=>fe.id===On)??null:null,pn=Vn?pp(Vn):null;return o.jsxs("div",{className:"sc-composer",children:[o.jsx("input",{ref:Ut,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:fe=>void $t(fe.target.files)}),Se&&o.jsx(N_,{brand:n,activeProductCategory:pn,shots:c,initialTab:kt,onUpload:()=>{var fe;return(fe=Ut.current)==null?void 0:fe.click()},onToken:fe=>{var Xe;return(Xe=tt.current)==null?void 0:Xe.insert(fe)},onTemplate:fe=>mr(fe),onClose:()=>at(!1)}),U&&o.jsx("div",{className:"sc-notes",children:U&&o.jsxs("div",{className:"sc-banner","data-tone":"action",children:[o.jsx("span",{className:"sc-banner-ic",children:U.icon}),o.jsxs("span",{className:"sc-banner-txt",children:[o.jsx("b",{children:U.title}),o.jsxs("small",{children:[U.detail,U.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(np,{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:()=>W("engines"),children:"Use a provider key instead"})]})]})]})]}),o.jsx("button",{type:"button",className:"sc-banner-act","data-primary":"",onClick:U.onAct,children:U.action})]})}),o.jsxs("div",{className:"sc-promptcard",children:[V&&E&&o.jsxs("div",{className:"sc-target","data-note":Ze?"":void 0,children:[o.jsxs("span",{className:"sc-target-lb",children:["Refining",C.images[0]?o.jsx("img",{src:tn(C.images[0]),alt:""}):o.jsx("span",{className:"sc-target-thumb sc-shimmer"}),o.jsx("b",{dir:"auto",children:Cn(C)})]}),Ze&&o.jsx("small",{className:"sc-target-note",children:Ze}),o.jsx("button",{type:"button",className:"sc-target-x",onClick:E,"aria-label":"Make a new shot instead",children:o.jsx(Mn,{size:12})})]}),V&&!E&&Ze&&o.jsx("small",{className:"sc-target-note sc-target-note-alone",children:Ze}),o.jsx(b_,{ref:tt,onChange:O,brand:n,shots:c,templates:I,presenters:oe,demoProducts:D,onTemplatePick:mr,flag:mt,onAttachRequest:fe=>Dt(fe),activeProductCategory:pn,placeholder:Ct?"Add art direction, or run it as written":Me==="edit"?"Say what to change about this shot":"What should we shoot? (use $ / @ #)",placeholderSm:Ct||Me==="edit"?void 0:"What should we shoot? ($ / @ #)",onSubmit:()=>void rn(),onDropFiles:fe=>void $t(fe)}),o.jsx(M_,{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":Se,"aria-label":"Attach",title:"Attach a product, a scene, a colour or an image",onClick:()=>Se?at(!1):Dt("All"),children:Rn?o.jsx(on,{size:"1"}):o.jsx(nr,{size:16})}),ee.length>1&&o.jsxs(K5,{value:q,onValueChange:H,children:[o.jsxs(Y5,{variant:"ghost",className:"sc-mini-sel",children:[o.jsx(u1,{size:14}),o.jsx("span",{className:"sc-mini-sel-t",children:Tt?Gs(Tt.displayName):"Demo"})]}),o.jsx(q5,{children:ee.map(fe=>o.jsx(X5,{value:fe.id,children:Gs(fe.displayName)},fe.id))})]})]}),o.jsxs("div",{className:"sc-prompt-right",children:[o.jsx(H_,{mode:Me,engineId:q,engineName:rr,formatId:le,onFormat:_e,count:be,onCount:dt,quality:Xt,onQuality:Le,onCloseAutoFocus:vt}),o.jsxs(ti,{open:Pn,onOpenChange:Ot,children:[o.jsx(ni,{children:o.jsxs("button",{type:"button",className:"sc-var sc-more","aria-label":`Shot settings. ${ot}`,children:[o.jsx(tw,{size:14}),"More"]})}),o.jsx(ri,{className:"sc-morepop",align:"end",sideOffset:8,width:"300px",onOpenAutoFocus:kp,onCloseAutoFocus:vt,children:o.jsx(k9,{mode:Me,engineId:q,engineName:rr,formatId:le,onFormat:_e,count:be,onCount:dt,quality:Xt,onQuality:Le})})]}),o.jsx(D_,{mode:Me,engineId:q,engineName:rr,formatId:le,onFormat:_e,count:be,onCount:dt,quality:Xt,onQuality:Le}),o.jsxs("button",{type:"button",className:"sc-send","aria-disabled":!Oe||void 0,onClick:()=>void rn(),"aria-label":Me==="edit"?"Refine":"Generate",title:ht??yt??qe??`${Me==="edit"?"Refine":"Generate"} (enter)`,children:[o.jsx("span",{className:"sc-send-ico",children:ge?o.jsx(on,{size:"1"}):o.jsx(wH,{size:17,weight:"bold"})}),o.jsx("span",{className:"sc-send-lb",children:Me==="edit"?"Refine":"Generate"})]})]})]})]})]})});function M9({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 du({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[b,C]=r.useState(!1),[E,N]=r.useState(!1),j=r.useRef(null),[k,A]=r.useState(!1);r.useEffect(()=>{const oe=window.matchMedia("(hover: none)"),W=()=>A(oe.matches);return W(),oe.addEventListener("change",W),()=>oe.removeEventListener("change",W)},[]);const M=u==="use"&&!!f&&!!h;r.useEffect(()=>{if(!E)return;const oe=W=>{var J;(J=j.current)!=null&&J.contains(W.target)||N(!1)};return document.addEventListener("pointerdown",oe),()=>document.removeEventListener("pointerdown",oe)},[E]);const T=t&&!b?o.jsx("img",{src:t,alt:"",loading:"lazy",onError:()=>C(!0)}):o.jsx("span",{className:"sc-lookcard-blank",children:o.jsx(Ga,{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(ya,{size:11,weight:"bold"})})]}),D]});const P=()=>{if(M&&k){if(!E){N(!0);return}N(!1)}f?f(e):h==null||h(e)},G=()=>{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":E||void 0,children:[o.jsxs("div",{className:"sc-lookcard-media",children:[o.jsxs("button",{type:"button",className:"sc-lookcard-open",onClick:P,"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:G,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:oe=>{oe.stopPropagation(),y(e)},children:o.jsx(Y1,{size:13,weight:v?"fill":"regular"})})]}),D]});return!f&&!h||k?I:o.jsxs(Gm,{children:[o.jsx(Km,{children:I}),o.jsxs(Ym,{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 id({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 z_={presenter:"Presenter",product:"Product",scene:"Scene"};function R9({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:b,hideRecipe:C,decorative:E,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":b||void 0,"aria-hidden":E||void 0,...E?{inert:""}:{},children:[o.jsx(du,{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(U_,{presenter:k,product:A,scene:M})]})}function B_(e){return o.jsx(id,{...e})}function U_({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(ov,{credit:e,open:s==="presenter",onEnter:()=>i("presenter"),children:G_(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(ov,{credit:m,open:s===m.key,onEnter:()=>i(m.key),style:h(),children:W_({credit:m,step:g===0?1:2})})]},m.key))]})]})}function ov({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=iI(),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 b=requestAnimationFrame(w),C=c.current,E=C?new ResizeObserver(w):null;return C&&E&&E.observe(C),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{cancelAnimationFrame(b),E==null||E.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=z_[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 P9(e,t){e.stopPropagation(),e.preventDefault(),t==null||t()}function W_({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=>P9(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 G_(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=>P9(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 y1({presenter:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,size:u="grid"}){return o.jsx(du,{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 L9(e){return o.jsx(id,{...e})}function Ic({scene:e,variant:t,onOpen:n,onUse:s,selected:i,onToggle:c,bookmarked:u,onBookmark:f,size:h="grid"}){return o.jsx(du,{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 T9(e){return o.jsx(id,{...e})}const lv=new Map,K_=1e3;function ur({className:e="sc-home",children:t}){const n=r.useRef(null),{key:s}=ln(),i=r.useRef(!1);return r.useLayoutEffect(()=>{const c=n.current,u=lv.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,K_);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||lv.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 cd({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 D0(e,t){return t===null?e===null:e===t}function H9({"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},b=()=>{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 P=72,G=v.scrollLeft,I=G+v.clientWidth,oe=T[D-1],W=T[D+1],J=W?W.offsetLeft+Math.min(P,W.offsetWidth):A.offsetLeft+A.offsetWidth+8,Z=oe?Math.max(0,oe.offsetLeft+oe.offsetWidth-P):Math.max(0,A.offsetLeft-8);let ee=G;if(J>I)ee=Math.min(M,J-v.clientWidth);else if(Z<G)ee=Z;else return;if(Math.abs(ee-G)<1)return;const q=window.matchMedia("(prefers-reduced-motion: reduce)").matches;v.scrollTo({left:ee,behavior:q?"auto":"smooth"})},E=w();E&&C(E),b(),v.dataset.inkReady||requestAnimationFrame(()=>{v.dataset.inkReady=""});const N=()=>{y||(y=requestAnimationFrame(()=>{y=0,b()}))},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,b())},k=new ResizeObserver(()=>{w(),b()});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=>{D0(t,g)||s(g)},h=g=>{var b;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=>D0(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=(b=c.current)==null?void 0:b.querySelectorAll(":scope > button")[y];w==null||w.focus()},m=n.findIndex(g=>D0(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=D0(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 ud({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(H9,{"aria-label":t.label,activeKey:t.selected,items:n,onSelect:t.onSelect})}function fu({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(Hc,{size:16})}),o.jsxs("div",{className:"sc-libsearch-field",children:[o.jsx(Hc,{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 dd({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 Y_=150;function hu(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})},Y_)},[u,v]),w=r.useCallback((j,k)=>u({[j]:k}),[u]),b=u,C=f.trim().length>0||Object.values(c).some(Boolean),E=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:b,active:C,clearSearch:E,clear:N}}const q_=8;function X_(){var Rt;const{engines:e,scenes:t,loaded:n,presenters:s,presentersLoaded:i,demoProducts:c,showcase:u,showcaseCategories:f,showcaseLoaded:h,showcaseError:m,refetchShowcase:g}=mn(),{brand:v,workspace:y,nodes:w,products:b}=It(),C=ol(),E=nn(),{push:N}=hr(),j=bp(),k=Ep(),A=QF(),M=lo(bi),{q:T,setQ:D,facets:P,setFacet:G,clearSearch:I,clear:oe}=hu(["category"]),W=P.category,J=Pe=>G("category",Pe),Z=T.trim().length>0,[ee,q]=Za(ir.wallDensity,zo),H=ll(ee),K=Pe=>q(Pe),X=od(H),U=iu(H),L=Pe=>{const Ae=new URLSearchParams(Pe??{}).toString();E(`${cr(v)}${Ae?`?${Ae}`:""}`)},O=b.length?b:((Rt=v.json)==null?void 0:Rt.products)??[],ne=Pe=>{var kt,qt,Xt;const Ae=(kt=Pe.brief.tokens.find(Zt=>Zt.t==="product"))==null?void 0:kt.id,Se=(qt=Pe.brief.tokens.find(Zt=>Zt.t==="character"))==null?void 0:qt.id,at=(Xt=Pe.brief.tokens.find(Zt=>Zt.t==="template"))==null?void 0:Xt.id;return{product:Ae?c.find(Zt=>Zt.id===Ae):void 0,presenter:Se?s.find(Zt=>Zt.id===Se):void 0,scene:at?t.find(Zt=>Zt.id===at):void 0}},re=r.useMemo(()=>{const Pe=new Map;for(const Ae of u){const{product:Se,presenter:at,scene:kt}=ne(Ae);Pe.set(Ae.id,XF(Ae,{product:Se,presenter:at,scene:kt},j2(Ae.category)))}return Pe},[u,c,s,t]),le=r.useMemo(()=>(W?u.filter(Ae=>Ae.category===W):u).filter(Ae=>ba(re.get(Ae.id)??Ae.title,T)),[u,W,T,re]),ae=r.useMemo(()=>{const Pe=rI(f);return{key:"category",label:"Categories",everyLabel:"All examples",everyCount:u.length,selected:W,onSelect:J,options:Pe.map(Ae=>({value:Ae,label:j2(Ae)??Ae,count:u.filter(Se=>Se.category===Ae).length}))}},[u,f,W,J]),me=Pe=>{const{product:Ae,presenter:Se,scene:at}=ne(Pe);return{productName:Ae?Oa(Ae,"chip"):null,productPreviewUrl:(Ae==null?void 0:Ae.previewUrl)??null,productId:(Ae==null?void 0:Ae.id)??null,presenterName:(Se==null?void 0:Se.name)??null,presenterPreviewUrl:(Se==null?void 0:Se.avatarUrl)??(Se==null?void 0:Se.previewUrl)??null,presenterId:(Se==null?void 0:Se.id)??null,sceneName:at?to(at,"chip"):null,scenePreviewUrl:(at==null?void 0:at.previewUrl)??null,sceneId:(at==null?void 0:at.id)??null}},[he,de]=r.useState(null),Te=M?A:Pe=>{const Ae=u.find(Se=>Se.id===Pe);Ae&&(de(kh(Ae)),N({kind:"success",title:`Starting from "${Ae.title}"`}))},Ue=w.find(Pe=>Pe.kind==="root")??null,ge=()=>{var Se;const Ae=[...Va(v.id)].reverse().find(at=>t.some(kt=>kt.id===at))??((Se=t[0])==null?void 0:Se.id);L(Ae?{scene:Ae,attach:"products",compose:"1"}:{attach:"products",compose:"1"})},st=r.useMemo(()=>{const Pe=Va(v.id);return w9(t,Ae=>Pe.includes(Ae.id)).slice(0,8)},[t,v.id]),ht=r.useMemo(()=>{var Xt,Zt,yn,Rn,Gn,Pn,Ot,tt;const Pe=new Set,Ae=Qe=>!Qe||Pe.has(Qe)?null:(Pe.add(Qe),Qe),Se=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||Pe.has(Ut.previewUrl))&&!(Qe&&!Ut.brief.tokens.some(Vt=>Vt.t===Qe)))return Ae(Ut.previewUrl);return null},qt=O.find(Qe=>{var Ut,Vt;return Zn((Vt=(Ut=Qe==null?void 0:Qe.shots)==null?void 0:Ut[0])==null?void 0:Vt.file)});return{compose:Ae(qt?Zn((Zt=(Xt=qt.shots)==null?void 0:Xt[0])==null?void 0:Zt.file):null)??Se(["aurelia-serum-succulent-dew","verity-pearls-suspended-silk","solstice-aviators-screen-print"])??Ae((yn=c.find(Qe=>Qe.id==="aurelia-amber-serum"))==null?void 0:yn.previewUrl)??Ae((Rn=c.find(Qe=>Qe.previewUrl))==null?void 0:Rn.previewUrl)??kt("product"),product:Se(["voss-rowe-runner-volcanic-ash","birchwood-salt-flat","voss-rowe-dune-slip-face"])??Ae((Gn=c.find(Qe=>Qe.id==="voss-rowe-trail-runner"))==null?void 0:Gn.previewUrl)??kt("product"),presenter:Ae((Pn=s.find(Qe=>Qe.id==="maren"))==null?void 0:Pn.avatarUrl)??Ae((Ot=s.find(Qe=>Qe.avatarUrl))==null?void 0:Ot.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"])??Se(["moss-larkin-chair-travertine-atrium","calder-snow-loft","basalt-snells-window"])??kt("template")}},[t,s,O,c,u]);return o.jsxs(ur,{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:ge,children:[o.jsx(D9,{thumbUrl:ht.compose,fallback:o.jsx(yH,{size:22,weight:"fill"})}),o.jsx("b",{children:"Create an image"})]}),o.jsx(H2,{tone:"product",title:"Add a product",count:O.length,thumbUrl:ht.product,icon:o.jsx(rp,{size:22,weight:"fill"}),onClick:()=>C("product")}),o.jsx(H2,{tone:"presenter",title:"Create a presenter",thumbUrl:ht.presenter,icon:o.jsx(BH,{size:22,weight:"fill"}),onClick:()=>C("presenter")}),o.jsx(H2,{tone:"scene",title:"Create a scene",thumbUrl:ht.scene,icon:o.jsx(HH,{size:22,weight:"fill"}),onClick:()=>C("scene")})]}),!h&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":U,style:X,"aria-hidden":!0,children:o.jsx(B_,{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(cd,{filters:o.jsx(ud,{mode:"tabs",group:ae}),search:u.length>=q_&&o.jsx(fu,{value:T,onChange:D,noun:"examples",total:u.length}),density:o.jsx(sd,{value:H,onChange:K})}),le.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":U,style:X,children:le.map(Pe=>o.jsx(R9,{entry:Pe,size:"grid",onOpen:Te,onOpenProduct:Ae=>E(Js(v,Ae)),onOpenPresenter:Ae=>E(al(v,Ae)),onOpenScene:Ae=>E(rl(v,Ae)),...me(Pe)},Pe.id))}),le.length===0&&(Z?o.jsx(dd,{noun:"examples",q:T,facet:W?j2(W):null,onClearSearch:I,onClearAll:oe}):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(L9,{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:()=>E(vc(v)),children:"Browse presenters"})]}),o.jsx("div",{className:"sc-masonry",children:s.slice(0,8).map(Pe=>o.jsx(y1,{presenter:Pe,variant:"navigate",size:"grid",onOpen:j},Pe.id))})]}),!n&&o.jsx("div",{className:"sc-masonry","aria-hidden":!0,children:o.jsx(T9,{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:()=>E(gc(v)),children:"Browse scenes"})]}),o.jsx("div",{className:"sc-masonry",children:st.map(Pe=>o.jsx(Ic,{scene:Pe,variant:"navigate",size:"grid",onOpen:k},Pe.id))})]})]}),!M&&o.jsx(M9,{children:o.jsx(Ap,{projectId:(y==null?void 0:y.id)||null,brand:v,engines:e,parent:Ue,shots:w,initialBrief:he,onQueued:()=>E(cr(v))})})]})}function H2({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(D9,{thumbUrl:i,fallback:n}),o.jsxs("b",{children:[t,s?o.jsx(T5,{variant:"soft",radius:"full",size:"1",children:s}):null]})]})}function D9({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 $9({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:tn(e.previewHash),alt:""}):o.jsx("span",{className:"sc-lookcard-blank",children:i?null:o.jsx(on,{})}),!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(Jm,{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 Np({label:e}){return o.jsx("div",{className:"sc-starter-rule",children:o.jsx("span",{children:e})})}const D2=60;function Mp(e,t){const[n,s]=r.useState(D2);r.useEffect(()=>{s(D2)},[t]);const{visible:i,remaining:c}=x9(e,n);return{visible:i,remaining:c,showMore:()=>s(f=>f+D2)}}const Q_=8,$2="__bookmarked";function J_(){const{scenes:e,collections:t,verticals:n,loaded:s,error:i,refetch:c}=mn(),{brand:u}=It(),f=nn(),[h,m]=r.useState(()=>Va(u.id)),g=Se=>m(s9(u.id,Se)),v=Ep(),{builds:y,poke:w}=sl(),b=ol(),C=r.useMemo(()=>lu(u),[u]),E=y.filter(Se=>Se.kind==="scene"&&(!Se.finished||Se.stage==="failed")),{q:N,setQ:j,facets:k,setFacets:A,clearSearch:M,clear:T}=hu(["vertical","bookmarked"]),D=k.vertical,P=k.bookmarked==="1",G=N.trim().length>0,[I,oe]=Za(ir.wallDensity,zo),W=ll(I),J=Se=>oe(Se),Z=od(W),ee=iu(W),q=Se=>f(rl(u,Se)),H=r.useMemo(()=>P?e.filter(Se=>h.includes(Se.id)):D?e.filter(Se=>Se.verticals.includes(D)):e,[e,D,P,h]),X=!(C.length>0||E.length>0),U=e.reduce((Se,at)=>Se+(h.includes(at.id)?1:0),0),L=P&&U===0,O=L&&X,ne=L&&!X,re=G||P&&!O,le=r.useMemo(()=>O?e:H,[O,e,H]),ae=r.useMemo(()=>le.filter(Se=>ba(h1(Se),N)),[le,N]),{visible:me,remaining:he,showMore:de}=Mp(ae,`${D??""}|${P?"bookmarked":""}|${O?"browse":""}|${N}`),be=Se=>[...C,...e].filter(at=>!at.verticals.length||at.verticals.includes(Se)).length,Te=[{value:$2,label:"Bookmarks",count:U},...n.map(Se=>({value:Se,label:Se,count:be(Se)}))],Ue=e.length>0?"tabs":"none",ge={key:"vertical",label:"Vertical",everyLabel:"Every scene",everyCount:e.length+C.length,selected:P?$2:D,onSelect:Se=>A(Se===$2?{bookmarked:"1",vertical:null}:{bookmarked:null,vertical:Se}),options:Te},st=r.useMemo(()=>C.filter(Se=>D?!Se.verticals.length||Se.verticals.includes(D):!0).filter(Se=>ba(h1(Se),N)),[C,D,N]),ht=!P&&(E.length>0||st.length>0),Rt=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>b("scene"),children:[o.jsx(nr,{size:12})," Create scene"]}),Pe=(Se,at=!1)=>o.jsx("div",{className:"sc-masonry","data-wall":at||void 0,"data-density":!0,"data-density-size":ee,style:Z,children:Se.map(kt=>o.jsx(Ic,{scene:kt,variant:"use",size:"grid",onOpen:q,onUse:v,bookmarked:h.includes(kt.id),onBookmark:g},kt.id))}),Ae=o.jsx(cd,{title:"Scenes",filters:o.jsx(ud,{mode:Ue,group:ge}),density:o.jsx(sd,{value:W,onChange:J}),search:e.length>=Q_&&o.jsx(fu,{value:N,onChange:j,noun:"scenes",total:e.length}),action:X?void 0:Rt});return o.jsx(ur,{children:o.jsxs("main",{className:"sc-looks sc-scenes",id:"main","data-hero":X||void 0,children:[!X&&Ae,ht&&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":ee,style:Z,children:[E.map(Se=>o.jsx($9,{build:Se,onCancel:at=>void Ce.cancelAssetBuild(u.id,at).then(w),onDismiss:at=>void Ce.deleteAssetBuild(u.id,at).then(w),onRetry:()=>b("scene")},Se.id)),st.map(Se=>o.jsx(Ic,{scene:Se,variant:"use",size:"grid",onOpen:q,onUse:v},Se.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:Rt}),ht&&s&&!i&&!P&&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(Np,{label:"Or start from one of ours"}),Ae]}),!s&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":ee,style:Z,"aria-hidden":!0,children:o.jsx(T9,{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&&!re&&t.map(Se=>{const at=le.filter(kt=>kt.collections.includes(Se));return at.length?o.jsxs("section",{className:"sc-coll",children:[o.jsx("h2",{children:Se}),Pe(at)]},Se):null}),s&&!i&&re&&me.length>0&&Pe(me,!0),s&&!i&&ne&&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&&!ne&&ae.length===0&&st.length===0&&o.jsx(dd,{noun:"scenes",q:N,facet:O?null:P?"Bookmarks":D,onClearSearch:M,onClearAll:T}),re&&he>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:de,children:["Show ",Math.min(he,60)," more"]})})]})})}function x1({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(Ga,{size:20})}):o.jsx("img",{src:e,alt:"",loading:"lazy",onError:()=>n(!0)})})}function F9(){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(Ga,{size:20})})})})}function Rp({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(Ga,{size:20})}):o.jsx("img",{src:tn(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 b=C=>{const E=Math.min(1,(C-w)/420);h.scrollLeft=v+y*(1-(1-E)**3),c.current(),E<1?requestAnimationFrame(b):(i.current=!1,h.scrollLeft>=g&&(h.scrollLeft-=g),c.current())};requestAnimationFrame(b)};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(q1,{size:13,weight:"bold"})}),o.jsxs("div",{className:"sc-slider-track",ref:s,children:[t,t]})]})]})}const eZ="(max-width: 760px)";function tZ(){const{sceneId:e=""}=Ba(),{scenes:t,loaded:n,error:s,refetch:i,applyBrand:c}=mn(),{brand:u,nodes:f}=It(),h=nn(),m=Ep(),g=u.id,[v,y]=r.useState([]),[w,b]=r.useState(()=>Va(g)),[C,E]=Zs("all"),N=C==="1",k=lo(eZ)?4:3,A=ge=>h(rl(u,ge)),M=WD(u,e),T=M??t.find(ge=>ge.id===e);J1(T==null?void 0:T.name);const D=!!M;r.useEffect(()=>{let ge=!0;if(y([]),!D)return Ce.sceneFrames(e).then(st=>{ge&&y(st.frames)}).catch(()=>{ge&&y([])}),()=>{ge=!1}},[e,D]);const P=r.useMemo(()=>f.filter(ge=>{var st;return ge.status==="done"&&ge.images.length>0&&(((st=ge.brief)==null?void 0:st.tokens)??[]).some(ht=>(ht==null?void 0:ht.t)==="template"&&ht.id===e)}).slice(-12).reverse(),[f,e]),G=r.useMemo(()=>{if(!T)return[];return t.filter(ht=>ht.id!==T.id).sort((ht,Rt)=>st(Rt)-st(ht)).slice(0,8);function st(ht){const Rt=ht.lighting.split(/[ ,]+/).some(Ae=>Ae.length>3&&T.lighting.toLowerCase().includes(Ae.toLowerCase())),Pe=ht.collections.some(Ae=>T.collections.includes(Ae));return(Rt?2:0)+(Pe?1:0)}},[t,T]),I=r.useMemo(()=>{if(T||!n||s)return[];const ge=Va(g);return w9(t,st=>ge.includes(st.id)).slice(0,6)},[T,n,s,t,g]),[oe,W]=r.useState((M==null?void 0:M.name)??""),[J,Z]=r.useState((M==null?void 0:M.description)??""),[ee,q]=r.useState((M==null?void 0:M.lighting)??""),[H,K]=r.useState((M==null?void 0:M.prompt)??""),[X,U]=r.useState(null),[L,O]=r.useState(!1),[ne,re]=r.useState(!1),le=r.useRef(void 0);r.useEffect(()=>{W((M==null?void 0:M.name)??""),Z((M==null?void 0:M.description)??""),q((M==null?void 0:M.lighting)??""),K((M==null?void 0:M.prompt)??"")},[M==null?void 0:M.id]);const ae=ge=>{M&&(le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{Ce.updateScene(u.id,M.id,ge).then(st=>{c(st.brand),U(st.warnings[0]??null)}).catch(st=>U(String(st.message??st)))},500))},me=async()=>{if(M){O(!0),U(null);try{c((await Ce.generateScenePreview(u.id,M.id)).brand)}catch(ge){U(String(ge.message??ge))}finally{O(!1)}}},he=async()=>{if(M){re(!0);try{await Ce.deleteScene(u.id,M.id),h(gc(u))}catch(ge){U(String(ge.message??ge)),re(!1)}}};if(!n&&!M)return o.jsx(ur,{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(ur,{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(ur,{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(`${cr(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"})]}),I.length>0&&o.jsx(To,{label:"You might like",children:I.map(ge=>o.jsx(Ic,{scene:ge,variant:"navigate",size:"slider",onOpen:A},ge.id))})]})});const de=N?v:v.slice(0,k),be=M?M.previewUrl?[M.previewUrl]:[]:v.length?de:T.previewUrl?[T.previewUrl]:[],Te=!M&&T.subject!=="person"&&be.length>0,Ue=w.includes(T.id);return o.jsx(ur,{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:oe,"aria-label":"Scene name",onChange:ge=>{W(ge.target.value),ae({name:ge.target.value})}}):o.jsx("h1",{children:T.name}),M?o.jsx(Kl,{className:"sc-ownededit-lede",value:J,placeholder:"One sentence for the card","aria-label":"Description",onChange:ge=>{Z(ge.target.value),ae({description:ge.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":Ue,onClick:()=>b(s9(g,T.id)),children:[o.jsx(Y1,{size:13,weight:Ue?"fill":"regular"}),o.jsx("span",{children:Ue?"Bookmarked":"Bookmark"})]}),M&&o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",disabled:L,onClick:()=>void me(),children:[L?o.jsx(on,{size:"1"}):o.jsx(Jm,{size:13}),o.jsx("span",{children:M.previewUrl?"Redraw the example":"Draw an example"})]})]}),X&&o.jsx("p",{className:"sc-assetform-err",children:X}),be.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:be.map(ge=>o.jsx(x1,{src:ge},ge))}),Te&&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:()=>E(N?null:"1"),children:N?"Enough, close it":"See the whole set"})]}):o.jsx(F9,{}),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(ge=>o.jsx(x1,{src:ge},ge))})]}),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(Qm,{value:H,rows:5,onChange:ge=>{K(ge.target.value),ae({prompt:ge.target.value})}}),o.jsx(Kl,{mt:"2",value:ee,placeholder:"The light, in a short phrase","aria-label":"Lighting",onChange:ge=>{q(ge.target.value),ae({lighting:ge.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(cs,{label:"Delete scene",title:`Delete ${M.name}?`,body:"Shots already made here keep their images and their recipe. Only future shots lose it.",busy:ne,onConfirm:()=>void he()})})]}),P.length>0&&o.jsx(To,{label:"Your shots in this scene",children:P.map(ge=>o.jsx(Rp,{node:ge,onClick:()=>h(Q1(u,null,ge.id))},ge.id))}),G.length>0&&o.jsx(To,{label:"Other scenes, similar light",children:G.map(ge=>o.jsx(Ic,{scene:ge,variant:"navigate",size:"slider",onOpen:A},ge.id))})]})})}const nZ=8;function rZ(){const{presenters:e,presenterCategories:t,presentersLoaded:n,presentersError:s,refetchPresenters:i}=mn(),{brand:c}=It(),u=nn(),f=bp(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=hu(["category"]),b=g.category,{builds:C,poke:E}=sl(),N=ol(),j=r.useMemo(()=>nd(c),[c]),k=C.filter(re=>re.kind==="presenter"&&(!re.finished||re.stage==="failed")),[A,M]=Za(ir.wallDensity,zo),T=ll(A),D=re=>M(re),P=od(T),G=iu(T),I=re=>u(al(c,re)),oe=r.useMemo(()=>b?e.filter(re=>re.suitableCategories.includes(b)):e,[e,b]),W=r.useMemo(()=>oe.filter(re=>ba(m1(re),h)),[oe,h]),{visible:J,remaining:Z,showMore:ee}=Mp(W,`${b??""}|${h}`),q=y9(t.length),H=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>N("presenter"),children:[o.jsx(nr,{size:12})," Create presenter"]}),K=r.useMemo(()=>j.filter(re=>b?!re.suitableCategories.length||re.suitableCategories.includes(b):!0).filter(re=>ba(m1(re),h)),[j,b,h]),X=j.length>0||k.length>0,U=k.length>0||K.length>0,L=!X,O={key:"category",label:"Category",everyLabel:"Every presenter",everyCount:e.length+j.length,selected:b,onSelect:re=>v("category",re),options:t.map(re=>({value:re,label:re,count:[...j,...e].filter(le=>!le.suitableCategories.length||le.suitableCategories.includes(re)).length}))},ne=o.jsx(cd,{title:"Presenters",filters:o.jsx(ud,{mode:q,group:O}),density:o.jsx(sd,{value:T,onChange:D}),search:e.length>=nZ&&o.jsx(fu,{value:h,onChange:m,noun:"presenters",total:e.length}),action:L?void 0:H});return o.jsx(ur,{children:o.jsxs("main",{className:"sc-looks sc-presenters",id:"main","data-hero":L||void 0,children:[!L&&ne,U&&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":G,style:P,children:[k.map(re=>o.jsx($9,{build:re,onCancel:le=>void Ce.cancelAssetBuild(c.id,le).then(E),onDismiss:le=>void Ce.deleteAssetBuild(c.id,le).then(E),onRetry:()=>N("presenter")},re.id)),K.map(re=>o.jsx(y1,{presenter:re,variant:"use",size:"grid",onOpen:I,onUse:f},re.id))]})]}),L&&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}),U&&n&&!s&&J.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":G,style:P,"aria-hidden":!0,children:o.jsx(L9,{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()}),L&&n&&!s&&e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Np,{label:"Or cast someone from ours"}),ne]}),n&&!s&&J.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":G,style:P,children:J.map(re=>o.jsx(y1,{presenter:re,variant:"use",size:"grid",onOpen:I,onUse:f},re.id))}),n&&!s&&!W.length&&e.length>0&&o.jsx(dd,{noun:"presenters",q:h,facet:b,onClearSearch:y,onClearAll:w}),n&&!s&&!e.length&&o.jsx(Ks,{shape:"zero",body:"The presenter library is still being cast. Check back soon."}),Z>0&&o.jsx("div",{className:"sc-lib-more",children:o.jsxs("button",{type:"button",className:"sc-btn sc-btn-ghost",onClick:ee,children:["Show ",Math.min(Z,60)," more"]})})]})})}const iv=4;function aZ(){var re;const{presenterId:e=""}=Ba(),{presenters:t,presentersLoaded:n,presentersError:s,refetchPresenters:i,applyBrand:c}=mn(),{brand:u,nodes:f}=It(),h=nn(),m=bp(),[g,v]=r.useState([]),[y,w]=Zs("all"),b=y==="1",C=BD(u,e),E=C??t.find(le=>le.id===e);J1(E==null?void 0:E.name);const N=!!C;r.useEffect(()=>{let le=!0;if(v([]),!N)return Ce.presenterFrames(e).then(ae=>{le&&v(ae.frames)}).catch(()=>{le&&v([])}),()=>{le=!1}},[e,N]);const k=(((re=u.json)==null?void 0:re.characters)??[]).find(le=>le.presenterId===e),A=r.useMemo(()=>f.filter(le=>{var ae;return le.status==="done"&&le.images.length>0&&(((ae=le.brief)==null?void 0:ae.tokens)??[]).some(me=>(me==null?void 0:me.t)==="character"&&(me.id===e||me.id===(k==null?void 0:k.id)))}).slice(-12).reverse(),[f,e,k]),[M,T]=r.useState((C==null?void 0:C.name)??""),[D,P]=r.useState((C==null?void 0:C.descriptor)??""),[G,I]=r.useState((C==null?void 0:C.identityNotes)??""),[oe,W]=r.useState(null),[J,Z]=r.useState(!1),ee=r.useRef(void 0);r.useEffect(()=>{T((C==null?void 0:C.name)??""),P((C==null?void 0:C.descriptor)??""),I((C==null?void 0:C.identityNotes)??"")},[C==null?void 0:C.id]);const q=le=>{C&&(ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{Ce.updatePresenter(u.id,C.id,le).then(ae=>c(ae.brand)).catch(ae=>W(String(ae.message??ae)))},500))},H=async()=>{if(C){Z(!0);try{await Ce.deletePresenter(u.id,C.id),h(vc(u))}catch(le){W(String(le.message??le)),Z(!1)}}};if(!n&&!C)return o.jsx(ur,{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(ur,{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(!E)return o.jsx(ur,{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 K=(C==null?void 0:C.shots)??[],X=b?g:g.slice(0,iv),U=C?K:g.length?X:E.previewUrl?[E.previewUrl]:[],L=t.filter(le=>le.id!==E.id).slice(0,8),O=!!E.avatarUrl,ne=E.avatarUrl??E.previewUrl??g[0]??null;return o.jsx(ur,{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":E.suitableStyles[0]??E.presentation})]}),ne?o.jsx("div",{className:"sc-presenterpage-avatar","data-avatar":O||void 0,"aria-hidden":!0,children:o.jsx("img",{src:ne,alt:""})}):null,C?o.jsx(Kl,{className:"sc-ownededit-title",value:M,"aria-label":"Their name",onChange:le=>{T(le.target.value),q({name:le.target.value})}}):o.jsx("h1",{children:E.name}),C?o.jsx(Kl,{className:"sc-ownededit-lede",value:D,placeholder:"A short caption for the card","aria-label":"Caption",onChange:le=>{P(le.target.value),q({descriptor:le.target.value})}}):o.jsx("p",{className:"sc-lookpage-lede",children:E.descriptor}),o.jsx("p",{className:"sc-lookpage-facts",children:[E.ageRange,E.hair,E.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"})}),oe&&o.jsx("p",{className:"sc-assetform-err",children:oe}),U.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-lookpage-refs",children:U.map((le,ae)=>o.jsxs("div",{className:"sc-ownedref","data-engine":C&&ae<2?"":void 0,children:[o.jsx(x1,{src:le}),C&&ae<2&&o.jsx("span",{className:"sc-ownedref-tag",children:"Used in shots"})]},le))}),!C&&g.length>iv&&o.jsx("button",{type:"button",className:"sc-lookpage-expand",onClick:()=>w(b?null:"1"),children:b?"Enough, close it":"See the whole set"})]}):o.jsx(F9,{}),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(le=>o.jsx(x1,{src:le},le))})]}),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(Qm,{value:G,rows:3,placeholder:"For example: the wide-set eyes and the small scar above the left brow must survive every generation.",onChange:le=>{I(le.target.value),q({identityNotes:le.target.value})}}),C.negativeConstraints.length>0&&o.jsx("ul",{className:"sc-ownedbits-list",children:C.negativeConstraints.map(le=>o.jsx("li",{children:le},le))})]}),o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(cs,{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:J,onConfirm:()=>void H()})})]}),A.length>0&&o.jsx(To,{label:`Shots featuring ${E.name}`,children:A.map(le=>o.jsx(Rp,{node:le,onClick:()=>h(Q1(u,null,le.id))},le.id))}),L.length>0&&o.jsx(To,{label:"Other presenters",children:L.map(le=>o.jsx(y1,{presenter:le,variant:"navigate",size:"slider",onOpen:ae=>h(al(u,ae))},le.id))})]})})}function I9(){const{brand:e}=It(),t=nn(),n=cr(e);return r.useCallback(s=>{t(`${n}?product=${encodeURIComponent(s)}&compose=1`)},[n,t])}function _9({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(du,{id:e.id,previewUrl:Zn((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 sZ(e){return o.jsx(id,{...e})}function Z9({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(du,{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 oZ=8;function lZ(){const{brand:e,products:t,productsLoaded:n}=It(),{demoProducts:s}=mn(),i=n&&t.length===0,c=nn(),u=I9(),f=ol(),{q:h,setQ:m,facets:g,setFacet:v,clearSearch:y,clear:w}=hu(["category"]),b=g.category,[C,E]=Za(ir.wallDensity,zo),N=ll(C),j=ne=>E(ne),k=od(N),A=iu(N),M=r.useMemo(()=>t.map(ne=>({product:ne,category:pp(ne),own:!0})),[t]),T=r.useMemo(()=>s.map(ne=>({product:ne,category:ne.category,own:!1})),[s]),D=r.useMemo(()=>[...M,...T],[M,T]),P=r.useMemo(()=>{const ne=new Map;for(const{category:re}of D)re&&ne.set(re,(ne.get(re)??0)+1);return ne},[D]),G=r.useMemo(()=>Dc.filter(ne=>P.has(ne.key)),[P]),I=y9(G.length),oe=ne=>c(Js(e,ne)),W=r.useCallback(ne=>ne.filter(({category:re})=>!b||re===b).filter(({product:re,category:le})=>ba([wp(re),si(le)].filter(Boolean).join(" "),h)).map(({product:re})=>re),[b,h]),J=r.useMemo(()=>W(M),[W,M]),Z=r.useMemo(()=>W(T),[W,T]),{visible:ee,remaining:q,showMore:H}=Mp(J,`${b??""}|${h}`),K={key:"category",label:"Category",everyLabel:"Every product",everyCount:D.length,selected:b,onSelect:ne=>v("category",ne),options:G.map(ne=>({value:ne.key,label:ne.label,count:P.get(ne.key)??0}))},X=o.jsxs("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>f("product"),children:[o.jsx(nr,{size:12})," Add product"]}),U=i,L=t.length>0,O=o.jsx(cd,{title:"Products",filters:o.jsx(ud,{mode:I,group:K}),density:o.jsx(sd,{value:N,onChange:j}),search:D.length>=oZ&&o.jsx(fu,{value:h,onChange:m,noun:"products",total:D.length}),action:U?void 0:X});return o.jsx(ur,{children:o.jsxs("main",{className:"sc-looks sc-products",id:"main","data-hero":U||void 0,children:[!U&&O,!n&&o.jsx("div",{className:"sc-masonry","data-density":!0,"data-density-size":A,style:k,"aria-hidden":!0,children:o.jsx(sZ,{size:"grid",count:8})}),L&&ee.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:ee.map(ne=>o.jsx(_9,{product:ne,variant:"use",size:"grid",onOpen:oe,onUse:u},ne.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"]})})]}),U&&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}),L&&ee.length>0&&Z.length>0&&o.jsx("div",{className:"sc-sec-head sc-owned-divider",children:o.jsx("h2",{className:"sc-sec-title",children:"Scenri products"})}),U&&T.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Np,{label:"Or borrow one of ours"}),O]}),Z.length>0&&o.jsx("div",{className:"sc-masonry","data-wall":!0,"data-density":!0,"data-density-size":A,style:k,children:Z.map(ne=>o.jsx(Z9,{product:ne,variant:"use",size:"grid",onUse:u,onOpen:oe},ne.id))}),n&&J.length===0&&Z.length===0&&o.jsx(dd,{noun:"products",q:h,facet:b?si(b):null,onClearSearch:y,onClearAll:w})]})})}function iZ({value:e,onChange:t}){const n=si(e)??"Other",s=e&&Dc.some(i=>i.key===e)?e:"other";return o.jsxs(_o,{children:[o.jsx(Zo,{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(Oo,{align:"center",sideOffset:8,children:o.jsx(i1,{value:s,children:Dc.map(i=>o.jsx(Vl,{value:i.key,onSelect:()=>t(i.key),children:i.label},i.key))})})]})}function cZ(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 uZ({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,b=!!(s&&c&&e.length>0),C=e.length>1||b,{shellRef:E,railRef:N,page:j}=cZ(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(on,{size:"2"}):o.jsx(nr,{size:22,weight:"bold"}),o.jsx("span",{children:"Add a reference"})]}):o.jsx("span",{className:"sc-refstage-blank",children:o.jsx(Ga,{size:22})})}),C&&o.jsxs("div",{className:"sc-refrail-shell",ref:E,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(q1,{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))})]}),b&&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(on,{size:"1"}):o.jsx(nr,{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(xH,{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 dZ=3;function fZ(e){const t=e,n=(t.brand??t.vendor??"").trim();return!n||e.name.toLowerCase().startsWith(n.toLowerCase())?null:n}function hZ(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 mZ(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 pZ({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 gZ(){var he;const{productId:e=""}=Ba(),{brand:t,products:n,nodes:s,refresh:i,refreshProducts:c}=It(),{demoProducts:u,demoProductsLoaded:f}=mn(),h=nn(),m=I9(),{push:g}=hr(),[v,y]=r.useState(!1),[w,b]=r.useState(!1),[C,E]=r.useState(null),N=r.useRef(null),j=n.find(de=>de.id===e),k=r.useMemo(()=>j?void 0:u.find(de=>de.id===e),[j,u,e]);J1((he=j??k)==null?void 0:he.name);const[A,M]=r.useState([]);r.useEffect(()=>{if(!k){M([]);return}let de=!0;return Ce.demoProductFrames(k.id).then(be=>{de&&M(be.frames)}).catch(()=>{de&&M([])}),()=>{de=!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 P=r.useMemo(()=>s.filter(de=>{var be;return de.status==="done"&&de.images.length>0&&(((be=de.brief)==null?void 0:be.tokens)??[]).some(Te=>(Te==null?void 0:Te.t)==="product"&&Te.id===e)}).slice(-12).reverse(),[s,e]),G=((j==null?void 0:j.origin)??"manual")==="manual",I=de=>{j&&(N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{(G?Ce.updateProduct(t.id,j.id,de):Ce.updateCatalogProduct(t.id,j.id,de)).then(()=>c()).catch(Te=>E(String(Te.message??Te)))},500))},oe=async de=>{y(!0),E(null);try{await de,await c()}catch(be){E(String(be.message??be))}finally{y(!1)}},W=async()=>{if(j){b(!0),E(null);try{j.origin==="catalog"||j.id.startsWith("cat-")?await Ce.deleteCatalogProduct(t.id,j.id):await GH(t.id,j.id),await i(),h(K0(t),{replace:!0})}catch(de){E(String(de.message??de)),b(!1)}}};if(!j&&!k&&!f)return o.jsx(ur,{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(ur,{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(K0(t)),children:"Browse products"})})]})});const J=k?"none":G?"full":"fields",Z=j??k,ee=(j==null?void 0:j.id)??k.id,q=j?pp(j):(k==null?void 0:k.category)??null,H=fZ(Z),K=de=>{const be=Zn(de.file);return be?[{file:de.file,url:be,angle:de.angle}]:[]},X=k?A.map(de=>({file:de.angle,url:de.url,angle:de.angle})):((j==null?void 0:j.shots)??[]).flatMap(K),U=de=>{const be=X.map(Ue=>Ue.file),Te=be.indexOf(de)+1;oe(Ce.setProductShots(t.id,ee,be.filter(Ue=>Ue!==de))).then(()=>g({kind:"success",title:"Reference removed",detail:`Reference ${Te} of ${be.length}`,action:{label:"Undo",onClick:()=>void oe(Ce.setProductShots(t.id,ee,be))}}))},L=k?"Our reference set. Yours replaces it.":X.length===0?G?"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.",O=J==="none"?null:"Add image",ne=j!=null&&j.descriptionHtml?mZ(hZ(j.descriptionHtml),200):"",re=(k==null?void 0:k.description)||ne||null,le=k?[k.subcategory]:[j==null?void 0:j.variant,j==null?void 0:j.material,j==null?void 0:j.dimensions],ae=[J==="none"?si(q):null,...le].filter(Boolean),me=k?u.filter(de=>de.id!==ee).slice(0,8):n.filter(de=>de.id!==ee).slice(0,8);return o.jsx(ur,{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(K0(t)),children:"Products"}),o.jsx("span",{children:"/"}),o.jsx("span",{children:k?"Scenri library":G?"Yours":"From your store"})]}),H&&o.jsx("p",{className:"sc-lookpage-house",children:o.jsx("em",{className:"sc-accent",children:H})}),J==="full"?o.jsx(pZ,{value:T,onChange:de=>{D(de),I({name:de})}}):o.jsx("h1",{dir:"auto",children:Z.name}),re&&o.jsx("p",{className:"sc-lookpage-lede",children:re}),ae.length>0&&o.jsx("p",{className:"sc-lookpage-facts",children:ae.join(" · ")}),o.jsxs("div",{className:"sc-lookpage-acts",children:[J!=="none"&&o.jsx(iZ,{value:q,onChange:de=>I({category:de})}),o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>m(ee),children:"Use in a shot"})]}),C&&o.jsx("p",{className:"sc-assetform-err",children:C}),o.jsx(uZ,{refs:X,cap:dZ,note:L,addLabel:O,busy:v,onAdd:J==="none"?void 0:de=>void oe(qH(t.id,ee,de)),onPromote:J==="none"?void 0:de=>void oe(Ce.setProductShots(t.id,ee,[de,...X.map(be=>be.file).filter(be=>be!==de)])),onRemove:J==="none"?void 0:U}),P.length>0&&o.jsx(To,{label:`Shots featuring ${Z.name}`,children:P.map(de=>o.jsx(Rp,{node:de,onClick:()=>h(Q1(t,null,de.id))},de.id))}),me.length>0&&o.jsx(To,{label:k?"Other products in the library":"Other products",children:me.map(de=>k?o.jsx(Z9,{product:de,variant:"navigate",size:"slider",onOpen:be=>h(Js(t,be))},de.id):o.jsx(_9,{product:de,variant:"navigate",size:"slider",onOpen:be=>h(Js(t,be))},de.id))}),j&&o.jsx("div",{className:"sc-ownedbits",children:o.jsx("div",{className:"sc-lookpage-acts",children:o.jsx(cs,{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 W()})})})]})})}const O9=[{id:"newest",label:"Newest first"},{id:"oldest",label:"Oldest first"},{id:"cost",label:"Highest cost"},{id:"keepers",label:"Keepers first"}];function vZ(e){return O9.some(t=>t.id===e)}const V9=[{id:"all",label:"All"},{id:"keepers",label:"Keepers"},{id:"archived",label:"Archived"}];function yZ(e){return V9.some(t=>t.id===e)}function xZ(e,t,n){return n==="archived"?t:n==="keepers"?e.filter(s=>s.kept):e}function wZ(e,t,n,s){const i=Fh(e,n,s);return{all:i.length,keepers:i.reduce((c,u)=>c+(u.kept?1:0),0),archived:Fh(t,n,s).length}}const Bl=(e,t)=>t.createdAt.localeCompare(e.createdAt);function bZ(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 Fh(e,t,n){return t.trim()?e.filter(s=>ba(n(s),t)):e}function EZ(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 CZ=[{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 SZ({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:CZ.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 fd=e=>((e==null?void 0:e.tokens)??[]).filter(t=>t&&typeof t.t=="string"),cv=(e,t)=>fd(e).filter(n=>n.t===t&&typeof n.id=="string").map(n=>n.id),uv=e=>fd(e).filter(t=>t.t==="text").map(t=>typeof t.v=="string"?t.v:"").join(" ").replace(/\s+/g," ").trim(),dv=(e,t)=>fd(e).filter(n=>n.t===t).length,$0=(e,t,n)=>t(e)??n;function jZ(e,t,n){if(!e||!t)return[];const s=[],i=(f,h,m,g)=>{const v=cv(e,f),y=cv(t,f),w=y.filter(C=>!v.includes(C)),b=v.filter(C=>!y.includes(C));if(!(!w.length&&!b.length)){if(w.length===1&&b.length===1){s.push(`${m} ${$0(b[0],h,g)} to ${$0(w[0],h,g)}`);return}for(const C of w)s.push(`${m} ${$0(C,h,g)} added`);for(const C of b)s.push(`${m} ${$0(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=dv(e,f),g=dv(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=uv(e),u=uv(t);return c!==u&&s.push(u&&u.length<=60?`“${u}”`:"wording changed"),s}function kZ(e,t,n){const s=jZ(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 z9(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 AZ(e){return fd(e.brief).filter(n=>n.t==="text").map(n=>typeof n.v=="string"?n.v:"").join(" ").replace(/\s+/g," ").trim()||e.prompt||""}function NZ({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:[lp(e,t)," · ",eo(e,t),"s"]})}function fv({src:e,alt:t="",aspect:n}){const[s,i]=r.useState(!1),c=r.useCallback(u=>{u!=null&&u.complete&&i(!0)},[]);return o.jsxs("span",{className:"sc-cellimg","data-loaded":s||void 0,style:n?{"--sc-cell-ar":n}:void 0,children:[!s&&o.jsx("span",{className:"sc-shimmer"}),o.jsx("img",{ref:c,src:e,alt:t,loading:"lazy",decoding:"async",onLoad:()=>i(!0),onError:()=>i(!0)})]})}function MZ({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:b,branchingFromImage:C,expanded:E,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])),P=!!g,[G,I]=r.useState(null),[oe,W]=r.useState(null),{tile:J,cols:Z}=lI(sI(oe),M,oI()<aI),ee=[...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=>{var he,de;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,style:{"--sc-cell-ar":Q0((he=H.brief)==null?void 0:he.format)},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(NZ,{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 be=H.status==="cancelled",Te=be?jw():oo(H.error,A==null?void 0:A(H.engineId));return[o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-cancelled":be||void 0,"data-failed":!be||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(ap,{failure:Te,density:"tile",onRetry:()=>s(H),dismiss:u?{label:H.archived?"Restore":"Dismiss",onClick:()=>u(H)}:void 0})})]},H.id)]}const U=(h==null?void 0:h(H.id))??[],L=(m==null?void 0:m.has(H.id))??!1,O=(j==null?void 0:j(H.id))??0,ne=w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":H.id===b||void 0,onClick:()=>w(H.id),"aria-label":`Refine ${Cn(H)}`,title:"Continue from this shot",children:[o.jsx(mg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]}),re=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:tn(z9(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(xh,{size:12}),H.images.length," variants"]}),O>0&&k&&o.jsxs("button",{type:"button",className:"sc-fact sc-cell-versions",onClick:()=>k(H.id),"aria-label":`Show the ${O} version${O===1?"":"s"} of this shot`,children:[o.jsx(kH,{size:11}),O," version",O===1?"":"s"]}),U.length>0&&o.jsxs("span",{className:"sc-fact",title:U.map(be=>be.name).join(", "),children:[o.jsx(Lx,{size:11}),U.length," set",U.length===1?"":"s"]})]},`${H.id}-facts`),le=P&&o.jsx("button",{type:"button",className:"sc-cell-pick","data-on":L||void 0,"aria-pressed":L,"aria-label":L?"Deselect shot":"Select shot",onClick:()=>g==null?void 0:g(H.id),children:L&&o.jsx(ya,{size:12,weight:"bold"})}),ae=o.jsxs("div",{className:"sc-cell-acts",children:[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(Tc,{size:12}):o.jsx(yh,{size:12})}),ne]},`${H.id}-acts`),me=c&&o.jsx("button",{type:"button",className:"sc-cell-star","data-on":H.kept||void 0,onClick:()=>c(H),"aria-pressed":H.kept,"aria-label":H.kept?"Remove from keepers":"Keep",title:H.kept?"Remove from keepers":"Keep",children:o.jsx(wh,{size:14,weight:H.kept?"fill":"regular"})});return E!=null&&E.has(H.id)&&H.images.length>1?H.images.map((be,Te)=>{var Ue;return o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-fb-variant":Te,"data-variant":"","data-first":Te===0||void 0,"data-selected":Te===0&&H.id===t,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}, take ${Te+1} of ${H.images.length}`,onClick:()=>n(H.id,Te),children:o.jsx(fv,{src:tn(be),aspect:Q0((Ue=H.brief)==null?void 0:Ue.format)})}),o.jsxs("div",{className:"sc-cell-bar",children:[o.jsxs("div",{className:"sc-cell-facts",children:[o.jsxs("span",{className:"sc-fact",children:[Te+1," of ",H.images.length]}),Te===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(xh,{size:12}),"Collapse"]})]}),o.jsxs("div",{className:"sc-cell-acts",children:[Te===0&&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(Tc,{size:12}):o.jsx(yh,{size:12})}),w&&o.jsxs("button",{type:"button",className:"sc-cell-branch","data-on":b===H.id&&C===be?"":void 0,onClick:()=>w(H.id,Te),"aria-label":`Refine ${Te+1} of ${H.images.length}`,title:"Continue from this take",children:[o.jsx(mg,{size:12}),o.jsx("span",{className:"sc-cell-branch-lb",children:"Refine"})]})]})]}),Te===0&&o.jsxs(o.Fragment,{children:[le,me]})]},`${H.id}:${be}`)}):[o.jsxs(Gm,{children:[o.jsx(Km,{children:o.jsxs("div",{className:"sc-cell","data-fb-node":H.id,"data-selected":H.id===t,"data-picked":L||void 0,children:[o.jsx("button",{type:"button",className:"sc-cell-open","aria-label":`Open ${Cn(H)}`,onClick:()=>n(H.id),children:o.jsx(fv,{src:tn(H.images[0]),aspect:Q0((de=H.brief)==null?void 0:de.format)})}),o.jsxs("div",{className:"sc-cell-bar",children:[re,ae]}),le,me]})}),o.jsxs(Ym,{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:L?"Deselect":"Select for set"}),O>0&&k&&o.jsxs(qr,{onSelect:()=>k(H.id),children:[O," version",O===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(mh,{}),o.jsx(qr,{onSelect:()=>u(H),children:H.archived?"Restore":"Archive"})]}),f&&H.archived&&o.jsxs(o.Fragment,{children:[o.jsx(mh,{}),o.jsx(qr,{color:"red",onSelect:()=>I(H),children:"Delete permanently"})]})]})]},H.id)]})];if(bw(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(Z,ee.length));return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sc-feed",ref:W,"data-picking":P&&((m==null?void 0:m.size)??0)>0?"":void 0,style:{"--sc-tile":`${J}px`},children:Array.from({length:q},(H,K)=>o.jsx("div",{className:"sc-feed-col",children:ee.filter((X,U)=>(ee.length-1-U)%q===K)},`col-${q}-${K}`))}),o.jsx(Xc,{open:!!G,onOpenChange:H=>!H&&I(null),children:o.jsxs(Qc,{maxWidth:"420px",children:[o.jsx(Jc,{children:"Delete this shot permanently?"}),o.jsx(eu,{size:"2",children:"This cannot be undone."}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{color:"red",onClick:()=>{G&&(f==null||f(G)),I(null)},children:"Delete permanently"})})]})]})})]})}function B9({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:su,children:[o.jsx(ru,{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:tn(n),alt:""}),o.jsx("figcaption",{dir:"auto",children:Cn(e)})]}),o.jsxs("figure",{className:"sc-cmp-side",children:[o.jsx("img",{src:tn(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(ap,{failure:oo(h),density:"tile",onRetry:()=>v(y=>y+1)})}):u?o.jsx("img",{src:tn(u.heatmapHash),alt:"Heatmap of the pixels that differ"}):o.jsx("div",{className:"sc-cmp-wait",children:o.jsx(on,{})}),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 RZ=130;function PZ(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),RZ);return()=>clearTimeout(s)},[e,t]),t}function Ih({name:e,count:t,mode:n,onToggle:s,action:i,children:c}){const u=n==="open"||n==="result"?"open":"compact",f=PZ(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 LZ({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(Ga,{size:14})}),o.jsx("span",{className:"sc-acard-tick","aria-hidden":!0,children:o.jsx(ya,{size:10,weight:"bold"})})]}),n&&o.jsxs("span",{className:"sc-acard-label",children:[e.bookmarked&&o.jsxs(o.Fragment,{children:[o.jsx(Y1,{className:"sc-bm-mark",size:10,weight:"fill","aria-hidden":!0}),o.jsx("span",{className:"sc-vh",children:"Bookmarked. "})]}),e.label]})]})}function F2({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(av);return r.useEffect(()=>{i!=="open"&&y(av)},[i]),i==="result"&&n.length===0?null:o.jsx(Ih,{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(nr,{size:10})}),children:w=>{const{visible:b,more:C}=V_(n,g,w==="open"?v:$h);return o.jsxs("div",{className:w==="open"?"sc-acard-grid":"sc-arow",children:[b.map(E=>o.jsx(LZ,{candidate:E,on:g.has(E.id),named:w==="open",onClick:()=>u(E.id)},E.id)),w==="open"&&C>0&&o.jsxs("button",{type:"button",className:"sc-amore-tile",onClick:()=>y(E=>E+sv),"aria-label":`Show ${Math.min(C,sv)} more ${f}`,children:[o.jsxs("span",{className:"sc-amore-n",children:["+",C]}),o.jsx("span",{className:"sc-amore-t",children:"more"})]})]})}})}function TZ({brand:e,shots:t,attached:n=N9,onProduct:s,onCharacter:i,onColor:c,onRef:u,onTemplate:f,onClose:h}){const m=uu(),g=ol(),{applyBrand:v}=mn(),{push:y}=hr(),[w,b]=eT(ir.assetsExpanded,null),C=Z=>b(ee=>ee===Z?null:Z),[E,N]=r.useState(""),j=E.trim().length>0,k=Z=>{N(""),b(Z)},A=Z=>j?"result":w===null?"idle":w===Z?"open":"collapsed",M=r.useMemo(()=>new Set(Va(e.id)),[e.id]),T=r.useMemo(()=>{const Z=ee=>{const q=zl(ee,m);return ld(ee,q,{currentId:null,query:"",bookmarked:M,shown:q.length}).items};return{product:Z("product"),presenter:Z("presenter"),scene:Z("scene")}},[m,M]),D=r.useMemo(()=>({product:bc(T.product,E),presenter:bc(T.presenter,E),scene:bc(T.scene,E)}),[T,E]),P=r.useMemo(()=>{var Z;return xa((Z=e.json)==null?void 0:Z.palette)},[e]),G=r.useMemo(()=>j?P.filter(Z=>ba(`${Z.name} ${Z.hex}`,E)):P,[P,E,j]),I=Z=>{(async()=>{var q;const ee=Z$((q=e.json)==null?void 0:q.palette,Z);if(ee.swatch){if(ee.added)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ee.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"));return}k("colors")}})()},oe=Z=>{(async()=>{var q;const ee=O$((q=e.json)==null?void 0:q.palette,Z);if(ee.removed)try{const H=await Ce.updateBrand(e.id,{...e.json??{},palette:ee.palette});v(H)}catch(H){y(dn(H,"Could not save the brand"))}})()},W=t.filter(Z=>Z.status==="done"&&Z.images.length>0).slice(-12).reverse(),J=j&&!D.product.length&&!D.presenter.length&&!D.scene.length&&!G.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(Hc,{size:12}),o.jsx("input",{value:E,onChange:Z=>N(Z.target.value),onKeyDown:Z=>{Z.key==="Escape"&&E&&(Z.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})})]})}),J&&o.jsxs("p",{className:"sc-assets-zero",children:["Nothing here matches “",E.trim(),"”."]}),o.jsx(F2,{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:Z=>{Z.kind==="product"&&(k("product"),s(Z.id))}})}),o.jsx(F2,{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:Z=>{Z.kind==="presenter"&&k("presenter")}})}),o.jsx(F2,{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:Z=>{Z.kind==="scene"&&k("scene")}})}),!(j&&G.length===0)&&o.jsx(Ih,{name:"Brand colors",count:G.length,mode:A("colors"),onToggle:()=>C("colors"),action:o.jsx(f1,{className:"sc-aadd",triggerStyle:{background:"none"},value:yp(P),presets:P.map(Z=>Z.hex),commitMode:"close",align:"end",label:"Add colour",onChange:I,children:o.jsx(nr,{size:10})}),children:Z=>o.jsx("div",{className:"sc-arow",children:(Z==="open"?G:G.slice(0,$h)).map(ee=>o.jsxs("div",{className:"sc-aswatch-tile",children:[o.jsx("button",{type:"button",title:`${ee.name} ${ee.hex}`,onClick:()=>c(ee.hex,ee.name),children:o.jsx("span",{className:"sc-aswatch",style:{background:ee.hex}})}),Z==="open"&&o.jsx("button",{type:"button",className:"sc-aswatch-x","aria-label":`Remove ${ee.name}`,title:"Remove",onClick:()=>oe(ee.hex),children:o.jsx(Mn,{size:10,weight:"bold"})})]},ee.hex))})}),W.length>0&&!j&&o.jsx(Ih,{name:"Recent shots",count:W.length,mode:A("shots"),onToggle:()=>C("shots"),children:Z=>o.jsx("div",{className:"sc-arow",children:(Z==="open"?W:W.slice(0,$h)).map(ee=>o.jsx("button",{type:"button",title:"Attach as a style reference",onClick:()=>u(ee.images[0]),children:o.jsx("img",{src:tn(ee.images[0]),alt:"",loading:"lazy"})},ee.id))})})]})}function HZ({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:b,q:C,onQ:E,searchTotal:N,sort:j,onSort:k,tile:A,onTile:M,assets:T,onAssets:D,showAssets:P}){const G=t?t.id:n?"__ungrouped__":"__all__",I=t?t.name:n?"Not in a set":"All shots",oe=!!t||n,[W,J]=r.useState(!1),[Z,ee]=r.useState(!1),[q,H]=r.useState(!1),[K,X]=r.useState(""),U=r.useRef(null),L=r.useRef(!1),O=()=>{L.current=!0,ee(!0),X(""),J(!0)},ne=()=>{t&&(L.current=!1,ee(!1),X(t.name),J(!0))};r.useEffect(()=>{v&&O()},[v]);const re=()=>{const me=K.trim();if(!me)return;const he=L.current;L.current=!1,ee(!1),J(!1),he?f(me):m==null||m(me)},le=me=>{if(me){J(!0);return}const he=L.current;L.current=!1,ee(!1),J(!1),he&&(h==null||h())},ae=V9.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(Zo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-place","data-on":oe||void 0,"aria-label":I,children:[o.jsx(Lx,{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(Oo,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[o.jsxs(i1,{value:G,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(c1,{}),e.map(me=>o.jsx(Vl,{value:me.id,onSelect:()=>u(me),children:me.name},me.id))]}),o.jsx(c1,{}),o.jsx(Qr,{onSelect:()=>{h==null||h(),O()},children:"New set"}),t&&m&&o.jsx(Qr,{onSelect:ne,children:"Rename"}),t&&g&&o.jsx(Qr,{color:"red",onSelect:()=>H(!0),children:"Delete set"})]})]}),o.jsx(el,{open:W,onOpenChange:le,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:me=>{me.preventDefault();const he=U.current;he&&(he.focus(),he.select())},children:[o.jsx(nl,{children:Z?"Name this set":"Rename set"}),o.jsx("input",{ref:U,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"&&re()}}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(pa,{variant:"soft",color:"gray",onClick:()=>le(!1),children:"Cancel"}),o.jsx(pa,{onClick:re,disabled:!K.trim(),children:"Save"})]})]})}),o.jsx(Xc,{open:q,onOpenChange:H,children:o.jsxs(Qc,{maxWidth:"420px",children:[o.jsx(Jc,{children:"Delete this set?"}),o.jsx(eu,{size:"2",children:"Shots stay in the library. Only the set goes."}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{color:"red",onClick:()=>{g==null||g(),H(!1)},children:"Delete set"})})]})]})}),o.jsx(H9,{"aria-label":"Shot lenses",activeKey:y==="all"?null:y,items:ae,onSelect:me=>b(me??"all")})]}),o.jsxs("div",{className:"sc-toolbar-actions",children:[o.jsx(fu,{value:C,onChange:E,noun:"shots",total:N}),o.jsxs(_o,{children:[o.jsx(Zo,{children:o.jsxs("button",{type:"button",className:"sc-toolbar-btn","aria-label":"Sort shots",children:[o.jsx(bH,{size:14}),o.jsx("span",{className:"sc-toolbar-btn-t",children:"Sort"}),o.jsx(ai,{size:10})]})}),o.jsx(Oo,{align:"end",children:o.jsx(i1,{value:j,onValueChange:me=>k(me),children:O9.map(me=>o.jsx(Vl,{value:me.id,children:me.label},me.id))})})]}),o.jsx(dI,{value:A,onChange:M}),P&&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(_H,{size:15,mirrored:!0})})]})]})}function DZ(e){const{push:t}=hr(),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 $Z(e){const{push:t}=hr(),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 FZ(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 IZ(e,t){const{product:n,presenter:s,scene:i}=FZ(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 _Z(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 b=()=>{const C=s.current;if(C===null)return;const E=C-m.scrollLeft;if(Math.abs(E)<.5){m.scrollLeft=C,s.current=null;return}m.scrollLeft+=E*.16,i.current=requestAnimationFrame(b)};i.current=requestAnimationFrame(b)},[]);return{ref:t,page:f}}function ZZ(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 OZ({entries:e,catalogs:t,stagedId:n,onUse:s,onOpenProduct:i,onOpenPresenter:c,onOpenScene:u}){const f=r.useMemo(()=>ZZ(e).slice(0,10),[e]),{ref:h,page:m}=_Z(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(q1,{size:13,weight:"bold"})}),o.jsx("div",{className:"sc-shelf-row",ref:h,children:[0,1,2].map(g=>f.map(v=>o.jsx(R9,{entry:v,size:"grid",hideRecipe:!0,decorative:g!==1,active:n===v.id,onOpen:()=>s(v),onOpenProduct:i,onOpenPresenter:c,onOpenScene:u,...IZ(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 VZ({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(Zo,{children:o.jsx("button",{type:"button",className:"sc-btn sc-btn-primary",children:"Add to set"})}),o.jsxs(Oo,{children:[t.map(w=>o.jsx(Qr,{onSelect:()=>n(w),children:w.name},w.id)),t.length>0&&o.jsx(c1,{}),o.jsx(Qr,{onSelect:s,children:"New set…"})]})]})]}),o.jsx("button",{type:"button",className:"sc-btn",onClick:i,children:"Clear"}),m&&o.jsx(cs,{label:`Delete ${e} permanently`,title:`Delete ${e} shot${e===1?"":"s"} permanently?`,body:"This cannot be undone.",busy:!1,onConfirm:()=>y(g)})]})}function zZ(){const e=or(Ke.hubShot),t=or(Ke.setShot);return(e==null?void 0:e.params.shotId)??(t==null?void 0:t.params.shotId)??null}function U9({set:e}){const{engines:t,scenes:n,presenters:s,demoProducts:i,showcase:c,showcaseLoaded:u}=mn(),{brand:f,workspace:h,nodes:m,sets:g,membership:v,loaded:y,refresh:w,applySet:b,dropSet:C,products:E}=It(),N=uu(),j=nn(),[k,A]=li(),M=zZ(),[T,D]=r.useState(null),[P,G]=r.useState(!1),{open:I,toggle:oe,setOpen:W}=OF(),J=lo(bi),Z=I&&!J,[ee,q]=r.useState(null),[H,K]=r.useState(N9),[X,U]=r.useState(null),[L,O]=r.useState(null),[ne,re]=r.useState(new Set),[le,ae]=Zs("tab","all"),[me,he]=Zs("in",""),[de,be]=Zs("branch",""),[Te]=Zs("bi",""),[Ue,ge]=Zs("lineage",""),[st,ht]=r.useState(new Set),[Rt,Pe]=Za(ir.tileSize,l9),Ae=i9(Rt),{q:Se,setQ:at,clearSearch:kt}=hu([]),[qt,Xt]=Za(ir.feedSort,"newest"),Zt=vZ(qt)?qt:"newest",[yn,Rn]=r.useState(!1),[Gn,Pn]=Zs("i","0"),Ot=Number.parseInt(Gn,10)||0;r.useRef(null);const tt=r.useRef(null),{push:Qe}=hr(),{tasks:Ut,poke:Vt}=sl(),[z,ue]=r.useState(null),xe=(h==null?void 0:h.id)??"",Ne=e?cc(f,e):cr(f),Ye=r.useCallback((_,ie=0,He=!1)=>{const Fe=new URLSearchParams(k);ie>0?Fe.set("i",String(ie)):Fe.delete("i");const cn=Fe.toString();j(`${Ne}/shots/${_}${cn?`?${cn}`:""}`,{replace:He})},[Ne,j,k]),it=r.useCallback(()=>{const _=new URLSearchParams(k);_.delete("i"),_.delete("panel");const ie=_.toString();j(`${Ne}${ie?`?${ie}`:""}`,{replace:!0})},[Ne,j,k]),_t=yZ(le)?le:"all",At=!e&&me==="ungrouped";r.useEffect(()=>{le==="ungrouped"&&(ae(null),he("ungrouped"))},[le,ae,he]);const bt=r.useCallback(async()=>{try{await w(),q(null)}catch(_){q(String(_.message??_))}},[w]),{archive:Sn,unarchive:Ct,unarchiveBatch:Nr}=DZ(bt),{remove:mr,removeBatch:ct}=$Z(bt);r.useEffect(()=>{M&&D(M)},[M]);const jt=r.useMemo(()=>Ut.filter(_=>_.kind!=="catalog").map(_=>`${_.id}:${_.state}`).sort().join("|"),[Ut]),Qt=r.useRef(null);r.useEffect(()=>{if(Qt.current===null){Qt.current=jt;return}Qt.current!==jt&&(Qt.current=jt,bt())},[jt,bt]);const zt=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&!_.archived).sort(Bl),[m]),Tt=r.useMemo(()=>{const _=new Map;for(const ie of g)for(const He of v[ie.id]??[])_.has(He)||_.set(He,[]),_.get(He).push(ie);return _},[g,v]),rr=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(!Ue)return null;const _=zt.find(Fe=>Fe.id===Ue);if(!_)return null;const ie=new Set([_.id]),He=[_.id];for(;He.length;)for(const Fe of rr.get(He.pop())??[])ie.has(Fe.id)||(ie.add(Fe.id),He.push(Fe.id));return{root:_,ids:ie}},[Ue,zt,rr]);r.useEffect(()=>{!Ue||!y||F||(ge(null),Qe({kind:"error",title:"That shot is no longer available",detail:"Showing everything instead."}))},[Ue,y,F,ge,Qe]);const V=r.useMemo(()=>[...m].filter(_=>_.kind!=="root"&&_.archived).sort(Bl),[m]),Q=r.useMemo(()=>{const _=ie=>{if(F)return ie.filter(He=>F.ids.has(He.id));if(e){const He=new Set(v[e.id]??[]);return ie.filter(Fe=>He.has(Fe.id))}return At?ie.filter(He=>!Tt.has(He.id)):ie};return{live:_(zt),archived:_(V)}},[zt,V,e,v,Tt,F,At]),pe=r.useMemo(()=>xZ(Q.live,Q.archived,_t),[Q,_t]),ve=r.useMemo(()=>{var Fe,cn;const _=E.length?E:((Fe=f.json)==null?void 0:Fe.products)??[],ie=((cn=f.json)==null?void 0:cn.characters)??[],He=N.scenes;return{product:Bt=>{const Hn=_.find(pr=>pr.id===Bt)??i.find(pr=>pr.id===Bt);return Hn?Oa(Hn,"tooltip"):null},person:Bt=>{var Hn,pr;return((Hn=ie.find(Ka=>Ka.id===Bt))==null?void 0:Hn.name)??((pr=s.find(Ka=>Ka.id===Bt))==null?void 0:pr.name)??null},scene:Bt=>{const Hn=He.find(pr=>pr.id===Bt);return Hn?to(Hn,"tooltip"):null}}},[E,i,f,s,N.scenes]),Me=r.useMemo(()=>{const _=new Map;return ie=>{var cn;const He=_.get(ie.id);if(He!==void 0)return He;const Fe=bZ(ie,ve,(cn=t.find(Bt=>Bt.id===ie.engineId))==null?void 0:cn.displayName);return _.set(ie.id,Fe),Fe}},[ve,t]),Ze=r.useMemo(()=>wZ(Q.live,Q.archived,Se,Me),[Q,Se,Me]),ot=r.useMemo(()=>zt.reduce((_,ie)=>_+(Tt.has(ie.id)?0:1),0),[zt,Tt]),ke=r.useMemo(()=>EZ(Fh(pe,Se,Me),Zt),[pe,Se,Me,Zt]),Oe=r.useMemo(()=>{const _=new Map;for(const ie of m)_.has(ie.parentId)||_.set(ie.parentId,[]),_.get(ie.parentId).push(ie);return _},[m]),qe=m.find(_=>_.kind==="root")??null,_e=r.useMemo(()=>{const _=m.find(He=>He.id===T);return _||(ke.filter(He=>He.status!=="error")[0]??ke[0]??qe)},[m,T,ke,qe]),Le=r.useMemo(()=>m.find(_=>_.id===de&&_.kind!=="root"&&(_.status==="running"||_.status==="done"&&_.images.length>0))??null,[m,de]),dt=(Le==null?void 0:Le.images[Number.parseInt(Te,10)||0])??(Le==null?void 0:Le.images[0])??null,vt=r.useCallback(()=>{A(_=>{const ie=new URLSearchParams(_);return ie.delete("branch"),ie.delete("bi"),ie},{replace:!0})},[A]);r.useEffect(()=>{!de||Le||!y||(vt(),Qe({kind:"error",title:"That shot is no longer available to refine",detail:"Making a new shot."}))},[de,Le,y,vt,Qe]);const Dt=r.useCallback((_,ie=0)=>{var He;A(Fe=>{const cn=new URLSearchParams(Fe);return cn.set("branch",_),ie>0?cn.set("bi",String(ie)):cn.delete("bi"),cn},{replace:!0}),(He=tt.current)==null||He.focus()},[A]),$t=_=>{D(_),Pn(null)},yt=_=>M?Ye(_,0,!0):$t(_),mt=_=>Pn(_===0?null:String(_)),rn=async _=>{var ie,He;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"&&((He=_.brief)!=null&&He.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}},On=async _=>{try{await Ce.cancelNode(_.id),await bt()}catch(ie){Qe(dn(ie,"Could not cancel this shot"))}},Vn=r.useCallback(_=>{var ie,He,Fe;_!=null&&_.scene&&((ie=tt.current)==null||ie.applyScene(_.scene)),_!=null&&_.scenesPanel&&((He=tt.current)==null||He.openAttach("Scenes")),(Fe=tt.current)==null||Fe.focus()},[]);r.useEffect(()=>{k.get("compose")!==null&&(Vn(),A(_=>{const ie=new URLSearchParams(_);return ie.delete("compose"),ie},{replace:!0}))},[k,Vn,A]);const pn=k.get("showcase"),Kn=r.useRef(null);r.useEffect(()=>{if(!pn||!u||Kn.current===pn)return;Kn.current=pn;const _=c.find(ie=>ie.id===pn);_?(U(kh(_)),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 He=new URLSearchParams(ie);return He.delete("showcase"),He},{replace:!0})},[pn,u,c,A,Qe]),r.useEffect(()=>{const _=ie=>{var pr,Ka;const He=document.activeElement,Fe=((He==null?void 0:He.tagName)??"").toUpperCase(),cn=Fe==="INPUT"||Fe==="TEXTAREA"||Fe==="SELECT"||!!(He!=null&&He.closest('[contenteditable="true"]'));if(ie.key==="Enter"&&(ie.metaKey||ie.ctrlKey)){(pr=tt.current)==null||pr.submit(),ie.preventDefault();return}if(cn)return;if(ie.key==="?"){G(!0),ie.preventDefault();return}if(ie.key==="/"&&!M){(Ka=tt.current)==null||Ka.focus(),ie.preventDefault();return}if(ie.key==="Escape"&&P){G(!1),ie.preventDefault();return}if(ie.key==="Escape"&&M){it(),ie.preventDefault();return}if(ie.key==="Escape"&&ne.size>0){re(new Set),ie.preventDefault();return}if(ie.key==="Escape"&&de){vt(),ie.preventDefault();return}if(!_e)return;if(ie.key==="b"&&_e.kind!=="root"&&_e.status==="done"&&_e.images.length>0){Dt(_e.id),ie.preventDefault();return}if(ie.key==="k"&&_e.kind!=="root"&&_e.status==="done"){Xe(_e),ie.preventDefault();return}const Bt=(Oe.get(_e.parentId)??[]).filter(Ya=>Ya.kind!=="root"),Hn=Bt.findIndex(Ya=>Ya.id===_e.id);if(ie.key==="ArrowLeft"&&Hn>0)yt(Bt[Hn-1].id),ie.preventDefault();else if(ie.key==="ArrowRight"&&Hn>=0&&Hn<Bt.length-1)yt(Bt[Hn+1].id),ie.preventDefault();else if(ie.key==="ArrowUp"&&_e.parentId)yt(_e.parentId),ie.preventDefault();else if(ie.key==="ArrowDown"){const Ya=Oe.get(_e.id)??[];Ya.length&&(yt(Ya[0].id),ie.preventDefault())}else ie.key==="["&&Ot>0?mt(Ot-1):ie.key==="]"&&_e.images.length-1>Ot?mt(Ot+1):ie.key==="Enter"&&!M&&_e.kind!=="root"?Ye(_e.id):ie.key==="."&&!M&&oe()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[_e,Oe,Ot,M,P,ne.size,de,Dt,be]);const Ln=_=>re(ie=>{const He=new Set(ie);return He.delete(_)||He.add(_),He}),xn=r.useMemo(()=>m.filter(_=>ne.has(_.id)),[m,ne]),fe=r.useMemo(()=>{if(xn.length!==2)return null;const[_,ie]=xn;return _.status!=="done"||ie.status!=="done"||!_.images[0]||!ie.images[0]?null:[_,ie]},[xn]),Xe=async(_,ie=!_.kept)=>{try{await Ce.keep(_.id,ie),await bt()}catch(He){Qe(dn(He,"Could not update keeper status"))}},et=async()=>{const _=!(xn.length>0&&xn.every(ie=>ie.kept));try{await Promise.all(xn.filter(ie=>ie.kept!==_).map(ie=>Ce.keep(ie.id,_))),await bt()}catch(ie){Qe(dn(ie,"Could not update keeper status"))}},ut=async _=>{try{await Ce.addToSet(_.id,[...ne]),re(new Set),await bt()}catch(ie){Qe(dn(ie,"Could not add to the set"))}},De=r.useRef([]),[St,Jt]=r.useState(!1);r.useEffect(()=>{St&&Jt(!1)},[St]);const pt=async(_,ie)=>{const He=ie.trim();if(He)try{const Fe=await Ce.createSet(f.id,He);_.length>0&&await Ce.addToSet(Fe.id,_),re(new Set),await bt(),j(cc(f,Fe))}catch(Fe){Qe(dn(Fe,"Could not create the set"))}},jn=()=>{const _=De.current;return De.current=[],_},gn=async _=>{if(!e)return;const ie=_.trim();if(!(!ie||ie===e.name))try{const He=await Ce.renameSet(e.id,ie);b(He),j(cc(f,He),{replace:!0}),w()}catch(He){Qe(dn(He,"Could not rename the set"))}},Nt=async()=>{if(e)try{await Ce.deleteSet(e.id),C(e.id),j(cr(f),{replace:!0}),w()}catch(_){Qe(dn(_,"Could not delete the set"))}},Yn=bw(m),Mr=Z||Yn&&!J,sa=Yn?o.jsx(OZ,{entries:c,catalogs:{demoProducts:i,presenters:s,scenes:n},stagedId:L,onOpenProduct:_=>j(Js(f,_)),onOpenPresenter:_=>j(al(f,_)),onOpenScene:_=>j(rl(f,_)),onUse:_=>{O(_.id),U(kh(_))}}):Se.trim()?o.jsx(sc,{text:`No shots match “${Se.trim()}”.`,onAll:kt,actionLabel:"Clear search"}):_t==="keepers"?o.jsx(sc,{text:"No keepers yet. Star a shot and it lands here.",onAll:()=>ae(null)}):_t==="archived"?o.jsx(sc,{text:"Nothing archived.",onAll:()=>ae(null)}):e?o.jsx(sc,{text:"Nothing in this set yet. Pick shots on All, then add them here."}):At?o.jsx(sc,{text:"Every shot is already in a set.",onAll:()=>he(null)}):null,Tn={nodes:m,loaded:y,brand:f,engines:t,projectId:xe,imageIndex:Ot,setImageIndex:mt,close:it,select:yt,retry:_=>{rn(_).then(ie=>{ie&&yt(ie)})},cancel:_=>void On(_),reload:()=>bt(),remix:_=>{U({..._.brief,_at:Date.now()}),_.brief&&A9(f.id,{tokens:u9(_.brief),tplFields:_.brief.templateFields??{},branchId:null}),it()},branch:_=>{Dt(_.id),it()},archive:_=>void Sn(_).then(()=>it()),unarchive:_=>void Ct(_),delete:_=>void mr(_).then(()=>it()),refined:(_,ie)=>{ie==="edit"&&be(_)},tokenNames:ve};return o.jsxs("div",{className:"sc-work","data-assets":Mr,children:[o.jsxs("main",{className:"sc-canvas",id:"main","data-firstrun":Yn||void 0,children:[ee&&o.jsx("div",{className:"sc-canvas-alert",children:o.jsx(sp,{failure:oo(ee)})}),(!Yn||e)&&o.jsx(HZ,{sets:g,active:e,ungrouped:At,ungroupedCount:ot,onPlaceAll:()=>e?j(cr(f)):he(null),onPlaceUngrouped:()=>e?j(`${cr(f)}?in=ungrouped`):he("ungrouped"),onOpenSet:_=>j(cc(f,_)),onNewSet:_=>void pt(jn(),_),onResetNewSet:()=>{De.current=[]},onRenameSet:_=>void gn(_),onDeleteSet:()=>void Nt(),askCreate:St,lens:_t,lensCounts:Ze,onLens:_=>ae(_==="all"?null:_),q:Se,onQ:at,searchTotal:pe.length,sort:Zt,onSort:Xt,tile:Ae,onTile:Pe,assets:Z,onAssets:oe,showAssets:!J}),F&&o.jsxs("div",{className:"sc-lineage-bar",children:[o.jsx("button",{type:"button",className:"sc-crumb-back",onClick:()=>ge(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(MZ,{nodes:ke,selectedId:(_e==null?void 0:_e.id)??null,onOpen:Ye,onRetry:_=>void rn(_),onCancel:_=>void On(_),onToggleKeep:_=>void Xe(_),onArchive:_=>_.archived?Ct(_):Sn(_),onDeletePermanently:mr,engineName:_=>{var ie;return(ie=t.find(He=>He.id===_))==null?void 0:ie.displayName},setsFor:_=>Tt.get(_)??[],picked:ne,onPick:Ln,sending:z,onBranch:Dt,branchingFrom:(Le==null?void 0:Le.id)??null,branchingFromImage:dt,expanded:st,onToggleExpand:_=>ht(ie=>{const He=new Set(ie);return He.delete(_)||He.add(_),He}),versionsOf:_=>{var ie;return((ie=rr.get(_))==null?void 0:ie.length)??0},onVersions:ge,tile:Ae,empty:sa})]}),fe&&o.jsx(B9,{open:yn,onOpenChange:Rn,a:fe[0],b:fe[1],imageA:fe[0].images[0],imageB:fe[1].images[0]}),Mr&&o.jsx("div",{className:"sc-assets-backdrop",onClick:()=>W(!1),"aria-hidden":!0}),o.jsx(SZ,{open:P,onOpenChange:G}),!J&&o.jsx(TZ,{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 He;return(He=tt.current)==null?void 0:He.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:()=>W(!1)}),o.jsxs(M9,{full:!Mr,children:[ne.size>0&&o.jsx(VZ,{count:ne.size,sets:g,onAdd:_=>void ut(_),onNew:()=>{De.current=[...ne],Jt(!0)},onClear:()=>re(new Set),onKeep:()=>void et(),allKept:xn.length>0&&xn.every(_=>_.kept),comparable:fe,onCompare:()=>Rn(!0),archivedLens:_t==="archived",pickedIds:[...ne],onRestoreBatch:_=>void Nr(_).then(()=>re(new Set)),onDeleteBatch:_=>void ct(_).then(()=>re(new Set))}),o.jsx(Ap,{ref:tt,projectId:xe||null,brand:f,engines:t,parent:qe,shots:m,initialBrief:X,suppressDraftRestore:pn!==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:Le,onClearTarget:vt,onRestoreBranchId:be,setSlug:(e==null?void 0:e.slug)??null,onSending:ue,onAttached:K,sourceImage:dt??void 0,onQueued:(_,ie)=>{U(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 He=()=>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(He):bt().then(Fe).finally(He)}})]}),o.jsx(Xh,{context:Tn})]})}function BZ(e){return e.width&&e.height?`${e.width} x ${e.height}`:"untouched render"}function UZ({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,b=w.length>0?1:0,C=async()=>{m(!0),v(null);try{w.length>0&&await QH(n,w,s),t(!1)}catch(N){v(N instanceof Error?N.message:"Export failed")}finally{m(!1)}},E=i.map(N=>({id:N.id,label:N.label.replace(/\s*\d+×\d+$/,""),note:BZ(N)}));return o.jsx(el,{open:e,onOpenChange:t,children:o.jsxs(tl,{maxWidth:"360px","aria-describedby":void 0,onOpenAutoFocus:su,children:[o.jsx(ru,{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:E.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":b===0||h||void 0,title:b===0&&!h?"Pick at least one size to download":void 0,onClick:()=>{b!==0&&!h&&C()},children:h?o.jsx(on,{size:"1"}):b===0?"Download":b>1?"Download both":w.length>0?"Download zip":"Download PNG"})]})})}function WZ(e){var t;return Q0((t=e.brief)==null?void 0:t.format)}function GZ({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:b,clientHeight:C}=c;if(!y||!w||!b||!C)return;const E=Math.min(b/y,C/w),N=y*E,j=w*E;h({left:(b-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(W0,{className:"sc-frame",p:"8",children:o.jsxs(dr,{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":WZ(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:[lp(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"?jw():oo(e.error,i);return o.jsx(ap,{failure:v,density:"stage",onRetry:n})}return o.jsx(dr,{justify:"center",children:o.jsx(W0,{className:"sc-frame",style:{display:"inline-block",maxWidth:"100%"},children:e.status==="done"&&e.images[t]&&o.jsxs(W0,{position:"relative",style:{lineHeight:0},children:[o.jsx("img",{ref:u,src:tn(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 KZ(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(qZ,{...e,node:t})})}):o.jsx(dr,{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 YZ({children:e}){return o.jsx("div",{className:"sc-eyebrow",style:{margin:"16px 0 7px"},children:e})}function qZ({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:AZ(e)||"(none)"}),t&&o.jsxs(o.Fragment,{children:[o.jsx(YZ,{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(cs,{label:"Delete this shot permanently",title:"Delete this shot permanently?",body:"This cannot be undone.",busy:!1,onConfirm:n,fullWidth:!0})})]})}function XZ({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 QZ({brief:e,brand:t}){var g,v;const{scenes:n,presenters:s,demoProducts:i}=mn(),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=lu(t),m=c.flatMap(y=>{var w,b,C,E;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?Zn((b=(w=N==null?void 0:N.shots)==null?void 0:w[0])==null?void 0:b.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?Zn(N==null?void 0:N.preview)??Zn((E=(C=N==null?void 0:N.shots)==null?void 0:C[0])==null?void 0:E.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:Sp(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]}),b=y.tint?{"--tint":y.tint}:void 0;return y.to?o.jsx(em,{className:"sc-ingredient",to:y.to,"data-kind":y.kind,"data-tinted":y.tint?"":void 0,style:b,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:b,title:`${y.kind}: ${y.label}`,children:w},y.key)})}):null}function JZ(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 eO({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:b,onDelete:C,onRefined:E,tokenNames:N}){const{ancestors:j,children:k,siblings:A,sibIndex:M,root:T,parentShot:D}=JZ(t,e),P=r.useMemo(()=>s.find(ae=>ae.id===e.engineId),[s,e.engineId]),{push:G}=hr(),I=r.useMemo(()=>z9(e,D),[e,D]),oe=r.useMemo(()=>D?kZ(D.brief,e.brief,N):null,[D,e.brief,N]),[W,J]=r.useState(!1),[Z,ee]=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",U=async()=>{try{const ae=await(await fetch(tn(K))).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":ae})]),G({kind:"success",title:"Copied to clipboard"})}catch(ae){G(dn(ae,"Copy failed"))}};r.useEffect(()=>{const ae=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ae}},[]);const L=[{key:"export",label:"Export",icon:o.jsx(Mx,{size:14}),onClick:()=>J(!0)},{key:"keep",label:e.kept?"Remove from keepers":"Keep",icon:o.jsx(wh,{size:14,weight:e.kept?"fill":"regular"}),onClick:()=>void Ce.keep(e.id,!e.kept).then(v).catch(ae=>G(dn(ae,"Could not update keeper status"))),tint:e.kept?"var(--sc-star)":void 0},{key:"copy",label:"Copy image",icon:o.jsx(AH,{size:14}),onClick:()=>void U()},...I?[{key:"compare",label:"Compare with source",icon:o.jsx(EH,{size:14}),onClick:()=>ee(!0)}]:[]],O=[{key:"archive",label:e.archived?"Restore":"Archive",icon:e.archived?o.jsx(Tc,{size:14}):o.jsx(yh,{size:14}),onClick:()=>e.archived?b(e):w(e)},...e.archived?[{key:"delete",label:"Delete permanently",icon:o.jsx(X1,{size:14}),onClick:()=>H(!0),tint:"var(--sc-red)"}]:[]],ne=e.status==="done"&&e.images.length>0,re=ne?[...L,...O]:O,le=(ae,me=!1)=>o.jsxs("button",{type:"button",className:"sc-fr","data-fb-node":ae.id,"data-current":me,"data-failed":ae.status==="error"||!ae.images[0]&&ae.status!=="running"&&ae.status!=="cancelled","data-cancelled":ae.status==="cancelled"&&!ae.images[0],title:Cn(ae),onClick:()=>h(ae.id),children:[ae.images[0]?o.jsx("img",{src:tn(ae.images[0]),alt:""}):ae.status==="running"?o.jsx("span",{className:"sc-shimmer"}):ae.status==="cancelled"?o.jsx(yw,{size:13}):o.jsx(au,{size:13}),ae.kept&&o.jsx("span",{className:"sc-fr-star",children:o.jsx(wh,{size:11,weight:"fill"})})]},ae.id);return na.createPortal(o.jsx(Uc,{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(q1,{size:13})})]})]}),re.length>0&&o.jsxs("div",{className:"sc-ovl-bar-r",children:[o.jsx("div",{className:"sc-ovl-acts",children:re.map(ae=>o.jsx("button",{type:"button",className:"sc-icon-btn",onClick:ae.onClick,"aria-label":ae.label,title:ae.label,style:ae.tint?{color:ae.tint}:void 0,children:ae.icon},ae.key))}),o.jsxs(_o,{children:[o.jsx(Zo,{children:o.jsx("button",{type:"button",className:"sc-icon-btn sc-ovl-overflow","aria-label":"More actions",children:o.jsx(MH,{size:18,weight:"bold"})})}),o.jsx(Oo,{align:"end",sideOffset:6,children:re.map(ae=>o.jsxs(Qr,{onSelect:ae.onClick,color:ae.tint?"red":void 0,children:[ae.icon,ae.label]},ae.key))})]})]})]}),o.jsx(Xc,{open:q,onOpenChange:H,children:o.jsxs(Qc,{maxWidth:"420px",children:[o.jsx(Jc,{children:"Delete this shot permanently?"}),o.jsx(eu,{size:"2",children:"This cannot be undone."}),o.jsxs(dr,{gap:"3",mt:"4",justify:"end",children:[o.jsx(nu,{children:o.jsx(pa,{variant:"soft",color:"gray",children:"Cancel"})}),o.jsx(tu,{children:o.jsx(pa,{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(GZ,{node:e,imageIndex:c,onRetry:()=>m(e),onCancel:()=>g(e),engineName:P==null?void 0:P.displayName}),e.status==="done"&&e.images.length>1&&o.jsx("div",{className:"sc-thumbs",children:e.images.map((ae,me)=>o.jsx("button",{type:"button",className:"sc-thumb-btn",onClick:()=>u(me),"aria-label":`Image ${me+1}`,"aria-pressed":me===c,children:o.jsx("img",{src:tn(ae),alt:"",className:"sc-thumb","data-active":me===c,width:52,height:52})},ae))})]}),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}),ne&&o.jsxs("small",{className:"sc-ovl-spend",title:e.costUsd>0?"Of your API budget":"No API cost for this shot",children:[o.jsx(XZ,{size:12}),e.costUsd>0?`$${e.costUsd.toFixed(2)}`:"Free"]})]}),o.jsx(QZ,{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:tn(I),alt:""}),o.jsxs("span",{className:"sc-ctx-chip-t",children:["refined from ",o.jsx("b",{children:Cn(D)})]})]}),oe&&o.jsx("p",{className:"sc-ctx-changed",children:oe})]}),(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(ae=>o.jsxs("span",{style:{display:"contents"},children:[le(ae),o.jsx("span",{className:"sc-wire"})]},ae.id)),le(e,!0),k.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"sc-wire"}),k.slice(0,4).map(ae=>le(ae))]})]})]}),(ne||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(G0,{size:12})," Reuse setup"]}),ne&&o.jsxs("button",{type:"button",className:"sc-s",onClick:()=>m(e),title:"Run the same setup again for a different take",children:[o.jsx(Tc,{size:12})," Try again"]})]}),o.jsx("div",{className:"sc-ovl-body",children:o.jsx(KZ,{node:e.kind!=="root"?e:null,nodes:t,imageIndex:c,onChanged:v,brand:n,onExport:()=>J(!0),onCompare:I?()=>ee(!0):void 0,onArchive:()=>w(e),onUnarchive:()=>b(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(Ap,{projectId:i,brand:n,engines:s,parent:T,target:e,sourceImage:K,shots:t,persistDraft:!1,onQueued:async(ae,me)=>{await v(),ae&&h(ae),ae&&(E==null||E(ae,me))}})]})]}),o.jsx(UZ,{open:W,onOpenChange:J,hash:K,baseName:X}),D&&I&&o.jsx(B9,{open:Z,onOpenChange:ee,a:D,b:e,imageA:I,imageB:K})]})}),document.body)}function hv(){const{shotId:e}=Ba(),t=YE(),{push:n}=hr(),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(on,{size:"3"})}):o.jsx(eO,{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(on,{size:"3"})})}function tO(){const e=Qv();return o.jsx(dr,{align:"center",justify:"center",height:"100vh",p:"5",children:o.jsx(sp,{failure:oo(String((e==null?void 0:e.message)??e))})})}function nO(){const{setSlug:e=""}=Ba(),{pathname:t,search:n}=ln(),{brand:s,sets:i,loaded:c,refresh:u}=It(),f=nn(),h=or({path:Ke.set,end:!1}),m=i.find(y=>y.slug===e)??i.find(y=>y.id===e)??null;J1(m==null?void 0:m.name);const[g,v]=r.useState(null);if(r.useEffect(()=>{if(!c||m)return;if(g===e){f(cr(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(U9,{set:m},m.id)}function rO(){const{pathname:e,search:t}=ln();return o.jsx(Ys,{to:tD(e,t),replace:!0})}function aO(){const{brandSlug:e}=Ba();return o.jsx(Ys,{to:`/${e}?settings=brand`,replace:!0})}function sO(){const{sceneId:e}=Ba();return o.jsx(tZ,{},e)}function oO(){const{presenterId:e}=Ba();return o.jsx(aZ,{},e)}function lO(){const{productId:e}=Ba();return o.jsx(gZ,{},e)}const iO=BC([{element:o.jsx(GF,{}),errorElement:o.jsx(tO,{}),children:[{index:!0,element:o.jsx(ZF,{})},{path:Ke.setup,element:o.jsx(KF,{})},{path:Ke.legacy,element:o.jsx(rO,{})},{path:Ke.brand,element:o.jsx(VF,{}),children:[{index:!0,element:o.jsx(X_,{})},{path:Ke.hub,element:o.jsx(U9,{set:null}),children:[{path:Ke.hubShot,element:o.jsx(hv,{})}]},{path:Ke.set,element:o.jsx(nO,{}),children:[{path:Ke.setShot,element:o.jsx(hv,{})}]},{path:Ke.kit,element:o.jsx(aO,{})},{path:Ke.products,element:o.jsx(lZ,{})},{path:Ke.product,element:o.jsx(lO,{})},{path:Ke.scenes,element:o.jsx(J_,{})},{path:Ke.scene,element:o.jsx(sO,{})},{path:Ke.presenters,element:o.jsx(rZ,{})},{path:Ke.presenter,element:o.jsx(oO,{})}]},{path:Ke.notFound,element:o.jsx(Ys,{to:Ke.root,replace:!0})}]}]),I2=localStorage.getItem("sc-theme")??localStorage.getItem("bt-theme");document.documentElement.dataset.theme=I2==="light"||I2==="dark"?I2:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";Lb.createRoot(document.getElementById("root")).render(o.jsx(Ft.StrictMode,{children:o.jsx(lT,{children:o.jsx(UH,{children:o.jsx(mC,{router:iO})})})}));
|