@_neronotte/theme-studio 0.1.4 → 0.1.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.
|
@@ -26,4 +26,4 @@ Error generating stack: `+b.message+`
|
|
|
26
26
|
HighlightText var(--fui-Slider--steps-percent)
|
|
27
27
|
);}}`,{m:"(forced-colors: active)"}]]}),W7=le({thumb:{B2lzsem:"ftx3jue",Ijaq50:"faunodf",nk6f5a:"f88nxoq",Br312pm:"fd46tj4",Bw0ie65:"f1e2fz10",qhf8xq:"f1euv43f",a9b677:"f174ca62",Bqenvij:"f1yfdkfd",Bkecrkj:"f1aehjj5",oeaueh:"f1s6fcnf",Bvjb7m6:"fdgv6k0",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9",E5pizo:"fof7hq0",De3pzq:"foksa45",Brfgrao:"f1j7ml58",Bciustq:"f14u7mkt",Fbdkly:["f5zrw40","f1ks5ppg"],lawp4y:"fto0uou",mdwyqc:["f1ks5ppg","f5zrw40"],r59vdv:0,Budzafs:0,ck0cow:0,n07z76:0,Gng75u:"fielpny",Bcvre1j:"fyl8oag",Ftih45:"fzhtfnv",Bcgcnre:0,Bqjgrrk:0,qa3bma:0,y0oebl:0,Biqmznv:0,Bm6vgfq:0,Bbv0w2i:0,uvfttm:0,eqrjj:0,Bk5zm6e:0,m598lv:0,B4f6apu:0,ydt019:0,Bq4z7u6:0,Bdkvgpv:0,B0qfbqy:0,kj8mxx:"f1fsco4d"},disabled:{Bcgcnre:0,Bqjgrrk:0,qa3bma:0,y0oebl:0,Biqmznv:0,Bm6vgfq:0,Bbv0w2i:0,uvfttm:0,eqrjj:0,Bk5zm6e:0,m598lv:0,B4f6apu:0,ydt019:0,Bq4z7u6:0,Bdkvgpv:0,B0qfbqy:0,kj8mxx:"f1pv9hn4"},horizontal:{Bz10aip:["f13gfj74","f1nfknbn"],oyh7mz:["foa2ioz","fjmilum"]},vertical:{Bz10aip:"f5cv5a3",B5kzvoi:"f1k2fpdo"}},{d:[".ftx3jue{--fui-Slider__thumb--position:clamp(var(--fui-Slider__inner-thumb--radius), var(--fui-Slider--progress), calc(100% - var(--fui-Slider__inner-thumb--radius)));}",".faunodf{grid-row-start:2;}",".f88nxoq{grid-row-end:2;}",".fd46tj4{grid-column-start:2;}",".f1e2fz10{grid-column-end:2;}",".f1euv43f{position:absolute;}",".f174ca62{width:var(--fui-Slider__thumb--size);}",".f1yfdkfd{height:var(--fui-Slider__thumb--size);}",".f1aehjj5{pointer-events:none;}",".f1s6fcnf{outline-style:none;}",".fdgv6k0{forced-color-adjust:none;}",[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],".fof7hq0{box-shadow:0 0 0 calc(var(--fui-Slider__thumb--size) * .2) var(--colorNeutralBackground1) inset;}",".foksa45{background-color:var(--fui-Slider__thumb--color);}",".f1j7ml58::before{position:absolute;}",".f14u7mkt::before{top:0px;}",".f5zrw40::before{left:0px;}",".f1ks5ppg::before{right:0px;}",".fto0uou::before{bottom:0px;}",[".fielpny::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],".fyl8oag::before{box-sizing:border-box;}",".fzhtfnv::before{content:'';}",[".f1fsco4d::before{border:calc(var(--fui-Slider__thumb--size) * .05) solid var(--colorNeutralStroke1);}",{p:-2}],[".f1pv9hn4::before{border:calc(var(--fui-Slider__thumb--size) * .05) solid var(--colorNeutralForegroundDisabled);}",{p:-2}],".f13gfj74{transform:translateX(-50%);}",".f1nfknbn{transform:translateX(50%);}",".foa2ioz{left:var(--fui-Slider__thumb--position);}",".fjmilum{right:var(--fui-Slider__thumb--position);}",".f5cv5a3{transform:translateY(50%);}",".f1k2fpdo{bottom:var(--fui-Slider__thumb--position);}"]}),$7=le({input:{Bceei9c:"f1k6fduh",abs64n:"fk73vx1",Ijaq50:"f16hsg94",nk6f5a:"f1nzqi2z",Br312pm:"fwpfdsa",Bw0ie65:"fuur7zz",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1mk8lai",jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1s184ao"},disabled:{Bceei9c:"f158kwzp"},horizontal:{Bqenvij:"f1yfdkfd",a9b677:"fly5x3f"},vertical:{Bqenvij:"f1l02sjl",a9b677:"f174ca62",wtfg9d:"f135tqni",By3ymbm:["f114o3fk","f1o9w1zd"],B1e78rk:"f1jr0wcp"}},{d:[".f1k6fduh{cursor:pointer;}",".fk73vx1{opacity:0;}",".f16hsg94{grid-row-start:1;}",".f1nzqi2z{grid-row-end:-1;}",".fwpfdsa{grid-column-start:1;}",".fuur7zz{grid-column-end:-1;}",[".f1mk8lai{padding:0;}",{p:-1}],[".f1s184ao{margin:0;}",{p:-1}],".f158kwzp{cursor:default;}",".f1yfdkfd{height:var(--fui-Slider__thumb--size);}",".fly5x3f{width:100%;}",".f1l02sjl{height:100%;}",".f174ca62{width:var(--fui-Slider__thumb--size);}"],t:["@supports (writing-mode: sideways-lr){.f135tqni{writing-mode:vertical-lr;}}","@supports (writing-mode: sideways-lr){.f114o3fk{direction:rtl;}.f1o9w1zd{direction:ltr;}}","@supports not (writing-mode: sideways-lr){.f1jr0wcp{-webkit-appearance:slider-vertical;}}"]}),U7=e=>{const t=L7(),r=V7(),n=W7(),a=$7(),s=e.vertical;return e.root.className=Q(bl.root,t.root,s?t.focusIndicatorVertical:t.focusIndicatorHorizontal,t[e.size],s?t.vertical:t.horizontal,e.disabled?t.disabled:t.enabled,e.root.className),e.rail.className=Q(bl.rail,r.rail,s?r.vertical:r.horizontal,e.rail.className),e.thumb.className=Q(bl.thumb,n.thumb,s?n.vertical:n.horizontal,e.disabled&&n.disabled,e.thumb.className),e.input.className=Q(bl.input,a.input,s?a.vertical:a.horizontal,e.disabled&&a.disabled,e.input.className),e},yl=y.forwardRef((e,t)=>{const r=q7(e,t);return U7(r),Pe("useSliderStyles_unstable")(r),H7(r)});yl.displayName="Slider";const Ev=y.createContext(void 0),G7={};Ev.Provider;const X7=()=>{var e;return(e=y.useContext(Ev))!==null&&e!==void 0?e:G7},K7=(e,t)=>{const{size:r}=X7(),{appearance:n="primary",size:a=r??"medium",...s}=e,c=Y7(s,t);return{...c,appearance:n,size:a,components:{...c.components,label:Xt},label:Ne(e.label,{defaultProps:c.label,elementType:Xt})}},Y7=(e,t)=>{const{delay:r=0,labelPosition:n="after"}=e,a=pt("spinner"),{role:s="progressbar",...c}=e,u=me(rt("div",{ref:t,role:s,...c}),{elementType:"div"}),[f,p]=y.useState(!1),[g,v]=sn();y.useEffect(()=>{if(!(r<=0))return g(()=>{p(!0)},r),()=>{v()}},[g,v,r]);const x=Ne(e.label,{defaultProps:{id:a},renderByDefault:!1,elementType:"label"}),w=Ne(e.spinner,{renderByDefault:!0,elementType:"span"});return x&&u&&!u["aria-labelledby"]&&(u["aria-labelledby"]=x.id),{delay:r,labelPosition:n,shouldRenderSpinner:!r||f,components:{root:"div",spinner:"span",spinnerTail:"span",label:"label"},root:u,spinner:w,spinnerTail:me(e.spinnerTail,{elementType:"span"}),label:x}},Q7=e=>{const{labelPosition:t,shouldRenderSpinner:r}=e;return Le(e.root,{children:[e.label&&r&&(t==="above"||t==="before")&&J(e.label,{}),e.spinner&&r&&J(e.spinner,{children:e.spinnerTail&&J(e.spinnerTail,{})}),e.label&&r&&(t==="below"||t==="after")&&J(e.label,{})]})},xl={root:"fui-Spinner",spinner:"fui-Spinner__spinner",spinnerTail:"fui-Spinner__spinnerTail",label:"fui-Spinner__label"},Z7=ze("rpp59a7",null,[".rpp59a7{display:flex;align-items:center;justify-content:center;line-height:0;gap:8px;overflow:hidden;min-width:min-content;}"]),J7=le({vertical:{Beiy3e4:"f1vx9l62"}},{d:[".f1vx9l62{flex-direction:column;}"]}),eT=ze("rvgcg50","r15nd2jo",{r:[".rvgcg50{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:rb7n1on;}","@keyframes rb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}",".r15nd2jo{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:r1gx3jof;}","@keyframes r1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"],s:["@media screen and (forced-colors: active){.rvgcg50{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}","@media screen and (prefers-reduced-motion: reduce){.rvgcg50{animation-duration:1.8s;}}","@media screen and (forced-colors: active){.r15nd2jo{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}","@media screen and (prefers-reduced-motion: reduce){.r15nd2jo{animation-duration:1.8s;}}"]}),tT=ze("rxov3xa","r1o544mv",{r:[".rxov3xa{position:absolute;display:block;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r15mim6k;}",'.rxov3xa::before,.rxov3xa::after{content:"";position:absolute;display:block;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}',"@keyframes r15mim6k{0%{transform:rotate(-135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(225deg);}}",".rxov3xa::before{animation-name:r18vhmn8;}","@keyframes r18vhmn8{0%{transform:rotate(0deg);}50%{transform:rotate(105deg);}100%{transform:rotate(0deg);}}",".rxov3xa::after{animation-name:rkgrvoi;}","@keyframes rkgrvoi{0%{transform:rotate(0deg);}50%{transform:rotate(225deg);}100%{transform:rotate(0deg);}}",".r1o544mv{position:absolute;display:block;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r109gmi5;}",'.r1o544mv::before,.r1o544mv::after{content:"";position:absolute;display:block;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}',"@keyframes r109gmi5{0%{transform:rotate(135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(-225deg);}}",".r1o544mv::before{animation-name:r17whflh;}","@keyframes r17whflh{0%{transform:rotate(0deg);}50%{transform:rotate(-105deg);}100%{transform:rotate(0deg);}}",".r1o544mv::after{animation-name:re4odhl;}","@keyframes re4odhl{0%{transform:rotate(0deg);}50%{transform:rotate(-225deg);}100%{transform:rotate(0deg);}}"],s:["@media screen and (prefers-reduced-motion: reduce){.rxov3xa{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.rxov3xa::before,.rxov3xa::after{content:none;}}","@media screen and (prefers-reduced-motion: reduce){.r1o544mv{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.r1o544mv::before,.r1o544mv::after{content:none;}}"]}),rT=le({inverted:{De3pzq:"fr407j0",sj55zd:"f1f7voed"},rtlTail:{btxmck:"f179dep3",gb5jj2:"fbz9ihp",Bdya8wy:"f1pme1qz"},"extra-tiny":{Bqenvij:"fd461yt",a9b677:"fjw5fx7",qmp6fs:"f1v3ph3m"},tiny:{Bqenvij:"fjamq6b",a9b677:"f64fuq3",qmp6fs:"f1v3ph3m"},"extra-small":{Bqenvij:"frvgh55",a9b677:"fq4mcun",qmp6fs:"f1v3ph3m"},small:{Bqenvij:"fxldao9",a9b677:"f1w9dchk",qmp6fs:"f1v3ph3m"},medium:{Bqenvij:"f1d2rq10",a9b677:"f1szoe96",qmp6fs:"fb52u90"},large:{Bqenvij:"f8ljn23",a9b677:"fpdz1er",qmp6fs:"fb52u90"},"extra-large":{Bqenvij:"fbhnoac",a9b677:"feqmc2u",qmp6fs:"fb52u90"},huge:{Bqenvij:"f1ft4266",a9b677:"fksc0bp",qmp6fs:"fa3u9ii"}},{d:[".fr407j0{background-color:var(--colorNeutralStrokeAlpha2);}",".f1f7voed{color:var(--colorNeutralStrokeOnBrand2);}",".f179dep3{-webkit-mask-image:conic-gradient(white 255deg, transparent 255deg);mask-image:conic-gradient(white 255deg, transparent 255deg);}",".fbz9ihp::before,.fbz9ihp::after{background-image:conic-gradient(transparent 225deg, currentcolor 225deg);}",".fd461yt{height:16px;}",".fjw5fx7{width:16px;}",".f1v3ph3m{--fui-Spinner--strokeWidth:var(--strokeWidthThick);}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".fxldao9{height:28px;}",".f1w9dchk{width:28px;}",".f1d2rq10{height:32px;}",".f1szoe96{width:32px;}",".fb52u90{--fui-Spinner--strokeWidth:var(--strokeWidthThicker);}",".f8ljn23{height:36px;}",".fpdz1er{width:36px;}",".fbhnoac{height:40px;}",".feqmc2u{width:40px;}",".f1ft4266{height:44px;}",".fksc0bp{width:44px;}",".fa3u9ii{--fui-Spinner--strokeWidth:var(--strokeWidthThickest);}"],m:[["@media screen and (prefers-reduced-motion: reduce){.f1pme1qz{background-image:conic-gradient(currentcolor 0deg, transparent 240deg);}}",{m:"screen and (prefers-reduced-motion: reduce)"}]]}),oT=le({inverted:{sj55zd:"fonrgv7"},"extra-tiny":{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},tiny:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},"extra-small":{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},small:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},medium:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},"extra-large":{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},huge:{Bahqtrf:"fk6fouc",Be2twd7:"f1pp30po",Bhrd7zp:"fl43uef",Bg96gwp:"f106mvju"}},{d:[".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f1pp30po{font-size:var(--fontSizeBase500);}",".f106mvju{line-height:var(--lineHeightBase500);}"]}),nT=e=>{const{labelPosition:t,size:r,appearance:n}=e,{dir:a}=He(),s=Z7(),c=J7(),u=eT(),f=rT(),p=tT(),g=oT();return e.root.className=Q(xl.root,s,(t==="above"||t==="below")&&c.vertical,e.root.className),e.spinner&&(e.spinner.className=Q(xl.spinner,u,f[r],n==="inverted"&&f.inverted,e.spinner.className)),e.spinnerTail&&(e.spinnerTail.className=Q(xl.spinnerTail,p,a==="rtl"&&f.rtlTail,e.spinnerTail.className)),e.label&&(e.label.className=Q(xl.label,g[r],n==="inverted"&&g.inverted,e.label.className)),e},hr=y.forwardRef((e,t)=>{const r=K7(e,t);return nT(r),Pe("useSpinnerStyles_unstable")(r),Q7(r)});hr.displayName="Spinner";const iT=(e,t)=>{var r;const{size:n="medium",...a}=e,s=aT(a,t);var c;return(c=(r=s.indicator).children)!==null&&c!==void 0||(r.children=y.createElement(im,null)),{...s,components:{...s.components,label:Xt},size:n,label:Ne(e.label,{defaultProps:{size:"medium",...s.label},elementType:Xt})}},aT=(e,t)=>{e=To(e,{supportsLabelFor:!0,supportsRequired:!0});const{checked:r,defaultChecked:n,disabled:a,disabledFocusable:s=!1,labelPosition:c="after",onChange:u,required:f}=e,p=yo({props:e,primarySlotTagName:"input",excludedPropNames:["checked","defaultChecked","onChange","disabledFocusable"]}),g=pt("switch-",p.primary.id),v=me(e.root,{defaultProps:{ref:ua(),...p.root},elementType:"div"}),x=me(e.indicator,{defaultProps:{"aria-hidden":!0},elementType:"div"}),w=me(e.input,{defaultProps:{checked:r,defaultChecked:n,id:g,ref:t,role:"switch",type:"checkbox",...p.primary,disabled:a&&!s,...s&&{"aria-disabled":!0}},elementType:"input"});w.onChange=Re(w.onChange,k=>u?.(k,{checked:k.currentTarget.checked})),w.onClick=Re(w.onClick,k=>{s&&k.preventDefault()}),w.onKeyDown=Re(w.onKeyDown,k=>{s&&(k.key===" "||k.key==="Enter")&&k.preventDefault()});const S=Ne(e.label,{defaultProps:{disabled:a||s,htmlFor:g,required:f},elementType:"label"});return{disabledFocusable:s,labelPosition:c,components:{root:"div",indicator:"div",input:"input",label:"label"},root:v,indicator:x,input:w,label:S}},sT=e=>{const{labelPosition:t}=e;return Le(e.root,{children:[J(e.input,{}),t!=="after"&&e.label&&J(e.label,{}),J(e.indicator,{}),t==="after"&&e.label&&J(e.label,{})]})},wl={root:"fui-Switch",indicator:"fui-Switch__indicator",input:"fui-Switch__input",label:"fui-Switch__label"},lT=ze("r2i81i2","rofhmb8",{r:[".r2i81i2{align-items:flex-start;box-sizing:border-box;display:inline-flex;position:relative;}",".r2i81i2:focus{outline-style:none;}",".r2i81i2:focus-visible{outline-style:none;}",".r2i81i2[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r2i81i2[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".rofhmb8{align-items:flex-start;box-sizing:border-box;display:inline-flex;position:relative;}",".rofhmb8:focus{outline-style:none;}",".rofhmb8:focus-visible{outline-style:none;}",".rofhmb8[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.rofhmb8[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r2i81i2[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media (forced-colors: active){.rofhmb8[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"]}),cT=le({vertical:{Beiy3e4:"f1vx9l62"}},{d:[".f1vx9l62{flex-direction:column;}"]}),uT=ze("r1c3hft5",null,{r:[".r1c3hft5{border-radius:var(--borderRadiusCircular);border:1px solid;line-height:0;box-sizing:border-box;fill:currentColor;flex-shrink:0;font-size:18px;height:20px;margin:var(--spacingVerticalS) var(--spacingHorizontalS);pointer-events:none;transition-duration:var(--durationNormal);transition-timing-function:var(--curveEasyEase);transition-property:background,border,color;width:40px;}",".r1c3hft5>*{transition-duration:var(--durationNormal);transition-timing-function:var(--curveEasyEase);transition-property:transform;}"],s:["@media screen and (prefers-reduced-motion: reduce){.r1c3hft5{transition-duration:0.01ms;}}","@media (forced-colors: active){.r1c3hft5{color:CanvasText;}.r1c3hft5>i{forced-color-adjust:none;}}","@media screen and (prefers-reduced-motion: reduce){.r1c3hft5>*{transition-duration:0.01ms;}}"]}),dT=le({labelAbove:{B6of3ja:"f1hu3pq6"},sizeSmall:{Be2twd7:"fses1vf",Bqenvij:"fd461yt",a9b677:"f1szoe96"}},{d:[".f1hu3pq6{margin-top:0;}",".fses1vf{font-size:14px;}",".fd461yt{height:16px;}",".f1szoe96{width:32px;}"]}),fT=ze("r12ojtgy","rhc0e9x",{r:[".r12ojtgy{box-sizing:border-box;cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(40px + 2 * var(--spacingHorizontalS));}",".r12ojtgy:checked~.fui-Switch__indicator>*{transform:translateX(20px);}",'.r12ojtgy:disabled,.r12ojtgy[aria-disabled="true"]{cursor:default;}','.r12ojtgy:disabled~.fui-Switch__indicator,.r12ojtgy[aria-disabled="true"]~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}','.r12ojtgy:disabled~.fui-Switch__label,.r12ojtgy[aria-disabled="true"]~.fui-Switch__label{cursor:default;color:var(--colorNeutralForegroundDisabled);}','.r12ojtgy:enabled:not(:checked):not([aria-disabled="true"])~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);border-color:var(--colorNeutralStrokeAccessible);}','.r12ojtgy:enabled:not(:checked):not([aria-disabled="true"])~.fui-Switch__label{color:var(--colorNeutralForeground1);}','.r12ojtgy:enabled:not(:checked):not([aria-disabled="true"]):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);border-color:var(--colorNeutralStrokeAccessibleHover);}','.r12ojtgy:enabled:not(:checked):not([aria-disabled="true"]):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);border-color:var(--colorNeutralStrokeAccessiblePressed);}','.r12ojtgy:enabled:checked:not([aria-disabled="true"])~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackground);color:var(--colorNeutralForegroundInverted);border-color:var(--colorTransparentStroke);}','.r12ojtgy:enabled:checked:not([aria-disabled="true"]):hover~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundHover);border-color:var(--colorTransparentStrokeInteractive);}','.r12ojtgy:enabled:checked:not([aria-disabled="true"]):hover:active~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);border-color:var(--colorTransparentStrokeInteractive);}','.r12ojtgy:disabled:not(:checked)~.fui-Switch__indicator,.r12ojtgy[aria-disabled="true"]:not(:checked)~.fui-Switch__indicator{border-color:var(--colorNeutralStrokeDisabled);}','.r12ojtgy:disabled:checked~.fui-Switch__indicator,.r12ojtgy[aria-disabled="true"]:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);border-color:var(--colorTransparentStrokeDisabled);}',".rhc0e9x{box-sizing:border-box;cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(40px + 2 * var(--spacingHorizontalS));}",".rhc0e9x:checked~.fui-Switch__indicator>*{transform:translateX(-20px);}",'.rhc0e9x:disabled,.rhc0e9x[aria-disabled="true"]{cursor:default;}','.rhc0e9x:disabled~.fui-Switch__indicator,.rhc0e9x[aria-disabled="true"]~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}','.rhc0e9x:disabled~.fui-Switch__label,.rhc0e9x[aria-disabled="true"]~.fui-Switch__label{cursor:default;color:var(--colorNeutralForegroundDisabled);}','.rhc0e9x:enabled:not(:checked):not([aria-disabled="true"])~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);border-color:var(--colorNeutralStrokeAccessible);}','.rhc0e9x:enabled:not(:checked):not([aria-disabled="true"])~.fui-Switch__label{color:var(--colorNeutralForeground1);}','.rhc0e9x:enabled:not(:checked):not([aria-disabled="true"]):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);border-color:var(--colorNeutralStrokeAccessibleHover);}','.rhc0e9x:enabled:not(:checked):not([aria-disabled="true"]):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);border-color:var(--colorNeutralStrokeAccessiblePressed);}','.rhc0e9x:enabled:checked:not([aria-disabled="true"])~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackground);color:var(--colorNeutralForegroundInverted);border-color:var(--colorTransparentStroke);}','.rhc0e9x:enabled:checked:not([aria-disabled="true"]):hover~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundHover);border-color:var(--colorTransparentStrokeInteractive);}','.rhc0e9x:enabled:checked:not([aria-disabled="true"]):hover:active~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);border-color:var(--colorTransparentStrokeInteractive);}','.rhc0e9x:disabled:not(:checked)~.fui-Switch__indicator,.rhc0e9x[aria-disabled="true"]:not(:checked)~.fui-Switch__indicator{border-color:var(--colorNeutralStrokeDisabled);}','.rhc0e9x:disabled:checked~.fui-Switch__indicator,.rhc0e9x[aria-disabled="true"]:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);border-color:var(--colorTransparentStrokeDisabled);}'],s:['@media (forced-colors: active){.r12ojtgy:disabled~.fui-Switch__indicator,.r12ojtgy[aria-disabled="true"]~.fui-Switch__indicator{color:GrayText;border-color:GrayText;}.r12ojtgy:disabled~.fui-Switch__label,.r12ojtgy[aria-disabled="true"]~.fui-Switch__label{color:GrayText;}.r12ojtgy:hover{color:CanvasText;}.r12ojtgy:hover:active{color:CanvasText;}.r12ojtgy:enabled:checked:not([aria-disabled="true"]):hover~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}.r12ojtgy:enabled:checked:not([aria-disabled="true"]):hover:active~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}.r12ojtgy:enabled:checked:not([aria-disabled="true"])~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}}','@media (forced-colors: active){.rhc0e9x:disabled~.fui-Switch__indicator,.rhc0e9x[aria-disabled="true"]~.fui-Switch__indicator{color:GrayText;border-color:GrayText;}.rhc0e9x:disabled~.fui-Switch__label,.rhc0e9x[aria-disabled="true"]~.fui-Switch__label{color:GrayText;}.rhc0e9x:hover{color:CanvasText;}.rhc0e9x:hover:active{color:CanvasText;}.rhc0e9x:enabled:checked:not([aria-disabled="true"]):hover~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}.rhc0e9x:enabled:checked:not([aria-disabled="true"]):hover:active~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}.rhc0e9x:enabled:checked:not([aria-disabled="true"])~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}}']}),pT=le({before:{j35jbq:["f1e31b4d","f1vgc2s3"],Bhzewxz:"f15twtuk"},after:{oyh7mz:["f1vgc2s3","f1e31b4d"],Bhzewxz:"f15twtuk"},above:{B5kzvoi:"f1yab3r1",Bqenvij:"f1aar7gd",a9b677:"fly5x3f"},sizeSmall:{a9b677:"f83td6f",oedwrj:["f1t5zc5r","fmy58zi"]}},{d:[".f1e31b4d{right:0;}",".f1vgc2s3{left:0;}",".f15twtuk{top:0;}",".f1yab3r1{bottom:0;}",".f1aar7gd{height:calc(20px + var(--spacingVerticalS));}",".fly5x3f{width:100%;}",".f83td6f{width:calc(32px + 2 * var(--spacingHorizontalS));}",".f1t5zc5r:checked~.fui-Switch__indicator>*{transform:translateX(16px);}",".fmy58zi:checked~.fui-Switch__indicator>*{transform:translateX(-16px);}"]}),hT=le({base:{Bceei9c:"f1k6fduh",jrapky:"f49ad5g",B6of3ja:"f1xlvstr",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1f5q0n8"},sizeSmall:{Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm",jrapky:"f1suqah5",B6of3ja:"f26bnac"},above:{z8tnut:"f1ywm7hm",Byoj8tv:"f14wxoun",a9b677:"fly5x3f"},after:{uwmqm3:["fruq291","f7x41pl"]},before:{z189sj:["f7x41pl","fruq291"]}},{d:[".f1k6fduh{cursor:pointer;}",".f49ad5g{margin-bottom:calc((20px - var(--lineHeightBase300)) / 2);}",".f1xlvstr{margin-top:calc((20px - var(--lineHeightBase300)) / 2);}",[".f1f5q0n8{padding:var(--spacingVerticalS) var(--spacingHorizontalS);}",{p:-1}],".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1suqah5{margin-bottom:calc((16px - var(--lineHeightBase200)) / 2);}",".f26bnac{margin-top:calc((16px - var(--lineHeightBase200)) / 2);}",".f1ywm7hm{padding-top:var(--spacingVerticalXS);}",".f14wxoun{padding-bottom:var(--spacingVerticalXS);}",".fly5x3f{width:100%;}",".fruq291{padding-left:var(--spacingHorizontalXS);}",".f7x41pl{padding-right:var(--spacingHorizontalXS);}"]}),gT=e=>{const t=lT(),r=cT(),n=uT(),a=dT(),s=fT(),c=pT(),u=hT(),{label:f,labelPosition:p,size:g}=e;return e.root.className=Q(wl.root,t,p==="above"&&r.vertical,e.root.className),e.indicator.className=Q(wl.indicator,n,f&&p==="above"&&a.labelAbove,g==="small"&&a.sizeSmall,e.indicator.className),e.input.className=Q(wl.input,s,f&&c[p],g==="small"&&c.sizeSmall,e.input.className),e.label&&(e.label.className=Q(wl.label,u.base,u[p],g==="small"&&u.sizeSmall,e.label.className)),e},Ro=y.forwardRef((e,t)=>{const r=iT(e,t);return gT(r),Pe("useSwitchStyles_unstable")(r),sT(r)});Ro.displayName="Switch";const mT=(e,t)=>{const{appearance:r="transparent",reserveSelectedTabSpace:n=!0,size:a="medium"}=e,s=vT(e,t),c=bT({vertical:s.vertical});return{...s,root:{...c,...s.root},appearance:r,reserveSelectedTabSpace:n,size:a}},vT=(e,t)=>{const{disabled:r=!1,onTabSelect:n,selectTabOnFocus:a=!1,vertical:s=!1,selectedValue:c,defaultSelectedValue:u,...f}=e,p=y.useRef(null),[g,v]=Bt({state:c,defaultState:u,initialState:void 0}),x=y.useRef(void 0),w=y.useRef(void 0);y.useEffect(()=>{w.current=x.current,x.current=g},[g]);const S=ce((j,N)=>{v(N.value),n?.(j,N)}),k=y.useRef({}),B=ce(j=>{const N=JSON.stringify(j.value);k.current[N]=j}),z=ce(j=>{delete k.current[JSON.stringify(j.value)]}),P=y.useCallback(()=>({selectedValue:x.current,previousSelectedValue:w.current,registeredTabs:k.current}),[]);return{components:{root:"div"},root:me({ref:Oe(t,p),role:"tablist","aria-orientation":s?"vertical":"horizontal",...f},{elementType:"div"}),disabled:r,selectTabOnFocus:a,selectedValue:g,onRegister:B,onUnregister:z,onSelect:S,getRegisteredTabs:P,vertical:s}},bT=({vertical:e})=>Ls({circular:!0,axis:e?"vertical":"horizontal",memorizeCurrent:!1,unstable_hasDefault:!0}),yT={appearance:"transparent",reserveSelectedTabSpace:!0,selectTabOnFocus:!1,disabled:!1,selectedValue:void 0,onRegister:()=>{},onUnregister:()=>{},onSelect:()=>{},getRegisteredTabs:()=>({registeredTabs:{}}),size:"medium",vertical:!1},Iv=Lr(void 0),xT=Iv.Provider,Cr=e=>eo(Iv,(t=yT)=>e(t)),wT=(e,t)=>J(e.root,{children:J(xT,{value:t.tabList,children:e.root.children})}),kT={root:"fui-TabList"},ST=le({root:{mc9l5x:"f22iagw",Beiy3e4:"f1063pyq",Bnnss6s:"fi64zpg",Eh141a:"flvyvdh",qhf8xq:"f10pi13n"},horizontal:{Bt984gj:"f1q9h2pe",Beiy3e4:"f1063pyq"},vertical:{Bt984gj:"f1q9h2pe",Beiy3e4:"f1vx9l62"},roundedSmall:{i8kkvl:0,Belr9w4:0,rmohyg:"f1eyhf9v"},rounded:{i8kkvl:0,Belr9w4:0,rmohyg:"faqewft"}},{d:[".f22iagw{display:flex;}",".f1063pyq{flex-direction:row;}",".fi64zpg{flex-shrink:0;}",".flvyvdh{flex-wrap:nowrap;}",".f10pi13n{position:relative;}",".f1q9h2pe{align-items:stretch;}",".f1vx9l62{flex-direction:column;}",[".f1eyhf9v{gap:var(--spacingHorizontalSNudge);}",{p:-1}],[".faqewft{gap:var(--spacingHorizontalS);}",{p:-1}]]}),BT=e=>{const{appearance:t,vertical:r,size:n}=e,a=ST(),s=t==="subtle-circular"||t==="filled-circular";return e.root.className=Q(kT.root,a.root,r?a.vertical:a.horizontal,s&&(n==="small"?a.roundedSmall:a.rounded),e.root.className),e};function zT(e){const{appearance:t,reserveSelectedTabSpace:r,disabled:n,selectTabOnFocus:a,selectedValue:s,onRegister:c,onUnregister:u,onSelect:f,getRegisteredTabs:p,size:g,vertical:v}=e;return{tabList:y.useMemo(()=>({appearance:t,reserveSelectedTabSpace:r,disabled:n,selectTabOnFocus:a,selectedValue:s,onSelect:f,onRegister:c,onUnregister:u,getRegisteredTabs:p,size:g,vertical:v}),[t,r,n,a,s,f,c,u,p,g,v])}}const Fv=y.forwardRef((e,t)=>{const r=mT(e,t),n=zT(r);return BT(r),Pe("useTabListStyles_unstable")(r),wT(r,n)});Fv.displayName="TabList";const jT=(e,t)=>{const{content:r}=e,n=_T(e,t),a=CT(n),s=Cr(p=>p.appearance),c=Cr(p=>p.reserveSelectedTabSpace),u=Cr(p=>{var g;return(g=p.size)!==null&&g!==void 0?g:"medium"}),f=r&&typeof r=="object"?X2(r,["ref"]):r;return{...n,components:{...n.components,contentReservedSpace:"span"},root:{...a,...n.root},contentReservedSpace:Ne(f,{renderByDefault:!n.selected&&!n.iconOnly&&c,defaultProps:{children:e.children},elementType:"span"}),appearance:s,size:u}},_T=(e,t)=>{const{content:r,disabled:n=!1,icon:a,onClick:s,onFocus:c,value:u,...f}=e,p=Cr(A=>A.selectTabOnFocus),g=Cr(A=>A.disabled),v=Cr(A=>A.selectedValue===u),x=Cr(A=>A.onRegister),w=Cr(A=>A.onUnregister),S=Cr(A=>A.onSelect),k=Cr(A=>!!A.vertical),B=g||n,z=y.useRef(null),P=A=>S(A,{value:u}),j=ce(Re(s,P)),N=ce(Re(c,P));y.useEffect(()=>(x({value:u,ref:z}),()=>{w({value:u,ref:z})}),[x,w,z,u]);const M=Ne(a,{elementType:"span"}),C=me(r,{defaultProps:{children:e.children},elementType:"span"}),I=!!(M?.children&&!C.children);return{components:{root:"button",icon:"span",content:"span",contentReservedSpace:"span"},root:me({ref:Oe(t,z),role:"tab",type:"button","aria-selected":B?void 0:`${v}`,value:u,...f,disabled:B,onClick:j,onFocus:p?N:c},{elementType:"button"}),icon:M,iconOnly:I,content:C,disabled:B,selected:v,value:u,vertical:k}},CT=({selected:e})=>dn({focusable:{isDefault:e}}),NT=e=>Le(e.root,{children:[e.icon&&J(e.icon,{}),!e.iconOnly&&J(e.content,{}),e.contentReservedSpace&&J(e.contentReservedSpace,{})]}),Av={offsetVar:"--fui-Tab__indicator--offset",scaleVar:"--fui-Tab__indicator--scale"},TT=le({base:{B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1gl81tg"},animated:{Ba2ppi3:"fhwpy7i",F2fol1:"f6zz20j",B1dyfl9:"f1ai4sc1",Bu93a1u:"f1rnm8gg",Bdasjez:"f1x3cmqg"},horizontal:{sjv3b2:["fug4aj8","f1i5xzg7"],b1kco5:"f1q7ujh"},vertical:{sjv3b2:"f1hqboyk",b1kco5:"f1dxupa6"}},{d:[[".f1gl81tg{overflow:visible;}",{p:-1}],".fhwpy7i::after{transition-property:transform;}",".f6zz20j::after{transition-duration:var(--durationSlow);}",".f1ai4sc1::after{transition-timing-function:var(--curveDecelerateMax);}",".fug4aj8::after{transform-origin:left;}",".f1i5xzg7::after{transform-origin:right;}",".f1q7ujh::after{transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}",".f1hqboyk::after{transform-origin:top;}",".f1dxupa6::after{transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}"],m:[["@media (prefers-reduced-motion: reduce){.f1rnm8gg::after{transition-property:none;}}",{m:"(prefers-reduced-motion: reduce)"}],["@media (prefers-reduced-motion: reduce){.f1x3cmqg::after{transition-duration:0.01ms;}}",{m:"(prefers-reduced-motion: reduce)"}]]}),PT=e=>{if(e){var t;const r=((t=e.parentElement)===null||t===void 0?void 0:t.getBoundingClientRect())||{x:0,y:0},n=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}},Dv=(e,t)=>{var r;const n=Ed(t)?(r=e[JSON.stringify(t)])===null||r===void 0?void 0:r.ref.current:void 0;return n?PT(n):void 0},Ed=e=>e!=null,RT=e=>{const{disabled:t,selected:r,vertical:n}=e,a=TT(),[s,c]=y.useState(),[u,f]=y.useState({offset:0,scale:1}),p=Cr(w=>w.getRegisteredTabs),[g]=zh();if(r){const{previousSelectedValue:w,selectedValue:S,registeredTabs:k}=p();if(Ed(w)&&s!==w){const B=Dv(k,w),z=Dv(k,S);if(z&&B){const P=n?B.y-z.y:B.x-z.x,j=n?B.height/z.height:B.width/z.width;f({offset:P,scale:j}),c(w),g(()=>f({offset:0,scale:1}))}}}else Ed(s)&&c(void 0);if(t)return e;const v=u.offset===0&&u.scale===1;e.root.className=Q(e.root.className,r&&a.base,r&&v&&a.animated,r&&(n?a.vertical:a.horizontal));const x={[Av.offsetVar]:`${u.offset}px`,[Av.scaleVar]:`${u.scale}`};return e.root.style={...x,...e.root.style},e},Id={root:"fui-Tab",icon:"fui-Tab__icon",content:"fui-Tab__content"},MT={content:"fui-Tab__content--reserved-space"},qv=le({root:{Bt984gj:"f122n59",mc9l5x:"f13qh94s",Bnnss6s:"fi64zpg",Bxotwcr:"f1u07yai",Budl1dq:"frn2hmy",wkccdc:"f1olsevy",oeaueh:"f1s6fcnf",qhf8xq:"f10pi13n"},button:{Bt984gj:"f122n59",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f3bhgqh",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",Bceei9c:"f1k6fduh",mc9l5x:"f13qh94s",Bnnss6s:"fi64zpg",Bxotwcr:"f1u07yai",Budl1dq:"frn2hmy",wkccdc:"f1olsevy",Bahqtrf:"fk6fouc",Bg96gwp:"f1i3iumi",oeaueh:"f1s6fcnf",qhf8xq:"f10pi13n",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",B9bfxx9:"f1cxpek8"},horizontal:{Brf1p80:"f4d9j23"},vertical:{Brf1p80:"f1s9ku6b"},smallHorizontal:{i8kkvl:"f14mj54c",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1wmopi4"},smallVertical:{i8kkvl:"f14mj54c",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f12or63q"},mediumHorizontal:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1w08f2p"},mediumVertical:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fymxs25"},largeHorizontal:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1ssfvub"},largeVertical:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fwkd1rq"},transparent:{De3pzq:"f1c21dwh",B95qlz1:"f9rvdkv",B7xitij:"f1051ucx",Bptxc3x:"fmmjozx",Bwqhzpy:"fqhzt5g",iyk698:"f7l5cgy",cl4aha:"fpkze5g",B0q3jbp:"f1iywnoi",Be9ayug:"f9n45c4"},subtle:{De3pzq:"fhovq9v",B95qlz1:"f1bifk9c",B7xitij:"fo6hitd",Bptxc3x:"fmmjozx",Bwqhzpy:"fqhzt5g",iyk698:"f7l5cgy",cl4aha:"fpkze5g",B0q3jbp:"f1iywnoi",Be9ayug:"f9n45c4"},disabledCursor:{Bceei9c:"fdrzuqr"},disabled:{De3pzq:"f1c21dwh",Bptxc3x:"fato7r6",cl4aha:"fao1bnu"},selected:{Bptxc3x:"f1cadz5z",Bwqhzpy:"fwhdxxj",iyk698:"fintccb",cl4aha:"ffplhdr",B0q3jbp:"fjo17wb",Be9ayug:"f148789c"}},{d:[".f122n59{align-items:center;}",".f13qh94s{display:grid;}",".fi64zpg{flex-shrink:0;}",".f1u07yai{grid-auto-flow:column;}",".frn2hmy{grid-template-columns:auto;}",".f1olsevy{grid-template-rows:auto;}",".f1s6fcnf{outline-style:none;}",".f10pi13n{position:relative;}",[".f3bhgqh{border:none;}",{p:-2}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f1k6fduh{cursor:pointer;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],".f1cxpek8{text-transform:none;}",".f4d9j23{justify-content:center;}",".f1s9ku6b{justify-content:start;}",".f14mj54c{column-gap:var(--spacingHorizontalXXS);}",[".f1wmopi4{padding:var(--spacingVerticalSNudge) var(--spacingHorizontalSNudge);}",{p:-1}],[".f12or63q{padding:var(--spacingVerticalXXS) var(--spacingHorizontalSNudge);}",{p:-1}],".f1rjii52{column-gap:var(--spacingHorizontalSNudge);}",[".f1w08f2p{padding:var(--spacingVerticalM) var(--spacingHorizontalMNudge);}",{p:-1}],[".fymxs25{padding:var(--spacingVerticalSNudge) var(--spacingHorizontalMNudge);}",{p:-1}],[".f1ssfvub{padding:var(--spacingVerticalL) var(--spacingHorizontalMNudge);}",{p:-1}],[".fwkd1rq{padding:var(--spacingVerticalS) var(--spacingHorizontalMNudge);}",{p:-1}],".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f9rvdkv:enabled:hover{background-color:var(--colorTransparentBackgroundHover);}",".f1051ucx:enabled:active{background-color:var(--colorTransparentBackgroundPressed);}",".fmmjozx .fui-Tab__icon{color:var(--colorNeutralForeground2);}",".fqhzt5g:enabled:hover .fui-Tab__icon{color:var(--colorNeutralForeground2Hover);}",".f7l5cgy:enabled:active .fui-Tab__icon{color:var(--colorNeutralForeground2Pressed);}",".fpkze5g .fui-Tab__content{color:var(--colorNeutralForeground2);}",".f1iywnoi:enabled:hover .fui-Tab__content{color:var(--colorNeutralForeground2Hover);}",".f9n45c4:enabled:active .fui-Tab__content{color:var(--colorNeutralForeground2Pressed);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}",".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}",".fdrzuqr{cursor:not-allowed;}",".fato7r6 .fui-Tab__icon{color:var(--colorNeutralForegroundDisabled);}",".fao1bnu .fui-Tab__content{color:var(--colorNeutralForegroundDisabled);}",".f1cadz5z .fui-Tab__icon{color:var(--colorCompoundBrandForeground1);}",".fwhdxxj:enabled:hover .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Hover);}",".fintccb:enabled:active .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Pressed);}",".ffplhdr .fui-Tab__content{color:var(--colorNeutralForeground1);}",".fjo17wb:enabled:hover .fui-Tab__content{color:var(--colorNeutralForeground1Hover);}",".f148789c:enabled:active .fui-Tab__content{color:var(--colorNeutralForeground1Pressed);}"]}),ET=le({base:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fp7rvkm",Bptxc3x:"ftorr8m",cl4aha:"f16lqpmv"},small:{Dbcxam:0,rjzwhg:0,Bblux5w:"fzklhed"},medium:{Dbcxam:0,rjzwhg:0,Bblux5w:"f1j721cc"},large:{Dbcxam:0,rjzwhg:0,Bblux5w:"frx9knr"},subtle:{De3pzq:"fhovq9v",sj55zd:"fkfq4zb",B95qlz1:"f1bifk9c",Eo63ln:0,r9osk6:0,Itrz8y:0,zeg6vx:0,l65xgk:0,Bw4olcx:0,Folb0i:0,I2h8y4:0,Bgxgoyi:0,Bvlkotb:0,Fwyncl:0,Byh5edv:0,Becqvjq:0,uumbiq:0,B73q3dg:0,Bblwbaf:0,B0ezav:"ft57sj0",r4wkhp:"f1fcoy83",B7xitij:"fo6hitd",d3wsvi:0,Hdqn7s:0,zu5y1p:0,owqphb:0,g9c53k:0,Btmu08z:0,Bthxvy6:0,gluvuq:0,tb88gp:0,wns6jk:0,kdfdk4:0,Bbw008l:0,Bayi1ib:0,B1kkfu3:0,J1oqyp:0,kem6az:0,goa3yj:"fhn220o",p743kt:"f15qf7sh",wmvzou:0,sc4o1m:0,wymq9i:0,u9orzk:0,puiv5t:0,Bosien3:0,b2z72d:0,Beulxaw:0,B57pkaw:0,Jcjdmf:0,B8qgbzl:0,Bbmb0sr:0,B14q8qp:0,Bcq6wej:0,Byz1pjr:0,kr9cjb:0,Ff9ifp:"f1mljprk"},subtleSelected:{De3pzq:"f16xkysk",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1c2pc3t",sj55zd:"faj9fo0",B95qlz1:"fsm7zmf",Eo63ln:0,r9osk6:0,Itrz8y:0,zeg6vx:0,l65xgk:0,Bw4olcx:0,Folb0i:0,I2h8y4:0,Bgxgoyi:0,Bvlkotb:0,Fwyncl:0,Byh5edv:0,Becqvjq:0,uumbiq:0,B73q3dg:0,Bblwbaf:0,B0ezav:"f1wo0sfq",r4wkhp:"f1afuynh",B7xitij:"f94ddyl",d3wsvi:0,Hdqn7s:0,zu5y1p:0,owqphb:0,g9c53k:0,Btmu08z:0,Bthxvy6:0,gluvuq:0,tb88gp:0,wns6jk:0,kdfdk4:0,Bbw008l:0,Bayi1ib:0,B1kkfu3:0,J1oqyp:0,kem6az:0,goa3yj:"fmle6oo",p743kt:"f1d3itm4",wmvzou:0,sc4o1m:0,wymq9i:0,u9orzk:0,puiv5t:0,Bosien3:0,b2z72d:0,Beulxaw:0,B57pkaw:0,Jcjdmf:0,B8qgbzl:0,Bbmb0sr:0,B14q8qp:0,Bcq6wej:0,Byz1pjr:0,kr9cjb:0,Ff9ifp:"f1e9l2u"},subtleDisabled:{De3pzq:"fhovq9v",sj55zd:"f1s2aq7o"},subtleDisabledSelected:{De3pzq:"f1bg9a2p",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fegtqic",sj55zd:"f1s2aq7o"},filled:{De3pzq:"f16xq7d1",sj55zd:"fkfq4zb",B95qlz1:"fwwxidx",r4wkhp:"f1fcoy83",B7xitij:"f14i52sd",p743kt:"f15qf7sh",Hhssn:"f1cpi5f4",uaurb9:"f6pj1s0",B401qx7:"f12sz5kj",Buyp1jb:"f17588c3",gsp74p:"fnthgdt"},filledSelected:{De3pzq:"ffp7eso",sj55zd:"f1phragk",B95qlz1:"f1lm9dni",r4wkhp:"f1mn5ei1",B7xitij:"f1g6ncd0",p743kt:"fl71aob",Gedr8k:"f14zl92z",Bm69vlq:"f16zy3eu",Bodipah:"f1gdgb7p",B5kpen0:"f1tua9ng"},filledDisabled:{De3pzq:"f1bg9a2p",sj55zd:"f1s2aq7o"},filledDisabledSelected:{De3pzq:"f1bg9a2p",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fegtqic",sj55zd:"f1s2aq7o"}},{d:[[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".fp7rvkm{border:solid var(--strokeWidthThin) var(--colorTransparentStroke);}",{p:-2}],".ftorr8m .fui-Tab__icon{color:inherit;}",".f16lqpmv .fui-Tab__content{color:inherit;}",[".fzklhed{padding-block:calc(var(--spacingVerticalXXS) - var(--strokeWidthThin));}",{p:-1}],[".f1j721cc{padding-block:calc(var(--spacingVerticalSNudge) - var(--strokeWidthThin));}",{p:-1}],[".frx9knr{padding-block:calc(var(--spacingVerticalS) - var(--strokeWidthThin));}",{p:-1}],".fhovq9v{background-color:var(--colorSubtleBackground);}",".fkfq4zb{color:var(--colorNeutralForeground2);}",".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}",[".ft57sj0:enabled:hover{border:solid var(--strokeWidthThin) var(--colorNeutralStroke1Hover);}",{p:-2}],".f1fcoy83:enabled:hover{color:var(--colorNeutralForeground2Hover);}",".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}",[".fhn220o:enabled:active{border:solid var(--strokeWidthThin) var(--colorNeutralStroke1Pressed);}",{p:-2}],".f15qf7sh:enabled:active{color:var(--colorNeutralForeground2Pressed);}",".f16xkysk{background-color:var(--colorBrandBackground2);}",[".f1c2pc3t{border:solid var(--strokeWidthThin) var(--colorCompoundBrandStroke);}",{p:-2}],".faj9fo0{color:var(--colorBrandForeground2);}",".fsm7zmf:enabled:hover{background-color:var(--colorBrandBackground2Hover);}",[".f1wo0sfq:enabled:hover{border:solid var(--strokeWidthThin) var(--colorCompoundBrandStrokeHover);}",{p:-2}],".f1afuynh:enabled:hover{color:var(--colorBrandForeground2Hover);}",".f94ddyl:enabled:active{background-color:var(--colorBrandBackground2Pressed);}",[".fmle6oo:enabled:active{border:solid var(--strokeWidthThin) var(--colorCompoundBrandStrokePressed);}",{p:-2}],".f1d3itm4:enabled:active{color:var(--colorBrandForeground2Pressed);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}",[".fegtqic{border:solid var(--strokeWidthThin) var(--colorNeutralStrokeDisabled);}",{p:-2}],".f16xq7d1{background-color:var(--colorNeutralBackground3);}",".fwwxidx:enabled:hover{background-color:var(--colorNeutralBackground3Hover);}",".f14i52sd:enabled:active{background-color:var(--colorNeutralBackground3Pressed);}",".ffp7eso{background-color:var(--colorBrandBackground);}",".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",".f1lm9dni:enabled:hover{background-color:var(--colorBrandBackgroundHover);}",".f1mn5ei1:enabled:hover{color:var(--colorNeutralForegroundOnBrand);}",".f1g6ncd0:enabled:active{background-color:var(--colorBrandBackgroundPressed);}",".fl71aob:enabled:active{color:var(--colorNeutralForegroundOnBrand);}",[".fegtqic{border:solid var(--strokeWidthThin) var(--colorNeutralStrokeDisabled);}",{p:-2}]],m:[["@media (forced-colors: active){.f1mljprk{border:solid var(--strokeWidthThin) Canvas;}}",{p:-2,m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1e9l2u{border:solid var(--strokeWidthThin) Highlight;}}",{p:-2,m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cpi5f4:enabled:hover{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f6pj1s0:enabled:hover{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f12sz5kj:enabled:hover .fui-Tab__content{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f17588c3:enabled:hover .fui-Icon-filled{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fnthgdt:enabled:hover .fui-Icon-regular{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14zl92z:enabled{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f16zy3eu:enabled .fui-Tab__content{color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1gdgb7p:enabled .fui-Tab__content{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1tua9ng:enabled .fui-Tab__icon{color:ButtonFace;}}",{m:"(forced-colors: active)"}]]}),IT=le({base:{B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bn4voq9:"f1p7hgxw",Bfpq7zp:"f1way5bb",g9k6zt:"f9znhxp",j6ew2k:["fqa318h","fqa318h"],Bhxq17a:"f1vjpng2"},circular:{B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bn4voq9:"f1p7hgxw",Bfpq7zp:"f1way5bb",g9k6zt:"f9znhxp",j6ew2k:["fzgyhws","fqxug60"],Bhxq17a:"f1vjpng2"}},{d:[".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",".f1p7hgxw[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);}",".f1way5bb[data-fui-focus-visible]{outline-color:transparent;}",".f9znhxp[data-fui-focus-visible]{outline-style:solid;}",".fqa318h[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);}",".f1vjpng2[data-fui-focus-visible]{z-index:1;}",".fzgyhws[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2),0 0 0 var(--strokeWidthThin) var(--colorNeutralStrokeOnBrand) inset;}",".fqxug60[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2),0 0 0 var(--strokeWidthThin) var(--colorNeutralStrokeOnBrand) inset;}"]}),FT=le({base:{az7l2e:"fhw179n",vqofr:0,Bv4n3vi:0,Bgqb9hq:0,B0uxbk8:0,Bf3jju6:"fg9j5n4",amg5m6:"f1kmhr4c",zkfqfm:"fl1ydde",Bkydozb:"f1y7maxz",Bka2azo:0,vzq8l0:0,csmgbd:0,Br4ovkg:0,aelrif:"fceyvr4",y36c18:"f16cxu0",B1ctymy:"f1nwgacf",xzc5d:"fm6alxz",h5yqg8:"fhx32z1"},disabled:{az7l2e:"f1ut20fw",Bkydozb:"fhrzcfn",xzc5d:"fw15awd",h5yqg8:"faqmq51"},smallHorizontal:{lawp4y:"fchca7p",Baz25je:"f1r53b5e",Fbdkly:["f1s6rxz5","fo35v8s"],mdwyqc:["fo35v8s","f1s6rxz5"]},smallVertical:{lawp4y:"fze4zud",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"fdp32p8",Ccq8qp:"f1aij3q"},mediumHorizontal:{lawp4y:"fchca7p",Baz25je:"f1s2r9ax",Fbdkly:["f1o0nnkk","fxb7rol"],mdwyqc:["fxb7rol","f1o0nnkk"]},mediumVertical:{lawp4y:"f17jracn",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"f117lcb2",Ccq8qp:"f1aij3q"},largeHorizontal:{lawp4y:"fchca7p",Baz25je:"f1s2r9ax",Fbdkly:["f1o0nnkk","fxb7rol"],mdwyqc:["fxb7rol","f1o0nnkk"]},largeVertical:{lawp4y:"fel9d3z",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"f6vqlre",Ccq8qp:"f1aij3q"}},{h:[".fhw179n:hover::before{background-color:var(--colorNeutralStroke1Hover);}",[".fg9j5n4:hover::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],'.f1kmhr4c:hover::before{content:"";}',".fl1ydde:hover::before{position:absolute;}",".f1ut20fw:hover::before{background-color:var(--colorTransparentStroke);}"],a:[".f1y7maxz:active::before{background-color:var(--colorNeutralStroke1Pressed);}",[".fceyvr4:active::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],'.f16cxu0:active::before{content:"";}',".f1nwgacf:active::before{position:absolute;}",".fhrzcfn:active::before{background-color:var(--colorTransparentStroke);}"],m:[["@media (forced-colors: active){.fm6alxz:hover::before{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fhx32z1:active::before{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fw15awd:hover::before{background-color:transparent;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.faqmq51:active::before{background-color:transparent;}}",{m:"(forced-colors: active)"}]],d:[".fchca7p::before{bottom:0;}",".f1r53b5e::before{height:var(--strokeWidthThick);}",".f1s6rxz5::before{left:var(--spacingHorizontalSNudge);}",".fo35v8s::before{right:var(--spacingHorizontalSNudge);}",".fze4zud::before{bottom:var(--spacingVerticalXS);}",".f1fzr1x6::before{left:0;}",".f1f351id::before{right:0;}",".fdp32p8::before{top:var(--spacingVerticalXS);}",".f1aij3q::before{width:var(--strokeWidthThicker);}",".f1s2r9ax::before{height:var(--strokeWidthThicker);}",".f1o0nnkk::before{left:var(--spacingHorizontalM);}",".fxb7rol::before{right:var(--spacingHorizontalM);}",".f17jracn::before{bottom:var(--spacingVerticalS);}",".f117lcb2::before{top:var(--spacingVerticalS);}",".fel9d3z::before{bottom:var(--spacingVerticalMNudge);}",".f6vqlre::before{top:var(--spacingVerticalMNudge);}"]}),AT=le({base:{Bjyk6c5:"f1rp0jgh",d9w3h3:0,B3778ie:0,B4j8arr:0,Bl18szs:0,Blrzh8d:"f3b9emi",Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9"},selected:{Bjyk6c5:"f1ksivud",Bej4dhw:"f1476jrx",B7wqxwa:"f18q216b",Hwb57:"f1wf6u82",Beg08s0:"f1xwit7m",Bo27r1v:"f1ksfgwi"},disabled:{Bjyk6c5:"f13lkzet"},smallHorizontal:{By385i5:"fo72kxq",Dlnsje:"f9bb2ob",Eqx8gd:["f1q70ajw","f18rbzdx"],B1piin3:["f18rbzdx","f1q70ajw"]},smallVertical:{By385i5:"fqbue9b",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"fk1klkt",a2br6o:"f1o25lip"},mediumHorizontal:{By385i5:"fo72kxq",Dlnsje:"f1vx7lu8",Eqx8gd:["fna7m5n","f1oxpfwv"],B1piin3:["f1oxpfwv","fna7m5n"]},mediumVertical:{By385i5:"fipylg0",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"fqchiol",a2br6o:"f1o25lip"},largeHorizontal:{By385i5:"fo72kxq",Dlnsje:"f1vx7lu8",Eqx8gd:["fna7m5n","f1oxpfwv"],B1piin3:["f1oxpfwv","fna7m5n"]},largeVertical:{By385i5:"f1w7dm5g",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"f1p6em4m",a2br6o:"f1o25lip"}},{d:[".f1rp0jgh::after{background-color:var(--colorTransparentStroke);}",[".f3b9emi::after{border-radius:var(--borderRadiusCircular);}",{p:-1}],'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".f1ksivud::after{background-color:var(--colorCompoundBrandStroke);}",".f1476jrx:enabled:hover::after{background-color:var(--colorCompoundBrandStrokeHover);}",".f18q216b:enabled:active::after{background-color:var(--colorCompoundBrandStrokePressed);}",".f13lkzet::after{background-color:var(--colorNeutralForegroundDisabled);}",".fo72kxq::after{bottom:0;}",".f9bb2ob::after{height:var(--strokeWidthThick);}",".f1q70ajw::after{left:var(--spacingHorizontalSNudge);}",".f18rbzdx::after{right:var(--spacingHorizontalSNudge);}",".fqbue9b::after{bottom:var(--spacingVerticalXS);}",".f1n6gb5g::after{left:0;}",".f15yvnhg::after{right:0;}",".fk1klkt::after{top:var(--spacingVerticalXS);}",".f1o25lip::after{width:var(--strokeWidthThicker);}",".f1vx7lu8::after{height:var(--strokeWidthThicker);}",".fna7m5n::after{left:var(--spacingHorizontalM);}",".f1oxpfwv::after{right:var(--spacingHorizontalM);}",".fipylg0::after{bottom:var(--spacingVerticalS);}",".fqchiol::after{top:var(--spacingVerticalS);}",".f1w7dm5g::after{bottom:var(--spacingVerticalMNudge);}",".f1p6em4m::after{top:var(--spacingVerticalMNudge);}"],m:[["@media (forced-colors: active){.f1wf6u82::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1xwit7m:enabled:hover::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1ksfgwi:enabled:active::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}]]}),DT=le({base:{Br312pm:"fwpfdsa",Ijaq50:"f16hsg94",Bt984gj:"f122n59",mc9l5x:"ftuwxu6",Brf1p80:"f4d9j23",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",D0sxk3:"f16u1re",t6yez3:"f8bsbmo"},small:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},medium:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},large:{Be2twd7:"f1rt2boy",Bqenvij:"frvgh55",a9b677:"fq4mcun"},selected:{D0sxk3:"fxoiby5",t6yez3:"f15q0o9g"}},{d:[".fwpfdsa{grid-column-start:1;}",".f16hsg94{grid-row-start:1;}",".f122n59{align-items:center;}",".ftuwxu6{display:inline-flex;}",".f4d9j23{justify-content:center;}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],".f16u1re .fui-Icon-filled{display:none;}",".f8bsbmo .fui-Icon-regular{display:inline;}",".fe5j1ua{font-size:20px;}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".f1rt2boy{font-size:24px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".fxoiby5 .fui-Icon-filled{display:inline;}",".f15q0o9g .fui-Icon-regular{display:none;}"]}),qT=le({base:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1bwptpd"},selected:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"fl43uef",Bg96gwp:"f1i3iumi"},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k"},largeSelected:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},noIconBefore:{Br312pm:"fwpfdsa",Ijaq50:"f16hsg94"},iconBefore:{Br312pm:"fd46tj4",Ijaq50:"f16hsg94"},placeholder:{Bcdw1i0:"fd7fpy0"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],[".f1bwptpd{padding:var(--spacingVerticalNone) var(--spacingHorizontalXXS);}",{p:-1}],".fl43uef{font-weight:var(--fontWeightSemibold);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fwpfdsa{grid-column-start:1;}",".f16hsg94{grid-row-start:1;}",".fd46tj4{grid-column-start:2;}",".fd7fpy0{visibility:hidden;}"]}),OT=e=>{"use no memo";return HT(e),LT(e,e.root),VT(e),e},HT=e=>{const t=qv(),r=FT(),n=AT(),{appearance:a,disabled:s,selected:c,size:u,vertical:f}=e,p=[Id.root,t.root];return a!=="subtle-circular"&&a!=="filled-circular"&&p.push(r.base,u==="small"&&(f?r.smallVertical:r.smallHorizontal),u==="medium"&&(f?r.mediumVertical:r.mediumHorizontal),u==="large"&&(f?r.largeVertical:r.largeHorizontal),s&&r.disabled,c&&n.base,c&&!s&&n.selected,c&&u==="small"&&(f?n.smallVertical:n.smallHorizontal),c&&u==="medium"&&(f?n.mediumVertical:n.mediumHorizontal),c&&u==="large"&&(f?n.largeVertical:n.largeHorizontal),c&&s&&n.disabled),e.root.className=Q(...p,e.root.className),RT(e),e},LT=(e,t)=>{const r=qv(),n=IT(),a=ET(),{appearance:s,disabled:c,selected:u,size:f,vertical:p}=e,g=s==="subtle-circular",v=s==="filled-circular",x=g||v,w=[a.base,n.circular,f==="small"&&a.small,f==="medium"&&a.medium,f==="large"&&a.large,g&&a.subtle,u&&g&&a.subtleSelected,c&&g&&a.subtleDisabled,u&&c&&g&&a.subtleDisabledSelected,v&&a.filled,u&&v&&a.filledSelected,c&&v&&a.filledDisabled,u&&c&&v&&a.filledDisabledSelected],S=[n.base,!c&&s==="subtle"&&r.subtle,!c&&s==="transparent"&&r.transparent,!c&&u&&r.selected,c&&r.disabled];return t.className=Q(r.button,p?r.vertical:r.horizontal,f==="small"&&(p?r.smallVertical:r.smallHorizontal),f==="medium"&&(p?r.mediumVertical:r.mediumHorizontal),f==="large"&&(p?r.largeVertical:r.largeHorizontal),...x?w:S,c&&r.disabledCursor,t.className),e},VT=e=>{const t=DT(),r=qT(),{selected:n,size:a}=e;return e.icon&&(e.icon.className=Q(Id.icon,t.base,t[a],n&&t.selected,e.icon.className)),e.contentReservedSpace&&(e.contentReservedSpace.className=Q(MT.content,r.base,a==="large"?r.largeSelected:r.selected,e.icon?r.iconBefore:r.noIconBefore,r.placeholder,e.content.className),e.contentReservedSpaceClassName=e.contentReservedSpace.className),e.content.className=Q(Id.content,r.base,a==="large"&&r.large,n&&(a==="large"?r.largeSelected:r.selected),e.icon?r.iconBefore:r.noIconBefore,e.content.className),e},Fd=y.forwardRef((e,t)=>{const r=jT(e,t);return OT(r),Pe("useTabStyles_unstable")(r),NT(r)});Fd.displayName="Tab";const Ov=(e,t)=>{const{wrap:r,truncate:n,block:a,italic:s,underline:c,strikethrough:u,size:f,font:p,weight:g,align:v}=e;return{align:v??"start",block:a??!1,font:p??"base",italic:s??!1,size:f??300,strikethrough:u??!1,truncate:n??!1,underline:c??!1,weight:g??"regular",wrap:r??!0,components:{root:"span"},root:me(rt("span",{ref:t,...e}),{elementType:"span"})}},Hv=e=>J(e.root,{}),WT={root:"fui-Text"},$T=le({root:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bg96gwp:"f1i3iumi",Bhrd7zp:"figsok6",fsow6f:"fpgzoln",mc9l5x:"f1w7gpdv",Huce71:"f6juhto",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1gl81tg",ygn44y:"f2jf649"},nowrap:{Huce71:"fz5stix",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp"},truncate:{ygn44y:"f1cmbuwj"},block:{mc9l5x:"ftgm304"},italic:{B80ckks:"f1j4dglz"},underline:{w71qe1:"f13mvf36"},strikethrough:{w71qe1:"fv5q2k7"},strikethroughUnderline:{w71qe1:"f1drk4o6"},base100:{Be2twd7:"f13mqy1h",Bg96gwp:"fcpl73t"},base200:{Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm"},base400:{Be2twd7:"fod5ikn",Bg96gwp:"faaz57k"},base500:{Be2twd7:"f1pp30po",Bg96gwp:"f106mvju"},base600:{Be2twd7:"f1x0m3f5",Bg96gwp:"fb86gi6"},hero700:{Be2twd7:"fojgt09",Bg96gwp:"fcen8rp"},hero800:{Be2twd7:"fccw675",Bg96gwp:"f1ebx5kk"},hero900:{Be2twd7:"f15afnhw",Bg96gwp:"fr3w3wp"},hero1000:{Be2twd7:"fpyltcb",Bg96gwp:"f1ivgwrt"},monospace:{Bahqtrf:"f1fedwem"},numeric:{Bahqtrf:"f1uq0ln5"},weightMedium:{Bhrd7zp:"fdj6btp"},weightSemibold:{Bhrd7zp:"fl43uef"},weightBold:{Bhrd7zp:"flh3ekv"},alignCenter:{fsow6f:"f17mccla"},alignEnd:{fsow6f:"f12ymhq5"},alignJustify:{fsow6f:"f1j59e10"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fpgzoln{text-align:start;}",".f1w7gpdv{display:inline;}",".f6juhto{white-space:normal;}",[".f1gl81tg{overflow:visible;}",{p:-1}],".f2jf649{text-overflow:clip;}",".fz5stix{white-space:nowrap;}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],".f1cmbuwj{text-overflow:ellipsis;}",".ftgm304{display:block;}",".f1j4dglz{font-style:italic;}",".f13mvf36{text-decoration-line:underline;}",".fv5q2k7{text-decoration-line:line-through;}",".f1drk4o6{text-decoration-line:line-through underline;}",".f13mqy1h{font-size:var(--fontSizeBase100);}",".fcpl73t{line-height:var(--lineHeightBase100);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f1pp30po{font-size:var(--fontSizeBase500);}",".f106mvju{line-height:var(--lineHeightBase500);}",".f1x0m3f5{font-size:var(--fontSizeBase600);}",".fb86gi6{line-height:var(--lineHeightBase600);}",".fojgt09{font-size:var(--fontSizeHero700);}",".fcen8rp{line-height:var(--lineHeightHero700);}",".fccw675{font-size:var(--fontSizeHero800);}",".f1ebx5kk{line-height:var(--lineHeightHero800);}",".f15afnhw{font-size:var(--fontSizeHero900);}",".fr3w3wp{line-height:var(--lineHeightHero900);}",".fpyltcb{font-size:var(--fontSizeHero1000);}",".f1ivgwrt{line-height:var(--lineHeightHero1000);}",".f1fedwem{font-family:var(--fontFamilyMonospace);}",".f1uq0ln5{font-family:var(--fontFamilyNumeric);}",".fdj6btp{font-weight:var(--fontWeightMedium);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".flh3ekv{font-weight:var(--fontWeightBold);}",".f17mccla{text-align:center;}",".f12ymhq5{text-align:end;}",".f1j59e10{text-align:justify;}"]}),Lv=e=>{const t=$T();return e.root.className=Q(WT.root,t.root,e.wrap===!1&&t.nowrap,e.truncate&&t.truncate,e.block&&t.block,e.italic&&t.italic,e.underline&&t.underline,e.strikethrough&&t.strikethrough,e.underline&&e.strikethrough&&t.strikethroughUnderline,e.size===100&&t.base100,e.size===200&&t.base200,e.size===400&&t.base400,e.size===500&&t.base500,e.size===600&&t.base600,e.size===700&&t.hero700,e.size===800&&t.hero800,e.size===900&&t.hero900,e.size===1e3&&t.hero1000,e.font==="monospace"&&t.monospace,e.font==="numeric"&&t.numeric,e.weight==="medium"&&t.weightMedium,e.weight==="semibold"&&t.weightSemibold,e.weight==="bold"&&t.weightBold,e.align==="center"&&t.alignCenter,e.align==="end"&&t.alignEnd,e.align==="justify"&&t.alignJustify,e.root.className),e},Ie=y.forwardRef((e,t)=>{const r=Ov(e,t);return Lv(r),Pe("useTextStyles_unstable")(r),Hv(r)});Ie.displayName="Text";function UT(e){const{useStyles:t,className:r,displayName:n}=e,a=y.forwardRef((s,c)=>{const u=t(),f=Ov(s,c);return Lv(f),f.root.className=Q(r,f.root.className,u.root,s.className),Hv(f)});return a.displayName=n,a}const Ad=UT({useStyles:le({root:{Bahqtrf:"fk6fouc",Be2twd7:"f1x0m3f5",Bhrd7zp:"fl43uef",Bg96gwp:"fb86gi6"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".f1x0m3f5{font-size:var(--fontSizeBase600);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".fb86gi6{line-height:var(--lineHeightBase600);}"]}),className:{root:"fui-Title3"}.root,displayName:"Title3"}),GT=e=>J(e.root,{children:J(e.textarea,{})}),XT=(e,t)=>{const r=Nu(),n=ul();var a,s;const{size:c=(a=n?.size)!==null&&a!==void 0?a:"medium",appearance:u=(s=r.inputDefaultAppearance)!==null&&s!==void 0?s:"outline",...f}=e;return{...KT(f,t),size:c,appearance:u}},KT=(e,t)=>{e=To(e,{supportsLabelFor:!0,supportsRequired:!0});const{resize:r="none",onChange:n}=e,[a,s]=Bt({state:e.value,defaultState:e.defaultValue,initialState:void 0}),c=yo({props:e,primarySlotTagName:"textarea",excludedPropNames:["onChange","value","defaultValue"]}),u={resize:r,components:{root:"span",textarea:"textarea"},textarea:me(e.textarea,{defaultProps:{ref:t,...c.primary},elementType:"textarea"}),root:me(e.root,{defaultProps:c.root,elementType:"span"})};return u.textarea.value=a,u.textarea.onChange=ce(f=>{const p=f.target.value;n?.(f,{value:p}),s(p)}),u},Vv={root:"fui-Textarea",textarea:"fui-Textarea__textarea"},YT=le({base:{mc9l5x:"ftuwxu6",B7ck84d:"f1ewtqcl",qhf8xq:"f10pi13n",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1yiegib",jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1s184ao",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",ha4doy:"f12kltsn"},disabled:{De3pzq:"f1c21dwh",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"ff3nzm7",Bcq6wej:"f9dbb4x",Jcjdmf:["f3qs60o","f5u9ap2"],sc4o1m:"fwd1oij",Bosien3:["f5u9ap2","f3qs60o"]},interactive:{li1rpt:"f1gw3sf2",Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9",Eqx8gd:["f1a7op3","f1cjjd47"],By385i5:"f1gboi2j",B1piin3:["f1cjjd47","f1a7op3"],Dlnsje:"ffyw7fx",d9w3h3:["f1kp91vd","f1ibwz09"],B3778ie:["f1ibwz09","f1kp91vd"],B1q35kw:0,Bw17bha:0,Bcgy8vk:0,Bjuhk93:"f1mnjydx",Gjdm7m:"fj2g8qd",b1kco5:"f1yk9hq",Ba2ppi3:"fhwpy7i",F2fol1:"f14ee0xe",lck23g:"f1xhbsuh",wi16st:"fsrmcvb",ywj3b2:"f1t3k7v9",umuwi5:"fjw5xc1",Blcqepd:"f1xdyd5c",nplu4u:"fatpbeo",Bioka5o:"fb7uyps",Bnupc0a:"fx04xgm",bing71:"f1c7in40",Bercvud:"f1ibeo51",Bbr2w1p:"f1vnc8sk",Bduesf4:"f3e99gv",Bpq79vn:"fhljsf7"},filled:{Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f88035w",q7v0qe:"ftmjh5b",kmh5ft:["f17blpuu","fsrcdbj"],nagaa4:"f1tpwn32",B1yhkcb:["fsrcdbj","f17blpuu"]},"filled-darker":{De3pzq:"f16xq7d1"},"filled-lighter":{De3pzq:"fxugw4r"},"filled-darker-shadow":{De3pzq:"f16xq7d1",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1gmd7mu",E5pizo:"fyed02w"},"filled-lighter-shadow":{De3pzq:"fxugw4r",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1gmd7mu",E5pizo:"fyed02w"},outline:{De3pzq:"fxugw4r",Bgfg5da:0,B9xav0g:"f1c1zstj",oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fhz96rm"},outlineInteractive:{kzujx5:0,oetu4i:"f1l4zc64",gvrnp0:0,xv9156:0,jek2p4:0,gg5e9n:0,Beu9t3s:0,dt87k2:0,Bt1vbvt:0,Bwzppfd:0,Bop6t4b:0,B2zwrfe:0,Bwp2tzp:0,Bgoe8wy:0,Bf40cpq:0,ckks6v:0,Baalond:"f9mts5e",v2iqwr:0,wmxk5l:"f1z0osm6",Bj33j0h:0,Bs0cc2w:0,qwjtx1:0,B50zh58:0,f7epvg:0,e1hlit:0,B7mkhst:0,ak43y8:0,Bbcopvn:0,Bvecx4l:0,lwioe0:0,B6oc9vd:0,e2sjt0:0,uqwnxt:0,asj8p9:"f1acnei2",Br8fjdy:0,zoxjo1:"f1so894s",Bt3ojkv:0,B7pmvfx:0,Bfht2n1:0,an54nd:0,t1ykpo:0,Belqbek:0,bbt1vd:0,Brahy3i:0,r7b1zc:0,rexu52:0,ovtnii:0,Bvq3b66:0,Bawrxx6:0,Bbs6y8j:0,B2qpgjt:"f19ezbcq"},invalid:{tvckwq:"fs4k3qj",gk2u95:["fcee079","fmyw78r"],hhx65j:"f1fgmyf4",Bxowmz0:["fmyw78r","fcee079"]}},{d:[".ftuwxu6{display:inline-flex;}",".f1ewtqcl{box-sizing:border-box;}",".f10pi13n{position:relative;}",[".f1yiegib{padding:0 0 var(--strokeWidthThick) 0;}",{p:-1}],[".f1s184ao{margin:0;}",{p:-1}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f12kltsn{vertical-align:top;}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",[".ff3nzm7{border:var(--strokeWidthThin) solid var(--colorNeutralStrokeDisabled);}",{p:-2}],".f1gw3sf2::after{box-sizing:border-box;}",'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".f1a7op3::after{left:-1px;}",".f1cjjd47::after{right:-1px;}",".f1gboi2j::after{bottom:-1px;}",".ffyw7fx::after{height:max(var(--strokeWidthThick), var(--borderRadiusMedium));}",".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}",[".f1mnjydx::after{border-bottom:var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);}",{p:-1}],".fj2g8qd::after{clip-path:inset(calc(100% - var(--strokeWidthThick)) 0 0 0);}",".f1yk9hq::after{transform:scaleX(0);}",".fhwpy7i::after{transition-property:transform;}",".f14ee0xe::after{transition-duration:var(--durationUltraFast);}",".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}",[".f88035w{border:var(--strokeWidthThin) solid var(--colorTransparentStroke);}",{p:-2}],".f16xq7d1{background-color:var(--colorNeutralBackground3);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",[".f1gmd7mu{border:var(--strokeWidthThin) solid var(--colorTransparentStrokeInteractive);}",{p:-2}],".fyed02w{box-shadow:var(--shadow2);}",[".f1gmd7mu{border:var(--strokeWidthThin) solid var(--colorTransparentStrokeInteractive);}",{p:-2}],[".fhz96rm{border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);}",{p:-2}],".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}",".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}",".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}",".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}",".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}"],m:[["@media (forced-colors: active){.f9dbb4x{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f3qs60o{border-right-color:GrayText;}.f5u9ap2{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fwd1oij{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media screen and (prefers-reduced-motion: reduce){.fsrmcvb::after{transition-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1t3k7v9::after{transition-delay:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.fx04xgm:focus-within::after{transition-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1c7in40:focus-within::after{transition-delay:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}]],w:[".fjw5xc1:focus-within::after{transform:scaleX(1);}",".f1xdyd5c:focus-within::after{transition-property:transform;}",".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}",".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}",".f1ibeo51:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",".f1vnc8sk:focus-within{outline-width:var(--strokeWidthThick);}",".f3e99gv:focus-within{outline-style:solid;}",".fhljsf7:focus-within{outline-color:transparent;}",[".f19ezbcq:focus-within{border:var(--strokeWidthThin) solid var(--colorNeutralStroke1Pressed);}",{p:-2}],".f1so894s:focus-within{border-bottom-color:var(--colorCompoundBrandStroke);}"],h:[".ftmjh5b:hover,.ftmjh5b:focus-within{border-top-color:var(--colorTransparentStrokeInteractive);}",".f17blpuu:hover,.f17blpuu:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}",".fsrcdbj:hover,.fsrcdbj:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}",".f1tpwn32:hover,.f1tpwn32:focus-within{border-bottom-color:var(--colorTransparentStrokeInteractive);}",[".f9mts5e:hover{border:var(--strokeWidthThin) solid var(--colorNeutralStroke1Hover);}",{p:-2}],".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}"],a:[[".f1acnei2:active{border:var(--strokeWidthThin) solid var(--colorNeutralStroke1Pressed);}",{p:-2}],".f1z0osm6:active{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"]}),QT=le({base:{icvyot:"f1ern45e",vrafjx:["f1n71otn","f1deefiw"],oivjwe:"f1h8hb77",wvpqe5:["f1deefiw","f1n71otn"],jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1s184ao",De3pzq:"f3rmtva",B7ck84d:"f1ewtqcl",sj55zd:"f19n0e5",Bh6795r:"fqerorx",Bahqtrf:"fk6fouc",Bqenvij:"f1l02sjl",yvdlaj:"fwyc1cq",B3o7kgh:"f13ta7ih",oeaueh:"f1s6fcnf"},disabled:{sj55zd:"f1s2aq7o",Bceei9c:"fdrzuqr",yvdlaj:"fahhnxm"},small:{sshi5w:"f1w5jphr",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1pnffij",Bxyxcbc:"f192z54u",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm"},medium:{sshi5w:"fvmd9f",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1ww82xo",Bxyxcbc:"f1if7ixc",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},large:{sshi5w:"f1kfson",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f15hvtkj",Bxyxcbc:"f3kip1f",Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k"}},{d:[".f1ern45e{border-top-style:none;}",".f1n71otn{border-right-style:none;}",".f1deefiw{border-left-style:none;}",".f1h8hb77{border-bottom-style:none;}",[".f1s184ao{margin:0;}",{p:-1}],".f3rmtva{background-color:transparent;}",".f1ewtqcl{box-sizing:border-box;}",".f19n0e5{color:var(--colorNeutralForeground1);}",".fqerorx{flex-grow:1;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".f1l02sjl{height:100%;}",".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}",".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}",".f13ta7ih::-webkit-input-placeholder{opacity:1;}",".f13ta7ih::-moz-placeholder{opacity:1;}",".f1s6fcnf{outline-style:none;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}",".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}",".f1w5jphr{min-height:40px;}",[".f1pnffij{padding:var(--spacingVerticalXS) calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}",{p:-1}],".f192z54u{max-height:200px;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fvmd9f{min-height:52px;}",[".f1ww82xo{padding:var(--spacingVerticalSNudge) calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}",{p:-1}],".f1if7ixc{max-height:260px;}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f1kfson{min-height:64px;}",[".f15hvtkj{padding:var(--spacingVerticalS) calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));}",{p:-1}],".f3kip1f{max-height:320px;}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}"]}),ZT=le({none:{B3rzk8w:"f1o1s39h"},both:{B3rzk8w:"f1pxm0xe"},horizontal:{B3rzk8w:"fq6nmtn"},vertical:{B3rzk8w:"f1f5ktr4"}},{d:[".f1o1s39h{resize:none;}",".f1pxm0xe{resize:both;}",".fq6nmtn{resize:horizontal;}",".f1f5ktr4{resize:vertical;}"]}),JT=e=>{const{size:t,appearance:r,resize:n}=e,a=e.textarea.disabled,s=`${e.textarea["aria-invalid"]}`=="true",c=r.startsWith("filled"),u=YT();e.root.className=Q(Vv.root,u.base,a&&u.disabled,!a&&c&&u.filled,!a&&u[r],!a&&u.interactive,!a&&r==="outline"&&u.outlineInteractive,!a&&s&&u.invalid,e.root.className);const f=QT(),p=ZT();return e.textarea.className=Q(Vv.textarea,f.base,f[t],p[n],a&&f.disabled,e.textarea.className),e},Wv=y.forwardRef((e,t)=>{const r=XT(e,t);return JT(r),Pe("useTextareaStyles_unstable")(r),GT(r)});Wv.displayName="Textarea";const e9=ze("r6pzz3z",null,[".r6pzz3z{overflow-y:hidden;overflow-y:clip;scrollbar-gutter:stable;}"]),t9=ze("r144vlu9",null,[".r144vlu9{overflow-y:hidden;}"]);function r9(){const e=e9(),t=t9(),{targetDocument:r}=He(),n=y.useCallback(()=>{var s;if(!r)return;var c;Math.floor(r.body.getBoundingClientRect().height)>((c=(s=r.defaultView)===null||s===void 0?void 0:s.innerHeight)!==null&&c!==void 0?c:0)&&(r.documentElement.classList.add(e),r.body.classList.add(t))},[r,e,t]),a=y.useCallback(()=>{r&&(r.documentElement.classList.remove(e),r.body.classList.remove(t))},[r,e,t]);return{disableBodyScroll:n,enableBodyScroll:a}}function o9(e,t){const{findFirstFocusable:r}=ca(),{targetDocument:n}=He(),a=y.useRef(null);return y.useEffect(()=>{if(!e)return;const s=a.current&&r(a.current);if(s)s.focus();else{var c;(c=a.current)===null||c===void 0||c.focus()}},[r,e,t,n]),a}const n9={open:!1,inertTrapFocus:!1,modalType:"modal",isNestedDialog:!1,unmountOnClose:!0,dialogRef:{current:null},requestOpenChange(){}},Dd=Lr(void 0),i9=Dd.Provider,Nr=e=>eo(Dd,(t=n9)=>e(t)),a9=!1,$v=y.createContext(void 0),Uv=$v.Provider,s9=()=>{var e;return(e=y.useContext($v))!==null&&e!==void 0?e:a9},Gv=y.createContext(void 0);Gv.Provider;const l9=()=>y.useContext(Gv),Xv=So(id,{outScale:.85,easing:De.curveDecelerateMid,duration:De.durationGentle,exitEasing:De.curveAccelerateMin,exitDuration:De.durationGentle}),c9=e=>{const{children:t,modalType:r="modal",onOpenChange:n,inertTrapFocus:a=!1,unmountOnClose:s=!0}=e,c=pt("dialog-title-"),[u,f]=u9(t),[p,g]=Bt({state:e.open,defaultState:e.defaultOpen,initialState:!1}),v=ce(B=>{n?.(B.event,B),B.event.isDefaultPrevented()||g(B.open)}),x=o9(p,r),{modalAttributes:w,triggerAttributes:S}=Vs({trapFocus:r!=="non-modal",legacyTrapFocus:!a}),k=Jn(Dd);return{components:{surfaceMotion:Xv},inertTrapFocus:a,open:p,modalType:r,content:f,trigger:u,requestOpenChange:v,dialogTitleId:c,isNestedDialog:k,unmountOnClose:s,dialogRef:x,modalAttributes:w,triggerAttributes:S,surfaceMotion:ha(e.surfaceMotion,{elementType:Xv,defaultProps:{visible:p,appear:s,unmountOnExit:s}})}};function u9(e){const t=y.Children.toArray(e);switch(t.length){case 2:return t;case 1:return[void 0,t[0]];default:return[void 0,void 0]}}const d9=(e,t)=>J(i9,{value:t.dialog,children:Le(Uv,{value:t.dialogSurface,children:[e.trigger,e.content&&J(e.surfaceMotion,{children:J(Xs,{children:e.content})})]})});function f9(e){const{modalType:t,open:r,dialogRef:n,dialogTitleId:a,isNestedDialog:s,inertTrapFocus:c,requestOpenChange:u,modalAttributes:f,triggerAttributes:p,unmountOnClose:g}=e;return{dialog:y.useMemo(()=>({open:r,modalType:t,dialogRef:n,dialogTitleId:a,isNestedDialog:s,inertTrapFocus:c,modalAttributes:f,triggerAttributes:p,unmountOnClose:g,requestOpenChange:u}),[r,t,n,a,s,c,f,p,g,u]),dialogSurface:!1}}const bn=y.memo(e=>{const t=c9(e),r=f9(t);return d9(t,r)});bn.displayName="Dialog";const p9=e=>{const t=s9(),{children:r,disableButtonEnhancement:n=!1,action:a=t?"close":"open"}=e,s=ia(r),c=Nr(v=>v.requestOpenChange),{triggerAttributes:u}=Vs(),f=ce(v=>{var x,w;s==null||(x=(w=s.props).onClick)===null||x===void 0||x.call(w,v),v.isDefaultPrevented()||c({event:v,type:"triggerClick",open:a==="open"})}),p={...s?.props,ref:na(s),onClick:f,...u},g=fn(s?.type==="button"||s?.type==="a"?s.type:"div",{...p,type:"button"});return{children:Es(r,n?p:g)}},h9=e=>e.children,qd=e=>{const t=p9(e);return h9(t)};qd.displayName="DialogTrigger",qd.isFluentTriggerComponent=!0;const g9=(e,t)=>{const{position:r="end",fluid:n=!1}=e;return{components:{root:"div"},root:me(rt("div",{ref:t,...e}),{elementType:"div"}),position:r,fluid:n}},m9=e=>J(e.root,{}),v9={root:"fui-DialogActions"},b9=ze("rhfpeu0",null,{r:[".rhfpeu0{gap:8px;height:fit-content;box-sizing:border-box;display:flex;grid-row-start:3;grid-row-end:3;}"],s:["@media screen and (max-width: 480px){.rhfpeu0{flex-direction:column;justify-self:stretch;}}"]}),y9=le({gridPositionEnd:{Bdqf98w:"f1a7i8kp",Br312pm:"fd46tj4",Bw0ie65:"fsyjsko",Btsd7tp:"f1n00o3b",ufxxby:"f1mvsp37",Bq5p579:"flbz1vp"},gridPositionStart:{Bdqf98w:"fsxvdwy",Br312pm:"fwpfdsa",Bw0ie65:"f1e2fz10",Ew0qkd:"f119phc2",ufxxby:"f1j719yo",Bq5p579:"flbz1vp"},fluidStart:{Bw0ie65:"fsyjsko"},fluidEnd:{Br312pm:"fwpfdsa"}},{d:[".f1a7i8kp{justify-self:end;}",".fd46tj4{grid-column-start:2;}",".fsyjsko{grid-column-end:4;}",".fsxvdwy{justify-self:start;}",".fwpfdsa{grid-column-start:1;}",".f1e2fz10{grid-column-end:2;}"],m:[["@media screen and (max-width: 480px){.f1n00o3b{grid-column-start:1;}}",{m:"screen and (max-width: 480px)"}],["@media screen and (max-width: 480px){.f1mvsp37{grid-row-start:4;}}",{m:"screen and (max-width: 480px)"}],["@media screen and (max-width: 480px){.flbz1vp{grid-row-end:auto;}}",{m:"screen and (max-width: 480px)"}],["@media screen and (max-width: 480px){.f119phc2{grid-column-end:4;}}",{m:"screen and (max-width: 480px)"}],["@media screen and (max-width: 480px){.f1j719yo{grid-row-start:3;}}",{m:"screen and (max-width: 480px)"}]]}),x9=e=>{const t=b9(),r=y9();return e.root.className=Q(v9.root,t,e.position==="start"&&r.gridPositionStart,e.position==="end"&&r.gridPositionEnd,e.fluid&&e.position==="start"&&r.fluidStart,e.fluid&&e.position==="end"&&r.fluidEnd,e.root.className),e},yn=y.forwardRef((e,t)=>{const r=g9(e,t);return x9(r),Pe("useDialogActionsStyles_unstable")(r),m9(r)});yn.displayName="DialogActions";const w9=(e,t)=>{var r;return{components:{root:"div"},root:me(rt((r=e.as)!==null&&r!==void 0?r:"div",{ref:t,...e}),{elementType:"div"})}},k9=e=>J(e.root,{}),S9={root:"fui-DialogBody"},B9=ze("rhwx3p8",null,{r:[".rhwx3p8{overflow:unset;gap:8px;display:grid;max-height:calc(100vh - 2 * 24px);max-height:calc(100dvh - 2 * 24px);box-sizing:border-box;grid-template-rows:auto 1fr;grid-template-columns:1fr 1fr auto;}"],s:["@media screen and (max-width: 480px){.rhwx3p8{max-width:100vw;grid-template-rows:auto 1fr auto;}}","@media screen and (max-height: 359px){.rhwx3p8{max-height:unset;}}"]}),z9=e=>{const t=B9();return e.root.className=Q(S9.root,t,e.root.className),e},xn=y.forwardRef((e,t)=>{const r=w9(e,t);return z9(r),Pe("useDialogBodyStyles_unstable")(r),k9(r)});xn.displayName="DialogBody";const Kv={root:"fui-DialogTitle",action:"fui-DialogTitle__action"},j9=ze("rxjm636",null,[".rxjm636{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase500);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase500);margin:0;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:3;}"]),_9=le({rootWithoutAction:{Bw0ie65:"fsyjsko"}},{d:[".fsyjsko{grid-column-end:4;}"]}),C9=ze("r13kcrze",null,[".r13kcrze{grid-row-start:1;grid-row-end:1;grid-column-start:3;justify-self:end;align-self:start;}"]),N9=ze("r2avt6e","roj2bbc",{r:[".r2avt6e{overflow:visible;padding:0;border-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}",".r2avt6e:focus{outline-style:none;}",".r2avt6e:focus-visible{outline-style:none;}",".r2avt6e[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r2avt6e[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".roj2bbc{overflow:visible;padding:0;border-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}",".roj2bbc:focus{outline-style:none;}",".roj2bbc:focus-visible{outline-style:none;}",".roj2bbc[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.roj2bbc[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r2avt6e[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media (forced-colors: active){.roj2bbc[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"]}),T9=e=>{const t=j9(),r=C9(),n=_9();return e.root.className=Q(Kv.root,t,!e.action&&n.rootWithoutAction,e.root.className),e.action&&(e.action.className=Q(Kv.action,r,e.action.className)),e},P9=(e,t)=>{const{action:r}=e,n=Nr(s=>s.modalType),a=N9();return{components:{root:"h2",action:"div"},root:me(rt("h2",{ref:t,id:Nr(s=>s.dialogTitleId),...e}),{elementType:"h2"}),action:Ne(r,{renderByDefault:n==="non-modal",defaultProps:{children:y.createElement(qd,{disableButtonEnhancement:!0,action:"close"},y.createElement("button",{type:"button",className:a,"aria-label":"close"},y.createElement(e6,null)))},elementType:"div"})}},R9=e=>Le(y.Fragment,{children:[J(e.root,{children:e.root.children}),e.action&&J(e.action,{})]}),wn=y.forwardRef((e,t)=>{const r=P9(e,t);return T9(r),Pe("useDialogTitleStyles_unstable")(r),R9(r)});wn.displayName="DialogTitle";const Yv=B6,M9=(e,t)=>{const r=Gs(),n=Nr(j=>j.modalType),a=Nr(j=>j.isNestedDialog),s=l9(),c=s??a,u=Nr(j=>j.modalAttributes),f=Nr(j=>j.dialogRef),p=Nr(j=>j.requestOpenChange),g=Nr(j=>j.dialogTitleId),v=Nr(j=>j.open),x=Nr(j=>j.unmountOnClose),w=ce(j=>{if(Cu(e.backdrop)){var N,M;(N=(M=e.backdrop).onClick)===null||N===void 0||N.call(M,j)}n==="modal"&&!j.isDefaultPrevented()&&p({event:j,open:!1,type:"backdropClick"})}),S=ce(j=>{var N;(N=e.onKeyDown)===null||N===void 0||N.call(e,j),j.key===ti&&!j.isDefaultPrevented()&&(p({event:j,open:!1,type:"escapeKeyDown"}),j.preventDefault())}),k=Ne(e.backdrop,{renderByDefault:n!=="non-modal",defaultProps:{"aria-hidden":"true"},elementType:"div"}),B=k?.appearance;k&&(k.onClick=w,delete k.appearance);const{disableBodyScroll:z,enableBodyScroll:P}=r9();return bt(()=>{if(!v){P();return}if(!(a||n==="non-modal"))return z(),()=>P()},[v,n,a,z,P]),{components:{backdrop:"div",root:"div",backdropMotion:Yv},open:v,backdrop:k,isNestedDialog:a,treatBackdropAsNested:c,backdropAppearance:B,unmountOnClose:x,mountNode:e.mountNode,root:me(rt("div",{tabIndex:-1,role:n==="alert"?"alertdialog":"dialog","aria-modal":n!=="non-modal","aria-labelledby":e["aria-label"]?void 0:g,"aria-hidden":!x&&!v?!0:void 0,...e,...u,onKeyDown:S,ref:Oe(t,r,f)}),{elementType:"div"}),backdropMotion:ha(e.backdropMotion,{elementType:Yv,defaultProps:{appear:x,visible:v}}),transitionStatus:void 0}},E9=(e,t)=>Le(li,{mountNode:e.mountNode,children:[e.backdrop&&e.backdropMotion&&J(e.backdropMotion,{children:J(e.backdrop,{})}),J(Wm,{children:J(Uv,{value:t.dialogSurface,children:J(e.root,{})})})]}),Qv={root:"fui-DialogSurface",backdrop:"fui-DialogSurface__backdrop"},I9=ze("r1u3t6p6","r5coedp",{r:[".r1u3t6p6{inset:0;padding:24px;margin:auto;border-style:none;overflow:unset;border:1px solid var(--colorTransparentStroke);border-radius:var(--borderRadiusXLarge);display:block;-webkit-user-select:unset;-moz-user-select:unset;user-select:unset;visibility:unset;position:fixed;height:fit-content;max-width:600px;max-height:100vh;max-height:100dvh;box-sizing:border-box;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);box-shadow:var(--shadow64);}",".r1u3t6p6:focus{outline-style:none;}",".r1u3t6p6:focus-visible{outline-style:none;}",".r1u3t6p6[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r1u3t6p6[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".r5coedp{inset:0;padding:24px;margin:auto;border-style:none;overflow:unset;border:1px solid var(--colorTransparentStroke);border-radius:var(--borderRadiusXLarge);display:block;-webkit-user-select:unset;-moz-user-select:unset;user-select:unset;visibility:unset;position:fixed;height:fit-content;max-width:600px;max-height:100vh;max-height:100dvh;box-sizing:border-box;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);box-shadow:var(--shadow64);}",".r5coedp:focus{outline-style:none;}",".r5coedp:focus-visible{outline-style:none;}",".r5coedp[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.r5coedp[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r1u3t6p6[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media screen and (max-width: 480px){.r1u3t6p6{max-width:100vw;}}","@media screen and (max-height: 359px){.r1u3t6p6{overflow-y:auto;padding-right:calc(24px - 4px);border-right-width:4px;border-top-width:4px;border-bottom-width:4px;}}","@media (forced-colors: active){.r5coedp[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}","@media screen and (max-width: 480px){.r5coedp{max-width:100vw;}}","@media screen and (max-height: 359px){.r5coedp{overflow-y:auto;padding-left:calc(24px - 4px);border-left-width:4px;border-top-width:4px;border-bottom-width:4px;}}"]}),F9=ze("r1e18s3l",null,[".r1e18s3l{inset:0px;background-color:var(--colorBackgroundOverlay);position:fixed;}"]),A9=le({nestedDialogBackdrop:{De3pzq:"f1c21dwh"},dialogHidden:{Bkecrkj:"f1aehjj5"}},{d:[".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1aehjj5{pointer-events:none;}"]}),D9=e=>{const{root:t,backdrop:r,open:n,unmountOnClose:a,treatBackdropAsNested:s,backdropAppearance:c}=e,u=I9(),f=F9(),p=A9(),g=c?c==="transparent":s,v=!a&&!n;return t.className=Q(Qv.root,u,v&&p.dialogHidden,t.className),r&&(r.className=Q(Qv.backdrop,f,v&&p.dialogHidden,g&&p.nestedDialogBackdrop,r.className)),e};function q9(e){return{dialogSurface:!0}}const kn=y.forwardRef((e,t)=>{const r=M9(e,t),n=q9();return D9(r),Pe("useDialogSurfaceStyles_unstable")(r),E9(r,n)});kn.displayName="DialogSurface";const O9=(e,t)=>{var r;return{components:{root:"div"},root:me(rt((r=e.as)!==null&&r!==void 0?r:"div",{ref:t,...e}),{elementType:"div"})}},H9=e=>J(e.root,{}),L9={root:"fui-DialogContent"},V9=ze("r1v5zwsm",null,{r:[".r1v5zwsm{padding:var(--strokeWidthThick);margin:calc(var(--strokeWidthThick) * -1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);overflow-y:auto;min-height:32px;box-sizing:border-box;grid-row-start:2;grid-row-end:2;grid-column-start:1;grid-column-end:4;}"],s:["@media screen and (max-height: 359px){.r1v5zwsm{overflow-y:unset;}}"]}),W9=e=>{const t=V9();return e.root.className=Q(L9.root,t,e.root.className),e},Sn=y.forwardRef((e,t)=>{const r=O9(e,t);return W9(r),Pe("useDialogContentStyles_unstable")(r),H9(r)});Sn.displayName="DialogContent";const Zv=Lr(void 0),$9={size:"medium",handleToggleButton:()=>null,handleRadio:()=>null,vertical:!1,checkedValues:{}},U9=e=>eo(Zv,(t=$9)=>e(t)),G9=(e,t)=>{const{size:r="medium"}=e,n=X9(e,t),a=Y9();return{size:r,...n,root:{...n.root,...a}}},X9=(e,t)=>{const{vertical:r=!1}=e,n={vertical:r,components:{root:"div"},root:me(rt("div",{role:"toolbar",ref:t,...r&&{"aria-orientation":"vertical"},...e}),{elementType:"div"})},[a,s]=K9({checkedValues:e.checkedValues,defaultCheckedValues:e.defaultCheckedValues,onCheckedValueChange:e.onCheckedValueChange}),c=ce((f,p,g,v)=>{if(p&&g){const w=[...a?.[p]||[]];v?w.splice(w.indexOf(g),1):w.push(g),s?.(f,{name:p,checkedItems:w})}}),u=ce((f,p,g,v)=>{p&&g&&s?.(f,{name:p,checkedItems:[g]})});return{...n,handleToggleButton:c,handleRadio:u,checkedValues:a??{}}},K9=e=>{const[t,r]=Bt({state:e.checkedValues,defaultState:e.defaultCheckedValues,initialState:{}}),{onCheckedValueChange:n}=e,a=ce((s,{name:c,checkedItems:u})=>{n&&n(s,{name:c,checkedItems:u}),r(f=>f?{...f,[c]:u}:{[c]:u})});return[t,a]},Y9=()=>Ls({circular:!0,axis:"both"}),Q9=(e,t)=>J(Zv.Provider,{value:t.toolbar,children:J(e.root,{children:e.root.children})}),Z9={root:"fui-Toolbar"},J9=le({root:{mc9l5x:"f22iagw",Bt984gj:"f122n59",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1yqiaad"},vertical:{Beiy3e4:"f1vx9l62",a9b677:"f1acs6jw"},small:{Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fvz760z"},medium:{Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1yqiaad"},large:{Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1ms6bdn"}},{d:[".f22iagw{display:flex;}",".f122n59{align-items:center;}",[".f1yqiaad{padding:4px 8px;}",{p:-1}],".f1vx9l62{flex-direction:column;}",".f1acs6jw{width:fit-content;}",[".fvz760z{padding:0px 4px;}",{p:-1}],[".f1yqiaad{padding:4px 8px;}",{p:-1}],[".f1ms6bdn{padding:4px 20px;}",{p:-1}]]}),eP=e=>{const t=J9(),{vertical:r,size:n}=e;return e.root.className=Q(Z9.root,t.root,r&&t.vertical,n==="small"&&!r&&t.small,n==="medium"&&!r&&t.medium,n==="large"&&!r&&t.large,e.root.className),e};function tP(e){const{size:t,handleToggleButton:r,vertical:n,checkedValues:a,handleRadio:s}=e;return{toolbar:y.useMemo(()=>({size:t,vertical:n,handleToggleButton:r,handleRadio:s,checkedValues:a}),[t,n,r,s,a])}}const Jv=y.forwardRef((e,t)=>{const r=G9(e,t),n=tP(r);return eP(r),Pe("useToolbarStyles_unstable")(r),Q9(r,n)});Jv.displayName="Toolbar";const rP=le({vertical:{Beiy3e4:"f1vx9l62"},verticalIcon:{Be2twd7:"f1rt2boy",jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1s184ao"}},{d:[".f1vx9l62{flex-direction:column;}",".f1rt2boy{font-size:24px;}",[".f1s184ao{margin:0;}",{p:-1}]]}),oP=e=>{const t=rP();e.root.className=Q(e.vertical&&t.vertical,e.root.className),e.icon&&(e.icon.className=Q(e.vertical&&t.verticalIcon,e.icon.className)),iv(e)},nP=(e,t)=>{const{appearance:r="subtle",...n}=e,a=iP(n,t);return{appearance:r,size:"medium",shape:"rounded",...a}},iP=(e,t)=>{const{vertical:r=!1,...n}=e,a=ov(n,t);return{vertical:r,...a}},_a=y.forwardRef((e,t)=>{const r=nP(e,t);return oP(r),Pe("useToolbarButtonStyles_unstable")(r),tv(r)});_a.displayName="ToolbarButton";const aP=le({root:{mc9l5x:"ftuwxu6",B2u0y6b:"f1lwjmbk",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1oic3e7"},vertical:{B2u0y6b:"fe668z"}},{d:[".ftuwxu6{display:inline-flex;}",".f1lwjmbk{max-width:1px;}",[".f1oic3e7{padding:0 12px;}",{p:-1}],".fe668z{max-width:initial;}"]}),sP=e=>{bv(e);const{vertical:t}=e,r=aP();return e.root.className=Q(r.root,!t&&r.vertical,e.root.className),e},lP=(e,t)=>({alignContent:"center",appearance:"default",inset:!1,...cP(e,t)}),cP=(e,t)=>{const r=U9(n=>n.vertical);return mv({vertical:!r,...e},t)},eb=y.forwardRef((e,t)=>{const r=lP(e,t);return sP(r),Pe("useToolbarDividerStyles_unstable")(r),gv(r)});eb.displayName="ToolbarDivider";function uP(e){switch(e){case"info":return y.createElement(ez,null);case"warning":return y.createElement(Z4,null);case"error":return y.createElement(wz,null);case"success":return y.createElement(pz,null);default:return null}}function dP(e=!1){const{targetDocument:t}=He(),r=y.useReducer(()=>({}),{})[1],n=y.useRef(!1),a=y.useRef(null),s=y.useRef(Number.POSITIVE_INFINITY),c=y.useCallback(f=>{var p,g;const v=f[0];var x;const w=(x=v==null||(g=v.borderBoxSize)===null||g===void 0||(p=g[0])===null||p===void 0?void 0:p.inlineSize)!==null&&x!==void 0?x:v?.target.getBoundingClientRect().width;if(w===void 0||!v)return;const{target:S}=v;if(!Br(S))return;let k;if(n.current)w>=s.current&&(k=!1);else{const B=S.scrollWidth;w<B&&(k=!0,s.current=B)}typeof k<"u"&&n.current!==k&&(n.current=k,r())},[r]),u=y.useCallback(f=>{var p;if(!e||!f||!t?.defaultView)return;(p=a.current)===null||p===void 0||p.disconnect();const g=t.defaultView,v=new g.ResizeObserver(c);a.current=v,v.observe(f,{box:"border-box"})},[t,c,e]);return y.useEffect(()=>()=>{var f;(f=a.current)===null||f===void 0||f.disconnect()},[]),{ref:u,reflowing:n.current}}const tb=y.createContext(void 0),fP={className:"",nodeRef:y.createRef()};tb.Provider;const pP=()=>{var e;return(e=y.useContext(tb))!==null&&e!==void 0?e:fP},hP=(e,t)=>{const{layout:r="auto",intent:n="info",politeness:a}=e,s=a??n==="info"?"polite":"assertive",c=r==="auto",{ref:u,reflowing:f}=dP(c),p=c?f?"multiline":"singleline":r,{className:g,nodeRef:v}=pP(),x=Gs(),w=y.useRef(null),S=y.useRef(null),{announce:k}=lS(),B=pt();return y.useEffect(()=>{var z,P;const j=(z=S.current)===null||z===void 0?void 0:z.textContent,N=(P=w.current)===null||P===void 0?void 0:P.textContent,M=[j,N].filter(Boolean).join(",");k(M,{polite:s==="polite",alert:s==="assertive"})},[S,w,k,s]),{components:{root:"div",icon:"div",bottomReflowSpacer:"div"},root:me(rt("div",{ref:Oe(t,u,v,x),role:"group","aria-labelledby":B,...e}),{elementType:"div"}),icon:Ne(e.icon,{renderByDefault:!0,elementType:"div"}),bottomReflowSpacer:Ne(e.bottomReflowSpacer,{renderByDefault:p==="multiline",elementType:"div"}),layout:p,intent:n,transitionClassName:g,actionsRef:w,bodyRef:S,titleId:B}},gP=(e,t)=>{const{shape:r="rounded",...n}=e,a=hP(n,t);return{...a,shape:r,icon:Ne(e.icon,{defaultProps:{children:uP(a.intent)},renderByDefault:!0,elementType:"div"})}},rb=y.createContext(void 0),mP={titleId:"",layout:"singleline",actionsRef:y.createRef(),bodyRef:y.createRef()},vP=rb.Provider,ob=()=>{var e;return(e=y.useContext(rb))!==null&&e!==void 0?e:mP},bP=(e,t)=>J(vP,{value:t.messageBar,children:Le(e.root,{children:[e.icon&&J(e.icon,{}),e.root.children,e.bottomReflowSpacer&&J(e.bottomReflowSpacer,{})]})}),Od={root:"fui-MessageBar",icon:"fui-MessageBar__icon",bottomReflowSpacer:"fui-MessageBar__bottomReflowSpacer"},yP=ze("r2oyxsj","r1wuyrhw",['.r2oyxsj{white-space:nowrap;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:1fr;grid-template-areas:"icon body secondaryActions actions";padding-left:var(--spacingHorizontalM);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);align-items:center;min-height:36px;box-sizing:border-box;background-color:var(--colorNeutralBackground3);}','.r1wuyrhw{white-space:nowrap;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:1fr;grid-template-areas:"icon body secondaryActions actions";padding-right:var(--spacingHorizontalM);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);align-items:center;min-height:36px;box-sizing:border-box;background-color:var(--colorNeutralBackground3);}']),xP=ze("r1df1z33","rivnfjc",[".r1df1z33{grid-area:icon;font-size:var(--fontSizeBase500);margin-right:var(--spacingHorizontalS);color:var(--colorNeutralForeground3);display:flex;align-items:center;}",".rivnfjc{grid-area:icon;font-size:var(--fontSizeBase500);margin-left:var(--spacingHorizontalS);color:var(--colorNeutralForeground3);display:flex;align-items:center;}"]),wP=ze("r1vx593n",null,[".r1vx593n{margin-bottom:var(--spacingVerticalS);grid-area:secondaryActions;}"]),kP=le({rootMultiline:{Huce71:"f6juhto",Bt984gj:"f1s2louj",z8tnut:"f1ngh7ph",Budl1dq:"f17g0uqy",zoa1oz:"f1w7oly7"},secondaryActionsMultiline:{Brf1p80:"f1e8xxv9",B6of3ja:"f1gaxbfw",jrapky:"fqcjy3b",t21cq0:["fibjyge","f9yszdx"]},square:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"fokr779"}},{d:[".f6juhto{white-space:normal;}",".f1s2louj{align-items:start;}",".f1ngh7ph{padding-top:var(--spacingVerticalMNudge);}",".f17g0uqy{grid-template-columns:auto 1fr auto;}",'.f1w7oly7{grid-template-areas:"icon body actions" "secondaryActions secondaryActions secondaryActions";}',".f1e8xxv9{justify-content:end;}",".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}",".fqcjy3b{margin-bottom:var(--spacingVerticalS);}",".fibjyge{margin-right:0px;}",".f9yszdx{margin-left:0px;}",[".fokr779{border-radius:0;}",{p:-1}]]}),SP=le({info:{},error:{sj55zd:"f1ca9wz"},warning:{sj55zd:"f14a4cve"},success:{sj55zd:"f36rra6"}},{d:[".f1ca9wz{color:var(--colorStatusDangerForeground1);}",".f14a4cve{color:var(--colorStatusWarningForeground3);}",".f36rra6{color:var(--colorStatusSuccessForeground1);}"]}),BP=le({info:{},error:{De3pzq:"f1eon7jj",g2u3we:"f1f8dvr7",h3c5rm:["f1g1ijmo","f1nxacbt"],B9xav0g:"fo25q1j",zhjwy3:["f1nxacbt","f1g1ijmo"]},warning:{De3pzq:"f13ftzij",g2u3we:"frd1ypx",h3c5rm:["f1gyjrma","f18qd5xz"],B9xav0g:"fqyqtrt",zhjwy3:["f18qd5xz","f1gyjrma"]},success:{De3pzq:"f64thcm",g2u3we:"f1b4u7v",h3c5rm:["f1nyd2b1","f70v3om"],B9xav0g:"fk173vo",zhjwy3:["f70v3om","f1nyd2b1"]}},{d:[".f1eon7jj{background-color:var(--colorStatusDangerBackground1);}",".f1f8dvr7{border-top-color:var(--colorStatusDangerBorder1);}",".f1g1ijmo{border-right-color:var(--colorStatusDangerBorder1);}",".f1nxacbt{border-left-color:var(--colorStatusDangerBorder1);}",".fo25q1j{border-bottom-color:var(--colorStatusDangerBorder1);}",".f13ftzij{background-color:var(--colorStatusWarningBackground1);}",".frd1ypx{border-top-color:var(--colorStatusWarningBorder1);}",".f1gyjrma{border-right-color:var(--colorStatusWarningBorder1);}",".f18qd5xz{border-left-color:var(--colorStatusWarningBorder1);}",".fqyqtrt{border-bottom-color:var(--colorStatusWarningBorder1);}",".f64thcm{background-color:var(--colorStatusSuccessBackground1);}",".f1b4u7v{border-top-color:var(--colorStatusSuccessBorder1);}",".f1nyd2b1{border-right-color:var(--colorStatusSuccessBorder1);}",".f70v3om{border-left-color:var(--colorStatusSuccessBorder1);}",".fk173vo{border-bottom-color:var(--colorStatusSuccessBorder1);}"]}),zP=e=>{const t=yP(),r=xP(),n=SP(),a=BP(),s=wP(),c=kP();return e.root.className=Q(Od.root,t,e.layout==="multiline"&&c.rootMultiline,e.shape==="square"&&c.square,a[e.intent],e.root.className),e.icon&&(e.icon.className=Q(Od.icon,r,n[e.intent],e.icon.className)),e.bottomReflowSpacer&&(e.bottomReflowSpacer.className=Q(Od.bottomReflowSpacer,s)),e};function jP(e){const{layout:t,actionsRef:r,bodyRef:n,titleId:a}=e;return{messageBar:y.useMemo(()=>({layout:t,actionsRef:r,bodyRef:n,titleId:a}),[t,r,n,a])}}const at=y.forwardRef((e,t)=>{const r=gP(e,t);return zP(r),Pe("useMessageBarStyles_unstable")(r),bP(r,jP(r))});at.displayName="MessageBar";const _P=(e,t)=>{const{titleId:r}=ob();return{components:{root:"span"},root:me(rt("span",{ref:t,id:r,...e}),{elementType:"span"})}},CP=e=>J(e.root,{}),NP={root:"fui-MessageBarTitle"},TP=ze("r168xkm9",null,[".r168xkm9{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase300);}",'.r168xkm9::after{content:" ";}']),PP=e=>{const t=TP();return e.root.className=Q(NP.root,t,e.root.className),e},di=y.forwardRef((e,t)=>{const r=_P(e,t);return PP(r),Pe("useMessageBarTitleStyles_unstable")(r),CP(r)});di.displayName="MessageBarTitle";const RP=(e,t)=>{const{bodyRef:r}=ob();return{components:{root:"div"},root:me(rt("div",{ref:Oe(t,r),...e}),{elementType:"div"})}},MP=(e,t)=>J(c8,{value:t.link,children:J(e.root,{})}),EP={root:"fui-MessageBarBody"},IP=ze("rtatq2b","re2rary",[".rtatq2b{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);grid-area:body;padding-right:var(--spacingHorizontalM);}",".re2rary{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);grid-area:body;padding-left:var(--spacingHorizontalM);}"]),FP=e=>{const t=IP();return e.root.className=Q(EP.root,t,e.root.className),e};function AP(e){return{link:y.useMemo(()=>({inline:!0}),[])}}const st=y.forwardRef((e,t)=>{const r=RP(e,t),n=AP();return FP(r),Pe("useMessageBarBodyStyles_unstable")(r),MP(r,n)});st.displayName="MessageBarBody";function Tt(e,t){DP(e)&&(e="100%");var r=qP(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function kl(e){return Math.min(1,Math.max(0,e))}function DP(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qP(e){return typeof e=="string"&&e.indexOf("%")!==-1}function nb(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Sl(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bn(e){return e.length===1?"0"+e:String(e)}function OP(e,t,r){return{r:Tt(e,255)*255,g:Tt(t,255)*255,b:Tt(r,255)*255}}function ib(e,t,r){e=Tt(e,255),t=Tt(t,255),r=Tt(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),s=0,c=0,u=(n+a)/2;if(n===a)c=0,s=0;else{var f=n-a;switch(c=u>.5?f/(2-n-a):f/(n+a),n){case e:s=(t-r)/f+(t<r?6:0);break;case t:s=(r-e)/f+2;break;case r:s=(e-t)/f+4;break}s/=6}return{h:s,s:c,l:u}}function Hd(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function HP(e,t,r){var n,a,s;if(e=Tt(e,360),t=Tt(t,100),r=Tt(r,100),t===0)a=r,s=r,n=r;else{var c=r<.5?r*(1+t):r+t-r*t,u=2*r-c;n=Hd(u,c,e+1/3),a=Hd(u,c,e),s=Hd(u,c,e-1/3)}return{r:n*255,g:a*255,b:s*255}}function ab(e,t,r){e=Tt(e,255),t=Tt(t,255),r=Tt(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),s=0,c=n,u=n-a,f=n===0?0:u/n;if(n===a)s=0;else{switch(n){case e:s=(t-r)/u+(t<r?6:0);break;case t:s=(r-e)/u+2;break;case r:s=(e-t)/u+4;break}s/=6}return{h:s,s:f,v:c}}function LP(e,t,r){e=Tt(e,360)*6,t=Tt(t,100),r=Tt(r,100);var n=Math.floor(e),a=e-n,s=r*(1-t),c=r*(1-a*t),u=r*(1-(1-a)*t),f=n%6,p=[r,c,s,s,u,r][f],g=[u,r,r,c,s,s][f],v=[s,s,u,r,r,c][f];return{r:p*255,g:g*255,b:v*255}}function sb(e,t,r,n){var a=[Bn(Math.round(e).toString(16)),Bn(Math.round(t).toString(16)),Bn(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function VP(e,t,r,n,a){var s=[Bn(Math.round(e).toString(16)),Bn(Math.round(t).toString(16)),Bn(Math.round(r).toString(16)),Bn(WP(n))];return a&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function WP(e){return Math.round(parseFloat(e)*255).toString(16)}function lb(e){return ir(e)/255}function ir(e){return parseInt(e,16)}function $P(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ld={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function UP(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,s=null,c=!1,u=!1;return typeof e=="string"&&(e=KP(e)),typeof e=="object"&&(no(e.r)&&no(e.g)&&no(e.b)?(t=OP(e.r,e.g,e.b),c=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):no(e.h)&&no(e.s)&&no(e.v)?(n=Sl(e.s),a=Sl(e.v),t=LP(e.h,n,a),c=!0,u="hsv"):no(e.h)&&no(e.s)&&no(e.l)&&(n=Sl(e.s),s=Sl(e.l),t=HP(e.h,n,s),c=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=nb(r),{ok:c,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var GP="[-\\+]?\\d+%?",XP="[-\\+]?\\d*\\.\\d+%?",Mo="(?:".concat(XP,")|(?:").concat(GP,")"),Vd="[\\s|\\(]+(".concat(Mo,")[,|\\s]+(").concat(Mo,")[,|\\s]+(").concat(Mo,")\\s*\\)?"),Wd="[\\s|\\(]+(".concat(Mo,")[,|\\s]+(").concat(Mo,")[,|\\s]+(").concat(Mo,")[,|\\s]+(").concat(Mo,")\\s*\\)?"),Tr={CSS_UNIT:new RegExp(Mo),rgb:new RegExp("rgb"+Vd),rgba:new RegExp("rgba"+Wd),hsl:new RegExp("hsl"+Vd),hsla:new RegExp("hsla"+Wd),hsv:new RegExp("hsv"+Vd),hsva:new RegExp("hsva"+Wd),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function KP(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ld[e])e=Ld[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Tr.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Tr.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Tr.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Tr.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Tr.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Tr.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Tr.hex8.exec(e),r?{r:ir(r[1]),g:ir(r[2]),b:ir(r[3]),a:lb(r[4]),format:t?"name":"hex8"}:(r=Tr.hex6.exec(e),r?{r:ir(r[1]),g:ir(r[2]),b:ir(r[3]),format:t?"name":"hex"}:(r=Tr.hex4.exec(e),r?{r:ir(r[1]+r[1]),g:ir(r[2]+r[2]),b:ir(r[3]+r[3]),a:lb(r[4]+r[4]),format:t?"name":"hex8"}:(r=Tr.hex3.exec(e),r?{r:ir(r[1]+r[1]),g:ir(r[2]+r[2]),b:ir(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function no(e){return!!Tr.CSS_UNIT.exec(String(e))}var YP=(function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=$P(t)),this.originalInput=t;var a=UP(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,a,s=t.r/255,c=t.g/255,u=t.b/255;return s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),c<=.03928?n=c/12.92:n=Math.pow((c+.055)/1.055,2.4),u<=.03928?a=u/12.92:a=Math.pow((u+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=nb(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=ab(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=ab(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=ib(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=ib(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),sb(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),VP(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Tt(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Tt(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+sb(this.r,this.g,this.b,!1),r=0,n=Object.entries(Ld);r<n.length;r++){var a=n[r],s=a[0],c=a[1];if(t===c)return s}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,a=this.a<1&&this.a>=0,s=!r&&a&&(t.startsWith("hex")||t==="name");return s?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=kl(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=kl(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=kl(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=kl(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),a=new e(t).toRgb(),s=r/100,c={r:(a.r-n.r)*s+n.r,g:(a.g-n.g)*s+n.g,b:(a.b-n.b)*s+n.b,a:(a.a-n.a)*s+n.a};return new e(c)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,s=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,s.push(new e(n));return s},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,a=r.s,s=r.v,c=[],u=1/t;t--;)c.push(new e({h:n,s:a,v:s})),s=(s+u)%1;return c},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),a=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/a,g:(r.g*r.a+n.g*n.a*(1-r.a))/a,b:(r.b*r.a+n.b*n.a*(1-r.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,a=[this],s=360/t,c=1;c<t;c++)a.push(new e({h:(n+c*s)%360,s:r.s,l:r.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e})();function Bl(e,t){return e===void 0&&(e=""),t===void 0&&(t={}),new YP(e,t)}const zl={root:"fui-ColorSlider",rail:"fui-ColorSlider__rail",thumb:"fui-ColorSlider__thumb",input:"fui-ColorSlider__input"},jl={sliderDirectionVar:"--fui-Slider--direction",sliderProgressVar:"--fui-Slider--progress",thumbColorVar:"--fui-Slider__thumb--color",railColorVar:"--fui-Slider__rail--color"},QP=ze("r1j9hj9j",null,[".r1j9hj9j{position:relative;display:inline-grid;touch-action:none;align-items:center;justify-items:center;--fui-Slider__thumb--size:20px;--fui-Slider__rail--size:20px;min-height:32px;}"]),ZP=le({horizontal:{Bf4jedk:"f93ek0f",wkccdc:"fgfd48t",Budl1dq:"f11e9psi"},vertical:{sshi5w:"fwwq4i4",wkccdc:"fqcvrs3",Budl1dq:"fiadc6h"}},{d:[".f93ek0f{min-width:200px;}",".fgfd48t{grid-template-rows:1fr var(--fui-Slider__thumb--size) 1fr;}",".f11e9psi{grid-template-columns:1fr 100% 1fr;}",".fwwq4i4{min-height:280px;}",".fqcvrs3{grid-template-rows:1fr 100% 1fr;}",".fiadc6h{grid-template-columns:1fr var(--fui-Slider__thumb--size) 1fr;}"]}),JP=le({hue:{Bcmaq0h:"f1curpo1"},saturation:{Bcmaq0h:["fdhcg5e","f1onqon0"]},value:{Bcmaq0h:["f1r1ueul","fbtriqu"]}},{d:[".f1curpo1{background-image:linear-gradient(var(--fui-Slider--direction),red,fuchsia,blue,aqua,lime,yellow,red);}",".fdhcg5e{background-image:linear-gradient(to right, #808080, var(--fui-Slider__rail--color));}",".f1onqon0{background-image:linear-gradient(to left, #808080, var(--fui-Slider__rail--color));}",".f1r1ueul{background-image:linear-gradient(to right, #000, var(--fui-Slider__rail--color));}",".fbtriqu{background-image:linear-gradient(to left, #000, var(--fui-Slider__rail--color));}"]}),eR=le({rail:{Bkecrkj:"f1aehjj5",Ijaq50:"faunodf",nk6f5a:"f88nxoq",Br312pm:"fd46tj4",Bw0ie65:"f1e2fz10",qhf8xq:"f10pi13n",Bvjb7m6:"fdgv6k0",Bpd4iqm:"fpvhumw",oeaueh:"f1yog68k",Bw0xxkn:"f13sgyd8",Ftih45:"fzhtfnv",Brfgrao:"f1j7ml58"},horizontal:{a9b677:"fly5x3f",Bqenvij:"f1cy86ho",Fbdkly:["f1heqfse","fkh49vu"],mdwyqc:["fkh49vu","f1heqfse"],Baz25je:"f16tdq4e"},vertical:{a9b677:"fqxfnkd",Bqenvij:"f1l02sjl",Ccq8qp:"f1rik0od",Bciustq:"f14xwovp",lawp4y:"febq2dz"}},{d:[".f1aehjj5{pointer-events:none;}",".faunodf{grid-row-start:2;}",".f88nxoq{grid-row-end:2;}",".fd46tj4{grid-column-start:2;}",".f1e2fz10{grid-column-end:2;}",".f10pi13n{position:relative;}",".fdgv6k0{forced-color-adjust:none;}",".fpvhumw{outline-width:1px;}",".f1yog68k{outline-style:solid;}",".f13sgyd8{outline-color:var(--colorTransparentStroke);}",".fzhtfnv::before{content:'';}",".f1j7ml58::before{position:absolute;}",".fly5x3f{width:100%;}",".f1cy86ho{height:var(--fui-Slider__rail--size);}",".f1heqfse::before{left:-1px;}",".fkh49vu::before{right:-1px;}",".f16tdq4e::before{height:var(--fui-Slider__rail--size);}",".fqxfnkd{width:var(--fui-Slider__rail--size);}",".f1l02sjl{height:100%;}",".f1rik0od::before{width:var(--fui-Slider__rail--size);}",".f14xwovp::before{top:-1px;}",".febq2dz::before{bottom:1px;}"]}),tR=le({thumb:{Ijaq50:"faunodf",nk6f5a:"f88nxoq",Br312pm:"fd46tj4",Bw0ie65:"f1e2fz10",qhf8xq:"f1euv43f",a9b677:"f174ca62",Bqenvij:"f1yfdkfd",Bkecrkj:"f1aehjj5",oeaueh:"f1s6fcnf",Bvjb7m6:"fdgv6k0",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1lvq45z",E5pizo:"f1whvlc6",De3pzq:"foksa45",Brfgrao:"f1j7ml58",lawp4y:0,Fbdkly:0,mdwyqc:0,Bciustq:0,gc50h5:"f1abv9ik",r59vdv:0,Budzafs:0,ck0cow:0,n07z76:0,Gng75u:"fielpny",Bcvre1j:"fyl8oag",Ftih45:"fzhtfnv",Bcgcnre:0,Bqjgrrk:0,qa3bma:0,y0oebl:0,Biqmznv:0,Bm6vgfq:0,Bbv0w2i:0,uvfttm:0,eqrjj:0,Bk5zm6e:0,m598lv:0,B4f6apu:0,ydt019:0,Bq4z7u6:0,Bdkvgpv:0,B0qfbqy:0,kj8mxx:"f3i7wkk"},horizontal:{Bz10aip:["f13gfj74","f1nfknbn"],oyh7mz:["f1fj3zth","fcf9u6w"]},vertical:{Bz10aip:"f5cv5a3",B5kzvoi:"feeniun"}},{d:[".faunodf{grid-row-start:2;}",".f88nxoq{grid-row-end:2;}",".fd46tj4{grid-column-start:2;}",".f1e2fz10{grid-column-end:2;}",".f1euv43f{position:absolute;}",".f174ca62{width:var(--fui-Slider__thumb--size);}",".f1yfdkfd{height:var(--fui-Slider__thumb--size);}",".f1aehjj5{pointer-events:none;}",".f1s6fcnf{outline-style:none;}",".fdgv6k0{forced-color-adjust:none;}",[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".f1lvq45z{border:var(--strokeWidthThin) solid var(--colorNeutralForeground4);}",{p:-2}],".f1whvlc6{box-shadow:var(--shadow4);}",".foksa45{background-color:var(--fui-Slider__thumb--color);}",".f1j7ml58::before{position:absolute;}",[".f1abv9ik::before{inset:0px;}",{p:-1}],[".fielpny::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],".fyl8oag::before{box-sizing:border-box;}",".fzhtfnv::before{content:'';}",[".f3i7wkk::before{border:var(--strokeWidthThick) solid var(--colorNeutralBackground1);}",{p:-2}],".f13gfj74{transform:translateX(-50%);}",".f1nfknbn{transform:translateX(50%);}",".f1fj3zth{left:var(--fui-Slider--progress);}",".fcf9u6w{right:var(--fui-Slider--progress);}",".f5cv5a3{transform:translateY(50%);}",".feeniun{bottom:var(--fui-Slider--progress);}"]}),rR=le({rounded:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5"},square:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f1fabniw"}},{d:[[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],[".f1fabniw{border-radius:var(--borderRadiusNone);}",{p:-1}]]}),oR=le({input:{Bceei9c:"f1k6fduh",abs64n:"fk73vx1",Ijaq50:"f16hsg94",nk6f5a:"f1nzqi2z",Br312pm:"fwpfdsa",Bw0ie65:"fuur7zz",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1mk8lai",jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1s184ao",jo39rj:0,C5zqim:0,Bdlbwnu:0,B8rk77i:0,Bbzx7hc:0,Hwkvcz:0,B0nnt1c:0,Brwsv5j:0,B2b7vog:0,B4hmq5e:0,B8jxwem:0,B18nadz:0,Ddg5ig:0,Byj09el:0,Dac2s3:0,Dd2y6r:0,Bk0t58e:"f1nq8t98",Ewenww:0,Brqi8qb:0,zz3kca:0,low6xx:"fjt56wq",d0s10n:0,wea7l5:0,olu5tv:0,g5nsvh:0,Bqvnfwh:"f1n9m442"},horizontal:{Bqenvij:"f1yfdkfd",a9b677:"fly5x3f"},vertical:{Bqenvij:"f1l02sjl",a9b677:"f174ca62",Biqzhck:"f1r7j8g6",kgocjf:["f1va4sj6","f1r2v9sp"]}},{d:[".f1k6fduh{cursor:pointer;}",".fk73vx1{opacity:0;}",".f16hsg94{grid-row-start:1;}",".f1nzqi2z{grid-row-end:-1;}",".fwpfdsa{grid-column-start:1;}",".fuur7zz{grid-column-end:-1;}",[".f1mk8lai{padding:0;}",{p:-1}],[".f1s184ao{margin:0;}",{p:-1}],".f1yfdkfd{height:var(--fui-Slider__thumb--size);}",".fly5x3f{width:100%;}",".f1l02sjl{height:100%;}",".f174ca62{width:var(--fui-Slider__thumb--size);}",".f1r7j8g6{writing-mode:vertical-lr;}",".f1va4sj6{direction:rtl;}",".f1r2v9sp{direction:ltr;}"],i:[[".f1nq8t98:focus-visible~.fui-ColorSlider__thumb{border:2px solid var(--colorStrokeFocus2);}",{p:-2}],[".fjt56wq:focus-visible~.fui-ColorSlider__thumb{outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);}",{p:-1}],[".f1n9m442:focus-visible~.fui-ColorSlider__thumb{border-radius:var(--borderRadiusCircular);}",{p:-1}]]}),nR=e=>{const t=QP(),r=ZP(),n=eR(),a=tR(),s=oR(),c=rR(),u=JP(),f=e.vertical;return e.root.className=Q(zl.root,t,f?r.vertical:r.horizontal,e.root.className),e.rail.className=Q(zl.rail,n.rail,u[e.channel||"hue"],c[e.shape||"rounded"],f?n.vertical:n.horizontal,e.rail.className),e.thumb.className=Q(zl.thumb,a.thumb,f?a.vertical:a.horizontal,e.thumb.className),e.input.className=Q(zl.input,s.input,f?s.vertical:s.horizontal,e.input.className),e},iR={requestChange:()=>{},color:void 0,shape:"rounded"},cb=Lr(void 0),aR=cb.Provider,fi=e=>eo(cb,(t=iR)=>e(t)),$d=0,ub=100,db=360,fb=Bl("#FFF").toHsv(),sR=(e,t,r)=>r===t?0:(e-t)/(r-t)*100;function Ud({h:e=0,s:t=0,v:r=0,a:n=1}){return{h:e,s:t,v:r,a:n}}function Gd(e,t="hue"){return oa(e,$d,t==="hue"?db:ub)}function pb(e,t){return t[e]||t.hue}const lR=(e,t)=>{"use no memo";const{dir:r}=He(),n=fi(te=>te.requestChange),a=fi(te=>te.color),s=fi(te=>te.shape),c=yo({props:e,primarySlotTagName:"input",excludedPropNames:["onChange","color"]}),{color:u,channel:f="hue",onChange:p=n,shape:g=s,vertical:v,root:x,input:w,rail:S,thumb:k}=e,B=u||a,z=Bl(B).toHsl(),[P,j]=Bt({defaultState:e.defaultColor,state:B,initialState:fb}),N=f==="hue"?db:ub,M={hue:Gd(P.h),saturation:Gd(P.s*100),value:Gd(P.v*100)},C=pb(f,M),I=sR(C,$d,N),A=w?.onChange,ae=ce(te=>{const W=Number(te.target.value),X=pb(f,{hue:()=>Ud({...B,h:W}),saturation:()=>Ud({...B,s:W/100}),value:()=>Ud({...B,v:W/100})})();j(X),A?.(te),p?.(te,{type:"change",event:te,color:X})}),de={[jl.sliderDirectionVar]:v?"180deg":r==="ltr"?"-90deg":"90deg",[jl.sliderProgressVar]:`${I}%`,[jl.thumbColorVar]:f==="hue"?`hsl(${C}, 100%, 50%)`:Bl(B).toRgbString(),[jl.railColorVar]:f==="hue"?`hsl(${z.h} ${z.s*100}%, ${z.l*100}%)`:`hsl(${z.h} 100%, 50%)`},ee={shape:g,vertical:v,channel:f,components:{input:"input",rail:"div",root:"div",thumb:"div"},root:me(x,{defaultProps:{role:"group",...c.root},elementType:"div"}),input:me(w,{defaultProps:{id:pt("slider-",e.id),ref:t,min:$d,max:N,tabIndex:0,"aria-orientation":v?"vertical":"horizontal",...c.primary,type:"range"},elementType:"input"}),rail:me(S,{elementType:"div"}),thumb:me(k,{elementType:"div"})};return ee.root.style={...de,...ee.root.style},ee.input.value=C,ee.input.onChange=ae,ee},cR=e=>Le(e.root,{children:[J(e.input,{}),J(e.rail,{}),J(e.thumb,{})]}),hb=y.forwardRef((e,t)=>{const r=lR(e,t);return nR(r),Pe("useColorSliderStyles_unstable")(r),cR(r)});hb.displayName="ColorSlider";const uR=(e,t)=>{const{color:r,onColorChange:n,shape:a,...s}=e,c=ce((u,f)=>{n?.(u,{type:"change",event:u,color:f.color})});return{components:{root:"div"},root:me(rt("div",{ref:t,...s}),{elementType:"div"}),color:r,requestChange:c,shape:a}},dR=(e,t)=>J(aR,{value:t.colorPicker,children:J(e.root,{children:e.root.children})}),fR={root:"fui-ColorPicker"},pR=le({root:{mc9l5x:"f22iagw",Beiy3e4:"f1vx9l62",i8kkvl:0,Belr9w4:0,rmohyg:"f7e3wsx"}},{d:[".f22iagw{display:flex;}",".f1vx9l62{flex-direction:column;}",[".f7e3wsx{gap:var(--spacingVerticalXS);}",{p:-1}]]}),hR=e=>{const t=pR();return e.root.className=Q(fR.root,t.root,e.root.className),e},gR=e=>{const{color:t,shape:r,requestChange:n}=e;return{colorPicker:y.useMemo(()=>({requestChange:n,color:t,shape:r}),[n,t,r])}},gb=y.forwardRef((e,t)=>{const r=uR(e,t),n=gR(r);return hR(r),Pe("useColorPickerStyles_unstable")(r),dR(r,n)});gb.displayName="ColorPicker";const _l={root:"fui-ColorArea",thumb:"fui-ColorArea__thumb",inputX:"fui-ColorArea__inputX",inputY:"fui-ColorArea__inputY"},Cl={areaXProgressVar:"--fui-AreaX--progress",areaYProgressVar:"--fui-AreaY--progress",thumbColorVar:"--fui-Area__thumb--color",mainColorVar:"--fui-Area--main-color"},mR=ze("r77w3t7","r9og4es",[".r77w3t7{position:relative;border:1px solid var(--colorNeutralStroke1);background:linear-gradient(to bottom, transparent, #000),linear-gradient(to right, #fff, transparent),var(--fui-Area--main-color);forced-color-adjust:none;display:inline-grid;touch-action:none;align-items:start;justify-items:start;--fui-Slider__thumb--size:20px;min-width:300px;min-height:300px;box-sizing:border-box;margin-bottom:var(--spacingVerticalSNudge);}",".r9og4es{position:relative;border:1px solid var(--colorNeutralStroke1);background:linear-gradient(to bottom, transparent, #000),linear-gradient(to left, #fff, transparent),var(--fui-Area--main-color);forced-color-adjust:none;display:inline-grid;touch-action:none;align-items:start;justify-items:start;--fui-Slider__thumb--size:20px;min-width:300px;min-height:300px;box-sizing:border-box;margin-bottom:var(--spacingVerticalSNudge);}"]),vR=le({thumb:{qhf8xq:"f1euv43f",a9b677:"f174ca62",Bqenvij:"f1yfdkfd",Bkecrkj:"f1aehjj5",oeaueh:"f1s6fcnf",Bvjb7m6:"fdgv6k0",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1lvq45z",E5pizo:"f1whvlc6",De3pzq:"fqogvx2",Bz10aip:["f1g1iug4","f11okln6"],oyh7mz:["f1r4bsg1","fwsk87b"],B5kzvoi:"f1rtkqdg",Brfgrao:"f1j7ml58",lawp4y:0,Fbdkly:0,mdwyqc:0,Bciustq:0,gc50h5:"f1abv9ik",r59vdv:0,Budzafs:0,ck0cow:0,n07z76:0,Gng75u:"fielpny",Bcvre1j:"fyl8oag",Ftih45:"fzhtfnv",Bcgcnre:0,Bqjgrrk:0,qa3bma:0,y0oebl:0,Biqmznv:0,Bm6vgfq:0,Bbv0w2i:0,uvfttm:0,eqrjj:0,Bk5zm6e:0,m598lv:0,B4f6apu:0,ydt019:0,Bq4z7u6:0,Bdkvgpv:0,B0qfbqy:0,kj8mxx:"f3i7wkk"},focusIndicator:{Brovlpu:"ftqa4ok",B486eqv:"f2hkw1w",Bssx7fj:"f1b1k54r",uh7if5:["f4ne723","fqqcjud"],clntm0:"fh7aioi",Dlk2r6:["fqqcjud","f4ne723"],h6p2u:"f1ufm4qn",I6qiy5:["f1qnwcb4","fgrk5zm"],yzno9d:"fi52z01",By0wis0:["fgrk5zm","f1qnwcb4"],B2j2mmj:"ffht0p2",wigs8:"f1p0ul1q",pbfy6t:"f1c901ms",B0v4ure:"f1alokd7",Byrf0fs:0,Bsiemmq:0,Bwckmig:0,skfxo0:0,Iidy0u:0,B98u21t:0,Bvwlmkc:0,jo1ztg:0,Ba1iezr:0,Blmvk6g:0,B24cy0v:0,Bil7v7r:0,Br3gin4:0,nr063g:0,ghq09:0,Bbgo44z:0,Bseh09z:"f1i978nd",az1dzo:0,Ba3ybja:0,B6352mv:0,vppk2z:0,Biaj6j7:"f16hcqkr",B2pnrqr:"f1tye2sp",B29w5g4:["flw7qy0","f1t01kh7"],Bhhzhcn:"frujvlw",Bec0n69:["f1t01kh7","flw7qy0"]}},{d:[".f1euv43f{position:absolute;}",".f174ca62{width:var(--fui-Slider__thumb--size);}",".f1yfdkfd{height:var(--fui-Slider__thumb--size);}",".f1aehjj5{pointer-events:none;}",".f1s6fcnf{outline-style:none;}",".fdgv6k0{forced-color-adjust:none;}",[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".f1lvq45z{border:var(--strokeWidthThin) solid var(--colorNeutralForeground4);}",{p:-2}],".f1whvlc6{box-shadow:var(--shadow4);}",".fqogvx2{background-color:var(--fui-Area__thumb--color);}",".f1g1iug4{transform:translate(-50%, 50%);}",".f11okln6{transform:translate(50%, 50%);}",".f1r4bsg1{left:var(--fui-AreaX--progress);}",".fwsk87b{right:var(--fui-AreaX--progress);}",".f1rtkqdg{bottom:var(--fui-AreaY--progress);}",".f1j7ml58::before{position:absolute;}",[".f1abv9ik::before{inset:0px;}",{p:-1}],[".fielpny::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],".fyl8oag::before{box-sizing:border-box;}",".fzhtfnv::before{content:'';}",[".f3i7wkk::before{border:var(--strokeWidthThick) solid var(--colorNeutralBackground1);}",{p:-2}],".f1b1k54r[data-fui-focus-within]:focus-within{border-top-color:transparent;}",".f4ne723[data-fui-focus-within]:focus-within{border-right-color:transparent;}",".fqqcjud[data-fui-focus-within]:focus-within{border-left-color:transparent;}",".fh7aioi[data-fui-focus-within]:focus-within{border-bottom-color:transparent;}",'.ffht0p2[data-fui-focus-within]:focus-within::after{content:"";}',".f1p0ul1q[data-fui-focus-within]:focus-within::after{position:absolute;}",".f1c901ms[data-fui-focus-within]:focus-within::after{pointer-events:none;}",".f1alokd7[data-fui-focus-within]:focus-within::after{z-index:1;}",[".f1i978nd[data-fui-focus-within]:focus-within::after{border:var(--strokeWidthThick) solid var(--colorStrokeFocus2);}",{p:-2}],[".f16hcqkr[data-fui-focus-within]:focus-within::after{border-radius:var(--borderRadiusCircular);}",{p:-1}],".f1tye2sp[data-fui-focus-within]:focus-within::after{top:calc(var(--strokeWidthThick) * -1);}",".flw7qy0[data-fui-focus-within]:focus-within::after{right:calc(var(--strokeWidthThick) * -1);}",".f1t01kh7[data-fui-focus-within]:focus-within::after{left:calc(var(--strokeWidthThick) * -1);}",".frujvlw[data-fui-focus-within]:focus-within::after{bottom:calc(var(--strokeWidthThick) * -1);}"],f:[".ftqa4ok:focus{outline-style:none;}"],i:[".f2hkw1w:focus-visible{outline-style:none;}"],m:[["@media (forced-colors: active){.f1ufm4qn[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1qnwcb4[data-fui-focus-within]:focus-within::after{border-right-color:Highlight;}.fgrk5zm[data-fui-focus-within]:focus-within::after{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fi52z01[data-fui-focus-within]:focus-within::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}]]}),bR=le({input:{B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",qhf8xq:"f1euv43f",Bkecrkj:"f1aehjj5",Bhzewxz:"f15twtuk",oyh7mz:["f1vgc2s3","f1e31b4d"],abs64n:"fk73vx1",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1mk8lai",jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1s184ao",a9b677:"fly5x3f",Bqenvij:"f1l02sjl"}},{d:[[".f1a3p1vp{overflow:hidden;}",{p:-1}],".f1euv43f{position:absolute;}",".f1aehjj5{pointer-events:none;}",".f15twtuk{top:0;}",".f1vgc2s3{left:0;}",".f1e31b4d{right:0;}",".fk73vx1{opacity:0;}",[".f1mk8lai{padding:0;}",{p:-1}],[".f1s184ao{margin:0;}",{p:-1}],".fly5x3f{width:100%;}",".f1l02sjl{height:100%;}"]}),yR=le({rounded:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5"},square:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f1fabniw"}},{d:[[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],[".f1fabniw{border-radius:var(--borderRadiusNone);}",{p:-1}]]}),xR=e=>{const t=mR(),r=vR(),n=bR(),a=yR();return e.root.className=Q(_l.root,t,a[e.shape||"rounded"],e.root.className),e.thumb.className=Q(_l.thumb,r.thumb,r.focusIndicator,e.thumb.className),e.inputX.className=Q(_l.inputX,n.input,e.inputX.className),e.inputY.className=Q(_l.inputY,n.input,e.inputY.className),e};function wR(e,t){const r=e.getBoundingClientRect(),n=mb((t.clientX-r.left)/r.width),a=mb(1-(t.clientY-r.top)/r.height);return{x:oa(n,0,1),y:oa(a,0,1)}}function mb(e){return Math.round(e*100)/100}const kR=(e,t)=>{const{targetDocument:r}=He(),n=y.useRef(null),a=y.useRef(null),s=y.useRef(null),c=ua(),u=fi(X=>X.requestChange),f=fi(X=>X.color),p=fi(X=>X.shape),{onChange:g=u,shape:v=p,inputX:x,inputY:w,thumb:S,color:k,...B}=e,[z,P]=Bt({defaultState:e.defaultColor,state:k||f,initialState:fb}),j=Math.round(z.s*100),N=Math.round(z.v*100),[M,C]=y.useState(null),I=ce(X=>{if(!n.current)return;const O=wR(n.current,X),Z={...z,s:O.x,v:O.y};P(Z),g?.(X,{type:"change",event:X,color:Z})}),A=y.useCallback(X=>{I(X)},[I]),ae=ce(()=>{r?.removeEventListener("pointermove",A)}),de=ce(X=>{X.stopPropagation(),X.preventDefault(),I(X.nativeEvent),r?.addEventListener("pointermove",A),r?.addEventListener("pointerup",ae,{once:!0})}),ee=ce(X=>{const O=Number(X.target.value)/100,Z={...z,...X.target===a.current&&{s:O},...X.target===s.current&&{v:O}};P(Z),g?.(X,{type:"change",event:X,color:Z})}),te=ce(X=>{let O=0,Z=0,q="x";switch(X.key){case"ArrowUp":X.preventDefault(),q="y",Z=1;break;case"ArrowDown":X.preventDefault(),q="y",Z=-1;break;case"ArrowLeft":X.preventDefault(),q="x",O=-1;break;case"ArrowRight":X.preventDefault(),q="x",O=1;break}if(O===0&&Z===0)return;const G={...z,s:Math.min(Math.max(z.s+O/100,0),1),v:Math.min(Math.max(z.v+Z/100,0),1)};P(G),C(q),g?.(X,{type:"change",event:X,color:G})}),W={[Cl.areaXProgressVar]:`${j}%`,[Cl.areaYProgressVar]:`${N}%`,[Cl.thumbColorVar]:Bl(z).toRgbString(),[Cl.mainColorVar]:`hsl(${z.h}, 100%, 50%)`},Y={shape:v,components:{inputX:"input",inputY:"input",root:"div",thumb:"div"},root:me(rt("div",{ref:t,...B}),{elementType:"div"}),inputX:me(x,{defaultProps:{id:pt("sliderX-"),type:"range",...M&&{tabIndex:M==="x"?0:-1}},elementType:"input"}),inputY:me(w,{defaultProps:{id:pt("sliderY-"),type:"range",tabIndex:M&&M==="y"?0:-1},elementType:"input"}),thumb:me(S,{elementType:"div"})};return Y.root.ref=Oe(Y.root.ref,n),Y.thumb.ref=Oe(Y.thumb.ref,c),Y.inputX.ref=Oe(Y.inputX.ref,a),Y.inputY.ref=Oe(Y.inputY.ref,s),Y.root.style={...Y.root.style,...W},Y.root.onPointerDown=ce(Re(Y.root.onPointerDown,de)),Y.root.onKeyDown=ce(Re(Y.root.onKeyDown,te)),Y.inputX.onChange=ce(Re(Y.inputX.onChange,ee)),Y.inputY.onChange=ce(Re(Y.inputY.onChange,ee)),Y.inputX.value=j,Y.inputY.value=N,Y},SR=e=>J(e.root,{children:Le(e.thumb,{children:[J(e.inputX,{}),J(e.inputY,{})]})}),vb=y.forwardRef((e,t)=>{const r=kR(e,t);return xR(r),Pe("useColorAreaStyles_unstable")(r),SR(r)});vb.displayName="ColorArea";const BR=ut({root:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:T.spacingVerticalM,height:"100vh",padding:T.spacingHorizontalXXL,textAlign:"center"},message:{color:T.colorNeutralForeground3,maxWidth:"480px"}});class zR extends y.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("Theme Studio crashed:",t,r)}handleReset=()=>{this.setState({error:null})};render(){return this.state.error?m.jsx(jR,{error:this.state.error,onReset:this.handleReset}):this.props.children}}function jR({error:e,onReset:t}){const r=BR();return m.jsxs("div",{className:r.root,children:[m.jsx(Zz,{fontSize:40,color:T.colorPaletteRedForeground1}),m.jsx(Ad,{children:"Something went wrong"}),m.jsx(Ie,{className:r.message,children:e.message||"An unexpected error occurred while rendering Theme Studio."}),m.jsx(Me,{appearance:"primary",onClick:t,children:"Try again"})]})}const pi=["darker70","darker60","darker50","darker40","darker30","darker20","darker10","primary","lighter10","lighter20","lighter30","lighter40","lighter50","lighter60","lighter70","lighter80"];function io(e,t,r){return Math.min(r,Math.max(t,e))}function hi(e){const t=e.replace("#",""),r=t.length===3?t.split("").map(a=>a+a).join(""):t,n=parseInt(r,16);if(r.length!==6||Number.isNaN(n))throw new Error(`Invalid HEX colour: "${e}"`);return{r:n>>16&255,g:n>>8&255,b:n&255}}function gi(e,t,r){const n=a=>io(Math.round(a),0,255).toString(16).padStart(2,"0");return`#${n(e)}${n(t)}${n(r)}`.toUpperCase()}function Nl(e,t,r){const n=e/255,a=t/255,s=r/255,c=Math.max(n,a,s),u=Math.min(n,a,s),f=(c+u)/2;if(c===u)return{h:0,s:0,l:f*100};const p=c-u,g=f>.5?p/(2-c-u):p/(c+u);let v;switch(c){case n:v=(a-s)/p+(a<s?6:0);break;case a:v=(s-n)/p+2;break;default:v=(n-a)/p+4}return v*=60,{h:v,s:g*100,l:f*100}}function bb(e,t,r){const n=(e%360+360)%360/360,a=io(t,0,100)/100,s=io(r,0,100)/100;if(a===0){const p=s*255;return{r:p,g:p,b:p}}const c=s<.5?s*(1+a):s+a-s*a,u=2*s-c,f=p=>{let g=p;return g<0&&(g+=1),g>1&&(g-=1),g<1/6?u+(c-u)*6*g:g<1/2?c:g<2/3?u+(c-u)*(2/3-g)*6:u};return{r:f(n+1/3)*255,g:f(n)*255,b:f(n-1/3)*255}}const _R=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function yb(e){return _R.test(e.trim())}function Xd(e){const{r:t,g:r,b:n}=hi(e.trim());return gi(t,r,n)}function xb(e){const{r:t,g:r,b:n}=hi(e),a=t/255,s=r/255,c=n/255,u=Math.max(a,s,c),f=Math.min(a,s,c),p=u-f;let g=0;if(p!==0)switch(u){case a:g=((s-c)/p+(s<c?6:0))*60;break;case s:g=((c-a)/p+2)*60;break;default:g=((a-s)/p+4)*60}return{h:g,s:u===0?0:p/u,v:u}}function CR(e){const t=(e.h%360+360)%360,r=io(e.s,0,1),n=io(e.v,0,1),a=n*r,s=a*(1-Math.abs(t/60%2-1)),c=n-a,u=Math.floor(t/60)%6,[f,p,g]=[[a,s,0],[s,a,0],[0,a,s],[0,s,a],[s,0,a],[a,0,s]][u];return gi((f+c)*255,(p+c)*255,(g+c)*255)}function NR(e){const{r:t,g:r,b:n}=hi(e);return Nl(t,r,n)}function wb(e){const{r:t,g:r,b:n}=bb(e.h,e.s,e.l);return gi(t,r,n)}const TR=[.12,.25,.38,.5,.63,.76,.88],PR=[.14,.34,.52,.66,.76,.86,.93,1],RR=6,MR=99;function Tl(e){const{basePaletteColor:t,lockPrimary:r,vibrancy:n,hueTorsion:a}=e,s=NR(t),c=io(n,-100,100)/100,u=io(a,-100,100)/100*30,f=io(s.l,0,100),p=Math.min(RR,f*.5),g=Math.max(MR,f+(100-f)*.5),v={};return pi.forEach((x,w)=>{if(x==="primary"){v[x]=r?t.toUpperCase():wb(s);return}const S=Math.abs(w-7)/8,k=w>7,B=k?f+(g-f)*PR[w-8]:p+(f-p)*TR[w],z=k?c*40*S:0,P=io(s.s+z,0,100),j=k?u*S:0;v[x]=wb({h:s.h+j,s:P,l:B})}),v}function kb(e,t){return{...e,...t}}const Ca=4.5;function Kd(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Pl(e){const{r:t,g:r,b:n}=hi(e),a=Kd(t),s=Kd(r),c=Kd(n);return .2126*a+.7152*s+.0722*c}function Sb(e,t){const r=Pl(e),n=Pl(t),a=Math.max(r,n),s=Math.min(r,n);return(a+.05)/(s+.05)}const ER={darker70:10,darker60:20,darker50:30,darker40:40,darker30:50,darker20:60,darker10:70,primary:80,lighter10:90,lighter20:100,lighter30:110,lighter40:120,lighter50:130,lighter60:140,lighter70:150,lighter80:160};function IR(e){const t={};for(const r of pi)t[ER[r]]=e[r];return t}const FR="#0F6CBD",AR="#FFFFFF",DR="#242424";function Rl(e){return Pl(e)>.4?DR:AR}function Yd(e,t){const{r,g:n,b:a}=hi(e),s=Nl(r,n,a),c=Math.min(100,Math.max(0,s.l+t)),u=bb(s.h,s.s,c);return gi(u.r,u.g,u.b)}function qR(e,t){const r=e?.background?.trim()||t,n=Pl(r)>.4?-1:1,a=e?.foreground?.trim()||Rl(r),s=e?.backgroundHover?.trim()||Yd(r,n*8),c=e?.backgroundPressed?.trim()||Yd(r,n*14),u=e?.backgroundSelected?.trim()||Yd(r,n*20);return{background:r,foreground:a,backgroundHover:s,foregroundHover:e?.foregroundHover?.trim()||Rl(s),backgroundPressed:c,foregroundPressed:e?.foregroundPressed?.trim()||Rl(c),backgroundSelected:u,foregroundSelected:e?.foregroundSelected?.trim()||Rl(u)}}function OR(e){const t=e.replace(/[;{}<>\\]/g,"");return["'",'"'].reduce((n,a)=>(n.split(a).length-1)%2===0?n:n.split(a).join(""),t).trim()}function Bb(e){const t=e.basePaletteColor??FR,r=Tl({basePaletteColor:t,lockPrimary:e.lockPrimary,vibrancy:e.vibrancy,hueTorsion:e.hueTorsion}),n=kb(r,e.paletteOverrides),a=IR(n),s=Rg(a),c=OR(e.font??"")||s.fontFamilyBase;return{fluentTheme:{...s,fontFamilyBase:c},brand:a,headerColors:qR(e.appHeaderColors,n.primary),fontFamily:c}}const Qd="Dynamics 365";function Ml(){return{kind:"customTheme",basePaletteColor:void 0,lockPrimary:!1,font:void 0,vibrancy:0,hueTorsion:0,logoWebResource:void 0,logoTooltip:void 0,paletteOverrides:{},appHeaderColors:void 0,unknownAttributes:{},unknownAppHeaderColorsAttributes:{}}}function zb(){return{kind:"appHeaderColorsOnly",lockPrimary:!1,vibrancy:0,hueTorsion:0,paletteOverrides:{},appHeaderColors:{background:""},unknownAttributes:{},unknownAppHeaderColorsAttributes:{}}}const jb=["Segoe UI","Arial","Helvetica","Georgia","Times New Roman","Verdana","Tahoma","Trebuchet MS","Courier New"];function El(e,t,r){return()=>({...Ml(),basePaletteColor:e,appHeaderColors:{background:t,foreground:r}})}const _b=[{id:"default",label:"Power Platform blue",description:"The out-of-the-box modern look, as a starting point.",create:El("#0F6CBD","#0F6CBD","#FFFFFF")},{id:"forest",label:"Forest green",description:"A deep green palette with a matching dark header.",create:El("#12783F","#12783F","#FFFFFF")},{id:"plum",label:"Plum",description:"A purple palette with a high-contrast header.",create:El("#7A3B96","#4B1F5E","#FFFFFF")},{id:"graphite",label:"Graphite",description:"A neutral palette with a near-black header.",create:El("#5D5D5D","#1F1F1F","#FFFFFF")}];function Cb(e=Ml()){return{present:e,past:[],future:[],baseline:e}}function Nb(e,t){return JSON.stringify(e)===JSON.stringify(t)}function HR(e){return!Nb(e.present,e.baseline)}function Lt(e,t){return Nb(e.present,t)?e:{...e,present:t,past:[...e.past,e.present].slice(-50),future:[]}}function mi(e){const t=e?.trim();return t||void 0}function LR(e){return e?.trim()?e:void 0}function Zd(e,t,r){const n={...e??{background:""}},a=mi(r);return a===void 0?t==="background"?n.background="":delete n[t]:n[t]=a,n}function VR(e,t){const r=e.present;switch(t.type){case"setKind":{if(t.kind===r.kind)return e;const n=t.kind==="appHeaderColorsOnly"?{...zb(),appHeaderColors:r.appHeaderColors??{background:""},unknownAppHeaderColorsAttributes:r.unknownAppHeaderColorsAttributes}:{...r,kind:"customTheme"};return Lt(e,n)}case"setBasePaletteColor":return Lt(e,{...r,basePaletteColor:mi(t.value)});case"setLockPrimary":return Lt(e,{...r,lockPrimary:t.value});case"setFont":return Lt(e,{...r,font:LR(t.value)});case"setVibrancy":return Lt(e,{...r,vibrancy:t.value});case"setHueTorsion":return Lt(e,{...r,hueTorsion:t.value});case"setLogoWebResource":return Lt(e,{...r,logoWebResource:mi(t.value)});case"setLogoTooltip":return Lt(e,{...r,logoTooltip:mi(t.value)});case"setPaletteOverride":{const n={...r.paletteOverrides},a=mi(t.value);return a===void 0?delete n[t.slot]:n[t.slot]=a,Lt(e,{...r,paletteOverrides:n})}case"resetPaletteOverrides":return Lt(e,{...r,paletteOverrides:{}});case"setAppHeaderColor":return Lt(e,{...r,appHeaderColors:Zd(r.appHeaderColors,t.attribute,t.value)});case"setAppHeaderColorsEnabled":return t.enabled?r.appHeaderColors?e:Lt(e,{...r,appHeaderColors:{background:"#0F6CBD",foreground:"#FFFFFF"}}):r.kind==="appHeaderColorsOnly"?e:Lt(e,{...r,appHeaderColors:void 0});case"applyExtractedColors":{const{patch:n}=t,a={...r};if(n.basePaletteColor!==void 0&&r.kind==="customTheme"&&(a.basePaletteColor=mi(n.basePaletteColor)??r.basePaletteColor),n.paletteOverrides&&Object.keys(n.paletteOverrides).length>0&&r.kind==="customTheme"&&(a.paletteOverrides={...r.paletteOverrides,...n.paletteOverrides}),n.appHeaderBackground!==void 0||n.appHeaderForeground!==void 0){let s=r.appHeaderColors;n.appHeaderBackground!==void 0&&(s=Zd(s,"background",n.appHeaderBackground)),n.appHeaderForeground!==void 0&&(s=Zd(s,"foreground",n.appHeaderForeground)),a.appHeaderColors=s}return Lt(e,a)}case"load":return Cb(t.model);case"replace":return Lt(e,t.model);case"markSaved":return{...e,baseline:e.present};case"undo":{if(e.past.length===0)return e;const n=e.past[e.past.length-1];return{...e,present:n,past:e.past.slice(0,-1),future:[e.present,...e.future]}}case"redo":{if(e.future.length===0)return e;const[n,...a]=e.future;return{...e,present:n,past:[...e.past,e.present].slice(-50),future:a}}default:return e}}const Jd="#0F6CBD",Tb=y.createContext(void 0);function WR({children:e,initialModel:t}){const[r,n]=y.useReducer(VR,t,Cb),a=r.present,s=y.useMemo(()=>{try{return Tl({basePaletteColor:a.basePaletteColor??Jd,lockPrimary:a.lockPrimary,vibrancy:a.vibrancy,hueTorsion:a.hueTorsion})}catch{return Tl({basePaletteColor:Jd,lockPrimary:!1,vibrancy:0,hueTorsion:0})}},[a.basePaletteColor,a.lockPrimary,a.vibrancy,a.hueTorsion]),c=y.useMemo(()=>kb(s,a.paletteOverrides),[s,a.paletteOverrides]),u=y.useMemo(()=>{try{return Bb(a)}catch{return Bb({...a,basePaletteColor:Jd,paletteOverrides:{}})}},[a]),f=y.useMemo(()=>({state:r,model:a,dispatch:n,dirty:HR(r),canUndo:r.past.length>0,canRedo:r.future.length>0,generatedPalette:s,resolvedPalette:c,previewTheme:u}),[r,s,c,u]);return m.jsx(Tb.Provider,{value:f,children:e})}function gr(){const e=y.useContext(Tb);if(!e)throw new Error("useThemeModel must be used within a <ThemeProvider>.");return e}const $R=["connection:created","connection:updated","connection:deleted"];function UR(){const[e,t]=y.useState(null),[r,n]=y.useState(!0),a=y.useCallback(async()=>{try{const s=await window.toolboxAPI.connections.getActiveConnection();t(s)}catch(s){console.error("Error refreshing connection:",s),t(null)}finally{n(!1)}},[]);return y.useEffect(()=>{a()},[a]),GR(y.useCallback(s=>{$R.includes(s)&&a()},[a])),{connection:e,isLoading:r,refreshConnection:a}}function GR(e){const t=y.useRef(e);t.current=e,y.useEffect(()=>{const r=(n,a)=>{try{t.current(a.event,a.data)}catch(s){console.error("Error handling the ToolBox event",a.event,s)}};return window.toolboxAPI.events.on(r),()=>{window.toolboxAPI.events.off(r)}},[])}function XR(){const[e,t]=y.useState("light");return y.useEffect(()=>{let r=!1;return(async()=>{try{const a=await window.toolboxAPI.utils.getCurrentTheme();r||t(a==="dark"?"dark":"light")}catch(a){console.error("Error getting current theme:",a)}})(),()=>{r=!0}},[]),e}function ef(e,t){const[r,n]=y.useState(t);y.useEffect(()=>{let s=!1;return(async()=>{try{const c=await window.toolboxAPI.settings.get(e);!s&&c!==void 0&&c!==null&&n(c)}catch(c){console.error(`Error reading the "${e}" setting:`,c)}})(),()=>{s=!0}},[e]);const a=y.useCallback(s=>{n(s),window.toolboxAPI.settings.set(e,s).catch(c=>console.error(`Error saving the "${e}" setting:`,c))},[e]);return[r,a]}class ao extends Error{constructor(t,r){super(t),this.cause=r,this.name="DataverseOperationError"}cause}function Ze(e){return typeof e=="string"?e:String(e??"")}function vi(e){return e instanceof Error?e.message:String(e)}async function Eo(e,t){try{return await t()}catch(r){throw new ao(`${e} failed: ${vi(r)}`,r)}}function Pb(e){return e.replace(/'/g,"''")}async function KR(){let e;try{e=await window.dataverseAPI.queryData(`solutions?$select=solutionid,uniquename,friendlyname,version&$expand=publisherid($select=customizationprefix,friendlyname)&$filter=${encodeURIComponent("ismanaged eq false and isvisible eq true")}&$orderby=friendlyname&$top=250`)}catch(t){throw new ao(`Loading the solution list failed: ${vi(t)}`,t)}return e.value.map(t=>{const r=t.publisherid??{};return{id:Ze(t.solutionid),uniqueName:Ze(t.uniquename),friendlyName:Ze(t.friendlyname)||Ze(t.uniquename),version:typeof t.version=="string"?t.version:void 0,publisherPrefix:Ze(r.customizationprefix),publisherName:typeof r.friendlyname=="string"?r.friendlyname:void 0}}).filter(t=>t.uniqueName!=="Active"&&t.uniqueName!=="Default")}const YR={listWritableSolutions:KR},QR=61;function tf(e){return{id:Ze(e.webresourceid),name:Ze(e.name),displayName:typeof e.displayname=="string"?e.displayname:void 0,webResourceType:Number(e.webresourcetype??0),isManaged:e.ismanaged===!0}}async function ZR(e,t){const n=[`(${e.map(u=>`webresourcetype eq ${u}`).join(" or ")})`],a=t?.trim();a&&n.push(`contains(name,'${Pb(a)}')`);const s=`webresourceset?$select=webresourceid,name,displayname,webresourcetype,ismanaged&$filter=${encodeURIComponent(n.join(" and "))}&$orderby=name&$top=250`;return(await Eo("Listing web resources",()=>window.dataverseAPI.queryData(s))).value.map(tf)}async function JR(e){const t=await Eo("Reading the web resource",()=>window.dataverseAPI.retrieve("webresource",e,["webresourceid","name","displayname","webresourcetype","ismanaged","content"]));return{...tf(t),contentBase64:Ze(t.content)}}async function eM(e){const t=`webresourceset?$select=webresourceid,name,displayname,webresourcetype,ismanaged&$filter=${encodeURIComponent(`name eq '${Pb(e.trim())}'`)}&$top=1`,n=(await Eo("Looking up the web resource",()=>window.dataverseAPI.queryData(t))).value[0];return n?tf(n):void 0}async function rf(e,t){await Eo(`Adding the web resource to solution "${t}"`,()=>window.dataverseAPI.execute({operationName:"AddSolutionComponent",operationType:"action",parameters:{ComponentId:e,ComponentType:QR,SolutionUniqueName:t,AddRequiredComponents:!1}}))}async function tM(e){const t=await Eo("Creating the web resource",()=>window.dataverseAPI.create("webresource",{name:e.name,displayname:e.displayName,webresourcetype:e.webResourceType,content:e.contentBase64,...e.description?{description:e.description}:{}})),r=Ze(t.id);return await rf(r,e.solutionUniqueName),{id:r,name:e.name,displayName:e.displayName,webResourceType:e.webResourceType,isManaged:!1}}async function rM(e,t,r){if(e.isManaged)throw new ao(`"${e.name}" is a managed web resource and can't be updated. Pick or create an unmanaged one instead.`);await Eo("Updating the web resource",()=>window.dataverseAPI.update("webresource",e.id,{content:t})),await rf(e.id,r)}async function oM(e){await Eo("Publishing the web resource",()=>window.dataverseAPI.execute({operationName:"PublishXml",operationType:"action",parameters:{ParameterXml:`<importexportxml><webresources><webresource>${e}</webresource></webresources></importexportxml>`}}))}async function nM(){await Eo("Publishing all customizations",()=>window.dataverseAPI.publishCustomizations())}const so={listWebResources:ZR,readWebResource:JR,findWebResourceByName:eM,addWebResourceToSolution:rf,createWebResource:tM,updateWebResourceContent:rM,publishWebResource:oM,publishAllCustomizations:nM},Io={customTheme:"Custom theme definition",appHeaderColorsOnly:"Override app header color"};function iM(e,t){return Ze(e.displayname).trim().toLowerCase()===t.toLowerCase()}async function aM(){try{const e=await window.dataverseAPI.queryData("settingdefinitions?$select=settingdefinitionid,uniquename,displayname&$top=500"),t={};for(const n of Object.keys(Io)){const a=e.value.find(s=>iM(s,Io[n]));a&&(t[n]={id:Ze(a.settingdefinitionid),uniqueName:Ze(a.uniquename),displayName:Ze(a.displayname)})}const r=Object.keys(Io).filter(n=>!t[n]);return{settingsReadable:!0,definitions:t,unavailableReason:r.length?`The environment has no setting definition named ${r.map(n=>`"${Io[n]}"`).join(" or ")}.`:void 0}}catch(e){return{settingsReadable:!1,definitions:{},unavailableReason:`The setting definitions could not be read from this environment (${vi(e)}).`}}}async function sM(e,t){const r={kind:t,appValues:{}};try{const n=await bi("organizationsetting","settingdefinition"),a=encodeURIComponent(`_${n.attribute}_value eq ${e.id}`),c=(await window.dataverseAPI.queryData(`organizationsettings?$select=organizationsettingid,value&$filter=${a}&$top=1`)).value[0];c&&(r.environmentValue=Ze(c.value))}catch{}try{const[n,a]=await Promise.all([bi("appsetting","settingdefinition"),bi("appsetting","appmodule")]),s=`_${a.attribute}_value`,c=encodeURIComponent(`_${n.attribute}_value eq ${e.id}`),u=await window.dataverseAPI.queryData(`appsettings?$select=appsettingid,value,${s}&$filter=${c}&$top=250`);for(const f of u.value){const p=Ze(f[s]);p&&(r.appValues[p]=Ze(f.value))}}catch{}return r}function lM(e,t){const r=e[`_${t}_value`]??e[t];return Ze(r).toLowerCase()}async function Rb(e,t,r){const n=t.map(u=>`<attribute name="${u}" />`).join(""),a=r.map(u=>`<condition attribute="${u.attribute}" operator="eq" value="${u.value}" />`).join(""),s=`<fetch top="250"><entity name="${e}">${n}<filter type="and">${a}</filter></entity></fetch>`;return(await window.dataverseAPI.fetchXmlQuery(s)).value}async function Mb(e,t,r){const n=[t,...r.map(p=>p.attribute)],a=await Rb(e,n,r);if(a[0])return Ze(a[0][t]);if(r.length<2)return;const[s,...c]=r,f=(await Rb(e,n,[s])).find(p=>c.every(g=>lM(p,g.attribute)===g.value.toLowerCase()));return f?Ze(f[t]):void 0}async function Eb(e,t,r,n,a){const s=await Mb(e,t,r);if(s){await window.dataverseAPI.update(e,s,a);return}try{await window.dataverseAPI.create(e,n)}catch(c){await window.dataverseAPI.publishCustomizations();const u=await Mb(e,t,r);if(u){await window.dataverseAPI.update(e,u,a);return}try{await window.dataverseAPI.create(e,n)}catch{throw c}}}const Ib=new Map;async function bi(e,t){const r=`${e}.${t}`,n=Ib.get(r);if(n)return n;const s=(await window.dataverseAPI.getEntityRelatedMetadata(e,"ManyToOneRelationships",["ReferencingAttribute","ReferencingEntityNavigationPropertyName","ReferencedEntity"])).value.find(u=>Ze(u.ReferencedEntity).toLowerCase()===t.toLowerCase());if(!s)throw new Error(`No lookup to "${t}" was found on "${e}".`);const c={attribute:Ze(s.ReferencingAttribute),navigationProperty:Ze(s.ReferencingEntityNavigationPropertyName)};return Ib.set(r,c),c}async function cM(e,t){try{const r=await bi("organizationsetting","settingdefinition");await Eb("organizationsetting","organizationsettingid",[{attribute:r.attribute,value:e.id}],{value:t,[`${r.navigationProperty}@odata.bind`]:`/settingdefinitions(${e.id})`},{value:t})}catch(r){throw new ao(`Assigning the theme to the environment failed: ${vi(r)}`,r)}}async function uM(e,t,r){try{const[n,a]=await Promise.all([bi("appsetting","settingdefinition"),bi("appsetting","appmodule")]);await Eb("appsetting","appsettingid",[{attribute:n.attribute,value:e.id},{attribute:a.attribute,value:t}],{value:r,[`${n.navigationProperty}@odata.bind`]:`/settingdefinitions(${e.id})`,[`${a.navigationProperty}@odata.bind`]:`/appmodules(${t})`},{value:r})}catch(n){throw new ao(`Assigning the theme to the app failed: ${vi(n)}`,n)}}const Il={discoverScopeCapabilities:aM,readScopeAssignment:sM,setEnvironmentScope:cM,setAppScope:uM};function dM(e){const t=new TextEncoder().encode(e);return Fl(t)}function fM(e){return new TextDecoder().decode(pM(e))}function Fl(e){let t="";for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}function pM(e){const t=atob(e.trim()),r=new Uint8Array(t.length);for(let n=0;n<t.length;n+=1)r[n]=t.charCodeAt(n);return r}const xt={xml:4,png:5,jpg:6,gif:7,ico:10,svg:11},Fb=[xt.png,xt.jpg,xt.gif,xt.ico,xt.svg];function Ab(e){switch(e){case xt.png:return"image/png";case xt.jpg:return"image/jpeg";case xt.gif:return"image/gif";case xt.ico:return"image/x-icon";case xt.svg:return"image/svg+xml";default:return"application/octet-stream"}}function Db(e){switch(e.toLowerCase().split(".").pop()){case"png":return xt.png;case"jpg":case"jpeg":return xt.jpg;case"gif":return xt.gif;case"ico":return xt.ico;case"svg":return xt.svg;default:return}}function hM(e){const t=e.trim();if(!t)return"Enter a name for the web resource.";if(t.length>100)return"The name must be 100 characters or fewer.";if(!/^[A-Za-z0-9_./-]+$/.test(t))return"Only letters, digits, underscore, dot, slash and hyphen are allowed.";if(t.startsWith("/")||t.endsWith("/"))return"The name cannot start or end with a slash."}function gM(e,t){const r=e.trim().replace(/_+$/,""),n=t.trim().replace(/^_+/,"");return r?`${r}_${n}`:n}function mM(e){return fM(e.contentBase64)}function vM(e){return dM(e)}const Al={width:156,height:48},bM=[{name:"Images",extensions:["png","jpg","jpeg","gif","svg","ico"]}];function yM(e){return e.split(/[\\/]/).pop()??e}function qb(e,t){return`data:${Ab(e)};base64,${t}`}function Ob(e){return new Promise(t=>{const r=new Image;r.onload=()=>t(r.naturalWidth&&r.naturalHeight?{width:r.naturalWidth,height:r.naturalHeight}:void 0),r.onerror=()=>t(void 0),r.src=e})}function Hb(e){if(e&&!(e.width===Al.width&&e.height===Al.height))return`This image is ${e.width} × ${e.height} px. The recommended size is ${Al.width} × ${Al.height} px — logos that are too large don't display in the app header.`}async function xM(){const e=await window.toolboxAPI.fileSystem.selectPath({type:"file",title:"Select a logo image",filters:bM});if(!e)return;const t=yM(e),r=Db(t);if(r===void 0)throw new ao(`"${t}" is not a supported image type. Use PNG, JPG, GIF, SVG or ICO.`);const n=await window.toolboxAPI.fileSystem.readBinary(e),a=Fl(new Uint8Array(n)),s=qb(r,a),c=r===xt.ico?void 0:await Ob(s);return{path:e,fileName:t,webResourceType:r,contentBase64:a,dataUri:s,dimensions:c}}async function wM(e){const t=await so.readWebResource(e);if(!Fb.includes(t.webResourceType))throw new ao(`"${t.name}" is not an image web resource.`);return t.contentBase64?qb(t.webResourceType,t.contentBase64):void 0}function kM(e){const t=e.trim(),n=(t.match(/\.[^./]+$/)?.[0]??"").toLowerCase();return`/images/${(n?t.slice(0,-n.length):t).replace(/[^A-Za-z0-9_.-]+/g,"-").replace(/^-+|-+$/g,"")||"app-logo"}${n}`}const Lb="last.solutionUniqueName",Vb=y.createContext(void 0);function Wb(e){return e instanceof Error?e.message:String(e)}function SM({children:e}){const{connection:t,isLoading:r,refreshConnection:n}=UR(),{model:a}=gr(),[s,c]=y.useState([]),[u,f]=y.useState(!1),[p,g]=y.useState(),[v,x]=y.useState(),[w,S]=y.useState(),[k,B]=y.useState(),[z,P]=y.useState(),[j,N]=y.useState(!1),[M,C]=y.useState(),[I,A]=y.useState(),[ae,de]=y.useState(!1),ee=t?.id,te=y.useRef(ee);te.current=ee;const W=y.useCallback(async()=>{if(ee){f(!0),g(void 0);try{const G=await YR.listWritableSolutions(),K=await window.toolboxAPI.settings.get(Lb).catch(()=>{});if(te.current!==ee)return;c(G),x(F=>F??G.find(V=>V.uniqueName===K))}catch(G){te.current===ee&&g(Wb(G))}finally{te.current===ee&&f(!1)}}},[ee]),Y=y.useCallback(async()=>{if(ee){de(!0);try{const G=await Il.discoverScopeCapabilities();te.current===ee&&A(G)}finally{te.current===ee&&de(!1)}}},[ee]),X=y.useRef(ee);y.useEffect(()=>{X.current!==ee&&(X.current=ee,c([]),g(void 0),x(void 0),A(void 0),C(void 0),B(void 0),P(void 0),S(void 0),w&&window.toolboxAPI.utils.showNotification({title:"Environment changed",body:`"${w.resource.name}" was closed because the active connection changed. Your edits are kept and can be saved to the new environment.`,type:"warning"}).catch(()=>{}))},[ee,w]),y.useEffect(()=>{W(),Y()},[W,Y]);const O=y.useCallback(G=>{x(G),G&&window.toolboxAPI.settings.set(Lb,G.uniqueName).catch(()=>{})},[]),Z=y.useCallback((G,K)=>{C(G?{dataUri:G,warning:K}:void 0)},[]);y.useEffect(()=>{if(M){B(M.dataUri),P(M.warning);return}const G=a.logoWebResource?.trim();if(!G||!ee){B(void 0),P(void 0);return}let K=!1;return N(!0),(async()=>{try{const F=await so.findWebResourceByName(G);if(K)return;if(!F){B(void 0),P(`No web resource named "${G}" exists in this environment yet.`);return}const V=await wM(F.id);if(K)return;B(V),P(V?Hb(await Ob(V)):void 0)}catch(F){K||(B(void 0),P(Wb(F)))}finally{K||N(!1)}})(),()=>{K=!0}},[a.logoWebResource,ee,M]);const q=y.useMemo(()=>({connection:t,connectionLoading:r,refreshConnection:n,solutions:s,solutionsLoading:u,solutionsError:p,reloadSolutions:W,selectedSolution:v,selectSolution:O,openTheme:w,setOpenTheme:S,logoDataUri:k,logoWarning:z,logoLoading:j,setPendingLogo:Z,scope:I,scopeLoading:ae,refreshScope:Y}),[t,r,n,s,u,p,W,v,O,w,k,z,j,Z,I,ae,Y]);return m.jsx(Vb.Provider,{value:q,children:e})}function Na(){const e=y.useContext(Vb);if(!e)throw new Error("useConfig must be used within a <ConfigProvider>.");return e}const $b=y.createContext(void 0);function Ub({mountRef:e,children:t}){const[r,n]=y.useState(void 0);return y.useEffect(()=>{n(e.current??void 0)},[e]),m.jsx($b.Provider,{value:r,children:t})}function Fo(){return y.useContext($b)}class lo extends Error{constructor(t){super(t),this.name="ThemeXmlParseError"}}const BM=["basePaletteColor","lockPrimary","font","vibrancy","hueTorsion","logoWebResource","logoTooltip",...pi],zM=["background","foreground","backgroundHover","foregroundHover","backgroundPressed","foregroundPressed","backgroundSelected","foregroundSelected"];function Gb(e,t){const r=e.toLowerCase();return t.find(n=>n.toLowerCase()===r)}function Xb(e){const t=[];for(const r of Array.from(e.attributes))t.push({name:r.name,value:r.value});return t}function Kb(e){const t={},r={};for(const{name:n,value:a}of Xb(e)){const s=Gb(n,zM);s?t[s]=a:r[n]=a}return{known:t,unknown:r}}function Yb(e){const r=new DOMParser().parseFromString(e,"application/xml"),n=r.getElementsByTagName("parsererror")[0];if(n)throw new lo(`The theme file isn't valid XML: ${n.textContent?.trim()??"unknown parse error"}`);const a=r.documentElement;if(!a)throw new lo("The theme file is empty.");const s=a.tagName.toLowerCase();if(s==="appheadercolors"){const{known:x,unknown:w}=Kb(a);if(!x.background)throw new lo('The <AppHeaderColors> element is missing its required "background" attribute.');return{kind:"appHeaderColorsOnly",lockPrimary:!1,vibrancy:0,hueTorsion:0,paletteOverrides:{},appHeaderColors:x,unknownAttributes:{},unknownAppHeaderColorsAttributes:w}}if(s!=="customtheme")throw new lo(`Unrecognised root element "<${a.tagName}>". Expected <CustomTheme> or <AppHeaderColors>.`);const c={},u={};for(const{name:x,value:w}of Xb(a)){const S=Gb(x,BM);S?c[S]=w:u[x]=w}const f={};for(const x of pi)c[x]!==void 0&&(f[x]=c[x]);let p,g={};const v=Array.from(a.children).filter(x=>x.tagName.toLowerCase()==="appheadercolors");if(v.length>1)throw new lo("<CustomTheme> may contain at most one <AppHeaderColors> child element.");if(v.length===1){const x=Kb(v[0]);if(!x.known.background)throw new lo('The nested <AppHeaderColors> element is missing its required "background" attribute.');p=x.known,g=x.unknown}return{kind:"customTheme",basePaletteColor:c.basePaletteColor,lockPrimary:c.lockPrimary?.toLowerCase()==="true",font:c.font,vibrancy:c.vibrancy!==void 0?Number(c.vibrancy):0,hueTorsion:c.hueTorsion!==void 0?Number(c.hueTorsion):0,logoWebResource:c.logoWebResource,logoTooltip:c.logoTooltip,paletteOverrides:f,appHeaderColors:p,unknownAttributes:u,unknownAppHeaderColorsAttributes:g}}function of(e,t){for(const[r,n]of Object.entries(t))n!==void 0&&n!==""&&e.setAttribute(r,n)}function Qb(e,t){return{background:e.background,foreground:e.foreground,backgroundHover:e.backgroundHover,foregroundHover:e.foregroundHover,backgroundPressed:e.backgroundPressed,foregroundPressed:e.foregroundPressed,backgroundSelected:e.backgroundSelected,foregroundSelected:e.foregroundSelected,...t}}function nf(e){const t=document.implementation.createDocument(null,null,null);if(e.kind==="appHeaderColorsOnly"){if(!e.appHeaderColors?.background)throw new lo('Cannot serialise: "background" is required on <AppHeaderColors>.');const n=t.createElement("AppHeaderColors");return of(n,Qb(e.appHeaderColors,e.unknownAppHeaderColorsAttributes)),t.appendChild(n),new XMLSerializer().serializeToString(t)}const r=t.createElement("CustomTheme");if(of(r,{basePaletteColor:e.basePaletteColor,lockPrimary:e.lockPrimary?"true":void 0,font:e.font,vibrancy:e.vibrancy!==0?String(e.vibrancy):void 0,hueTorsion:e.hueTorsion!==0?String(e.hueTorsion):void 0,logoWebResource:e.logoWebResource,logoTooltip:e.logoTooltip,...e.paletteOverrides,...e.unknownAttributes}),e.appHeaderColors?.background){const n=t.createElement("AppHeaderColors");of(n,Qb(e.appHeaderColors,e.unknownAppHeaderColorsAttributes)),r.appendChild(n)}return t.appendChild(r),new XMLSerializer().serializeToString(t)}const jM=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS,minHeight:"320px"},list:{display:"flex",flexDirection:"column",maxHeight:"320px",overflowY:"auto",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium},item:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2px",padding:`${T.spacingVerticalXS} ${T.spacingHorizontalS}`,border:"none",borderBottom:`1px solid ${T.colorNeutralStroke3}`,backgroundColor:"transparent",cursor:"pointer",textAlign:"left",fontFamily:"inherit",":hover":{backgroundColor:T.colorNeutralBackground1Hover}},selected:{backgroundColor:T.colorNeutralBackground1Selected},itemName:{color:T.colorNeutralForeground1},hint:{color:T.colorNeutralForeground3}});function Zb({open:e,title:t,types:r,onDismiss:n,onPick:a,mountNode:s}){const c=jM(),[u,f]=y.useState(""),[p,g]=y.useState([]),[v,x]=y.useState(!1),[w,S]=y.useState(),[k,B]=y.useState(),z=r.join(","),P=y.useMemo(()=>z.split(",").map(Number),[z]),j=y.useCallback(async N=>{x(!0),S(void 0);try{g(await so.listWebResources(P,N))}catch(M){S(M instanceof Error?M.message:String(M))}finally{x(!1)}},[P]);return y.useEffect(()=>{e&&(B(void 0),j(u))},[e,j]),m.jsx(bn,{open:e,onOpenChange:(N,M)=>M.open?void 0:n(),children:m.jsx(kn,{mountNode:s,children:m.jsxs(xn,{children:[m.jsx(wn,{children:t}),m.jsxs(Sn,{className:c.body,children:[m.jsx(_r,{value:u,placeholder:"Filter by name",contentBefore:m.jsx(td,{}),onChange:(N,M)=>f(M.value),onKeyDown:N=>{N.key==="Enter"&&j(u)}}),w&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:w})}),v?m.jsx(hr,{size:"small",label:"Loading web resources…"}):m.jsxs("div",{className:c.list,children:[p.length===0&&m.jsx(Ie,{className:c.hint,size:200,children:"No matching web resource was found."}),p.map(N=>m.jsxs("button",{type:"button",className:`${c.item} ${k?.id===N.id?c.selected:""}`,onClick:()=>B(N),onDoubleClick:()=>a(N),children:[m.jsx(Ie,{weight:"semibold",size:200,className:c.itemName,children:N.name}),m.jsxs(Ie,{size:100,className:c.hint,children:[N.displayName||"No display name",N.isManaged?" • managed (read-only)":""]})]},N.id))]})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",onClick:n,children:"Cancel"}),m.jsx(Me,{appearance:"primary",disabled:!k,onClick:()=>k&&a(k),children:"Select"})]})]})})})}function Jb(e){const t=e.replace(/\r\n/g,`
|
|
28
28
|
`).replace(/\s+$/,"");return t===""?[]:t.split(`
|
|
29
|
-
`)}function _M(e,t){const r=Jb(e),n=Jb(t),a=Array.from({length:r.length+1},()=>new Array(n.length+1).fill(0));for(let f=r.length-1;f>=0;f-=1)for(let p=n.length-1;p>=0;p-=1)a[f][p]=r[f]===n[p]?a[f+1][p+1]+1:Math.max(a[f+1][p],a[f][p+1]);const s=[];let c=0,u=0;for(;c<r.length&&u<n.length;)r[c]===n[u]?(s.push({kind:"context",text:r[c]}),c+=1,u+=1):a[c+1][u]>=a[c][u+1]?(s.push({kind:"removed",text:r[c]}),c+=1):(s.push({kind:"added",text:n[u]}),u+=1);for(;c<r.length;)s.push({kind:"removed",text:r[c]}),c+=1;for(;u<n.length;)s.push({kind:"added",text:n[u]}),u+=1;return s}function CM(e){return e.some(t=>t.kind!=="context")}function af({busy:e,busyLabel:t,children:r,icon:n,disabled:a,...s}){return m.jsx(Me,{...s,icon:e?m.jsx(hr,{size:"tiny"}):n,disabled:a||e,children:e&&t?t:r})}const NM=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},diff:{maxHeight:"260px",overflow:"auto",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,padding:T.spacingVerticalXS,fontFamily:T.fontFamilyMonospace,fontSize:T.fontSizeBase200,whiteSpace:"pre"},added:{backgroundColor:T.colorPaletteGreenBackground1,color:T.colorPaletteGreenForeground1},removed:{backgroundColor:T.colorPaletteRedBackground1,color:T.colorPaletteRedForeground1},context:{color:T.colorNeutralForeground3},hint:{color:T.colorNeutralForeground3}});function sf(e){return e instanceof Error?e.message:String(e)}const TM="/theme/theme.xml";function PM(e){const t=hM(e);return t||(/\.xml$/i.test(e.trim())?void 0:"The name must end with the .xml extension.")}function RM({open:e,onDismiss:t,onSaved:r,mountNode:n}){const a=NM(),{model:s}=gr(),{openTheme:c,selectedSolution:u}=Na(),[f,p]=y.useState(TM),[g,v]=y.useState(!1),[x,w]=y.useState(""),[S,k]=y.useState(!0),[B,z]=y.useState(!1),[P,j]=y.useState(),[N,M]=y.useState(),C=y.useMemo(()=>{try{return nf(s)}catch(X){return`<!-- ${sf(X)} -->`}},[s]),I=y.useMemo(()=>_M(c?.originalXml??"",C),[c,C]),A=!!c,ae=u?gM(u.publisherPrefix,f):f,de=A?void 0:PM(ae),ee=g&&x.trim()?x.trim():ae,te=c?.resource.isManaged===!0,W=A&&!CM(I),Y=async()=>{if(!u){M("Pick a target solution first.");return}z(!0),M(void 0),j(void 0);try{let X;try{X=nf(s)}catch(q){M(sf(q));return}const O=vM(X);let Z;c?(j(`Updating "${c.resource.name}" in Dataverse…`),await so.updateWebResourceContent(c.resource,O,u.uniqueName),Z=c.resource):(j(`Creating "${ae}" in Dataverse…`),Z=await so.createWebResource({name:ae,displayName:ee,webResourceType:xt.xml,contentBase64:O,solutionUniqueName:u.uniqueName})),S&&(j("Publishing the web resource…"),await so.publishWebResource(Z.id)),r(Z,X)}catch(X){M(sf(X))}finally{z(!1),j(void 0)}};return m.jsx(bn,{open:e,onOpenChange:(X,O)=>O.open||B?void 0:t(),children:m.jsx(kn,{mountNode:n,children:m.jsxs(xn,{children:[m.jsx(wn,{children:A?`Save "${c?.resource.name}"`:"Save as a new web resource"}),m.jsxs(Sn,{className:a.body,children:[!u&&m.jsx(at,{intent:"error",children:m.jsxs(st,{children:[m.jsx(di,{children:"No solution selected"}),"The theme must be saved into a solution you choose explicitly — there is no default-solution fallback."]})}),te&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:"This web resource is managed and can't be updated. Save it as a new web resource instead."})}),!A&&m.jsxs(m.Fragment,{children:[m.jsx(Ve,{label:"Name",required:!0,validationState:de?"error":"none",validationMessage:de,children:m.jsx(_r,{value:f,onChange:(X,O)=>p(O.value)})}),m.jsxs(Ie,{size:200,className:a.hint,children:["Full unique name:"," ",m.jsx("strong",{children:ae}),u?"":" (the publisher prefix is added once a solution is selected)"]}),m.jsx(Ro,{checked:g,onChange:(X,O)=>{v(O.checked),O.checked&&!x.trim()&&w(ae)},label:"Override display name"}),g?m.jsx(Ve,{label:"Display name",children:m.jsx(_r,{value:x,onChange:(X,O)=>w(O.value)})}):m.jsxs(Ie,{size:200,className:a.hint,children:["Display name:"," ",m.jsx("strong",{children:ae})]})]}),m.jsxs("div",{children:[m.jsx(Ie,{weight:"semibold",size:200,children:A?"Changes to be written":"XML to be created"}),m.jsx("div",{className:a.diff,children:I.map((X,O)=>m.jsxs("div",{className:X.kind==="added"?a.added:X.kind==="removed"?a.removed:a.context,children:[X.kind==="added"?"+ ":X.kind==="removed"?"- ":" ",X.text]},O))})]}),W&&m.jsx(at,{intent:"info",children:m.jsx(st,{children:"The theme is identical to the version stored in Dataverse."})}),m.jsx(fl,{checked:S,onChange:(X,O)=>k(O.checked===!0),label:"Publish the web resource after saving"}),m.jsx(at,{intent:"warning",children:m.jsx(st,{children:"Publishing affects the whole environment: every user of the apps that consume this theme sees the change. Updates are only picked up once published."})}),B&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:P??"Saving to Dataverse…"}),N&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:N})})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",disabled:B,onClick:t,children:"Cancel"}),m.jsx(af,{appearance:"primary",busy:B,busyLabel:"Saving…",disabled:te||!u||!!de,onClick:Y,children:"Save"})]})]})})})}async function MM(){try{return(await window.dataverseAPI.queryData("appmodules?$select=appmoduleid,name,uniquename&$orderby=name&$top=250")).value.map(t=>({id:Ze(t.appmoduleid),name:Ze(t.name)||Ze(t.uniquename),uniqueName:Ze(t.uniquename)}))}catch(e){throw new ao(`Loading the app list failed: ${vi(e)}`,e)}}const EM={listApps:MM};function IM(e){return e instanceof Error?e.message:String(e)}async function FM(e,t){try{const r=new URL(`/tools/solution/edit.aspx?id=${encodeURIComponent(t)}`,e);if(r.protocol!=="https:"&&r.protocol!=="http:")throw new Error("The connection URL is not an http(s) address.");await window.toolboxAPI.utils.openInConnectionBrowser(r.toString())}catch(r){throw new ao(`Opening the solution in the maker portal failed: ${IM(r)}`,r)}}const AM=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},hint:{color:T.colorNeutralForeground3},row:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS}});function lf(e){return e instanceof Error?e.message:String(e)}function DM({open:e,onDismiss:t,webResourceName:r,kind:n,mountNode:a}){const s=AM(),{connection:c,scope:u,scopeLoading:f,selectedSolution:p}=Na(),[g,v]=y.useState("environment"),[x,w]=y.useState([]),[S,k]=y.useState(!1),[B,z]=y.useState(),[P,j]=y.useState(!1),[N,M]=y.useState(),[C,I]=y.useState(!1),[A,ae]=y.useState(),[de,ee]=y.useState(!1),te=u?.definitions[n],W=n==="customTheme"?"appHeaderColorsOnly":"customTheme",Y=u?.definitions[W];y.useEffect(()=>{if(!e||!c)return;M(void 0),ae(void 0),k(!0);let G=!1;return(async()=>{try{const K=await EM.listApps();G||w(K)}catch(K){G||M(lf(K))}finally{G||k(!1)}if(Y){const K=await Il.readScopeAssignment(Y,W),F=!!K.environmentValue||Object.keys(K.appValues).length>0;G||ee(F)}})(),()=>{G=!0}},[e,c,Y,W]);const X=async()=>{if(!(!te||!r)){j(!0),M(void 0),I(!1),ae(void 0);try{g==="environment"?(await Il.setEnvironmentScope(te,r),ae(`"${Io[n]}" is now set to ${r} for the whole environment.`)):B?(await Il.setAppScope(te,B,r),ae(`"${Io[n]}" is now set to ${r} for the selected app.`)):M("Select the app the theme should apply to.")}catch(G){M(lf(G)),I(!0)}finally{j(!1)}}},O=async()=>{if(!(!c||!p))try{await FM(c.url,p.id)}catch(G){M(lf(G))}},Z=async()=>{r&&await window.toolboxAPI.utils.copyToClipboard(r).catch(()=>{})},q=!!te;return m.jsx(bn,{open:e,onOpenChange:(G,K)=>K.open||P?void 0:t(),children:m.jsx(kn,{mountNode:a,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Apply the theme"}),m.jsxs(Sn,{className:s.body,children:[!r&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:"Save the theme to a web resource first — the setting stores its unique name."})}),r&&m.jsxs("div",{className:s.row,children:[m.jsxs(Ie,{size:200,children:["Setting"," ",m.jsx("strong",{children:Io[n]})," ","= ",m.jsx("strong",{children:r})]}),m.jsx(Me,{size:"small",appearance:"subtle",icon:m.jsx(Y4,{}),onClick:Z,children:"Copy name"})]}),de&&m.jsx(at,{intent:"warning",children:m.jsxs(st,{children:[m.jsx(di,{children:"Both theme settings are configured"}),'"Override app header color" is ignored by the platform whenever "Custom theme definition" is set.']})}),f&&m.jsx(hr,{size:"tiny",label:"Checking what this environment supports…"}),!f&&!q&&m.jsx(at,{intent:"warning",children:m.jsxs(st,{children:[m.jsx(di,{children:"Assign the setting in the maker portal"}),u?.unavailableReason??"The theme settings are not available through the API in this environment."," ","Open the solution, use",m.jsxs("strong",{children:[" ","Add existing → More → Setting"]}),", pick"," ",m.jsx("strong",{children:Io[n]}),", paste the unique name above as the setting value, and publish all customizations."]})}),q&&m.jsxs(m.Fragment,{children:[m.jsx(Ve,{label:"Scope",children:m.jsxs(ml,{value:g,onChange:(G,K)=>v(K.value),children:[m.jsx(vn,{value:"environment",label:"The whole environment"}),m.jsx(vn,{value:"app",label:"A single model-driven app"})]})}),g==="app"&&m.jsx(Ve,{label:"App",required:!0,children:m.jsx(Ba,{mountNode:a,disabled:S,placeholder:S?"Loading apps…":"Select an app",value:x.find(G=>G.id===B)?.name??"",selectedOptions:B?[B]:[],onOptionSelect:(G,K)=>z(K.optionValue),children:x.map(G=>m.jsx(ka,{value:G.id,text:G.name,children:G.name},G.id))})})]}),A&&m.jsx(at,{intent:"success",children:m.jsx(st,{children:A})}),N&&m.jsx(at,{intent:"error",children:m.jsxs(st,{children:[N,C&&c&&p&&m.jsxs(m.Fragment,{children:[" ","You can also"," ",m.jsx(Me,{size:"small",appearance:"transparent",onClick:O,children:"open the solution in the maker portal"})," ","and set it there."]})]})}),P&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Applying the theme in Dataverse…"}),m.jsx(Ie,{size:100,className:s.hint,children:"The theme settings are not covered by Microsoft's documented entity reference; the tool resolves them at runtime and never hardcodes ids."})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",disabled:P,onClick:t,children:"Close"}),m.jsx(af,{appearance:"primary",busy:P,busyLabel:"Applying…",disabled:!q||!r||g==="app"&&!B,onClick:X,children:"Apply"})]})]})})})}const qM=ut({root:{display:"flex",flexDirection:"column",borderBottom:`1px solid ${T.colorNeutralStroke1}`},bar:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:T.spacingHorizontalM,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,minHeight:"48px"},group:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXS},label:{color:T.colorNeutralForeground3},solution:{minWidth:"220px"},fileName:{maxWidth:"260px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},spacer:{flexGrow:1}});async function cf(e,t,r){try{await window.toolboxAPI.utils.showNotification({title:e,body:t,type:r})}catch(n){console.error("Unable to show a notification:",n)}}function OM(e){return e instanceof Error?e.message:String(e)}function HM(){const e=qM(),t=Fo(),{model:r,dispatch:n,dirty:a}=gr(),{connection:s,connectionLoading:c,refreshConnection:u,solutions:f,solutionsLoading:p,solutionsError:g,reloadSolutions:v,selectedSolution:x,selectSolution:w,openTheme:S,setOpenTheme:k}=Na(),[B,z]=y.useState(!1),[P,j]=y.useState(!1),[N,M]=y.useState(!1),[C,I]=y.useState(!1),[A,ae]=y.useState(),de=!!s,ee=X=>{if(a){ae({run:X});return}X()},te=async X=>{z(!1),I(!0);try{const O=await so.readWebResource(X.id),Z=mM(O);n({type:"load",model:Yb(Z)});const{contentBase64:q,...G}=O;k({resource:G,originalXml:Z}),G.isManaged&&await cf("Managed web resource",`"${G.name}" is managed: it can be inspected but not overwritten.`,"warning")}catch(O){await cf("Load failed",OM(O),"error")}finally{I(!1)}},W=()=>ee(()=>{n({type:"load",model:Ml()}),k(void 0)}),Y=async(X,O)=>{k({resource:X,originalXml:O}),n({type:"markSaved"}),j(!1),await cf("Theme saved",`"${X.name}" was saved to Dataverse.`,"success")};return m.jsxs("div",{className:e.root,children:[!c&&!de&&m.jsx(at,{intent:"error",children:m.jsxs(st,{children:["This tool needs an active Dataverse connection. Connect to an environment in Power Platform ToolBox, then retry."," ",m.jsx(Me,{size:"small",appearance:"transparent",icon:m.jsx(lm,{}),onClick:()=>{u()},children:"Retry"})]})}),g&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:g})}),m.jsxs("div",{className:e.bar,children:[m.jsxs("div",{className:e.group,children:[m.jsx(Ie,{size:200,className:e.label,children:"Environment"}),c?m.jsx(hr,{size:"tiny"}):m.jsx(ad,{appearance:"tint",color:de?"success":"danger",children:s?.name??"Not connected"})]}),m.jsxs("div",{className:e.group,children:[m.jsx(Ie,{size:200,className:e.label,children:"Solution"}),m.jsx(Ba,{className:e.solution,mountNode:t,disabled:!de||p,placeholder:p?"Loading solutions…":"Select a solution",value:x?.friendlyName??"",selectedOptions:x?[x.id]:[],onOptionSelect:(X,O)=>w(f.find(Z=>Z.id===O.optionValue)),children:f.map(X=>m.jsx(ka,{value:X.id,text:X.friendlyName,children:`${X.friendlyName} (${X.publisherPrefix||"no prefix"})`},X.id))}),m.jsx(No,{content:"Reload solutions",relationship:"label",mountNode:t,children:m.jsx(Me,{appearance:"subtle",icon:p?m.jsx(hr,{size:"tiny"}):m.jsx(lm,{}),disabled:!de||p,onClick:()=>{v()},"aria-label":"Reload solutions"})})]}),m.jsxs("div",{className:e.group,children:[m.jsx(Ie,{size:200,className:e.label,children:"Theme file"}),C?m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Loading theme…"}):m.jsx(Ie,{size:200,weight:"semibold",className:e.fileName,title:S?.resource.name,children:S?.resource.name??"New theme (not saved)"}),m.jsx(Me,{appearance:"subtle",icon:m.jsx(Sz,{}),disabled:!de||C,onClick:()=>ee(()=>z(!0)),children:"Open"}),m.jsx(Me,{appearance:"subtle",icon:m.jsx($4,{}),disabled:C,onClick:W,children:"New"})]}),m.jsx("div",{className:e.spacer}),m.jsxs("div",{className:e.group,children:[m.jsx(Me,{appearance:"primary",icon:m.jsx(om,{}),disabled:!de||C,onClick:()=>j(!0),children:"Save to Dataverse"}),m.jsx(Me,{appearance:"secondary",icon:m.jsx(X4,{}),disabled:!de||C,onClick:()=>M(!0),children:"Apply theme"})]})]}),m.jsx(Zb,{open:B,title:"Open a theme web resource",types:[xt.xml],onDismiss:()=>z(!1),onPick:X=>{te(X)},mountNode:t}),m.jsx(RM,{open:P,onDismiss:()=>j(!1),onSaved:(X,O)=>{Y(X,O)},mountNode:t}),m.jsx(DM,{open:N,onDismiss:()=>M(!1),webResourceName:S?.resource.name,kind:r.kind,mountNode:t}),m.jsx(bn,{open:!!A,onOpenChange:(X,O)=>O.open?void 0:ae(void 0),children:m.jsx(kn,{mountNode:t,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Discard unsaved changes?"}),m.jsx(Sn,{children:"The theme has changes that were never saved to Dataverse or exported to a file. Continuing discards them."}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",onClick:()=>ae(void 0),children:"Keep editing"}),m.jsx(Me,{appearance:"primary",onClick:()=>{A?.run(),ae(void 0)},children:"Discard and continue"})]})]})})})]})}const ey=[{name:"Theme XML",extensions:["xml"]},{name:"All files",extensions:["*"]}];function LM(e){return e.kind==="appHeaderColorsOnly"?"app-header-colors.xml":"custom-theme.xml"}async function VM(){const e=await window.toolboxAPI.fileSystem.selectPath({type:"file",filters:ey,title:"Select a theme XML file"});if(!e)return;const t=await window.toolboxAPI.fileSystem.readText(e);try{return Yb(t)}catch(r){throw r instanceof lo?r:new lo(`The file "${e}" couldn't be read as a theme: ${r instanceof Error?r.message:String(r)}`)}}async function WM(e){const t=nf(e);return await window.toolboxAPI.fileSystem.saveFile(LM(e),t,ey)??void 0}const $M=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS},row:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXS},swatch:{width:"32px",minWidth:"32px",height:"32px",padding:0,border:`1px solid ${T.colorNeutralStroke1}`,borderRadius:T.borderRadiusMedium,cursor:"pointer"},input:{flex:1,minWidth:0},picker:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},hint:{color:T.colorNeutralForeground3},fail:{color:T.colorPaletteRedForeground1},pass:{color:T.colorPaletteGreenForeground1}});function zn({label:e,value:t,onChange:r,placeholder:n,onReset:a,contrastAgainst:s,hint:c,disabled:u}){const f=$M(),p=Fo(),[g,v]=y.useState(t??""),[x,w]=y.useState(!1);y.useEffect(()=>{v(t??"")},[t]);const S=g.trim()!==""&&!yb(g),k=t??n,B=y.useMemo(()=>{try{return xb(k??"#FFFFFF")}catch{return xb("#FFFFFF")}},[k]),z=y.useMemo(()=>{if(!(!s||!k))try{return Sb(k,s)}catch{return}},[s,k]),P=j=>{const N=j.trim();if(N===""){r(void 0);return}yb(N)&&r(Xd(N))};return m.jsxs("div",{className:f.root,children:[m.jsx(Xt,{size:"small",children:e}),m.jsxs("div",{className:f.row,children:[m.jsxs(ev,{open:x,onOpenChange:(j,N)=>w(N.open),trapFocus:!0,mountNode:p,children:[m.jsx(jd,{disableButtonEnhancement:!0,children:m.jsx("button",{type:"button","aria-label":`Pick a colour for ${e}`,className:f.swatch,disabled:u,style:{backgroundColor:k??"transparent"}})}),m.jsx(Y1,{children:m.jsxs("div",{className:f.picker,children:[m.jsxs(gb,{color:B,onColorChange:(j,N)=>r(CR(N.color)),children:[m.jsx(vb,{inputX:{"aria-label":"Saturation"},inputY:{"aria-label":"Brightness"}}),m.jsx(hb,{"aria-label":"Hue"})]}),m.jsx(Me,{appearance:"secondary",onClick:()=>w(!1),children:"Close"})]})})]}),m.jsx(_r,{className:f.input,size:"small",value:g,disabled:u,placeholder:n??"#RRGGBB","aria-label":`${e} HTML colour value`,onChange:(j,N)=>{v(N.value),P(N.value)},onBlur:()=>{S&&v(t??"")}}),a&&m.jsx(No,{content:`Reset ${e}`,relationship:"label",mountNode:p,children:m.jsx(Me,{appearance:"subtle",size:"small",icon:m.jsx(sm,{}),disabled:u||t===void 0,onClick:a})})]}),S&&m.jsx(Ie,{size:100,className:f.fail,children:"Enter a valid HTML colour, e.g. #0F6CBD."}),z!==void 0&&m.jsxs(Ie,{size:100,className:z>=Ca?f.pass:f.fail,children:["Contrast ",z.toFixed(2),":1 ",z>=Ca?"meets":"is below"," the recommended ",Ca,":1 minimum"]}),c&&m.jsx(Ie,{size:100,className:f.hint,children:c})]})}const UM={maxColors:6,ignoreGreys:!0,nearWhiteLightness:95,nearBlackLightness:8,minSaturation:12,minAlpha:128,sampleSize:200},GM=.15;function Dl(e,t,r){const n=g=>{const v=g/255;return v<=.04045?v/12.92:Math.pow((v+.055)/1.055,2.4)},a=n(e),s=n(t),c=n(r),u=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*c),f=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*c),p=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*c);return{l:.2104542553*u+.793617785*f-.0040720468*p,a:1.9779984951*u-2.428592205*f+.4505937099*p,b:.0259040371*u+.7827717662*f-.808675766*p}}function ty(e,t){return Math.sqrt((e.l-t.l)**2+(e.a-t.a)**2+(e.b-t.b)**2)}const XM=.09,uf=3;function ql(e,t,r){return Math.min(r,Math.max(t,Math.round(e)))}function KM(e,t){if(!t)return{x:0,y:0,width:e.width,height:e.height};const r=ql(t.x,0,Math.max(0,e.width-1)),n=ql(t.y,0,Math.max(0,e.height-1)),a=ql(t.width,1,e.width-r),s=ql(t.height,1,e.height-n);return{x:r,y:n,width:a,height:s}}function ry(e,t=GM){return{x:0,y:0,width:e.width,height:Math.max(1,Math.round(e.height*t))}}function YM(e,t,r){if(t<0||r<0||t>=e.width||r>=e.height)return;const n=(Math.floor(r)*e.width+Math.floor(t))*4,a=e.data[n+3];if(!(a===void 0||a<8))return gi(e.data[n],e.data[n+1],e.data[n+2])}function oy(e,t={}){const r={...UM,...QM(t)},n=KM(e,t.crop);if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return{candidates:[],sampledPixels:0,keptPixels:0};const a=Math.max(n.width,n.height),s=Math.max(1,Math.ceil(a/Math.max(1,r.sampleSize))),c=new Map;let u=0,f=0;for(let x=n.y;x<n.y+n.height;x+=s)for(let w=n.x;w<n.x+n.width;w+=s){const S=(x*e.width+w)*4;if(u+=1,e.data[S+3]<r.minAlpha)continue;const B=e.data[S],z=e.data[S+1],P=e.data[S+2],{s:j,l:N}=Nl(B,z,P);if(N>=r.nearWhiteLightness||N<=r.nearBlackLightness||r.ignoreGreys&&j<r.minSaturation)continue;f+=1;const M=8-uf,C=B>>M<<uf*2|z>>M<<uf|P>>M,I=c.get(C);I?(I.count+=1,I.r+=B,I.g+=z,I.b+=P):c.set(C,{count:1,r:B,g:z,b:P})}if(f===0)return{candidates:[],sampledPixels:u,keptPixels:f};const p=[...c.entries()].map(([x,w])=>({key:x,count:w.count,r:w.r/w.count,g:w.g/w.count,b:w.b/w.count})).sort((x,w)=>w.count-x.count||x.key-w.key),g=[];for(const x of p){const w=Dl(x.r,x.g,x.b),S=g.find(k=>ty(k.lab,w)<=XM);if(S){const k=S.count+x.count;S.r=(S.r*S.count+x.r*x.count)/k,S.g=(S.g*S.count+x.g*x.count)/k,S.b=(S.b*S.count+x.b*x.count)/k,S.count=k,S.lab=Dl(S.r,S.g,S.b)}else g.push({count:x.count,r:x.r,g:x.g,b:x.b,lab:w})}return{candidates:g.map(x=>{const{s:w,l:S}=Nl(x.r,x.g,x.b);return{hex:gi(x.r,x.g,x.b),coverage:x.count/f,saturation:w,lightness:S}}).sort((x,w)=>ny(w)-ny(x)||(x.hex<w.hex?-1:1)).slice(0,Math.max(1,r.maxColors)),sampledPixels:u,keptPixels:f}}function ny(e){return e.coverage*(.5+e.saturation/100)}function QM(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}const iy=["#FFFFFF","#000000"],ZM=15;function df(e,t){if(!(!e||!t))try{const r=Sb(e,t);return{foreground:Xd(e),background:Xd(t),ratio:r,passes:r>=Ca}}catch{return}}function JM(e){if(e.length===0)return;const t=e.filter(a=>a.saturation>=ZM);return[...t.length>0?t:e].sort((a,s)=>s.saturation*(.5+s.coverage)-a.saturation*(.5+a.coverage)||s.coverage-a.coverage||(a.hex<s.hex?-1:1))[0]?.hex}function ay(e,t=[]){const r=[...iy,...t.map(s=>s.hex)];let n=iy[0],a=0;for(const s of r){const c=df(s,e);c&&c.ratio>a&&(n=c.foreground,a=c.ratio)}return n}function eE(e,t){const r={},n=new Set;for(const a of e){const s=Dl(...sy(a.hex));let c,u=Number.POSITIVE_INFINITY;for(const f of pi){if(n.has(f))continue;const p=ty(s,Dl(...sy(t[f])));p<u&&(u=p,c=f)}c&&(n.add(c),r[c]=a.hex)}return r}function sy(e){const{r:t,g:r,b:n}=hi(e);return[t,r,n]}function tE(e,t,r,n={}){const a=JM(e),s=t[0]?.hex??a,c=s?ay(s,e):void 0;let u={};if(n.overrideSlots&&a){const f=Tl({basePaletteColor:a,lockPrimary:r.lockPrimary,vibrancy:r.vibrancy,hueTorsion:r.hueTorsion});u=eE(e,f)}return{basePaletteColor:a,headerBackground:s,headerForeground:c,paletteOverrides:u,headerContrast:df(c,s)}}const Ol=20*1024*1024,ff=8e3,rE=1200;class Pr extends Error{constructor(t){super(t),this.name="ImageImportError"}}const oE=[{name:"Images",extensions:["png","jpg","jpeg","gif","webp","bmp"]}],Hl=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];function nE(e){return e.split(/[\\/]/).pop()??e}async function ly(e,t){const r=await iE(e),n=r.naturalWidth,a=r.naturalHeight;if(!n||!a)throw new Pr("That image couldn't be decoded. Use a PNG, JPG, GIF, WEBP or BMP screenshot.");if(n>ff||a>ff)throw new Pr(`That image is ${n} × ${a} px. Images larger than ${ff} px on a side are not supported.`);const s=Math.min(1,rE/Math.max(n,a)),c=Math.max(1,Math.round(n*s)),u=Math.max(1,Math.round(a*s)),f=document.createElement("canvas");f.width=c,f.height=u;const p=f.getContext("2d",{willReadFrequently:!0});if(!p)throw new Pr("This environment cannot read image pixels, so colours cannot be extracted.");p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(r,0,0,c,u);let g;try{g=p.getImageData(0,0,c,u)}catch{throw new Pr("That image's pixels couldn't be read. Import it as a local file instead.")}return{dataUri:e,imageData:g,width:c,height:u,naturalWidth:n,naturalHeight:a,fileName:t}}function iE(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=()=>r(new Pr("That file couldn't be read as an image.")),n.src=e})}async function aE(){const e=await window.toolboxAPI.fileSystem.selectPath({type:"file",title:"Select a screenshot",filters:oE});if(!e)return;const t=nE(e),r=Db(t),n=t.toLowerCase().split(".").pop(),a=r!==void 0&&r!==xt.svg&&r!==xt.ico?Ab(r):n==="webp"?"image/webp":n==="bmp"?"image/bmp":void 0;if(!a)throw new Pr(`"${t}" is not a supported screenshot format. Use PNG, JPG, GIF, WEBP or BMP.`);const s=await window.toolboxAPI.fileSystem.readBinary(e),c=new Uint8Array(s);if(c.byteLength>Ol)throw new Pr(`"${t}" is ${Math.round(c.byteLength/(1024*1024))} MB. The limit is ${Ol/(1024*1024)} MB.`);return ly(`data:${a};base64,${Fl(c)}`,t)}async function pf(e,t){if(!Hl.includes(e.type))throw new Pr("That item is not a supported image. Use a PNG, JPG, GIF, WEBP or BMP screenshot.");if(e.size>Ol)throw new Pr(`That image is ${Math.round(e.size/(1024*1024))} MB. The limit is ${Ol/(1024*1024)} MB.`);const r=new Uint8Array(await e.arrayBuffer());return ly(`data:${e.type};base64,${Fl(r)}`,t)}function cy(e){if(e){for(const t of Array.from(e.files))if(Hl.includes(t.type))return t;for(const t of Array.from(e.items))if(t.kind==="file"&&Hl.includes(t.type)){const r=t.getAsFile();if(r)return r}}}async function sE(){const e=navigator.clipboard;if(typeof e?.read!="function")throw new Pr("This environment cannot read the clipboard. Press Ctrl+V over the drop zone, or browse for the image file.");let t;try{t=await e.read()}catch{throw new Pr("The clipboard could not be read. Press Ctrl+V over the drop zone instead.")}for(const r of t){const n=r.types.find(a=>Hl.includes(a));if(n)return pf(await r.getType(n))}}class yi extends Error{constructor(t){super(t),this.name="SiteCaptureError"}}function lE(e){const t=e.trim();if(!t)throw new yi("Enter the address of the website.");const r=/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)?t:`https://${t}`;let n;try{n=new URL(r)}catch{throw new yi(`"${e}" is not a valid website address.`)}if(n.protocol!=="http:"&&n.protocol!=="https:")throw new yi("Only http:// and https:// addresses can be opened.");if(n.username||n.password)throw new yi("Remove the user name and password from the address before opening it.");if(!n.hostname)throw new yi(`"${e}" is not a valid website address.`);return n.toString()}const uy="The site is opening in your browser. Take a screenshot of the page (Windows: ⊞ Win + Shift + S), then come back and paste it here with Ctrl+V, or drop the image file onto the drop zone.";async function cE(e){const t=lE(e);try{await window.toolboxAPI.utils.openInConnectionBrowser(t)}catch(r){throw new yi(`The site couldn't be opened: ${r instanceof Error?r.message:String(r)}`)}return{mode:"assisted",url:t,instructions:uy}}const uE=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,minHeight:"320px"},row:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS,flexWrap:"wrap"},hint:{color:T.colorNeutralForeground3},dropZone:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:T.spacingVerticalS,padding:T.spacingVerticalXXL,border:`2px dashed ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,backgroundColor:T.colorNeutralBackground2,textAlign:"center"},dropZoneActive:{border:`2px dashed ${T.colorBrandStroke1}`,backgroundColor:T.colorNeutralBackground1Selected},imageArea:{position:"relative",display:"inline-block",maxWidth:"100%",lineHeight:0,userSelect:"none"},image:{maxWidth:"100%",maxHeight:"320px",display:"block",cursor:"crosshair"},cropBox:{position:"absolute",border:`2px solid ${T.colorBrandStroke1}`,backgroundColor:"rgba(15, 108, 189, 0.15)",pointerEvents:"none"},swatches:{display:"flex",flexWrap:"wrap",gap:T.spacingHorizontalS},swatch:{display:"flex",flexDirection:"column",alignItems:"center",gap:T.spacingVerticalXXS,padding:T.spacingVerticalXS,border:`1px solid ${T.colorNeutralStroke1}`,borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",cursor:"pointer",minWidth:"72px"},swatchChip:{width:"48px",height:"32px",borderRadius:T.borderRadiusSmall,border:`1px solid ${T.colorNeutralStroke2}`},swatchLabel:{color:T.colorNeutralForeground1},headerPreview:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,height:"48px",padding:`0 ${T.spacingHorizontalM}`,borderRadius:T.borderRadiusMedium},fail:{color:T.colorPaletteRedForeground1},pass:{color:T.colorPaletteGreenForeground1}}),dE=5,fE={ignoreGreys:!0,overrideSlots:!1};function dy(e){return e instanceof Error?e.message:String(e)}function pE({open:e,onDismiss:t}){const r=uE(),n=Fo(),{model:a,dispatch:s}=gr(),[c,u]=ef("colorExtraction.options",fE),[f,p]=y.useState("source"),[g,v]=y.useState(""),[x,w]=y.useState(),[S,k]=y.useState(),[B,z]=y.useState(),[P,j]=y.useState(!1),[N,M]=y.useState(!1),[C,I]=y.useState(!1),[A,ae]=y.useState(),[de,ee]=y.useState(),[te,W]=y.useState(),[Y,X]=y.useState(),O=y.useRef(null),Z=y.useRef(void 0),q=y.useCallback(()=>{p("source"),v(""),w(void 0),k(void 0),z(void 0),ae(void 0),ee(void 0),W(void 0),X(void 0)},[]);y.useEffect(()=>{e||q()},[e,q]);const G=y.useMemo(()=>({ignoreGreys:c.ignoreGreys,maxColors:dE}),[c.ignoreGreys]),K=y.useMemo(()=>S?oy(S.imageData,{...G,crop:B}).candidates:[],[S,G,B]),F=y.useMemo(()=>S?oy(S.imageData,{...G,maxColors:3,crop:B??ry(S.imageData)}).candidates:[],[S,G,B]),V=y.useMemo(()=>tE(K,F,a,{overrideSlots:c.overrideSlots}),[K,F,a,c.overrideSlots]),ue=y.useCallback(async _e=>{I(!0),ae(void 0);try{const qe=await _e();qe&&(k(qe),z(void 0),ee(void 0),W(void 0),X(void 0),p("image"))}catch(qe){ae(dy(qe))}finally{I(!1)}},[]);y.useEffect(()=>{if(!e||f==="roles")return;const _e=qe=>{const Ft=cy(qe.clipboardData);Ft&&(qe.preventDefault(),ue(()=>pf(Ft,Ft.name)))};return window.addEventListener("paste",_e),()=>window.removeEventListener("paste",_e)},[e,f,ue]);const xe=async()=>{I(!0),ae(void 0);try{const _e=await cE(g);w(`${_e.url} — ${_e.instructions}`)}catch(_e){ae(dy(_e))}finally{I(!1)}},Ee=_e=>{const qe=O.current;if(!qe||!S)return;const Ft=qe.getBoundingClientRect();if(Ft.width===0||Ft.height===0)return;const Do=Math.round((_e.clientX-Ft.left)/Ft.width*S.width),qo=Math.round((_e.clientY-Ft.top)/Ft.height*S.height);return{x:Math.min(Math.max(Do,0),S.width-1),y:Math.min(Math.max(qo,0),S.height-1)}},we=_e=>{const qe=Ee(_e);qe&&(Z.current=qe,j(!0),_e.currentTarget.setPointerCapture(_e.pointerId))},Be=_e=>{if(!P||!Z.current)return;const qe=Ee(_e);qe&&z(fy(Z.current,qe))},Te=_e=>{if(!Z.current)return;const qe=Ee(_e);j(!1);const Ft=Z.current;if(Z.current=void 0,!qe)return;const Do=fy(Ft,qe);if(Do.width<4||Do.height<4){z(void 0);const qo=S?YM(S.imageData,qe.x,qe.y):void 0;qo&&ee(qo);return}z(Do)},Ae=de??V.basePaletteColor,Ke=te??V.headerBackground,Ur=Y??(Ke?ay(Ke,K):void 0),jn=df(Ur,Ke),wi=!!(Ae||Ke),Pa=()=>{s({type:"applyExtractedColors",patch:{basePaletteColor:Ae,appHeaderBackground:Ke,appHeaderForeground:Ke?Ur:void 0,paletteOverrides:c.overrideSlots?V.paletteOverrides:void 0}}),t()};return m.jsx(bn,{open:e,onOpenChange:(_e,qe)=>qe.open?void 0:t(),children:m.jsx(kn,{mountNode:n,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Get colors from a website"}),m.jsxs(Sn,{className:r.body,children:[A&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:A})}),C&&m.jsx(hr,{size:"tiny",label:"Working…"}),f==="source"&&m.jsxs(m.Fragment,{children:[m.jsx(at,{intent:"info",children:m.jsxs(st,{children:[m.jsx(di,{children:"Screenshots stay on this machine"}),"Power Platform ToolBox can't take a screenshot for you, so the site is opened in your browser and you paste the screenshot back here. Nothing is uploaded anywhere."]})}),m.jsx(Ve,{label:"Website address",hint:"Only http:// and https:// addresses can be opened.",children:m.jsxs("div",{className:r.row,children:[m.jsx(_r,{style:{flex:1},value:g,placeholder:"contoso.com",onChange:(_e,qe)=>v(qe.value),onKeyDown:_e=>{_e.key==="Enter"&&g.trim()&&xe()}}),m.jsx(Me,{appearance:"secondary",icon:m.jsx(Q4,{}),disabled:C||!g.trim(),onClick:xe,children:"Open the site"})]})}),x&&m.jsx(at,{intent:"success",children:m.jsx(st,{children:x})}),m.jsxs("div",{className:Q(r.dropZone,N&&r.dropZoneActive),onDragOver:_e=>{_e.preventDefault(),M(!0)},onDragLeave:()=>M(!1),onDrop:_e=>{_e.preventDefault(),M(!1);const qe=cy(_e.dataTransfer);qe?ue(()=>pf(qe,qe.name)):ae("That item is not a supported image. Use a PNG, JPG, GIF, WEBP or BMP screenshot.")},children:[m.jsx(Ie,{weight:"semibold",children:"Drop a screenshot here"}),m.jsx(Ie,{size:200,className:r.hint,children:uy}),m.jsxs("div",{className:r.row,children:[m.jsx(Me,{appearance:"primary",disabled:C,onClick:()=>{ue(aE)},children:"Browse for an image"}),m.jsx(Me,{appearance:"secondary",disabled:C,onClick:()=>{ue(sE)},children:"Paste from clipboard"})]})]})]}),f==="image"&&S&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{size:200,className:r.hint,children:"Drag on the image to analyse only that region, or click a pixel to use its exact colour as the base palette color."}),m.jsxs("div",{className:r.imageArea,children:[m.jsx("img",{ref:O,className:r.image,src:S.dataUri,alt:"Imported screenshot",draggable:!1,onPointerDown:we,onPointerMove:Be,onPointerUp:Te}),B&&m.jsx("div",{className:r.cropBox,style:{left:`${B.x/S.width*100}%`,top:`${B.y/S.height*100}%`,width:`${B.width/S.width*100}%`,height:`${B.height/S.height*100}%`}})]}),m.jsxs("div",{className:r.row,children:[m.jsx(Me,{size:"small",appearance:"secondary",onClick:()=>z(ry(S.imageData)),children:"Header only"}),m.jsx(Me,{size:"small",appearance:"subtle",disabled:!B,onClick:()=>z(void 0),children:"Whole image"}),m.jsx(Ro,{label:"Ignore greys",checked:c.ignoreGreys,onChange:(_e,qe)=>u({...c,ignoreGreys:qe.checked})})]}),de&&m.jsxs(Ie,{size:200,children:[m.jsx(oz,{})," Picked ",de]}),K.length===0&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:'No colour stands out in this area — it is all white, black or grey. Try another region, or turn "Ignore greys" off.'})})]}),f==="roles"&&m.jsxs(m.Fragment,{children:[m.jsx(Xt,{size:"small",children:"Extracted colors"}),m.jsxs("div",{className:r.swatches,children:[K.map(_e=>m.jsx(No,{relationship:"label",mountNode:n,content:`${_e.hex} — ${Math.round(_e.coverage*100)}% of the analysed pixels`,children:m.jsxs("button",{type:"button",className:r.swatch,onClick:()=>ee(_e.hex),children:[m.jsx("span",{className:r.swatchChip,style:{backgroundColor:_e.hex}}),m.jsxs(Ie,{size:100,className:r.swatchLabel,children:[Math.round(_e.coverage*100),"%"]})]})},_e.hex)),K.length===0&&m.jsx(Ie,{size:200,className:r.hint,children:"Nothing was extracted from this image."})]}),m.jsx(zn,{label:"Base palette color",value:Ae,hint:"Seed of the 16-slot palette. Not used by an app-header-colors-only document.",onChange:_e=>ee(_e)}),m.jsx(zn,{label:"App header background",value:Ke,onChange:_e=>W(_e)}),m.jsx(zn,{label:"App header foreground",value:Ur,contrastAgainst:Ke,onChange:_e=>X(_e)}),Ke&&Ur&&m.jsxs(m.Fragment,{children:[m.jsx(Xt,{size:"small",children:"Preview"}),m.jsxs("div",{className:r.headerPreview,style:{backgroundColor:Ke,color:Ur},children:[m.jsx(Ie,{style:{color:"inherit"},weight:"semibold",children:"Sample app"}),m.jsx(Ie,{style:{color:"inherit"},size:200,children:"Accounts"})]}),jn&&m.jsxs(Ie,{size:200,className:jn.passes?r.pass:r.fail,children:["Header contrast ",jn.ratio.toFixed(2),":1"," ",jn.passes?"meets":"is below"," the recommended"," ",Ca,":1 minimum"]})]}),m.jsx(Ro,{label:"Also override the closest palette slots",checked:c.overrideSlots,disabled:a.kind!=="customTheme",onChange:(_e,qe)=>u({...c,overrideSlots:qe.checked})}),m.jsx(Ie,{size:100,className:r.hint,children:"Off by default: the generated ramp is the documented mechanism, and forcing screenshot colours into the 16 slots produces incoherent ramps."})]})]}),m.jsxs(yn,{children:[f!=="source"&&m.jsx(Me,{appearance:"secondary",onClick:()=>p(f==="roles"?"image":"source"),children:"Back"}),m.jsx(Me,{appearance:"secondary",onClick:t,children:"Cancel"}),f==="image"&&m.jsx(Me,{appearance:"primary",disabled:K.length===0&&!de,onClick:()=>p("roles"),children:"Next"}),f==="roles"&&m.jsx(Me,{appearance:"primary",disabled:!wi,onClick:Pa,children:"Apply"})]})]})})})}function fy(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}}const hE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},sectionHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:T.spacingHorizontalS},hint:{color:T.colorNeutralForeground3},slots:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS}});function gE(){const e=hE(),t=Fo(),{model:r,dispatch:n,generatedPalette:a,resolvedPalette:s}=gr(),c=Object.keys(r.paletteOverrides).length>0,[u,f]=y.useState(!1);return m.jsxs("div",{className:e.section,children:[m.jsx(Ve,{label:"Start from a preset",hint:"Presets only seed the palette and the header colours — everything stays editable.",children:m.jsx(Ba,{mountNode:t,placeholder:"Choose a preset",selectedOptions:[],value:"",onOptionSelect:(p,g)=>{const v=_b.find(x=>x.id===g.optionValue);v&&n({type:"replace",model:v.create()})},children:_b.map(p=>m.jsx(ka,{value:p.id,text:p.label,children:p.label},p.id))})}),m.jsx(Me,{appearance:"secondary",icon:m.jsx(G4,{}),onClick:()=>f(!0),children:"Get colors from a website"}),m.jsx(pE,{open:u,onDismiss:()=>f(!1)}),m.jsx(zn,{label:"Base palette color",value:r.basePaletteColor,placeholder:"#0F6CBD",hint:"Seed colour the platform uses to generate the 16-slot palette.",onChange:p=>n({type:"setBasePaletteColor",value:p}),onReset:()=>n({type:"setBasePaletteColor",value:void 0})}),m.jsx(Ro,{label:"Lock primary",checked:r.lockPrimary,onChange:(p,g)=>n({type:"setLockPrimary",value:g.checked})}),m.jsx(Ie,{size:100,className:e.hint,children:r.lockPrimary?"The seed colour is placed in the primary slot; contrast is not guaranteed.":"The palette is optimised for accessibility; the seed colour may not appear in any slot."}),m.jsx(Ve,{label:`Vibrancy (${r.vibrancy})`,hint:"Muteness/brightness of the palette, mostly the lighter colours.",children:m.jsx(yl,{min:-100,max:100,step:1,value:r.vibrancy,onChange:(p,g)=>n({type:"setVibrancy",value:g.value})})}),m.jsx(Ve,{label:`Hue torsion (${r.hueTorsion})`,hint:"Tint/shade/tone of the palette, mostly the lighter colours.",children:m.jsx(yl,{min:-100,max:100,step:1,value:r.hueTorsion,onChange:(p,g)=>n({type:"setHueTorsion",value:g.value})})}),m.jsx(yv,{}),m.jsxs("div",{className:e.sectionHeader,children:[m.jsx(Ie,{weight:"semibold",children:"Palette slot overrides"}),m.jsx(No,{content:"Clear every slot override",relationship:"label",mountNode:t,children:m.jsx(Me,{appearance:"subtle",size:"small",icon:m.jsx(sm,{}),disabled:!c,onClick:()=>n({type:"resetPaletteOverrides"})})})]}),m.jsx(Ie,{size:100,className:e.hint,children:"The generated ramp is an approximation of the platform generator. Override a slot to pin an exact colour."}),m.jsx("div",{className:e.slots,children:pi.map(p=>m.jsx(zn,{label:p,value:r.paletteOverrides[p],placeholder:a[p],contrastAgainst:p==="primary"?"#FFFFFF":void 0,onChange:g=>n({type:"setPaletteOverride",slot:p,value:g}),onReset:()=>n({type:"setPaletteOverride",slot:p,value:void 0})},p))}),m.jsxs(Ie,{size:100,className:e.hint,children:["Resolved primary: ",s.primary]})]})}const mE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},fontRow:{display:"flex",gap:T.spacingHorizontalS},fontDropdown:{minWidth:"auto"},hint:{color:T.colorNeutralForeground3},warning:{color:T.colorPaletteDarkOrangeForeground1}});function vE(e){return e.split(",")[0].trim().replace(/^['"]|['"]$/g,"")}function bE(){const e=mE(),{model:t,dispatch:r}=gr(),n=Fo(),a=t.font?vE(t.font):void 0,s=a!==void 0&&jb.some(c=>c.toLowerCase()===a.toLowerCase());return m.jsxs("div",{className:e.section,children:[m.jsx(Ve,{label:"Font",hint:"Pick a web-safe font from the list, or type any custom font-family name. Rendering may differ depending on the fonts installed and the browser used on each person's machine.",children:m.jsxs("div",{className:e.fontRow,children:[m.jsx(_r,{style:{flexGrow:1},placeholder:"Segoe UI",value:t.font??"",onChange:(c,u)=>r({type:"setFont",value:u.value})}),m.jsx(Ba,{mountNode:n,className:e.fontDropdown,button:{children:m.jsx(dz,{}),"aria-label":"Pick a web-safe font"},selectedOptions:[],value:"",onOptionSelect:(c,u)=>r({type:"setFont",value:u.optionValue}),children:jb.map(c=>m.jsx(ka,{value:c,text:c,children:c},c))})]})}),t.font&&!s&&m.jsxs(Ie,{size:100,className:e.warning,children:['"',a,`" isn't a web-safe family. The app renders it only on machines where the font is installed — the browser falls back otherwise.`]})]})}const yE=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},preview:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM},thumb:{maxWidth:"96px",maxHeight:"48px",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,backgroundColor:T.colorNeutralBackground2},hint:{color:T.colorNeutralForeground3}}),xE=/^[a-zA-Z][a-zA-Z0-9]*_[a-zA-Z0-9_./-]+$/;function wE(e){return e instanceof Error?e.message:String(e)}function py(e){return e?`${e.publisherPrefix.trim().replace(/_+$/,"")}_`:""}function kE({open:e,file:t,solution:r,onDismiss:n,onUploaded:a,mountNode:s}){const c=yE(),[u,f]=y.useState(""),[p,g]=y.useState(!1),[v,x]=y.useState();y.useEffect(()=>{e&&t&&(f(`${py(r)}${kM(t.fileName)}`),x(void 0))},[e,t,r]);const w=py(r),S=u.trim(),k=S?w?S.startsWith(w)?xE.test(S)?void 0:"Only letters, digits, underscore, dot, slash and hyphen are allowed.":`The name must start with "${w}", the publisher prefix of the selected solution.`:"Pick a target solution in the config bar first.":"Enter a name for the web resource.",B=async()=>{if(!(!t||!r||k)){g(!0),x(void 0);try{const z=await so.createWebResource({name:S,displayName:t.fileName,webResourceType:t.webResourceType,contentBase64:t.contentBase64,solutionUniqueName:r.uniqueName,description:"App header logo, uploaded by Theme Studio."});await so.publishWebResource(z.id),a(z)}catch(z){x(wE(z))}finally{g(!1)}}};return m.jsx(bn,{open:e,onOpenChange:(z,P)=>P.open||p?void 0:n(),children:m.jsx(kn,{mountNode:s,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Upload the logo"}),m.jsxs(Sn,{className:c.body,children:[t&&m.jsxs("div",{className:c.preview,children:[m.jsx("img",{className:c.thumb,src:t.dataUri,alt:""}),m.jsx("span",{className:c.hint,children:t.fileName})]}),m.jsx(Ve,{label:"Web resource name",required:!0,validationState:k?"error":"none",validationMessage:k,children:m.jsx(_r,{value:u,onChange:(z,P)=>f(P.value)})}),v&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:v})}),p&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Uploading and publishing the logo…"})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",disabled:p,onClick:n,children:"Cancel"}),m.jsx(af,{appearance:"primary",busy:p,busyLabel:"Uploading…",disabled:!!k,onClick:()=>{B()},children:"Upload"})]})]})})})}const SE="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzQzMDNfMTIzMCkiPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDFfNDMwM18xMjMwKSI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMl80MzAzXzEyMzApIj4KPHBhdGggZD0iTTEzLjg3NzYgMjEuODI0MkMyOS4xMDMzIDguMTM3OTEgNDkuNzUwMSA4LjE4NjEgNjIuOTU1IDE4LjkxMzRDNzQuOTgxNiAyOC42ODM2IDc3LjQ2OTcgNDQuMzE1OSA3MC44NTEgNTUuNzgwMUM2NC4yMzIxIDY3LjI0NDMgNTIuNTI3NyA3MC4xNDU1IDM5LjUwMTEgNjIuNjI0N0wzMS43Mjg2IDc2LjA4N0wzMS43MjM0IDc2LjA4NjJDMjcuNDE4MSA4My41MzI0IDE3Ljg5MzcgODYuMDgyOCAxMC40NDM3IDgxLjc4MTdDNy40NTM5NCA4MC4wNTU2IDUuMjUzMjIgNzcuNDg3OSAzLjk2NjY1IDc0LjU1MUwzLjk2MDk2IDc0LjU1MTFDLTQuMDc4MzIgNTUuNzgwNCAwLjIwMDc0NSAzNC4xMTg0IDEzLjg3NzYgMjEuODI0MloiIGZpbGw9InVybCgjcGFpbnQwX3JhZGlhbF80MzAzXzEyMzApIi8+CjxwYXRoIGQ9Ik0xMy44Nzc2IDIxLjgyNDJDMjkuMTAzMyA4LjEzNzkxIDQ5Ljc1MDEgOC4xODYxIDYyLjk1NSAxOC45MTM0Qzc0Ljk4MTYgMjguNjgzNiA3Ny40Njk3IDQ0LjMxNTkgNzAuODUxIDU1Ljc4MDFDNjQuMjMyMSA2Ny4yNDQzIDUyLjUyNzcgNzAuMTQ1NSAzOS41MDExIDYyLjYyNDdMMzEuNzI4NiA3Ni4wODdMMzEuNzIzNCA3Ni4wODYyQzI3LjQxODEgODMuNTMyNCAxNy44OTM3IDg2LjA4MjggMTAuNDQzNyA4MS43ODE3QzcuNDUzOTQgODAuMDU1NiA1LjI1MzIyIDc3LjQ4NzkgMy45NjY2NSA3NC41NTFMMy45NjA5NiA3NC41NTExQy00LjA3ODMyIDU1Ljc4MDQgMC4yMDA3NDUgMzQuMTE4NCAxMy44Nzc2IDIxLjgyNDJaIiBmaWxsPSJ1cmwoI3BhaW50MV9yYWRpYWxfNDMwM18xMjMwKSIgZmlsbC1vcGFjaXR5PSIwLjgiLz4KPHBhdGggZD0iTTg1LjQzMjcgMTQuMjIzMUM4OC40NTI4IDE1Ljk2NjggOTAuNjY4NiAxOC41NjkgOTEuOTQ5NCAyMS41NDMzTDkxLjk1MzMgMjEuNTQ0NEM5OS45NDA2IDQwLjI5NDMgOTUuNjUzMyA2MS45MDY4IDgxLjk5ODMgNzQuMTgxNEM2Ni43NzI2IDg3Ljg2NzcgNDYuMTI1NyA4Ny44MTk2IDMyLjkyMDkgNzcuMDkyM0MyMC44OTQ1IDY3LjMyMjEgMTguNDA2MiA1MS42ODk3IDI1LjAyNDkgNDAuMjI1NkMzMS42NDM4IDI4Ljc2MTQgNDMuMzQ4MiAyNS44NjAxIDU2LjM3NDggMzMuMzgxTDY0LjE0MzQgMTkuOTI1NUw2NC4xNDgyIDE5LjkyNDlDNjguNDUxNiAxMi40NzM2IDc3Ljk4MDUgOS45MjA4NCA4NS40MzI3IDE0LjIyMzFaIiBmaWxsPSJ1cmwoI3BhaW50Ml9yYWRpYWxfNDMwM18xMjMwKSIvPgo8cGF0aCBkPSJNODUuNDMyNyAxNC4yMjMxQzg4LjQ1MjggMTUuOTY2OCA5MC42Njg2IDE4LjU2OSA5MS45NDk0IDIxLjU0MzNMOTEuOTUzMyAyMS41NDQ0Qzk5Ljk0MDYgNDAuMjk0MyA5NS42NTMzIDYxLjkwNjggODEuOTk4MyA3NC4xODE0QzY2Ljc3MjYgODcuODY3NyA0Ni4xMjU3IDg3LjgxOTYgMzIuOTIwOSA3Ny4wOTIzQzIwLjg5NDUgNjcuMzIyMSAxOC40MDYyIDUxLjY4OTcgMjUuMDI0OSA0MC4yMjU2QzMxLjY0MzggMjguNzYxNCA0My4zNDgyIDI1Ljg2MDEgNTYuMzc0OCAzMy4zODFMNjQuMTQzNCAxOS45MjU1TDY0LjE0ODIgMTkuOTI0OUM2OC40NTE2IDEyLjQ3MzYgNzcuOTgwNSA5LjkyMDg0IDg1LjQzMjcgMTQuMjIzMVoiIGZpbGw9InVybCgjcGFpbnQzX3JhZGlhbF80MzAzXzEyMzApIiBmaWxsLW9wYWNpdHk9IjAuOSIvPgo8cGF0aCBkPSJNMzkuNTA0MSA2Mi42MjYxQzUyLjUzMDcgNzAuMTQ2OSA2NC4yMzUyIDY3LjI0NTYgNzAuODU0MSA1NS43ODE0Qzc3LjI0ODggNDQuNzA1NSA3NS4xNDI2IDI5LjczODkgNjQuMTQ3IDE5LjkyNzFMNTYuMzc5MSAzMy4zODE0TDM5LjUwNDEgNjIuNjI2MVoiIGZpbGw9InVybCgjcGFpbnQ0X3JhZGlhbF80MzAzXzEyMzApIi8+CjxwYXRoIGQ9Ik01Ni4zNzk0IDMzLjM4MTVDNDMuMzUyOCAyNS44NjA3IDMxLjY0ODIgMjguNzYyIDI1LjAyOTQgNDAuMjI2MkMxOC42MzQ3IDUxLjMwMjEgMjAuNzQwOSA2Ni4yNjg3IDMxLjczNjQgNzYuMDgwNkwzOS41MDQzIDYyLjYyNjJMNTYuMzc5NCAzMy4zODE1WiIgZmlsbD0idXJsKCNwYWludDVfcmFkaWFsXzQzMDNfMTIzMCkiLz4KPHBhdGggZD0iTTMzLjMyMTUgNTYuNDQ1M0MzNy45ODM3IDY0LjUyMDQgNDguMzA5NCA2Ny4yODcyIDU2LjM4NDYgNjIuNjI1QzY0LjQ1OTggNTcuOTYyOCA2Ny4yMjY2IDQ3LjYzNzEgNjIuNTY0MyAzOS41NjE5QzU3LjkwMjEgMzEuNDg2NyA0Ny41NzY0IDI4LjcyIDM5LjUwMTMgMzMuMzgyMkMzMS40MjYxIDM4LjA0NDQgMjguNjU5MyA0OC4zNzAxIDMzLjMyMTUgNTYuNDQ1M1oiIGZpbGw9InVybCgjcGFpbnQ2X3JhZGlhbF80MzAzXzEyMzApIi8+CjwvZz4KPC9nPgo8L2c+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDQ2LjAwMDEgNDkuNDk5Nikgcm90YXRlKC0xNDguNzE3KSBzY2FsZSg0Ni4yMTk1IDQ3LjUzNTkpIj4KPHN0b3Agb2Zmc2V0PSIwLjQ2NTA4OCIgc3RvcC1jb2xvcj0iIzA5NDQyQSIvPgo8c3RvcCBvZmZzZXQ9IjAuNzAwODgiIHN0b3AtY29sb3I9IiMxMzZDNkMiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMjI5MThCIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQxX3JhZGlhbF80MzAzXzEyMzAiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAuMDAwMSAzMi40OTk2KSByb3RhdGUoMTIzLjU3KSBzY2FsZSg2Ni4wMDk1IDQ2LjU0OTgpIj4KPHN0b3Agb2Zmc2V0PSIwLjcxODcwNSIgc3RvcC1jb2xvcj0iIzFBN0Y3QyIgc3RvcC1vcGFjaXR5PSIwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE2QkJEQSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50Ml9yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUwLjQ5OTkgNDQuNTAwMSkgcm90YXRlKDMwLjc1KSBzY2FsZSg0NS45NjE4IDQ0LjUwOTUpIj4KPHN0b3Agb2Zmc2V0PSIwLjM1ODA5NyIgc3RvcC1jb2xvcj0iIzEzNkM2QyIvPgo8c3RvcCBvZmZzZXQ9IjAuNzg5NDc0IiBzdG9wLWNvbG9yPSIjNDJCODcwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzc2RDQ1RSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50M19yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNDIuNSAtMzYuMDAwMiAzMS4xODI0IDM2LjgxMjcgNDkuNDk5OCA1NS41MDAxKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBvZmZzZXQ9IjAuNTgzMTY2IiBzdG9wLWNvbG9yPSIjNzZENDVFIiBzdG9wLW9wYWNpdHk9IjAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQzhGNUI3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ0X3JhZGlhbF80MzAzXzEyMzAiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDcuNSA0OCkgcm90YXRlKC01OC45MDQyKSBzY2FsZSgzMi42ODk4KSI+CjxzdG9wIG9mZnNldD0iMC40ODYyNjYiIHN0b3AtY29sb3I9IiMyMjkxOEIiLz4KPHN0b3Agb2Zmc2V0PSIwLjcyOTU5OSIgc3RvcC1jb2xvcj0iIzQyQjg3MCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM0M0U1Q0EiLz4KPC9yYWRpYWxHcmFkaWVudD4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDVfcmFkaWFsXzQzMDNfMTIzMCIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSg0Ny4zODMzIDQ5LjAwNzcpIHJvdGF0ZSgxMTkuODU5KSBzY2FsZSgzMS4xMzI4IDI5LjQwMzIpIj4KPHN0b3Agb2Zmc2V0PSIwLjQ1OTU1MyIgc3RvcC1jb2xvcj0iIzA4NDk0RSIvPgo8c3RvcCBvZmZzZXQ9IjAuNzQyMjQyIiBzdG9wLWNvbG9yPSIjMUE3RjdDIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzMwOUM2MSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50Nl9yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUyLjUgNDApIHJvdGF0ZSgxMjAuNzg0KSBzY2FsZSgyNy4zNTQyKSI+CjxzdG9wIHN0b3AtY29sb3I9IiNDOEY1QjciLz4KPHN0b3Agb2Zmc2V0PSIwLjI0NTgzIiBzdG9wLWNvbG9yPSIjOThGMEIwIi8+CjxzdG9wIG9mZnNldD0iMC42NDM5NjEiIHN0b3AtY29sb3I9IiM1MkQxN0MiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMTE5RkM1Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfNDMwM18xMjMwIj4KPHJlY3Qgd2lkdGg9Ijk2IiBoZWlnaHQ9Ijk2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8Y2xpcFBhdGggaWQ9ImNsaXAxXzQzMDNfMTIzMCI+CjxyZWN0IHdpZHRoPSI5NiIgaGVpZ2h0PSI5NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPGNsaXBQYXRoIGlkPSJjbGlwMl80MzAzXzEyMzAiPgo8cmVjdCB3aWR0aD0iOTUuOTk5OCIgaGVpZ2h0PSI5NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",BE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},hint:{color:T.colorNeutralForeground3},buttons:{display:"flex",gap:T.spacingHorizontalS},dataverseIcon:{width:"16px",height:"16px",display:"block"}}),zE=/^[a-zA-Z][a-zA-Z0-9]*_[a-zA-Z0-9_./-]+$/;function jE(e){return e instanceof Error?e.message:String(e)}function _E(){const e=BE(),t=Fo(),{model:r,dispatch:n}=gr(),{connection:a,selectedSolution:s,logoWarning:c,logoLoading:u,setPendingLogo:f}=Na(),[p,g]=y.useState(!1),[v,x]=y.useState(),[w,S]=y.useState(),k=r.logoWebResource??"",B=k!==""&&!zE.test(k),z=!!a,P=C=>{g(!1),f(void 0),n({type:"setLogoWebResource",value:C.name})},j=async()=>{S(void 0);let C;try{C=await xM()}catch(I){S(jE(I));return}if(C){if(f(C.dataUri,Hb(C.dimensions)),!s){S("Pick a target solution in the config bar before uploading a logo."),f(void 0);return}x(C)}},N=C=>{f(void 0),x(void 0),n({type:"setLogoWebResource",value:C.name})},M=()=>{f(void 0),x(void 0)};return m.jsxs("div",{className:e.section,children:[m.jsx(Ve,{label:"Logo web resource",hint:"Logical name (with publisher prefix) of an image web resource. Recommended size 156 × 48 px.",validationState:B?"warning":"none",validationMessage:B?"This does not look like a logical name, e.g. contoso_company-logo.":void 0,children:m.jsx(_r,{value:k,placeholder:"contoso_company-logo",onChange:(C,I)=>{f(void 0),n({type:"setLogoWebResource",value:I.value})}})}),m.jsxs("div",{className:e.buttons,children:[m.jsx(Me,{size:"small",icon:m.jsx("img",{className:e.dataverseIcon,src:SE,alt:""}),disabled:!z,onClick:()=>g(!0),children:"Select from Dataverse"}),m.jsx(Me,{size:"small",icon:m.jsx(cm,{}),disabled:!z,onClick:()=>{j()},children:"Upload"}),u&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Loading logo…"})]}),m.jsx(Ve,{label:"Logo tooltip",hint:`Tooltip shown on the app-header logo. The platform default is "${Qd}".`,children:m.jsx(_r,{value:r.logoTooltip??"",placeholder:Qd,onChange:(C,I)=>n({type:"setLogoTooltip",value:I.value})})}),c&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:c})}),w&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:w})}),!z&&m.jsx(Ie,{size:100,className:e.hint,children:"Browsing and uploading image web resources needs an active Dataverse connection."}),m.jsx(Zb,{open:p,title:"Pick a logo web resource",types:Fb,onDismiss:()=>g(!1),onPick:P,mountNode:t}),m.jsx(kE,{open:!!v,file:v,solution:s,onDismiss:M,onUploaded:N,mountNode:t})]})}const CE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},hint:{color:T.colorNeutralForeground3}}),NE=[{label:"Rest",background:"background",foreground:"foreground",required:!0},{label:"Hover",background:"backgroundHover",foreground:"foregroundHover"},{label:"Pressed",background:"backgroundPressed",foreground:"foregroundPressed"},{label:"Selected",background:"backgroundSelected",foreground:"foregroundSelected"}];function TE(){const e=CE(),{model:t,dispatch:r}=gr(),n=t.appHeaderColors,a=n!==void 0,s=t.kind==="appHeaderColorsOnly",c=a&&!n.background;return m.jsxs("div",{className:e.section,children:[!s&&m.jsx(Ro,{label:"Override app header colors",checked:a,onChange:(u,f)=>r({type:"setAppHeaderColorsEnabled",enabled:f.checked})}),!a&&m.jsx(Ie,{size:100,className:e.hint,children:"Without an override, the platform derives the header colours from the palette."}),c&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:'"background" is required — no header colour change takes effect until it is set.'})}),a&&NE.map(u=>{const f=n[u.background],p=n[u.foreground],g=f||n.background||void 0;return m.jsxs("div",{className:e.section,children:[m.jsx(Ie,{weight:"semibold",size:200,children:u.label}),m.jsx(zn,{label:u.background,value:f||void 0,placeholder:u.required?void 0:n.background||void 0,hint:u.required?"Required — the header only changes when this is set.":'Calculated from "background" when left empty.',onChange:v=>r({type:"setAppHeaderColor",attribute:u.background,value:v}),onReset:u.required?void 0:()=>r({type:"setAppHeaderColor",attribute:u.background,value:void 0})}),m.jsx(zn,{label:u.foreground,value:p,hint:"Calculated for sufficient contrast when left empty.",contrastAgainst:g,onChange:v=>r({type:"setAppHeaderColor",attribute:u.foreground,value:v}),onReset:()=>r({type:"setAppHeaderColor",attribute:u.foreground,value:void 0})})]},u.label)})]})}const PE=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS,padding:T.spacingHorizontalL,width:"360px",minWidth:"300px",backgroundColor:T.colorNeutralBackground2,borderLeft:`1px solid ${T.colorNeutralStroke1}`,overflowY:"auto"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:T.spacingHorizontalS},hint:{color:T.colorNeutralForeground3},kind:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS},startNewButtonWrapper:{flexShrink:0,marginTop:T.spacingVerticalM,height:"40px"},startNewButton:{width:"100%",height:"100%",justifyContent:"center"},accordion:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},accordionItem:{backgroundColor:T.colorNeutralBackground1,border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusXLarge,boxShadow:T.shadow2,overflow:"hidden"},accordionHeader:{fontWeight:T.fontWeightSemibold,fontSize:T.fontSizeBase400,letterSpacing:"0.2px"},emoji:{marginRight:T.spacingHorizontalS},accordionPanel:{paddingBottom:T.spacingVerticalM}});async function Ll(e,t,r){try{await window.toolboxAPI.utils.showNotification({title:e,body:t,type:r})}catch(n){console.error("Unable to show a notification:",n)}}function hy(e){return e instanceof Error?e.message:String(e)}function RE(){const e=PE(),t=Fo(),{model:r,dispatch:n,dirty:a,canUndo:s,canRedo:c}=gr(),[u,f]=y.useState(!1),p=[...Object.keys(r.unknownAttributes),...Object.keys(r.unknownAppHeaderColorsAttributes)],g=async()=>{f(!0);try{const w=await VM();w&&(n({type:"load",model:w}),await Ll("Theme imported","The theme XML file was loaded successfully.","success"))}catch(w){await Ll("Import failed",hy(w),"error")}finally{f(!1)}},v=async()=>{f(!0);try{const w=await WM(r);w&&(n({type:"markSaved"}),await Ll("Theme exported",`Saved to ${w}.`,"success"))}catch(w){await Ll("Export failed",hy(w),"error")}finally{f(!1)}},x=()=>{n({type:"load",model:r.kind==="appHeaderColorsOnly"?zb():Ml()})};return m.jsxs("div",{className:e.root,children:[m.jsxs("div",{className:e.header,children:[m.jsx(Ad,{children:"Theme"}),a&&m.jsx(Ie,{size:100,className:e.hint,children:"Unsaved changes"})]}),p.length>0&&m.jsx(at,{intent:"info",children:m.jsxs(st,{children:[m.jsx(di,{children:"Preserved as-is"}),"This theme also sets ",p.join(", "),", which this tool can't edit. The values are kept unchanged when the theme is saved."]})}),m.jsxs(Jv,{size:"small",children:[m.jsx(No,{content:"Undo",relationship:"label",mountNode:t,children:m.jsx(_a,{icon:m.jsx(uz,{}),disabled:!s,onClick:()=>n({type:"undo"}),"aria-label":"Undo"})}),m.jsx(No,{content:"Redo",relationship:"label",mountNode:t,children:m.jsx(_a,{icon:m.jsx(cz,{}),disabled:!c,onClick:()=>n({type:"redo"}),"aria-label":"Redo"})}),m.jsx(eb,{}),m.jsx(_a,{icon:m.jsx(cm,{}),disabled:u,onClick:g,children:"Import"}),m.jsx(_a,{icon:m.jsx(sz,{}),disabled:u,onClick:v,children:"Export"})]}),m.jsxs("div",{className:e.kind,children:[m.jsx(Ie,{weight:"semibold",size:200,children:"Theme document"}),m.jsxs(ml,{value:r.kind,onChange:(w,S)=>n({type:"setKind",kind:S.value}),children:[m.jsx(vn,{value:"customTheme",label:"Create full custom theme (CustomTheme)"}),m.jsx(vn,{value:"appHeaderColorsOnly",label:"Override only app header color (AppHeaderColors)"})]}),m.jsx(Ie,{size:100,className:e.hint,children:"The header-only override is ignored by the platform when a custom theme definition is also set."})]}),m.jsxs(qg,{multiple:!0,collapsible:!0,defaultOpenItems:["palette","appHeader"],className:e.accordion,children:[r.kind==="customTheme"&&m.jsxs(pa,{value:"palette",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🎨"}),"Palette"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(gE,{})})]}),r.kind==="customTheme"&&m.jsxs(pa,{value:"typography",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🔤"}),"Typography"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(bE,{})})]}),r.kind==="customTheme"&&m.jsxs(pa,{value:"logo",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🖼️"}),"Logo"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(_E,{})})]}),m.jsxs(pa,{value:"appHeader",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🧭"}),"App header"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(TE,{})})]})]}),m.jsx("div",{className:e.startNewButtonWrapper,children:m.jsx(Me,{appearance:"secondary",icon:m.jsx(od,{}),onClick:x,className:e.startNewButton,children:"Start from an empty theme"})})]})}const gy=ut({root:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS,height:"48px",paddingLeft:T.spacingHorizontalS,paddingRight:T.spacingHorizontalM,flexShrink:0},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:T.spacingHorizontalXS,minWidth:"36px",height:"36px",paddingLeft:T.spacingHorizontalXS,paddingRight:T.spacingHorizontalXS,border:"none",borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",fontSize:T.fontSizeBase300,fontFamily:"inherit",cursor:"default"},logo:{display:"inline-flex",alignItems:"center",gap:T.spacingHorizontalNone,paddingLeft:T.spacingHorizontalS,paddingRight:T.spacingHorizontalS,height:"48px"},logoImage:{height:"100%",maxWidth:"156px",objectFit:"fill"},productName:{fontSize:T.fontSizeBase400,fontWeight:T.fontWeightSemibold,whiteSpace:"nowrap"},separator:{width:"1px",height:"20px",opacity:.5},appName:{fontSize:T.fontSizeBase300,whiteSpace:"nowrap"},spacer:{flexGrow:1},avatar:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:T.borderRadiusCircular,border:"1px solid currentColor",fontSize:T.fontSizeBase200,flexShrink:0}});function Ao({colors:e,label:t,children:r,className:n}){const a=gy(),[s,c]=y.useState(!1),[u,f]=y.useState(!1),p=u?e.backgroundPressed:s?e.backgroundHover:"transparent",g=u?e.foregroundPressed:s?e.foregroundHover:e.foreground;return m.jsx("button",{type:"button","aria-label":t,title:t,className:Q(a.button,n),style:{backgroundColor:p,color:g},onMouseEnter:()=>c(!0),onMouseLeave:()=>{c(!1),f(!1)},onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onFocus:()=>c(!0),onBlur:()=>c(!1),children:r})}function ME({colors:e,logoDataUri:t,logoTooltip:r,appName:n}){const a=gy(),s=r?.trim()||Qd;return m.jsxs("header",{className:a.root,style:{backgroundColor:e.background,color:e.foreground},"data-themed":"App header","aria-label":"Sample app header",children:[m.jsx(Ao,{colors:e,label:"App launcher",children:m.jsx(zz,{fontSize:20})}),m.jsx("div",{className:a.logo,title:s,children:t?m.jsx("img",{className:a.logoImage,src:t,alt:s}):m.jsx("span",{className:a.productName,children:s})}),m.jsx("div",{className:a.separator,style:{backgroundColor:e.foreground}}),m.jsx("span",{className:a.appName,children:n}),m.jsx("div",{className:a.spacer}),m.jsx(Ao,{colors:e,label:"Search",children:m.jsx(td,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Copilot",children:m.jsx(iz,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Quick create",children:m.jsx(rd,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Filters",children:m.jsx(fm,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Settings",children:m.jsx(U4,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Help",children:m.jsx(jz,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Feedback",children:m.jsx(K4,{fontSize:20})}),m.jsx("span",{className:a.avatar,"aria-hidden":"true",children:"AU"})]})}const EE=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS,width:"224px",flexShrink:0,paddingTop:T.spacingVerticalS,paddingBottom:T.spacingVerticalS,paddingLeft:T.spacingHorizontalXS,paddingRight:T.spacingHorizontalXS,backgroundColor:T.colorNeutralBackground3,overflowY:"auto"},item:{position:"relative",display:"flex",alignItems:"center",gap:T.spacingHorizontalM,width:"100%",height:"36px",paddingLeft:T.spacingHorizontalM,paddingRight:T.spacingHorizontalM,border:"none",borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",color:T.colorNeutralForeground1,fontFamily:"inherit",fontSize:T.fontSizeBase300,textAlign:"left",cursor:"default",":hover":{backgroundColor:T.colorNeutralBackground3Hover}},selected:{backgroundColor:T.colorBrandBackground2,color:T.colorBrandForeground2,fontWeight:T.fontWeightSemibold,":hover":{backgroundColor:T.colorBrandBackground2Hover},"::before":{content:'""',position:"absolute",left:0,top:"6px",bottom:"6px",width:"3px",borderRadius:T.borderRadiusCircular,backgroundColor:T.colorBrandStroke1}},label:{flexGrow:1},groupLabel:{paddingLeft:T.spacingHorizontalM,paddingTop:T.spacingVerticalM,paddingBottom:T.spacingVerticalXS,fontSize:T.fontSizeBase300,fontWeight:T.fontWeightSemibold,color:T.colorNeutralForeground2}}),IE=[{key:"home",label:"Home",icon:m.jsx(vz,{fontSize:20})},{key:"recent",label:"Recent",icon:m.jsx(nz,{fontSize:20}),expandable:!0},{key:"pinned",label:"Pinned",icon:m.jsx(az,{fontSize:20}),expandable:!0}],FE=[{key:"accelerator",label:"Sales accelerator",icon:m.jsx(Bz,{fontSize:20})},{key:"activities",label:"Activities",icon:m.jsx(nm,{fontSize:20})},{key:"dashboards",label:"Dashboards",icon:m.jsx(rm,{fontSize:20})},{key:"accounts",label:"Accounts",icon:m.jsx(rm,{fontSize:20})}];function AE(){const e=EE(),[t,r]=y.useState("accounts"),n=a=>m.jsxs("button",{type:"button",className:Q(e.item,t===a.key&&e.selected),"aria-current":t===a.key?"page":void 0,onClick:()=>r(a.key),children:[a.icon,m.jsx("span",{className:e.label,children:a.label}),a.expandable&&m.jsx(pn,{fontSize:16})]},a.key);return m.jsxs("nav",{className:e.root,"aria-label":"Sample app navigation","data-themed":"Navigation selection and hover",children:[m.jsx("button",{type:"button",className:e.item,"aria-label":"Collapse navigation",children:m.jsx(tz,{fontSize:20})}),IE.map(n),m.jsx("div",{className:e.groupLabel,children:"My Work"}),FE.map(n)]})}const DE=ut({root:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXXS,...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4,paddingLeft:T.spacingHorizontalS,paddingRight:T.spacingHorizontalS,paddingTop:T.spacingVerticalXS,paddingBottom:T.spacingVerticalXS,flexShrink:0},spacer:{flexGrow:1},divider:{width:"1px",height:"20px",backgroundColor:T.colorNeutralStroke2,marginLeft:T.spacingHorizontalXS,marginRight:T.spacingHorizontalXS}});function qE({commands:e,primaryLabel:t="Share"}){const r=DE();return m.jsxs("div",{className:r.root,role:"toolbar","aria-label":"Sample command bar",children:[e.map(n=>m.jsx(Me,{appearance:"subtle",icon:n.icon,children:m.jsx("span",{style:{whiteSpace:"nowrap"},children:n.label})},n.key)),m.jsx(Me,{appearance:"subtle",icon:m.jsx(pn,{}),"aria-label":"More commands"}),m.jsx("div",{className:r.divider}),m.jsx(Me,{appearance:"subtle",icon:m.jsx(V4,{}),"aria-label":"More"}),m.jsx("div",{className:r.spacer}),m.jsx(Me,{appearance:"primary",icon:m.jsx(em,{}),"data-themed":"Primary button",children:t})]})}function my(e){return{...e,colorCompoundBrandStroke:e.colorNeutralStroke1,colorCompoundBrandStrokeHover:e.colorNeutralStroke1Hover,colorCompoundBrandStrokePressed:e.colorNeutralStroke1Pressed}}const OE=ut({host:{display:"contents"}});function Pt({isDisabled:e,...t}){const r=OE(),{previewTheme:n}=gr(),a=e?my(n.fluentTheme):n.fluentTheme;return m.jsx(Zn,{theme:a,className:r.host,children:m.jsx(_r,{appearance:"filled-darker",readOnly:e,...t})})}const hf=[{id:"1",name:"A. Datum Corporation (sample)",mainPhone:"555-0158",city:"Redmond",primaryContact:"Rene Valdes (sample)",email:"someone_i@example.com"},{id:"2",name:"Adventure Works (sample)",mainPhone:"555-0152",city:"Santa Cruz",primaryContact:"Nancy Anderson (sample)",email:"someone_c@example.com"},{id:"3",name:"Alpine Ski House (sample)",mainPhone:"555-0157",city:"Missoula",primaryContact:"Paul Cannon (sample)",email:"someone_h@example.com"},{id:"4",name:"Blue Yonder Airlines (sample)",mainPhone:"555-0154",city:"Los Angeles",primaryContact:"Sidney Higa (sample)",email:"someone_e@example.com"},{id:"5",name:"City Power & Light (sample)",mainPhone:"555-0155",city:"Redmond",primaryContact:"Scott Konersmann (sample)",email:"someone_f@example.com"},{id:"6",name:"Coho Winery (sample)",mainPhone:"555-0159",city:"Phoenix",primaryContact:"Jim Glynn (sample)",email:"someone_j@example.com"},{id:"7",name:"Contoso Pharmaceuticals (sample)",mainPhone:"555-0156",city:"Redmond",primaryContact:"Robert Lyon (sample)",email:"someone_g@example.com"},{id:"8",name:"Fabrikam, Inc. (sample)",mainPhone:"555-0153",city:"Lynnwood",primaryContact:"Maria Campbell (sample)",email:"someone_d@example.com"}],HE=["My Active Accounts","All Accounts","Accounts: Influenced Deals That We Won","Active Accounts","Inactive Accounts"],LE=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,padding:T.spacingHorizontalL,minWidth:0,flexGrow:1},surface:{display:"flex",flexDirection:"column",...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4,overflow:"hidden"},gridHeader:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,padding:`${T.spacingVerticalM} ${T.spacingHorizontalL}`},viewSelector:{display:"inline-flex",alignItems:"center",gap:T.spacingHorizontalXS,border:"none",backgroundColor:"transparent",color:T.colorNeutralForeground1,fontFamily:"inherit",lineHeight:T.lineHeightBase500,fontSize:T.fontSizeBase500,fontWeight:T.fontWeightSemibold,cursor:"default",padding:0},spacer:{flexGrow:1},iconButton:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",color:T.colorNeutralForeground2,cursor:"default",":hover":{backgroundColor:T.colorNeutralBackground1Hover}},search:{width:"240px"},table:{width:"100%",borderCollapse:"collapse",fontSize:T.fontSizeBase300},th:{textAlign:"left",fontWeight:T.fontWeightSemibold,color:T.colorNeutralForeground1,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,borderBottom:`1px solid ${T.colorNeutralStroke2}`,whiteSpace:"nowrap"},td:{padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,borderBottom:`1px solid ${T.colorNeutralStroke3}`,color:T.colorNeutralForeground1,whiteSpace:"nowrap"},checkboxCell:{width:"44px",paddingLeft:T.spacingHorizontalM},row:{":hover":{backgroundColor:T.colorNeutralBackground1Hover}},selectedRow:{backgroundColor:T.colorBrandBackground2,":hover":{backgroundColor:T.colorBrandBackground2Hover}},link:{color:T.colorBrandForegroundLink,textDecorationLine:"none",cursor:"default",":hover":{color:T.colorBrandForegroundLinkHover,textDecorationLine:"underline"}},empty:{padding:T.spacingHorizontalL,color:T.colorNeutralForeground3}}),VE=[{key:"chart",label:"Show Chart",icon:m.jsx(um,{})},{key:"focused",label:"Focused view",icon:m.jsx(nm,{})},{key:"new",label:"New",icon:m.jsx(rd,{})},{key:"delete",label:"Delete",icon:m.jsx(od,{})},{key:"refresh",label:"Refresh",icon:m.jsx(am,{})},{key:"visualize",label:"Visualize this view",icon:m.jsx(um,{})}],WE=[{key:"name",label:"Account Name"},{key:"mainPhone",label:"Main Phone"},{key:"city",label:"Address 1: City"},{key:"primaryContact",label:"Primary Contact"},{key:"email",label:"Email (Primary Contact)"}];function $E(){const e=LE(),[t,r]=y.useState([]),[n,a]=y.useState(""),s=y.useMemo(()=>{const f=n.trim().toLowerCase();return f?hf.filter(p=>Object.values(p).some(g=>g.toLowerCase().includes(f))):hf},[n]),c=s.length>0&&s.every(f=>t.includes(f.id)),u=f=>{r(p=>p.includes(f)?p.filter(g=>g!==f):[...p,f])};return m.jsxs("div",{className:e.root,children:[m.jsx(qE,{commands:VE}),m.jsxs("div",{className:e.surface,children:[m.jsxs("div",{className:e.gridHeader,children:[m.jsxs("button",{type:"button",className:e.viewSelector,"aria-label":"View selector",children:[HE[0],m.jsx(pn,{fontSize:20})]}),m.jsx("div",{className:e.spacer}),m.jsx("button",{type:"button",className:e.iconButton,"aria-label":"Edit columns",children:m.jsx(L4,{fontSize:20})}),m.jsx("button",{type:"button",className:e.iconButton,"aria-label":"Edit filters",children:m.jsx(fm,{fontSize:20})}),m.jsx(Pt,{className:e.search,size:"medium",placeholder:"Filter by keyword",contentBefore:m.jsx(td,{}),value:n,onChange:(f,p)=>a(p.value),"aria-label":"Filter by keyword"})]}),m.jsxs("table",{className:e.table,"data-themed":"Row selection, hover and hyperlinks",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{className:Q(e.th,e.checkboxCell),children:m.jsx(fl,{checked:c,"aria-label":"Select all rows",onChange:(f,p)=>r(p.checked?s.map(g=>g.id):[])})}),WE.map(f=>m.jsx("th",{className:e.th,children:f.label},f.key))]})}),m.jsx("tbody",{children:s.map(f=>{const p=t.includes(f.id);return m.jsxs("tr",{className:Q(e.row,p&&e.selectedRow),"aria-selected":p,children:[m.jsx("td",{className:Q(e.td,e.checkboxCell),children:m.jsx(fl,{checked:p,"aria-label":`Select ${f.name}`,onChange:()=>u(f.id)})}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.name})}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.mainPhone})}),m.jsx("td",{className:e.td,children:f.city}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.primaryContact})}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.email})})]},f.id)})})]}),s.length===0&&m.jsx("div",{className:e.empty,children:"No records match the keyword."})]})]})}const UE=ut({host:{display:"contents"}});function GE({isDisabled:e,...t}){const r=UE(),{previewTheme:n}=gr(),a=e?my(n.fluentTheme):n.fluentTheme;return m.jsx(Zn,{theme:a,className:r.host,children:m.jsx(Wv,{appearance:"filled-darker",readOnly:e,...t})})}const gf=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,padding:T.spacingHorizontalL,minWidth:0,flexGrow:1},surface:{display:"flex",flexDirection:"column",...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4},formHeader:{display:"flex",alignItems:"center",flexWrap:"nowrap",columnGap:T.spacingHorizontalL,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`},titleGroup:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,flexShrink:0,minWidth:0},headerFields:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:T.spacingHorizontalM,flexShrink:0,marginLeft:"auto"},recordIcon:{display:"flex",alignItems:"center",justifyContent:"center",width:"36px",height:"36px",flexShrink:0,...ta.borderRadius(T.borderRadiusCircular),backgroundColor:T.colorNeutralBackground4,color:T.colorNeutralForeground2},titleBlock:{display:"flex",flexDirection:"column",minWidth:0},recordName:{fontSize:T.fontSizeBase600,lineHeight:T.lineHeightBase600,fontWeight:T.fontWeightSemibold,textWrap:"nowrap"},recordSubtitle:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXXS,fontSize:T.fontSizeBase200,color:T.colorNeutralForeground3},headerField:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS},headerFieldLabel:{fontSize:T.fontSizeBase200,color:T.colorNeutralForeground1},ownerField:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS},commands:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:T.spacingHorizontalXXS,flexShrink:0},commandsPushed:{marginLeft:"auto"},commandButton:{minWidth:"auto",flexShrink:0,whiteSpace:"nowrap"},divider:{width:"1px",alignSelf:"stretch",marginTop:T.spacingVerticalXS,marginBottom:T.spacingVerticalXS,backgroundColor:T.colorNeutralStroke2},tabs:{display:"flex",alignItems:"flex-end",gap:T.spacingHorizontalXS,paddingLeft:T.spacingHorizontalL,paddingRight:T.spacingHorizontalM},tab:{position:"relative",border:"none",backgroundColor:"transparent",color:T.colorNeutralForeground2,fontFamily:"inherit",fontSize:T.fontSizeBase300,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,cursor:"default",":hover":{color:T.colorNeutralForeground1}},activeTab:{color:T.colorNeutralForeground1,fontWeight:T.fontWeightSemibold,"::after":{content:'""',position:"absolute",left:T.spacingHorizontalM,right:T.spacingHorizontalM,bottom:0,height:"2px",borderRadius:T.borderRadiusCircular,backgroundColor:T.colorCompoundBrandStroke}},columns:{display:"flex",flexWrap:"wrap",alignItems:"flex-start",gap:T.spacingHorizontalM},section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,minWidth:"280px",flexGrow:1,flexBasis:"320px",padding:T.spacingHorizontalL,...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4},sectionTitle:{fontSize:T.fontSizeBase200,fontWeight:T.fontWeightSemibold,textTransform:"uppercase",letterSpacing:"0.4px",color:T.colorNeutralForeground2},lookup:{display:"inline-flex",alignItems:"center",gap:T.spacingHorizontalXS,color:T.colorBrandForegroundLink,paddingLeft:T.spacingHorizontalS,cursor:"default",":hover":{color:T.colorBrandForegroundLinkHover,textDecorationLine:"underline"}},ownerLink:{paddingLeft:0,whiteSpace:"nowrap"}}),XE=["Summary","Details","Related"],mf=[{key:"save",label:"Save",icon:m.jsx(om,{})},{key:"saveClose",label:"Save & Close",icon:m.jsx(J4,{})},{key:"new",label:"New",icon:m.jsx(rd,{})}],xi={...hf[0],name:"Contoso Inc."},KE=1120,YE=[560,700,840];function QE(){const e=y.useRef(null),[t,r]=y.useState(0);return y.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(([s])=>r(s.contentRect.width));return a.observe(n),()=>a.disconnect()},[]),[e,t]}function ZE({hidden:e}){const t=gf(),r=Fo();return m.jsxs(zv,{mountNode:r,children:[m.jsx(Rd,{disableButtonEnhancement:!0,children:m.jsx(Me,{className:t.commandButton,appearance:"subtle",icon:m.jsx(W4,{}),"aria-label":"More commands"})}),m.jsx(Mv,{children:m.jsxs(Rv,{children:[e.map(n=>m.jsx(gl,{icon:n.icon,children:n.label},n.key)),m.jsx(gl,{icon:m.jsx(od,{}),children:"Delete"}),m.jsx(gl,{icon:m.jsx(am,{}),children:"Refresh"})]})})]})}function vy({label:e,value:t}){const r=gf();return m.jsx(Ve,{label:e,children:m.jsxs("span",{className:r.lookup,"data-themed":"Lookup",children:[m.jsx(tm,{}),t]})})}function JE(){const e=gf(),[t,r]=y.useState("Summary"),[n,a]=QE(),s=a===0||a>=KE,c=a===0?mf.length:YE.filter(u=>a>=u).length;return m.jsxs("div",{className:e.root,children:[m.jsxs("div",{className:e.surface,ref:n,children:[m.jsxs("div",{className:e.formHeader,children:[m.jsxs("div",{className:e.titleGroup,children:[m.jsx(Me,{appearance:"subtle",icon:m.jsx(lz,{}),"aria-label":"Back"}),m.jsx("span",{className:e.recordIcon,children:m.jsx(yz,{})}),m.jsxs("div",{className:e.titleBlock,children:[m.jsx("span",{className:e.recordName,children:xi.name}),m.jsxs("span",{className:e.recordSubtitle,children:["Account · Account",m.jsx(pn,{})]})]})]}),s&&m.jsxs("div",{className:e.headerFields,children:[m.jsxs("div",{className:e.headerField,children:[m.jsx("span",{children:xi.mainPhone}),m.jsx("span",{className:e.headerFieldLabel,children:"Main Phone"})]}),m.jsx("div",{className:e.divider}),m.jsxs("div",{className:e.ownerField,children:[m.jsx(i1,{name:"Alan Steiner",color:"colorful",size:32}),m.jsxs("div",{className:e.headerField,children:[m.jsx("span",{className:Q(e.lookup,e.ownerLink),"data-themed":"Lookup",children:"Alan Steiner"}),m.jsx("span",{className:e.headerFieldLabel,children:"Owner"})]})]}),m.jsx(Me,{appearance:"subtle",icon:m.jsx(pn,{}),"aria-label":"More header fields"}),m.jsx("div",{className:e.divider})]}),m.jsxs("div",{className:Q(e.commands,!s&&e.commandsPushed),role:"toolbar","aria-label":"Commands",children:[mf.slice(0,c).map(u=>m.jsx(Me,{className:e.commandButton,appearance:"subtle",icon:u.icon,children:u.label},u.key)),m.jsx(ZE,{hidden:mf.slice(c)}),m.jsx("div",{className:e.divider}),m.jsx(Me,{className:e.commandButton,appearance:"subtle",icon:m.jsx(em,{}),iconPosition:"before","aria-label":"Share",children:m.jsx(pn,{})})]})]}),m.jsx("div",{className:e.tabs,role:"tablist","aria-label":"Sample form tabs","data-themed":"Active tab indicator",children:XE.map(u=>m.jsx("button",{type:"button",role:"tab","aria-selected":t===u,className:Q(e.tab,t===u&&e.activeTab),onClick:()=>r(u),children:u},u))})]}),t==="Summary"&&m.jsxs("div",{className:e.columns,children:[m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:"Account information"}),m.jsx(Ve,{label:"Account Name (single line of text)",children:m.jsx(Pt,{value:xi.name})}),m.jsx(Ve,{label:"Description (multiple lines of text)",children:m.jsx(GE,{resize:"vertical",value:"Preferred customer since 2019. Head office in Redmond, three regional branches."})}),m.jsx(Ve,{label:"Website (URL)",children:m.jsx(Pt,{value:"https://www.adatum.com",contentBefore:m.jsx(rz,{})})}),m.jsx(Ve,{label:"Email (email)",children:m.jsx(Pt,{value:xi.email,contentBefore:m.jsx(H4,{})})}),m.jsx(Ve,{label:"Main Phone (phone)",children:m.jsx(Pt,{value:xi.mainPhone})}),m.jsx(vy,{label:"Primary Contact (lookup)",value:xi.primaryContact}),m.jsx(vy,{label:"Bill To Customer (customer)",value:"Adventure Works (sample)"})]}),m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:"Classification"}),m.jsx(Ve,{label:"Industry (choice)",children:m.jsx(Pt,{value:"Consulting"})}),m.jsx(Ve,{label:"Contact Methods (choices)",children:m.jsx(Pt,{value:"Email, Phone"})}),m.jsx(Ve,{label:"Status Reason (status)",children:m.jsx(Pt,{isDisabled:!0,value:"Active"})}),m.jsx(Ve,{label:"Do not allow bulk email (yes/no)",children:m.jsx(Ro,{checked:!0,label:"No"})}),m.jsx(Ve,{label:"Preferred contact time (option set as radio)",children:m.jsxs(ml,{value:"morning",layout:"horizontal",children:[m.jsx(vn,{value:"morning",label:"Morning"}),m.jsx(vn,{value:"afternoon",label:"Afternoon"})]})})]}),m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:"Financials and dates"}),m.jsx(Ve,{label:"Number of Employees (whole number)",children:m.jsx(Pt,{value:"1 250"})}),m.jsx(Ve,{label:"Credit Score (decimal)",children:m.jsx(Pt,{value:"7.45"})}),m.jsx(Ve,{label:"Exchange Rate (floating point)",children:m.jsx(Pt,{value:"1.0865"})}),m.jsx(Ve,{label:"Annual Revenue (currency)",children:m.jsx(Pt,{value:"$ 12,500,000.00",contentBefore:m.jsx(bz,{})})}),m.jsx(Ve,{label:"Anniversary (date only)",children:m.jsx(Pt,{type:"text",value:"14/03/2019"})}),m.jsx(Ve,{label:"Last Interaction (date and time)",children:m.jsx(Pt,{value:"02/06/2026 09:30"})}),m.jsx(Ve,{label:"Duration (whole number, duration format)",children:m.jsx(Pt,{value:"1 hour 30 minutes"})}),m.jsx(Ve,{label:"Brochure (file)",children:m.jsx(Pt,{value:"company-profile.pdf",contentBefore:m.jsx(xz,{})})})]})]}),t!=="Summary"&&m.jsx("div",{className:e.columns,children:m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:t}),m.jsx(Ve,{label:"Sample column (single line of text)",children:m.jsx(Pt,{value:`${t} tab content`})})]})})]})}const eI="(max-width: 760px)",tI="(max-width: 560px)",rI=ut({root:{display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0,containerType:"inline-size",containerName:"previewPanel"},toolbar:{display:"flex",alignItems:"center",gap:T.spacingHorizontalL,padding:`${T.spacingVerticalXS} ${T.spacingHorizontalL} 0`,borderBottom:`1px solid ${T.colorNeutralStroke1}`,textWrap:"nowrap"},toolbarEnd:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,marginLeft:"auto",paddingBottom:T.spacingVerticalXS,minWidth:0,overflow:"hidden"},fadeItem:{display:"flex",alignItems:"center",opacity:1,transition:`opacity ${T.durationNormal} ${T.curveEasyEase}, width ${T.durationNormal} ${T.curveEasyEase}, margin ${T.durationNormal} ${T.curveEasyEase}`},fadeHighlight:{[`@container previewPanel ${eI}`]:{opacity:0,width:0,marginLeft:`calc(-1 * ${T.spacingHorizontalM})`,overflow:"hidden",pointerEvents:"none"}},fadeZoom:{[`@container previewPanel ${tI}`]:{opacity:0,width:0,marginLeft:`calc(-1 * ${T.spacingHorizontalM})`,overflow:"hidden",pointerEvents:"none"}},zoom:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXS,flexShrink:0},zoomSlider:{width:"100px",minWidth:"80px"},zoomValue:{minWidth:"36px",textAlign:"right",color:T.colorNeutralForeground3},scroll:{flex:1,minHeight:0,overflow:"auto",backgroundColor:T.colorNeutralBackground3,padding:T.spacingHorizontalM},scaler:{transformOrigin:"top left"},app:{display:"flex",flexDirection:"column",minWidth:"1100px",minHeight:"760px",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,overflow:"hidden"},body:{display:"flex",flex:1,minHeight:0},canvas:{display:"flex",flex:1,minWidth:0,backgroundColor:T.colorNeutralBackground3},highlight:{"& [data-themed]":{outline:`2px dashed ${T.colorPaletteRedBorder2}`,outlineOffset:"-2px"}},portalHost:{position:"fixed",top:0,left:0,width:0,height:0,zIndex:1e6}}),oI=50,by=100;function nI(){const e=rI(),{previewTheme:t,model:r}=gr(),{logoDataUri:n}=Na(),[a,s]=ef("ui.previewTab","view"),[c,u]=ef("ui.previewZoom",by),[f,p]=y.useState(!1),g=y.useRef(null);return m.jsxs("div",{className:e.root,children:[m.jsx(Nh,{value:"preview-",children:m.jsx(Zn,{theme:t.fluentTheme,className:e.portalHost,style:{fontFamily:t.fontFamily},children:m.jsx("div",{ref:g})})}),m.jsx(Ub,{mountRef:g,children:m.jsx("div",{className:e.scroll,children:m.jsx("div",{className:e.scaler,style:{transform:`scale(${c/100})`,width:`${100/c*100}%`},children:m.jsx(Nh,{value:"preview-",children:m.jsxs(Zn,{theme:t.fluentTheme,className:Q(e.app,f&&e.highlight),style:{fontFamily:t.fontFamily},children:[m.jsx(ME,{colors:t.headerColors,logoDataUri:n,logoTooltip:r.logoTooltip,appName:"Sales Hub"}),m.jsxs("div",{className:e.body,children:[m.jsx(AE,{}),m.jsx("div",{className:e.canvas,children:a==="view"?m.jsx($E,{}):m.jsx(JE,{})})]})]})})})})}),m.jsxs("div",{className:e.toolbar,children:[m.jsxs(Fv,{selectedValue:a,onTabSelect:(v,x)=>s(x.value),children:[m.jsx(Fd,{value:"view",children:"View"}),m.jsx(Fd,{value:"form",children:"Form"})]}),m.jsxs("div",{className:e.toolbarEnd,children:[m.jsx("div",{className:Q(e.fadeItem,e.fadeHighlight),children:m.jsx(Ro,{size:"small",checked:f,onChange:(v,x)=>p(x.checked),label:"Highlight themed areas","aria-label":"Highlight the areas of the app the theme changes"})}),m.jsxs("div",{className:Q(e.fadeItem,e.zoom,e.fadeZoom),children:[m.jsx(Ie,{size:200,children:"Zoom"}),m.jsx(yl,{className:e.zoomSlider,size:"small",min:oI,max:by,step:10,value:c,"aria-label":"Preview zoom",onChange:(v,x)=>u(x.value)}),m.jsxs(Ie,{size:200,className:e.zoomValue,children:[c,"%"]})]})]})]})]})}const iI="0.1.4",aI=ut({root:{display:"flex",flexDirection:"column",height:"100vh",backgroundColor:T.colorNeutralBackground1,overflow:"hidden"},header:{display:"flex",alignItems:"flex-start",gap:T.spacingHorizontalM,padding:`${T.spacingVerticalM} ${T.spacingHorizontalL}`,borderBottom:`1px solid ${T.colorNeutralStroke1}`},headerText:{display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},titleRow:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS},headerIcon:{width:"48px",height:"48px",flexShrink:0,display:"block",marginTop:"2px"},version:{position:"relative",top:T.spacingVerticalXS},subtitle:{color:T.colorNeutralForeground3,fontSize:T.fontSizeBase200,display:"block"},body:{display:"flex",flex:1,minHeight:0},main:{display:"flex",flexDirection:"column",flex:1,minWidth:0},portalHost:{position:"fixed",top:0,left:0,width:0,height:0,zIndex:1e6}});function sI(){const e=XR(),t=aI(),r=y.useRef(null);return m.jsx(zR,{children:m.jsxs(Zn,{theme:e==="dark"?O3:D3,className:t.root,children:[m.jsx("div",{ref:r,className:t.portalHost}),m.jsxs(Ub,{mountRef:r,children:[m.jsxs("div",{className:t.header,children:[m.jsx("img",{src:"/icons/tool.svg",alt:"Theme Studio icon",className:t.headerIcon}),m.jsxs("div",{className:t.headerText,children:[m.jsxs("div",{className:t.titleRow,children:[m.jsx(Ad,{children:"Theme Studio"}),m.jsx(ad,{className:t.version,appearance:"tint",color:"subtle",size:"small",children:`v${iI}`})]}),m.jsx(Ie,{className:t.subtitle,children:"Configure model-driven app themes with a WYSIWYG preview"})]})]}),m.jsx(WR,{children:m.jsxs(SM,{children:[m.jsx(HM,{}),m.jsxs("div",{className:t.body,children:[m.jsx("div",{className:t.main,children:m.jsx(nI,{})}),m.jsx(RE,{})]})]})})]})]})})}const Ta=document.getElementById("root");Ta&&!Ta.hasAttribute("data-reactroot-initialized")?(Ta.setAttribute("data-reactroot-initialized","true"),v5.createRoot(Ta).render(m.jsx(y.StrictMode,{children:m.jsx(sI,{})}))):Ta||console.error('Root element not found. Make sure the HTML contains <div id="root"></div>')})();
|
|
29
|
+
`)}function _M(e,t){const r=Jb(e),n=Jb(t),a=Array.from({length:r.length+1},()=>new Array(n.length+1).fill(0));for(let f=r.length-1;f>=0;f-=1)for(let p=n.length-1;p>=0;p-=1)a[f][p]=r[f]===n[p]?a[f+1][p+1]+1:Math.max(a[f+1][p],a[f][p+1]);const s=[];let c=0,u=0;for(;c<r.length&&u<n.length;)r[c]===n[u]?(s.push({kind:"context",text:r[c]}),c+=1,u+=1):a[c+1][u]>=a[c][u+1]?(s.push({kind:"removed",text:r[c]}),c+=1):(s.push({kind:"added",text:n[u]}),u+=1);for(;c<r.length;)s.push({kind:"removed",text:r[c]}),c+=1;for(;u<n.length;)s.push({kind:"added",text:n[u]}),u+=1;return s}function CM(e){return e.some(t=>t.kind!=="context")}function af({busy:e,busyLabel:t,children:r,icon:n,disabled:a,...s}){return m.jsx(Me,{...s,icon:e?m.jsx(hr,{size:"tiny"}):n,disabled:a||e,children:e&&t?t:r})}const NM=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},diff:{maxHeight:"260px",overflow:"auto",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,padding:T.spacingVerticalXS,fontFamily:T.fontFamilyMonospace,fontSize:T.fontSizeBase200,whiteSpace:"pre"},added:{backgroundColor:T.colorPaletteGreenBackground1,color:T.colorPaletteGreenForeground1},removed:{backgroundColor:T.colorPaletteRedBackground1,color:T.colorPaletteRedForeground1},context:{color:T.colorNeutralForeground3},hint:{color:T.colorNeutralForeground3}});function sf(e){return e instanceof Error?e.message:String(e)}const TM="/theme/theme.xml";function PM(e){const t=hM(e);return t||(/\.xml$/i.test(e.trim())?void 0:"The name must end with the .xml extension.")}function RM({open:e,onDismiss:t,onSaved:r,mountNode:n}){const a=NM(),{model:s}=gr(),{openTheme:c,selectedSolution:u}=Na(),[f,p]=y.useState(TM),[g,v]=y.useState(!1),[x,w]=y.useState(""),[S,k]=y.useState(!0),[B,z]=y.useState(!1),[P,j]=y.useState(),[N,M]=y.useState(),C=y.useMemo(()=>{try{return nf(s)}catch(X){return`<!-- ${sf(X)} -->`}},[s]),I=y.useMemo(()=>_M(c?.originalXml??"",C),[c,C]),A=!!c,ae=u?gM(u.publisherPrefix,f):f,de=A?void 0:PM(ae),ee=g&&x.trim()?x.trim():ae,te=c?.resource.isManaged===!0,W=A&&!CM(I),Y=async()=>{if(!u){M("Pick a target solution first.");return}z(!0),M(void 0),j(void 0);try{let X;try{X=nf(s)}catch(q){M(sf(q));return}const O=vM(X);let Z;c?(j(`Updating "${c.resource.name}" in Dataverse…`),await so.updateWebResourceContent(c.resource,O,u.uniqueName),Z=c.resource):(j(`Creating "${ae}" in Dataverse…`),Z=await so.createWebResource({name:ae,displayName:ee,webResourceType:xt.xml,contentBase64:O,solutionUniqueName:u.uniqueName})),S&&(j("Publishing the web resource…"),await so.publishWebResource(Z.id)),r(Z,X)}catch(X){M(sf(X))}finally{z(!1),j(void 0)}};return m.jsx(bn,{open:e,onOpenChange:(X,O)=>O.open||B?void 0:t(),children:m.jsx(kn,{mountNode:n,children:m.jsxs(xn,{children:[m.jsx(wn,{children:A?`Save "${c?.resource.name}"`:"Save as a new web resource"}),m.jsxs(Sn,{className:a.body,children:[!u&&m.jsx(at,{intent:"error",children:m.jsxs(st,{children:[m.jsx(di,{children:"No solution selected"}),"The theme must be saved into a solution you choose explicitly — there is no default-solution fallback."]})}),te&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:"This web resource is managed and can't be updated. Save it as a new web resource instead."})}),!A&&m.jsxs(m.Fragment,{children:[m.jsx(Ve,{label:"Name",required:!0,validationState:de?"error":"none",validationMessage:de,children:m.jsx(_r,{value:f,onChange:(X,O)=>p(O.value)})}),m.jsxs(Ie,{size:200,className:a.hint,children:["Full unique name:"," ",m.jsx("strong",{children:ae}),u?"":" (the publisher prefix is added once a solution is selected)"]}),m.jsx(Ro,{checked:g,onChange:(X,O)=>{v(O.checked),O.checked&&!x.trim()&&w(ae)},label:"Override display name"}),g?m.jsx(Ve,{label:"Display name",children:m.jsx(_r,{value:x,onChange:(X,O)=>w(O.value)})}):m.jsxs(Ie,{size:200,className:a.hint,children:["Display name:"," ",m.jsx("strong",{children:ae})]})]}),m.jsxs("div",{children:[m.jsx(Ie,{weight:"semibold",size:200,children:A?"Changes to be written":"XML to be created"}),m.jsx("div",{className:a.diff,children:I.map((X,O)=>m.jsxs("div",{className:X.kind==="added"?a.added:X.kind==="removed"?a.removed:a.context,children:[X.kind==="added"?"+ ":X.kind==="removed"?"- ":" ",X.text]},O))})]}),W&&m.jsx(at,{intent:"info",children:m.jsx(st,{children:"The theme is identical to the version stored in Dataverse."})}),m.jsx(fl,{checked:S,onChange:(X,O)=>k(O.checked===!0),label:"Publish the web resource after saving"}),m.jsx(at,{intent:"warning",children:m.jsx(st,{children:"Publishing affects the whole environment: every user of the apps that consume this theme sees the change. Updates are only picked up once published."})}),B&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:P??"Saving to Dataverse…"}),N&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:N})})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",disabled:B,onClick:t,children:"Cancel"}),m.jsx(af,{appearance:"primary",busy:B,busyLabel:"Saving…",disabled:te||!u||!!de,onClick:Y,children:"Save"})]})]})})})}async function MM(){try{return(await window.dataverseAPI.queryData("appmodules?$select=appmoduleid,name,uniquename&$orderby=name&$top=250")).value.map(t=>({id:Ze(t.appmoduleid),name:Ze(t.name)||Ze(t.uniquename),uniqueName:Ze(t.uniquename)}))}catch(e){throw new ao(`Loading the app list failed: ${vi(e)}`,e)}}const EM={listApps:MM};function IM(e){return e instanceof Error?e.message:String(e)}async function FM(e,t){try{const r=new URL(`/tools/solution/edit.aspx?id=${encodeURIComponent(t)}`,e);if(r.protocol!=="https:"&&r.protocol!=="http:")throw new Error("The connection URL is not an http(s) address.");await window.toolboxAPI.utils.openInConnectionBrowser(r.toString())}catch(r){throw new ao(`Opening the solution in the maker portal failed: ${IM(r)}`,r)}}const AM=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},hint:{color:T.colorNeutralForeground3},row:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS}});function lf(e){return e instanceof Error?e.message:String(e)}function DM({open:e,onDismiss:t,webResourceName:r,kind:n,mountNode:a}){const s=AM(),{connection:c,scope:u,scopeLoading:f,selectedSolution:p}=Na(),[g,v]=y.useState("environment"),[x,w]=y.useState([]),[S,k]=y.useState(!1),[B,z]=y.useState(),[P,j]=y.useState(!1),[N,M]=y.useState(),[C,I]=y.useState(!1),[A,ae]=y.useState(),[de,ee]=y.useState(!1),te=u?.definitions[n],W=n==="customTheme"?"appHeaderColorsOnly":"customTheme",Y=u?.definitions[W];y.useEffect(()=>{if(!e||!c)return;M(void 0),ae(void 0),k(!0);let G=!1;return(async()=>{try{const K=await EM.listApps();G||w(K)}catch(K){G||M(lf(K))}finally{G||k(!1)}if(Y){const K=await Il.readScopeAssignment(Y,W),F=!!K.environmentValue||Object.keys(K.appValues).length>0;G||ee(F)}})(),()=>{G=!0}},[e,c,Y,W]);const X=async()=>{if(!(!te||!r)){j(!0),M(void 0),I(!1),ae(void 0);try{g==="environment"?(await Il.setEnvironmentScope(te,r),ae(`"${Io[n]}" is now set to ${r} for the whole environment.`)):B?(await Il.setAppScope(te,B,r),ae(`"${Io[n]}" is now set to ${r} for the selected app.`)):M("Select the app the theme should apply to.")}catch(G){M(lf(G)),I(!0)}finally{j(!1)}}},O=async()=>{if(!(!c||!p))try{await FM(c.url,p.id)}catch(G){M(lf(G))}},Z=async()=>{r&&await window.toolboxAPI.utils.copyToClipboard(r).catch(()=>{})},q=!!te;return m.jsx(bn,{open:e,onOpenChange:(G,K)=>K.open||P?void 0:t(),children:m.jsx(kn,{mountNode:a,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Apply the theme"}),m.jsxs(Sn,{className:s.body,children:[!r&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:"Save the theme to a web resource first — the setting stores its unique name."})}),r&&m.jsxs("div",{className:s.row,children:[m.jsxs(Ie,{size:200,children:["Setting"," ",m.jsx("strong",{children:Io[n]})," ","= ",m.jsx("strong",{children:r})]}),m.jsx(Me,{size:"small",appearance:"subtle",icon:m.jsx(Y4,{}),onClick:Z,children:"Copy name"})]}),de&&m.jsx(at,{intent:"warning",children:m.jsxs(st,{children:[m.jsx(di,{children:"Both theme settings are configured"}),'"Override app header color" is ignored by the platform whenever "Custom theme definition" is set.']})}),f&&m.jsx(hr,{size:"tiny",label:"Checking what this environment supports…"}),!f&&!q&&m.jsx(at,{intent:"warning",children:m.jsxs(st,{children:[m.jsx(di,{children:"Assign the setting in the maker portal"}),u?.unavailableReason??"The theme settings are not available through the API in this environment."," ","Open the solution, use",m.jsxs("strong",{children:[" ","Add existing → More → Setting"]}),", pick"," ",m.jsx("strong",{children:Io[n]}),", paste the unique name above as the setting value, and publish all customizations."]})}),q&&m.jsxs(m.Fragment,{children:[m.jsx(Ve,{label:"Scope",children:m.jsxs(ml,{value:g,onChange:(G,K)=>v(K.value),children:[m.jsx(vn,{value:"environment",label:"The whole environment"}),m.jsx(vn,{value:"app",label:"A single model-driven app"})]})}),g==="app"&&m.jsx(Ve,{label:"App",required:!0,children:m.jsx(Ba,{mountNode:a,disabled:S,placeholder:S?"Loading apps…":"Select an app",value:x.find(G=>G.id===B)?.name??"",selectedOptions:B?[B]:[],onOptionSelect:(G,K)=>z(K.optionValue),children:x.map(G=>m.jsx(ka,{value:G.id,text:G.name,children:G.name},G.id))})})]}),A&&m.jsx(at,{intent:"success",children:m.jsx(st,{children:A})}),N&&m.jsx(at,{intent:"error",children:m.jsxs(st,{children:[N,C&&c&&p&&m.jsxs(m.Fragment,{children:[" ","You can also"," ",m.jsx(Me,{size:"small",appearance:"transparent",onClick:O,children:"open the solution in the maker portal"})," ","and set it there."]})]})}),P&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Applying the theme in Dataverse…"}),m.jsx(Ie,{size:100,className:s.hint,children:"The theme settings are not covered by Microsoft's documented entity reference; the tool resolves them at runtime and never hardcodes ids."})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",disabled:P,onClick:t,children:"Close"}),m.jsx(af,{appearance:"primary",busy:P,busyLabel:"Applying…",disabled:!q||!r||g==="app"&&!B,onClick:X,children:"Apply"})]})]})})})}const qM=ut({root:{display:"flex",flexDirection:"column",borderBottom:`1px solid ${T.colorNeutralStroke1}`},bar:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:T.spacingHorizontalM,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,minHeight:"48px"},group:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXS},label:{color:T.colorNeutralForeground3},solution:{minWidth:"220px"},fileName:{maxWidth:"260px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},spacer:{flexGrow:1}});async function cf(e,t,r){try{await window.toolboxAPI.utils.showNotification({title:e,body:t,type:r})}catch(n){console.error("Unable to show a notification:",n)}}function OM(e){return e instanceof Error?e.message:String(e)}function HM(){const e=qM(),t=Fo(),{model:r,dispatch:n,dirty:a}=gr(),{connection:s,connectionLoading:c,refreshConnection:u,solutions:f,solutionsLoading:p,solutionsError:g,reloadSolutions:v,selectedSolution:x,selectSolution:w,openTheme:S,setOpenTheme:k}=Na(),[B,z]=y.useState(!1),[P,j]=y.useState(!1),[N,M]=y.useState(!1),[C,I]=y.useState(!1),[A,ae]=y.useState(),de=!!s,ee=X=>{if(a){ae({run:X});return}X()},te=async X=>{z(!1),I(!0);try{const O=await so.readWebResource(X.id),Z=mM(O);n({type:"load",model:Yb(Z)});const{contentBase64:q,...G}=O;k({resource:G,originalXml:Z}),G.isManaged&&await cf("Managed web resource",`"${G.name}" is managed: it can be inspected but not overwritten.`,"warning")}catch(O){await cf("Load failed",OM(O),"error")}finally{I(!1)}},W=()=>ee(()=>{n({type:"load",model:Ml()}),k(void 0)}),Y=async(X,O)=>{k({resource:X,originalXml:O}),n({type:"markSaved"}),j(!1),await cf("Theme saved",`"${X.name}" was saved to Dataverse.`,"success")};return m.jsxs("div",{className:e.root,children:[!c&&!de&&m.jsx(at,{intent:"error",children:m.jsxs(st,{children:["This tool needs an active Dataverse connection. Connect to an environment in Power Platform ToolBox, then retry."," ",m.jsx(Me,{size:"small",appearance:"transparent",icon:m.jsx(lm,{}),onClick:()=>{u()},children:"Retry"})]})}),g&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:g})}),m.jsxs("div",{className:e.bar,children:[m.jsxs("div",{className:e.group,children:[m.jsx(Ie,{size:200,className:e.label,children:"Environment"}),c?m.jsx(hr,{size:"tiny"}):m.jsx(ad,{appearance:"tint",color:de?"success":"danger",children:s?.name??"Not connected"})]}),m.jsxs("div",{className:e.group,children:[m.jsx(Ie,{size:200,className:e.label,children:"Solution"}),m.jsx(Ba,{className:e.solution,mountNode:t,disabled:!de||p,placeholder:p?"Loading solutions…":"Select a solution",value:x?.friendlyName??"",selectedOptions:x?[x.id]:[],onOptionSelect:(X,O)=>w(f.find(Z=>Z.id===O.optionValue)),children:f.map(X=>m.jsx(ka,{value:X.id,text:X.friendlyName,children:`${X.friendlyName} (${X.publisherPrefix||"no prefix"})`},X.id))}),m.jsx(No,{content:"Reload solutions",relationship:"label",mountNode:t,children:m.jsx(Me,{appearance:"subtle",icon:p?m.jsx(hr,{size:"tiny"}):m.jsx(lm,{}),disabled:!de||p,onClick:()=>{v()},"aria-label":"Reload solutions"})})]}),m.jsxs("div",{className:e.group,children:[m.jsx(Ie,{size:200,className:e.label,children:"Theme file"}),C?m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Loading theme…"}):m.jsx(Ie,{size:200,weight:"semibold",className:e.fileName,title:S?.resource.name,children:S?.resource.name??"New theme (not saved)"}),m.jsx(Me,{appearance:"subtle",icon:m.jsx(Sz,{}),disabled:!de||C,onClick:()=>ee(()=>z(!0)),children:"Open"}),m.jsx(Me,{appearance:"subtle",icon:m.jsx($4,{}),disabled:C,onClick:W,children:"New"})]}),m.jsx("div",{className:e.spacer}),m.jsxs("div",{className:e.group,children:[m.jsx(Me,{appearance:"primary",icon:m.jsx(om,{}),disabled:!de||C,onClick:()=>j(!0),children:"Save to Dataverse"}),m.jsx(Me,{appearance:"secondary",icon:m.jsx(X4,{}),disabled:!de||C,onClick:()=>M(!0),children:"Apply theme"})]})]}),m.jsx(Zb,{open:B,title:"Open a theme web resource",types:[xt.xml],onDismiss:()=>z(!1),onPick:X=>{te(X)},mountNode:t}),m.jsx(RM,{open:P,onDismiss:()=>j(!1),onSaved:(X,O)=>{Y(X,O)},mountNode:t}),m.jsx(DM,{open:N,onDismiss:()=>M(!1),webResourceName:S?.resource.name,kind:r.kind,mountNode:t}),m.jsx(bn,{open:!!A,onOpenChange:(X,O)=>O.open?void 0:ae(void 0),children:m.jsx(kn,{mountNode:t,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Discard unsaved changes?"}),m.jsx(Sn,{children:"The theme has changes that were never saved to Dataverse or exported to a file. Continuing discards them."}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",onClick:()=>ae(void 0),children:"Keep editing"}),m.jsx(Me,{appearance:"primary",onClick:()=>{A?.run(),ae(void 0)},children:"Discard and continue"})]})]})})})]})}const ey=[{name:"Theme XML",extensions:["xml"]},{name:"All files",extensions:["*"]}];function LM(e){return e.kind==="appHeaderColorsOnly"?"app-header-colors.xml":"custom-theme.xml"}async function VM(){const e=await window.toolboxAPI.fileSystem.selectPath({type:"file",filters:ey,title:"Select a theme XML file"});if(!e)return;const t=await window.toolboxAPI.fileSystem.readText(e);try{return Yb(t)}catch(r){throw r instanceof lo?r:new lo(`The file "${e}" couldn't be read as a theme: ${r instanceof Error?r.message:String(r)}`)}}async function WM(e){const t=nf(e);return await window.toolboxAPI.fileSystem.saveFile(LM(e),t,ey)??void 0}const $M=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS},row:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXS},swatch:{width:"32px",minWidth:"32px",height:"32px",padding:0,border:`1px solid ${T.colorNeutralStroke1}`,borderRadius:T.borderRadiusMedium,cursor:"pointer"},input:{flex:1,minWidth:0},picker:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},hint:{color:T.colorNeutralForeground3},fail:{color:T.colorPaletteRedForeground1},pass:{color:T.colorPaletteGreenForeground1}});function zn({label:e,value:t,onChange:r,placeholder:n,onReset:a,contrastAgainst:s,hint:c,disabled:u}){const f=$M(),p=Fo(),[g,v]=y.useState(t??""),[x,w]=y.useState(!1);y.useEffect(()=>{v(t??"")},[t]);const S=g.trim()!==""&&!yb(g),k=t??n,B=y.useMemo(()=>{try{return xb(k??"#FFFFFF")}catch{return xb("#FFFFFF")}},[k]),z=y.useMemo(()=>{if(!(!s||!k))try{return Sb(k,s)}catch{return}},[s,k]),P=j=>{const N=j.trim();if(N===""){r(void 0);return}yb(N)&&r(Xd(N))};return m.jsxs("div",{className:f.root,children:[m.jsx(Xt,{size:"small",children:e}),m.jsxs("div",{className:f.row,children:[m.jsxs(ev,{open:x,onOpenChange:(j,N)=>w(N.open),trapFocus:!0,mountNode:p,children:[m.jsx(jd,{disableButtonEnhancement:!0,children:m.jsx("button",{type:"button","aria-label":`Pick a colour for ${e}`,className:f.swatch,disabled:u,style:{backgroundColor:k??"transparent"}})}),m.jsx(Y1,{children:m.jsxs("div",{className:f.picker,children:[m.jsxs(gb,{color:B,onColorChange:(j,N)=>r(CR(N.color)),children:[m.jsx(vb,{inputX:{"aria-label":"Saturation"},inputY:{"aria-label":"Brightness"}}),m.jsx(hb,{"aria-label":"Hue"})]}),m.jsx(Me,{appearance:"secondary",onClick:()=>w(!1),children:"Close"})]})})]}),m.jsx(_r,{className:f.input,size:"small",value:g,disabled:u,placeholder:n??"#RRGGBB","aria-label":`${e} HTML colour value`,onChange:(j,N)=>{v(N.value),P(N.value)},onBlur:()=>{S&&v(t??"")}}),a&&m.jsx(No,{content:`Reset ${e}`,relationship:"label",mountNode:p,children:m.jsx(Me,{appearance:"subtle",size:"small",icon:m.jsx(sm,{}),disabled:u||t===void 0,onClick:a})})]}),S&&m.jsx(Ie,{size:100,className:f.fail,children:"Enter a valid HTML colour, e.g. #0F6CBD."}),z!==void 0&&m.jsxs(Ie,{size:100,className:z>=Ca?f.pass:f.fail,children:["Contrast ",z.toFixed(2),":1 ",z>=Ca?"meets":"is below"," the recommended ",Ca,":1 minimum"]}),c&&m.jsx(Ie,{size:100,className:f.hint,children:c})]})}const UM={maxColors:6,ignoreGreys:!0,nearWhiteLightness:95,nearBlackLightness:8,minSaturation:12,minAlpha:128,sampleSize:200},GM=.15;function Dl(e,t,r){const n=g=>{const v=g/255;return v<=.04045?v/12.92:Math.pow((v+.055)/1.055,2.4)},a=n(e),s=n(t),c=n(r),u=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*c),f=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*c),p=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*c);return{l:.2104542553*u+.793617785*f-.0040720468*p,a:1.9779984951*u-2.428592205*f+.4505937099*p,b:.0259040371*u+.7827717662*f-.808675766*p}}function ty(e,t){return Math.sqrt((e.l-t.l)**2+(e.a-t.a)**2+(e.b-t.b)**2)}const XM=.09,uf=3;function ql(e,t,r){return Math.min(r,Math.max(t,Math.round(e)))}function KM(e,t){if(!t)return{x:0,y:0,width:e.width,height:e.height};const r=ql(t.x,0,Math.max(0,e.width-1)),n=ql(t.y,0,Math.max(0,e.height-1)),a=ql(t.width,1,e.width-r),s=ql(t.height,1,e.height-n);return{x:r,y:n,width:a,height:s}}function ry(e,t=GM){return{x:0,y:0,width:e.width,height:Math.max(1,Math.round(e.height*t))}}function YM(e,t,r){if(t<0||r<0||t>=e.width||r>=e.height)return;const n=(Math.floor(r)*e.width+Math.floor(t))*4,a=e.data[n+3];if(!(a===void 0||a<8))return gi(e.data[n],e.data[n+1],e.data[n+2])}function oy(e,t={}){const r={...UM,...QM(t)},n=KM(e,t.crop);if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return{candidates:[],sampledPixels:0,keptPixels:0};const a=Math.max(n.width,n.height),s=Math.max(1,Math.ceil(a/Math.max(1,r.sampleSize))),c=new Map;let u=0,f=0;for(let x=n.y;x<n.y+n.height;x+=s)for(let w=n.x;w<n.x+n.width;w+=s){const S=(x*e.width+w)*4;if(u+=1,e.data[S+3]<r.minAlpha)continue;const B=e.data[S],z=e.data[S+1],P=e.data[S+2],{s:j,l:N}=Nl(B,z,P);if(N>=r.nearWhiteLightness||N<=r.nearBlackLightness||r.ignoreGreys&&j<r.minSaturation)continue;f+=1;const M=8-uf,C=B>>M<<uf*2|z>>M<<uf|P>>M,I=c.get(C);I?(I.count+=1,I.r+=B,I.g+=z,I.b+=P):c.set(C,{count:1,r:B,g:z,b:P})}if(f===0)return{candidates:[],sampledPixels:u,keptPixels:f};const p=[...c.entries()].map(([x,w])=>({key:x,count:w.count,r:w.r/w.count,g:w.g/w.count,b:w.b/w.count})).sort((x,w)=>w.count-x.count||x.key-w.key),g=[];for(const x of p){const w=Dl(x.r,x.g,x.b),S=g.find(k=>ty(k.lab,w)<=XM);if(S){const k=S.count+x.count;S.r=(S.r*S.count+x.r*x.count)/k,S.g=(S.g*S.count+x.g*x.count)/k,S.b=(S.b*S.count+x.b*x.count)/k,S.count=k,S.lab=Dl(S.r,S.g,S.b)}else g.push({count:x.count,r:x.r,g:x.g,b:x.b,lab:w})}return{candidates:g.map(x=>{const{s:w,l:S}=Nl(x.r,x.g,x.b);return{hex:gi(x.r,x.g,x.b),coverage:x.count/f,saturation:w,lightness:S}}).sort((x,w)=>ny(w)-ny(x)||(x.hex<w.hex?-1:1)).slice(0,Math.max(1,r.maxColors)),sampledPixels:u,keptPixels:f}}function ny(e){return e.coverage*(.5+e.saturation/100)}function QM(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}const iy=["#FFFFFF","#000000"],ZM=15;function df(e,t){if(!(!e||!t))try{const r=Sb(e,t);return{foreground:Xd(e),background:Xd(t),ratio:r,passes:r>=Ca}}catch{return}}function JM(e){if(e.length===0)return;const t=e.filter(a=>a.saturation>=ZM);return[...t.length>0?t:e].sort((a,s)=>s.saturation*(.5+s.coverage)-a.saturation*(.5+a.coverage)||s.coverage-a.coverage||(a.hex<s.hex?-1:1))[0]?.hex}function ay(e,t=[]){const r=[...iy,...t.map(s=>s.hex)];let n=iy[0],a=0;for(const s of r){const c=df(s,e);c&&c.ratio>a&&(n=c.foreground,a=c.ratio)}return n}function eE(e,t){const r={},n=new Set;for(const a of e){const s=Dl(...sy(a.hex));let c,u=Number.POSITIVE_INFINITY;for(const f of pi){if(n.has(f))continue;const p=ty(s,Dl(...sy(t[f])));p<u&&(u=p,c=f)}c&&(n.add(c),r[c]=a.hex)}return r}function sy(e){const{r:t,g:r,b:n}=hi(e);return[t,r,n]}function tE(e,t,r,n={}){const a=JM(e),s=t[0]?.hex??a,c=s?ay(s,e):void 0;let u={};if(n.overrideSlots&&a){const f=Tl({basePaletteColor:a,lockPrimary:r.lockPrimary,vibrancy:r.vibrancy,hueTorsion:r.hueTorsion});u=eE(e,f)}return{basePaletteColor:a,headerBackground:s,headerForeground:c,paletteOverrides:u,headerContrast:df(c,s)}}const Ol=20*1024*1024,ff=8e3,rE=1200;class Pr extends Error{constructor(t){super(t),this.name="ImageImportError"}}const oE=[{name:"Images",extensions:["png","jpg","jpeg","gif","webp","bmp"]}],Hl=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];function nE(e){return e.split(/[\\/]/).pop()??e}async function ly(e,t){const r=await iE(e),n=r.naturalWidth,a=r.naturalHeight;if(!n||!a)throw new Pr("That image couldn't be decoded. Use a PNG, JPG, GIF, WEBP or BMP screenshot.");if(n>ff||a>ff)throw new Pr(`That image is ${n} × ${a} px. Images larger than ${ff} px on a side are not supported.`);const s=Math.min(1,rE/Math.max(n,a)),c=Math.max(1,Math.round(n*s)),u=Math.max(1,Math.round(a*s)),f=document.createElement("canvas");f.width=c,f.height=u;const p=f.getContext("2d",{willReadFrequently:!0});if(!p)throw new Pr("This environment cannot read image pixels, so colours cannot be extracted.");p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(r,0,0,c,u);let g;try{g=p.getImageData(0,0,c,u)}catch{throw new Pr("That image's pixels couldn't be read. Import it as a local file instead.")}return{dataUri:e,imageData:g,width:c,height:u,naturalWidth:n,naturalHeight:a,fileName:t}}function iE(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=()=>r(new Pr("That file couldn't be read as an image.")),n.src=e})}async function aE(){const e=await window.toolboxAPI.fileSystem.selectPath({type:"file",title:"Select a screenshot",filters:oE});if(!e)return;const t=nE(e),r=Db(t),n=t.toLowerCase().split(".").pop(),a=r!==void 0&&r!==xt.svg&&r!==xt.ico?Ab(r):n==="webp"?"image/webp":n==="bmp"?"image/bmp":void 0;if(!a)throw new Pr(`"${t}" is not a supported screenshot format. Use PNG, JPG, GIF, WEBP or BMP.`);const s=await window.toolboxAPI.fileSystem.readBinary(e),c=new Uint8Array(s);if(c.byteLength>Ol)throw new Pr(`"${t}" is ${Math.round(c.byteLength/(1024*1024))} MB. The limit is ${Ol/(1024*1024)} MB.`);return ly(`data:${a};base64,${Fl(c)}`,t)}async function pf(e,t){if(!Hl.includes(e.type))throw new Pr("That item is not a supported image. Use a PNG, JPG, GIF, WEBP or BMP screenshot.");if(e.size>Ol)throw new Pr(`That image is ${Math.round(e.size/(1024*1024))} MB. The limit is ${Ol/(1024*1024)} MB.`);const r=new Uint8Array(await e.arrayBuffer());return ly(`data:${e.type};base64,${Fl(r)}`,t)}function cy(e){if(e){for(const t of Array.from(e.files))if(Hl.includes(t.type))return t;for(const t of Array.from(e.items))if(t.kind==="file"&&Hl.includes(t.type)){const r=t.getAsFile();if(r)return r}}}async function sE(){const e=navigator.clipboard;if(typeof e?.read!="function")throw new Pr("This environment cannot read the clipboard. Press Ctrl+V over the drop zone, or browse for the image file.");let t;try{t=await e.read()}catch{throw new Pr("The clipboard could not be read. Press Ctrl+V over the drop zone instead.")}for(const r of t){const n=r.types.find(a=>Hl.includes(a));if(n)return pf(await r.getType(n))}}class yi extends Error{constructor(t){super(t),this.name="SiteCaptureError"}}function lE(e){const t=e.trim();if(!t)throw new yi("Enter the address of the website.");const r=/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)?t:`https://${t}`;let n;try{n=new URL(r)}catch{throw new yi(`"${e}" is not a valid website address.`)}if(n.protocol!=="http:"&&n.protocol!=="https:")throw new yi("Only http:// and https:// addresses can be opened.");if(n.username||n.password)throw new yi("Remove the user name and password from the address before opening it.");if(!n.hostname)throw new yi(`"${e}" is not a valid website address.`);return n.toString()}const uy="The site is opening in your browser. Take a screenshot of the page (Windows: ⊞ Win + Shift + S), then come back and paste it here with Ctrl+V, or drop the image file onto the drop zone.";async function cE(e){const t=lE(e);try{await window.toolboxAPI.utils.openInConnectionBrowser(t)}catch(r){throw new yi(`The site couldn't be opened: ${r instanceof Error?r.message:String(r)}`)}return{mode:"assisted",url:t,instructions:uy}}const uE=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,minHeight:"320px"},row:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS,flexWrap:"wrap"},hint:{color:T.colorNeutralForeground3},dropZone:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:T.spacingVerticalS,padding:T.spacingVerticalXXL,border:`2px dashed ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,backgroundColor:T.colorNeutralBackground2,textAlign:"center"},dropZoneActive:{border:`2px dashed ${T.colorBrandStroke1}`,backgroundColor:T.colorNeutralBackground1Selected},imageArea:{position:"relative",display:"inline-block",maxWidth:"100%",lineHeight:0,userSelect:"none"},image:{maxWidth:"100%",maxHeight:"320px",display:"block",cursor:"crosshair"},cropBox:{position:"absolute",border:`2px solid ${T.colorBrandStroke1}`,backgroundColor:"rgba(15, 108, 189, 0.15)",pointerEvents:"none"},swatches:{display:"flex",flexWrap:"wrap",gap:T.spacingHorizontalS},swatch:{display:"flex",flexDirection:"column",alignItems:"center",gap:T.spacingVerticalXXS,padding:T.spacingVerticalXS,border:`1px solid ${T.colorNeutralStroke1}`,borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",cursor:"pointer",minWidth:"72px"},swatchChip:{width:"48px",height:"32px",borderRadius:T.borderRadiusSmall,border:`1px solid ${T.colorNeutralStroke2}`},swatchLabel:{color:T.colorNeutralForeground1},headerPreview:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,height:"48px",padding:`0 ${T.spacingHorizontalM}`,borderRadius:T.borderRadiusMedium},fail:{color:T.colorPaletteRedForeground1},pass:{color:T.colorPaletteGreenForeground1}}),dE=5,fE={ignoreGreys:!0,overrideSlots:!1};function dy(e){return e instanceof Error?e.message:String(e)}function pE({open:e,onDismiss:t}){const r=uE(),n=Fo(),{model:a,dispatch:s}=gr(),[c,u]=ef("colorExtraction.options",fE),[f,p]=y.useState("source"),[g,v]=y.useState(""),[x,w]=y.useState(),[S,k]=y.useState(),[B,z]=y.useState(),[P,j]=y.useState(!1),[N,M]=y.useState(!1),[C,I]=y.useState(!1),[A,ae]=y.useState(),[de,ee]=y.useState(),[te,W]=y.useState(),[Y,X]=y.useState(),O=y.useRef(null),Z=y.useRef(void 0),q=y.useCallback(()=>{p("source"),v(""),w(void 0),k(void 0),z(void 0),ae(void 0),ee(void 0),W(void 0),X(void 0)},[]);y.useEffect(()=>{e||q()},[e,q]);const G=y.useMemo(()=>({ignoreGreys:c.ignoreGreys,maxColors:dE}),[c.ignoreGreys]),K=y.useMemo(()=>S?oy(S.imageData,{...G,crop:B}).candidates:[],[S,G,B]),F=y.useMemo(()=>S?oy(S.imageData,{...G,maxColors:3,crop:B??ry(S.imageData)}).candidates:[],[S,G,B]),V=y.useMemo(()=>tE(K,F,a,{overrideSlots:c.overrideSlots}),[K,F,a,c.overrideSlots]),ue=y.useCallback(async _e=>{I(!0),ae(void 0);try{const qe=await _e();qe&&(k(qe),z(void 0),ee(void 0),W(void 0),X(void 0),p("image"))}catch(qe){ae(dy(qe))}finally{I(!1)}},[]);y.useEffect(()=>{if(!e||f==="roles")return;const _e=qe=>{const Ft=cy(qe.clipboardData);Ft&&(qe.preventDefault(),ue(()=>pf(Ft,Ft.name)))};return window.addEventListener("paste",_e),()=>window.removeEventListener("paste",_e)},[e,f,ue]);const xe=async()=>{I(!0),ae(void 0);try{const _e=await cE(g);w(`${_e.url} — ${_e.instructions}`)}catch(_e){ae(dy(_e))}finally{I(!1)}},Ee=_e=>{const qe=O.current;if(!qe||!S)return;const Ft=qe.getBoundingClientRect();if(Ft.width===0||Ft.height===0)return;const Do=Math.round((_e.clientX-Ft.left)/Ft.width*S.width),qo=Math.round((_e.clientY-Ft.top)/Ft.height*S.height);return{x:Math.min(Math.max(Do,0),S.width-1),y:Math.min(Math.max(qo,0),S.height-1)}},we=_e=>{const qe=Ee(_e);qe&&(Z.current=qe,j(!0),_e.currentTarget.setPointerCapture(_e.pointerId))},Be=_e=>{if(!P||!Z.current)return;const qe=Ee(_e);qe&&z(fy(Z.current,qe))},Te=_e=>{if(!Z.current)return;const qe=Ee(_e);j(!1);const Ft=Z.current;if(Z.current=void 0,!qe)return;const Do=fy(Ft,qe);if(Do.width<4||Do.height<4){z(void 0);const qo=S?YM(S.imageData,qe.x,qe.y):void 0;qo&&ee(qo);return}z(Do)},Ae=de??V.basePaletteColor,Ke=te??V.headerBackground,Ur=Y??(Ke?ay(Ke,K):void 0),jn=df(Ur,Ke),wi=!!(Ae||Ke),Pa=()=>{s({type:"applyExtractedColors",patch:{basePaletteColor:Ae,appHeaderBackground:Ke,appHeaderForeground:Ke?Ur:void 0,paletteOverrides:c.overrideSlots?V.paletteOverrides:void 0}}),t()};return m.jsx(bn,{open:e,onOpenChange:(_e,qe)=>qe.open?void 0:t(),children:m.jsx(kn,{mountNode:n,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Get colors from a website"}),m.jsxs(Sn,{className:r.body,children:[A&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:A})}),C&&m.jsx(hr,{size:"tiny",label:"Working…"}),f==="source"&&m.jsxs(m.Fragment,{children:[m.jsx(at,{intent:"info",children:m.jsxs(st,{children:[m.jsx(di,{children:"Screenshots stay on this machine"}),"Power Platform ToolBox can't take a screenshot for you, so the site is opened in your browser and you paste the screenshot back here. Nothing is uploaded anywhere."]})}),m.jsx(Ve,{label:"Website address",hint:"Only http:// and https:// addresses can be opened.",children:m.jsxs("div",{className:r.row,children:[m.jsx(_r,{style:{flex:1},value:g,placeholder:"contoso.com",onChange:(_e,qe)=>v(qe.value),onKeyDown:_e=>{_e.key==="Enter"&&g.trim()&&xe()}}),m.jsx(Me,{appearance:"secondary",icon:m.jsx(Q4,{}),disabled:C||!g.trim(),onClick:xe,children:"Open the site"})]})}),x&&m.jsx(at,{intent:"success",children:m.jsx(st,{children:x})}),m.jsxs("div",{className:Q(r.dropZone,N&&r.dropZoneActive),onDragOver:_e=>{_e.preventDefault(),M(!0)},onDragLeave:()=>M(!1),onDrop:_e=>{_e.preventDefault(),M(!1);const qe=cy(_e.dataTransfer);qe?ue(()=>pf(qe,qe.name)):ae("That item is not a supported image. Use a PNG, JPG, GIF, WEBP or BMP screenshot.")},children:[m.jsx(Ie,{weight:"semibold",children:"Drop a screenshot here"}),m.jsx(Ie,{size:200,className:r.hint,children:uy}),m.jsxs("div",{className:r.row,children:[m.jsx(Me,{appearance:"primary",disabled:C,onClick:()=>{ue(aE)},children:"Browse for an image"}),m.jsx(Me,{appearance:"secondary",disabled:C,onClick:()=>{ue(sE)},children:"Paste from clipboard"})]})]})]}),f==="image"&&S&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{size:200,className:r.hint,children:"Drag on the image to analyse only that region, or click a pixel to use its exact colour as the base palette color."}),m.jsxs("div",{className:r.imageArea,children:[m.jsx("img",{ref:O,className:r.image,src:S.dataUri,alt:"Imported screenshot",draggable:!1,onPointerDown:we,onPointerMove:Be,onPointerUp:Te}),B&&m.jsx("div",{className:r.cropBox,style:{left:`${B.x/S.width*100}%`,top:`${B.y/S.height*100}%`,width:`${B.width/S.width*100}%`,height:`${B.height/S.height*100}%`}})]}),m.jsxs("div",{className:r.row,children:[m.jsx(Me,{size:"small",appearance:"secondary",onClick:()=>z(ry(S.imageData)),children:"Header only"}),m.jsx(Me,{size:"small",appearance:"subtle",disabled:!B,onClick:()=>z(void 0),children:"Whole image"}),m.jsx(Ro,{label:"Ignore greys",checked:c.ignoreGreys,onChange:(_e,qe)=>u({...c,ignoreGreys:qe.checked})})]}),de&&m.jsxs(Ie,{size:200,children:[m.jsx(oz,{})," Picked ",de]}),K.length===0&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:'No colour stands out in this area — it is all white, black or grey. Try another region, or turn "Ignore greys" off.'})})]}),f==="roles"&&m.jsxs(m.Fragment,{children:[m.jsx(Xt,{size:"small",children:"Extracted colors"}),m.jsxs("div",{className:r.swatches,children:[K.map(_e=>m.jsx(No,{relationship:"label",mountNode:n,content:`${_e.hex} — ${Math.round(_e.coverage*100)}% of the analysed pixels`,children:m.jsxs("button",{type:"button",className:r.swatch,onClick:()=>ee(_e.hex),children:[m.jsx("span",{className:r.swatchChip,style:{backgroundColor:_e.hex}}),m.jsxs(Ie,{size:100,className:r.swatchLabel,children:[Math.round(_e.coverage*100),"%"]})]})},_e.hex)),K.length===0&&m.jsx(Ie,{size:200,className:r.hint,children:"Nothing was extracted from this image."})]}),m.jsx(zn,{label:"Base palette color",value:Ae,hint:"Seed of the 16-slot palette. Not used by an app-header-colors-only document.",onChange:_e=>ee(_e)}),m.jsx(zn,{label:"App header background",value:Ke,onChange:_e=>W(_e)}),m.jsx(zn,{label:"App header foreground",value:Ur,contrastAgainst:Ke,onChange:_e=>X(_e)}),Ke&&Ur&&m.jsxs(m.Fragment,{children:[m.jsx(Xt,{size:"small",children:"Preview"}),m.jsxs("div",{className:r.headerPreview,style:{backgroundColor:Ke,color:Ur},children:[m.jsx(Ie,{style:{color:"inherit"},weight:"semibold",children:"Sample app"}),m.jsx(Ie,{style:{color:"inherit"},size:200,children:"Accounts"})]}),jn&&m.jsxs(Ie,{size:200,className:jn.passes?r.pass:r.fail,children:["Header contrast ",jn.ratio.toFixed(2),":1"," ",jn.passes?"meets":"is below"," the recommended"," ",Ca,":1 minimum"]})]}),m.jsx(Ro,{label:"Also override the closest palette slots",checked:c.overrideSlots,disabled:a.kind!=="customTheme",onChange:(_e,qe)=>u({...c,overrideSlots:qe.checked})}),m.jsx(Ie,{size:100,className:r.hint,children:"Off by default: the generated ramp is the documented mechanism, and forcing screenshot colours into the 16 slots produces incoherent ramps."})]})]}),m.jsxs(yn,{children:[f!=="source"&&m.jsx(Me,{appearance:"secondary",onClick:()=>p(f==="roles"?"image":"source"),children:"Back"}),m.jsx(Me,{appearance:"secondary",onClick:t,children:"Cancel"}),f==="image"&&m.jsx(Me,{appearance:"primary",disabled:K.length===0&&!de,onClick:()=>p("roles"),children:"Next"}),f==="roles"&&m.jsx(Me,{appearance:"primary",disabled:!wi,onClick:Pa,children:"Apply"})]})]})})})}function fy(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}}const hE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},sectionHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:T.spacingHorizontalS},hint:{color:T.colorNeutralForeground3},slots:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS}});function gE(){const e=hE(),t=Fo(),{model:r,dispatch:n,generatedPalette:a,resolvedPalette:s}=gr(),c=Object.keys(r.paletteOverrides).length>0,[u,f]=y.useState(!1);return m.jsxs("div",{className:e.section,children:[m.jsx(Ve,{label:"Start from a preset",hint:"Presets only seed the palette and the header colours — everything stays editable.",children:m.jsx(Ba,{mountNode:t,placeholder:"Choose a preset",selectedOptions:[],value:"",onOptionSelect:(p,g)=>{const v=_b.find(x=>x.id===g.optionValue);v&&n({type:"replace",model:v.create()})},children:_b.map(p=>m.jsx(ka,{value:p.id,text:p.label,children:p.label},p.id))})}),m.jsx(Me,{appearance:"secondary",icon:m.jsx(G4,{}),onClick:()=>f(!0),children:"Get colors from a website"}),m.jsx(pE,{open:u,onDismiss:()=>f(!1)}),m.jsx(zn,{label:"Base palette color",value:r.basePaletteColor,placeholder:"#0F6CBD",hint:"Seed colour the platform uses to generate the 16-slot palette.",onChange:p=>n({type:"setBasePaletteColor",value:p}),onReset:()=>n({type:"setBasePaletteColor",value:void 0})}),m.jsx(Ro,{label:"Lock primary",checked:r.lockPrimary,onChange:(p,g)=>n({type:"setLockPrimary",value:g.checked})}),m.jsx(Ie,{size:100,className:e.hint,children:r.lockPrimary?"The seed colour is placed in the primary slot; contrast is not guaranteed.":"The palette is optimised for accessibility; the seed colour may not appear in any slot."}),m.jsx(Ve,{label:`Vibrancy (${r.vibrancy})`,hint:"Muteness/brightness of the palette, mostly the lighter colours.",children:m.jsx(yl,{min:-100,max:100,step:1,value:r.vibrancy,onChange:(p,g)=>n({type:"setVibrancy",value:g.value})})}),m.jsx(Ve,{label:`Hue torsion (${r.hueTorsion})`,hint:"Tint/shade/tone of the palette, mostly the lighter colours.",children:m.jsx(yl,{min:-100,max:100,step:1,value:r.hueTorsion,onChange:(p,g)=>n({type:"setHueTorsion",value:g.value})})}),m.jsx(yv,{}),m.jsxs("div",{className:e.sectionHeader,children:[m.jsx(Ie,{weight:"semibold",children:"Palette slot overrides"}),m.jsx(No,{content:"Clear every slot override",relationship:"label",mountNode:t,children:m.jsx(Me,{appearance:"subtle",size:"small",icon:m.jsx(sm,{}),disabled:!c,onClick:()=>n({type:"resetPaletteOverrides"})})})]}),m.jsx(Ie,{size:100,className:e.hint,children:"The generated ramp is an approximation of the platform generator. Override a slot to pin an exact colour."}),m.jsx("div",{className:e.slots,children:pi.map(p=>m.jsx(zn,{label:p,value:r.paletteOverrides[p],placeholder:a[p],contrastAgainst:p==="primary"?"#FFFFFF":void 0,onChange:g=>n({type:"setPaletteOverride",slot:p,value:g}),onReset:()=>n({type:"setPaletteOverride",slot:p,value:void 0})},p))}),m.jsxs(Ie,{size:100,className:e.hint,children:["Resolved primary: ",s.primary]})]})}const mE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},fontRow:{display:"flex",gap:T.spacingHorizontalS},fontDropdown:{minWidth:"auto"},hint:{color:T.colorNeutralForeground3},warning:{color:T.colorPaletteDarkOrangeForeground1}});function vE(e){return e.split(",")[0].trim().replace(/^['"]|['"]$/g,"")}function bE(){const e=mE(),{model:t,dispatch:r}=gr(),n=Fo(),a=t.font?vE(t.font):void 0,s=a!==void 0&&jb.some(c=>c.toLowerCase()===a.toLowerCase());return m.jsxs("div",{className:e.section,children:[m.jsx(Ve,{label:"Font",hint:"Pick a web-safe font from the list, or type any custom font-family name. Rendering may differ depending on the fonts installed and the browser used on each person's machine.",children:m.jsxs("div",{className:e.fontRow,children:[m.jsx(_r,{style:{flexGrow:1},placeholder:"Segoe UI",value:t.font??"",onChange:(c,u)=>r({type:"setFont",value:u.value})}),m.jsx(Ba,{mountNode:n,className:e.fontDropdown,button:{children:m.jsx(dz,{}),"aria-label":"Pick a web-safe font"},selectedOptions:[],value:"",onOptionSelect:(c,u)=>r({type:"setFont",value:u.optionValue}),children:jb.map(c=>m.jsx(ka,{value:c,text:c,children:c},c))})]})}),t.font&&!s&&m.jsxs(Ie,{size:100,className:e.warning,children:['"',a,`" isn't a web-safe family. The app renders it only on machines where the font is installed — the browser falls back otherwise.`]})]})}const yE=ut({body:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},preview:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM},thumb:{maxWidth:"96px",maxHeight:"48px",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,backgroundColor:T.colorNeutralBackground2},hint:{color:T.colorNeutralForeground3}}),xE=/^[a-zA-Z][a-zA-Z0-9]*_[a-zA-Z0-9_./-]+$/;function wE(e){return e instanceof Error?e.message:String(e)}function py(e){return e?`${e.publisherPrefix.trim().replace(/_+$/,"")}_`:""}function kE({open:e,file:t,solution:r,onDismiss:n,onUploaded:a,mountNode:s}){const c=yE(),[u,f]=y.useState(""),[p,g]=y.useState(!1),[v,x]=y.useState();y.useEffect(()=>{e&&t&&(f(`${py(r)}${kM(t.fileName)}`),x(void 0))},[e,t,r]);const w=py(r),S=u.trim(),k=S?w?S.startsWith(w)?xE.test(S)?void 0:"Only letters, digits, underscore, dot, slash and hyphen are allowed.":`The name must start with "${w}", the publisher prefix of the selected solution.`:"Pick a target solution in the config bar first.":"Enter a name for the web resource.",B=async()=>{if(!(!t||!r||k)){g(!0),x(void 0);try{const z=await so.createWebResource({name:S,displayName:t.fileName,webResourceType:t.webResourceType,contentBase64:t.contentBase64,solutionUniqueName:r.uniqueName,description:"App header logo, uploaded by Theme Studio."});await so.publishWebResource(z.id),a(z)}catch(z){x(wE(z))}finally{g(!1)}}};return m.jsx(bn,{open:e,onOpenChange:(z,P)=>P.open||p?void 0:n(),children:m.jsx(kn,{mountNode:s,children:m.jsxs(xn,{children:[m.jsx(wn,{children:"Upload the logo"}),m.jsxs(Sn,{className:c.body,children:[t&&m.jsxs("div",{className:c.preview,children:[m.jsx("img",{className:c.thumb,src:t.dataUri,alt:""}),m.jsx("span",{className:c.hint,children:t.fileName})]}),m.jsx(Ve,{label:"Web resource name",required:!0,validationState:k?"error":"none",validationMessage:k,children:m.jsx(_r,{value:u,onChange:(z,P)=>f(P.value)})}),v&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:v})}),p&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Uploading and publishing the logo…"})]}),m.jsxs(yn,{children:[m.jsx(Me,{appearance:"secondary",disabled:p,onClick:n,children:"Cancel"}),m.jsx(af,{appearance:"primary",busy:p,busyLabel:"Uploading…",disabled:!!k,onClick:()=>{B()},children:"Upload"})]})]})})})}const SE="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzQzMDNfMTIzMCkiPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDFfNDMwM18xMjMwKSI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMl80MzAzXzEyMzApIj4KPHBhdGggZD0iTTEzLjg3NzYgMjEuODI0MkMyOS4xMDMzIDguMTM3OTEgNDkuNzUwMSA4LjE4NjEgNjIuOTU1IDE4LjkxMzRDNzQuOTgxNiAyOC42ODM2IDc3LjQ2OTcgNDQuMzE1OSA3MC44NTEgNTUuNzgwMUM2NC4yMzIxIDY3LjI0NDMgNTIuNTI3NyA3MC4xNDU1IDM5LjUwMTEgNjIuNjI0N0wzMS43Mjg2IDc2LjA4N0wzMS43MjM0IDc2LjA4NjJDMjcuNDE4MSA4My41MzI0IDE3Ljg5MzcgODYuMDgyOCAxMC40NDM3IDgxLjc4MTdDNy40NTM5NCA4MC4wNTU2IDUuMjUzMjIgNzcuNDg3OSAzLjk2NjY1IDc0LjU1MUwzLjk2MDk2IDc0LjU1MTFDLTQuMDc4MzIgNTUuNzgwNCAwLjIwMDc0NSAzNC4xMTg0IDEzLjg3NzYgMjEuODI0MloiIGZpbGw9InVybCgjcGFpbnQwX3JhZGlhbF80MzAzXzEyMzApIi8+CjxwYXRoIGQ9Ik0xMy44Nzc2IDIxLjgyNDJDMjkuMTAzMyA4LjEzNzkxIDQ5Ljc1MDEgOC4xODYxIDYyLjk1NSAxOC45MTM0Qzc0Ljk4MTYgMjguNjgzNiA3Ny40Njk3IDQ0LjMxNTkgNzAuODUxIDU1Ljc4MDFDNjQuMjMyMSA2Ny4yNDQzIDUyLjUyNzcgNzAuMTQ1NSAzOS41MDExIDYyLjYyNDdMMzEuNzI4NiA3Ni4wODdMMzEuNzIzNCA3Ni4wODYyQzI3LjQxODEgODMuNTMyNCAxNy44OTM3IDg2LjA4MjggMTAuNDQzNyA4MS43ODE3QzcuNDUzOTQgODAuMDU1NiA1LjI1MzIyIDc3LjQ4NzkgMy45NjY2NSA3NC41NTFMMy45NjA5NiA3NC41NTExQy00LjA3ODMyIDU1Ljc4MDQgMC4yMDA3NDUgMzQuMTE4NCAxMy44Nzc2IDIxLjgyNDJaIiBmaWxsPSJ1cmwoI3BhaW50MV9yYWRpYWxfNDMwM18xMjMwKSIgZmlsbC1vcGFjaXR5PSIwLjgiLz4KPHBhdGggZD0iTTg1LjQzMjcgMTQuMjIzMUM4OC40NTI4IDE1Ljk2NjggOTAuNjY4NiAxOC41NjkgOTEuOTQ5NCAyMS41NDMzTDkxLjk1MzMgMjEuNTQ0NEM5OS45NDA2IDQwLjI5NDMgOTUuNjUzMyA2MS45MDY4IDgxLjk5ODMgNzQuMTgxNEM2Ni43NzI2IDg3Ljg2NzcgNDYuMTI1NyA4Ny44MTk2IDMyLjkyMDkgNzcuMDkyM0MyMC44OTQ1IDY3LjMyMjEgMTguNDA2MiA1MS42ODk3IDI1LjAyNDkgNDAuMjI1NkMzMS42NDM4IDI4Ljc2MTQgNDMuMzQ4MiAyNS44NjAxIDU2LjM3NDggMzMuMzgxTDY0LjE0MzQgMTkuOTI1NUw2NC4xNDgyIDE5LjkyNDlDNjguNDUxNiAxMi40NzM2IDc3Ljk4MDUgOS45MjA4NCA4NS40MzI3IDE0LjIyMzFaIiBmaWxsPSJ1cmwoI3BhaW50Ml9yYWRpYWxfNDMwM18xMjMwKSIvPgo8cGF0aCBkPSJNODUuNDMyNyAxNC4yMjMxQzg4LjQ1MjggMTUuOTY2OCA5MC42Njg2IDE4LjU2OSA5MS45NDk0IDIxLjU0MzNMOTEuOTUzMyAyMS41NDQ0Qzk5Ljk0MDYgNDAuMjk0MyA5NS42NTMzIDYxLjkwNjggODEuOTk4MyA3NC4xODE0QzY2Ljc3MjYgODcuODY3NyA0Ni4xMjU3IDg3LjgxOTYgMzIuOTIwOSA3Ny4wOTIzQzIwLjg5NDUgNjcuMzIyMSAxOC40MDYyIDUxLjY4OTcgMjUuMDI0OSA0MC4yMjU2QzMxLjY0MzggMjguNzYxNCA0My4zNDgyIDI1Ljg2MDEgNTYuMzc0OCAzMy4zODFMNjQuMTQzNCAxOS45MjU1TDY0LjE0ODIgMTkuOTI0OUM2OC40NTE2IDEyLjQ3MzYgNzcuOTgwNSA5LjkyMDg0IDg1LjQzMjcgMTQuMjIzMVoiIGZpbGw9InVybCgjcGFpbnQzX3JhZGlhbF80MzAzXzEyMzApIiBmaWxsLW9wYWNpdHk9IjAuOSIvPgo8cGF0aCBkPSJNMzkuNTA0MSA2Mi42MjYxQzUyLjUzMDcgNzAuMTQ2OSA2NC4yMzUyIDY3LjI0NTYgNzAuODU0MSA1NS43ODE0Qzc3LjI0ODggNDQuNzA1NSA3NS4xNDI2IDI5LjczODkgNjQuMTQ3IDE5LjkyNzFMNTYuMzc5MSAzMy4zODE0TDM5LjUwNDEgNjIuNjI2MVoiIGZpbGw9InVybCgjcGFpbnQ0X3JhZGlhbF80MzAzXzEyMzApIi8+CjxwYXRoIGQ9Ik01Ni4zNzk0IDMzLjM4MTVDNDMuMzUyOCAyNS44NjA3IDMxLjY0ODIgMjguNzYyIDI1LjAyOTQgNDAuMjI2MkMxOC42MzQ3IDUxLjMwMjEgMjAuNzQwOSA2Ni4yNjg3IDMxLjczNjQgNzYuMDgwNkwzOS41MDQzIDYyLjYyNjJMNTYuMzc5NCAzMy4zODE1WiIgZmlsbD0idXJsKCNwYWludDVfcmFkaWFsXzQzMDNfMTIzMCkiLz4KPHBhdGggZD0iTTMzLjMyMTUgNTYuNDQ1M0MzNy45ODM3IDY0LjUyMDQgNDguMzA5NCA2Ny4yODcyIDU2LjM4NDYgNjIuNjI1QzY0LjQ1OTggNTcuOTYyOCA2Ny4yMjY2IDQ3LjYzNzEgNjIuNTY0MyAzOS41NjE5QzU3LjkwMjEgMzEuNDg2NyA0Ny41NzY0IDI4LjcyIDM5LjUwMTMgMzMuMzgyMkMzMS40MjYxIDM4LjA0NDQgMjguNjU5MyA0OC4zNzAxIDMzLjMyMTUgNTYuNDQ1M1oiIGZpbGw9InVybCgjcGFpbnQ2X3JhZGlhbF80MzAzXzEyMzApIi8+CjwvZz4KPC9nPgo8L2c+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDQ2LjAwMDEgNDkuNDk5Nikgcm90YXRlKC0xNDguNzE3KSBzY2FsZSg0Ni4yMTk1IDQ3LjUzNTkpIj4KPHN0b3Agb2Zmc2V0PSIwLjQ2NTA4OCIgc3RvcC1jb2xvcj0iIzA5NDQyQSIvPgo8c3RvcCBvZmZzZXQ9IjAuNzAwODgiIHN0b3AtY29sb3I9IiMxMzZDNkMiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMjI5MThCIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQxX3JhZGlhbF80MzAzXzEyMzAiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAuMDAwMSAzMi40OTk2KSByb3RhdGUoMTIzLjU3KSBzY2FsZSg2Ni4wMDk1IDQ2LjU0OTgpIj4KPHN0b3Agb2Zmc2V0PSIwLjcxODcwNSIgc3RvcC1jb2xvcj0iIzFBN0Y3QyIgc3RvcC1vcGFjaXR5PSIwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE2QkJEQSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50Ml9yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUwLjQ5OTkgNDQuNTAwMSkgcm90YXRlKDMwLjc1KSBzY2FsZSg0NS45NjE4IDQ0LjUwOTUpIj4KPHN0b3Agb2Zmc2V0PSIwLjM1ODA5NyIgc3RvcC1jb2xvcj0iIzEzNkM2QyIvPgo8c3RvcCBvZmZzZXQ9IjAuNzg5NDc0IiBzdG9wLWNvbG9yPSIjNDJCODcwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzc2RDQ1RSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50M19yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNDIuNSAtMzYuMDAwMiAzMS4xODI0IDM2LjgxMjcgNDkuNDk5OCA1NS41MDAxKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBvZmZzZXQ9IjAuNTgzMTY2IiBzdG9wLWNvbG9yPSIjNzZENDVFIiBzdG9wLW9wYWNpdHk9IjAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQzhGNUI3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ0X3JhZGlhbF80MzAzXzEyMzAiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDcuNSA0OCkgcm90YXRlKC01OC45MDQyKSBzY2FsZSgzMi42ODk4KSI+CjxzdG9wIG9mZnNldD0iMC40ODYyNjYiIHN0b3AtY29sb3I9IiMyMjkxOEIiLz4KPHN0b3Agb2Zmc2V0PSIwLjcyOTU5OSIgc3RvcC1jb2xvcj0iIzQyQjg3MCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM0M0U1Q0EiLz4KPC9yYWRpYWxHcmFkaWVudD4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDVfcmFkaWFsXzQzMDNfMTIzMCIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSg0Ny4zODMzIDQ5LjAwNzcpIHJvdGF0ZSgxMTkuODU5KSBzY2FsZSgzMS4xMzI4IDI5LjQwMzIpIj4KPHN0b3Agb2Zmc2V0PSIwLjQ1OTU1MyIgc3RvcC1jb2xvcj0iIzA4NDk0RSIvPgo8c3RvcCBvZmZzZXQ9IjAuNzQyMjQyIiBzdG9wLWNvbG9yPSIjMUE3RjdDIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzMwOUM2MSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50Nl9yYWRpYWxfNDMwM18xMjMwIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUyLjUgNDApIHJvdGF0ZSgxMjAuNzg0KSBzY2FsZSgyNy4zNTQyKSI+CjxzdG9wIHN0b3AtY29sb3I9IiNDOEY1QjciLz4KPHN0b3Agb2Zmc2V0PSIwLjI0NTgzIiBzdG9wLWNvbG9yPSIjOThGMEIwIi8+CjxzdG9wIG9mZnNldD0iMC42NDM5NjEiIHN0b3AtY29sb3I9IiM1MkQxN0MiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMTE5RkM1Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfNDMwM18xMjMwIj4KPHJlY3Qgd2lkdGg9Ijk2IiBoZWlnaHQ9Ijk2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8Y2xpcFBhdGggaWQ9ImNsaXAxXzQzMDNfMTIzMCI+CjxyZWN0IHdpZHRoPSI5NiIgaGVpZ2h0PSI5NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPGNsaXBQYXRoIGlkPSJjbGlwMl80MzAzXzEyMzAiPgo8cmVjdCB3aWR0aD0iOTUuOTk5OCIgaGVpZ2h0PSI5NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",BE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},hint:{color:T.colorNeutralForeground3},buttons:{display:"flex",gap:T.spacingHorizontalS},dataverseIcon:{width:"16px",height:"16px",display:"block"}}),zE=/^[a-zA-Z][a-zA-Z0-9]*_[a-zA-Z0-9_./-]+$/;function jE(e){return e instanceof Error?e.message:String(e)}function _E(){const e=BE(),t=Fo(),{model:r,dispatch:n}=gr(),{connection:a,selectedSolution:s,logoWarning:c,logoLoading:u,setPendingLogo:f}=Na(),[p,g]=y.useState(!1),[v,x]=y.useState(),[w,S]=y.useState(),k=r.logoWebResource??"",B=k!==""&&!zE.test(k),z=!!a,P=C=>{g(!1),f(void 0),n({type:"setLogoWebResource",value:C.name})},j=async()=>{S(void 0);let C;try{C=await xM()}catch(I){S(jE(I));return}if(C){if(f(C.dataUri,Hb(C.dimensions)),!s){S("Pick a target solution in the config bar before uploading a logo."),f(void 0);return}x(C)}},N=C=>{f(void 0),x(void 0),n({type:"setLogoWebResource",value:C.name})},M=()=>{f(void 0),x(void 0)};return m.jsxs("div",{className:e.section,children:[m.jsx(Ve,{label:"Logo web resource",hint:"Logical name (with publisher prefix) of an image web resource. Recommended size 156 × 48 px.",validationState:B?"warning":"none",validationMessage:B?"This does not look like a logical name, e.g. contoso_company-logo.":void 0,children:m.jsx(_r,{value:k,placeholder:"contoso_company-logo",onChange:(C,I)=>{f(void 0),n({type:"setLogoWebResource",value:I.value})}})}),m.jsxs("div",{className:e.buttons,children:[m.jsx(Me,{size:"small",icon:m.jsx("img",{className:e.dataverseIcon,src:SE,alt:""}),disabled:!z,onClick:()=>g(!0),children:"Select from Dataverse"}),m.jsx(Me,{size:"small",icon:m.jsx(cm,{}),disabled:!z,onClick:()=>{j()},children:"Upload"}),u&&m.jsx(hr,{size:"tiny",labelPosition:"after",label:"Loading logo…"})]}),m.jsx(Ve,{label:"Logo tooltip",hint:`Tooltip shown on the app-header logo. The platform default is "${Qd}".`,children:m.jsx(_r,{value:r.logoTooltip??"",placeholder:Qd,onChange:(C,I)=>n({type:"setLogoTooltip",value:I.value})})}),c&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:c})}),w&&m.jsx(at,{intent:"error",children:m.jsx(st,{children:w})}),!z&&m.jsx(Ie,{size:100,className:e.hint,children:"Browsing and uploading image web resources needs an active Dataverse connection."}),m.jsx(Zb,{open:p,title:"Pick a logo web resource",types:Fb,onDismiss:()=>g(!1),onPick:P,mountNode:t}),m.jsx(kE,{open:!!v,file:v,solution:s,onDismiss:M,onUploaded:N,mountNode:t})]})}const CE=ut({section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS},hint:{color:T.colorNeutralForeground3}}),NE=[{label:"Rest",background:"background",foreground:"foreground",required:!0},{label:"Hover",background:"backgroundHover",foreground:"foregroundHover"},{label:"Pressed",background:"backgroundPressed",foreground:"foregroundPressed"},{label:"Selected",background:"backgroundSelected",foreground:"foregroundSelected"}];function TE(){const e=CE(),{model:t,dispatch:r}=gr(),n=t.appHeaderColors,a=n!==void 0,s=t.kind==="appHeaderColorsOnly",c=a&&!n.background;return m.jsxs("div",{className:e.section,children:[!s&&m.jsx(Ro,{label:"Override app header colors",checked:a,onChange:(u,f)=>r({type:"setAppHeaderColorsEnabled",enabled:f.checked})}),!a&&m.jsx(Ie,{size:100,className:e.hint,children:"Without an override, the platform derives the header colours from the palette."}),c&&m.jsx(at,{intent:"warning",children:m.jsx(st,{children:'"background" is required — no header colour change takes effect until it is set.'})}),a&&NE.map(u=>{const f=n[u.background],p=n[u.foreground],g=f||n.background||void 0;return m.jsxs("div",{className:e.section,children:[m.jsx(Ie,{weight:"semibold",size:200,children:u.label}),m.jsx(zn,{label:u.background,value:f||void 0,placeholder:u.required?void 0:n.background||void 0,hint:u.required?"Required — the header only changes when this is set.":'Calculated from "background" when left empty.',onChange:v=>r({type:"setAppHeaderColor",attribute:u.background,value:v}),onReset:u.required?void 0:()=>r({type:"setAppHeaderColor",attribute:u.background,value:void 0})}),m.jsx(zn,{label:u.foreground,value:p,hint:"Calculated for sufficient contrast when left empty.",contrastAgainst:g,onChange:v=>r({type:"setAppHeaderColor",attribute:u.foreground,value:v}),onReset:()=>r({type:"setAppHeaderColor",attribute:u.foreground,value:void 0})})]},u.label)})]})}const PE=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalS,padding:T.spacingHorizontalL,width:"360px",minWidth:"300px",backgroundColor:T.colorNeutralBackground2,borderLeft:`1px solid ${T.colorNeutralStroke1}`,overflowY:"auto"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:T.spacingHorizontalS},hint:{color:T.colorNeutralForeground3},kind:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS},startNewButtonWrapper:{flexShrink:0,marginTop:T.spacingVerticalM,height:"40px"},startNewButton:{width:"100%",height:"100%",justifyContent:"center"},accordion:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM},accordionItem:{backgroundColor:T.colorNeutralBackground1,border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusXLarge,boxShadow:T.shadow2,overflow:"hidden"},accordionHeader:{fontWeight:T.fontWeightSemibold,fontSize:T.fontSizeBase400,letterSpacing:"0.2px"},emoji:{marginRight:T.spacingHorizontalS},accordionPanel:{paddingBottom:T.spacingVerticalM}});async function Ll(e,t,r){try{await window.toolboxAPI.utils.showNotification({title:e,body:t,type:r})}catch(n){console.error("Unable to show a notification:",n)}}function hy(e){return e instanceof Error?e.message:String(e)}function RE(){const e=PE(),t=Fo(),{model:r,dispatch:n,dirty:a,canUndo:s,canRedo:c}=gr(),[u,f]=y.useState(!1),p=[...Object.keys(r.unknownAttributes),...Object.keys(r.unknownAppHeaderColorsAttributes)],g=async()=>{f(!0);try{const w=await VM();w&&(n({type:"load",model:w}),await Ll("Theme imported","The theme XML file was loaded successfully.","success"))}catch(w){await Ll("Import failed",hy(w),"error")}finally{f(!1)}},v=async()=>{f(!0);try{const w=await WM(r);w&&(n({type:"markSaved"}),await Ll("Theme exported",`Saved to ${w}.`,"success"))}catch(w){await Ll("Export failed",hy(w),"error")}finally{f(!1)}},x=()=>{n({type:"load",model:r.kind==="appHeaderColorsOnly"?zb():Ml()})};return m.jsxs("div",{className:e.root,children:[m.jsxs("div",{className:e.header,children:[m.jsx(Ad,{children:"Theme"}),a&&m.jsx(Ie,{size:100,className:e.hint,children:"Unsaved changes"})]}),p.length>0&&m.jsx(at,{intent:"info",children:m.jsxs(st,{children:[m.jsx(di,{children:"Preserved as-is"}),"This theme also sets ",p.join(", "),", which this tool can't edit. The values are kept unchanged when the theme is saved."]})}),m.jsxs(Jv,{size:"small",children:[m.jsx(No,{content:"Undo",relationship:"label",mountNode:t,children:m.jsx(_a,{icon:m.jsx(uz,{}),disabled:!s,onClick:()=>n({type:"undo"}),"aria-label":"Undo"})}),m.jsx(No,{content:"Redo",relationship:"label",mountNode:t,children:m.jsx(_a,{icon:m.jsx(cz,{}),disabled:!c,onClick:()=>n({type:"redo"}),"aria-label":"Redo"})}),m.jsx(eb,{}),m.jsx(_a,{icon:m.jsx(cm,{}),disabled:u,onClick:g,children:"Import"}),m.jsx(_a,{icon:m.jsx(sz,{}),disabled:u,onClick:v,children:"Export"})]}),m.jsxs("div",{className:e.kind,children:[m.jsx(Ie,{weight:"semibold",size:200,children:"Theme document"}),m.jsxs(ml,{value:r.kind,onChange:(w,S)=>n({type:"setKind",kind:S.value}),children:[m.jsx(vn,{value:"customTheme",label:"Create full custom theme (CustomTheme)"}),m.jsx(vn,{value:"appHeaderColorsOnly",label:"Override only app header color (AppHeaderColors)"})]}),m.jsx(Ie,{size:100,className:e.hint,children:"The header-only override is ignored by the platform when a custom theme definition is also set."})]}),m.jsxs(qg,{multiple:!0,collapsible:!0,defaultOpenItems:["palette","appHeader"],className:e.accordion,children:[r.kind==="customTheme"&&m.jsxs(pa,{value:"palette",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🎨"}),"Palette"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(gE,{})})]}),r.kind==="customTheme"&&m.jsxs(pa,{value:"typography",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🔤"}),"Typography"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(bE,{})})]}),r.kind==="customTheme"&&m.jsxs(pa,{value:"logo",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🖼️"}),"Logo"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(_E,{})})]}),m.jsxs(pa,{value:"appHeader",className:e.accordionItem,children:[m.jsxs(ga,{className:e.accordionHeader,size:"large",children:[m.jsx("span",{"aria-hidden":"true",className:e.emoji,children:"🧭"}),"App header"]}),m.jsx(va,{className:e.accordionPanel,children:m.jsx(TE,{})})]})]}),m.jsx("div",{className:e.startNewButtonWrapper,children:m.jsx(Me,{appearance:"secondary",icon:m.jsx(od,{}),onClick:x,className:e.startNewButton,children:"Start from an empty theme"})})]})}const gy=ut({root:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS,height:"48px",paddingLeft:T.spacingHorizontalS,paddingRight:T.spacingHorizontalM,flexShrink:0},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:T.spacingHorizontalXS,minWidth:"36px",height:"36px",paddingLeft:T.spacingHorizontalXS,paddingRight:T.spacingHorizontalXS,border:"none",borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",fontSize:T.fontSizeBase300,fontFamily:"inherit",cursor:"default"},logo:{display:"inline-flex",alignItems:"center",gap:T.spacingHorizontalNone,paddingLeft:T.spacingHorizontalS,paddingRight:T.spacingHorizontalS,height:"48px"},logoImage:{height:"100%",maxWidth:"156px",objectFit:"fill"},productName:{fontSize:T.fontSizeBase400,fontWeight:T.fontWeightSemibold,whiteSpace:"nowrap"},separator:{width:"1px",height:"20px",opacity:.5},appName:{fontSize:T.fontSizeBase300,whiteSpace:"nowrap"},spacer:{flexGrow:1},avatar:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:T.borderRadiusCircular,border:"1px solid currentColor",fontSize:T.fontSizeBase200,flexShrink:0}});function Ao({colors:e,label:t,children:r,className:n}){const a=gy(),[s,c]=y.useState(!1),[u,f]=y.useState(!1),p=u?e.backgroundPressed:s?e.backgroundHover:"transparent",g=u?e.foregroundPressed:s?e.foregroundHover:e.foreground;return m.jsx("button",{type:"button","aria-label":t,title:t,className:Q(a.button,n),style:{backgroundColor:p,color:g},onMouseEnter:()=>c(!0),onMouseLeave:()=>{c(!1),f(!1)},onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onFocus:()=>c(!0),onBlur:()=>c(!1),children:r})}function ME({colors:e,logoDataUri:t,logoTooltip:r,appName:n}){const a=gy(),s=r?.trim()||Qd;return m.jsxs("header",{className:a.root,style:{backgroundColor:e.background,color:e.foreground},"data-themed":"App header","aria-label":"Sample app header",children:[m.jsx(Ao,{colors:e,label:"App launcher",children:m.jsx(zz,{fontSize:20})}),m.jsx("div",{className:a.logo,title:s,children:t?m.jsx("img",{className:a.logoImage,src:t,alt:s}):m.jsx("span",{className:a.productName,children:s})}),m.jsx("div",{className:a.separator,style:{backgroundColor:e.foreground}}),m.jsx("span",{className:a.appName,children:n}),m.jsx("div",{className:a.spacer}),m.jsx(Ao,{colors:e,label:"Search",children:m.jsx(td,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Copilot",children:m.jsx(iz,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Quick create",children:m.jsx(rd,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Filters",children:m.jsx(fm,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Settings",children:m.jsx(U4,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Help",children:m.jsx(jz,{fontSize:20})}),m.jsx(Ao,{colors:e,label:"Feedback",children:m.jsx(K4,{fontSize:20})}),m.jsx("span",{className:a.avatar,"aria-hidden":"true",children:"AU"})]})}const EE=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS,width:"224px",flexShrink:0,paddingTop:T.spacingVerticalS,paddingBottom:T.spacingVerticalS,paddingLeft:T.spacingHorizontalXS,paddingRight:T.spacingHorizontalXS,backgroundColor:T.colorNeutralBackground3,overflowY:"auto"},item:{position:"relative",display:"flex",alignItems:"center",gap:T.spacingHorizontalM,width:"100%",height:"36px",paddingLeft:T.spacingHorizontalM,paddingRight:T.spacingHorizontalM,border:"none",borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",color:T.colorNeutralForeground1,fontFamily:"inherit",fontSize:T.fontSizeBase300,textAlign:"left",cursor:"default",":hover":{backgroundColor:T.colorNeutralBackground3Hover}},selected:{backgroundColor:T.colorBrandBackground2,color:T.colorBrandForeground2,fontWeight:T.fontWeightSemibold,":hover":{backgroundColor:T.colorBrandBackground2Hover},"::before":{content:'""',position:"absolute",left:0,top:"6px",bottom:"6px",width:"3px",borderRadius:T.borderRadiusCircular,backgroundColor:T.colorBrandStroke1}},label:{flexGrow:1},groupLabel:{paddingLeft:T.spacingHorizontalM,paddingTop:T.spacingVerticalM,paddingBottom:T.spacingVerticalXS,fontSize:T.fontSizeBase300,fontWeight:T.fontWeightSemibold,color:T.colorNeutralForeground2}}),IE=[{key:"home",label:"Home",icon:m.jsx(vz,{fontSize:20})},{key:"recent",label:"Recent",icon:m.jsx(nz,{fontSize:20}),expandable:!0},{key:"pinned",label:"Pinned",icon:m.jsx(az,{fontSize:20}),expandable:!0}],FE=[{key:"accelerator",label:"Sales accelerator",icon:m.jsx(Bz,{fontSize:20})},{key:"activities",label:"Activities",icon:m.jsx(nm,{fontSize:20})},{key:"dashboards",label:"Dashboards",icon:m.jsx(rm,{fontSize:20})},{key:"accounts",label:"Accounts",icon:m.jsx(rm,{fontSize:20})}];function AE(){const e=EE(),[t,r]=y.useState("accounts"),n=a=>m.jsxs("button",{type:"button",className:Q(e.item,t===a.key&&e.selected),"aria-current":t===a.key?"page":void 0,onClick:()=>r(a.key),children:[a.icon,m.jsx("span",{className:e.label,children:a.label}),a.expandable&&m.jsx(pn,{fontSize:16})]},a.key);return m.jsxs("nav",{className:e.root,"aria-label":"Sample app navigation","data-themed":"Navigation selection and hover",children:[m.jsx("button",{type:"button",className:e.item,"aria-label":"Collapse navigation",children:m.jsx(tz,{fontSize:20})}),IE.map(n),m.jsx("div",{className:e.groupLabel,children:"My Work"}),FE.map(n)]})}const DE=ut({root:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXXS,...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4,paddingLeft:T.spacingHorizontalS,paddingRight:T.spacingHorizontalS,paddingTop:T.spacingVerticalXS,paddingBottom:T.spacingVerticalXS,flexShrink:0},spacer:{flexGrow:1},divider:{width:"1px",height:"20px",backgroundColor:T.colorNeutralStroke2,marginLeft:T.spacingHorizontalXS,marginRight:T.spacingHorizontalXS}});function qE({commands:e,primaryLabel:t="Share"}){const r=DE();return m.jsxs("div",{className:r.root,role:"toolbar","aria-label":"Sample command bar",children:[e.map(n=>m.jsx(Me,{appearance:"subtle",icon:n.icon,children:m.jsx("span",{style:{whiteSpace:"nowrap"},children:n.label})},n.key)),m.jsx(Me,{appearance:"subtle",icon:m.jsx(pn,{}),"aria-label":"More commands"}),m.jsx("div",{className:r.divider}),m.jsx(Me,{appearance:"subtle",icon:m.jsx(V4,{}),"aria-label":"More"}),m.jsx("div",{className:r.spacer}),m.jsx(Me,{appearance:"primary",icon:m.jsx(em,{}),"data-themed":"Primary button",children:t})]})}function my(e){return{...e,colorCompoundBrandStroke:e.colorNeutralStroke1,colorCompoundBrandStrokeHover:e.colorNeutralStroke1Hover,colorCompoundBrandStrokePressed:e.colorNeutralStroke1Pressed}}const OE=ut({host:{display:"contents"}});function Pt({isDisabled:e,...t}){const r=OE(),{previewTheme:n}=gr(),a=e?my(n.fluentTheme):n.fluentTheme;return m.jsx(Zn,{theme:a,className:r.host,children:m.jsx(_r,{appearance:"filled-darker",readOnly:e,...t})})}const hf=[{id:"1",name:"A. Datum Corporation (sample)",mainPhone:"555-0158",city:"Redmond",primaryContact:"Rene Valdes (sample)",email:"someone_i@example.com"},{id:"2",name:"Adventure Works (sample)",mainPhone:"555-0152",city:"Santa Cruz",primaryContact:"Nancy Anderson (sample)",email:"someone_c@example.com"},{id:"3",name:"Alpine Ski House (sample)",mainPhone:"555-0157",city:"Missoula",primaryContact:"Paul Cannon (sample)",email:"someone_h@example.com"},{id:"4",name:"Blue Yonder Airlines (sample)",mainPhone:"555-0154",city:"Los Angeles",primaryContact:"Sidney Higa (sample)",email:"someone_e@example.com"},{id:"5",name:"City Power & Light (sample)",mainPhone:"555-0155",city:"Redmond",primaryContact:"Scott Konersmann (sample)",email:"someone_f@example.com"},{id:"6",name:"Coho Winery (sample)",mainPhone:"555-0159",city:"Phoenix",primaryContact:"Jim Glynn (sample)",email:"someone_j@example.com"},{id:"7",name:"Contoso Pharmaceuticals (sample)",mainPhone:"555-0156",city:"Redmond",primaryContact:"Robert Lyon (sample)",email:"someone_g@example.com"},{id:"8",name:"Fabrikam, Inc. (sample)",mainPhone:"555-0153",city:"Lynnwood",primaryContact:"Maria Campbell (sample)",email:"someone_d@example.com"}],HE=["My Active Accounts","All Accounts","Accounts: Influenced Deals That We Won","Active Accounts","Inactive Accounts"],LE=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,padding:T.spacingHorizontalL,minWidth:0,flexGrow:1},surface:{display:"flex",flexDirection:"column",...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4,overflow:"hidden"},gridHeader:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,padding:`${T.spacingVerticalM} ${T.spacingHorizontalL}`},viewSelector:{display:"inline-flex",alignItems:"center",gap:T.spacingHorizontalXS,border:"none",backgroundColor:"transparent",color:T.colorNeutralForeground1,fontFamily:"inherit",lineHeight:T.lineHeightBase500,fontSize:T.fontSizeBase500,fontWeight:T.fontWeightSemibold,cursor:"default",padding:0},spacer:{flexGrow:1},iconButton:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",borderRadius:T.borderRadiusMedium,backgroundColor:"transparent",color:T.colorNeutralForeground2,cursor:"default",":hover":{backgroundColor:T.colorNeutralBackground1Hover}},search:{width:"240px"},table:{width:"100%",borderCollapse:"collapse",fontSize:T.fontSizeBase300},th:{textAlign:"left",fontWeight:T.fontWeightSemibold,color:T.colorNeutralForeground1,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,borderBottom:`1px solid ${T.colorNeutralStroke2}`,whiteSpace:"nowrap"},td:{padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,borderBottom:`1px solid ${T.colorNeutralStroke3}`,color:T.colorNeutralForeground1,whiteSpace:"nowrap"},checkboxCell:{width:"44px",paddingLeft:T.spacingHorizontalM},row:{":hover":{backgroundColor:T.colorNeutralBackground1Hover}},selectedRow:{backgroundColor:T.colorBrandBackground2,":hover":{backgroundColor:T.colorBrandBackground2Hover}},link:{color:T.colorBrandForegroundLink,textDecorationLine:"none",cursor:"default",":hover":{color:T.colorBrandForegroundLinkHover,textDecorationLine:"underline"}},empty:{padding:T.spacingHorizontalL,color:T.colorNeutralForeground3}}),VE=[{key:"chart",label:"Show Chart",icon:m.jsx(um,{})},{key:"focused",label:"Focused view",icon:m.jsx(nm,{})},{key:"new",label:"New",icon:m.jsx(rd,{})},{key:"delete",label:"Delete",icon:m.jsx(od,{})},{key:"refresh",label:"Refresh",icon:m.jsx(am,{})},{key:"visualize",label:"Visualize this view",icon:m.jsx(um,{})}],WE=[{key:"name",label:"Account Name"},{key:"mainPhone",label:"Main Phone"},{key:"city",label:"Address 1: City"},{key:"primaryContact",label:"Primary Contact"},{key:"email",label:"Email (Primary Contact)"}];function $E(){const e=LE(),[t,r]=y.useState([]),[n,a]=y.useState(""),s=y.useMemo(()=>{const f=n.trim().toLowerCase();return f?hf.filter(p=>Object.values(p).some(g=>g.toLowerCase().includes(f))):hf},[n]),c=s.length>0&&s.every(f=>t.includes(f.id)),u=f=>{r(p=>p.includes(f)?p.filter(g=>g!==f):[...p,f])};return m.jsxs("div",{className:e.root,children:[m.jsx(qE,{commands:VE}),m.jsxs("div",{className:e.surface,children:[m.jsxs("div",{className:e.gridHeader,children:[m.jsxs("button",{type:"button",className:e.viewSelector,"aria-label":"View selector",children:[HE[0],m.jsx(pn,{fontSize:20})]}),m.jsx("div",{className:e.spacer}),m.jsx("button",{type:"button",className:e.iconButton,"aria-label":"Edit columns",children:m.jsx(L4,{fontSize:20})}),m.jsx("button",{type:"button",className:e.iconButton,"aria-label":"Edit filters",children:m.jsx(fm,{fontSize:20})}),m.jsx(Pt,{className:e.search,size:"medium",placeholder:"Filter by keyword",contentBefore:m.jsx(td,{}),value:n,onChange:(f,p)=>a(p.value),"aria-label":"Filter by keyword"})]}),m.jsxs("table",{className:e.table,"data-themed":"Row selection, hover and hyperlinks",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{className:Q(e.th,e.checkboxCell),children:m.jsx(fl,{checked:c,"aria-label":"Select all rows",onChange:(f,p)=>r(p.checked?s.map(g=>g.id):[])})}),WE.map(f=>m.jsx("th",{className:e.th,children:f.label},f.key))]})}),m.jsx("tbody",{children:s.map(f=>{const p=t.includes(f.id);return m.jsxs("tr",{className:Q(e.row,p&&e.selectedRow),"aria-selected":p,children:[m.jsx("td",{className:Q(e.td,e.checkboxCell),children:m.jsx(fl,{checked:p,"aria-label":`Select ${f.name}`,onChange:()=>u(f.id)})}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.name})}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.mainPhone})}),m.jsx("td",{className:e.td,children:f.city}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.primaryContact})}),m.jsx("td",{className:e.td,children:m.jsx("span",{className:e.link,children:f.email})})]},f.id)})})]}),s.length===0&&m.jsx("div",{className:e.empty,children:"No records match the keyword."})]})]})}const UE=ut({host:{display:"contents"}});function GE({isDisabled:e,...t}){const r=UE(),{previewTheme:n}=gr(),a=e?my(n.fluentTheme):n.fluentTheme;return m.jsx(Zn,{theme:a,className:r.host,children:m.jsx(Wv,{appearance:"filled-darker",readOnly:e,...t})})}const gf=ut({root:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,padding:T.spacingHorizontalL,minWidth:0,flexGrow:1},surface:{display:"flex",flexDirection:"column",...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4},formHeader:{display:"flex",alignItems:"center",flexWrap:"nowrap",columnGap:T.spacingHorizontalL,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`},titleGroup:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,flexShrink:0,minWidth:0},headerFields:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:T.spacingHorizontalM,flexShrink:0,marginLeft:"auto"},recordIcon:{display:"flex",alignItems:"center",justifyContent:"center",width:"36px",height:"36px",flexShrink:0,...ta.borderRadius(T.borderRadiusCircular),backgroundColor:T.colorNeutralBackground4,color:T.colorNeutralForeground2},titleBlock:{display:"flex",flexDirection:"column",minWidth:0},recordName:{fontSize:T.fontSizeBase600,lineHeight:T.lineHeightBase600,fontWeight:T.fontWeightSemibold,textWrap:"nowrap"},recordSubtitle:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXXS,fontSize:T.fontSizeBase200,color:T.colorNeutralForeground3},headerField:{display:"flex",flexDirection:"column",gap:T.spacingVerticalXXS},headerFieldLabel:{fontSize:T.fontSizeBase200,color:T.colorNeutralForeground1},ownerField:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS},commands:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:T.spacingHorizontalXXS,flexShrink:0},commandsPushed:{marginLeft:"auto"},commandButton:{minWidth:"auto",flexShrink:0,whiteSpace:"nowrap"},divider:{width:"1px",alignSelf:"stretch",marginTop:T.spacingVerticalXS,marginBottom:T.spacingVerticalXS,backgroundColor:T.colorNeutralStroke2},tabs:{display:"flex",alignItems:"flex-end",gap:T.spacingHorizontalXS,paddingLeft:T.spacingHorizontalL,paddingRight:T.spacingHorizontalM},tab:{position:"relative",border:"none",backgroundColor:"transparent",color:T.colorNeutralForeground2,fontFamily:"inherit",fontSize:T.fontSizeBase300,padding:`${T.spacingVerticalS} ${T.spacingHorizontalM}`,cursor:"default",":hover":{color:T.colorNeutralForeground1}},activeTab:{color:T.colorNeutralForeground1,fontWeight:T.fontWeightSemibold,"::after":{content:'""',position:"absolute",left:T.spacingHorizontalM,right:T.spacingHorizontalM,bottom:0,height:"2px",borderRadius:T.borderRadiusCircular,backgroundColor:T.colorCompoundBrandStroke}},columns:{display:"flex",flexWrap:"wrap",alignItems:"flex-start",gap:T.spacingHorizontalM},section:{display:"flex",flexDirection:"column",gap:T.spacingVerticalM,minWidth:"280px",flexGrow:1,flexBasis:"320px",padding:T.spacingHorizontalL,...ta.borderRadius(T.borderRadiusLarge),backgroundColor:T.colorNeutralBackground1,boxShadow:T.shadow4},sectionTitle:{fontSize:T.fontSizeBase200,fontWeight:T.fontWeightSemibold,textTransform:"uppercase",letterSpacing:"0.4px",color:T.colorNeutralForeground2},lookup:{display:"inline-flex",alignItems:"center",gap:T.spacingHorizontalXS,color:T.colorBrandForegroundLink,paddingLeft:T.spacingHorizontalS,cursor:"default",":hover":{color:T.colorBrandForegroundLinkHover,textDecorationLine:"underline"}},ownerLink:{paddingLeft:0,whiteSpace:"nowrap"}}),XE=["Summary","Details","Related"],mf=[{key:"save",label:"Save",icon:m.jsx(om,{})},{key:"saveClose",label:"Save & Close",icon:m.jsx(J4,{})},{key:"new",label:"New",icon:m.jsx(rd,{})}],xi={...hf[0],name:"Contoso Inc."},KE=1120,YE=[560,700,840];function QE(){const e=y.useRef(null),[t,r]=y.useState(0);return y.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(([s])=>r(s.contentRect.width));return a.observe(n),()=>a.disconnect()},[]),[e,t]}function ZE({hidden:e}){const t=gf(),r=Fo();return m.jsxs(zv,{mountNode:r,children:[m.jsx(Rd,{disableButtonEnhancement:!0,children:m.jsx(Me,{className:t.commandButton,appearance:"subtle",icon:m.jsx(W4,{}),"aria-label":"More commands"})}),m.jsx(Mv,{children:m.jsxs(Rv,{children:[e.map(n=>m.jsx(gl,{icon:n.icon,children:n.label},n.key)),m.jsx(gl,{icon:m.jsx(od,{}),children:"Delete"}),m.jsx(gl,{icon:m.jsx(am,{}),children:"Refresh"})]})})]})}function vy({label:e,value:t}){const r=gf();return m.jsx(Ve,{label:e,children:m.jsxs("span",{className:r.lookup,"data-themed":"Lookup",children:[m.jsx(tm,{}),t]})})}function JE(){const e=gf(),[t,r]=y.useState("Summary"),[n,a]=QE(),s=a===0||a>=KE,c=a===0?mf.length:YE.filter(u=>a>=u).length;return m.jsxs("div",{className:e.root,children:[m.jsxs("div",{className:e.surface,ref:n,children:[m.jsxs("div",{className:e.formHeader,children:[m.jsxs("div",{className:e.titleGroup,children:[m.jsx(Me,{appearance:"subtle",icon:m.jsx(lz,{}),"aria-label":"Back"}),m.jsx("span",{className:e.recordIcon,children:m.jsx(yz,{})}),m.jsxs("div",{className:e.titleBlock,children:[m.jsx("span",{className:e.recordName,children:xi.name}),m.jsxs("span",{className:e.recordSubtitle,children:["Account · Account",m.jsx(pn,{})]})]})]}),s&&m.jsxs("div",{className:e.headerFields,children:[m.jsxs("div",{className:e.headerField,children:[m.jsx("span",{children:xi.mainPhone}),m.jsx("span",{className:e.headerFieldLabel,children:"Main Phone"})]}),m.jsx("div",{className:e.divider}),m.jsxs("div",{className:e.ownerField,children:[m.jsx(i1,{name:"Alan Steiner",color:"colorful",size:32}),m.jsxs("div",{className:e.headerField,children:[m.jsx("span",{className:Q(e.lookup,e.ownerLink),"data-themed":"Lookup",children:"Alan Steiner"}),m.jsx("span",{className:e.headerFieldLabel,children:"Owner"})]})]}),m.jsx(Me,{appearance:"subtle",icon:m.jsx(pn,{}),"aria-label":"More header fields"}),m.jsx("div",{className:e.divider})]}),m.jsxs("div",{className:Q(e.commands,!s&&e.commandsPushed),role:"toolbar","aria-label":"Commands",children:[mf.slice(0,c).map(u=>m.jsx(Me,{className:e.commandButton,appearance:"subtle",icon:u.icon,children:u.label},u.key)),m.jsx(ZE,{hidden:mf.slice(c)}),m.jsx("div",{className:e.divider}),m.jsx(Me,{className:e.commandButton,appearance:"subtle",icon:m.jsx(em,{}),iconPosition:"before","aria-label":"Share",children:m.jsx(pn,{})})]})]}),m.jsx("div",{className:e.tabs,role:"tablist","aria-label":"Sample form tabs","data-themed":"Active tab indicator",children:XE.map(u=>m.jsx("button",{type:"button",role:"tab","aria-selected":t===u,className:Q(e.tab,t===u&&e.activeTab),onClick:()=>r(u),children:u},u))})]}),t==="Summary"&&m.jsxs("div",{className:e.columns,children:[m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:"Account information"}),m.jsx(Ve,{label:"Account Name (single line of text)",children:m.jsx(Pt,{value:xi.name})}),m.jsx(Ve,{label:"Description (multiple lines of text)",children:m.jsx(GE,{resize:"vertical",value:"Preferred customer since 2019. Head office in Redmond, three regional branches."})}),m.jsx(Ve,{label:"Website (URL)",children:m.jsx(Pt,{value:"https://www.adatum.com",contentBefore:m.jsx(rz,{})})}),m.jsx(Ve,{label:"Email (email)",children:m.jsx(Pt,{value:xi.email,contentBefore:m.jsx(H4,{})})}),m.jsx(Ve,{label:"Main Phone (phone)",children:m.jsx(Pt,{value:xi.mainPhone})}),m.jsx(vy,{label:"Primary Contact (lookup)",value:xi.primaryContact}),m.jsx(vy,{label:"Bill To Customer (customer)",value:"Adventure Works (sample)"})]}),m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:"Classification"}),m.jsx(Ve,{label:"Industry (choice)",children:m.jsx(Pt,{value:"Consulting"})}),m.jsx(Ve,{label:"Contact Methods (choices)",children:m.jsx(Pt,{value:"Email, Phone"})}),m.jsx(Ve,{label:"Status Reason (status)",children:m.jsx(Pt,{isDisabled:!0,value:"Active"})}),m.jsx(Ve,{label:"Do not allow bulk email (yes/no)",children:m.jsx(Ro,{checked:!0,label:"No"})}),m.jsx(Ve,{label:"Preferred contact time (option set as radio)",children:m.jsxs(ml,{value:"morning",layout:"horizontal",children:[m.jsx(vn,{value:"morning",label:"Morning"}),m.jsx(vn,{value:"afternoon",label:"Afternoon"})]})})]}),m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:"Financials and dates"}),m.jsx(Ve,{label:"Number of Employees (whole number)",children:m.jsx(Pt,{value:"1 250"})}),m.jsx(Ve,{label:"Credit Score (decimal)",children:m.jsx(Pt,{value:"7.45"})}),m.jsx(Ve,{label:"Exchange Rate (floating point)",children:m.jsx(Pt,{value:"1.0865"})}),m.jsx(Ve,{label:"Annual Revenue (currency)",children:m.jsx(Pt,{value:"$ 12,500,000.00",contentBefore:m.jsx(bz,{})})}),m.jsx(Ve,{label:"Anniversary (date only)",children:m.jsx(Pt,{type:"text",value:"14/03/2019"})}),m.jsx(Ve,{label:"Last Interaction (date and time)",children:m.jsx(Pt,{value:"02/06/2026 09:30"})}),m.jsx(Ve,{label:"Duration (whole number, duration format)",children:m.jsx(Pt,{value:"1 hour 30 minutes"})}),m.jsx(Ve,{label:"Brochure (file)",children:m.jsx(Pt,{value:"company-profile.pdf",contentBefore:m.jsx(xz,{})})})]})]}),t!=="Summary"&&m.jsx("div",{className:e.columns,children:m.jsxs("div",{className:e.section,children:[m.jsx("div",{className:e.sectionTitle,children:t}),m.jsx(Ve,{label:"Sample column (single line of text)",children:m.jsx(Pt,{value:`${t} tab content`})})]})})]})}const eI="(max-width: 760px)",tI="(max-width: 560px)",rI=ut({root:{display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0,containerType:"inline-size",containerName:"previewPanel"},toolbar:{display:"flex",alignItems:"center",gap:T.spacingHorizontalL,padding:`${T.spacingVerticalXS} ${T.spacingHorizontalL} 0`,borderBottom:`1px solid ${T.colorNeutralStroke1}`,textWrap:"nowrap"},toolbarEnd:{display:"flex",alignItems:"center",gap:T.spacingHorizontalM,marginLeft:"auto",paddingBottom:T.spacingVerticalXS,minWidth:0,overflow:"hidden"},fadeItem:{display:"flex",alignItems:"center",opacity:1,transition:`opacity ${T.durationNormal} ${T.curveEasyEase}, width ${T.durationNormal} ${T.curveEasyEase}, margin ${T.durationNormal} ${T.curveEasyEase}`},fadeHighlight:{[`@container previewPanel ${eI}`]:{opacity:0,width:0,marginLeft:`calc(-1 * ${T.spacingHorizontalM})`,overflow:"hidden",pointerEvents:"none"}},fadeZoom:{[`@container previewPanel ${tI}`]:{opacity:0,width:0,marginLeft:`calc(-1 * ${T.spacingHorizontalM})`,overflow:"hidden",pointerEvents:"none"}},zoom:{display:"flex",alignItems:"center",gap:T.spacingHorizontalXS,flexShrink:0},zoomSlider:{width:"100px",minWidth:"80px"},zoomValue:{minWidth:"36px",textAlign:"right",color:T.colorNeutralForeground3},scroll:{flex:1,minHeight:0,overflow:"auto",backgroundColor:T.colorNeutralBackground3,padding:T.spacingHorizontalM},scaler:{transformOrigin:"top left"},app:{display:"flex",flexDirection:"column",minWidth:"1100px",minHeight:"760px",border:`1px solid ${T.colorNeutralStroke2}`,borderRadius:T.borderRadiusMedium,overflow:"hidden"},body:{display:"flex",flex:1,minHeight:0},canvas:{display:"flex",flex:1,minWidth:0,backgroundColor:T.colorNeutralBackground3},highlight:{"& [data-themed]":{outline:`2px dashed ${T.colorPaletteRedBorder2}`,outlineOffset:"-2px"}},portalHost:{position:"fixed",top:0,left:0,width:0,height:0,zIndex:1e6}}),oI=50,by=100;function nI(){const e=rI(),{previewTheme:t,model:r}=gr(),{logoDataUri:n}=Na(),[a,s]=ef("ui.previewTab","view"),[c,u]=ef("ui.previewZoom",by),[f,p]=y.useState(!1),g=y.useRef(null);return m.jsxs("div",{className:e.root,children:[m.jsx(Nh,{value:"preview-",children:m.jsx(Zn,{theme:t.fluentTheme,className:e.portalHost,style:{fontFamily:t.fontFamily},children:m.jsx("div",{ref:g})})}),m.jsx(Ub,{mountRef:g,children:m.jsx("div",{className:e.scroll,children:m.jsx("div",{className:e.scaler,style:{transform:`scale(${c/100})`,width:`${100/c*100}%`},children:m.jsx(Nh,{value:"preview-",children:m.jsxs(Zn,{theme:t.fluentTheme,className:Q(e.app,f&&e.highlight),style:{fontFamily:t.fontFamily},children:[m.jsx(ME,{colors:t.headerColors,logoDataUri:n,logoTooltip:r.logoTooltip,appName:"Sales Hub"}),m.jsxs("div",{className:e.body,children:[m.jsx(AE,{}),m.jsx("div",{className:e.canvas,children:a==="view"?m.jsx($E,{}):m.jsx(JE,{})})]})]})})})})}),m.jsxs("div",{className:e.toolbar,children:[m.jsxs(Fv,{selectedValue:a,onTabSelect:(v,x)=>s(x.value),children:[m.jsx(Fd,{value:"view",children:"View"}),m.jsx(Fd,{value:"form",children:"Form"})]}),m.jsxs("div",{className:e.toolbarEnd,children:[m.jsx("div",{className:Q(e.fadeItem,e.fadeHighlight),children:m.jsx(Ro,{size:"small",checked:f,onChange:(v,x)=>p(x.checked),label:"Highlight themed areas","aria-label":"Highlight the areas of the app the theme changes"})}),m.jsxs("div",{className:Q(e.fadeItem,e.zoom,e.fadeZoom),children:[m.jsx(Ie,{size:200,children:"Zoom"}),m.jsx(yl,{className:e.zoomSlider,size:"small",min:oI,max:by,step:10,value:c,"aria-label":"Preview zoom",onChange:(v,x)=>u(x.value)}),m.jsxs(Ie,{size:200,className:e.zoomValue,children:[c,"%"]})]})]})]})]})}const iI="0.1.5",aI=ut({root:{display:"flex",flexDirection:"column",height:"100vh",backgroundColor:T.colorNeutralBackground1,overflow:"hidden"},header:{display:"flex",alignItems:"flex-start",gap:T.spacingHorizontalM,padding:`${T.spacingVerticalM} ${T.spacingHorizontalL}`,borderBottom:`1px solid ${T.colorNeutralStroke1}`},headerText:{display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},titleRow:{display:"flex",alignItems:"center",gap:T.spacingHorizontalS},headerIcon:{width:"48px",height:"48px",flexShrink:0,display:"block",marginTop:"2px"},version:{position:"relative",top:T.spacingVerticalXS},subtitle:{color:T.colorNeutralForeground3,fontSize:T.fontSizeBase200,display:"block"},body:{display:"flex",flex:1,minHeight:0},main:{display:"flex",flexDirection:"column",flex:1,minWidth:0},portalHost:{position:"fixed",top:0,left:0,width:0,height:0,zIndex:1e6}});function sI(){const e=XR(),t=aI(),r=y.useRef(null);return m.jsx(zR,{children:m.jsxs(Zn,{theme:e==="dark"?O3:D3,className:t.root,children:[m.jsx("div",{ref:r,className:t.portalHost}),m.jsxs(Ub,{mountRef:r,children:[m.jsxs("div",{className:t.header,children:[m.jsx("img",{src:"/icons/tool.svg",alt:"Theme Studio icon",className:t.headerIcon}),m.jsxs("div",{className:t.headerText,children:[m.jsxs("div",{className:t.titleRow,children:[m.jsx(Ad,{children:"Theme Studio"}),m.jsx(ad,{className:t.version,appearance:"tint",color:"subtle",size:"small",children:`v${iI}`})]}),m.jsx(Ie,{className:t.subtitle,children:"Configure model-driven app themes with a WYSIWYG preview"})]})]}),m.jsx(WR,{children:m.jsxs(SM,{children:[m.jsx(HM,{}),m.jsxs("div",{className:t.body,children:[m.jsx("div",{className:t.main,children:m.jsx(nI,{})}),m.jsx(RE,{})]})]})})]})]})})}const Ta=document.getElementById("root");Ta&&!Ta.hasAttribute("data-reactroot-initialized")?(Ta.setAttribute("data-reactroot-initialized","true"),v5.createRoot(Ta).render(m.jsx(y.StrictMode,{children:m.jsx(sI,{})}))):Ta||console.error('Root element not found. Make sure the HTML contains <div id="root"></div>')})();
|
package/dist/index.html
CHANGED
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@_neronotte/theme-studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@_neronotte/theme-studio",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.5",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fluentui/react-components": "^9.72.7",
|