%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/t/r/a/tradesc/www/relax/wp-content/plugins/woocommerce/assets/client/admin/chunks/
Upload File :
Create Path :
Current File : /home/t/r/a/tradesc/www/relax/wp-content/plugins/woocommerce/assets/client/admin/chunks/5546.js

/*! For license information please see 5546.js.LICENSE.txt */
(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[5546],{44731:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var i=n(55609),r=n(69307),s=n(74897),o=n(61250),l=n(65736),a=n(59538);function u({title:e,onClose:t}){return(0,o.jsx)(i.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,o.jsxs)(i.__experimentalHStack,{alignment:"center",children:[(0,o.jsx)(i.__experimentalHeading,{level:2,size:13,children:e}),(0,o.jsx)(i.__experimentalSpacer,{}),t&&(0,o.jsx)(i.Button,{className:"dataforms-layouts-panel__dropdown-header-action",label:(0,l.__)("Close"),icon:a.Z,onClick:t})]})})}function c({data:e,field:t,onChange:n}){const[s,a]=(0,r.useState)(null),c=(0,r.useMemo)((()=>({anchor:s,placement:"left-start",offset:36,shift:!0})),[s]);return(0,o.jsxs)(i.__experimentalHStack,{ref:a,className:"dataforms-layouts-panel__field",children:[(0,o.jsx)("div",{className:"dataforms-layouts-panel__field-label",children:t.label}),(0,o.jsx)("div",{children:(0,o.jsx)(i.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:n,onToggle:r})=>(0,o.jsx)(i.Button,{className:"dataforms-layouts-panel__field-control",size:"compact",variant:"tertiary","aria-expanded":n,"aria-label":(0,l.sprintf)((0,l.__)("Edit %s"),t.label),onClick:r,children:(0,o.jsx)(t.render,{item:e})}),renderContent:({onClose:i})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u,{title:t.label,onClose:i}),(0,o.jsx)(t.Edit,{data:e,field:t,onChange:n,hideLabelFromVision:!0},t.id)]})})})]})}const d=[{type:"regular",component:function({data:e,fields:t,form:n,onChange:l}){const a=(0,r.useMemo)((()=>{var e;return(0,s.U)((null!==(e=n.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,n.fields]);return(0,o.jsx)(i.__experimentalVStack,{spacing:4,children:a.map((t=>(0,o.jsx)(t.Edit,{data:e,field:t,onChange:l},t.id)))})}},{type:"panel",component:function({data:e,fields:t,form:n,onChange:l}){const a=(0,r.useMemo)((()=>{var e;return(0,s.U)((null!==(e=n.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,n.fields]);return(0,o.jsx)(i.__experimentalVStack,{spacing:2,children:a.map((t=>(0,o.jsx)(c,{data:e,field:t,onChange:l},t.id)))})}}];function f({form:e,...t}){var n;const i=(r=null!==(n=e.type)&&void 0!==n?n:"regular",d.find((e=>e.type===r)));var r;return i?(0,o.jsx)(i.component,{form:e,...t}):null}},23088:(e,t,n)=>{"use strict";n.d(t,{UF:()=>p,ZP:()=>y,qF:()=>g});var i=n(55609),r=n(65736),s=n(69307),o=n(9818),l=n(13697),a=n(81172),u=n(94666),c=n(61250);const{DropdownMenuV2:d,DropdownMenuGroupV2:f,DropdownMenuItemV2:m,DropdownMenuSeparatorV2:v}=(0,u.U)(i.privateApis);function p(e,t){return(0,s.useMemo)((()=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))),[e,t])}function g(e,t){return(0,s.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))))),[e,t])}function h({action:e,selectedItems:t,setActionWithModal:n,onMenuOpenChange:r}){const o=(0,s.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]),{RenderModal:l,hideModalHeader:a}=e,u=(0,s.useCallback)((()=>{n(void 0)}),[n]);if(!o.length)return null;const d="string"==typeof e.label?e.label:e.label(t);return(0,c.jsx)(i.Modal,{title:a?void 0:d,__experimentalHideHeader:!!a,onRequestClose:u,overlayClassName:"dataviews-bulk-actions__modal",children:(0,c.jsx)(l,{items:o,closeModal:u,onActionPerformed:()=>r(!1)})})}function x({action:e,selectedItems:t,setActionWithModal:n}){const i=(0,o.useRegistry)(),r=(0,s.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]),l="RenderModal"in e;return(0,c.jsx)(m,{hideOnClick:!l,onClick:async()=>{l?n(e):e.callback(r,{registry:i})},suffix:r.length,children:e.label},e.id)}function b({actions:e,selectedItems:t,setActionWithModal:n}){const i=(0,s.useMemo)((()=>e.filter((e=>t.some((t=>!e.isEligible||e.isEligible(t)))))),[e,t]);return i.length?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(f,{children:i.map((e=>(0,c.jsx)(x,{action:e,selectedItems:t,setActionWithModal:n},e.id)))}),(0,c.jsx)(v,{})]}):null}function w(){const{data:e,actions:t=[],selection:n,onChangeSelection:o,getItemId:a}=(0,s.useContext)(l.Z),u=(0,s.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),[v,p]=(0,s.useState)(!1),[g,x]=(0,s.useState)(),w=(0,s.useMemo)((()=>e.filter((e=>u.some((t=>!t.isEligible||t.isEligible(e)))))),[e,u]),y=w.length,S=(0,s.useMemo)((()=>e.filter((e=>n.includes(a(e))&&w.includes(e)))),[n,e,a,w]),_=S.length===y;return 0===u.length?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(d,{open:v,onOpenChange:p,label:(0,r.__)("Bulk actions"),style:{minWidth:"240px"},trigger:(0,c.jsx)(i.Button,{className:"dataviews-bulk-actions__edit-button",__next40pxDefaultSize:!0,variant:"tertiary",size:"compact",children:S.length?(0,r.sprintf)((0,r._n)("Edit %d item","Edit %d items",S.length),S.length):(0,r.__)("Bulk edit")}),children:[(0,c.jsx)(b,{actions:u,setActionWithModal:x,selectedItems:S}),(0,c.jsxs)(f,{children:[(0,c.jsx)(m,{disabled:_,hideOnClick:!1,onClick:()=>{o(w.map((e=>a(e))))},suffix:y,children:(0,r.__)("Select all")}),(0,c.jsx)(m,{disabled:0===n.length,hideOnClick:!1,onClick:()=>{o([])},children:(0,r.__)("Deselect")})]})]}),g&&(0,c.jsx)(h,{action:g,selectedItems:S,setActionWithModal:x,onMenuOpenChange:p})]})}function y(){const{data:e,actions:t=[],view:n}=(0,s.useContext)(l.Z),i=g(t,e);return[a.pj,a.po].includes(n.type)&&i?(0,c.jsx)(w,{}):null}},13697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(69307),r=n(81172);const s=(0,i.createContext)({view:{type:r.pj},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,density:0})},85665:(e,t,n)=>{"use strict";n.d(t,{Ww:()=>h,X_:()=>x,ZP:()=>w,ec:()=>b});var i=n(55609),r=n(65736),s=n(69307),o=n(71738),l=n(9818),a=n(94666),u=n(61250);const{DropdownMenuV2:c,DropdownMenuGroupV2:d,DropdownMenuItemV2:f,DropdownMenuItemLabelV2:m,kebabCase:v}=(0,a.U)(i.privateApis);function p({action:e,onClick:t,items:n}){const r="string"==typeof e.label?e.label:e.label(n);return(0,u.jsx)(i.Button,{label:r,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function g({action:e,onClick:t,items:n}){const i="string"==typeof e.label?e.label:e.label(n);return(0,u.jsx)(f,{onClick:t,hideOnClick:!("RenderModal"in e),children:(0,u.jsx)(m,{children:i})})}function h({action:e,items:t,closeModal:n}){const r="string"==typeof e.label?e.label:e.label(t);return(0,u.jsx)(i.Modal,{title:e.modalHeader||r,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:null!=n?n:()=>{},focusOnMount:"firstContentElement",size:"small",overlayClassName:`dataviews-action-modal dataviews-action-modal__${v(e.id)}`,children:(0,u.jsx)(e.RenderModal,{items:t,closeModal:n})})}function x({action:e,items:t,ActionTrigger:n,isBusy:i}){const[r,o]=(0,s.useState)(!1),l={action:e,onClick:()=>{o(!0)},items:t,isBusy:i};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n,{...l}),r&&(0,u.jsx)(h,{action:e,items:t,closeModal:()=>o(!1)})]})}function b({actions:e,item:t}){const n=(0,l.useRegistry)();return(0,u.jsx)(d,{children:e.map((e=>"RenderModal"in e?(0,u.jsx)(x,{action:e,items:[t],ActionTrigger:g},e.id):(0,u.jsx)(g,{action:e,onClick:()=>{e.callback([t],{registry:n})},items:[t]},e.id)))})}function w({item:e,actions:t,isCompact:n}){const r=(0,l.useRegistry)(),{primaryActions:o,eligibleActions:a}=(0,s.useMemo)((()=>{const n=t.filter((t=>!t.isEligible||t.isEligible(e)));return{primaryActions:n.filter((e=>e.isPrimary&&!!e.icon)),eligibleActions:n}}),[t,e]);return n?(0,u.jsx)(y,{item:e,actions:a}):(0,u.jsxs)(i.__experimentalHStack,{spacing:1,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:"0",width:"auto"},children:[!!o.length&&o.map((t=>"RenderModal"in t?(0,u.jsx)(x,{action:t,items:[e],ActionTrigger:p},t.id):(0,u.jsx)(p,{action:t,onClick:()=>{t.callback([e],{registry:r})},items:[e]},t.id))),(0,u.jsx)(y,{item:e,actions:a})]})}function y({item:e,actions:t}){return(0,u.jsx)(c,{trigger:(0,u.jsx)(i.Button,{size:"compact",icon:o.Z,label:(0,r.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"}),placement:"bottom-end",children:(0,u.jsx)(b,{actions:t,item:e})})}},8850:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Rn});var i=n(55609),r=n(69307),s=n(23088),o=n(65736),l=n(59538),a=n(94333),u=n(9818),c=n(13697),d=n(85665),f=n(81172),m=n(61250);const v={init:{bottom:-48},open:{bottom:24,transition:{bottom:{type:"tween",duration:.2,ease:[0,0,.2,1]}}},exit:{opacity:0,bottom:24,transition:{opacity:{type:"tween",duration:.2,ease:[0,0,.2,1]}}}};function p({action:e,onClick:t,isBusy:n,items:r}){const s="string"==typeof e.label?e.label:e.label(r);return(0,m.jsx)(i.ToolbarButton,{disabled:n,label:s,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t,isBusy:n,tooltipPosition:"top"})}const g=[];function h({action:e,selectedItems:t,actionInProgress:n,setActionInProgress:i}){const s=(0,u.useRegistry)(),o=(0,r.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]);return"RenderModal"in e?(0,m.jsx)(d.X_,{action:e,items:o,ActionTrigger:p},e.id):(0,m.jsx)(p,{action:e,onClick:()=>{i(e.id),e.callback(t,{registry:s})},items:o,isBusy:n===e.id},e.id)}function x(e,t,n,r,s,a){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(i.ToolbarGroup,{children:(0,m.jsx)("div",{className:"dataviews-bulk-actions-toolbar__selection-count",children:1===e.length?(0,o.__)("1 item selected"):(0,o.sprintf)((0,o._n)("%s item selected","%s items selected",e.length),e.length)})}),(0,m.jsx)(i.ToolbarGroup,{children:t.map((e=>(0,m.jsx)(h,{action:e,selectedItems:n,actionInProgress:r,setActionInProgress:s},e.id)))}),(0,m.jsx)(i.ToolbarGroup,{children:(0,m.jsx)(i.ToolbarButton,{icon:l.Z,showTooltip:!0,tooltipPosition:"top",label:(0,o.__)("Cancel"),disabled:!!r,onClick:()=>{a(g)}})})]})}function b({selection:e,actionsToShow:t,selectedItems:n,onChangeSelection:i}){const[s,o]=(0,r.useState)(null),l=(0,r.useRef)(null);return s?(l.current||(l.current=x(e,t,n,s,o,i)),l.current):(l.current&&(l.current=null),x(e,t,n,s,o,i))}function w(){const{data:e,selection:t,actions:n=g,onChangeSelection:s,getItemId:l}=(0,r.useContext)(c.Z),u=(0,a.useReducedMotion)(),d=(0,r.useMemo)((()=>e.filter((e=>t.includes(l(e))))),[t,e,l]),f=(0,r.useMemo)((()=>n.filter((e=>e.supportsBulk&&e.icon&&d.some((t=>!e.isEligible||e.isEligible(t)))))),[n,d]);return t&&0===t.length||0===f.length?null:(0,m.jsx)(i.__unstableAnimatePresence,{children:(0,m.jsx)(i.__unstableMotion.div,{layout:!u,initial:"init",animate:"open",exit:"exit",variants:u?void 0:v,className:"dataviews-bulk-actions-toolbar",children:(0,m.jsx)(i.Toolbar,{label:(0,o.__)("Bulk actions"),children:(0,m.jsx)("div",{className:"dataviews-bulk-actions-toolbar__wrapper",children:(0,m.jsx)(b,{selection:t,actionsToShow:f,selectedItems:d,onChangeSelection:s})})})})})}function y(){const{data:e,actions:t=[],view:n}=(0,r.useContext)(c.Z),i=(0,s.qF)(t,e);return[f.pj,f.po].includes(n.type)&&i?(0,m.jsx)(w,{}):null}var S=n(54617),_=n(7829),C=n(32804),j={id:null};function E(e,t){return t&&e.item(t)||null}var I=Symbol("FOCUS_SILENTLY");function k(e,t,n){if(!t)return!1;if(t===n)return!1;const i=e.item(t.id);return!(!i||n&&i.element===n)}var V=n(14920),N=n(48681),O=n(53082),M=n(99196);function A(e){const t=M.forwardRef(((t,n)=>e((0,O.EZ)((0,O.ih)({},t),{ref:n}))));return t.displayName=e.displayName||e.name,t}function F(e,t){return M.memo(e,t)}function P(e,t){const n=t,{wrapElement:i,render:r}=n,s=(0,O.S0)(n,["wrapElement","render"]),o=(0,V.qq)(t.ref,(0,N.Yx)(r));let l;if(M.isValidElement(r)){const e=(0,O.EZ)((0,O.ih)({},r.props),{ref:o});l=M.cloneElement(r,(0,N.dG)(s,e))}else l=r?r(s):(0,m.jsx)(e,(0,O.ih)({},s));return i?i(l):l}function L(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function D(e=[],t=[]){const n=M.createContext(void 0),i=M.createContext(void 0),r=()=>M.useContext(n),s=t=>e.reduceRight(((e,n)=>(0,m.jsx)(n,(0,O.EZ)((0,O.ih)({},t),{children:e}))),(0,m.jsx)(n.Provider,(0,O.ih)({},t)));return{context:n,scopedContext:i,useContext:r,useScopedContext:(e=!1)=>{const t=M.useContext(i),n=r();return e?t:t||n},useProviderContext:()=>{const e=M.useContext(i),t=r();if(!e||e!==t)return t},ContextProvider:s,ScopedContextProvider:e=>(0,m.jsx)(s,(0,O.EZ)((0,O.ih)({},e),{children:t.reduceRight(((t,n)=>(0,m.jsx)(n,(0,O.EZ)((0,O.ih)({},e),{children:t}))),(0,m.jsx)(i.Provider,(0,O.ih)({},e)))}))}}var T=D(),Z=T.useContext,R=(T.useScopedContext,T.useProviderContext,D([T.ContextProvider],[T.ScopedContextProvider])),K=R.useContext,B=(R.useScopedContext,R.useProviderContext),U=R.ContextProvider,z=R.ScopedContextProvider,H=(0,M.createContext)(void 0),q=(0,M.createContext)(void 0),X=n(84839),G=n(69322),W="";function $(){W=""}function Y(e,t){var n;const i=(null==(n=e.element)?void 0:n.textContent)||e.children||"value"in e&&e.value;return!!i&&(0,G.Ue)(i).trim().toLowerCase().startsWith(t.toLowerCase())}var J=L((function(e){var t=e,{store:n,typeahead:i=!0}=t,r=(0,O.S0)(t,["store","typeahead"]);const s=K();n=n||s,(0,G.kG)(n,!1);const o=r.onKeyDownCapture,l=(0,M.useRef)(0),a=(0,V.zX)((e=>{if(null==o||o(e),e.defaultPrevented)return;if(!i)return;if(!n)return;const{renderedItems:t,items:r,activeId:s}=n.getState();if(!function(e){const t=e.target;return(!t||!(0,C.eS)(t))&&(!(" "!==e.key||!W.length)||1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(e.key))}(e))return $();let a=function(e){return e.filter((e=>!e.disabled))}(t.length?t:r);if(!function(e,t){if((0,X.Ud)(e))return!0;const n=e.target;return!!n&&t.some((e=>e.element===n))}(e,a))return $();e.preventDefault(),window.clearTimeout(l.current),l.current=window.setTimeout((()=>{W=""}),500);const u=e.key.toLowerCase();W+=u,a=function(e,t,n){if(!n)return e;const i=e.find((e=>e.id===n));return i&&Y(i,t)?W!==t&&Y(i,W)?e:(W=t,function(e,t,n=!1){const i=e.findIndex((e=>e.id===t));return[...e.slice(i+1),...n?[j]:[],...e.slice(0,i)]}(e.filter((e=>Y(e,W))),n).filter((e=>e.id!==n))):e}(a,u,s);const c=a.find((e=>Y(e,W)));c?n.move(c.id):$()}));return r=(0,O.EZ)((0,O.ih)({},r),{onKeyDownCapture:a}),(0,G.Nq)(r)})),Q=A((function(e){return P("div",J(e))})),ee=n(36031);function te(e){return!!e.matches("input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])")&&!!(0,C.pn)(e)&&!e.closest("[inert]")}function ne(e){const t=(0,C.vY)(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function ie(e){const t=(0,C.vY)(e);if(!t)return!1;if((0,C.r3)(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&"id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`))}function re(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var se=Symbol("composite-hover"),oe=L((function(e){var t=e,{store:n,focusOnHover:i=!0,blurOnHoverEnd:r=!!i}=t,s=(0,O.S0)(t,["store","focusOnHover","blurOnHoverEnd"]);const o=K();n=n||o,(0,G.kG)(n,!1);const l=(0,V.m1)(),a=s.onMouseMove,u=(0,V.yl)(i),c=(0,V.zX)((e=>{if(null==a||a(e),!e.defaultPrevented&&l()&&u(e)){if(!ie(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!ne(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=s.onMouseLeave,f=(0,V.yl)(r),m=(0,V.zX)((e=>{var t;null==d||d(e),e.defaultPrevented||l()&&(function(e){const t=re(e);return!!t&&(0,C.r3)(e.currentTarget,t)}(e)||function(e){let t=re(e);if(!t)return!1;do{if((0,G.nr)(t,se)&&t[se])return!0;t=t.parentElement}while(t);return!1}(e)||u(e)&&f(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),v=(0,M.useCallback)((e=>{e&&(e[se]=!0)}),[]);return s=(0,O.EZ)((0,O.ih)({},s),{ref:(0,V.qq)(v,s.ref),onMouseMove:c,onMouseLeave:m}),(0,G.Nq)(s)})),le=F(A((function(e){return P("div",oe(e))}))),ae=((0,M.createContext)(null),(0,M.createContext)(null),D([U],[z])),ue=ae.useContext,ce=(ae.useScopedContext,ae.useProviderContext,ae.ContextProvider,ae.ScopedContextProvider,n(74124));function de(e,t,n){return e=function(e,t,n){return(0,V.rf)(t,[n.store]),(0,ce.XS)(e,n,"items","setItems"),e}(e,t,n),(0,ce.XS)(e,n,"activeId","setActiveId"),(0,ce.XS)(e,n,"includesBaseElement"),(0,ce.XS)(e,n,"virtualFocus"),(0,ce.XS)(e,n,"orientation"),(0,ce.XS)(e,n,"rtl"),(0,ce.XS)(e,n,"focusLoop"),(0,ce.XS)(e,n,"focusWrap"),(0,ce.XS)(e,n,"focusShift"),e}function fe(e,t,n){return function(e,t,n){return(0,V.rf)(t,[n.store,n.disclosure]),(0,ce.XS)(e,n,"open","setOpen"),(0,ce.XS)(e,n,"mounted","setMounted"),(0,ce.XS)(e,n,"animated"),Object.assign(e,{disclosure:n.disclosure})}(e,t,n)}var me=n(56760);function ve(e={}){var t;(0,me.Ny)(e,e.store);const n=null==(t=e.store)?void 0:t.getState(),i=(0,G.LS)(e.items,null==n?void 0:n.items,e.defaultItems,[]),r=new Map(i.map((e=>[e.id,e]))),s={items:i,renderedItems:(0,G.LS)(null==n?void 0:n.renderedItems,[])},o=null==(l=e.store)?void 0:l.__unstablePrivateStore;var l;const a=(0,me.MT)({items:i,renderedItems:s.renderedItems},o),u=(0,me.MT)(s,e.store),c=e=>{const t=function(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[i,r])=>{const s=t.element,o=r.element;return s===o?0:s&&o?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(s,o)?(e>i&&(n=!0),-1):(e<i&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}(e);a.setState("renderedItems",t),u.setState("renderedItems",t)};(0,me.cY)(u,(()=>(0,me.S1)(a))),(0,me.cY)(a,(()=>(0,me.dC)(a,["items"],(e=>{u.setState("items",e.items)})))),(0,me.cY)(a,(()=>(0,me.dC)(a,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=u.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const i=function(e){var t;const n=e.find((e=>!!e.element)),i=[...e].reverse().find((e=>!!e.element));let r=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;r&&(null==i?void 0:i.element);){if(i&&r.contains(i.element))return r;r=r.parentElement}return(0,C.Me)(r).body}(e.renderedItems),r=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:i});for(const t of e.renderedItems)t.element&&r.observe(t.element);return()=>{cancelAnimationFrame(n),r.disconnect()}}))));const d=(e,t,n=!1)=>{let i;return t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),s=t.slice();if(-1!==n){i=t[n];const o=(0,ee.ih)((0,ee.ih)({},i),e);s[n]=o,r.set(e.id,o)}else s.push(e),r.set(e.id,e);return s})),()=>{t((t=>{if(!i)return n&&r.delete(e.id),t.filter((({id:t})=>t!==e.id));const s=t.findIndex((({id:t})=>t===e.id));if(-1===s)return t;const o=t.slice();return o[s]=i,r.set(e.id,i),o}))}},f=e=>d(e,(e=>a.setState("items",e)),!0);return(0,ee.EZ)((0,ee.ih)({},u),{registerItem:f,renderItem:e=>(0,G.tS)(f(e),d(e,(e=>a.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=r.get(e);if(!t){const{items:n}=u.getState();t=n.find((t=>t.id===e)),t&&r.set(e,t)}return t||null},__unstablePrivateStore:a})}function pe(e){const t=[];for(const n of e)t.push(...n);return t}function ge(e){return e.slice().reverse()}var he={id:null};function xe(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function be(e,t){return e.filter((e=>e.rowId===t))}function we(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function ye(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function Se(e,t,n){const i=ye(e);for(const r of e)for(let e=0;e<i;e+=1){const i=r[e];if(!i||n&&i.disabled){const i=0===e&&n?xe(r):r[e-1];r[e]=i&&t!==i.id&&n?i:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==i?void 0:i.rowId}}}return e}function _e(e){const t=we(e),n=ye(t),i=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&i.push((0,ee.EZ)((0,ee.ih)({},t),{rowId:t.rowId?`${e}`:void 0}))}return i}var Ce=n(47962),je=(0,Ce.G6)()&&(0,Ce.b1)();function Ee(e={}){var t=e,{tag:n}=t,i=(0,ee.S0)(t,["tag"]);const r=(0,me.yt)(i.store,(0,me.ei)(n,["value","rtl"]));(0,me.Ny)(i,r);const s=null==n?void 0:n.getState(),o=null==r?void 0:r.getState(),l=(0,G.LS)(i.activeId,null==o?void 0:o.activeId,i.defaultActiveId,null),a=function(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),i=ve(e),r=(0,G.LS)(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),s=(0,ee.EZ)((0,ee.ih)({},i.getState()),{activeId:r,baseElement:(0,G.LS)(null==n?void 0:n.baseElement,null),includesBaseElement:(0,G.LS)(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===r),moves:(0,G.LS)(null==n?void 0:n.moves,0),orientation:(0,G.LS)(e.orientation,null==n?void 0:n.orientation,"both"),rtl:(0,G.LS)(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:(0,G.LS)(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:(0,G.LS)(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:(0,G.LS)(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:(0,G.LS)(e.focusShift,null==n?void 0:n.focusShift,!1)}),o=(0,me.MT)(s,i,e.store);(0,me.cY)(o,(()=>(0,me.Z_)(o,["renderedItems","activeId"],(e=>{o.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=xe(e.renderedItems))?void 0:n.id}))}))));const l=(e,t,n,i)=>{var r,s;const{activeId:l,rtl:a,focusLoop:u,focusWrap:c,includesBaseElement:d}=o.getState(),f=a&&"vertical"!==t?ge(e):e;if(null==l)return null==(r=xe(f))?void 0:r.id;const m=f.find((e=>e.id===l));if(!m)return null==(s=xe(f))?void 0:s.id;const v=!!m.rowId,p=f.indexOf(m),g=f.slice(p+1),h=be(g,m.rowId);if(void 0!==i){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(h,l),t=e.slice(i)[0]||e[e.length-1];return null==t?void 0:t.id}const x=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(v?t||"horizontal":t),b=u&&u!==x,w=v&&c&&c!==x;if(n=n||!v&&b&&d,b){const e=function(e,t,n=!1){const i=e.findIndex((e=>e.id===t));return[...e.slice(i+1),...n?[he]:[],...e.slice(0,i)]}(w&&!n?f:be(f,m.rowId),l,n),t=xe(e,l);return null==t?void 0:t.id}if(w){const e=xe(n?h:g,l);return n?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const y=xe(h,l);return!y&&n?null:null==y?void 0:y.id};return(0,ee.EZ)((0,ee.ih)((0,ee.ih)({},i),o),{setBaseElement:e=>o.setState("baseElement",e),setActiveId:e=>o.setState("activeId",e),move:e=>{void 0!==e&&(o.setState("activeId",e),o.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=xe(o.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=xe(ge(o.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:n}=o.getState();return l(t,n,!1,e)},previous:e=>{var t;const{renderedItems:n,orientation:i,includesBaseElement:r}=o.getState(),s=!(null==(t=xe(n))?void 0:t.rowId)&&r;return l(ge(n),i,s,e)},down:e=>{const{activeId:t,renderedItems:n,focusShift:i,focusLoop:r,includesBaseElement:s}=o.getState(),a=i&&!e,u=_e(pe(Se(we(n),t,a)));return l(u,"vertical",r&&"horizontal"!==r&&s,e)},up:e=>{const{activeId:t,renderedItems:n,focusShift:i,includesBaseElement:r}=o.getState(),s=i&&!e,a=_e(ge(pe(Se(we(n),t,s))));return l(a,"vertical",r,e)}})}((0,ee.EZ)((0,ee.ih)({},i),{activeId:l,includesBaseElement:(0,G.LS)(i.includesBaseElement,null==o?void 0:o.includesBaseElement,!0),orientation:(0,G.LS)(i.orientation,null==o?void 0:o.orientation,"vertical"),focusLoop:(0,G.LS)(i.focusLoop,null==o?void 0:o.focusLoop,!0),focusWrap:(0,G.LS)(i.focusWrap,null==o?void 0:o.focusWrap,!0),virtualFocus:(0,G.LS)(i.virtualFocus,null==o?void 0:o.virtualFocus,!0)})),u=function(e={}){var t=e,{popover:n}=t,i=(0,ee.S0)(t,["popover"]);const r=(0,me.yt)(i.store,(0,me.CE)(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));(0,me.Ny)(i,r);const s=null==r?void 0:r.getState(),o=function(e={}){return function(e={}){const t=(0,me.yt)(e.store,(0,me.CE)(e.disclosure,["contentElement","disclosureElement"]));(0,me.Ny)(e,t);const n=null==t?void 0:t.getState(),i=(0,G.LS)(e.open,null==n?void 0:n.open,e.defaultOpen,!1),r=(0,G.LS)(e.animated,null==n?void 0:n.animated,!1),s={open:i,animated:r,animating:!!r&&i,mounted:i,contentElement:(0,G.LS)(null==n?void 0:n.contentElement,null),disclosureElement:(0,G.LS)(null==n?void 0:n.disclosureElement,null)},o=(0,me.MT)(s,t);return(0,me.cY)(o,(()=>(0,me.Z_)(o,["animated","animating"],(e=>{e.animated||o.setState("animating",!1)})))),(0,me.cY)(o,(()=>(0,me.Ld)(o,["open"],(()=>{o.getState().animated&&o.setState("animating",!0)})))),(0,me.cY)(o,(()=>(0,me.Z_)(o,["open","animating"],(e=>{o.setState("mounted",e.open||e.animating)})))),(0,ee.EZ)((0,ee.ih)({},o),{disclosure:e.disclosure,setOpen:e=>o.setState("open",e),show:()=>o.setState("open",!0),hide:()=>o.setState("open",!1),toggle:()=>o.setState("open",(e=>!e)),stopAnimation:()=>o.setState("animating",!1),setContentElement:e=>o.setState("contentElement",e),setDisclosureElement:e=>o.setState("disclosureElement",e)})}(e)}((0,ee.EZ)((0,ee.ih)({},i),{store:r})),l=(0,G.LS)(i.placement,null==s?void 0:s.placement,"bottom"),a=(0,ee.EZ)((0,ee.ih)({},o.getState()),{placement:l,currentPlacement:l,anchorElement:(0,G.LS)(null==s?void 0:s.anchorElement,null),popoverElement:(0,G.LS)(null==s?void 0:s.popoverElement,null),arrowElement:(0,G.LS)(null==s?void 0:s.arrowElement,null),rendered:Symbol("rendered")}),u=(0,me.MT)(a,o,r);return(0,ee.EZ)((0,ee.ih)((0,ee.ih)({},o),u),{setAnchorElement:e=>u.setState("anchorElement",e),setPopoverElement:e=>u.setState("popoverElement",e),setArrowElement:e=>u.setState("arrowElement",e),render:()=>u.setState("rendered",Symbol("rendered"))})}((0,ee.EZ)((0,ee.ih)({},i),{placement:(0,G.LS)(i.placement,null==o?void 0:o.placement,"bottom-start")})),c=(0,G.LS)(i.value,null==o?void 0:o.value,i.defaultValue,""),d=(0,G.LS)(i.selectedValue,null==o?void 0:o.selectedValue,null==s?void 0:s.values,i.defaultSelectedValue,""),f=Array.isArray(d),m=(0,ee.EZ)((0,ee.ih)((0,ee.ih)({},a.getState()),u.getState()),{value:c,selectedValue:d,resetValueOnSelect:(0,G.LS)(i.resetValueOnSelect,null==o?void 0:o.resetValueOnSelect,f),resetValueOnHide:(0,G.LS)(i.resetValueOnHide,null==o?void 0:o.resetValueOnHide,f&&!n),activeValue:null==o?void 0:o.activeValue}),v=(0,me.MT)(m,a,u,r);return je&&(0,me.cY)(v,(()=>(0,me.Z_)(v,["virtualFocus"],(()=>{v.setState("virtualFocus",!1)})))),(0,me.cY)(v,(()=>{if(n)return(0,G.tS)((0,me.Z_)(v,["selectedValue"],(e=>{Array.isArray(e.selectedValue)&&n.setValues(e.selectedValue)})),(0,me.Z_)(n,["values"],(e=>{v.setState("selectedValue",e.values)})))})),(0,me.cY)(v,(()=>(0,me.Z_)(v,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||v.setState("value",c))})))),(0,me.cY)(v,(()=>(0,me.dC)(v,["mounted"],(e=>{e.mounted||(v.setState("activeId",l),v.setState("moves",0))})))),(0,me.cY)(v,(()=>(0,me.Z_)(v,["moves","activeId"],((e,t)=>{e.moves===t.moves&&v.setState("activeValue",void 0)})))),(0,me.cY)(v,(()=>(0,me.dC)(v,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=v.getState(),i=a.item(n);v.setState("activeValue",null==i?void 0:i.value)})))),(0,ee.EZ)((0,ee.ih)((0,ee.ih)((0,ee.ih)({},u),a),v),{tag:n,setValue:e=>v.setState("value",e),resetValue:()=>v.setState("value",m.value),setSelectedValue:e=>v.setState("selectedValue",e)})}function Ie(e={}){const t=ue();e=(0,O.EZ)((0,O.ih)({},e),{tag:void 0!==e.tag?e.tag:t});const[n,i]=(0,ce.oR)(Ee,e);return function(e,t,n){return(0,V.rf)(t,[n.tag]),(0,ce.XS)(e,n,"value","setValue"),(0,ce.XS)(e,n,"selectedValue","setSelectedValue"),(0,ce.XS)(e,n,"resetValueOnHide"),(0,ce.XS)(e,n,"resetValueOnSelect"),Object.assign(de(function(e,t,n){return(0,V.rf)(t,[n.popover]),(0,ce.XS)(e,n,"placement"),fe(e,t,n)}(e,t,n),t,n),{tag:n.tag})}(n,i,e)}var ke=D(),Ve=(ke.useContext,ke.useScopedContext,ke.useProviderContext),Ne=D([ke.ContextProvider],[ke.ScopedContextProvider]),Oe=(Ne.useContext,Ne.useScopedContext,Ne.useProviderContext,Ne.ContextProvider),Me=Ne.ScopedContextProvider,Ae=((0,M.createContext)(void 0),(0,M.createContext)(void 0),D([Oe],[Me])),Fe=(Ae.useContext,Ae.useScopedContext,Ae.useProviderContext),Pe=Ae.ContextProvider,Le=Ae.ScopedContextProvider,De=(0,M.createContext)(void 0),Te=D([Pe,U],[Le,z]),Ze=Te.useContext,Re=Te.useScopedContext,Ke=Te.useProviderContext,Be=Te.ContextProvider,Ue=Te.ScopedContextProvider,ze=(0,M.createContext)(void 0),He=(0,M.createContext)(!1);function qe(e={}){const t=Ie(e);return(0,m.jsx)(Be,{value:t,children:e.children})}var Xe=L((function(e){var t=e,{store:n}=t,i=(0,O.S0)(t,["store"]);const r=Ke();n=n||r,(0,G.kG)(n,!1);const s=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return i=(0,O.ih)({htmlFor:s},i),(0,G.Nq)(i)})),Ge=F(A((function(e){return P("label",Xe(e))}))),We=L((function(e){var t=e,{store:n}=t,i=(0,O.S0)(t,["store"]);const r=Fe();return n=n||r,(0,O.EZ)((0,O.ih)({},i),{ref:(0,V.qq)(null==n?void 0:n.setAnchorElement,i.ref)})})),$e=(A((function(e){return P("div",We(e))})),(0,M.createContext)(!0)),Ye=(0,Ce.G6)(),Je=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function Qe(e){return!("input"!==e.tagName.toLowerCase()||!e.type||"radio"!==e.type&&"checkbox"!==e.type)}function et(e,t,n,i,r){return e?t?n&&!i?-1:void 0:n?r:r||0:r}function tt(e,t){return(0,V.zX)((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var nt=!0;function it(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(nt=!1))}function rt(e){e.metaKey||e.ctrlKey||e.altKey||(nt=!0)}var st=L((function(e){var t=e,{focusable:n=!0,accessibleWhenDisabled:i,autoFocus:r,onFocusVisible:s}=t,o=(0,O.S0)(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const l=(0,M.useRef)(null);(0,M.useEffect)((()=>{n&&((0,X.iN)("mousedown",it,!0),(0,X.iN)("keydown",rt,!0))}),[n]),Ye&&(0,M.useEffect)((()=>{if(!n)return;const e=l.current;if(!e)return;if(!Qe(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const i=()=>queueMicrotask((()=>e.focus()));for(const e of t)e.addEventListener("mouseup",i);return()=>{for(const e of t)e.removeEventListener("mouseup",i)}}),[n]);const a=n&&(0,G.EE)(o),u=!!a&&!i,[c,d]=(0,M.useState)(!1);(0,M.useEffect)((()=>{n&&u&&c&&d(!1)}),[n,u,c]),(0,M.useEffect)((()=>{if(!n)return;if(!c)return;const e=l.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{te(e)||d(!1)}));return t.observe(e),()=>t.disconnect()}),[n,c]);const f=tt(o.onKeyPressCapture,a),m=tt(o.onMouseDownCapture,a),v=tt(o.onClickCapture,a),p=o.onMouseDown,g=(0,V.zX)((e=>{if(null==p||p(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!Ye)return;if((0,X.Ke)(e))return;if(!(0,C.iK)(t)&&!Qe(t))return;let i=!1;const r=()=>{i=!0};t.addEventListener("focusin",r,{capture:!0,once:!0}),(0,X.qx)(t,"mouseup",(()=>{t.removeEventListener("focusin",r,!0),i||function(e){!ie(e)&&te(e)&&e.focus()}(t)}))})),h=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const i=e.currentTarget;i&&ne(i)&&(null==s||s(e),e.defaultPrevented||d(!0))},x=o.onKeyDownCapture,b=(0,V.zX)((e=>{if(null==x||x(e),e.defaultPrevented)return;if(!n)return;if(c)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!(0,X.Ud)(e))return;const t=e.currentTarget;(0,X.qx)(t,"focusout",(()=>h(e,t)))})),w=o.onFocusCapture,y=(0,V.zX)((e=>{if(null==w||w(e),e.defaultPrevented)return;if(!n)return;if(!(0,X.Ud)(e))return void d(!1);const t=e.currentTarget;nt||function(e){const{tagName:t,readOnly:n,type:i}=e;return"TEXTAREA"===t&&!n||"SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):Je.includes(i))}(e.target)?(0,X.qx)(e.target,"focusout",(()=>h(e,t))):d(!1)})),S=o.onBlur,_=(0,V.zX)((e=>{null==S||S(e),n&&(0,X.N)(e)&&d(!1)})),j=(0,M.useContext)($e),E=(0,V.zX)((e=>{n&&r&&e&&j&&queueMicrotask((()=>{ne(e)||te(e)&&e.focus()}))})),I=(0,V.O)(l),k=n&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(I),N=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(I),A=o.style,F=(0,M.useMemo)((()=>u?(0,O.ih)({pointerEvents:"none"},A):A),[u,A]);return o=(0,O.EZ)((0,O.ih)({"data-focus-visible":n&&c||void 0,"data-autofocus":r||void 0,"aria-disabled":a||void 0},o),{ref:(0,V.qq)(l,E,o.ref),style:F,tabIndex:et(n,u,k,N,o.tabIndex),disabled:!(!N||!u)||void 0,contentEditable:a?void 0:o.contentEditable,onKeyPressCapture:f,onClickCapture:v,onMouseDownCapture:m,onMouseDown:g,onKeyDownCapture:b,onFocusCapture:y,onBlur:_}),(0,G.Nq)(o)}));function ot(e,t,n){return(0,V.zX)((i=>{var r;if(null==t||t(i),i.defaultPrevented)return;if(i.isPropagationStopped())return;if(!(0,X.Ud)(i))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(i))return;if(function(e){const t=e.target;return!(t&&!(0,C.eS)(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(i))return;const s=e.getState(),o=null==(r=E(e,s.activeId))?void 0:r.element;if(!o)return;const l=i,{view:a}=l,u=(0,O.S0)(l,["view"]);o!==(null==n?void 0:n.current)&&o.focus(),(0,X.nm)(o,i.type,u)||i.preventDefault(),i.currentTarget.contains(o)&&i.stopPropagation()}))}A((function(e){return P("div",st(e))}));var lt=L((function(e){var t=e,{store:n,composite:i=!0,focusOnMove:r=i,moveOnKeyPress:s=!0}=t,o=(0,O.S0)(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=B();n=n||l,(0,G.kG)(n,!1);const a=(0,M.useRef)(null),u=(0,M.useRef)(null),c=function(e){const[t,n]=(0,M.useState)(!1),i=(0,M.useCallback)((()=>n(!0)),[]),r=e.useState((t=>E(e,t.activeId)));return(0,M.useEffect)((()=>{const e=null==r?void 0:r.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[r,t]),i}(n),d=n.useState("moves"),[,f]=(0,V.pl)(i?n.setBaseElement:null);(0,M.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!i)return;if(!r)return;const{activeId:t}=n.getState(),s=null==(e=E(n,t))?void 0:e.element;var o;s&&("scrollIntoView"in(o=s)?(o.focus({preventScroll:!0}),o.scrollIntoView((0,ee.ih)({block:"nearest",inline:"nearest"},undefined))):o.focus())}),[n,d,i,r]),(0,V.Gw)((()=>{if(!n)return;if(!d)return;if(!i)return;const{baseElement:e,activeId:t}=n.getState();if(null!==t)return;if(!e)return;const r=u.current;u.current=null,r&&(0,X.sE)(r,{relatedTarget:e}),ne(e)||e.focus()}),[n,d,i]);const v=n.useState("activeId"),p=n.useState("virtualFocus");(0,V.Gw)((()=>{var e;if(!n)return;if(!i)return;if(!p)return;const t=u.current;if(u.current=null,!t)return;const r=(null==(e=E(n,v))?void 0:e.element)||(0,C.vY)(t);r!==t&&(0,X.sE)(t,{relatedTarget:r})}),[n,v,p,i]);const g=ot(n,o.onKeyDownCapture,u),h=ot(n,o.onKeyUpCapture,u),x=o.onFocusCapture,b=(0,V.zX)((e=>{if(null==x||x(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const i=e.relatedTarget,r=function(e){const t=e[I];return delete e[I],t}(e.currentTarget);(0,X.Ud)(e)&&r&&(e.stopPropagation(),u.current=i)})),w=o.onFocus,y=(0,V.zX)((e=>{if(null==w||w(e),e.defaultPrevented)return;if(!i)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:r}=n.getState();r?(0,X.Ud)(e)&&!k(n,t)&&queueMicrotask(c):(0,X.Ud)(e)&&n.setActiveId(null)})),S=o.onBlurCapture,_=(0,V.zX)((e=>{var t;if(null==S||S(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:i,activeId:r}=n.getState();if(!i)return;const s=null==(t=E(n,r))?void 0:t.element,o=e.relatedTarget,l=k(n,o),a=u.current;u.current=null,(0,X.Ud)(e)&&l?(o===s?a&&a!==o&&(0,X.sE)(a,e):s?(0,X.sE)(s,e):a&&(0,X.sE)(a,e),e.stopPropagation()):!k(n,e.target)&&s&&(0,X.sE)(s,e)})),j=o.onKeyDown,N=(0,V.yl)(s),A=(0,V.zX)((e=>{var t;if(null==j||j(e),e.defaultPrevented)return;if(!n)return;if(!(0,X.Ud)(e))return;const{orientation:i,items:r,renderedItems:s,activeId:o}=n.getState(),l=E(n,o);if(null==(t=null==l?void 0:l.element)?void 0:t.isConnected)return;const a="horizontal"!==i,u="vertical"!==i,c=function(e){return e.some((e=>!!e.rowId))}(s);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&(0,C.eS)(e.currentTarget))return;const d={ArrowUp:(c||a)&&(()=>{if(c){const e=r&&function(e){return function(e,t){return e.find((e=>!e.disabled))}(pe(ge(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(r);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(c||u)&&n.first,ArrowDown:(c||a)&&n.first,ArrowLeft:(c||u)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},f=d[e.key];if(f){const t=f();if(void 0!==t){if(!N(e))return;e.preventDefault(),n.move(t)}}}));o=(0,V.OJ)(o,(e=>(0,m.jsx)(U,{value:n,children:e})),[n]);const F=n.useState((e=>{var t;if(n&&i&&e.virtualFocus)return null==(t=E(n,e.activeId))?void 0:t.id}));o=(0,O.EZ)((0,O.ih)({"aria-activedescendant":F},o),{ref:(0,V.qq)(a,f,o.ref),onKeyDownCapture:g,onKeyUpCapture:h,onFocusCapture:b,onFocus:y,onBlurCapture:_,onKeyDown:A});const P=n.useState((e=>i&&(e.virtualFocus||null===e.activeId)));return st((0,O.ih)({focusable:P},o))}));function at(e,t,n){if(!n)return!1;const i=e.find((e=>!e.disabled&&e.value));return(null==i?void 0:i.value)===t}function ut(e,t){return!!t&&null!=e&&(e=(0,G.Ue)(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase()))}A((function(e){return P("div",lt(e))}));var ct=L((function(e){var t=e,{store:n,focusable:i=!0,autoSelect:r=!1,getAutoSelectId:s,setValueOnChange:o,showMinLength:l=0,showOnChange:a,showOnMouseDown:u,showOnClick:c=u,showOnKeyDown:d,showOnKeyPress:f=d,blurActiveItemOnClick:m,setValueOnClick:v=!0,moveOnKeyPress:p=!0,autoComplete:g="list"}=t,h=(0,O.S0)(t,["store","focusable","autoSelect","getAutoSelectId","setValueOnChange","showMinLength","showOnChange","showOnMouseDown","showOnClick","showOnKeyDown","showOnKeyPress","blurActiveItemOnClick","setValueOnClick","moveOnKeyPress","autoComplete"]);const x=Ke();n=n||x,(0,G.kG)(n,!1);const b=(0,M.useRef)(null),[w,y]=(0,V.NW)(),S=(0,M.useRef)(!1),_=(0,M.useRef)(!1),j=n.useState((e=>e.virtualFocus&&r)),E="inline"===g||"both"===g,[I,k]=(0,M.useState)(E);(0,V.is)((()=>{E&&k(!0)}),[E]);const N=n.useState("value"),A=(0,M.useRef)();(0,M.useEffect)((()=>(0,me.Z_)(n,["selectedValue","activeId"],((e,t)=>{A.current=t.selectedValue}))),[]);const F=n.useState((e=>{var t;if(E&&I){if(e.activeValue&&Array.isArray(e.selectedValue)){if(e.selectedValue.includes(e.activeValue))return;if(null==(t=A.current)?void 0:t.includes(e.activeValue))return}return e.activeValue}})),P=n.useState("renderedItems"),L=n.useState("open"),D=n.useState("contentElement"),T=(0,M.useMemo)((()=>{if(!E)return N;if(!I)return N;if(at(P,F,j)){if(ut(N,F)){const e=(null==F?void 0:F.slice(N.length))||"";return N+e}return N}return F||N}),[E,I,P,F,j,N]);(0,M.useEffect)((()=>{const e=b.current;if(!e)return;const t=()=>k(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,M.useEffect)((()=>{if(!E)return;if(!I)return;if(!F)return;if(!at(P,F,j))return;if(!ut(N,F))return;let e=G.ZT;return queueMicrotask((()=>{const t=b.current;if(!t)return;const{start:n,end:i}=(0,C.Kg)(t),r=N.length,s=F.length;(0,C.AU)(t,r,s),e=()=>{if(!ne(t))return;const{start:e,end:o}=(0,C.Kg)(t);e===r&&o===s&&(0,C.AU)(t,n,i)}})),()=>e()}),[w,E,I,F,P,j,N]);const Z=(0,M.useRef)(null),R=(0,V.zX)(s),K=(0,M.useRef)(null);(0,M.useEffect)((()=>{if(!L)return;if(!D)return;const e=(0,C.wy)(D);if(!e)return;Z.current=e;const t=()=>{S.current=!1},i=()=>{if(!n)return;if(!S.current)return;const{activeId:e}=n.getState();null!==e&&e!==K.current&&(S.current=!1)},r={passive:!0,capture:!0};return e.addEventListener("wheel",t,r),e.addEventListener("touchmove",t,r),e.addEventListener("scroll",i,r),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("scroll",i,!0)}}),[L,D,n]),(0,V.Gw)((()=>{N&&(_.current||(S.current=!0))}),[N]),(0,V.Gw)((()=>{"always"!==j&&L||(S.current=L)}),[j,L]);const B=n.useState("resetValueOnSelect");(0,V.rf)((()=>{var e,t;const i=S.current;if(!n)return;if(!L)return;if(!(j&&i||B))return;const{baseElement:r,contentElement:s,activeId:o}=n.getState();if(!r||ne(r)){if(null==s?void 0:s.hasAttribute("data-placing")){const e=new MutationObserver(y);return e.observe(s,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(j&&i){const t=R(P),i=void 0!==t?t:null!=(e=function(e){const t=e.find((e=>{var t;return!e.disabled&&"tab"!==(null==(t=e.element)?void 0:t.getAttribute("role"))}));return null==t?void 0:t.id}(P))?e:n.first();K.current=i,n.move(null!=i?i:null)}else{const e=null==(t=n.item(o))?void 0:t.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,L,w,N,j,B,R,P]),(0,M.useEffect)((()=>{if(!E)return;const e=b.current;if(!e)return;const t=[e,D].filter((e=>!!e)),i=e=>{t.every((t=>(0,X.N)(e,t)))&&(null==n||n.setValue(T))};for(const e of t)e.addEventListener("focusout",i);return()=>{for(const e of t)e.removeEventListener("focusout",i)}}),[E,D,n,T]);const U=e=>e.currentTarget.value.length>=l,z=h.onChange,H=(0,V.yl)(null!=a?a:U),q=(0,V.yl)(null!=o?o:!n.tag),W=(0,V.zX)((e=>{if(null==z||z(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget,{value:i,selectionStart:r,selectionEnd:s}=t,o=e.nativeEvent;if(S.current=!0,function(e){return"input"===e.type}(o)&&(o.isComposing&&(S.current=!1,_.current=!0),E)){const e="insertText"===o.inputType||"insertCompositionText"===o.inputType,t=r===i.length;k(e&&t)}if(q(e)){const e=i===n.getState().value;n.setValue(i),queueMicrotask((()=>{(0,C.AU)(t,r,s)})),E&&j&&e&&y()}H(e)&&n.show(),j&&S.current||n.setActiveId(null)})),$=h.onCompositionEnd,Y=(0,V.zX)((e=>{S.current=!0,_.current=!1,null==$||$(e),e.defaultPrevented||j&&y()})),J=h.onMouseDown,Q=(0,V.yl)(null!=m?m:()=>!!(null==n?void 0:n.getState().includesBaseElement)),ee=(0,V.yl)(v),te=(0,V.yl)(null!=c?c:U),ie=(0,V.zX)((e=>{null==J||J(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(Q(e)&&n.setActiveId(null),ee(e)&&n.setValue(T),te(e)&&(0,X.qx)(e.currentTarget,"mouseup",n.show))})),re=h.onKeyDown,se=(0,V.yl)(null!=f?f:U),oe=(0,V.zX)((e=>{if(null==re||re(e),e.repeat||(S.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t,activeId:i}=n.getState();t||null===i&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||se(e)&&(e.preventDefault(),n.show()))})),le=h.onBlur,ae=(0,V.zX)((e=>{S.current=!1,null==le||le(e),e.defaultPrevented})),ue=(0,V.Me)(h.id),ce=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(g)?g:void 0,de=n.useState((e=>null===e.activeId));return h=(0,O.EZ)((0,O.ih)({id:ue,role:"combobox","aria-autocomplete":ce,"aria-haspopup":(0,C.SK)(D,"listbox"),"aria-expanded":L,"aria-controls":null==D?void 0:D.id,"data-active-item":de||void 0,value:T},h),{ref:(0,V.qq)(b,h.ref),onChange:W,onCompositionEnd:Y,onMouseDown:ie,onKeyDown:oe,onBlur:ae}),h=lt((0,O.EZ)((0,O.ih)({store:n,focusable:i},h),{moveOnKeyPress:e=>!(0,G.Bk)(p,e)&&(E&&k(!0),!0)})),h=We((0,O.ih)({store:n},h)),(0,O.ih)({autoComplete:"off"},h)})),dt=A((function(e){return P("input",ct(e))})),ft=n(91850);function mt(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function vt(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=t.endsWith("ms")?1:1e3,i=Number.parseFloat(t||"0s")*n;return i>e?i:e}),0)}function pt(e,t,n){return!(n||!1===t||e&&!t)}var gt=L((function(e){var t=e,{store:n,alwaysVisible:i}=t,r=(0,O.S0)(t,["store","alwaysVisible"]);const s=Ve();n=n||s,(0,G.kG)(n,!1);const o=(0,M.useRef)(null),l=(0,V.Me)(r.id),[a,u]=(0,M.useState)(null),c=n.useState("open"),d=n.useState("mounted"),f=n.useState("animated"),v=n.useState("contentElement"),p=(0,ce.Kw)(n.disclosure,"contentElement");(0,V.Gw)((()=>{o.current&&(null==n||n.setContentElement(o.current))}),[n]),(0,V.Gw)((()=>{let e;return null==n||n.setState("animated",(t=>(e=t,!0))),()=>{void 0!==e&&(null==n||n.setState("animated",e))}}),[n]),(0,V.Gw)((()=>{if(f){if(null==v?void 0:v.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{u(c?"enter":d?"leave":null)}));u(null)}}),[f,v,c,d]),(0,V.Gw)((()=>{if(!n)return;if(!f)return;const e=()=>null==n?void 0:n.setState("animating",!1),t=()=>(0,ft.flushSync)(e);if(!a||!v)return void e();if("leave"===a&&c)return;if("enter"===a&&!c)return;if("number"==typeof f)return mt(f,t);const{transitionDuration:i,animationDuration:r,transitionDelay:s,animationDelay:o}=getComputedStyle(v),{transitionDuration:l="0",animationDuration:u="0",transitionDelay:d="0",animationDelay:m="0"}=p?getComputedStyle(p):{},g=vt(s,o,d,m)+vt(i,r,l,u);return g?mt(Math.max(g-1e3/60,0),t):("enter"===a&&n.setState("animated",!1),void e())}),[n,f,v,p,c,a]),r=(0,V.OJ)(r,(e=>(0,m.jsx)(Me,{value:n,children:e})),[n]);const g=pt(d,r.hidden,i),h=r.style,x=(0,M.useMemo)((()=>g?(0,O.EZ)((0,O.ih)({},h),{display:"none"}):h),[g,h]);return r=(0,O.EZ)((0,O.ih)({id:l,"data-open":c||void 0,"data-enter":"enter"===a||void 0,"data-leave":"leave"===a||void 0,hidden:g},r),{ref:(0,V.qq)(l?n.setContentElement:null,o,r.ref),style:x}),(0,G.Nq)(r)})),ht=A((function(e){return P("div",gt(e))})),xt=(A((function(e){var t=e,{unmountOnHide:n}=t,i=(0,O.S0)(t,["unmountOnHide"]);const r=Ve(),s=i.store||r;return!1===(0,ce.Kw)(s,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,m.jsx)(ht,(0,O.ih)({},i))})),L((function(e){var t=e,{store:n,alwaysVisible:i}=t,r=(0,O.S0)(t,["store","alwaysVisible"]);const s=Re(!0),o=Ze(),l=!!(n=n||o)&&n===s;(0,G.kG)(n,!1);const a=(0,M.useRef)(null),u=(0,V.Me)(r.id),c=n.useState("mounted"),d=pt(c,r.hidden,i),f=d?(0,O.EZ)((0,O.ih)({},r.style),{display:"none"}):r.style,v=n.useState((e=>Array.isArray(e.selectedValue))),p=(0,V.vv)(a,"role",r.role),g=("listbox"===p||"tree"===p||"grid"===p)&&v||void 0,[h,x]=(0,M.useState)(!1),b=n.useState("contentElement");(0,V.Gw)((()=>{if(!c)return;const e=a.current;if(!e)return;if(b!==e)return;const t=()=>{x(!!e.querySelector("[role='listbox']"))},n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>n.disconnect()}),[c,b]),h||(r=(0,O.ih)({role:"listbox","aria-multiselectable":g},r)),r=(0,V.OJ)(r,(e=>(0,m.jsx)(Ue,{value:n,children:(0,m.jsx)(De.Provider,{value:p,children:e})})),[n,p]);const w=!u||s&&l?null:n.setContentElement;return r=(0,O.EZ)((0,O.ih)({id:u,hidden:d},r),{ref:(0,V.qq)(w,a,r.ref),style:f}),(0,G.Nq)(r)}))),bt=A((function(e){return P("div",xt(e))})),wt=L((function(e){var t=e,{store:n,shouldRegisterItem:i=!0,getItem:r=G.yR,element:s}=t,o=(0,O.S0)(t,["store","shouldRegisterItem","getItem","element"]);const l=Z();n=n||l;const a=(0,V.Me)(o.id),u=(0,M.useRef)(s);return(0,M.useEffect)((()=>{const e=u.current;if(!a)return;if(!e)return;if(!i)return;const t=r({id:a,element:e});return null==n?void 0:n.renderItem(t)}),[a,i,r,n]),o=(0,O.EZ)((0,O.ih)({},o),{ref:(0,V.qq)(u,o.ref)}),(0,G.Nq)(o)}));function yt(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?(0,C.iK)(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&((0,C.iK)(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}A((function(e){return P("div",wt(e))}));var St=Symbol("command"),_t=L((function(e){var t=e,{clickOnEnter:n=!0,clickOnSpace:i=!0}=t,r=(0,O.S0)(t,["clickOnEnter","clickOnSpace"]);const s=(0,M.useRef)(null),o=(0,V.O)(s),l=r.type,[a,u]=(0,M.useState)((()=>!!o&&(0,C.iK)({tagName:o,type:l})));(0,M.useEffect)((()=>{s.current&&u((0,C.iK)(s.current))}),[]);const[c,d]=(0,M.useState)(!1),f=(0,M.useRef)(!1),m=(0,G.EE)(r),[v,p]=(0,V.XJ)(r,St,!0),g=r.onKeyDown,h=(0,V.zX)((e=>{null==g||g(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(v)return;if(m)return;if(!(0,X.Ud)(e))return;if((0,C.eS)(t))return;if(t.isContentEditable)return;const r=n&&"Enter"===e.key,s=i&&" "===e.key,o="Enter"===e.key&&!n,l=" "===e.key&&!i;if(o||l)e.preventDefault();else if(r||s){const n=yt(e);if(r){if(!n){e.preventDefault();const n=e,{view:i}=n,r=(0,O.S0)(n,["view"]),s=()=>(0,X.lO)(t,r);(0,Ce.vU)()?(0,X.qx)(t,"keyup",s):queueMicrotask(s)}}else s&&(f.current=!0,n||(e.preventDefault(),d(!0)))}})),x=r.onKeyUp,b=(0,V.zX)((e=>{if(null==x||x(e),e.defaultPrevented)return;if(v)return;if(m)return;if(e.metaKey)return;const t=i&&" "===e.key;if(f.current&&t&&(f.current=!1,!yt(e))){e.preventDefault(),d(!1);const t=e.currentTarget,n=e,{view:i}=n,r=(0,O.S0)(n,["view"]);queueMicrotask((()=>(0,X.lO)(t,r)))}}));return r=(0,O.EZ)((0,O.ih)((0,O.ih)({"data-active":c||void 0,type:a?"button":void 0},p),r),{ref:(0,V.qq)(s,r.ref),onKeyDown:h,onKeyUp:b}),st(r)}));function Ct(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function jt(e,t,n,i=!1){var r;if(!t)return;if(!n)return;const{renderedItems:s}=t.getState(),o=(0,C.wy)(e);if(!o)return;const l=function(e,t=!1){const n=e.clientHeight,{top:i}=e.getBoundingClientRect(),r=1.5*Math.max(.875*n,n-40),s=t?n-r+i:r+i;return"HTML"===e.tagName?s+e.scrollTop:s}(o,i);let a,u;for(let e=0;e<s.length;e+=1){const s=a;if(a=n(e),!a)break;if(a===s)continue;const o=null==(r=E(t,a))?void 0:r.element;if(!o)continue;const c=Ct(o,i)-l,d=Math.abs(c);if(i&&c<=0||!i&&c>=0){void 0!==u&&u<d&&(a=s);break}u=d}return a}A((function(e){return P("button",_t(e))}));var Et=L((function(e){var t=e,{store:n,rowId:i,preventScrollOnKeyDown:r=!1,moveOnKeyPress:s=!0,tabbable:o=!1,getItem:l,"aria-setsize":a,"aria-posinset":u}=t,c=(0,O.S0)(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const d=K();n=n||d;const f=(0,V.Me)(c.id),v=(0,M.useRef)(null),p=(0,M.useContext)(q),g=(0,ce.Kw)(n,(e=>i||(e&&(null==p?void 0:p.baseElement)&&p.baseElement===e.baseElement?p.id:void 0))),h=(0,G.EE)(c)&&!c.accessibleWhenDisabled,x=(0,M.useCallback)((e=>{const t=(0,O.EZ)((0,O.ih)({},e),{id:f||e.id,rowId:g,disabled:!!h});return l?l(t):t}),[f,g,h,l]),b=c.onFocus,w=(0,M.useRef)(!1),y=(0,V.zX)((e=>{if(null==b||b(e),e.defaultPrevented)return;if((0,X.Ke)(e))return;if(!f)return;if(!n)return;if(function(e,t){return!(0,X.Ud)(e)&&k(t,e.target)}(e,n))return;const{virtualFocus:t,baseElement:i}=n.getState();var r;(n.setActiveId(f),(0,C.S6)(e.currentTarget)&&function(e,t=!1){if((0,C.eS)(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){const n=(0,C.Me)(e).getSelection();null==n||n.selectAllChildren(e),t&&(null==n||n.collapseToEnd())}}(e.currentTarget),t)&&((0,X.Ud)(e)&&(r=e.currentTarget,(0,C.S6)(r)||"INPUT"===r.tagName&&!(0,C.iK)(r)||(null==i?void 0:i.isConnected)&&((0,Ce.G6)()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),w.current=!0,e.relatedTarget===i||k(n,e.relatedTarget)?function(e){e[I]=!0,e.focus({preventScroll:!0})}(i):i.focus())))})),S=c.onBlurCapture,_=(0,V.zX)((e=>{if(null==S||S(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&w.current&&(w.current=!1,e.preventDefault(),e.stopPropagation())})),j=c.onKeyDown,E=(0,V.yl)(r),N=(0,V.yl)(s),A=(0,V.zX)((e=>{if(null==j||j(e),e.defaultPrevented)return;if(!(0,X.Ud)(e))return;if(!n)return;const{currentTarget:t}=e,i=n.getState(),r=n.item(f),s=!!(null==r?void 0:r.rowId),o="horizontal"!==i.orientation,l="vertical"!==i.orientation,a=()=>!(!s&&!l&&i.baseElement&&(0,C.eS)(i.baseElement)),u={ArrowUp:(s||o)&&n.up,ArrowRight:(s||l)&&n.next,ArrowDown:(s||o)&&n.down,ArrowLeft:(s||l)&&n.previous,Home:()=>{if(a())return!s||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(a())return!s||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>jt(t,n,null==n?void 0:n.up,!0),PageDown:()=>jt(t,n,null==n?void 0:n.down)}[e.key];if(u){if((0,C.S6)(t)){const n=(0,C.Kg)(t),i=l&&"ArrowLeft"===e.key,r=l&&"ArrowRight"===e.key,s=o&&"ArrowUp"===e.key,a=o&&"ArrowDown"===e.key;if(r||a){const{length:e}=(0,C.$g)(t);if(n.end!==e)return}else if((i||s)&&0!==n.start)return}const i=u();if(E(e)||void 0!==i){if(!N(e))return;e.preventDefault(),n.move(i)}}})),F=(0,ce.Kw)(n,(e=>(null==e?void 0:e.baseElement)||void 0)),P=(0,M.useMemo)((()=>({id:f,baseElement:F})),[f,F]);c=(0,V.OJ)(c,(e=>(0,m.jsx)(H.Provider,{value:P,children:e})),[P]);const L=(0,ce.Kw)(n,(e=>!!e&&e.activeId===f)),D=(0,ce.Kw)(n,(e=>null!=a?a:e&&(null==p?void 0:p.ariaSetSize)&&p.baseElement===e.baseElement?p.ariaSetSize:void 0)),T=(0,ce.Kw)(n,(e=>{if(null!=u)return u;if(!e)return;if(!(null==p?void 0:p.ariaPosInSet))return;if(p.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===g));return p.ariaPosInSet+t.findIndex((e=>e.id===f))})),Z=(0,ce.Kw)(n,(e=>!(null==e?void 0:e.renderedItems.length)||!e.virtualFocus&&(!!o||e.activeId===f)));return c=(0,O.EZ)((0,O.ih)({id:f,"data-active-item":L||void 0},c),{ref:(0,V.qq)(v,c.ref),tabIndex:Z?c.tabIndex:-1,onFocus:y,onBlurCapture:_,onKeyDown:A}),c=_t(c),c=wt((0,O.EZ)((0,O.ih)({store:n},c),{getItem:x,shouldRegisterItem:!!f&&c.shouldRegisterItem})),(0,G.Nq)((0,O.EZ)((0,O.ih)({},c),{"aria-setsize":D,"aria-posinset":T}))}));function It(e){var t;return null!=(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])?t:"option"}F(A((function(e){return P("button",Et(e))})));var kt=L((function(e){var t,n=e,{store:i,value:r,hideOnClick:s,setValueOnClick:o,selectValueOnClick:l=!0,resetValueOnSelect:a,focusOnHover:u=!1,moveOnKeyPress:c=!0,getItem:d}=n,f=(0,O.S0)(n,["store","value","hideOnClick","setValueOnClick","selectValueOnClick","resetValueOnSelect","focusOnHover","moveOnKeyPress","getItem"]);const v=Re();i=i||v,(0,G.kG)(i,!1);const p=(0,M.useCallback)((e=>{const t=(0,O.EZ)((0,O.ih)({},e),{value:r});return d?d(t):t}),[r,d]),g=i.useState((e=>Array.isArray(e.selectedValue))),h=i.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,r))),x=i.useState("resetValueOnSelect");o=null!=o?o:!g,s=null!=s?s:null!=r&&!g;const b=f.onClick,w=(0,V.yl)(o),y=(0,V.yl)(l),S=(0,V.yl)(null!=(t=null!=a?a:x)?t:g),_=(0,V.yl)(s),j=(0,V.zX)((e=>{null==b||b(e),e.defaultPrevented||(0,X.XN)(e)||(0,X.wC)(e)||(null!=r&&(y(e)&&(S(e)&&(null==i||i.resetValue()),null==i||i.setSelectedValue((e=>Array.isArray(e)?e.includes(r)?e.filter((e=>e!==r)):[...e,r]:r))),w(e)&&(null==i||i.setValue(r))),_(e)&&(null==i||i.hide()))})),E=f.onKeyDown,I=(0,V.zX)((e=>{if(null==E||E(e),e.defaultPrevented)return;const t=null==i?void 0:i.getState().baseElement;t&&(ne(t)||(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),(0,C.eS)(t)&&(null==i||i.setValue(t.value))))}));g&&null!=h&&(f=(0,O.ih)({"aria-selected":h},f)),f=(0,V.OJ)(f,(e=>(0,m.jsx)(ze.Provider,{value:r,children:(0,m.jsx)(He.Provider,{value:null!=h&&h,children:e})})),[r,h]);const k=(0,M.useContext)(De);f=(0,O.EZ)((0,O.ih)({role:It(k),children:r},f),{onClick:j,onKeyDown:I});const N=(0,V.yl)(c);return f=Et((0,O.EZ)((0,O.ih)({store:i},f),{getItem:p,moveOnKeyPress:e=>{if(!N(e))return!1;const t=new Event("combobox-item-move"),n=null==i?void 0:i.getState().baseElement;return null==n||n.dispatchEvent(t),!0}})),oe((0,O.ih)({store:i,focusOnHover:u},f))})),Vt=F(A((function(e){return P("div",kt(e))})));function Nt(e){return(0,G.Ue)(e).toLowerCase()}var Ot=L((function(e){var t=e,{store:n,value:i,userValue:r}=t,s=(0,O.S0)(t,["store","value","userValue"]);const o=Re();n=n||o;const l=(0,M.useContext)(ze),a=null!=i?i:l,u=(0,ce.Kw)(n,(e=>null!=r?r:null==e?void 0:e.value)),c=(0,M.useMemo)((()=>{if(a)return u?function(e,t){if(!e)return e;if(!t)return e;const n=(i=t,Array.isArray(i)?i:void 0!==i?[i]:[]).filter(Boolean).map(Nt);var i;const r=[],s=(e,t=!1)=>(0,m.jsx)("span",{"data-autocomplete-value":t?"":void 0,"data-user-value":t?void 0:"",children:e},r.length),o=function(e){return e.sort((([e],[t])=>e-t))}(function(e){return e.filter((([e,t],n,i)=>!i.some((([i,r],s)=>s!==n&&i<=e&&i+r>=e+t))))}(function(e,t){const n=[];for(const i of t){let t=0;const r=i.length;for(;-1!==e.indexOf(i,t);){const s=e.indexOf(i,t);-1!==s&&n.push([s,r]),t=s+1}}return n}(Nt(e),new Set(n))));if(!o.length)return r.push(s(e,!0)),r;const[l]=o[0];return[e.slice(0,l),...o.flatMap((([t,n],i)=>{var r;const s=e.slice(t,t+n),l=null==(r=o[i+1])?void 0:r[0];return[s,e.slice(t+n,l)]}))].forEach(((e,t)=>{e&&r.push(s(e,t%2==0))})),r}(a,u):a}),[a,u]);return s=(0,O.ih)({children:c},s),(0,G.Nq)(s)})),Mt=A((function(e){return P("span",Ot(e))})),At=n(49210),Ft=n.n(At),Pt=n(90622),Lt=n(37918),Dt=n(70444),Tt=n(94666);const{CompositeV2:Zt,CompositeItemV2:Rt,useCompositeStoreV2:Kt}=(0,Tt.U)(i.privateApis),Bt=(0,m.jsx)(Dt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Dt.Circle,{cx:12,cy:12,r:3})});function Ut(e=""){return Ft()(e.trim().toLowerCase())}const zt=[],Ht=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:zt,qt=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter((e=>e!==n)):[...t.value,n]:[n];function Xt({view:e,filter:t,onChangeView:n}){const r=Kt({virtualFocus:!0,focusLoop:!0,defaultActiveId:1===t.operators?.length?void 0:null}),s=e.filters?.find((e=>e.field===t.field)),l=Ht(t,s);return(0,m.jsx)(Zt,{store:r,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,o.sprintf)((0,o.__)("List of: %1$s"),t.name),onFocusVisible:()=>{r.getState().activeId||r.move(r.first())},render:(0,m.jsx)(Q,{store:r}),children:t.elements.map((o=>(0,m.jsxs)(le,{store:r,render:(0,m.jsx)(Rt,{render:(0,m.jsx)("div",{"aria-label":o.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{var i,r;const l=s?[...(null!==(i=e.filters)&&void 0!==i?i:[]).map((e=>e.field===t.field?{...e,operator:s.operator||t.operators[0],value:qt(t,s,o.value)}:e))]:[...null!==(r=e.filters)&&void 0!==r?r:[],{field:t.field,operator:t.operators[0],value:qt(t,s,o.value)}];n({...e,page:1,filters:l})}}),children:[(0,m.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-check",children:[t.singleSelection&&l===o.value&&(0,m.jsx)(i.Icon,{icon:Bt}),!t.singleSelection&&l.includes(o.value)&&(0,m.jsx)(i.Icon,{icon:Pt.Z})]}),(0,m.jsx)("span",{children:o.label})]},o.value)))})}function Gt({view:e,filter:t,onChangeView:n}){const[s,l]=(0,r.useState)(""),a=(0,r.useDeferredValue)(s),u=e.filters?.find((e=>e.field===t.field)),c=Ht(t,u),d=(0,r.useMemo)((()=>{const e=Ut(a);return t.elements.filter((t=>Ut(t.label).includes(e)))}),[t.elements,a]);return(0,m.jsxs)(qe,{resetValueOnSelect:!1,selectedValue:c,setSelectedValue:i=>{var r,s;const o=u?[...(null!==(r=e.filters)&&void 0!==r?r:[]).map((e=>e.field===t.field?{...e,operator:u.operator||t.operators[0],value:i}:e))]:[...null!==(s=e.filters)&&void 0!==s?s:[],{field:t.field,operator:t.operators[0],value:i}];n({...e,page:1,filters:o})},setValue:l,children:[(0,m.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,m.jsx)(Ge,{render:(0,m.jsx)(i.VisuallyHidden,{children:(0,o.__)("Search items")}),children:(0,o.__)("Search items")}),(0,m.jsx)(dt,{autoSelect:"always",placeholder:(0,o.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,m.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,m.jsx)(i.Icon,{icon:Lt.Z})})]}),(0,m.jsxs)(bt,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[d.map((e=>(0,m.jsxs)(Vt,{value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[(0,m.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-check",children:[t.singleSelection&&c===e.value&&(0,m.jsx)(i.Icon,{icon:Bt}),!t.singleSelection&&c.includes(e.value)&&(0,m.jsx)(i.Icon,{icon:Pt.Z})]}),(0,m.jsxs)("span",{children:[(0,m.jsx)(Mt,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,m.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value))),!d.length&&(0,m.jsx)("p",{children:(0,o.__)("No results found")})]})]})}function Wt(e){const t=e.filter.elements.length>10?Gt:Xt;return(0,m.jsx)(t,{...e})}const $t="Enter",Yt=" ",Jt=({activeElements:e,filterInView:t,filter:n})=>{if(void 0===e||0===e.length)return n.name;const i={Name:(0,m.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,m.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};return t?.operator===f.dJ?(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("<Name>%1$s is any: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),i):t?.operator===f.vr?(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("<Name>%1$s is none: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),i):t?.operator===f.Bk?(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("<Name>%1$s is all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),i):t?.operator===f.yf?(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("<Name>%1$s is not all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),i):t?.operator===f.FR?(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),i):t?.operator===f.KR?(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),i):(0,o.sprintf)((0,o.__)("Unknown status for %1$s"),n.name)};function Qt({filter:e,view:t,onChangeView:n}){const r=e.operators?.map((e=>({value:e,label:f.fP[e]?.label}))),s=t.filters?.find((t=>t.field===e.field)),l=s?.operator||e.operators[0];return r.length>1&&(0,m.jsxs)(i.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filters__summary-operators-container",children:[(0,m.jsx)(i.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,m.jsx)(i.SelectControl,{label:(0,o.__)("Conditions"),value:l,options:r,onChange:i=>{var r,o;const l=i,a=s?[...(null!==(r=t.filters)&&void 0!==r?r:[]).map((t=>t.field===e.field?{...t,operator:l}:t))]:[...null!==(o=t.filters)&&void 0!==o?o:[],{field:e.field,operator:l,value:void 0}];n({...t,page:1,filters:a})},size:"small",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0})]})}function en({addFilterRef:e,openedFilter:t,...n}){const s=(0,r.useRef)(null),{filter:a,view:u,onChangeView:c}=n,d=u.filters?.find((e=>e.field===a.field)),f=a.elements.filter((e=>a.singleSelection?e.value===d?.value:d?.value?.includes(e.value))),v=a.isPrimary,p=void 0!==d?.value,g=!v||p;return(0,m.jsx)(i.Dropdown,{defaultOpen:t===a.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{s.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,m.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,m.jsx)(i.Tooltip,{text:(0,o.sprintf)((0,o.__)("Filter by: %1$s"),a.name.toLowerCase()),placement:"top",children:(0,m.jsx)("div",{className:(0,_.Z)("dataviews-filters__summary-chip",{"has-reset":g,"has-values":p}),role:"button",tabIndex:0,onClick:n,onKeyDown:e=>{[$t,Yt].includes(e.key)&&(n(),e.preventDefault())},"aria-pressed":t,"aria-expanded":t,ref:s,children:(0,m.jsx)(Jt,{activeElements:f,filterInView:d,filter:a})})}),g&&(0,m.jsx)(i.Tooltip,{text:v?(0,o.__)("Reset"):(0,o.__)("Remove"),placement:"top",children:(0,m.jsx)("button",{className:(0,_.Z)("dataviews-filters__summary-chip-remove",{"has-values":p}),onClick:()=>{c({...u,page:1,filters:u.filters?.filter((e=>e.field!==a.field))}),v?s.current?.focus():e.current?.focus()},children:(0,m.jsx)(i.Icon,{icon:l.Z})})})]}),renderContent:()=>(0,m.jsxs)(i.__experimentalVStack,{spacing:0,justify:"flex-start",children:[(0,m.jsx)(Qt,{...n}),(0,m.jsx)(Wt,{...n})]})})}const{DropdownMenuV2:tn,DropdownMenuItemV2:nn,DropdownMenuItemLabelV2:rn}=(0,Tt.U)(i.privateApis);function sn({filters:e,view:t,onChangeView:n,setOpenedFilter:i,trigger:r}){const s=e.filter((e=>!e.isVisible));return(0,m.jsx)(tn,{trigger:r,children:s.map((e=>(0,m.jsx)(nn,{onClick:()=>{i(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})},children:(0,m.jsx)(rn,{children:e.name})},e.field)))})}const on=(0,r.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:r},s){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const l=e.filter((e=>!e.isVisible));return(0,m.jsx)(sn,{trigger:(0,m.jsx)(i.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!l.length,ref:s,children:(0,o.__)("Add filter")}),filters:e,view:t,onChangeView:n,setOpenedFilter:r})}));function ln({filters:e,view:t,onChangeView:n}){const r=!t.search&&!t.filters?.some((t=>{return void 0!==t.value||(n=t.field,!e.some((e=>e.field===n&&e.isPrimary)));var n}));return(0,m.jsx)(i.Button,{disabled:r,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:[]})},children:(0,o.__)("Reset")})}var an=n(89907);function un(e,t){return(0,r.useMemo)((()=>{const n=[];return e.forEach((e=>{if(!e.elements?.length)return;const i=(0,an.L)(e);if(0===i.length)return;const r=!!e.filterBy?.isPrimary;n.push({field:e.id,name:e.label,elements:e.elements,singleSelection:i.some((e=>[f.FR,f.KR].includes(e))),operators:i,isVisible:r||!!t.filters?.some((t=>t.field===e.id&&f.a_.includes(t.operator))),isPrimary:r})})),n.sort(((e,t)=>e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name))),n}),[e,t])}function cn({filters:e,view:t,onChangeView:n,setOpenedFilter:s,isShowingFilter:l,setIsShowingFilter:a}){const u=(0,r.useCallback)((e=>{n(e),a(!0)}),[n,a]),c=!!e.filter((e=>e.isVisible)).length;return 0===e.length?null:c?(0,m.jsxs)("div",{className:"dataviews-filters__container-visibility-toggle",children:[(0,m.jsx)(i.Button,{className:"dataviews-filters__visibility-toggle",size:"compact",icon:S.Z,label:(0,o.__)("Toggle filter display"),onClick:()=>{l||s(null),a(!l)},isPressed:l,"aria-expanded":l}),c&&!!t.filters?.length&&(0,m.jsx)("span",{className:"dataviews-filters-toggle__count",children:t.filters?.length})]}):(0,m.jsx)(sn,{filters:e,view:t,onChangeView:u,setOpenedFilter:s,trigger:(0,m.jsx)(i.Button,{className:"dataviews-filters__visibility-toggle",size:"compact",icon:S.Z,label:(0,o.__)("Add filter"),isPressed:!1,"aria-expanded":!1})})}const dn=(0,r.memo)((function(){const{fields:e,view:t,onChangeView:n,openedFilter:s,setOpenedFilter:o}=(0,r.useContext)(c.Z),l=(0,r.useRef)(null),a=un(e,t),u=(0,m.jsx)(on,{filters:a,view:t,onChangeView:n,ref:l,setOpenedFilter:o},"add-filter"),d=a.filter((e=>e.isVisible));if(0===d.length)return null;const f=[...d.map((e=>(0,m.jsx)(en,{filter:e,view:t,onChangeView:n,addFilterRef:l,openedFilter:s},e.field))),u];return f.push((0,m.jsx)(ln,{filters:a,view:t,onChangeView:n},"reset-filters")),(0,m.jsx)(i.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},className:"dataviews-filters__container",wrap:!0,children:f})}));var fn=n(41649);function mn(){const{actions:e=[],data:t,fields:n,getItemId:i,isLoading:s,view:o,onChangeView:l,selection:a,onChangeSelection:u,setOpenedFilter:d,density:f}=(0,r.useContext)(c.Z),v=fn.K.find((e=>e.type===o.type))?.component;return(0,m.jsx)(v,{actions:e,data:t,fields:n,getItemId:i,isLoading:s,onChangeView:l,onChangeSelection:u,selection:a,setOpenedFilter:d,view:o,density:f})}var vn=n(16719),pn=n(68617);const gn=(0,r.memo)((function(){var e;const{view:t,onChangeView:n,paginationInfo:{totalItems:s=0,totalPages:l}}=(0,r.useContext)(c.Z);if(!s||!l)return null;const a=null!==(e=t.page)&&void 0!==e?e:1,u=Array.from(Array(l)).map(((e,t)=>{const n=t+1;return{value:n.toString(),label:n.toString(),"aria-label":a===n?(0,o.sprintf)((0,o.__)("Page %1$s of %2$s"),a,l):n.toString()}}));return!!s&&1!==l&&(0,m.jsxs)(i.__experimentalHStack,{expanded:!1,spacing:6,justify:"end",className:"dataviews-pagination",children:[(0,m.jsx)(i.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"dataviews-pagination__page-select",children:(0,r.createInterpolateElement)((0,o.sprintf)((0,o._x)("<div>Page</div>%1$s<div>of %2$s</div>","paging"),"<CurrentPage />",l),{div:(0,m.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,m.jsx)(i.SelectControl,{"aria-label":(0,o.__)("Current page"),value:a.toString(),options:u,onChange:e=>{n({...t,page:+e})},size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,m.jsxs)(i.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,m.jsx)(i.Button,{onClick:()=>n({...t,page:a-1}),disabled:1===a,accessibleWhenDisabled:!0,label:(0,o.__)("Previous page"),icon:vn.Z,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,m.jsx)(i.Button,{onClick:()=>n({...t,page:a+1}),disabled:a>=l,accessibleWhenDisabled:!0,label:(0,o.__)("Next page"),icon:pn.Z,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})})),hn=(0,r.memo)((function({label:e}){const{view:t,onChangeView:n}=(0,r.useContext)(c.Z),[s,l,u]=(0,a.useDebouncedInput)(t.search);(0,r.useEffect)((()=>{var e;l(null!==(e=t.search)&&void 0!==e?e:"")}),[t.search,l]);const d=(0,r.useRef)(n),f=(0,r.useRef)(t);(0,r.useEffect)((()=>{d.current=n,f.current=t}),[n,t]),(0,r.useEffect)((()=>{u!==f.current?.search&&d.current({...f.current,page:1,search:u})}),[u]);const v=e||(0,o.__)("Search");return(0,m.jsx)(i.SearchControl,{className:"dataviews-search",__nextHasNoMarginBottom:!0,onChange:l,value:s,label:v,placeholder:v,size:"compact"})})),xn=hn;var bn=n(73453),wn=n(13056),yn=n(9759),Sn=n(12560),_n=n.n(Sn);const Cn={xhuge:{min:3,max:6,default:5},huge:{min:2,max:4,default:4},xlarge:{min:2,max:3,default:3},large:{min:1,max:2,default:2},mobile:{min:1,max:2,default:2}};function jn({density:e,setDensity:t}){const n=function(){const e=(0,a.useViewportMatch)("xhuge",">="),t=(0,a.useViewportMatch)("huge",">="),n=(0,a.useViewportMatch)("xlarge",">="),i=(0,a.useViewportMatch)("large",">="),r=(0,a.useViewportMatch)("mobile",">=");return e?"xhuge":t?"huge":n?"xlarge":i?"large":r?"mobile":null}();(0,r.useEffect)((()=>{t((e=>{if(!n||!e)return 0;const t=Cn[n];return e<t.min?t.min:e>t.max?t.max:e}))}),[t,n]);const s=Cn[n||"mobile"],l=e||s.default,u=(0,r.useMemo)((()=>Array.from({length:s.max-s.min+1},((e,t)=>({value:s.min+t})))),[s]);return n?(0,m.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,showTooltip:!1,label:(0,o.__)("Preview size"),value:s.max+s.min-l,marks:u,min:s.min,max:s.max,withInputField:!1,onChange:(e=0)=>{t(s.max+s.min-e)},step:1}):null}const{DropdownMenuV2:En,DropdownMenuRadioItemV2:In,DropdownMenuItemLabelV2:kn}=(0,Tt.U)(i.privateApis);function Vn({defaultLayouts:e={list:{},grid:{},table:{}}}){const{view:t,onChangeView:n}=(0,r.useContext)(c.Z),s=Object.keys(e);if(s.length<=1)return null;const l=fn.K.find((e=>t.type===e.type));return(0,m.jsx)(En,{trigger:(0,m.jsx)(i.Button,{size:"compact",icon:l?.icon,label:(0,o.__)("Layout")}),children:s.map((i=>{const r=fn.K.find((e=>e.type===i));return r?(0,m.jsx)(In,{value:i,name:"view-actions-available-view",checked:i===t.type,hideOnClick:!0,onChange:i=>{switch(i.target.value){case"list":case"grid":case"table":return n({...t,type:i.target.value,...e[i.target.value]})}!0===globalThis.SCRIPT_DEBUG&&_n()("Invalid dataview")},children:(0,m.jsx)(kn,{children:r.label})},i):null}))})}function Nn(){const{view:e,fields:t,onChangeView:n}=(0,r.useContext)(c.Z),s=(0,r.useMemo)((()=>t.filter((e=>!1!==e.enableSorting)).map((e=>({label:e.label,value:e.id})))),[t]);return(0,m.jsx)(i.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,o.__)("Sort by"),value:e.sort?.field,options:s,onChange:t=>{n({...e,sort:{direction:e?.sort?.direction||"desc",field:t}})}})}function On(){const{view:e,fields:t,onChangeView:n}=(0,r.useContext)(c.Z);let s=e.sort?.direction;return!s&&e.sort?.field&&(s="desc"),(0,m.jsx)(i.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,o.__)("Order"),value:s,onChange:i=>{"asc"!==i&&"desc"!==i?!0===globalThis.SCRIPT_DEBUG&&_n()("Invalid direction"):n({...e,sort:{direction:i,field:e.sort?.field||t.find((e=>!1!==e.enableSorting))?.id||""}})},children:f.yN.map((e=>(0,m.jsx)(i.__experimentalToggleGroupControlOptionIcon,{value:e,icon:f.lK[e],label:f.OI[e]},e)))})}const Mn=[10,20,50,100];function An(){const{view:e,onChangeView:t}=(0,r.useContext)(c.Z);return(0,m.jsx)(i.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,o.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{const i="number"==typeof n||void 0===n?n:parseInt(n,10);t({...e,perPage:i,page:1})},children:Mn.map((e=>(0,m.jsx)(i.__experimentalToggleGroupControlOption,{value:e,label:e.toString()},e)))})}function Fn(){const{view:e,fields:t,onChangeView:n}=(0,r.useContext)(c.Z),s=(0,fn.z)(e),l=t.filter((e=>!1!==e.enableHiding&&!s.includes(e.id))),a=e.fields||t.map((e=>e.id));return l?.length?(0,m.jsx)(i.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:l?.map((t=>{const r=a.includes(t.id);return(0,m.jsx)(i.__experimentalItem,{children:(0,m.jsxs)(i.__experimentalHStack,{expanded:!0,children:[(0,m.jsx)("span",{children:t.label}),(0,m.jsx)(i.Button,{size:"compact",onClick:()=>n({...e,fields:r?a.filter((e=>e!==t.id)):[...a,t.id]}),icon:r?bn.Z:wn.Z,label:r?(0,o.__)("Hide field"):(0,o.__)("Show field")})]})},t.id)}))}):null}function Pn({title:e,description:t,children:n}){return(0,m.jsxs)(i.__experimentalGrid,{columns:12,className:"dataviews-settings-section",gap:4,children:[(0,m.jsxs)("div",{className:"dataviews-settings-section__sidebar",children:[(0,m.jsx)(i.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:e}),t&&(0,m.jsx)(i.__experimentalText,{variant:"muted",className:"dataviews-settings-section__description",children:t})]}),(0,m.jsx)(i.__experimentalGrid,{columns:8,gap:4,className:"dataviews-settings-section__content",children:n})]})}function Ln({density:e,setDensity:t}){const{view:n}=(0,r.useContext)(c.Z);return(0,m.jsxs)(i.__experimentalVStack,{className:"dataviews-view-config",spacing:6,children:[(0,m.jsxs)(Pn,{title:(0,o.__)("Appearance"),children:[(0,m.jsxs)(i.__experimentalHStack,{expanded:!0,className:"is-divided-in-two",children:[(0,m.jsx)(Nn,{}),(0,m.jsx)(On,{})]}),n.type===f.po&&(0,m.jsx)(jn,{density:e,setDensity:t}),(0,m.jsx)(An,{})]}),(0,m.jsx)(Pn,{title:(0,o.__)("Properties"),children:(0,m.jsx)(Fn,{})})]})}const Dn=(0,r.memo)((function({density:e,setDensity:t,defaultLayouts:n={list:{},grid:{},table:{}}}){const[s,l]=(0,r.useState)(!1);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Vn,{defaultLayouts:n}),(0,m.jsxs)("div",{children:[(0,m.jsx)(i.Button,{size:"compact",icon:yn.Z,label:(0,o._x)("View options","View is used as a noun"),onClick:()=>l(!0)}),s&&(0,m.jsx)(i.Popover,{placement:"bottom-end",onClose:()=>{l(!1)},focusOnMount:!0,children:(0,m.jsx)(Ln,{density:e,setDensity:t})})]})]})}));var Tn=n(74897);const Zn=e=>e.id;function Rn({view:e,onChangeView:t,fields:n,search:o=!0,searchLabel:l,actions:a=[],data:u,getItemId:d=Zn,isLoading:f=!1,paginationInfo:v,defaultLayouts:p,selection:g,onChangeSelection:h,header:x}){const[b,w]=(0,r.useState)([]),[S,_]=(0,r.useState)(0),C=void 0===g||void 0===h,j=C?b:g,[E,I]=(0,r.useState)(null),k=(0,r.useMemo)((()=>(0,Tn.U)(n)),[n]),V=(0,r.useMemo)((()=>j.filter((e=>u.some((t=>d(t)===e))))),[j,u,d]),N=un(k,e),[O,M]=(0,r.useState)((()=>(N||[]).some((e=>e.isPrimary))));return(0,m.jsx)(c.Z.Provider,{value:{view:e,onChangeView:t,fields:k,actions:a,data:u,isLoading:f,paginationInfo:v,selection:V,onChangeSelection:function(e){const t="function"==typeof e?e(j):e;C&&w(t),h&&h(t)},openedFilter:E,setOpenedFilter:I,getItemId:d,density:S},children:(0,m.jsxs)("div",{className:"dataviews-wrapper",children:[(0,m.jsxs)(i.__experimentalHStack,{alignment:"top",justify:"space-between",className:"dataviews__view-actions",spacing:1,children:[(0,m.jsxs)(i.__experimentalHStack,{justify:"start",expanded:!1,className:"dataviews__search",children:[o&&(0,m.jsx)(xn,{label:l}),(0,m.jsx)(cn,{filters:N,view:e,onChangeView:t,setOpenedFilter:I,setIsShowingFilter:M,isShowingFilter:O})]}),(0,m.jsxs)(i.__experimentalHStack,{spacing:1,expanded:!1,style:{flexShrink:0},children:[(0,m.jsx)(s.ZP,{}),(0,m.jsx)(Dn,{defaultLayouts:p,density:S,setDensity:_}),x]})]}),O&&(0,m.jsx)(dn,{}),(0,m.jsx)(mn,{}),(0,m.jsx)(gn,{}),(0,m.jsx)(y,{})]})})}},81172:(e,t,n)=>{"use strict";n.d(t,{Bk:()=>c,E7:()=>g,FR:()=>o,Fs:()=>y,KR:()=>l,OI:()=>h,a_:()=>f,dJ:()=>a,fP:()=>m,lK:()=>x,pj:()=>b,po:()=>w,r7:()=>p,vr:()=>u,yN:()=>v,yf:()=>d});var i=n(65736),r=n(25585),s=n(52798);const o="is",l="isNot",a="isAny",u="isNone",c="isAll",d="isNotAll",f=[o,l,a,u,c,d],m={[o]:{key:"is-filter",label:(0,i.__)("Is")},[l]:{key:"is-not-filter",label:(0,i.__)("Is not")},[a]:{key:"is-any-filter",label:(0,i.__)("Is any")},[u]:{key:"is-none-filter",label:(0,i.__)("Is none")},[c]:{key:"is-all-filter",label:(0,i.__)("Is all")},[d]:{key:"is-not-all-filter",label:(0,i.__)("Is not all")}},v=["asc","desc"],p={asc:"↑",desc:"↓"},g={asc:"ascending",desc:"descending"},h={asc:(0,i.__)("Sort ascending"),desc:(0,i.__)("Sort descending")},x={asc:r.Z,desc:s.Z},b="table",w="grid",y="list"},41649:(e,t,n)=>{"use strict";n.d(t,{K:()=>q,z:()=>X});var i=n(65736),r=n(76875),s=n(42890),o=n(68782),l=n(36348),a=n(7829),u=n(55609),c=n(69307),d=n(61250);function f({selection:e,onChangeSelection:t,item:n,getItemId:r,primaryField:s,disabled:o}){const l=r(n),a=!o&&e.includes(l);let c;return c=s?.getValue&&n?(0,i.sprintf)(a?(0,i.__)("Deselect item: %s"):(0,i.__)("Select item: %s"),s.getValue({item:n})):a?(0,i.__)("Select a new item"):(0,i.__)("Deselect item"),(0,d.jsx)(u.CheckboxControl,{className:"dataviews-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":c,"aria-disabled":o,checked:a,onChange:()=>{o||t(e.includes(l)?e.filter((e=>l!==e)):[...e,l])}})}var m=n(85665),v=n(81172),p=n(23088),g=n(54617),h=n(17289),x=n(94392),b=n(13056),w=n(94666),y=n(89907);const{DropdownMenuV2:S,DropdownMenuGroupV2:_,DropdownMenuItemV2:C,DropdownMenuRadioItemV2:j,DropdownMenuItemLabelV2:E,DropdownMenuSeparatorV2:I}=(0,w.U)(u.privateApis);function k({children:e}){return c.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,d.jsxs)(c.Fragment,{children:[t>0&&(0,d.jsx)(I,{}),e]},t)))}const V=(0,c.forwardRef)((function({fieldId:e,view:t,fields:n,onChangeView:r,onHide:s,setOpenedFilter:o},l){const a=t.layout?.combinedFields?.find((t=>t.id===e)),c=t.fields?.indexOf(e);if(a)return a.header||a.label;const f=n.find((t=>t.id===e));if(!f)return null;const m=!1!==f.enableHiding,p=!1!==f.enableSorting,w=t.sort?.field===f.id,I=(0,y.L)(f),V=!(t.filters?.some((e=>f.id===e.field))||!f.elements?.length||!I.length||f.filterBy?.isPrimary);return(0,d.jsx)(S,{align:"start",trigger:(0,d.jsxs)(u.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:l,variant:"tertiary",children:[f.header,t.sort&&w&&(0,d.jsx)("span",{"aria-hidden":"true",children:v.r7[t.sort.direction]})]}),style:{minWidth:"240px"},children:(0,d.jsxs)(k,{children:[p&&(0,d.jsx)(_,{children:v.yN.map((e=>{const n=t.sort&&w&&t.sort.direction===e,i=`${f.id}-${e}`;return(0,d.jsx)(j,{name:"view-table-sorting",value:i,checked:n,onChange:()=>{r({...t,sort:{field:f.id,direction:e}})},children:(0,d.jsx)(E,{children:v.OI[e]})},i)}))}),V&&(0,d.jsx)(_,{children:(0,d.jsx)(C,{prefix:(0,d.jsx)(u.Icon,{icon:g.Z}),onClick:()=>{o(f.id),r({...t,page:1,filters:[...t.filters||[],{field:f.id,value:void 0,operator:I[0]}]})},children:(0,d.jsx)(E,{children:(0,i.__)("Add filter")})})}),(0,d.jsxs)(_,{children:[(0,d.jsx)(C,{prefix:(0,d.jsx)(u.Icon,{icon:h.Z}),disabled:c<1,onClick:()=>{var e;!t.fields||c<1||r({...t,fields:[...null!==(e=t.fields.slice(0,c-1))&&void 0!==e?e:[],f.id,t.fields[c-1],...t.fields.slice(c+1)]})},children:(0,d.jsx)(E,{children:(0,i.__)("Move left")})}),(0,d.jsx)(C,{prefix:(0,d.jsx)(u.Icon,{icon:x.Z}),disabled:!t.fields||c>=t.fields.length-1,onClick:()=>{var e;!t.fields||c>=t.fields.length-1||r({...t,fields:[...null!==(e=t.fields.slice(0,c))&&void 0!==e?e:[],t.fields[c+1],f.id,...t.fields.slice(c+2)]})},children:(0,d.jsx)(E,{children:(0,i.__)("Move right")})}),m&&(0,d.jsx)(C,{prefix:(0,d.jsx)(u.Icon,{icon:b.Z}),onClick:()=>{const e=t.fields||n.map((e=>e.id));s(f),r({...t,fields:e.filter((e=>e!==f.id))})},children:(0,d.jsx)(E,{children:(0,i.__)("Hide column")})})]})]})})}));function N({selection:e,onChangeSelection:t,data:n,actions:r,getItemId:s}){const o=(0,c.useMemo)((()=>n.filter((e=>r.some((t=>t.supportsBulk&&(!t.isEligible||t.isEligible(e))))))),[n,r]),l=n.filter((t=>e.includes(s(t))&&o.includes(t))),a=l.length===o.length;return(0,d.jsx)(u.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:a,indeterminate:!a&&!!l.length,onChange:()=>{t(a?[]:o.map((e=>s(e))))},"aria-label":a?(0,i.__)("Deselect all"):(0,i.__)("Select all")})}function O({column:e,fields:t,view:n,...i}){const r=t.find((t=>t.id===e));if(r)return(0,d.jsx)(M,{...i,field:r});const s=n.layout?.combinedFields?.find((t=>t.id===e));return s?(0,d.jsx)(A,{...i,fields:t,view:n,field:s}):null}function M({primaryField:e,item:t,field:n}){return(0,d.jsx)("div",{className:(0,a.Z)("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":e?.id===n.id}),children:(0,d.jsx)(n.render,{item:t})})}function A({field:e,...t}){const n=e.children.map((e=>(0,d.jsx)(O,{...t,column:e},e)));return"horizontal"===e.direction?(0,d.jsx)(u.__experimentalHStack,{spacing:3,children:n}):(0,d.jsx)(u.__experimentalVStack,{spacing:0,children:n})}function F({hasBulkActions:e,item:t,actions:n,fields:i,id:r,view:s,primaryField:o,selection:l,getItemId:u,onChangeSelection:v}){const g=(0,p.UF)(n,t),h=g&&l.includes(r),[x,b]=(0,c.useState)(!1),w=(0,c.useRef)(!1),y=s.fields||i.map((e=>e.id));return(0,d.jsxs)("tr",{className:(0,a.Z)("dataviews-view-table__row",{"is-selected":g&&h,"is-hovered":x,"has-bulk-actions":g}),onMouseEnter:()=>{b(!0)},onMouseLeave:()=>{b(!1)},onTouchStart:()=>{w.current=!0},onClick:()=>{g&&(w.current||"Range"===document.getSelection()?.type||v(l.includes(r)?l.filter((e=>r!==e)):[r]))},children:[e&&(0,d.jsx)("td",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},children:(0,d.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,d.jsx)(f,{item:t,selection:l,onChangeSelection:v,getItemId:u,primaryField:o,disabled:!g})})}),y.map((e=>{var n;const{width:r,maxWidth:l,minWidth:a}=null!==(n=s.layout?.styles?.[e])&&void 0!==n?n:{};return(0,d.jsx)("td",{style:{width:r,maxWidth:l,minWidth:a},children:(0,d.jsx)(O,{primaryField:o,fields:i,item:t,column:e,view:s})},e)})),!!n?.length&&(0,d.jsx)("td",{className:"dataviews-view-table__actions-column",onClick:e=>e.stopPropagation(),children:(0,d.jsx)(m.ZP,{item:t,actions:n})})]})}function P({selection:e,onChangeSelection:t,getItemId:n,item:i,actions:r,mediaField:s,primaryField:o,visibleFields:l,badgeFields:c,columnFields:v}){const g=(0,p.UF)(r,i),h=n(i),x=e.includes(h),b=s?.render?(0,d.jsx)(s.render,{item:i}):null,w=o?.render?(0,d.jsx)(o.render,{item:i}):null;return(0,d.jsxs)(u.__experimentalVStack,{spacing:0,className:(0,a.Z)("dataviews-view-grid__card",{"is-selected":g&&x}),onClickCapture:n=>{if(n.ctrlKey||n.metaKey){if(n.stopPropagation(),n.preventDefault(),!g)return;t(e.includes(h)?e.filter((e=>h!==e)):[...e,h])}},children:[(0,d.jsx)("div",{className:"dataviews-view-grid__media",children:b}),(0,d.jsx)(f,{item:i,selection:e,onChangeSelection:t,getItemId:n,primaryField:o,disabled:!g}),(0,d.jsxs)(u.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions",children:[(0,d.jsx)(u.__experimentalHStack,{className:"dataviews-view-grid__primary-field",children:w}),(0,d.jsx)(m.ZP,{item:i,actions:r,isCompact:!0})]}),!!c?.length&&(0,d.jsx)(u.__experimentalHStack,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:c.map((e=>(0,d.jsx)(u.FlexItem,{className:"dataviews-view-grid__field-value",children:(0,d.jsx)(e.render,{item:i})},e.id)))}),!!l?.length&&(0,d.jsx)(u.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:1,children:l.map((e=>(0,d.jsx)(u.Flex,{className:(0,a.Z)("dataviews-view-grid__field",v?.includes(e.id)?"is-column":"is-row"),gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:v?.includes(e.id)?"column":"row",children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.FlexItem,{className:"dataviews-view-grid__field-name",children:e.header}),(0,d.jsx)(u.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,d.jsx)(e.render,{item:i})})]})},e.id)))})]},h)}var L=n(74124),D=n(94333),T=n(71738),Z=n(9818);const{useCompositeStoreV2:R,CompositeV2:K,CompositeItemV2:B,CompositeRowV2:U,DropdownMenuV2:z}=(0,w.U)(u.privateApis);function H({actions:e,id:t,isSelected:n,item:r,mediaField:s,onSelect:o,primaryField:l,store:f,visibleFields:v}){const p=(0,Z.useRegistry)(),g=(0,c.useRef)(null),h=`${t}-label`,x=`${t}-description`,[b,w]=(0,c.useState)(!1);(0,c.useEffect)((()=>{n&&g.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[n]);const{primaryAction:y,eligibleActions:S}=(0,c.useMemo)((()=>{const t=e.filter((e=>!e.isEligible||e.isEligible(r))),n=t.filter((e=>e.isPrimary&&!!e.icon));return{primaryAction:n?.[0],eligibleActions:t}}),[e,r]),[_,C]=(0,c.useState)(!1),j=y&&("string"==typeof y.label?y.label:y.label([r])),E=s?.render?(0,d.jsx)(s.render,{item:r}):(0,d.jsx)("div",{className:"dataviews-view-list__media-placeholder"}),I=l?.render?(0,d.jsx)(l.render,{item:r}):null;return(0,d.jsx)(U,{ref:g,render:(0,d.jsx)("li",{}),role:"row",className:(0,a.Z)({"is-selected":n,"is-hovered":b}),onMouseEnter:()=>{w(!0)},onMouseLeave:()=>{w(!1)},children:(0,d.jsxs)(u.__experimentalHStack,{className:"dataviews-view-list__item-wrapper",alignment:"center",spacing:0,children:[(0,d.jsx)("div",{role:"gridcell",children:(0,d.jsx)(B,{store:f,render:(0,d.jsx)("div",{}),role:"button",id:t,"aria-pressed":n,"aria-labelledby":h,"aria-describedby":x,className:"dataviews-view-list__item",onClick:()=>o(r),children:(0,d.jsxs)(u.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start",children:[(0,d.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:E}),(0,d.jsxs)(u.__experimentalVStack,{spacing:1,className:"dataviews-view-list__field-wrapper",children:[(0,d.jsx)("span",{className:"dataviews-view-list__primary-field",id:h,children:I}),(0,d.jsx)("div",{className:"dataviews-view-list__fields",id:x,children:v.map((e=>(0,d.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,d.jsx)(u.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:e.label}),(0,d.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,d.jsx)(e.render,{item:r})})]},e.id)))})]})]})})}),S?.length>0&&(0,d.jsxs)(u.__experimentalHStack,{spacing:3,justify:"flex-end",className:"dataviews-view-list__item-actions",style:{flexShrink:"0",width:"auto"},children:[y&&"RenderModal"in y&&(0,d.jsx)("div",{role:"gridcell",children:(0,d.jsx)(B,{store:f,render:(0,d.jsx)(u.Button,{label:j,icon:y.icon,isDestructive:y.isDestructive,size:"small",onClick:()=>C(!0)}),children:_&&(0,d.jsx)(m.Ww,{action:y,items:[r],closeModal:()=>C(!1)})})}),y&&!("RenderModal"in y)&&(0,d.jsx)("div",{role:"gridcell",children:(0,d.jsx)(B,{store:f,render:(0,d.jsx)(u.Button,{label:j,icon:y.icon,isDestructive:y.isDestructive,size:"small",onClick:()=>{y.callback([r],{registry:p})}})})},y.id),(0,d.jsx)("div",{role:"gridcell",children:(0,d.jsx)(z,{trigger:(0,d.jsx)(B,{store:f,render:(0,d.jsx)(u.Button,{size:"small",icon:T.Z,label:(0,i.__)("Actions"),accessibleWhenDisabled:!0,disabled:!e.length,onKeyDown:e=>{"ArrowDown"===e.key&&(e.preventDefault(),f.move(f.down())),"ArrowUp"===e.key&&(e.preventDefault(),f.move(f.up()))}})}),placement:"bottom-end",children:(0,d.jsx)(m.ec,{actions:S,item:r})})})]})]})})}const q=[{type:v.pj,label:(0,i.__)("Table"),component:function({actions:e,data:t,fields:n,getItemId:r,isLoading:s=!1,onChangeView:o,onChangeSelection:l,selection:f,setOpenedFilter:m,view:g}){const h=(0,c.useRef)(new Map),x=(0,c.useRef)(),[b,w]=(0,c.useState)(),y=(0,p.qF)(e,t);(0,c.useEffect)((()=>{x.current&&(x.current.focus(),x.current=void 0)}));const S=(0,c.useId)();if(b)return x.current=b,void w(void 0);const _=e=>{const t=h.current.get(e.id),n=t?h.current.get(t.fallback):void 0;w(n?.node)},C=g.fields||n.map((e=>e.id)),j=!!t?.length,E=n.find((e=>e.id===g.layout?.primaryField));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("table",{className:"dataviews-view-table","aria-busy":s,"aria-describedby":S,children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"dataviews-view-table__row",children:[y&&(0,d.jsx)("th",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},scope:"col",children:(0,d.jsx)(N,{selection:f,onChangeSelection:l,data:t,actions:e,getItemId:r})}),C.map(((e,t)=>{var i;const{width:r,maxWidth:s,minWidth:l}=null!==(i=g.layout?.styles?.[e])&&void 0!==i?i:{};return(0,d.jsx)("th",{style:{width:r,maxWidth:s,minWidth:l},"aria-sort":g.sort?.field===e?v.E7[g.sort.direction]:void 0,scope:"col",children:(0,d.jsx)(V,{ref:n=>{n?h.current.set(e,{node:n,fallback:C[t>0?t-1:1]}):h.current.delete(e)},fieldId:e,view:g,fields:n,onChangeView:o,onHide:_,setOpenedFilter:m})},e)})),!!e?.length&&(0,d.jsx)("th",{className:"dataviews-view-table__actions-column",children:(0,d.jsx)("span",{className:"dataviews-view-table-header",children:(0,i.__)("Actions")})})]})}),(0,d.jsx)("tbody",{children:j&&t.map(((t,i)=>(0,d.jsx)(F,{item:t,hasBulkActions:y,actions:e,fields:n,id:r(t)||i.toString(),view:g,primaryField:E,selection:f,getItemId:r,onChangeSelection:l},r(t))))})]}),(0,d.jsx)("div",{className:(0,a.Z)({"dataviews-loading":s,"dataviews-no-results":!j&&!s}),id:S,children:!j&&(0,d.jsx)("p",{children:s?(0,d.jsx)(u.Spinner,{}):(0,i.__)("No results")})})]})},icon:r.Z},{type:v.po,label:(0,i.__)("Grid"),component:function({actions:e,data:t,fields:n,getItemId:r,isLoading:s,onChangeSelection:o,selection:l,view:c,density:f}){const m=n.find((e=>e.id===c.layout?.mediaField)),v=n.find((e=>e.id===c.layout?.primaryField)),p=c.fields||n.map((e=>e.id)),{visibleFields:g,badgeFields:h}=n.reduce(((e,t)=>(!p.includes(t.id)||[c.layout?.mediaField,c?.layout?.primaryField].includes(t.id)||e[c.layout?.badgeFields?.includes(t.id)?"badgeFields":"visibleFields"].push(t),e)),{visibleFields:[],badgeFields:[]}),x=!!t?.length,b=f?{gridTemplateColumns:`repeat(${f}, minmax(0, 1fr))`}:{};return(0,d.jsxs)(d.Fragment,{children:[x&&(0,d.jsx)(u.__experimentalGrid,{gap:8,columns:2,alignment:"top",className:"dataviews-view-grid",style:b,"aria-busy":s,children:t.map((t=>(0,d.jsx)(P,{selection:l,onChangeSelection:o,getItemId:r,item:t,actions:e,mediaField:m,primaryField:v,visibleFields:g,badgeFields:h,columnFields:c.layout?.columnFields},r(t))))}),!x&&(0,d.jsx)("div",{className:(0,a.Z)({"dataviews-loading":s,"dataviews-no-results":!s}),children:(0,d.jsx)("p",{children:s?(0,d.jsx)(u.Spinner,{}):(0,i.__)("No results")})})]})},icon:s.Z},{type:v.Fs,label:(0,i.__)("List"),component:function e(t){const{actions:n,data:r,fields:s,getItemId:o,isLoading:l,onChangeSelection:f,selection:m,view:v}=t,p=(0,D.useInstanceId)(e,"view-list"),g=r?.findLast((e=>m.includes(o(e)))),h=s.find((e=>e.id===v.layout?.mediaField)),x=s.find((e=>e.id===v.layout?.primaryField)),b=v.fields||s.map((e=>e.id)),w=s.filter((e=>b.includes(e.id)&&![v.layout?.primaryField,v.layout?.mediaField].includes(e.id))),y=e=>f([o(e)]),S=(0,c.useCallback)((e=>e?`${p}-${o(e)}`:void 0),[p,o]),_=R({defaultActiveId:S(g)}),C=(0,L.Kw)(_,(e=>e.items.some((t=>t.id===e.activeId))));(0,c.useEffect)((()=>{C||(_.down()?_.move(_.down()):_.up()&&_.move(_.up()))}),[C]);const j=r?.length;return j?(0,d.jsx)(K,{id:p,render:(0,d.jsx)("ul",{}),className:"dataviews-view-list",role:"grid",store:_,children:r.map((e=>{const t=S(e);return(0,d.jsx)(H,{id:t,actions:n,item:e,isSelected:e===g,onSelect:y,mediaField:h,primaryField:x,store:_,visibleFields:w},t)}))}):(0,d.jsx)("div",{className:(0,a.Z)({"dataviews-loading":l,"dataviews-no-results":!j&&!l}),children:!j&&(0,d.jsx)("p",{children:l?(0,d.jsx)(u.Spinner,{}):(0,i.__)("No results")})})},icon:(0,i.isRTL)()?o.Z:l.Z}];function X(e){var t;return"table"===e.type?[e.layout?.primaryField].concat(null!==(t=e.layout?.combinedFields?.flatMap((e=>e.children)))&&void 0!==t?t:[]).filter((e=>!!e)):"grid"===e.type||"list"===e.type?[e.layout?.primaryField,e.layout?.mediaField].filter((e=>!!e)):[]}},94666:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var i=n(74776);const{lock:r,unlock:s}=(0,i.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews")},74897:(e,t,n)=>{"use strict";n.d(t,{U:()=>f});const i={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:function(e,t){if(""===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const n=t?.elements.map((e=>e.value));if(!n.includes(Number(e)))return!1}return!0},Edit:"integer"},r={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const n=t?.elements?.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:"text"},s={sort:function(e,t,n){const i=new Date(e).getTime(),r=new Date(t).getTime();return"asc"===n?i-r:r-i},isValid:function(e,t){if(t?.elements){const n=t?.elements.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:"datetime"};var o=n(55609),l=n(69307),a=n(61250),u=n(65736);const c={datetime:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:s}=t,u=t.getValue({item:e}),c=(0,l.useCallback)((e=>n({[r]:e})),[r,n]);return(0,a.jsxs)("fieldset",{className:"dataviews-controls__datetime",children:[!i&&(0,a.jsx)(o.BaseControl.VisualLabel,{as:"legend",children:s}),i&&(0,a.jsx)(o.VisuallyHidden,{as:"legend",children:s}),(0,a.jsx)(o.TimePicker,{currentTime:u,onChange:c,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){var r;const{id:s,label:u,description:c}=t,d=null!==(r=t.getValue({item:e}))&&void 0!==r?r:"",f=(0,l.useCallback)((e=>n({[s]:Number(e)})),[s,n]);return(0,a.jsx)(o.__experimentalNumberControl,{label:u,help:c,value:d,onChange:f,__next40pxDefaultSize:!0,hideLabelFromVision:i})},radio:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:s}=t,u=t.getValue({item:e}),c=(0,l.useCallback)((e=>n({[r]:e})),[r,n]);return t.elements?(0,a.jsx)(o.RadioControl,{label:s,onChange:c,options:t.elements,selected:u,hideLabelFromVision:i}):null},select:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){var r,s;const{id:c,label:d}=t,f=null!==(r=t.getValue({item:e}))&&void 0!==r?r:"",m=(0,l.useCallback)((e=>n({[c]:e})),[c,n]),v=[{label:(0,u.__)("Select item"),value:""},...null!==(s=t?.elements)&&void 0!==s?s:[]];return(0,a.jsx)(o.SelectControl,{label:d,value:f,options:v,onChange:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:i})},text:function({data:e,field:t,onChange:n,hideLabelFromVision:i}){const{id:r,label:s,placeholder:u}=t,c=t.getValue({item:e}),d=(0,l.useCallback)((e=>n({[r]:e})),[r,n]);return(0,a.jsx)(o.TextControl,{label:s,placeholder:u,value:null!=c?c:"",onChange:d,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:i})}};function d(e){if(Object.keys(c).includes(e))return c[e];throw"Control "+e+" not found"}function f(e){return e.map((e=>{var t,n;const o="integer"===(l=e.type)?i:"text"===l?r:"datetime"===l?s:{sort:(e,t,n)=>"number"==typeof e&&"number"==typeof t?"asc"===n?e-t:t-e:"asc"===n?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=>{if(t?.elements){const n=t?.elements?.map((e=>e.value));if(!n.includes(e))return!1}return!0},Edit:()=>null};var l;const a=e.getValue||(({item:t})=>t[e.id]),u=null!==(t=e.sort)&&void 0!==t?t:function(e,t,n){return o.sort(a({item:e}),a({item:t}),n)},c=null!==(n=e.isValid)&&void 0!==n?n:function(e,t){return o.isValid(a({item:e}),t)},f=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?d(e.Edit):e.elements?d("select"):"string"==typeof t.Edit?d(t.Edit):t.Edit}(e,o),m=e.render||(e.elements?({item:t})=>{const n=a({item:t});return e?.elements?.find((e=>e.value===n))?.label||a({item:t})}:a);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:a,render:m,sort:u,isValid:c,Edit:f}}))}},89907:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(81172);function r(e){let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=[i.dJ,i.vr]),t=t.filter((e=>i.a_.includes(e))),(t.includes(i.FR)||t.includes(i.KR))&&(t=t.filter((e=>[i.FR,i.KR].includes(e)))),t}},23894:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var i=n(74897);function r(e,t,n){return(0,i.U)(t.filter((({id:e})=>!!n.fields?.includes(e)))).every((t=>t.isValid(e,{elements:t.elements})))}},49210:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),i=new RegExp(n,"g"),r=new RegExp(n,"");function s(e){return t[e]}var o=function(e){return e.replace(i,s)};e.exports=o,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=o},26876:(e,t,n)=>{"use strict";var i=n(99196),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useState,o=i.useEffect,l=i.useLayoutEffect,a=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=s({inst:{value:n,getSnapshot:t}}),r=i[0].inst,c=i[1];return l((function(){r.value=n,r.getSnapshot=t,u(r)&&c({inst:r})}),[e,n,t]),o((function(){return u(r)&&c({inst:r}),e((function(){u(r)&&c({inst:r})}))}),[e]),a(n),n};t.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},19720:(e,t,n)=>{"use strict";e.exports=n(26876)},36031:(e,t,n)=>{"use strict";n.d(t,{EZ:()=>d,S0:()=>f,ih:()=>c});var i=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&u(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&u(e,n,t[n]);return e},d=(e,t)=>r(e,s(t)),f=(e,t)=>{var n={};for(var i in e)l.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&o)for(var i of o(e))t.indexOf(i)<0&&a.call(e,i)&&(n[i]=e[i]);return n}},56760:(e,t,n)=>{"use strict";n.d(t,{CE:()=>f,Ld:()=>u,MT:()=>o,Ny:()=>p,S1:()=>a,Z_:()=>c,cY:()=>l,dC:()=>d,ei:()=>m,yt:()=>v});var i=n(69322),r=n(36031);function s(e,t){const n=e.__unstableInternals;return(0,i.kG)(n,"Invalid store"),n[t]}function o(e,...t){let n=e,s=n,l=Symbol(),u=i.ZT;const d=new Set,f=new Set,m=new Set,v=new Set,p=new Set,g=new WeakMap,h=new WeakMap,x=(e,t,n=v)=>(n.add(t),h.set(t,e),()=>{var e;null==(e=g.get(t))||e(),g.delete(t),h.delete(t),n.delete(t)}),b=(e,o,a=!1)=>{var u;if(!(0,i.nr)(n,e))return;const c=(0,i.Ei)(o,n[e]);if(c===n[e])return;if(!a)for(const n of t)null==(u=null==n?void 0:n.setState)||u.call(n,e,c);const d=n;n=(0,r.EZ)((0,r.ih)({},n),{[e]:c});const m=Symbol();l=m,f.add(e);const x=(t,i,r)=>{var s;const o=h.get(t);o&&!o.some((t=>r?r.has(t):t===e))||(null==(s=g.get(t))||s(),g.set(t,t(n,i)))};for(const e of v)x(e,d);queueMicrotask((()=>{if(l!==m)return;const e=n;for(const e of p)x(e,s,f);s=e,f.clear()}))},w={getState:()=>n,setState:b,__unstableInternals:{setup:e=>(m.add(e),()=>m.delete(e)),init:()=>{const e=d.size,r=Symbol();d.add(r);const s=()=>{d.delete(r),d.size||u()};if(e)return s;const o=(0,i.RR)(n).map((e=>(0,i.tS)(...t.map((t=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(r&&(0,i.nr)(r,e))return c(t,[e],(t=>{b(e,t[e],!0)}))}))))),l=[];for(const e of m)l.push(e());const f=t.map(a);return u=(0,i.tS)(...o,...l,...f),s},subscribe:(e,t)=>x(e,t),sync:(e,t)=>(g.set(t,t(n,n)),x(e,t)),batch:(e,t)=>(g.set(t,t(n,s)),x(e,t,p)),pick:e=>o((0,i.ei)(n,e),w),omit:e=>o((0,i.CE)(n,e),w)}};return w}function l(e,...t){if(e)return s(e,"setup")(...t)}function a(e,...t){if(e)return s(e,"init")(...t)}function u(e,...t){if(e)return s(e,"subscribe")(...t)}function c(e,...t){if(e)return s(e,"sync")(...t)}function d(e,...t){if(e)return s(e,"batch")(...t)}function f(e,...t){if(e)return s(e,"omit")(...t)}function m(e,...t){if(e)return s(e,"pick")(...t)}function v(...e){return o(e.reduce(((e,t)=>{var n;const i=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return i?Object.assign(e,i):e}),{}),...e)}function p(e,t){}},32804:(e,t,n)=>{"use strict";n.d(t,{$g:()=>m,AU:()=>h,Kg:()=>v,Me:()=>s,Nq:()=>r,S6:()=>f,SK:()=>p,eS:()=>d,iK:()=>a,pn:()=>c,r3:()=>l,vY:()=>o,wy:()=>g});var i,r="undefined"!=typeof window&&!!(null==(i=window.document)?void 0:i.createElement);function s(e){return e?e.ownerDocument||e:document}function o(e,t=!1){const{activeElement:n}=s(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return o(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=s(n).getElementById(e);if(t)return t}}return n}function l(e,t){return e===t||e.contains(t)}function a(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==u.indexOf(e.type)}var u=["button","color","file","image","reset","submit"];function c(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function d(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function f(e){return e.isContentEditable||d(e)}function m(e){if(d(e))return e.value;if(e.isContentEditable){const t=s(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function v(e){let t=0,n=0;if(d(e))t=e.selectionStart||0,n=e.selectionEnd||0;else if(e.isContentEditable){const i=s(e).getSelection();if((null==i?void 0:i.rangeCount)&&i.anchorNode&&l(e,i.anchorNode)&&i.focusNode&&l(e,i.focusNode)){const r=i.getRangeAt(0),s=r.cloneRange();s.selectNodeContents(e),s.setEnd(r.startContainer,r.startOffset),t=s.toString().length,s.setEnd(r.endContainer,r.endOffset),n=s.toString().length}}return{start:t,end:n}}function p(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function g(e){if(!e)return null;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}return g(e.parentElement)||document.scrollingElement||document.body}function h(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}},69322:(e,t,n)=>{"use strict";n.d(t,{Bk:()=>v,CE:()=>u,EE:()=>p,Ei:()=>s,LS:()=>h,Nq:()=>g,RR:()=>m,Ue:()=>a,ZT:()=>r,ei:()=>c,kG:()=>f,nr:()=>o,tS:()=>l,yR:()=>d});var i=n(36031);function r(...e){}function s(e,t){return function(e){return"function"==typeof e}(e)?e("function"==typeof t?t():t):e}function o(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function l(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function a(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function u(e,t){const n=(0,i.ih)({},e);for(const e of t)o(n,e)&&delete n[e];return n}function c(e,t){const n={};for(const i of t)o(e,i)&&(n[i]=e[i]);return n}function d(e){return e}function f(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function m(e){return Object.keys(e)}function v(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}function p(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function g(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}function h(...e){for(const t of e)if(void 0!==t)return t}},47962:(e,t,n)=>{"use strict";n.d(t,{G6:()=>o,b1:()=>r,mL:()=>s,vU:()=>l});var i=n(32804);function r(){return i.Nq&&!!navigator.maxTouchPoints}function s(){return!!i.Nq&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function o(){return i.Nq&&s()&&/apple/i.test(navigator.vendor)}function l(){return i.Nq&&/firefox\//i.test(navigator.userAgent)}},84839:(e,t,n)=>{"use strict";n.d(t,{Ke:()=>o,N:()=>m,Ud:()=>l,XN:()=>u,iN:()=>p,lO:()=>f,nm:()=>d,qx:()=>v,sE:()=>c,wC:()=>a});var i=n(47962),r=n(32804),s=n(36031);function o(e){return Boolean(e.currentTarget&&!(0,r.r3)(e.currentTarget,e.target))}function l(e){return e.target===e.currentTarget}function a(e){const t=e.currentTarget;if(!t)return!1;const n=(0,i.mL)();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const r=t.tagName.toLowerCase();return"a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type}function u(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}function c(e,t){const n=new FocusEvent("blur",t),i=e.dispatchEvent(n),r=(0,s.EZ)((0,s.ih)({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",r)),i}function d(e,t,n){const i=new KeyboardEvent(t,n);return e.dispatchEvent(i)}function f(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function m(e,t){const n=t||e.currentTarget,i=e.relatedTarget;return!i||!(0,r.r3)(n,i)}function v(e,t,n,i){const r=(e=>{if(i){const t=setTimeout(e,i);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,s,!0),n()})),s=()=>{r(),n()};return e.addEventListener(t,s,{once:!0,capture:!0}),r}function p(e,t,n,i=window){const r=[];try{i.document.addEventListener(e,t,n);for(const s of Array.from(i.frames))r.push(p(e,t,n,s))}catch(e){}return()=>{try{i.document.removeEventListener(e,t,n)}catch(e){}for(const e of r)e()}}},74124:(e,t,n)=>{"use strict";n.d(t,{Kw:()=>d,XS:()=>f,oR:()=>m});var i=n(14920),r=n(53082),s=n(69322),o=n(56760),l=n(99196),a=n(19720),{useSyncExternalStore:u}=a,c=()=>()=>{};function d(e,t=s.yR){const n=l.useCallback((t=>e?(0,o.Ld)(e,null,t):c()),[e]),i=()=>{const n="string"==typeof t?t:null,i="function"==typeof t?t:null,r=null==e?void 0:e.getState();return i?i(r):r&&n&&(0,s.nr)(r,n)?r[n]:void 0};return u(n,i,i)}function f(e,t,n,r){const l=(0,s.nr)(t,n)?t[n]:void 0,a=r?t[r]:void 0,u=(0,i.cP)({value:l,setValue:a});(0,i.Gw)((()=>(0,o.Z_)(e,[n],((e,t)=>{const{value:i,setValue:r}=u.current;r&&e[n]!==t[n]&&e[n]!==i&&r(e[n])}))),[e,n]),(0,i.Gw)((()=>{if(void 0!==l)return e.setState(n,l),(0,o.dC)(e,[n],(()=>{void 0!==l&&e.setState(n,l)}))}))}function m(e,t){const[n,s]=l.useState((()=>e(t)));(0,i.Gw)((()=>(0,o.S1)(n)),[n]);const a=l.useCallback((e=>d(n,e)),[n]);return[l.useMemo((()=>(0,r.EZ)((0,r.ih)({},n),{useState:a})),[n,a]),(0,i.zX)((()=>{s((n=>e((0,r.ih)((0,r.ih)({},t),n.getState()))))}))]}},53082:(e,t,n)=>{"use strict";n.d(t,{EZ:()=>d,S0:()=>f,ih:()=>c});var i=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&u(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&u(e,n,t[n]);return e},d=(e,t)=>r(e,s(t)),f=(e,t)=>{var n={};for(var i in e)l.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&o)for(var i of o(e))t.indexOf(i)<0&&a.call(e,i)&&(n[i]=e[i]);return n}},48681:(e,t,n)=>{"use strict";n.d(t,{Yx:()=>l,dG:()=>a,k$:()=>o});var i=n(53082),r=n(69322),s=n(99196);function o(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function l(e){return function(e){return!!e&&!!(0,s.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e)?(0,i.ih)({},e.props).ref||e.ref:null}function a(e,t){const n=(0,i.ih)({},e);for(const s in t){if(!(0,r.nr)(t,s))continue;if("className"===s){const i="className";n[i]=e[i]?`${e[i]} ${t[i]}`:t[i];continue}if("style"===s){const r="style";n[r]=e[r]?(0,i.ih)((0,i.ih)({},e[r]),t[r]):t[r];continue}const o=t[s];if("function"==typeof o&&s.startsWith("on")){const t=e[s];if("function"==typeof t){n[s]=(...e)=>{o(...e),t(...e)};continue}}n[s]=o}return n}},14920:(e,t,n)=>{"use strict";var i;n.d(t,{Gw:()=>f,Me:()=>h,NW:()=>S,O:()=>x,OJ:()=>C,XJ:()=>j,cP:()=>m,is:()=>y,m1:()=>E,pl:()=>p,qq:()=>g,rf:()=>w,vv:()=>b,yl:()=>_,zX:()=>v});var r=n(48681),s=n(53082),o=n(32804),l=n(84839),a=n(99196),u=(0,s.ih)({},i||(i=n.t(a,2))),c=u.useId,d=(u.useDeferredValue,u.useInsertionEffect),f=o.Nq?a.useLayoutEffect:a.useEffect;function m(e){const t=(0,a.useRef)(e);return f((()=>{t.current=e})),t}function v(e){const t=(0,a.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return d?d((()=>{t.current=e})):t.current=e,(0,a.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function p(e){const[t,n]=(0,a.useState)(null);return f((()=>{if(null==t)return;if(!e)return;let n=null;return e((e=>(n=e,t))),()=>{e(n)}}),[t,e]),[t,n]}function g(...e){return(0,a.useMemo)((()=>{if(e.some(Boolean))return t=>{for(const n of e)(0,r.k$)(n,t)}}),e)}function h(e){if(c){const t=c();return e||t}const[t,n]=(0,a.useState)(e);return f((()=>{if(e||t)return;const i=Math.random().toString(36).substr(2,6);n(`id-${i}`)}),[e,t]),e||t}function x(e,t){const n=e=>{if("string"==typeof e)return e},[i,r]=(0,a.useState)((()=>n(t)));return f((()=>{const i=e&&"current"in e?e.current:e;r((null==i?void 0:i.tagName.toLowerCase())||n(t))}),[e,t]),i}function b(e,t,n){const[i,r]=(0,a.useState)(n);return f((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const i=()=>{const e=n.getAttribute(t);null!=e&&r(e)},s=new MutationObserver(i);return s.observe(n,{attributeFilter:[t]}),i(),()=>s.disconnect()}),[e,t]),i}function w(e,t){const n=(0,a.useRef)(!1);(0,a.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,a.useEffect)((()=>()=>{n.current=!1}),[])}function y(e,t){const n=(0,a.useRef)(!1);f((()=>{if(n.current)return e();n.current=!0}),t),f((()=>()=>{n.current=!1}),[])}function S(){return(0,a.useReducer)((()=>[]),[])}function _(e){return v("function"==typeof e?e:()=>e)}function C(e,t,n=[]){const i=(0,a.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return(0,s.EZ)((0,s.ih)({},e),{wrapElement:i})}function j(e,t,n){const i=e.onLoadedMetadataCapture,r=(0,a.useMemo)((()=>Object.assign((()=>{}),(0,s.EZ)((0,s.ih)({},i),{[t]:n}))),[i,t,n]);return[null==i?void 0:i[t],{onLoadedMetadataCapture:r}]}function E(){return(0,a.useEffect)((()=>{(0,l.iN)("mousemove",N,!0),(0,l.iN)("mousedown",O,!0),(0,l.iN)("mouseup",O,!0),(0,l.iN)("keydown",O,!0),(0,l.iN)("scroll",O,!0)}),[]),v((()=>I))}var I=!1,k=0,V=0;function N(e){(function(e){const t=e.movementX||e.screenX-k,n=e.movementY||e.screenY-V;return k=e.screenX,V=e.screenY,t||n||!1})(e)&&(I=!0)}function O(){I=!1}},7829:(e,t,n)=>{"use strict";function i(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=i(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}n.d(t,{Z:()=>r});const r=function(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=i(e))&&(r&&(r+=" "),r+=t);return r}}}]);

Zerion Mini Shell 1.0