var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}var window = _____WB$wombat$assign$function_____("window");
var self = _____WB$wombat$assign$function_____("self");
var document = _____WB$wombat$assign$function_____("document");
var location = _____WB$wombat$assign$function_____("location");
var top = _____WB$wombat$assign$function_____("top");
var parent = _____WB$wombat$assign$function_____("parent");
var frames = _____WB$wombat$assign$function_____("frames");
var opener = _____WB$wombat$assign$function_____("opener");
import{gT as q,bZ as G,a as e,dU as w,K as L,al as D,$ as E,i6 as F,D as A,c4 as Q,a7 as $,aX as De,lB as re,lC as Fe,iz as pe,hd as b,lD as me,c7 as K,G as M,c5 as ve,au as le,bl as Me,lE as Ue,lF as Be,ia as oe,lG as Ve,aO as be,dC as He,aU as $e,ed as Ge,bf as Ye,aB as ge,I as ye,E as te,U as We}from"./app.ZXowmuNl.js";function Ke(i,n,o){const l=Math.min(i/5,n/2),c=`${i}x${n}`,u=`
    <svg width="${i}" height="${n}" xmlns="http://www.w3.org/2000/svg">
      <defs>
        <linearGradient id="gradient" x1="0" x2="0.5" y1="0" y2="1">
          <stop offset="0%" stop-color="#9100a7" />
          <stop offset="20%" stop-color="#c20090" />
          <stop offset="40%" stop-color="#e30077" />
          <stop offset="60%" stop-color="#f7255d" />
          <stop offset="80%" stop-color="#ff5445" />
          <stop offset="100%" stop-color="#ff7b2f" />
        </linearGradient>
      </defs>
      <rect width="100%" height="100%" fill="url(#gradient)" />
      <text font-family="Menlo, Monaco, Courier New, Courier, monospace" font-size="${l}" fill="white" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">${c}</text>
    </svg>
  `;return`data:image/svg+xml;base64,${window.btoa(u)}`}class ce extends Error{name="MissingContextError"}const ae=q(void 0);function Je(){const i=w(ae);if(!i)throw new ce("useNavigation must be used within an AssistantProvider");return i.navigation}function ke(){const i=w(ae);if(!i)throw new ce("useShell must be used within an AssistantProvider");return i.shell}function je({navigation:i,shell:n,children:o}){const l=G(()=>({navigation:i,shell:n}),[i,n]);return e(ae.Provider,{value:l,children:o})}const Ie=q(null);function Pe(){const i=w(Ie);if(!i)throw new ce("Can’t update overrides in this context");return i}function Te(){return Pe().overrides}function se(){return Pe().update}const qe="SruGk",Qe="Vkix7",Xe="v0bo0",Ze="i4bIR",en="_6hm06",nn="R2Ebo",tn="aZNsJ",on="cDoZ2",rn="bj0FA",ln="PlJtX",cn="V2anF",an="JrJtw",sn="onngK",dn="YH3zo",un="u33Bb",hn="bzVYq",pn="NxTSu",mn="MW9Xk",bn="aU25c",gn="_5oAC4",yn="_333bi",fn="zhe3U",Cn="JBsBA",Sn="OR7nR",vn="zmyvn",Bn="omYjL",C={Ui:qe,active:Qe,ActivatorIcon:Xe,"Ui-positionStart":"JvLOE",Activator:Ze,"Ui-positionEnd":"hJ6jy",Layout:en,Sheet:nn,ActivatorInner:tn,Group:on,Heading:rn,Section:ln,Header:cn,"Section-statusComplete":"yTeh4",Item:an,"Header-statusComplete":"qYNqy","Item-statusComplete":"BBczo","Section-statusPartial":"gA6sD","Header-statusPartial":"yqGrk","Item-statusPartial":"oxXiI",Badge:sn,"Badge-statusComplete":"xrC3s","Badge-statusPartial":"_47d2p",SelectOuter:dn,Select:un,SelectIcon:hn,TextField:pn,Note:mn,InlineStack:bn,"InlineStack-distributionSpaceBetween":"_5WA2z",ColorPicker:gn,"ColorPicker-empty":"FmKD4",ColorPickerInput:yn,Toggle:fn,ToggleInput:Cn,ToggleIcon:Sn,Button:vn,UndoButton:Bn};function kn({children:i,position:n="end"}){const[o,l]=L(!1),c=D(o);return o&&(c.current=!0),e("div",{"aria-hidden":"true",className:E(C.Ui,o&&C.active,C[F("Ui-position",n)]),children:[e("button",{type:"button",className:C.Activator,onClick:()=>l(u=>!u),children:e("span",{className:C.ActivatorInner,children:[e("span",{children:"Assistant"}),e("span",{className:C.ActivatorIcon,children:e(A,{type:"chevron-down",appearance:"monochrome"})})]})}),e("div",{className:C.Layout,children:[e(In,{}),e("div",{className:C.Sheet,children:c.current&&i})]})]})}function In(){const i=Q(),n=ke(),o=Te(),l=se(),[c,u]=L([]),d=D(!1);$(()=>{d.current?d.current=!1:u(s=>[o,...s])},[o]);const a=()=>{if(c.length<2)return;const[s,...g]=c;d.current=!0,i.reset(),n?.reset(),l(g[0]),u(g)};return c.length<2?null:e("button",{className:C.UndoButton,onClick:a,children:e("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.53033 3.46967C7.82322 3.76256 7.82322 4.23744 7.53033 4.53033L5.81066 6.25H15C18.1756 6.25 20.75 8.82436 20.75 12C20.75 15.1756 18.1756 17.75 15 17.75H8.00001C7.58579 17.75 7.25001 17.4142 7.25001 17C7.25001 16.5858 7.58579 16.25 8.00001 16.25H15C17.3472 16.25 19.25 14.3472 19.25 12C19.25 9.65279 17.3472 7.75 15 7.75H5.81066L7.53033 9.46967C7.82322 9.76256 7.82322 10.2374 7.53033 10.5303C7.23744 10.8232 6.76256 10.8232 6.46967 10.5303L3.46967 7.53033C3.17678 7.23744 3.17678 6.76256 3.46967 6.46967L6.46967 3.46967C6.76256 3.17678 7.23744 3.17678 7.53033 3.46967Z",fill:"#FFFFFF"})})})}function I({children:i,title:n}){return e("section",{className:C.Group,children:[n&&e("h3",{className:C.Heading,children:n}),i]})}function h({children:i,status:n}){return e("details",{className:E(C.Section,n&&C[F("Section-status",n)]),children:i})}function p({children:i,status:n}){return e("summary",{className:E(C.Header,n&&C[F("Header-status",n)]),children:i})}function J({children:i,status:n}){return e("div",{className:E(C.Item,n&&C[F("Item-status",n)]),children:i})}function Pn({children:i,status:n}){return e("p",{className:E(C.Badge,C[F("Badge-status",n)]),children:i})}function Tn({children:i,distribution:n}){return e("div",{className:E(C.InlineStack,n&&C[F("InlineStack-distribution",n)]),children:i})}const U=q(void 0);function xn({children:i,id:n}){const o=w(U);return e("label",{htmlFor:n??o,className:C.Label,children:i})}function x({id:i,value:n,onChange:o}){const l=w(U);return e("div",{className:C.Toggle,children:[e("input",{type:"checkbox",className:C.ToggleInput,id:i??l,checked:n??!1,onChange:({currentTarget:c})=>o(c.checked)}),e("div",{className:C.ToggleIcon,children:e(A,{type:"check",size:"small",appearance:"monochrome"})})]})}const fe="",wn="Default";function r({id:i,value:n=fe,placeholderContent:o=wn,options:l,onChange:c}){const u=w(U),[d,a]=L(n),s=D(n);return s.current!==n&&(s.current=n,a(n)),e("div",{className:C.SelectOuter,children:[e("select",{className:C.Select,id:i??u,value:d,onChange:({currentTarget:{value:g}})=>{a(g),c(g)},children:[e("option",{value:fe,disabled:!0,children:o}),l.map(({id:g,content:f})=>e("option",{value:g,children:f},g))]}),e("div",{className:C.SelectIcon,children:e(A,{type:"chevron-down",appearance:"monochrome"})})]})}function T({id:i,value:n,placeholder:o,onChange:l,type:c="text",min:u}){const d=w(U),[a,s]=L(n==null?void 0:String(n)),g=D(n);return g.current!==n&&(g.current=n,s(String(n))),e("input",{className:C.TextField,id:i??d,value:a,type:c,min:u,placeholder:o,onChange:({currentTarget:f})=>s(f.value),onBlur:()=>{l(a?c==="number"?Number.parseFloat(a):a:void 0)}})}function R({value:i,onChange:n,...o}){const[l,c]=L();$(()=>{const d=typeof i=="string"?i.match(/base64,(.+)/):void 0,a=d&&d[1],s=a&&window.atob(a),[g,f,v]=s&&s.match(/width="(\d+)" height="(\d+)"/)||[];f&&v&&c(`!${f}x${v}`)},[i]);const u=De(d=>{if(typeof d=="string"&&d.charAt(0)==="!"){const a=d.match(/!(\d+)x(\d+)/);if(a&&a[1]&&a[2])return n(Ke(Number(a[1]),Number(a[2])))}n(d)},[n]);return e(T,{...o,value:l??i,placeholder:"!200x200 or URL",onChange:u})}function m({id:i,value:n,onInput:o,onChange:l}){const c=w(U),[u,d]=L(n),a=D(n);return a.current!==n&&(a.current=n,d(n)),e("div",{className:E(C.ColorPicker,u==null&&C["ColorPicker-empty"]),style:{backgroundColor:u},children:e("input",{type:"color",className:C.ColorPickerInput,id:i??c,autoComplete:"nope",value:u??"#FFFFFF",onChange:({currentTarget:s})=>{d(s.value),o?.(s.value)},onBlur:()=>{n!==u&&l(u)}})})}function t({label:i,children:n,status:o,note:l}){const c=D();return c.current==null&&(c.current=`Editable${On()}`),e(J,{status:o,children:e(U.Provider,{value:c.current,children:[e(Tn,{distribution:"spaceBetween",children:[e(xn,{children:i}),n]}),l&&e(xe,{children:l})]})})}function xe({children:i}){return e("p",{className:C.Note,children:i})}function ie({children:i,onPress:n}){return e("button",{className:C.Button,type:"button",onClick:()=>n?.(),children:i})}function On(){return`${W()}-${W()}-${W()}-${W()}`}function W(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}const P=[{id:"style1",content:"Style 1"},{id:"style2",content:"Style 2"},{id:"style3",content:"Style 3"},{id:"style4",content:"Style 4"},{id:"style5",content:"Style 5"},{id:"style6",content:"Style 6"},{id:"style7",content:"Style 7"},{id:"style8",content:"Style 8"},{id:"style9",content:"Style 9"}],_=[{id:"subdued",content:"Subdued"},{id:"base",content:"Base"}],Ce=[{id:"bold",content:"Bold"},{id:"base",content:"Base"}],zn=[{id:"none",content:"None"},{id:"underline",content:"Underline"}],de=[{id:"inline",content:"Inline"},{id:"descriptionList",content:"Description list"}],Ln=[{id:"transparent",content:"Transparent"},{id:"base",content:"Base"}],ue=[{id:"transparent",content:"Transparent"},{id:"base",content:"Base"},{id:"subdued",content:"Subdued"}],Nn=[{id:"transparent",content:"Transparent"},{id:"base",content:"Base"}],En=[{id:"accent",content:"Accent"},{id:"base",content:"Base"}],X=re.map(i=>({id:i,content:`Color Scheme ${i.split("scheme")[1]}`})),Z=[...X,{id:"inherit",content:"Inherit"}],j=[{id:"none",content:"None"},{id:"small400",content:"Extra Tight"},{id:"small200",content:"Tight"},{id:"base",content:"Base"},{id:"large200",content:"Loose"},{id:"large500",content:"Extra Loose"}],S=[{id:"none",content:"None"},{id:"small500",content:"Small500"},{id:"small400",content:"Small400"},{id:"small300",content:"Small300"},{id:"small200",content:"Small200"},{id:"small100",content:"Small100"},{id:"base",content:"Base"},{id:"large100",content:"Large100"},{id:"large200",content:"Large200"},{id:"large300",content:"Large300"},{id:"large400",content:"Large400"},{id:"large500",content:"Large500"}],N=[{id:"none",content:"None"},{id:"base",content:"Base"},{id:"small",content:"Small"},{id:"large",content:"Large"},{id:"fullyRounded",content:"Rounded"}],Rn=[{id:"cover",content:"Cover"},{id:"contain",content:"Contain"}],V=[{id:"full",content:"Full"},{id:"none",content:"None"}],ee=[...V,{id:"blockEnd",content:"Block end"}],Y=[{id:"base",content:"Base"},{id:"dashed",content:"Dashed line"},{id:"dotted",content:"Dotted line"}],ne=[{id:"base",content:"Base"},{id:"medium",content:"Medium"},{id:"thick",content:"Thick"}],An=[{id:"toContainerEdge",content:"Fill container"},{id:"contentSize",content:"Match content size"}],_n=[{id:"masked",content:"Masked"},{id:"hidden",content:"Hidden"}],Dn=[{id:"base",content:"Base"},{id:"linearGradient",content:"Linear gradient"}],Fn=[{id:"none",content:"None"},{id:"extraSmall",content:"Extra Small"},{id:"small",content:"Small"},{id:"base",content:"Base"},{id:"large",content:"Large"},{id:"extraLarge",content:"Extra Large"}],we=[{id:"hidden",content:"Hidden"},{id:"visible",content:"Visible"}];function y(i){const n=Q();return Oe(n,i)}function Oe(i,n){const{configuration:o}=i,l=se(),c=Fe(o,n);return G(()=>new Proxy({},{get(d,a){return{value:c?.[a],onChange(s){const g=n.split(".")[0],f=pe(i.configuration,`${n}.${String(a)}`,s);i.set(g,f[g]),l(v=>pe(v,`${n}.${String(a)}`,s))}}}}),[c,n,i,l])}const Mn=b(function(){const{border:n}=y("banner");return e(h,{children:[e(p,{children:"Banner"}),e(t,{label:"Border",children:e(r,{options:V,...n})})]})}),Un=b(function(){const{cornerRadius:n}=y("checkbox");return e(h,{status:"partial",children:[e(p,{children:"Checkboxes"}),e(t,{label:"Corner radius",status:"complete",children:e(r,{options:N,...n})})]})});function Vn(){const i=Q(),n=Te(),o=se();return G(()=>{return{global:{success:c("success"),warning:c("warning"),critical:c("critical"),info:c("info"),brand:c("brand"),accent:c("accent"),decorative:c("decorative")},schemes:re.reduce((d,a)=>({...d,[a]:l(a)}),{})};function l(d){return{base:["background","text","border","icon","accent","decorative"].reduce((a,s)=>({...a,[s]:u({scheme:d,color:s,role:"base"})}),{}),control:{...["background","text","border","icon","accent","decorative"].reduce((a,s)=>({...a,[s]:u({scheme:d,color:s,role:"control"})}),{}),selected:["background","text","border","icon","accent","decorative"].reduce((a,s)=>({...a,[s]:u({scheme:d,color:s,role:"control",isSubRole:!0})}),{})},...["primaryButton","secondaryButton"].reduce((a,s)=>({...a,[s]:{...["background","text","border","icon","accent","decorative"].reduce((g,f)=>({...g,[f]:u({scheme:d,color:f,role:s})}),{}),hover:["background","text","border","icon","accent","decorative"].reduce((g,f)=>({...g,[f]:u({scheme:d,color:f,role:s,isSubRole:!0})}),{})}}),{})}}function c(d){const a=i.configuration.colors.global?.[d],s=a?me([a.h,a.s,a.l]):void 0;return{value:n.colors?.global?.[d]??s,onInput:f=>{i.preview({...i.configuration.colors,global:{...i.configuration.colors.global,[d]:f==null?void 0:K(f)}})},onChange:f=>{o(v=>f==null?v:{...v,colors:{...v?.colors,global:{...v?.colors?.global,[d]:f}}})}}}function u({color:d,isSubRole:a=!1,role:s,scheme:g}){let f,v;switch(a){case!0:s==="control"?(f=i.configuration.colors.schemes?.[g]?.control?.selected?.[d],v=n.colors?.schemes?.[g]?.control?.selected?.[d]):(s==="primaryButton"||s==="secondaryButton")&&(f=i.configuration.colors.schemes?.[g]?.[s]?.hover?.[d],v=n.colors?.schemes?.[g]?.[s]?.hover?.[d]);break;case!1:f=i.configuration.colors.schemes?.[g]?.[s]?.[d],v=n.colors?.schemes?.[g]?.[s]?.[d];break}const _e=f?me([f.h,f.s,f.l]):void 0;return{value:v??_e,onInput:O=>{i.preview({...i.configuration.colors,schemes:{[g]:{...i.configuration.colors.schemes?.[g],[s]:a?{[s==="control"?"selected":"hover"]:{[d]:O==null?void 0:K(O)}}:{[d]:O==null?void 0:K(O)}}}})},onChange:O=>{o(z=>O==null?z:{...z,colors:{...z?.colors,schemes:{...z?.colors?.schemes,[g]:{...z?.colors?.schemes?.[g],[s]:{...z?.colors?.schemes?.[g]?.[s],...a?{[s==="control"?"selected":"hover"]:{...s==="control"&&{...z?.colors?.schemes?.[g]?.[s]?.selected},...(s==="primaryButton"||s==="secondaryButton")&&{...z?.colors?.schemes?.[g]?.[s]?.hover},[d]:O}}:{[d]:O}}}}}})}}}},[n,i,o])}const Hn=b(function(){const n=Vn();return e(h,{status:"complete",children:[e(p,{children:"Colors"}),e(h,{children:[e(p,{children:"Global"}),e(t,{label:"Success ",children:e(m,{...n.global.success})}),e(t,{label:"Warning ",children:e(m,{...n.global.warning})}),e(t,{label:"Critical",children:e(m,{...n.global.critical})}),e(t,{label:"Info",children:e(m,{...n.global.info})}),e(t,{label:"Brand",children:e(m,{...n.global.brand})}),e(t,{label:"Accent",children:e(m,{...n.global.accent})}),e(t,{label:"Decorative",children:e(m,{...n.global.decorative})})]}),re.map(o=>e(h,{children:[e(p,{children:["Scheme ",o.split("scheme")[1],e("br",{}),o==="scheme1"&&e("small",{children:"(defaults to Main, Header, Footer)"}),o==="scheme2"&&e("small",{children:"(defaults to Order Summary)"})]}),e(h,{children:[e(p,{children:"Base"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].base.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].base.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].base.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].base.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].base.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].base.decorative})})]}),e(h,{children:[e(p,{children:"Control"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].control.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].control.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].control.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].control.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].control.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].control.decorative})}),e(h,{children:[e(p,{children:":selected"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].control.selected.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].control.selected.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].control.selected.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].control.selected.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].control.selected.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].control.selected.decorative})})]})]}),e(h,{children:[e(p,{children:"Primary Button"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].primaryButton.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].primaryButton.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].primaryButton.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].primaryButton.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].primaryButton.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].primaryButton.decorative})}),e(h,{children:[e(p,{children:":hover"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].primaryButton.hover.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].primaryButton.hover.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].primaryButton.hover.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].primaryButton.hover.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].primaryButton.hover.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].primaryButton.hover.decorative})})]})]}),e(h,{children:[e(p,{children:"Secondary Button"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].secondaryButton.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].secondaryButton.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].secondaryButton.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].secondaryButton.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].secondaryButton.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].secondaryButton.decorative})}),e(h,{children:[e(p,{children:":hover"}),e(t,{label:"Background",children:e(m,{...n.schemes[o].secondaryButton.hover.background})}),e(t,{label:"Text",children:e(m,{...n.schemes[o].secondaryButton.hover.text})}),e(t,{label:"Border",children:e(m,{...n.schemes[o].secondaryButton.hover.border})}),e(t,{label:"Icon",children:e(m,{...n.schemes[o].secondaryButton.hover.icon})}),e(t,{label:"Accent",children:e(m,{...n.schemes[o].secondaryButton.hover.accent})}),e(t,{label:"Decorative",children:e(m,{...n.schemes[o].secondaryButton.hover.decorative})})]})]})]},o))]})}),$n=b(function(){const{background:n,border:o,cornerRadius:l,labelPosition:c}=y("control");return e(h,{status:"complete",children:[e(p,{children:"Controls"}),e(t,{label:"Background",children:e(r,{options:Ln,...n})}),e(t,{label:"Border",children:e(r,{options:V,...o})}),e(t,{label:"Corner radius",children:e(r,{options:N,...l})}),e(t,{label:"Label position",children:e(r,{options:[{id:"inside",content:"Inside"},{id:"outside",content:"Outside"}],...c})})]})}),Gn=b(function(){const{small:n,base:o,large:l}=y("cornerRadius");return e(h,{status:"complete",children:[e(p,{children:"Corner radius"}),e(t,{label:"Small",children:e(T,{...n,type:"number",min:0})}),e(t,{label:"Base",children:e(T,{...o,type:"number",min:0})}),e(t,{label:"Large",children:e(T,{...l,type:"number",min:0})})]})}),Yn=b(function(){const{borderStyle:n,borderWidth:o}=y("divider");return e(h,{status:"complete",children:[e(p,{children:"Divider"}),e(t,{label:"Divider Style",children:e(r,{options:Y,...n})}),e(t,{label:"Divider Width",children:e(r,{options:ne,...o})})]})}),Wn=b(function(){const{spacing:n}=y("formLayout");return e(h,{children:[e(p,{children:"Form layout"}),e(t,{label:"Spacing",children:e(r,{options:S,...n})})]})}),Kn=b(function(){const{cornerRadius:n}=y("global");return e(h,{status:"complete",children:[e(p,{children:"Global"}),e(t,{label:"Corner radius",children:e(r,{options:[{id:"none",content:"None"}],...n})})]})}),Jn=b(function(){const{base:n,ratio:o}=y("typographyScale"),{typographyLetterCase:l,typographyKerning:c}=y("global"),u=[y("typographyPrimary"),y("typographySecondary")];return e(h,{status:"complete",children:[e(p,{children:"Typography"}),e(h,{children:[e(p,{children:"Global"}),e(t,{label:"Base size",children:e(T,{...n,type:"number",min:0})}),e(t,{label:"Scale ratio",children:e(T,{...o,type:"number",min:0})}),e(t,{label:"Kerning",children:e(r,{options:[{id:"base",content:"Base"},{id:"loose",content:"Loose"}],...c})}),e(t,{label:"Letter case",children:e(r,{options:[{id:"none",content:"None"},{id:"title",content:"Title case"},{id:"upper",content:"Uppercase"},{id:"lower",content:"Lowercase"}],...l})})]}),u.map(({fonts:d,weightBase:a,sourceBase:s,weightBold:g,sourceBold:f},v)=>e(h,{children:[e(p,{children:[v===0?"Primary":"Secondary"," font stack"]}),e(t,{label:"Fonts",children:e(T,{...d})}),e(h,{children:[e(p,{children:"Base"}),e(t,{label:"Source",children:e(T,{...s})}),e(t,{label:"Weight",children:e(r,{options:[{id:"100",content:"100"},{id:"200",content:"200"},{id:"300",content:"300"},{id:"400",content:"400"},{id:"500",content:"500"},{id:"600",content:"600"},{id:"700",content:"700"},{id:"800",content:"800"},{id:"900",content:"900"}],...a})})]}),e(h,{children:[e(p,{children:"Bold"}),e(t,{label:"Source",children:e(T,{...f})}),e(t,{label:"Weight",children:e(r,{options:[{id:"100",content:"100"},{id:"200",content:"200"},{id:"300",content:"300"},{id:"400",content:"400"},{id:"500",content:"500"},{id:"600",content:"600"},{id:"700",content:"700"},{id:"800",content:"800"},{id:"900",content:"900"}],...g})})]})]},`typography${v+1}`))]})}),jn=({size:i,letterCase:n,fonts:o,weight:l,kerning:c})=>e(M,{children:[e(t,{label:"Size",children:e(r,{options:[{id:"extraSmall",content:"Extra small"},{id:"small",content:"Small"},{id:"base",content:"Base"},{id:"medium",content:"Medium"},{id:"large",content:"Large"},{id:"extraLarge",content:"Extra large"},{id:"extraExtraLarge",content:"Extra extra large"}],...i})}),e(t,{label:"Letter case",children:e(r,{options:[{id:"none",content:"None"},{id:"title",content:"Title case"},{id:"upper",content:"Uppercase"},{id:"lower",content:"Lowercase"}],...n})}),e(t,{label:"Font stack",children:e(r,{options:[{id:"primary",content:"Primary"},{id:"secondary",content:"Secondary"}],...o})}),e(t,{label:"Font weight",children:e(r,{options:[{id:"base",content:"Base"},{id:"bold",content:"Bold"}],...l})}),e(t,{label:"Kerning",children:e(r,{options:[{id:"base",content:"Base"},{id:"loose",content:"Loose"},{id:"xloose",content:"Extra Loose"}],...c})})]}),H=b(function({id:n,status:o}){const l=y(`${n}.typography`),{size:c,letterCase:u,fonts:d,weight:a,kerning:s,decoration:g}=l;return e(h,{status:o,children:[e(p,{children:"Typography"}),e(jn,{size:c,letterCase:u,fonts:d,weight:a,kerning:s,decoration:g})]})}),qn=b(function(){return e(M,{children:[1,2,3].map(n=>e(h,{status:"complete",children:[e(p,{children:["Heading level ",n]}),e(H,{id:`headingLevel${n}`})]},`headingLevel${n}`))})}),Qn=b(function(){return e(h,{children:[e(p,{children:"Labels"}),e(H,{id:"label"})]})}),Xn=b(function(){const{spacing:n,hideQuantityWhenSingleItem:o,quantityPosition:l,titleTypographyStyle:c,optionsTypographyStyle:u,optionsAppearance:d,optionsEmphasis:a,optionsFormat:s,propertiesTypographyStyle:g,propertiesAppearance:f,propertiesEmphasis:v}=y("lineItems");return e(h,{children:[e(p,{children:"Line items"}),e(t,{label:"Spacing",children:e(r,{options:S,...n})}),e(t,{label:"Hide Quantity When Single Item",children:e(x,{...o})}),e(t,{label:"Quantity",children:e(r,{options:[{id:"none",content:"None"},{id:"inline",content:"Inline with content"},{id:"inlinePrimary",content:"Inline with primary content"},{id:"thumbnailBadge",content:"Over thumbnail as a badge"}],...l})}),e(t,{label:"Title - typography style",children:e(r,{options:P,...c})}),e(t,{label:"Options - typography style",children:e(r,{options:P,...u})}),e(t,{label:"Options - typography appearance",children:e(r,{options:_,...d})}),e(t,{label:"Options - typography emphasis",children:e(r,{options:Ce,...a})}),e(t,{label:"Options - list format",children:e(r,{options:de,...s})}),e(t,{label:"Properties - typography style",children:e(r,{options:P,...g})}),e(t,{label:"Properties - typography appearance",children:e(r,{options:_,...f})}),e(t,{label:"Properties - typography emphasis",children:e(r,{options:Ce,...v})})]})}),Zn=b(function(){const{typographyDecoration:n}=y("link");return e(h,{children:[e(p,{children:"Link"}),e(t,{label:"Typography decoration",children:e(r,{options:zn,...n})})]})}),et=b(function(){const{aspectRatio:n,fit:o,border:l,cornerRadius:c}=y("merchandiseThumbnail"),{background:u}=y("merchandiseThumbnail.badge");return e(h,{status:"partial",children:[e(p,{children:"Merchandise Thumbnail"}),e(t,{label:"Border",status:"complete",children:e(r,{options:[{id:"full",content:"Full"},{id:"none",content:"None"}],...l})}),e(t,{label:"Corner radius",status:"complete",children:e(r,{options:N,...c})}),e(t,{label:"Aspect ratio",children:e(T,{...n,type:"number",min:0})}),e(t,{label:"Fit",children:e(r,{options:Rn,...o})}),e(h,{status:"partial",children:[e(p,{children:"Badge"}),e(t,{label:"Background",status:"partial",children:e(r,{options:En,...u})})]})]})}),nt=b(function(){const{divided:n,spacing:o,blockPadding:l,inlinePadding:c,giftCardStyle:u,labelTypographyStyle:d,valueTypographyStyle:a}=y("moneyLines");return e(h,{children:[e(p,{children:"Money lines"}),e(t,{label:"Spacing",children:e(r,{options:S,...o})}),e(t,{label:"Divided",children:e(x,{...n})}),e(t,{label:"Block padding",children:e(r,{options:S,...l})}),e(t,{label:"Gift Card Style",children:e(r,{options:_n,...u})}),e(t,{label:"Inline padding",children:e(r,{options:S,...c})}),e(t,{label:"Label - typography style",children:e(r,{options:P,...d})}),e(t,{label:"Value - typography style",children:e(r,{options:P,...a})})]})}),tt=b(function(){const{blockPadding:n,inlinePadding:o,currencyCode:l,labelTypographyStyle:c,currencyTypographyStyle:u,valueTypographyStyle:d}=y("moneySummary");return e(h,{children:[e(p,{children:"Money summary"}),e(t,{label:"Block padding",children:e(r,{options:S,...n})}),e(t,{label:"Inline padding",children:e(r,{options:S,...o})}),e(t,{label:"Currency code",children:e(x,{...l})}),e(t,{label:"Label - typography style",children:e(r,{options:P,...c})}),e(t,{label:"Currency - typography style",children:e(r,{options:P,...u})}),e(t,{label:"Value - typography style",children:e(r,{options:P,...d})})]})}),ot=b(function(){const{backdrop:n,colorScheme:o}=y("modal");return e(h,{children:[e(p,{children:"Modal"}),e(t,{label:"Backdrop style",note:n.value==="linearGradient"?"⚠️ Linear-gradient is only used on mobile views right now in the MobileSDK theme. The look on large screen would need to be refined if we want to expose the customization to all merchants.":void 0,children:e(r,{options:Dn,...n})}),e(t,{label:"Color scheme",note:"⚠️ This value is populated by the color scheme applied to Shell's `main` content area when the app loads.",children:e(r,{options:X,...o})})]})}),it=b(function(){const{base:n,ratio:o}=y("durationScale");return e(h,{children:[e(p,{children:"Motion"}),e(t,{label:"Base duration (in ms)",children:e(T,{...n,type:"number",min:0})}),e(t,{label:"Scale ratio",children:e(T,{...o,type:"number",min:0})})]})}),rt=b(function(){const{spacing:n}=y("choiceList.group");return e(h,{status:"partial",children:[e(p,{children:"Choice lists"}),e(t,{label:"Spacing",status:"complete",children:e(r,{options:S,...n})})]})}),lt=b(function(){const{border:n,cornerRadius:o,spacing:l,blockPadding:c,inlinePadding:u,borderStyle:d,typographyStyle:a}=y("optionList");return e(h,{children:[e(p,{children:"Option lists"}),e(t,{label:"Corner radius",children:e(r,{options:N,...o})}),e(t,{label:"Border",children:e(r,{options:[...V,{id:"inner",content:"Inner"}],...n})}),e(t,{label:"Border style",children:e(r,{options:Y,...d})}),e(t,{label:"Spacing",children:e(r,{options:S,...l})}),e(t,{label:"Block padding",children:e(r,{options:S,...c})}),e(t,{label:"Inline padding",children:e(r,{options:S,...u})}),e(t,{label:"Typography style",children:e(r,{options:P,...a})})]})});function ze(i){if(typeof i=="object"&&i!==null){let n={};for(const o in i)typeof i[o]=="object"?n[o]=ze(i[o]):n={...n,[o]:K(i[o])};return n}return i}function ct({children:i}){const n=Q(),o=ke(),l=Je(),[c,u]=L(()=>{const a=l.currentUrl.searchParams.get("theme");let s;try{s=a==null?void 0:JSON.parse(a)}catch{}return s??{}});$(()=>{for(const a of Object.keys(c))if(a==="colors"){const s=ze(c.colors);Object.keys(s).length>0&&n.preview(s)}else if(o&&Object.keys(o.configuration).includes(a)){const s=o.configuration[a]??{};o.set(a,{...s,...c[a]})}else if(Object.keys(n.configuration).includes(a)){const s=n.configuration[a]??{};n.set(a,{...s,...c[a]})}},[c,o,n]),$(()=>{const a=new URL(l.currentUrl.href);Object.keys(c).length>0?a.searchParams.set("theme",JSON.stringify(c)):a.searchParams.delete("theme"),a.href!==l.currentUrl.href&&l.navigate(a,{replace:!0,state:l.currentUrl.state})},[l,c]);const d=G(()=>({overrides:c,update:u}),[c,u]);return e(Ie.Provider,{value:d,children:i})}const at=b(function(){const{disclosureSeparator:n}=y("phoneField");return e(h,{children:[e(p,{children:"PhoneField"}),e(t,{label:"Separator",children:e(x,{...n})})]})}),st=b(function(){const{connector:n,shadow:o,colorScheme:l}=y("popover");return e(h,{children:[e(p,{children:"Popover"}),e(t,{label:"Connector",children:e(r,{options:[{id:"none",content:"None"},{id:"arrow",content:"Arrow"}],...n})}),e(t,{label:"Shadow",children:e(x,{...o})}),e(t,{label:"Color scheme",note:"⚠️ This value is populated by the color scheme applied to Shell's `main` content area when the app loads.",children:e(r,{options:X,...l})})]})}),dt=b(function(){const{background:n,border:o,cornerRadius:l,blockPadding:c,inlinePadding:u}=y("primaryButton");return e(h,{status:"partial",children:[e(p,{children:"Primary button"}),e(t,{label:"Background",status:"complete",children:e(r,{options:[{id:"solid",content:"Solid"},{id:"none",content:"None"}],...n})}),e(t,{label:"Border",status:"complete",children:e(r,{options:ee,...o})}),e(t,{label:"Corner radius",status:"complete",children:e(r,{options:N,...l})}),e(t,{label:"Block padding",status:"complete",children:e(r,{options:j,...c})}),e(t,{label:"Inline padding",status:"complete",children:e(r,{options:j,...u})}),e(H,{id:"primaryButton",status:"complete"})]})}),ut=b(function(){const{border:n,spacing:o,inlinePadding:l,blockPadding:c,divider:u}=y("reviewBlock");return e(h,{children:[e(p,{children:"Review block"}),e(t,{label:"Border",children:e(r,{options:V,...n})}),e(t,{label:"Spacing",children:e(r,{options:S,...o})}),e(t,{label:"Block padding",children:e(r,{options:S,...c})}),e(t,{label:"Inline padding",children:e(r,{options:S,...l})}),e(t,{label:"Divider",children:e(r,{options:An,...u})})]})}),ht=b(function(){const{layoutStyle:n}=y("rollup");return e(h,{children:[e(p,{children:"Rollup"}),e(t,{label:"Layout style",children:e(r,{options:[{id:"block",content:"Block"},{id:"inline",content:"Inline"}],...n})})]})}),pt=b(function(){const{background:n,border:o,cornerRadius:l,blockPadding:c,inlinePadding:u}=y("secondaryButton");return e(h,{status:"partial",children:[e(p,{children:"Secondary button"}),e(t,{label:"Background",status:"complete",children:e(r,{options:[{id:"solid",content:"Solid"},{id:"none",content:"None"}],...n})}),e(t,{label:"Border",status:"complete",children:e(r,{options:ee,...o})}),e(t,{label:"Corner radius",status:"complete",children:e(r,{options:N,...l})}),e(t,{label:"Block padding",status:"complete",children:e(r,{options:j,...c})}),e(t,{label:"Inline padding",status:"complete",children:e(r,{options:j,...u})}),e(H,{id:"secondaryButton",status:"complete"})]})}),mt=b(function(){const{border:n,focusBorder:o,disclosureIcon:l,blockPadding:c,inlinePadding:u}=y("select");return e(h,{status:"partial",children:[e(p,{children:"Selects"}),e(t,{label:"Border",status:"complete",children:e(r,{options:ee,...n})}),e(t,{label:"Focus border",children:e(r,{options:[{id:"full",content:"Full"},{id:"blockEnd",content:"Block end"},{id:"none",content:"None"}],...o})}),e(t,{label:"Disclosure icon",children:e(r,{options:[{id:"caretDown",content:"Caret (down)"},{id:"chevronDown",content:"Chevron (down)"}],...l})}),e(t,{label:"Block padding",children:e(r,{options:S,...c})}),e(t,{label:"Inline padding",children:e(r,{options:S,...u})}),e(H,{id:"select",status:"complete"})]})}),bt=b(function(){const{spacing:n,quantityPosition:o,titleTypographyStyle:l,optionsTypographyStyle:c,optionsAppearance:u,optionsFormat:d,propertiesTypographyStyle:a,propertiesAppearance:s}=y("stockProblemsLineItems");return e(h,{children:[e(p,{children:"Stock problems"}),e(t,{label:"Spacing",children:e(r,{options:S,...n})}),e(t,{label:"Quantity",children:e(r,{options:[{id:"none",content:"None"},{id:"inline",content:"Inline with content"},{id:"inlinePrimary",content:"Inline with primary content"},{id:"thumbnailBadge",content:"Over thumbnail as a badge"}],...o})}),e(t,{label:"Title - typography style",children:e(r,{options:P,...l})}),e(t,{label:"Options - typography style",children:e(r,{options:P,...c})}),e(t,{label:"Options - typography appearance",children:e(r,{options:_,...u})}),e(t,{label:"Options - list format",children:e(r,{options:de,...d})}),e(t,{label:"Properties - typography style",children:e(r,{options:P,...a})}),e(t,{label:"Properties - typography appearance",children:e(r,{options:_,...s})})]})}),gt=b(function(){const{border:n,focusBorder:o,blockPadding:l,inlinePadding:c}=y("textField");return e(h,{status:"partial",children:[e(p,{children:"Text fields"}),e(t,{label:"Border",status:"complete",children:e(r,{options:ee,...n})}),e(t,{label:"Focus border",children:e(r,{options:[{id:"full",content:"Full"},{id:"blockEnd",content:"Block end"},{id:"none",content:"None"}],...o})}),e(t,{label:"Block padding",children:e(r,{options:S,...l})}),e(t,{label:"Inline padding",children:e(r,{options:S,...c})}),e(H,{id:"textField",status:"complete"})]})}),yt=b(function(){const{spacing:n,quantityPosition:o,titleTypographyStyle:l,optionsTypographyStyle:c,optionsAppearance:u,optionsFormat:d,propertiesTypographyStyle:a,propertiesAppearance:s}=y("throttleLineItems");return e(h,{children:[e(p,{children:"Throttle"}),e(t,{label:"Spacing",children:e(r,{options:S,...n})}),e(t,{label:"Quantity",children:e(r,{options:[{id:"none",content:"None"},{id:"inline",content:"Inline with content"},{id:"inlinePrimary",content:"Inline with primary content"},{id:"thumbnailBadge",content:"Over thumbnail as a badge"}],...o})}),e(t,{label:"Title - typography style",children:e(r,{options:P,...l})}),e(t,{label:"Options - typography style",children:e(r,{options:P,...c})}),e(t,{label:"Options - typography appearance",children:e(r,{options:_,...u})}),e(t,{label:"Options - list format",children:e(r,{options:de,...d})}),e(t,{label:"Properties - typography style",children:e(r,{options:P,...a})}),e(t,{label:"Properties - typography appearance",children:e(r,{options:_,...s})})]})}),ft=b(function(){const{blockPadding:n}=y("toggleButtonGroup");return e(h,{children:[e(p,{children:"ToggleButton groups"}),e(t,{label:"Block padding",children:e(r,{options:S,...n})})]})}),Ct=({size:i,letterCase:n,fonts:o,weight:l,kerning:c,decoration:u})=>e(M,{children:[e(t,{label:"Size",children:e(r,{options:[{id:"extraSmall",content:"Extra small"},{id:"small",content:"Small"},{id:"base",content:"Base"},{id:"medium",content:"Medium"},{id:"large",content:"Large"},{id:"extraLarge",content:"Extra large"},{id:"extraExtraLarge",content:"Extra extra large"}],...i})}),e(t,{label:"Letter case",children:e(r,{options:[{id:"none",content:"None"},{id:"title",content:"Title case"},{id:"upper",content:"Uppercase"},{id:"lower",content:"Lowercase"}],...n})}),e(t,{label:"Font stack",children:e(r,{options:[{id:"primary",content:"Primary"},{id:"secondary",content:"Secondary"}],...o})}),e(t,{label:"Font weight",children:e(r,{options:[{id:"base",content:"Base"},{id:"bold",content:"Bold"}],...l})}),e(t,{label:"Kerning",children:e(r,{options:[{id:"base",content:"Base"},{id:"loose",content:"Loose"}],...c})}),e(t,{label:"Decoration",children:e(r,{options:[{id:"none",content:"None"},{id:"underline",content:"Underline"}],...u})})]}),St=b(function(){const o=[y("typographyStyle1"),y("typographyStyle2"),y("typographyStyle3"),y("typographyStyle4"),y("typographyStyle5"),y("typographyStyle6"),y("typographyStyle7"),y("typographyStyle8"),y("typographyStyle9")].map(({size:l,letterCase:c,fonts:u,weight:d,kerning:a,decoration:s},g)=>e(h,{children:[e(p,{children:["Style ",g+1]}),e(Ct,{size:l,letterCase:c,fonts:u,weight:d,kerning:a,decoration:s})]},`style${g+1}`));return e(h,{children:[e(p,{children:"Typography styles (deprecated)"}),o]})});function vt({position:i="end",children:n,navigation:o,shell:l}){return typeof Proxy>"u"?null:e(je,{navigation:o,shell:l,children:e(ct,{children:e(kn,{position:i,children:[e(I,{children:[e(Pn,{status:"complete",children:"Available in Branding API"}),e(xe,{children:["Note that changes in the Assistant will map directly to the component/property they refer to. This differs from the Checkout Editor and GraphQL API changes where some values go through different mapping before being set in our Theme and reflected in the UI. See ",e("code",{children:"app/foundation/Theme"})," and"," ",e("code",{children:"app/foundation/EditorBridge"})," for more details."]})]}),e(I,{title:"Design system tokens",children:[e(Hn,{}),e(Jn,{}),e(Gn,{}),e(it,{})]}),e(I,{title:"Global customizations",children:[e(Kn,{}),e(Yn,{}),e(St,{})]}),e(I,{title:"Titles and text",children:e(qn,{})}),e(I,{title:"Form controls",children:[e($n,{}),e(Wn,{}),e(Qn,{}),e(gt,{}),e(at,{}),e(mt,{}),e(Un,{}),e(rt,{}),e(lt,{}),e(ft,{})]}),e(I,{title:"Actions",children:[e(dt,{}),e(pt,{})]}),e(I,{title:"Navigation",children:e(Zn,{})}),e(I,{title:"Overlays",children:[e(st,{}),e(ot,{})]}),e(I,{title:"Feedback",children:e(Mn,{})}),e(I,{title:"Summaries",children:[e(ht,{}),e(ut,{})]}),e(I,{title:"Merchandise lines",children:[e(Xn,{}),e(bt,{}),e(yt,{}),e(et,{})]}),e(I,{title:"Money lines",children:[e(nt,{}),e(tt,{})]}),n]})})})}function k(i){return Oe(ve(),i)}const Bt=b(function(){const{alignment:n,position:o,visibility:l}=k("buyerJourney");return e(h,{status:"partial",children:[e(p,{children:"Buyer journey"}),e(t,{label:"Alignment",children:e(r,{options:[{id:"start",content:"Start"},{id:"center",content:"Center"},{id:"end",content:"End"}],...n})}),e(t,{label:"Position",children:e(r,{options:[{id:"header",content:"Header"},{id:"inline",content:"Inline with content"}],...o})}),e(t,{label:"Visibility",status:"complete",children:e(r,{options:[{id:"visible",content:"Visible"},{id:"hidden",content:"Hidden"}],...l})})]})}),kt=b(function(){const{background:n,colorScheme:o}=k("canvas");return e(h,{children:[e(p,{children:"Canvas"}),e(t,{label:"Background",children:e(r,{options:Nn,...n})}),e(t,{label:"Color Scheme",children:e(r,{options:X,...o})})]})}),It=b(function(){const{visibility:n}=k("cartLink");return e(h,{status:"complete",children:[e(p,{children:"Cart Link"}),e(t,{label:"Visibility",children:e(r,{options:[{id:"visible",content:"Visible"},{id:"hidden",content:"Hidden"}],...n})})]})}),Le=b(function({heading:n,containerStyle:o,status:l}){return e(Re,{condition:!!n,status:l,children:[n&&e(p,{children:n}),e(t,{label:"Color Scheme",status:B(l,"colorScheme"),children:e(r,{options:Z,...o.colorScheme})}),e(t,{label:"Background",status:B(l,"background"),children:e(r,{options:ue,...o.background})}),e(t,{label:"Corner radius",status:B(l,"cornerRadius"),children:e(r,{options:N,...o.cornerRadius})}),e(t,{label:"Border",status:B(l,"border"),children:e(r,{options:V,...o.border})}),e(t,{label:"Border style",status:B(l,"borderStyle"),children:e(r,{options:Y,...o.borderStyle})}),e(t,{label:"Border width",status:B(l,"borderWidth"),children:e(r,{options:ne,...o.borderWidth})}),e(t,{label:"Shadow",status:B(l,"shadow"),children:e(r,{options:Fn,...o.shadow})}),e(t,{label:"Padding",status:B(l,"padding"),children:e(r,{options:S,value:Array.isArray(o.padding.value)?void 0:o.padding.value,onChange:c=>o.padding.onChange(c)})})]})}),Ne=b(function({containerStyle:n,status:o}){return e(M,{children:[e(t,{label:"Color Scheme",status:B(o,"colorScheme"),children:e(r,{options:Z,...n.colorScheme})}),e(t,{label:"Background",status:B(o,"background"),children:e(r,{options:ue,...n.background})}),e(t,{label:"Padding",status:B(o,"padding"),children:e(r,{options:S,value:Array.isArray(n.padding.value)?void 0:n.padding.value,onChange:l=>n.padding.onChange(l)})}),e(t,{label:"Divided",status:B(o,"divided"),children:e(x,{...n.divided})})]})}),Ee=b(function({heading:n,containerStyle:o,dividerStyle:l,status:c}){return e(Re,{condition:!!n,children:[e(t,{label:"Color Scheme",status:B(c,"colorScheme"),children:e(r,{options:Z,...o.colorScheme})}),e(t,{label:"Background",status:B(c,"background"),children:e(r,{options:ue,...o.background})}),e(t,{label:"Padding",status:B(c,"padding"),children:e(r,{options:S,value:Array.isArray(o.padding.value)?void 0:o.padding.value,onChange:u=>o.padding.onChange(u)})}),e(t,{label:"Spacing",status:B(c,"spacing"),children:e(r,{options:S,...o.spacing})}),e(h,{status:B(c,"divider"),children:[e(p,{children:"Divider"}),e(t,{label:"Border Style",status:B(c,"divider"),children:e(r,{options:Y,...l.borderStyle})}),e(t,{label:"Border Width",status:B(c,"divider"),children:e(r,{options:ne,...l.borderWidth})}),e(t,{label:"Visibility",status:B(c,"divider"),children:e(r,{options:we,...l.visibility})})]})]})});function Re({condition:i,children:n,status:o,...l}){return i?e(h,{status:o==="complete"?o:void 0,...l,children:n}):e(M,{children:n})}function B(i,n){return i&&typeof i!="string"?i[n]:i}const Pt={colorScheme:"complete",background:"complete",padding:"complete",divided:"complete"},Tt=b(function(){const n=k("footer"),{position:o,alignment:l}=n,{visibility:c}=k("footer.content");return e(h,{status:"complete",children:[e(p,{children:"Footer"}),e(Ne,{containerStyle:n,status:Pt}),e(t,{label:"Position",status:"complete",children:e(r,{options:[{id:"inline",content:"Inline with content"},{id:"end",content:"End"}],...o})}),e(t,{label:"Alignment",status:"complete",children:e(r,{options:[{id:"start",content:"Start"},{id:"center",content:"Center"},{id:"end",content:"End"}],...l})}),e(h,{status:"complete",children:[e(p,{children:"Content"}),e(t,{label:"Visibility",children:e(r,{options:[{id:"visible",content:"Visible"},{id:"hidden",content:"Hidden"}],...c})})]})]})}),xt={colorScheme:"complete",background:"complete",padding:"complete",divided:"complete"},wt=b(function(){const{alignment:n,position:o}=k("header"),{image:l}=k("header.banner"),{image:c,link:u,maxWidth:d,visibility:a}=k("header.logo"),{contentType:s,image:g}=k("header.cartLink"),f=k("header");return e(h,{status:"complete",children:[e(p,{children:"Header"}),e(Ne,{containerStyle:f,status:xt}),e(t,{label:"Alignment",status:"complete",children:e(r,{options:[{id:"start",content:"Start"},{id:"center",content:"Center"},{id:"end",content:"End"}],...n})}),e(t,{label:"Position",status:"complete",children:e(r,{options:[{id:"inline",content:"Inline with content"},{id:"inlineSecondary",content:"Inline with summary"},{id:"start",content:"Start"}],...o})}),e(h,{status:"complete",children:[e(p,{children:"Banner"}),e(t,{label:"Image",children:e(R,{...l})})]}),e(h,{status:"complete",children:[e(p,{children:"Logo"}),e(t,{label:"Image",status:"complete",children:e(R,{...c})}),e(t,{label:"Max width",status:"complete",children:e(T,{...d,type:"number"})}),e(t,{label:"Link",children:e(T,{...u})}),e(t,{label:"Visibility",status:"complete",children:e(r,{options:[{id:"visible",content:"Visible"},{id:"hidden",content:"Hidden"}],...a})})]}),e(h,{children:[e(p,{children:"Cart Link"}),e(t,{label:"Content type",status:"complete",children:e(r,{options:[{id:"icon",content:"Icon"},{id:"image",content:"Image"},{id:"text",content:"Text"}],...s})}),s.value==="image"&&e(t,{label:"Image",status:"complete",children:e(R,{value:g.value?.src,onChange:v=>g.onChange({...g.value,src:String(v)})})})]})]})}),Ot={colorScheme:"complete",divider:"complete"},zt=b(function(){const n=k("main"),{backgroundImage:o}=n,l=k("main.section"),c=k("main.divider");return e(h,{status:"partial",children:[e(p,{children:"Main"}),e(t,{label:"Background Image",status:"complete",children:e(R,{...o})}),e(Ee,{containerStyle:n,dividerStyle:c,status:Ot}),e(Le,{heading:"Sections",containerStyle:l,status:"complete"})]})}),Lt={colorScheme:"complete",divider:"complete"},Nt=b(function(){const n=k("orderSummary"),{backgroundImage:o}=n,l=k("orderSummary.section"),c=k("orderSummary.divider");return e(h,{status:"partial",children:[e(p,{children:"Order summary"}),e(t,{label:"Background Image",status:"complete",children:e(R,{...o})}),e(Ee,{containerStyle:n,dividerStyle:c,status:Lt}),e(Le,{heading:"Sections",containerStyle:l,status:"complete"})]})}),Et=b(function(){const{backgroundImage:n,colorScheme:o}=k("shell");return e(h,{children:[e(p,{children:"Shell"}),e(t,{label:"Color Scheme",children:e(r,{options:Z,...o})}),e(t,{label:"Background Image",children:e(R,{...n})})]})}),Rt=b(function(){const n=k("content.divider");return e(h,{status:"complete",children:[e(p,{children:"Content"}),e(h,{status:"complete",children:[e(p,{children:"Divider"}),e(t,{label:"Border Style",status:"complete",children:e(r,{options:Y,...n.borderStyle})}),e(t,{label:"Border Width",status:"complete",children:e(r,{options:ne,...n.borderWidth})}),e(t,{label:"Visibility",status:"complete",children:e(r,{options:we,...n.visibility})})]})]})}),Ae=q(void 0);function he(){return w(Ae)}const At=b(function(){const n=le(),o=Me(),{isBannerVisible:l,setIsBannerVisible:c,isDebugViolationsBannerVisible:u,setIsDebugViolationsBannerVisible:d}=he()??{};return e(h,{children:[e(p,{children:"Debugging"}),e(t,{label:"Violations Debugger Dialog",children:e(x,{value:u,onChange:a=>{d?.(a)}})}),e(t,{label:"Dev Mode Banner",children:e(x,{value:l,onChange:a=>{c?.(a)}})}),e(t,{label:"Order Edit",children:e(x,{value:n.pathname.includes("payment"),onChange:a=>{const s=new URL(n.href);a?s.pathname="/checkouts/o/":s.pathname="/",window.location.assign(s.href)}})}),e(t,{label:"Force wallets",children:e(x,{value:n.searchParams.has("ensure_wallet"),onChange:a=>{const s=new URL(n.href);a?s.searchParams.set("ensure_wallet","1"):s.searchParams.delete("ensure_wallet"),window.location.assign(s.href)}})}),e(t,{label:"Manual Payments",children:e(x,{value:n.searchParams.has("manual-payments"),onChange:a=>{const s=new URL(n.href);a?s.searchParams.set("manual-payments","1"):s.searchParams.delete("manual-payments"),window.location.assign(s.href)}})}),e(J,{children:e(ie,{onPress:()=>{try{localStorage.clear()}catch{}},children:"Clear localStorage"})}),e(J,{children:e(ie,{onPress:()=>{Ue(o),Be(oe.SourceToken)},children:"Clear cart cookie"})})]})}),_t=["DELIVERY1","DELIVERY2","INFORMATION1","INFORMATION2","INFORMATION3","ORDER_INDEX","ORDER_STATUS1","ORDER_STATUS2","ORDER_STATUS3","ORDER_SUMMARY1","ORDER_SUMMARY2","ORDER_SUMMARY3","ORDER_SUMMARY4","PAGE_TITLE","PAYMENT1","PAYMENT2","PAYMENT3","PAYMENT4","PROFILE1","PROFILE2","WALLETS1"],Dt=_t.map(i=>({id:i,content:i})),Ft=b(function(){const n=le(),o=n.searchParams.get("placement-reference")??Ve(oe.PlacementReference)??void 0;return e(h,{children:[e(p,{children:"Extension Placement Reference"}),e(t,{label:"Set Global Placement Reference",children:e(r,{options:Dt,onChange:u=>{const d=new URL(n.href);d.searchParams.set("placement-reference",u),window.location.assign(d.href)},placeholderContent:"Select...",value:o})}),e(J,{children:e(ie,{onPress:()=>{if(Be(oe.PlacementReference),n.searchParams.has("placement-reference")){const u=new URL(n.href);u.searchParams.delete("placement-reference"),window.location.assign(u.href)}else window.location.reload()},children:"Clear Placement Reference"})})]})}),Mt=b(function(){const n=le();return e(h,{children:[e(p,{children:"Nascar"}),e(t,{label:"Add more wallets",children:e(r,{options:[{id:"0",content:"0"},{id:"1",content:"1"},{id:"2",content:"2"},{id:"3",content:"3"},{id:"4",content:"4"},{id:"5",content:"5"},{id:"6",content:"6"},{id:"7",content:"7"},{id:"8",content:"8"},{id:"9",content:"9"}],value:n.searchParams.get("add_wallets")||"",onChange:o=>{const l=new URL(n.href);o&&o!=="0"?l.searchParams.set("add_wallets",o):l.searchParams.delete("add_wallets"),window.location.assign(l.href)}})}),e(t,{label:"Set rank and drawer experiment variant",children:e(r,{options:[{id:"none",content:"none"},{id:"control",content:"control"},{id:"drawer",content:"drawer"},{id:"drawer_with_shop_pay_emphasis",content:"drawer_with_shop_pay_emphasis"}],value:n.searchParams.get("nascar_rank_and_drawer")||"",onChange:o=>{const l=new URL(n.href);o&&o!=="none"?l.searchParams.set("nascar_rank_and_drawer",o):l.searchParams.delete("nascar_rank_and_drawer"),window.location.assign(l.href)}})})]})}),Ut=b(function(){const{cornerRadius:n}=k("expressCheckout.button");return e(h,{status:"complete",children:[e(p,{children:"Express Checkout button"}),e(t,{label:"Corner radius",status:"complete",children:e(r,{options:N,...n})})]})});function Vt(){const i=be("purchase.checkout.chat.render"),n=be("purchase.thank-you.chat.render"),o=i.length>0||n.length>0?"start":"end",l=He(),c=ve();return e(vt,{position:o,navigation:l,shell:c,children:[e(I,{title:"Express Checkout",children:e(Ut,{})}),e(I,{title:"Shell",children:[e(kt,{}),e(Et,{}),e(Rt,{}),e(wt,{}),e(Bt,{}),e(It,{}),e(zt,{}),e(Nt,{}),e(Tt,{})]}),e(I,{title:"Dev tools",children:[e(Ft,{}),e(At,{}),e(Mt,{})]})]})}function Ht(){const{setIsBannerVisible:i}=he()??{};return e("div",{style:{position:"fixed",top:0,left:"0",width:"100%",display:"grid",placeItems:"center",zIndex:2},children:e("div",{style:{padding:"5px 10px",display:"flex",gap:"1rem",background:"red",color:"white",zIndex:9999,fontSize:"10px",borderRadius:"0 0 6px 6px"},children:["You are in development mode",e("button",{onClick:()=>{i?.(!1)},type:"button",children:e(A,{type:"x",size:"small-200"})})]})})}const $t={position:"fixed",bottom:60,right:"1.25em",background:"black",color:"white",fontSize:"11px",zIndex:9999};function Gt(){const{value:i=[]}=$e(),n=Ge(!1),{setIsDebugViolationsBannerVisible:o}=he()??{};return e("div",{style:{...$t,borderRadius:n.value?"12px":"20px",minWidth:n.value?"200px":"initial"},children:[e(Ye,{inlineAlignment:"end",columns:["fill","auto"],children:[e(ge,{variant:"plain",inlineAlignment:"start",onClick:()=>n.value=!n.value,inlineSize:"fill",textDecoration:"none",children:e(ye,{blockAlignment:"center",inlineAlignment:"start",padding:"tight",children:[e("h4",{style:{color:"white"},children:e("div",{style:{display:"flex",alignItems:"center"},children:["Violations"," ",e("div",{style:{color:"gray",fontSize:"10px",marginLeft:"0.75rem"},children:i.length})]})}),e(A,{size:"small-200",type:n.value?"chevron-up":"chevron-down",appearance:"subdued"})]})}),n.value&&e(ge,{variant:"plain",onClick:()=>o?.(!1),children:e(ye,{blockAlignment:"center",inlineAlignment:"start",padding:"base",children:e(A,{type:"x",size:"small-200"})})})]}),n.value&&e(M,{children:i.length>0?e("ul",{style:{textOverflow:"ellipsis",overflow:"scroll",textAlign:"left",maxHeight:"100px",padding:"1rem",paddingTop:0,wordBreak:"break-word",maxWidth:"300px"},children:i?.map(l=>e("li",{style:{whiteSpace:"nowrap"},children:e(te,{size:"extraSmall",children:[l.code," ","target"in l&&e(te,{size:"extraSmall",color:"subdued",children:l.target})]})},l.code))}):e(We,{padding:"tight",children:e(te,{size:"extraSmall",color:"subdued",children:"No violations"})})})]})}const Yt="devBannerVisible",Wt="debugViolationsBannerVisible";function Se(i){const[n,o]=L(()=>typeof window>"u"?!1:localStorage.getItem(i)!=="false");return $(()=>{localStorage.setItem(i,n.toString())},[n,i]),[n,o]}function Jt(){const[i,n]=Se(Yt),[o,l]=Se(Wt),c=G(()=>({isBannerVisible:i,setIsBannerVisible:n,isDebugViolationsBannerVisible:o,setIsDebugViolationsBannerVisible:l}),[i,n,o,l]);return e(Ae.Provider,{value:c,children:[e(Vt,{}),i&&e(Ht,{}),o&&e(Gt,{})]})}export{Jt as default};