(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[1317],{"../../node_modules/.pnpm/@wordpress+dataviews@4.3.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@wordpress/dataviews/build-module/components/dataviews/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>DataViews});var selectors_namespaceObject={};__webpack_require__.r(selectors_namespaceObject),__webpack_require__.d(selectors_namespaceObject,{countSelectorsByStatus:()=>countSelectorsByStatus,getCachedResolvers:()=>getCachedResolvers,getIsResolving:()=>getIsResolving,getResolutionError:()=>getResolutionError,getResolutionState:()=>getResolutionState,hasFinishedResolution:()=>hasFinishedResolution,hasResolutionFailed:()=>hasResolutionFailed,hasResolvingSelectors:()=>hasResolvingSelectors,hasStartedResolution:()=>hasStartedResolution,isResolving:()=>isResolving});var actions_namespaceObject={};__webpack_require__.r(actions_namespaceObject),__webpack_require__.d(actions_namespaceObject,{failResolution:()=>failResolution,failResolutions:()=>failResolutions,finishResolution:()=>finishResolution,finishResolutions:()=>finishResolutions,invalidateResolution:()=>invalidateResolution,invalidateResolutionForStore:()=>invalidateResolutionForStore,invalidateResolutionForStoreSelector:()=>invalidateResolutionForStoreSelector,startResolution:()=>startResolution,startResolutions:()=>startResolutions});var component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/h-stack/component.js"),react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@5.7.0/node_modules/@wordpress/i18n/build-module/index.js"),svg=__webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@4.7.0_react@17.0.2/node_modules/@wordpress/primitives/build-module/svg/index.js"),jsx_runtime=__webpack_require__("../../node_modules/.pnpm/react@17.0.2/node_modules/react/jsx-runtime.js");const arrow_up=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),arrow_down=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})}),OPERATOR_IS="is",OPERATOR_IS_NOT="isNot",OPERATOR_IS_ANY="isAny",OPERATOR_IS_NONE="isNone",ALL_OPERATORS=[OPERATOR_IS,OPERATOR_IS_NOT,OPERATOR_IS_ANY,OPERATOR_IS_NONE,"isAll","isNotAll"],OPERATORS={[OPERATOR_IS]:{key:"is-filter",label:(0,build_module.__)("Is")},[OPERATOR_IS_NOT]:{key:"is-not-filter",label:(0,build_module.__)("Is not")},[OPERATOR_IS_ANY]:{key:"is-any-filter",label:(0,build_module.__)("Is any")},[OPERATOR_IS_NONE]:{key:"is-none-filter",label:(0,build_module.__)("Is none")},isAll:{key:"is-all-filter",label:(0,build_module.__)("Is all")},isNotAll:{key:"is-not-all-filter",label:(0,build_module.__)("Is not all")}},SORTING_DIRECTIONS=["asc","desc"],sortArrows={asc:"↑",desc:"↓"},sortValues={asc:"ascending",desc:"descending"},sortLabels={asc:(0,build_module.__)("Sort ascending"),desc:(0,build_module.__)("Sort descending")},sortIcons={asc:arrow_up,desc:arrow_down},LAYOUT_TABLE="table",LAYOUT_GRID="grid",LAYOUT_LIST="list",DataViewsContext=(0,react.createContext)({view:{type:LAYOUT_TABLE},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:item=>item.id,density:0}),dataviews_context=DataViewsContext;var build_module_button=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/button/index.js");const library_funnel=(0,jsx_runtime.jsx)(svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var clsx=__webpack_require__("../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"),flex_item_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/flex/flex-item/component.js"),select_control=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/select-control/index.js"),dropdown=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/dropdown/index.js"),tooltip=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/tooltip/index.js"),build_module_icon=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/icon/index.js"),v_stack_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/v-stack/component.js");let indoc,offset,output,stack;const tokenizer=/<(\/)?(\w+)\s*(\/)?>/g;function createFrame(element,tokenStart,tokenLength,prevOffset,leadingTextStart){return{element,tokenStart,tokenLength,prevOffset,leadingTextStart,children:[]}}const isValidConversionMap=conversionMap=>{const isObject="object"==typeof conversionMap,values=isObject&&Object.values(conversionMap);return isObject&&values.length&&values.every((element=>(0,react.isValidElement)(element)))};function proceed(conversionMap){const next=function nextToken(){const matches=tokenizer.exec(indoc);if(null===matches)return["no-more-tokens"];const startedAt=matches.index,[match,isClosing,name,isSelfClosed]=matches,length=match.length;if(isSelfClosed)return["self-closed",name,startedAt,length];if(isClosing)return["closer",name,startedAt,length];return["opener",name,startedAt,length]}(),[tokenType,name,startOffset,tokenLength]=next,stackDepth=stack.length,leadingTextStart=startOffset>offset?offset:null;if(!conversionMap[name])return addText(),!1;switch(tokenType){case"no-more-tokens":if(0!==stackDepth){const{leadingTextStart:stackLeadingText,tokenStart}=stack.pop();output.push(indoc.substr(stackLeadingText,tokenStart))}return addText(),!1;case"self-closed":return 0===stackDepth?(null!==leadingTextStart&&output.push(indoc.substr(leadingTextStart,startOffset-leadingTextStart)),output.push(conversionMap[name]),offset=startOffset+tokenLength,!0):(addChild(createFrame(conversionMap[name],startOffset,tokenLength)),offset=startOffset+tokenLength,!0);case"opener":return stack.push(createFrame(conversionMap[name],startOffset,tokenLength,startOffset+tokenLength,leadingTextStart)),offset=startOffset+tokenLength,!0;case"closer":if(1===stackDepth)return function closeOuterElement(endOffset){const{element,leadingTextStart,prevOffset,tokenStart,children}=stack.pop(),text=endOffset?indoc.substr(prevOffset,endOffset-prevOffset):indoc.substr(prevOffset);text&&children.push(text);null!==leadingTextStart&&output.push(indoc.substr(leadingTextStart,tokenStart-leadingTextStart));output.push((0,react.cloneElement)(element,null,...children))}(startOffset),offset=startOffset+tokenLength,!0;const stackTop=stack.pop(),text=indoc.substr(stackTop.prevOffset,startOffset-stackTop.prevOffset);stackTop.children.push(text),stackTop.prevOffset=startOffset+tokenLength;const frame=createFrame(stackTop.element,stackTop.tokenStart,stackTop.tokenLength,startOffset+tokenLength);return frame.children=stackTop.children,addChild(frame),offset=startOffset+tokenLength,!0;default:return addText(),!1}}function addText(){const length=indoc.length-offset;0!==length&&output.push(indoc.substr(offset,length))}function addChild(frame){const{element,tokenStart,tokenLength,prevOffset,children}=frame,parent=stack[stack.length-1],text=indoc.substr(parent.prevOffset,tokenStart-parent.prevOffset);text&&parent.children.push(text),parent.children.push((0,react.cloneElement)(element,null,...children)),parent.prevOffset=prevOffset||tokenStart+tokenLength}const create_interpolate_element=(interpolatedString,conversionMap)=>{if(indoc=interpolatedString,offset=0,output=[],stack=[],tokenizer.lastIndex=0,!isValidConversionMap(conversionMap))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(proceed(conversionMap));return(0,react.createElement)(react.Fragment,null,...output)};var close_small=__webpack_require__("../../node_modules/.pnpm/@wordpress+icons@10.7.0_react@17.0.2/node_modules/@wordpress/icons/build-module/library/close-small.js"),WENSINUV=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/WENSINUV.js"),HKOOKEDE=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/HKOOKEDE.js"),ctx=((0,react.createContext)(null),(0,react.createContext)(null),(0,HKOOKEDE.B0)([WENSINUV.ws],[WENSINUV.aN])),useTagContext=ctx.useContext,UVQLZ7T5=(ctx.useScopedContext,ctx.useProviderContext,ctx.ContextProvider,ctx.ScopedContextProvider,__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/UVQLZ7T5.js")),CBC47ZYL=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/CBC47ZYL.js"),_2GXGCHW6=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/2GXGCHW6.js"),Z32BISHQ=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/Z32BISHQ.js"),_3YLGPPWQ=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/3YLGPPWQ.js"),D7EIQZAU=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/D7EIQZAU.js"),_3UYWTADI=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/3UYWTADI.js"),EQQLU3CG=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/EQQLU3CG.js"),PBFD2E7P=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/PBFD2E7P.js"),US4USQPI=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/US4USQPI.js"),_chunks_3YLGPPWQ=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/3YLGPPWQ.js"),isTouchSafari=(0,US4USQPI.nr)()&&(0,US4USQPI.CN)();function createComboboxStore(_a={}){var _b=_a,{tag}=_b,props=(0,_chunks_3YLGPPWQ.YG)(_b,["tag"]);const store=(0,EQQLU3CG.od)(props.store,(0,EQQLU3CG.Up)(tag,["value","rtl"]));(0,EQQLU3CG.UE)(props,store);const tagState=null==tag?void 0:tag.getState(),syncState=null==store?void 0:store.getState(),activeId=(0,PBFD2E7P.Jh)(props.activeId,null==syncState?void 0:syncState.activeId,props.defaultActiveId,null),composite=(0,D7EIQZAU.z)((0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},props),{activeId,includesBaseElement:(0,PBFD2E7P.Jh)(props.includesBaseElement,null==syncState?void 0:syncState.includesBaseElement,!0),orientation:(0,PBFD2E7P.Jh)(props.orientation,null==syncState?void 0:syncState.orientation,"vertical"),focusLoop:(0,PBFD2E7P.Jh)(props.focusLoop,null==syncState?void 0:syncState.focusLoop,!0),focusWrap:(0,PBFD2E7P.Jh)(props.focusWrap,null==syncState?void 0:syncState.focusWrap,!0),virtualFocus:(0,PBFD2E7P.Jh)(props.virtualFocus,null==syncState?void 0:syncState.virtualFocus,!0)})),popover=(0,_3UYWTADI.N)((0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},props),{placement:(0,PBFD2E7P.Jh)(props.placement,null==syncState?void 0:syncState.placement,"bottom-start")})),value=(0,PBFD2E7P.Jh)(props.value,null==syncState?void 0:syncState.value,props.defaultValue,""),selectedValue=(0,PBFD2E7P.Jh)(props.selectedValue,null==syncState?void 0:syncState.selectedValue,null==tagState?void 0:tagState.values,props.defaultSelectedValue,""),multiSelectable=Array.isArray(selectedValue),initialState=(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)({},composite.getState()),popover.getState()),{value,selectedValue,resetValueOnSelect:(0,PBFD2E7P.Jh)(props.resetValueOnSelect,null==syncState?void 0:syncState.resetValueOnSelect,multiSelectable),resetValueOnHide:(0,PBFD2E7P.Jh)(props.resetValueOnHide,null==syncState?void 0:syncState.resetValueOnHide,multiSelectable&&!tag),activeValue:null==syncState?void 0:syncState.activeValue}),combobox=(0,EQQLU3CG.y$)(initialState,composite,popover,store);return isTouchSafari&&(0,EQQLU3CG.mj)(combobox,(()=>(0,EQQLU3CG.OH)(combobox,["virtualFocus"],(()=>{combobox.setState("virtualFocus",!1)})))),(0,EQQLU3CG.mj)(combobox,(()=>{if(tag)return(0,PBFD2E7P.cy)((0,EQQLU3CG.OH)(combobox,["selectedValue"],(state=>{Array.isArray(state.selectedValue)&&tag.setValues(state.selectedValue)})),(0,EQQLU3CG.OH)(tag,["values"],(state=>{combobox.setState("selectedValue",state.values)})))})),(0,EQQLU3CG.mj)(combobox,(()=>(0,EQQLU3CG.OH)(combobox,["resetValueOnHide","mounted"],(state=>{state.resetValueOnHide&&(state.mounted||combobox.setState("value",value))})))),(0,EQQLU3CG.mj)(combobox,(()=>(0,EQQLU3CG.vA)(combobox,["mounted"],(state=>{state.mounted||(combobox.setState("activeId",activeId),combobox.setState("moves",0))})))),(0,EQQLU3CG.mj)(combobox,(()=>(0,EQQLU3CG.OH)(combobox,["moves","activeId"],((state,prevState)=>{state.moves===prevState.moves&&combobox.setState("activeValue",void 0)})))),(0,EQQLU3CG.mj)(combobox,(()=>(0,EQQLU3CG.vA)(combobox,["moves","renderedItems"],((state,prev)=>{if(state.moves===prev.moves)return;const{activeId:activeId2}=combobox.getState(),activeItem=composite.item(activeId2);combobox.setState("activeValue",null==activeItem?void 0:activeItem.value)})))),(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)({},popover),composite),combobox),{tag,setValue:value2=>combobox.setState("value",value2),resetValue:()=>combobox.setState("value",initialState.value),setSelectedValue:selectedValue2=>combobox.setState("selectedValue",selectedValue2)})}function useComboboxStore(props={}){const tag=useTagContext();props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{tag:void 0!==props.tag?props.tag:tag});const[store,update]=(0,_2GXGCHW6.Pj)(createComboboxStore,props);return function useComboboxStoreProps(store,update,props){return(0,Z32BISHQ.w5)(update,[props.tag]),(0,_2GXGCHW6.Tz)(store,props,"value","setValue"),(0,_2GXGCHW6.Tz)(store,props,"selectedValue","setSelectedValue"),(0,_2GXGCHW6.Tz)(store,props,"resetValueOnHide"),(0,_2GXGCHW6.Tz)(store,props,"resetValueOnSelect"),Object.assign((0,UVQLZ7T5.Y)((0,CBC47ZYL.o)(store,update,props),update,props),{tag:props.tag})}(store,update,props)}var _54MGSIOI=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/54MGSIOI.js"),ComboboxListRoleContext=(0,react.createContext)(void 0),DWZ7E5TJ_ctx=(0,HKOOKEDE.B0)([_54MGSIOI.wf,WENSINUV.ws],[_54MGSIOI.s1,WENSINUV.aN]),useComboboxContext=DWZ7E5TJ_ctx.useContext,useComboboxScopedContext=DWZ7E5TJ_ctx.useScopedContext,useComboboxProviderContext=DWZ7E5TJ_ctx.useProviderContext,ComboboxContextProvider=DWZ7E5TJ_ctx.ContextProvider,ComboboxScopedContextProvider=DWZ7E5TJ_ctx.ScopedContextProvider,ComboboxItemValueContext=(0,react.createContext)(void 0),ComboboxItemCheckedContext=(0,react.createContext)(!1);function ComboboxProvider(props={}){const store=useComboboxStore(props);return(0,jsx_runtime.jsx)(ComboboxContextProvider,{value:store,children:props.children})}var useComboboxLabel=(0,HKOOKEDE.ab)((function useComboboxLabel2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=useComboboxProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const comboboxId=store.useState((state=>{var _a2;return null==(_a2=state.baseElement)?void 0:_a2.id}));return props=(0,_3YLGPPWQ.IA)({htmlFor:comboboxId},props),(0,PBFD2E7P.HR)(props)})),ComboboxLabel=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function ComboboxLabel2(props){const htmlProps=useComboboxLabel(props);return(0,HKOOKEDE.n)("label",htmlProps)}))),usePopoverAnchor=(0,HKOOKEDE.ab)((function usePopoverAnchor2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=(0,_54MGSIOI.zG)();return store=store||context,props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{ref:(0,Z32BISHQ.SV)(null==store?void 0:store.setAnchorElement,props.ref)})})),TW35PKTK=((0,HKOOKEDE.Rf)((function PopoverAnchor2(props){const htmlProps=usePopoverAnchor(props);return(0,HKOOKEDE.n)("div",htmlProps)})),__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/TW35PKTK.js")),HWOIWM4O=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/HWOIWM4O.js"),events=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/utils/events.js"),utils_focus=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/utils/focus.js");function isFirstItemAutoSelected(items,activeValue,autoSelect){if(!autoSelect)return!1;const firstItem=items.find((item=>!item.disabled&&item.value));return(null==firstItem?void 0:firstItem.value)===activeValue}function hasCompletionString(value,activeValue){return!!activeValue&&(null!=value&&(value=(0,PBFD2E7P.J2)(value),activeValue.length>value.length&&0===activeValue.toLowerCase().indexOf(value.toLowerCase())))}var useCombobox=(0,HKOOKEDE.ab)((function useCombobox2(_a){var _b=_a,{store,focusable=!0,autoSelect:autoSelectProp=!1,getAutoSelectId,setValueOnChange,showMinLength=0,showOnChange,showOnMouseDown,showOnClick=showOnMouseDown,showOnKeyDown,showOnKeyPress=showOnKeyDown,blurActiveItemOnClick,setValueOnClick=!0,moveOnKeyPress=!0,autoComplete="list"}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","focusable","autoSelect","getAutoSelectId","setValueOnChange","showMinLength","showOnChange","showOnMouseDown","showOnClick","showOnKeyDown","showOnKeyPress","blurActiveItemOnClick","setValueOnClick","moveOnKeyPress","autoComplete"]);const context=useComboboxProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const ref=(0,react.useRef)(null),[valueUpdated,forceValueUpdate]=(0,Z32BISHQ.CH)(),canAutoSelectRef=(0,react.useRef)(!1),composingRef=(0,react.useRef)(!1),autoSelect=store.useState((state=>state.virtualFocus&&autoSelectProp)),inline="inline"===autoComplete||"both"===autoComplete,[canInline,setCanInline]=(0,react.useState)(inline);(0,Z32BISHQ.Kp)((()=>{inline&&setCanInline(!0)}),[inline]);const storeValue=store.useState("value"),prevSelectedValueRef=(0,react.useRef)();(0,react.useEffect)((()=>(0,EQQLU3CG.OH)(store,["selectedValue","activeId"],((_,prev)=>{prevSelectedValueRef.current=prev.selectedValue}))),[]);const inlineActiveValue=store.useState((state=>{var _a2;if(inline&&canInline){if(state.activeValue&&Array.isArray(state.selectedValue)){if(state.selectedValue.includes(state.activeValue))return;if(null==(_a2=prevSelectedValueRef.current)?void 0:_a2.includes(state.activeValue))return}return state.activeValue}})),items=store.useState("renderedItems"),open=store.useState("open"),contentElement=store.useState("contentElement"),value=(0,react.useMemo)((()=>{if(!inline)return storeValue;if(!canInline)return storeValue;if(isFirstItemAutoSelected(items,inlineActiveValue,autoSelect)){if(hasCompletionString(storeValue,inlineActiveValue)){const slice=(null==inlineActiveValue?void 0:inlineActiveValue.slice(storeValue.length))||"";return storeValue+slice}return storeValue}return inlineActiveValue||storeValue}),[inline,canInline,items,inlineActiveValue,autoSelect,storeValue]);(0,react.useEffect)((()=>{const element=ref.current;if(!element)return;const onCompositeItemMove=()=>setCanInline(!0);return element.addEventListener("combobox-item-move",onCompositeItemMove),()=>{element.removeEventListener("combobox-item-move",onCompositeItemMove)}}),[]),(0,react.useEffect)((()=>{if(!inline)return;if(!canInline)return;if(!inlineActiveValue)return;if(!isFirstItemAutoSelected(items,inlineActiveValue,autoSelect))return;if(!hasCompletionString(storeValue,inlineActiveValue))return;let cleanup=PBFD2E7P.lQ;return queueMicrotask((()=>{const element=ref.current;if(!element)return;const{start:prevStart,end:prevEnd}=(0,HWOIWM4O.Zy)(element),nextStart=storeValue.length,nextEnd=inlineActiveValue.length;(0,HWOIWM4O.eG)(element,nextStart,nextEnd),cleanup=()=>{if(!(0,utils_focus.AJ)(element))return;const{start,end}=(0,HWOIWM4O.Zy)(element);start===nextStart&&end===nextEnd&&(0,HWOIWM4O.eG)(element,prevStart,prevEnd)}})),()=>cleanup()}),[valueUpdated,inline,canInline,inlineActiveValue,items,autoSelect,storeValue]);const scrollingElementRef=(0,react.useRef)(null),getAutoSelectIdProp=(0,Z32BISHQ._q)(getAutoSelectId),autoSelectIdRef=(0,react.useRef)(null);(0,react.useEffect)((()=>{if(!open)return;if(!contentElement)return;const scrollingElement=(0,HWOIWM4O.qj)(contentElement);if(!scrollingElement)return;scrollingElementRef.current=scrollingElement;const onUserScroll=()=>{canAutoSelectRef.current=!1},onScroll=()=>{if(!store)return;if(!canAutoSelectRef.current)return;const{activeId}=store.getState();null!==activeId&&activeId!==autoSelectIdRef.current&&(canAutoSelectRef.current=!1)},options={passive:!0,capture:!0};return scrollingElement.addEventListener("wheel",onUserScroll,options),scrollingElement.addEventListener("touchmove",onUserScroll,options),scrollingElement.addEventListener("scroll",onScroll,options),()=>{scrollingElement.removeEventListener("wheel",onUserScroll,!0),scrollingElement.removeEventListener("touchmove",onUserScroll,!0),scrollingElement.removeEventListener("scroll",onScroll,!0)}}),[open,contentElement,store]),(0,Z32BISHQ.UQ)((()=>{storeValue&&(composingRef.current||(canAutoSelectRef.current=!0))}),[storeValue]),(0,Z32BISHQ.UQ)((()=>{"always"!==autoSelect&&open||(canAutoSelectRef.current=open)}),[autoSelect,open]);const resetValueOnSelect=store.useState("resetValueOnSelect");(0,Z32BISHQ.w5)((()=>{var _a2,_b2;const canAutoSelect=canAutoSelectRef.current;if(!store)return;if(!open)return;if(!(autoSelect&&canAutoSelect||resetValueOnSelect))return;const{baseElement,contentElement:contentElement2,activeId}=store.getState();if(!baseElement||(0,utils_focus.AJ)(baseElement)){if(null==contentElement2?void 0:contentElement2.hasAttribute("data-placing")){const observer=new MutationObserver(forceValueUpdate);return observer.observe(contentElement2,{attributeFilter:["data-placing"]}),()=>observer.disconnect()}if(autoSelect&&canAutoSelect){const userAutoSelectId=getAutoSelectIdProp(items),autoSelectId=void 0!==userAutoSelectId?userAutoSelectId:null!=(_a2=function getDefaultAutoSelectId(items){const item=items.find((item2=>{var _a;return!item2.disabled&&"tab"!==(null==(_a=item2.element)?void 0:_a.getAttribute("role"))}));return null==item?void 0:item.id}(items))?_a2:store.first();autoSelectIdRef.current=autoSelectId,store.move(null!=autoSelectId?autoSelectId:null)}else{const element=null==(_b2=store.item(activeId))?void 0:_b2.element;element&&"scrollIntoView"in element&&element.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[store,open,valueUpdated,storeValue,autoSelect,resetValueOnSelect,getAutoSelectIdProp,items]),(0,react.useEffect)((()=>{if(!inline)return;const combobox=ref.current;if(!combobox)return;const elements=[combobox,contentElement].filter((value2=>!!value2)),onBlur2=event=>{elements.every((el=>(0,events.aG)(event,el)))&&(null==store||store.setValue(value))};for(const element of elements)element.addEventListener("focusout",onBlur2);return()=>{for(const element of elements)element.removeEventListener("focusout",onBlur2)}}),[inline,contentElement,store,value]);const canShow=event=>event.currentTarget.value.length>=showMinLength,onChangeProp=props.onChange,showOnChangeProp=(0,Z32BISHQ.O4)(null!=showOnChange?showOnChange:canShow),setValueOnChangeProp=(0,Z32BISHQ.O4)(null!=setValueOnChange?setValueOnChange:!store.tag),onChange=(0,Z32BISHQ._q)((event=>{if(null==onChangeProp||onChangeProp(event),event.defaultPrevented)return;if(!store)return;const currentTarget=event.currentTarget,{value:value2,selectionStart,selectionEnd}=currentTarget,nativeEvent=event.nativeEvent;if(canAutoSelectRef.current=!0,function isInputEvent(event){return"input"===event.type}(nativeEvent)&&(nativeEvent.isComposing&&(canAutoSelectRef.current=!1,composingRef.current=!0),inline)){const textInserted="insertText"===nativeEvent.inputType||"insertCompositionText"===nativeEvent.inputType,caretAtEnd=selectionStart===value2.length;setCanInline(textInserted&&caretAtEnd)}if(setValueOnChangeProp(event)){const isSameValue=value2===store.getState().value;store.setValue(value2),queueMicrotask((()=>{(0,HWOIWM4O.eG)(currentTarget,selectionStart,selectionEnd)})),inline&&autoSelect&&isSameValue&&forceValueUpdate()}showOnChangeProp(event)&&store.show(),autoSelect&&canAutoSelectRef.current||store.setActiveId(null)})),onCompositionEndProp=props.onCompositionEnd,onCompositionEnd=(0,Z32BISHQ._q)((event=>{canAutoSelectRef.current=!0,composingRef.current=!1,null==onCompositionEndProp||onCompositionEndProp(event),event.defaultPrevented||autoSelect&&forceValueUpdate()})),onMouseDownProp=props.onMouseDown,blurActiveItemOnClickProp=(0,Z32BISHQ.O4)(null!=blurActiveItemOnClick?blurActiveItemOnClick:()=>!!(null==store?void 0:store.getState().includesBaseElement)),setValueOnClickProp=(0,Z32BISHQ.O4)(setValueOnClick),showOnClickProp=(0,Z32BISHQ.O4)(null!=showOnClick?showOnClick:canShow),onMouseDown=(0,Z32BISHQ._q)((event=>{null==onMouseDownProp||onMouseDownProp(event),event.defaultPrevented||event.button||event.ctrlKey||store&&(blurActiveItemOnClickProp(event)&&store.setActiveId(null),setValueOnClickProp(event)&&store.setValue(value),showOnClickProp(event)&&(0,events.nz)(event.currentTarget,"mouseup",store.show))})),onKeyDownProp=props.onKeyDown,showOnKeyPressProp=(0,Z32BISHQ.O4)(null!=showOnKeyPress?showOnKeyPress:canShow),onKeyDown=(0,Z32BISHQ._q)((event=>{if(null==onKeyDownProp||onKeyDownProp(event),event.repeat||(canAutoSelectRef.current=!1),event.defaultPrevented)return;if(event.ctrlKey)return;if(event.altKey)return;if(event.shiftKey)return;if(event.metaKey)return;if(!store)return;const{open:open2,activeId}=store.getState();open2||null===activeId&&("ArrowUp"!==event.key&&"ArrowDown"!==event.key||showOnKeyPressProp(event)&&(event.preventDefault(),store.show()))})),onBlurProp=props.onBlur,onBlur=(0,Z32BISHQ._q)((event=>{canAutoSelectRef.current=!1,null==onBlurProp||onBlurProp(event),event.defaultPrevented})),id=(0,Z32BISHQ.Bi)(props.id),ariaAutoComplete=function isAriaAutoCompleteValue(value){return"inline"===value||"list"===value||"both"===value||"none"===value}(autoComplete)?autoComplete:void 0,isActiveItem=store.useState((state=>null===state.activeId));return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({id,role:"combobox","aria-autocomplete":ariaAutoComplete,"aria-haspopup":(0,HWOIWM4O.Tc)(contentElement,"listbox"),"aria-expanded":open,"aria-controls":null==contentElement?void 0:contentElement.id,"data-active-item":isActiveItem||void 0,value},props),{ref:(0,Z32BISHQ.SV)(ref,props.ref),onChange,onCompositionEnd,onMouseDown,onKeyDown,onBlur}),props=(0,TW35PKTK.T)((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store,focusable},props),{moveOnKeyPress:event=>!(0,PBFD2E7P.zO)(moveOnKeyPress,event)&&(inline&&setCanInline(!0),!0)})),props=usePopoverAnchor((0,_3YLGPPWQ.IA)({store},props)),(0,_3YLGPPWQ.IA)({autoComplete:"off"},props)})),Combobox=(0,HKOOKEDE.Rf)((function Combobox2(props){const htmlProps=useCombobox(props);return(0,HKOOKEDE.n)("input",htmlProps)})),BSEL4YAF=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/BSEL4YAF.js"),useComboboxList=(0,HKOOKEDE.ab)((function useComboboxList2(_a){var _b=_a,{store,alwaysVisible}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","alwaysVisible"]);const scopedContext=useComboboxScopedContext(!0),context=useComboboxContext(),scopedContextSameStore=!!(store=store||context)&&store===scopedContext;(0,PBFD2E7P.V1)(store,!1);const ref=(0,react.useRef)(null),id=(0,Z32BISHQ.Bi)(props.id),mounted=store.useState("mounted"),hidden=(0,BSEL4YAF.dK)(mounted,props.hidden,alwaysVisible),style=hidden?(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props.style),{display:"none"}):props.style,multiSelectable=store.useState((state=>Array.isArray(state.selectedValue))),role=(0,Z32BISHQ.Cy)(ref,"role",props.role),ariaMultiSelectable=("listbox"===role||"tree"===role||"grid"===role)&&multiSelectable||void 0,[hasListboxInside,setHasListboxInside]=(0,react.useState)(!1),contentElement=store.useState("contentElement");(0,Z32BISHQ.UQ)((()=>{if(!mounted)return;const element=ref.current;if(!element)return;if(contentElement!==element)return;const callback=()=>{setHasListboxInside(!!element.querySelector("[role='listbox']"))},observer=new MutationObserver(callback);return observer.observe(element,{subtree:!0,childList:!0,attributeFilter:["role"]}),callback(),()=>observer.disconnect()}),[mounted,contentElement]),hasListboxInside||(props=(0,_3YLGPPWQ.IA)({role:"listbox","aria-multiselectable":ariaMultiSelectable},props)),props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(ComboboxScopedContextProvider,{value:store,children:(0,jsx_runtime.jsx)(ComboboxListRoleContext.Provider,{value:role,children:element})})),[store,role]);const setContentElement=!id||scopedContext&&scopedContextSameStore?null:store.setContentElement;return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({id,hidden},props),{ref:(0,Z32BISHQ.SV)(setContentElement,ref,props.ref),style}),(0,PBFD2E7P.HR)(props)})),ComboboxList=(0,HKOOKEDE.Rf)((function ComboboxList2(props){const htmlProps=useComboboxList(props);return(0,HKOOKEDE.n)("div",htmlProps)}));function getMouseDestination(event){const relatedTarget=event.relatedTarget;return(null==relatedTarget?void 0:relatedTarget.nodeType)===Node.ELEMENT_NODE?relatedTarget:null}var symbol=Symbol("composite-hover");var useCompositeHover=(0,HKOOKEDE.ab)((function useCompositeHover2(_a){var _b=_a,{store,focusOnHover=!0,blurOnHoverEnd=!!focusOnHover}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","focusOnHover","blurOnHoverEnd"]);const context=(0,WENSINUV.k)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const isMouseMoving=(0,Z32BISHQ.P$)(),onMouseMoveProp=props.onMouseMove,focusOnHoverProp=(0,Z32BISHQ.O4)(focusOnHover),onMouseMove=(0,Z32BISHQ._q)((event=>{if(null==onMouseMoveProp||onMouseMoveProp(event),!event.defaultPrevented&&isMouseMoving()&&focusOnHoverProp(event)){if(!(0,utils_focus.oW)(event.currentTarget)){const baseElement=null==store?void 0:store.getState().baseElement;baseElement&&!(0,utils_focus.AJ)(baseElement)&&baseElement.focus()}null==store||store.setActiveId(event.currentTarget.id)}})),onMouseLeaveProp=props.onMouseLeave,blurOnHoverEndProp=(0,Z32BISHQ.O4)(blurOnHoverEnd),onMouseLeave=(0,Z32BISHQ._q)((event=>{var _a2;null==onMouseLeaveProp||onMouseLeaveProp(event),event.defaultPrevented||isMouseMoving()&&(function hoveringInside(event){const nextElement=getMouseDestination(event);return!!nextElement&&(0,HWOIWM4O.gR)(event.currentTarget,nextElement)}(event)||function movingToAnotherItem(event){let dest=getMouseDestination(event);if(!dest)return!1;do{if((0,PBFD2E7P.mQ)(dest,symbol)&&dest[symbol])return!0;dest=dest.parentElement}while(dest);return!1}(event)||focusOnHoverProp(event)&&blurOnHoverEndProp(event)&&(null==store||store.setActiveId(null),null==(_a2=null==store?void 0:store.getState().baseElement)||_a2.focus()))})),ref=(0,react.useCallback)((element=>{element&&(element[symbol]=!0)}),[]);return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{ref:(0,Z32BISHQ.SV)(ref,props.ref),onMouseMove,onMouseLeave}),(0,PBFD2E7P.HR)(props)})),OBZMLI6J_CompositeHover=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function CompositeHover2(props){const htmlProps=useCompositeHover(props);return(0,HKOOKEDE.n)("div",htmlProps)}))),_3CCTMYB6=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/3CCTMYB6.js");function getItemRole(popupRole){var _a;return null!=(_a={menu:"menuitem",listbox:"option",tree:"treeitem"}[popupRole])?_a:"option"}var useComboboxItem=(0,HKOOKEDE.ab)((function useComboboxItem2(_a){var _a2,_b=_a,{store,value,hideOnClick,setValueOnClick,selectValueOnClick=!0,resetValueOnSelect,focusOnHover=!1,moveOnKeyPress=!0,getItem:getItemProp}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","value","hideOnClick","setValueOnClick","selectValueOnClick","resetValueOnSelect","focusOnHover","moveOnKeyPress","getItem"]);const context=useComboboxScopedContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const getItem=(0,react.useCallback)((item=>{const nextItem=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},item),{value});return getItemProp?getItemProp(nextItem):nextItem}),[value,getItemProp]),multiSelectable=store.useState((state=>Array.isArray(state.selectedValue))),selected=store.useState((state=>function isSelected(storeValue,itemValue){if(null!=itemValue)return null!=storeValue&&(Array.isArray(storeValue)?storeValue.includes(itemValue):storeValue===itemValue)}(state.selectedValue,value))),resetValueOnSelectState=store.useState("resetValueOnSelect");setValueOnClick=null!=setValueOnClick?setValueOnClick:!multiSelectable,hideOnClick=null!=hideOnClick?hideOnClick:null!=value&&!multiSelectable;const onClickProp=props.onClick,setValueOnClickProp=(0,Z32BISHQ.O4)(setValueOnClick),selectValueOnClickProp=(0,Z32BISHQ.O4)(selectValueOnClick),resetValueOnSelectProp=(0,Z32BISHQ.O4)(null!=(_a2=null!=resetValueOnSelect?resetValueOnSelect:resetValueOnSelectState)?_a2:multiSelectable),hideOnClickProp=(0,Z32BISHQ.O4)(hideOnClick),onClick=(0,Z32BISHQ._q)((event=>{null==onClickProp||onClickProp(event),event.defaultPrevented||(0,events.RN)(event)||(0,events.$b)(event)||(null!=value&&(selectValueOnClickProp(event)&&(resetValueOnSelectProp(event)&&(null==store||store.resetValue()),null==store||store.setSelectedValue((prevValue=>Array.isArray(prevValue)?prevValue.includes(value)?prevValue.filter((v=>v!==value)):[...prevValue,value]:value))),setValueOnClickProp(event)&&(null==store||store.setValue(value))),hideOnClickProp(event)&&(null==store||store.hide()))})),onKeyDownProp=props.onKeyDown,onKeyDown=(0,Z32BISHQ._q)((event=>{if(null==onKeyDownProp||onKeyDownProp(event),event.defaultPrevented)return;const baseElement=null==store?void 0:store.getState().baseElement;if(!baseElement)return;if((0,utils_focus.AJ)(baseElement))return;(1===event.key.length||"Backspace"===event.key||"Delete"===event.key)&&(queueMicrotask((()=>baseElement.focus())),(0,HWOIWM4O.mB)(baseElement)&&(null==store||store.setValue(baseElement.value)))}));multiSelectable&&null!=selected&&(props=(0,_3YLGPPWQ.IA)({"aria-selected":selected},props)),props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(ComboboxItemValueContext.Provider,{value,children:(0,jsx_runtime.jsx)(ComboboxItemCheckedContext.Provider,{value:null!=selected&&selected,children:element})})),[value,selected]);const popupRole=(0,react.useContext)(ComboboxListRoleContext);props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({role:getItemRole(popupRole),children:value},props),{onClick,onKeyDown});const moveOnKeyPressProp=(0,Z32BISHQ.O4)(moveOnKeyPress);return props=(0,_3CCTMYB6.k)((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store},props),{getItem,moveOnKeyPress:event=>{if(!moveOnKeyPressProp(event))return!1;const moveEvent=new Event("combobox-item-move"),baseElement=null==store?void 0:store.getState().baseElement;return null==baseElement||baseElement.dispatchEvent(moveEvent),!0}})),props=useCompositeHover((0,_3YLGPPWQ.IA)({store,focusOnHover},props))})),ComboboxItem=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function ComboboxItem2(props){const htmlProps=useComboboxItem(props);return(0,HKOOKEDE.n)("div",htmlProps)}))),_7PRQYBBV=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js");function normalizeValue(value){return(0,PBFD2E7P.J2)(value).toLowerCase()}var useComboboxItemValue=(0,HKOOKEDE.ab)((function useComboboxItemValue2(_a){var _b=_a,{store,value,userValue}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","value","userValue"]);const context=useComboboxScopedContext();store=store||context;const itemContext=(0,react.useContext)(ComboboxItemValueContext),itemValue=null!=value?value:itemContext,inputValue=(0,_2GXGCHW6.O$)(store,(state=>null!=userValue?userValue:null==state?void 0:state.value)),children=(0,react.useMemo)((()=>{if(itemValue)return inputValue?function splitValue(itemValue,userValue){if(!itemValue)return itemValue;if(!userValue)return itemValue;const userValues=(0,_7PRQYBBV.$r)(userValue).filter(Boolean).map(normalizeValue),parts=[],span=(value,autocomplete=!1)=>(0,jsx_runtime.jsx)("span",{"data-autocomplete-value":autocomplete?"":void 0,"data-user-value":autocomplete?void 0:"",children:value},parts.length),offsets=function sortOffsets(offsets){return offsets.sort((([a],[b])=>a-b))}(function filterOverlappingOffsets(offsets){return offsets.filter((([offset,length],i,arr)=>!arr.some((([o,l],j)=>j!==i&&o<=offset&&o+l>=offset+length))))}(function getOffsets(string,values){const offsets=[];for(const value of values){let pos=0;const length=value.length;for(;-1!==string.indexOf(value,pos);){const index=string.indexOf(value,pos);-1!==index&&offsets.push([index,length]),pos=index+1}}return offsets}(normalizeValue(itemValue),new Set(userValues))));if(!offsets.length)return parts.push(span(itemValue,!0)),parts;const[firstOffset]=offsets[0],values=[itemValue.slice(0,firstOffset),...offsets.flatMap((([offset,length],i)=>{var _a;const value=itemValue.slice(offset,offset+length),nextOffset=null==(_a=offsets[i+1])?void 0:_a[0];return[value,itemValue.slice(offset+length,nextOffset)]}))];return values.forEach(((value,i)=>{value&&parts.push(span(value,i%2==0))})),parts}(itemValue,inputValue):itemValue}),[itemValue,inputValue]);return props=(0,_3YLGPPWQ.IA)({children},props),(0,PBFD2E7P.HR)(props)})),ComboboxItemValue=(0,HKOOKEDE.Rf)((function ComboboxItemValue2(props){const htmlProps=useComboboxItemValue(props);return(0,HKOOKEDE.n)("span",htmlProps)})),remove_accents=__webpack_require__("../../node_modules/.pnpm/remove-accents@0.5.0/node_modules/remove-accents/index.js"),remove_accents_default=__webpack_require__.n(remove_accents),use_instance_id=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");const CompositeContext=(0,react.createContext)(void 0),useCompositeContext=()=>(0,react.useContext)(CompositeContext);var GroupLabelContext=(0,react.createContext)(void 0),useGroup=(0,HKOOKEDE.ab)((function useGroup2(props){const[labelId,setLabelId]=(0,react.useState)();return props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(GroupLabelContext.Provider,{value:setLabelId,children:element})),[]),props=(0,_3YLGPPWQ.IA)({role:"group","aria-labelledby":labelId},props),(0,PBFD2E7P.HR)(props)})),useCompositeGroup=((0,HKOOKEDE.Rf)((function Group2(props){const htmlProps=useGroup(props);return(0,HKOOKEDE.n)("div",htmlProps)})),(0,HKOOKEDE.ab)((function useCompositeGroup2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);return props=useGroup(props)}))),IEKMDIUY_CompositeGroup=(0,HKOOKEDE.Rf)((function CompositeGroup2(props){const htmlProps=useCompositeGroup(props);return(0,HKOOKEDE.n)("div",htmlProps)}));const CompositeGroup=(0,react.forwardRef)((function CompositeGroup(props,ref){const context=useCompositeContext();return(0,jsx_runtime.jsx)(IEKMDIUY_CompositeGroup,{store:context?.store,...props,ref})}));var useGroupLabel=(0,HKOOKEDE.ab)((function useGroupLabel2(props){const setLabelId=(0,react.useContext)(GroupLabelContext),id=(0,Z32BISHQ.Bi)(props.id);return(0,Z32BISHQ.UQ)((()=>(null==setLabelId||setLabelId(id),()=>null==setLabelId?void 0:setLabelId(void 0))),[setLabelId,id]),props=(0,_3YLGPPWQ.IA)({id,"aria-hidden":!0},props),(0,PBFD2E7P.HR)(props)})),useCompositeGroupLabel=((0,HKOOKEDE.Rf)((function GroupLabel2(props){const htmlProps=useGroupLabel(props);return(0,HKOOKEDE.n)("div",htmlProps)})),(0,HKOOKEDE.ab)((function useCompositeGroupLabel2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);return props=useGroupLabel(props)}))),Y2MAXF6C_CompositeGroupLabel=(0,HKOOKEDE.Rf)((function CompositeGroupLabel2(props){const htmlProps=useCompositeGroupLabel(props);return(0,HKOOKEDE.n)("div",htmlProps)}));const CompositeGroupLabel=(0,react.forwardRef)((function CompositeGroupLabel(props,ref){const context=useCompositeContext();return(0,jsx_runtime.jsx)(Y2MAXF6C_CompositeGroupLabel,{store:context?.store,...props,ref})})),CompositeHover=(0,react.forwardRef)((function CompositeHover(props,ref){const context=useCompositeContext();return(0,jsx_runtime.jsx)(OBZMLI6J_CompositeHover,{store:context?.store,...props,ref})})),CompositeItem=(0,react.forwardRef)((function CompositeItem(props,ref){const context=useCompositeContext();return(0,jsx_runtime.jsx)(_3CCTMYB6.l,{store:context?.store,...props,ref})}));var useCompositeRow=(0,HKOOKEDE.ab)((function useCompositeRow2(_a){var _b=_a,{store,"aria-setsize":ariaSetSize,"aria-posinset":ariaPosInSet}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","aria-setsize","aria-posinset"]);const context=(0,WENSINUV.k)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const id=(0,Z32BISHQ.Bi)(props.id),baseElement=store.useState((state=>state.baseElement||void 0)),providerValue=(0,react.useMemo)((()=>({id,baseElement,ariaSetSize,ariaPosInSet})),[id,baseElement,ariaSetSize,ariaPosInSet]);return props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(WENSINUV.$o.Provider,{value:providerValue,children:element})),[providerValue]),props=(0,_3YLGPPWQ.IA)({id},props),(0,PBFD2E7P.HR)(props)})),_6BE7QOX5_CompositeRow=(0,HKOOKEDE.Rf)((function CompositeRow2(props){const htmlProps=useCompositeRow(props);return(0,HKOOKEDE.n)("div",htmlProps)}));const CompositeRow=(0,react.forwardRef)((function CompositeRow(props,ref){const context=useCompositeContext();return(0,jsx_runtime.jsx)(_6BE7QOX5_CompositeRow,{store:context?.store,...props,ref})}));var _5VQZOHHZ=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/5VQZOHHZ.js"),chars="";function clearChars(){chars=""}function itemTextStartsWith(item,text){var _a;const itemText=(null==(_a=item.element)?void 0:_a.textContent)||item.children||"value"in item&&item.value;return!!itemText&&(0,PBFD2E7P.J2)(itemText).trim().toLowerCase().startsWith(text.toLowerCase())}var useCompositeTypeahead=(0,HKOOKEDE.ab)((function useCompositeTypeahead2(_a){var _b=_a,{store,typeahead=!0}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","typeahead"]);const context=(0,WENSINUV.k)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const onKeyDownCaptureProp=props.onKeyDownCapture,cleanupTimeoutRef=(0,react.useRef)(0),onKeyDownCapture=(0,Z32BISHQ._q)((event=>{if(null==onKeyDownCaptureProp||onKeyDownCaptureProp(event),event.defaultPrevented)return;if(!typeahead)return;if(!store)return;const{renderedItems,items,activeId}=store.getState();if(!function isValidTypeaheadEvent(event){const target=event.target;return(!target||!(0,HWOIWM4O.mB)(target))&&(!(" "!==event.key||!chars.length)||1===event.key.length&&!event.ctrlKey&&!event.altKey&&!event.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(event.key))}(event))return clearChars();let enabledItems=function getEnabledItems(items){return items.filter((item=>!item.disabled))}(renderedItems.length?renderedItems:items);if(!function isSelfTargetOrItem(event,items){if((0,events.uh)(event))return!0;const target=event.target;if(!target)return!1;const isItem=items.some((item=>item.element===target));return isItem}(event,enabledItems))return clearChars();event.preventDefault(),window.clearTimeout(cleanupTimeoutRef.current),cleanupTimeoutRef.current=window.setTimeout((()=>{chars=""}),500);const char=event.key.toLowerCase();chars+=char,enabledItems=function getSameInitialItems(items,char,activeId){if(!activeId)return items;const activeItem=items.find((item=>item.id===activeId));return activeItem&&itemTextStartsWith(activeItem,char)?chars!==char&&itemTextStartsWith(activeItem,chars)?items:(chars=char,(0,_5VQZOHHZ._d)(items.filter((item=>itemTextStartsWith(item,chars))),activeId).filter((item=>item.id!==activeId))):items}(enabledItems,char,activeId);const item=enabledItems.find((item2=>itemTextStartsWith(item2,chars)));item?store.move(item.id):clearChars()}));return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{onKeyDownCapture}),(0,PBFD2E7P.HR)(props)})),DS36B3MQ_CompositeTypeahead=(0,HKOOKEDE.Rf)((function CompositeTypeahead2(props){const htmlProps=useCompositeTypeahead(props);return(0,HKOOKEDE.n)("div",htmlProps)}));const CompositeTypeahead=(0,react.forwardRef)((function CompositeTypeahead(props,ref){const context=useCompositeContext();return(0,jsx_runtime.jsx)(DS36B3MQ_CompositeTypeahead,{store:context?.store,...props,ref})})),Composite=Object.assign((0,react.forwardRef)((function Composite({activeId,defaultActiveId,setActiveId,focusLoop=!1,focusWrap=!1,focusShift=!1,virtualFocus=!1,orientation="both",rtl=!1,children,disabled=!1,store:storeProp,...props},ref){const newStore=UVQLZ7T5.q({activeId,defaultActiveId,setActiveId,focusLoop,focusWrap,focusShift,virtualFocus,orientation,rtl}),store=storeProp||newStore,contextValue=(0,react.useMemo)((()=>({store})),[store]);return(0,jsx_runtime.jsx)(TW35PKTK.e,{disabled,store,...props,ref,children:(0,jsx_runtime.jsx)(CompositeContext.Provider,{value:contextValue,children})})})),{Group:Object.assign(CompositeGroup,{displayName:"Composite.Group"}),GroupLabel:Object.assign(CompositeGroupLabel,{displayName:"Composite.GroupLabel"}),Item:Object.assign(CompositeItem,{displayName:"Composite.Item"}),Row:Object.assign(CompositeRow,{displayName:"Composite.Row"}),Hover:Object.assign(CompositeHover,{displayName:"Composite.Hover"}),Typeahead:Object.assign(CompositeTypeahead,{displayName:"Composite.Typeahead"}),Context:Object.assign(CompositeContext,{displayName:"Composite.Context"})});var utils=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/popover/utils.js"),slot_fill=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/slot-fill/index.js"),CTQR3VDU=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/CTQR3VDU.js"),menu=(0,HKOOKEDE.B0)([WENSINUV.ws,CTQR3VDU.pR],[WENSINUV.aN,CTQR3VDU.n0]),useMenuContext=menu.useContext,useMenuScopedContext=menu.useScopedContext,useMenuProviderContext=menu.useProviderContext,MenuContextProvider=menu.ContextProvider,MenuScopedContextProvider=menu.ScopedContextProvider,MenuItemCheckedContext=(0,react.createContext)(void 0),menubar=(0,HKOOKEDE.B0)([WENSINUV.ws],[WENSINUV.aN]),WSQNIDGC_useMenubarContext=menubar.useContext,WSQNIDGC_useMenubarScopedContext=menubar.useScopedContext,XMDAT5SM=(menubar.useProviderContext,menubar.ContextProvider,menubar.ScopedContextProvider,(0,react.createContext)(void 0),__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/XMDAT5SM.js")),EACLTACN=__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/EACLTACN.js");function createMenuStore(_a={}){var _b=_a,{combobox,parent,menubar}=_b,props=(0,_chunks_3YLGPPWQ.YG)(_b,["combobox","parent","menubar"]);const parentIsMenubar=!!menubar&&!parent,store=(0,EQQLU3CG.od)(props.store,(0,EQQLU3CG.Up)(parent,["values"]),(0,EQQLU3CG.cJ)(combobox,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));(0,EQQLU3CG.UE)(props,store);const syncState=store.getState(),composite=(0,D7EIQZAU.z)((0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},props),{store,orientation:(0,PBFD2E7P.Jh)(props.orientation,syncState.orientation,"vertical")})),hovercard=(0,EACLTACN.y)((0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},props),{store,placement:(0,PBFD2E7P.Jh)(props.placement,syncState.placement,"bottom-start"),timeout:(0,PBFD2E7P.Jh)(props.timeout,syncState.timeout,parentIsMenubar?0:150),hideTimeout:(0,PBFD2E7P.Jh)(props.hideTimeout,syncState.hideTimeout,0)})),initialState=(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)({},composite.getState()),hovercard.getState()),{initialFocus:(0,PBFD2E7P.Jh)(syncState.initialFocus,"container"),values:(0,PBFD2E7P.Jh)(props.values,syncState.values,props.defaultValues,{})}),menu=(0,EQQLU3CG.y$)(initialState,composite,hovercard,store);return(0,EQQLU3CG.mj)(menu,(()=>(0,EQQLU3CG.OH)(menu,["mounted"],(state=>{state.mounted||menu.setState("activeId",null)})))),(0,EQQLU3CG.mj)(menu,(()=>(0,EQQLU3CG.OH)(parent,["orientation"],(state=>{menu.setState("placement","vertical"===state.orientation?"right-start":"bottom-start")})))),(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)({},composite),hovercard),menu),{combobox,parent,menubar,hideAll:()=>{hovercard.hide(),null==parent||parent.hideAll()},setInitialFocus:value=>menu.setState("initialFocus",value),setValues:values=>menu.setState("values",values),setValue:(name,value)=>{"__proto__"!==name&&"constructor"!==name&&(Array.isArray(name)||menu.setState("values",(values=>{const prevValue=values[name],nextValue=(0,PBFD2E7P.Qh)(value,prevValue);return nextValue===prevValue?values:(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},values),{[name]:void 0!==nextValue&&nextValue})})))}})}function useMenuStore(props={}){const parent=useMenuContext(),menubar=WSQNIDGC_useMenubarContext(),combobox=useComboboxProviderContext();props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{parent:void 0!==props.parent?props.parent:parent,menubar:void 0!==props.menubar?props.menubar:menubar,combobox:void 0!==props.combobox?props.combobox:combobox});const[store,update]=(0,_2GXGCHW6.Pj)(createMenuStore,props);return function useMenuStoreProps(store,update,props){return(0,Z32BISHQ.w5)(update,[props.combobox,props.parent,props.menubar]),(0,_2GXGCHW6.Tz)(store,props,"values","setValues"),Object.assign((0,XMDAT5SM.B)((0,UVQLZ7T5.Y)(store,update,props),update,props),{combobox:props.combobox,parent:props.parent,menubar:props.menubar})}(store,update,props)}var NAXN2XAB=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/NAXN2XAB.js"),useButton=(0,HKOOKEDE.ab)((function useButton2(props){const ref=(0,react.useRef)(null),tagName=(0,Z32BISHQ.vO)(ref,"button"),[isNativeButton,setIsNativeButton]=(0,react.useState)((()=>!!tagName&&(0,HWOIWM4O.Bm)({tagName,type:props.type})));return(0,react.useEffect)((()=>{ref.current&&setIsNativeButton((0,HWOIWM4O.Bm)(ref.current))}),[]),props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({role:isNativeButton||"a"===tagName?void 0:"button"},props),{ref:(0,Z32BISHQ.SV)(ref,props.ref)}),props=(0,NAXN2XAB.D)(props)})),RGUP62TM=((0,HKOOKEDE.Rf)((function Button2(props){const htmlProps=useButton(props);return(0,HKOOKEDE.n)("button",htmlProps)})),__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/RGUP62TM.js")),O3TNZQBF_symbol=Symbol("disclosure"),useDisclosure=(0,HKOOKEDE.ab)((function useDisclosure2(_a){var _b=_a,{store,toggleOnClick=!0}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","toggleOnClick"]);const context=(0,RGUP62TM.vO)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const ref=(0,react.useRef)(null),[expanded,setExpanded]=(0,react.useState)(!1),disclosureElement=store.useState("disclosureElement"),open=store.useState("open");(0,react.useEffect)((()=>{let isCurrentDisclosure=disclosureElement===ref.current;(null==disclosureElement?void 0:disclosureElement.isConnected)||(null==store||store.setDisclosureElement(ref.current),isCurrentDisclosure=!0),setExpanded(open&&isCurrentDisclosure)}),[disclosureElement,store,open]);const onClickProp=props.onClick,toggleOnClickProp=(0,Z32BISHQ.O4)(toggleOnClick),[isDuplicate,metadataProps]=(0,Z32BISHQ.P1)(props,O3TNZQBF_symbol,!0),onClick=(0,Z32BISHQ._q)((event=>{null==onClickProp||onClickProp(event),event.defaultPrevented||isDuplicate||toggleOnClickProp(event)&&(null==store||store.setDisclosureElement(event.currentTarget),null==store||store.toggle())})),contentElement=store.useState("contentElement");return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)((0,_3YLGPPWQ.IA)({"aria-expanded":expanded,"aria-controls":null==contentElement?void 0:contentElement.id},metadataProps),props),{ref:(0,Z32BISHQ.SV)(ref,props.ref),onClick}),props=useButton(props)})),DU4D3UCJ=((0,HKOOKEDE.Rf)((function Disclosure2(props){const htmlProps=useDisclosure(props);return(0,HKOOKEDE.n)("button",htmlProps)})),__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/DU4D3UCJ.js")),useDialogDisclosure=(0,HKOOKEDE.ab)((function useDialogDisclosure2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=(0,DU4D3UCJ.cH)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const contentElement=store.useState("contentElement");return props=(0,_3YLGPPWQ.IA)({"aria-haspopup":(0,HWOIWM4O.Tc)(contentElement,"dialog")},props),props=useDisclosure((0,_3YLGPPWQ.IA)({store},props))})),usePopoverDisclosure=((0,HKOOKEDE.Rf)((function DialogDisclosure2(props){const htmlProps=useDialogDisclosure(props);return(0,HKOOKEDE.n)("button",htmlProps)})),(0,HKOOKEDE.ab)((function usePopoverDisclosure2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=(0,_54MGSIOI.zG)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const onClickProp=props.onClick,onClick=(0,Z32BISHQ._q)((event=>{null==store||store.setAnchorElement(event.currentTarget),null==onClickProp||onClickProp(event)}));return props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(_54MGSIOI.s1,{value:store,children:element})),[store]),props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{onClick}),props=usePopoverAnchor((0,_3YLGPPWQ.IA)({store},props)),props=useDialogDisclosure((0,_3YLGPPWQ.IA)({store},props))}))),QA27FYGF=((0,HKOOKEDE.Rf)((function PopoverDisclosure2(props){const htmlProps=usePopoverDisclosure(props);return(0,HKOOKEDE.n)("button",htmlProps)})),__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/QA27FYGF.js")),AXRBYZQP=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/AXRBYZQP.js");function hasActiveItem(items,excludeElement){return!!(null==items?void 0:items.some((item=>!!item.element&&(item.element!==excludeElement&&"true"===item.element.getAttribute("aria-expanded")))))}var useMenuButton=(0,HKOOKEDE.ab)((function useMenuButton2(_a){var _b=_a,{store,focusable,accessibleWhenDisabled,showOnHover}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","focusable","accessibleWhenDisabled","showOnHover"]);const context=useMenuProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const ref=(0,react.useRef)(null),parentMenu=store.parent,parentMenubar=store.menubar,hasParentMenu=!!parentMenu,parentIsMenubar=!!parentMenubar&&!hasParentMenu,disabled=(0,PBFD2E7P.$f)(props),showMenu=()=>{const trigger=ref.current;trigger&&(null==store||store.setDisclosureElement(trigger),null==store||store.setAnchorElement(trigger),null==store||store.show())},onFocusProp=props.onFocus,onFocus=(0,Z32BISHQ._q)((event=>{if(null==onFocusProp||onFocusProp(event),disabled)return;if(event.defaultPrevented)return;if(null==store||store.setAutoFocusOnShow(!1),null==store||store.setActiveId(null),!parentMenubar)return;if(!parentIsMenubar)return;const{items}=parentMenubar.getState();hasActiveItem(items,event.currentTarget)&&showMenu()})),dir=store.useState((state=>state.placement.split("-")[0])),onKeyDownProp=props.onKeyDown,onKeyDown=(0,Z32BISHQ._q)((event=>{if(null==onKeyDownProp||onKeyDownProp(event),disabled)return;if(event.defaultPrevented)return;const initialFocus=function getInitialFocus(event,dir){return{ArrowDown:("bottom"===dir||"top"===dir)&&"first",ArrowUp:("bottom"===dir||"top"===dir)&&"last",ArrowRight:"right"===dir&&"first",ArrowLeft:"left"===dir&&"first"}[event.key]}(event,dir);initialFocus&&(event.preventDefault(),showMenu(),null==store||store.setAutoFocusOnShow(!0),null==store||store.setInitialFocus(initialFocus))})),onClickProp=props.onClick,onClick=(0,Z32BISHQ._q)((event=>{if(null==onClickProp||onClickProp(event),event.defaultPrevented)return;if(!store)return;const isKeyboardClick=!event.detail,{open}=store.getState();open&&!isKeyboardClick||(hasParentMenu&&!isKeyboardClick||store.setAutoFocusOnShow(!0),store.setInitialFocus(isKeyboardClick?"first":"container")),hasParentMenu&&showMenu()}));props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(MenuContextProvider,{value:store,children:element})),[store]),hasParentMenu&&(props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{render:(0,jsx_runtime.jsx)(AXRBYZQP.X.div,{render:props.render})}));const id=(0,Z32BISHQ.Bi)(props.id),parentContentElement=(0,_2GXGCHW6.O$)((null==parentMenu?void 0:parentMenu.combobox)||parentMenu,"contentElement"),role=hasParentMenu||parentIsMenubar?(0,HWOIWM4O.cn)(parentContentElement,"menuitem"):void 0,contentElement=store.useState("contentElement");return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({id,role,"aria-haspopup":(0,HWOIWM4O.Tc)(contentElement,"menu")},props),{ref:(0,Z32BISHQ.SV)(ref,props.ref),onFocus,onKeyDown,onClick}),props=(0,QA27FYGF.p)((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store,focusable,accessibleWhenDisabled},props),{showOnHover:event=>{if(!(()=>{if("function"==typeof showOnHover)return showOnHover(event);if(null!=showOnHover)return showOnHover;if(hasParentMenu)return!0;if(!parentMenubar)return!1;const{items}=parentMenubar.getState();return parentIsMenubar&&hasActiveItem(items)})())return!1;const parent=parentIsMenubar?parentMenubar:parentMenu;return!parent||(parent.setActiveId(event.currentTarget.id),!0)}})),props=usePopoverDisclosure((0,_3YLGPPWQ.IA)({store,toggleOnClick:!hasParentMenu,focusable,accessibleWhenDisabled},props)),props=useCompositeTypeahead((0,_3YLGPPWQ.IA)({store,typeahead:parentIsMenubar},props))})),MenuButton=(0,HKOOKEDE.Rf)((function MenuButton2(props){const htmlProps=useMenuButton(props);return(0,HKOOKEDE.n)("button",htmlProps)}));var useMenuList=(0,HKOOKEDE.ab)((function useMenuList2(_a){var _b=_a,{store,alwaysVisible,composite}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","alwaysVisible","composite"]);const context=useMenuProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const parentMenu=store.parent,parentMenubar=store.menubar,hasParentMenu=!!parentMenu,id=(0,Z32BISHQ.Bi)(props.id),onKeyDownProp=props.onKeyDown,dir=store.useState((state=>state.placement.split("-")[0])),orientation=store.useState((state=>"both"===state.orientation?void 0:state.orientation)),isHorizontal="vertical"!==orientation,isMenubarHorizontal=(0,_2GXGCHW6.O$)(parentMenubar,(state=>!!state&&"vertical"!==state.orientation)),onKeyDown=(0,Z32BISHQ._q)((event=>{if(null==onKeyDownProp||onKeyDownProp(event),!event.defaultPrevented){if(hasParentMenu||parentMenubar&&!isHorizontal){const action={ArrowRight:()=>"left"===dir&&!isHorizontal,ArrowLeft:()=>"right"===dir&&!isHorizontal,ArrowUp:()=>"bottom"===dir&&isHorizontal,ArrowDown:()=>"top"===dir&&isHorizontal}[event.key];if(null==action?void 0:action())return event.stopPropagation(),event.preventDefault(),null==store?void 0:store.hide()}if(parentMenubar){const action={ArrowRight:()=>{if(isMenubarHorizontal)return parentMenubar.next()},ArrowLeft:()=>{if(isMenubarHorizontal)return parentMenubar.previous()},ArrowDown:()=>{if(!isMenubarHorizontal)return parentMenubar.next()},ArrowUp:()=>{if(!isMenubarHorizontal)return parentMenubar.previous()}}[event.key],id2=null==action?void 0:action();void 0!==id2&&(event.stopPropagation(),event.preventDefault(),parentMenubar.move(id2))}}}));props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(MenuScopedContextProvider,{value:store,children:element})),[store]);const ariaLabelledBy=function useAriaLabelledBy(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const[id,setId]=(0,react.useState)(void 0),label=props["aria-label"],disclosureElement=(0,_2GXGCHW6.O$)(store,"disclosureElement"),contentElement=(0,_2GXGCHW6.O$)(store,"contentElement");return(0,react.useEffect)((()=>{const disclosure=disclosureElement;disclosure&&contentElement&&(label||contentElement.hasAttribute("aria-label")?setId(void 0):disclosure.id&&setId(disclosure.id))}),[label,disclosureElement,contentElement]),id}((0,_3YLGPPWQ.IA)({store},props)),mounted=store.useState("mounted"),hidden=(0,BSEL4YAF.dK)(mounted,props.hidden,alwaysVisible),style=hidden?(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props.style),{display:"none"}):props.style;props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({id,"aria-labelledby":ariaLabelledBy,hidden},props),{ref:(0,Z32BISHQ.SV)(id?store.setContentElement:null,props.ref),style,onKeyDown});const hasCombobox=!!store.combobox;return(composite=null!=composite?composite:!hasCombobox)&&(props=(0,_3YLGPPWQ.IA)({role:"menu","aria-orientation":orientation},props)),props=(0,TW35PKTK.T)((0,_3YLGPPWQ.IA)({store,composite},props)),props=useCompositeTypeahead((0,_3YLGPPWQ.IA)({store,typeahead:!hasCombobox},props))})),HQFKUKP3=((0,HKOOKEDE.Rf)((function MenuList2(props){const htmlProps=useMenuList(props);return(0,HKOOKEDE.n)("div",htmlProps)})),__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/HQFKUKP3.js")),TT2355LN=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/TT2355LN.js"),useMenu=(0,HKOOKEDE.ab)((function useMenu2(_a){var _b=_a,{store,modal:modalProp=!1,portal=!!modalProp,hideOnEscape=!0,autoFocusOnShow=!0,hideOnHoverOutside,alwaysVisible}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","modal","portal","hideOnEscape","autoFocusOnShow","hideOnHoverOutside","alwaysVisible"]);const context=useMenuProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const ref=(0,react.useRef)(null),parentMenu=store.parent,parentMenubar=store.menubar,hasParentMenu=!!parentMenu,parentIsMenubar=!!parentMenubar&&!hasParentMenu;props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{ref:(0,Z32BISHQ.SV)(ref,props.ref)});const _a2=useMenuList((0,_3YLGPPWQ.IA)({store,alwaysVisible},props)),{"aria-labelledby":ariaLabelledBy}=_a2;props=(0,_3YLGPPWQ.YG)(_a2,["aria-labelledby"]);const[initialFocusRef,setInitialFocusRef]=(0,react.useState)(),autoFocusOnShowState=store.useState("autoFocusOnShow"),initialFocus=store.useState("initialFocus"),baseElement=store.useState("baseElement"),items=store.useState("renderedItems");(0,react.useEffect)((()=>{let cleaning=!1;return setInitialFocusRef((prevInitialFocusRef=>{var _a3,_b2,_c;if(cleaning)return;if(!autoFocusOnShowState)return;if(null==(_a3=null==prevInitialFocusRef?void 0:prevInitialFocusRef.current)?void 0:_a3.isConnected)return prevInitialFocusRef;const ref2=(0,react.createRef)();switch(initialFocus){case"first":ref2.current=(null==(_b2=items.find((item=>!item.disabled&&item.element)))?void 0:_b2.element)||null;break;case"last":ref2.current=(null==(_c=[...items].reverse().find((item=>!item.disabled&&item.element)))?void 0:_c.element)||null;break;default:ref2.current=baseElement}return ref2})),()=>{cleaning=!0}}),[store,autoFocusOnShowState,initialFocus,items,baseElement]);const modal=!hasParentMenu&&modalProp,mayAutoFocusOnShow=!!autoFocusOnShow,canAutoFocusOnShow=!!initialFocusRef||!!props.initialFocus||!!modal,contentElement=(0,_2GXGCHW6.O$)(store.combobox||store,"contentElement"),parentContentElement=(0,_2GXGCHW6.O$)((null==parentMenu?void 0:parentMenu.combobox)||parentMenu,"contentElement"),preserveTabOrderAnchor=(0,react.useMemo)((()=>{if(!parentContentElement)return;if(!contentElement)return;const role=contentElement.getAttribute("role"),parentRole=parentContentElement.getAttribute("role");return"menu"!==parentRole&&"menubar"!==parentRole||"menu"!==role?parentContentElement:void 0}),[contentElement,parentContentElement]);return void 0!==preserveTabOrderAnchor&&(props=(0,_3YLGPPWQ.IA)({preserveTabOrderAnchor},props)),props=(0,HQFKUKP3.a)((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store,alwaysVisible,initialFocus:initialFocusRef,autoFocusOnShow:mayAutoFocusOnShow?canAutoFocusOnShow&&autoFocusOnShow:autoFocusOnShowState||!!modal},props),{hideOnEscape:event=>!(0,PBFD2E7P.zO)(hideOnEscape,event)&&(null==store||store.hideAll(),!0),hideOnHoverOutside(event){const disclosureElement=null==store?void 0:store.getState().disclosureElement;return!!("function"==typeof hideOnHoverOutside?hideOnHoverOutside(event):null!=hideOnHoverOutside?hideOnHoverOutside:hasParentMenu||parentIsMenubar&&(!disclosureElement||!(0,utils_focus.oW)(disclosureElement)))&&(!!event.defaultPrevented||(!hasParentMenu||(!disclosureElement||((0,events.rC)(disclosureElement,"mouseout",event),!(0,utils_focus.oW)(disclosureElement)||(requestAnimationFrame((()=>{(0,utils_focus.oW)(disclosureElement)||null==store||store.hide()})),!1)))))},modal,portal,backdrop:!hasParentMenu&&props.backdrop})),props=(0,_3YLGPPWQ.IA)({"aria-labelledby":ariaLabelledBy},props)})),Menu=(0,TT2355LN.AV)((0,HKOOKEDE.Rf)((function Menu2(props){const htmlProps=useMenu(props);return(0,HKOOKEDE.n)("div",htmlProps)})),useMenuProviderContext);const chevron_right_small=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var use_context_system=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/context/use-context-system.js"),context_connect=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/context/context-connect.js"),emotion_styled_base_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js");var useMenuItem=(0,HKOOKEDE.ab)((function useMenuItem2(_a){var _b=_a,{store,hideOnClick=!0,preventScrollOnKeyDown=!0,focusOnHover,blurOnHoverEnd}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","hideOnClick","preventScrollOnKeyDown","focusOnHover","blurOnHoverEnd"]);const menuContext=useMenuScopedContext(!0),menubarContext=WSQNIDGC_useMenubarScopedContext();store=store||menuContext||menubarContext,(0,PBFD2E7P.V1)(store,!1);const onClickProp=props.onClick,hideOnClickProp=(0,Z32BISHQ.O4)(hideOnClick),hideMenu="hideAll"in store?store.hideAll:void 0,isWithinMenu=!!hideMenu,onClick=(0,Z32BISHQ._q)((event=>{if(null==onClickProp||onClickProp(event),event.defaultPrevented)return;if((0,events.RN)(event))return;if((0,events.$b)(event))return;if(!hideMenu)return;"menu"!==event.currentTarget.getAttribute("aria-haspopup")&&hideOnClickProp(event)&&hideMenu()})),contentElement=(0,_2GXGCHW6.O$)(store,(state=>"contentElement"in state?state.contentElement:null)),role=(0,HWOIWM4O.cn)(contentElement,"menuitem");return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({role},props),{onClick}),props=(0,_3CCTMYB6.k)((0,_3YLGPPWQ.IA)({store,preventScrollOnKeyDown},props)),props=useCompositeHover((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store},props),{focusOnHover(event){if(!store)return!1;if(!("function"==typeof focusOnHover?focusOnHover(event):null==focusOnHover||focusOnHover))return!1;const{baseElement,items}=store.getState();return isWithinMenu?(event.currentTarget.hasAttribute("aria-expanded")&&event.currentTarget.focus(),!0):!!function menuHasFocus(baseElement,items,currentTarget){var _a;if(!baseElement)return!1;if((0,utils_focus.oW)(baseElement))return!0;const expandedItem=null==items?void 0:items.find((item=>{var _a2;return item.element!==currentTarget&&"true"===(null==(_a2=item.element)?void 0:_a2.getAttribute("aria-expanded"))})),expandedMenuId=null==(_a=null==expandedItem?void 0:expandedItem.element)?void 0:_a.getAttribute("aria-controls");if(!expandedMenuId)return!1;const expandedMenu=(0,HWOIWM4O.YE)(baseElement).getElementById(expandedMenuId);return!(!expandedMenu||!(0,utils_focus.oW)(expandedMenu)&&!expandedMenu.querySelector("[role=menuitem][aria-expanded=true]"))}(baseElement,items,event.currentTarget)&&(event.currentTarget.focus(),!0)},blurOnHoverEnd:event=>"function"==typeof blurOnHoverEnd?blurOnHoverEnd(event):null!=blurOnHoverEnd?blurOnHoverEnd:isWithinMenu})),props})),MenuItem=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function MenuItem2(props){const htmlProps=useMenuItem(props);return(0,HKOOKEDE.n)("div",htmlProps)}))),AUGWLYYL_ctx=(0,HKOOKEDE.B0)(),useCheckboxContext=AUGWLYYL_ctx.useContext,CheckboxCheckedContext=(AUGWLYYL_ctx.useScopedContext,AUGWLYYL_ctx.useProviderContext,AUGWLYYL_ctx.ContextProvider,AUGWLYYL_ctx.ScopedContextProvider,(0,react.createContext)(!1));function setMixed(element,mixed){mixed?element.indeterminate=!0:element.indeterminate&&(element.indeterminate=!1)}function getPrimitiveValue(value){return Array.isArray(value)?value.toString():value}var useCheckbox=(0,HKOOKEDE.ab)((function useCheckbox2(_a){var _b=_a,{store,name,value:valueProp,checked:checkedProp,defaultChecked}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","name","value","checked","defaultChecked"]);const context=useCheckboxContext();store=store||context;const[_checked,setChecked]=(0,react.useState)(null!=defaultChecked&&defaultChecked),checked=(0,_2GXGCHW6.O$)(store,(state=>{if(void 0!==checkedProp)return checkedProp;if(void 0===(null==state?void 0:state.value))return _checked;if(null!=valueProp){if(Array.isArray(state.value)){const primitiveValue=getPrimitiveValue(valueProp);return state.value.includes(primitiveValue)}return state.value===valueProp}return!Array.isArray(state.value)&&("boolean"==typeof state.value&&state.value)})),ref=(0,react.useRef)(null),nativeCheckbox=function isNativeCheckbox(tagName,type){return"input"===tagName&&(!type||"checkbox"===type)}((0,Z32BISHQ.vO)(ref,"input"),props.type),mixed=checked?"mixed"===checked:void 0,isChecked="mixed"!==checked&&checked,disabled=(0,PBFD2E7P.$f)(props),[propertyUpdated,schedulePropertyUpdate]=(0,Z32BISHQ.CH)();(0,react.useEffect)((()=>{const element=ref.current;element&&(setMixed(element,mixed),nativeCheckbox||(element.checked=isChecked,void 0!==name&&(element.name=name),void 0!==valueProp&&(element.value=`${valueProp}`)))}),[propertyUpdated,mixed,nativeCheckbox,isChecked,name,valueProp]);const onChangeProp=props.onChange,onChange=(0,Z32BISHQ._q)((event=>{if(disabled)return event.stopPropagation(),void event.preventDefault();if(setMixed(event.currentTarget,mixed),nativeCheckbox||(event.currentTarget.checked=!event.currentTarget.checked,schedulePropertyUpdate()),null==onChangeProp||onChangeProp(event),event.defaultPrevented)return;const elementChecked=event.currentTarget.checked;setChecked(elementChecked),null==store||store.setValue((prevValue=>{if(null==valueProp)return elementChecked;const primitiveValue=getPrimitiveValue(valueProp);return Array.isArray(prevValue)?elementChecked?prevValue.includes(primitiveValue)?prevValue:[...prevValue,primitiveValue]:prevValue.filter((v=>v!==primitiveValue)):prevValue!==primitiveValue&&primitiveValue}))})),onClickProp=props.onClick,onClick=(0,Z32BISHQ._q)((event=>{null==onClickProp||onClickProp(event),event.defaultPrevented||nativeCheckbox||onChange(event)}));return props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(CheckboxCheckedContext.Provider,{value:isChecked,children:element})),[isChecked]),props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({role:nativeCheckbox?void 0:"checkbox",type:nativeCheckbox?"checkbox":void 0,"aria-checked":checked},props),{ref:(0,Z32BISHQ.SV)(ref,props.ref),onChange,onClick}),props=(0,NAXN2XAB.D)((0,_3YLGPPWQ.IA)({clickOnEnter:!nativeCheckbox},props)),(0,PBFD2E7P.HR)((0,_3YLGPPWQ.IA)({name:nativeCheckbox?name:void 0,value:nativeCheckbox?valueProp:void 0,checked:isChecked},props))}));(0,HKOOKEDE.Rf)((function Checkbox2(props){const htmlProps=useCheckbox(props);return(0,HKOOKEDE.n)("input",htmlProps)}));function createCheckboxStore(props={}){var _a;(0,EQQLU3CG.UE)(props,props.store);const syncState=null==(_a=props.store)?void 0:_a.getState(),initialState={value:(0,PBFD2E7P.Jh)(props.value,null==syncState?void 0:syncState.value,props.defaultValue,!1)},checkbox=(0,EQQLU3CG.y$)(initialState,props.store);return(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},checkbox),{setValue:value=>checkbox.setState("value",value)})}function useCheckboxStore(props={}){const[store,update]=(0,_2GXGCHW6.Pj)(createCheckboxStore,props);return function useCheckboxStoreProps(store,update,props){return(0,Z32BISHQ.w5)(update,[props.store]),(0,_2GXGCHW6.Tz)(store,props,"value","setValue"),store}(store,update,props)}function getValue(storeValue,value,checked){if(void 0===value)return Array.isArray(storeValue)?storeValue:!!checked;const primitiveValue=function menu_item_checkbox_getPrimitiveValue(value){return Array.isArray(value)?value.toString():value}(value);return Array.isArray(storeValue)?checked?storeValue.includes(primitiveValue)?storeValue:[...storeValue,primitiveValue]:storeValue.filter((v=>v!==primitiveValue)):checked?primitiveValue:storeValue!==primitiveValue&&storeValue}var useMenuItemCheckbox=(0,HKOOKEDE.ab)((function useMenuItemCheckbox2(_a){var _b=_a,{store,name,value,checked,defaultChecked:defaultCheckedProp,hideOnClick=!1}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","name","value","checked","defaultChecked","hideOnClick"]);const context=useMenuScopedContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const defaultChecked=(0,Z32BISHQ.nf)(defaultCheckedProp);(0,react.useEffect)((()=>{null==store||store.setValue(name,((prevValue=[])=>defaultChecked?getValue(prevValue,value,!0):prevValue))}),[store,name,value,defaultChecked]),(0,react.useEffect)((()=>{void 0!==checked&&(null==store||store.setValue(name,(prevValue=>getValue(prevValue,value,checked))))}),[store,name,value,checked]);const checkboxStore=useCheckboxStore({value:store.useState((state=>state.values[name])),setValue(internalValue){null==store||store.setValue(name,(()=>{if(void 0===checked)return internalValue;const nextValue=getValue(internalValue,value,checked);return Array.isArray(nextValue)&&Array.isArray(internalValue)&&(0,PBFD2E7P.bN)(internalValue,nextValue)?internalValue:nextValue}))}});return props=(0,_3YLGPPWQ.IA)({role:"menuitemcheckbox"},props),props=useCheckbox((0,_3YLGPPWQ.IA)({store:checkboxStore,name,value,checked},props)),props=useMenuItem((0,_3YLGPPWQ.IA)({store,hideOnClick},props))})),MenuItemCheckbox=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function MenuItemCheckbox2(props){const htmlProps=useMenuItemCheckbox(props);return(0,HKOOKEDE.n)("div",htmlProps)}))),K7FXVWIT=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/K7FXVWIT.js");function menu_item_radio_getValue(prevValue,value,checked){return void 0===checked?prevValue:checked?value:prevValue}var useMenuItemRadio=(0,HKOOKEDE.ab)((function useMenuItemRadio2(_a){var _b=_a,{store,name,value,checked,onChange:onChangeProp,hideOnClick=!1}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","name","value","checked","onChange","hideOnClick"]);const context=useMenuScopedContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const defaultChecked=(0,Z32BISHQ.nf)(props.defaultChecked);(0,react.useEffect)((()=>{null==store||store.setValue(name,((prevValue=!1)=>menu_item_radio_getValue(prevValue,value,defaultChecked)))}),[store,name,value,defaultChecked]),(0,react.useEffect)((()=>{void 0!==checked&&(null==store||store.setValue(name,(prevValue=>menu_item_radio_getValue(prevValue,value,checked))))}),[store,name,value,checked]);const isChecked=store.useState((state=>state.values[name]===value));return props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(MenuItemCheckedContext.Provider,{value:!!isChecked,children:element})),[isChecked]),props=(0,_3YLGPPWQ.IA)({role:"menuitemradio"},props),props=(0,K7FXVWIT.z)((0,_3YLGPPWQ.IA)({name,value,checked:isChecked,onChange(event){if(null==onChangeProp||onChangeProp(event),event.defaultPrevented)return;const element=event.currentTarget;null==store||store.setValue(name,(prevValue=>menu_item_radio_getValue(prevValue,value,null!=checked?checked:element.checked)))}},props)),props=useMenuItem((0,_3YLGPPWQ.IA)({store,hideOnClick},props))})),MenuItemRadio=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function MenuItemRadio2(props){const htmlProps=useMenuItemRadio(props);return(0,HKOOKEDE.n)("div",htmlProps)}))),useMenuGroup=(0,HKOOKEDE.ab)((function useMenuGroup2(props){return props=useCompositeGroup(props)})),MenuGroup=(0,HKOOKEDE.Rf)((function MenuGroup2(props){const htmlProps=useMenuGroup(props);return(0,HKOOKEDE.n)("div",htmlProps)})),useMenuGroupLabel=(0,HKOOKEDE.ab)((function useMenuGroupLabel2(props){return props=useCompositeGroupLabel(props)})),MenuGroupLabel=(0,HKOOKEDE.Rf)((function MenuGroupLabel2(props){const htmlProps=useMenuGroupLabel(props);return(0,HKOOKEDE.n)("div",htmlProps)})),useSeparator=(0,HKOOKEDE.ab)((function useSeparator2(_a){var _b=_a,{orientation="horizontal"}=_b,props=(0,_3YLGPPWQ.YG)(_b,["orientation"]);return props=(0,_3YLGPPWQ.IA)({role:"separator","aria-orientation":orientation},props)})),useCompositeSeparator=((0,HKOOKEDE.Rf)((function Separator2(props){const htmlProps=useSeparator(props);return(0,HKOOKEDE.n)("hr",htmlProps)})),(0,HKOOKEDE.ab)((function useCompositeSeparator2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=(0,WENSINUV.k)();store=store||context,(0,PBFD2E7P.V1)(store,!1);const orientation=store.useState((state=>"horizontal"===state.orientation?"vertical":"horizontal"));return props=useSeparator((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{orientation}))}))),useMenuSeparator=((0,HKOOKEDE.Rf)((function CompositeSeparator2(props){const htmlProps=useCompositeSeparator(props);return(0,HKOOKEDE.n)("hr",htmlProps)})),(0,HKOOKEDE.ab)((function useMenuSeparator2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=useMenuContext();return store=store||context,props=useCompositeSeparator((0,_3YLGPPWQ.IA)({store},props))}))),MenuSeparator=(0,HKOOKEDE.Rf)((function MenuSeparator2(props){const htmlProps=useMenuSeparator(props);return(0,HKOOKEDE.n)("hr",htmlProps)})),emotion_react_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),colors_values=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/colors-values.js"),config_values=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/config-values.js"),font=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/font.js"),rtl=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/rtl.js"),space=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/space.js"),view_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/view/component.js"),hook=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/truncate/hook.js");const truncate_component=(0,context_connect.KZ)((function UnconnectedTruncate(props,forwardedRef){const truncateProps=(0,hook.A)(props);return(0,jsx_runtime.jsx)(view_component.A,{as:"span",...truncateProps,ref:forwardedRef})}),"Truncate");const ANIMATION_PARAMS_SCALE_AMOUNT_OUTER=.82,ANIMATION_PARAMS_SCALE_AMOUNT_CONTENT=.9,ANIMATION_PARAMS_DURATION={IN:"400ms",OUT:"200ms"},ANIMATION_PARAMS_EASING="cubic-bezier(0.33, 0, 0, 1)",CONTENT_WRAPPER_PADDING=(0,space.x)(1),ITEM_PADDING_BLOCK=(0,space.x)(2),ITEM_PADDING_INLINE=(0,space.x)(3),DEFAULT_BORDER_COLOR=colors_values.l.theme.gray[300],DIVIDER_COLOR=colors_values.l.theme.gray[200],LIGHTER_TEXT_COLOR=colors_values.l.theme.gray[700],LIGHT_BACKGROUND_COLOR=colors_values.l.theme.gray[100],TOOLBAR_VARIANT_BORDER_COLOR=colors_values.l.theme.foreground,DEFAULT_BOX_SHADOW=`0 0 0 ${config_values.A.borderWidth} ${DEFAULT_BORDER_COLOR}, ${config_values.A.elevationXSmall}`,TOOLBAR_VARIANT_BOX_SHADOW=`0 0 0 ${config_values.A.borderWidth} ${TOOLBAR_VARIANT_BORDER_COLOR}`,MenuPopoverOuterWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1kdzosf14"})("position:relative;background-color:",colors_values.l.ui.background,";border-radius:",config_values.A.radiusMedium,";",(props=>(0,emotion_react_browser_esm.AH)("box-shadow:","toolbar"===props.variant?TOOLBAR_VARIANT_BOX_SHADOW:DEFAULT_BOX_SHADOW,";",""))," overflow:hidden;@media not ( prefers-reduced-motion ){transition-property:transform,opacity;transition-timing-function:",ANIMATION_PARAMS_EASING,";transition-duration:",ANIMATION_PARAMS_DURATION.IN,";will-change:transform,opacity;opacity:0;&:has( [data-enter] ){opacity:1;}&:has( [data-leave] ){transition-duration:",ANIMATION_PARAMS_DURATION.OUT,";}&:has( [data-side='bottom'] ),&:has( [data-side='top'] ){transform:scaleY( ",ANIMATION_PARAMS_SCALE_AMOUNT_OUTER," );}&:has( [data-side='bottom'] ){transform-origin:top;}&:has( [data-side='top'] ){transform-origin:bottom;}&:has( [data-enter][data-side='bottom'] ),&:has( [data-enter][data-side='top'] ),&:has( [data-leave][data-side='bottom'] ),&:has( [data-leave][data-side='top'] ){transform:scaleY( 1 );}}"),MenuPopoverInnerWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1kdzosf13"})("position:relative;z-index:1000000;display:grid;grid-template-columns:","minmax( 0, max-content ) 1fr",";grid-template-rows:auto;box-sizing:border-box;min-width:160px;max-width:320px;max-height:var( --popover-available-height );padding:",CONTENT_WRAPPER_PADDING,";overscroll-behavior:contain;overflow:auto;outline:2px solid transparent!important;@media not ( prefers-reduced-motion ){transition:inherit;transform-origin:inherit;&[data-side='bottom'],&[data-side='top']{transform:scaleY(\n\t\t\t\tcalc(\n\t\t\t\t\t1 / ",ANIMATION_PARAMS_SCALE_AMOUNT_OUTER," *\n\t\t\t\t\t\t",ANIMATION_PARAMS_SCALE_AMOUNT_CONTENT,"\n\t\t\t\t)\n\t\t\t);}&[data-enter][data-side='bottom'],&[data-enter][data-side='top'],&[data-leave][data-side='bottom'],&[data-leave][data-side='top']{transform:scaleY( 1 );}}"),baseItem=(0,emotion_react_browser_esm.AH)("all:unset;position:relative;min-height:",(0,space.x)(10),";box-sizing:border-box;grid-column:1/-1;display:grid;grid-template-columns:","minmax( 0, max-content ) 1fr",";align-items:center;@supports ( grid-template-columns: subgrid ){grid-template-columns:subgrid;}font-size:",(0,font.g)("default.fontSize"),";font-family:inherit;font-weight:normal;line-height:20px;color:",colors_values.l.theme.foreground,";border-radius:",config_values.A.radiusSmall,";padding-block:",ITEM_PADDING_BLOCK,";padding-inline:",ITEM_PADDING_INLINE,";scroll-margin:",CONTENT_WRAPPER_PADDING,";user-select:none;outline:none;&[aria-disabled='true']{color:",colors_values.l.ui.textDisabled,";cursor:not-allowed;}&[data-active-item]:not( [data-focus-visible] ):not(\n\t\t\t[aria-disabled='true']\n\t\t){background-color:",colors_values.l.theme.accent,";color:",colors_values.l.white,";}&[data-focus-visible]{box-shadow:0 0 0 1.5px ",colors_values.l.theme.accent,";outline:2px solid transparent;}&:active,&[data-active]{}",MenuPopoverInnerWrapper,':not(:focus) &:not(:focus)[aria-expanded="true"]{background-color:',LIGHT_BACKGROUND_COLOR,";color:",colors_values.l.theme.foreground,";}svg{fill:currentColor;}",""),styles_DropdownMenuItem=(0,emotion_styled_base_browser_esm.A)(MenuItem,{target:"e1kdzosf12"})(baseItem,";"),styles_DropdownMenuCheckboxItem=(0,emotion_styled_base_browser_esm.A)(MenuItemCheckbox,{target:"e1kdzosf11"})(baseItem,";"),styles_DropdownMenuRadioItem=(0,emotion_styled_base_browser_esm.A)(MenuItemRadio,{target:"e1kdzosf10"})(baseItem,";"),ItemPrefixWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1kdzosf9"})("grid-column:1;",styles_DropdownMenuCheckboxItem,">&,",styles_DropdownMenuRadioItem,">&{min-width:",(0,space.x)(6),";}",styles_DropdownMenuCheckboxItem,">&,",styles_DropdownMenuRadioItem,">&,&:not( :empty ){margin-inline-end:",(0,space.x)(2),";}display:flex;align-items:center;justify-content:center;color:",LIGHTER_TEXT_COLOR,";[data-active-item]:not( [data-focus-visible] )>&,[aria-disabled='true']>&{color:inherit;}"),DropdownMenuItemContentWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1kdzosf8"})("grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:",(0,space.x)(3),";pointer-events:none;"),DropdownMenuItemChildrenWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1kdzosf7"})("flex:1;display:inline-flex;flex-direction:column;gap:",(0,space.x)(1),";"),ItemSuffixWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1kdzosf6"})("flex:0 1 fit-content;min-width:0;width:fit-content;display:flex;align-items:center;justify-content:center;gap:",(0,space.x)(3),";color:",LIGHTER_TEXT_COLOR,";[data-active-item]:not( [data-focus-visible] ) *:not(",MenuPopoverInnerWrapper,") &,[aria-disabled='true'] *:not(",MenuPopoverInnerWrapper,") &{color:inherit;}"),styles_DropdownMenuGroup=(0,emotion_styled_base_browser_esm.A)(MenuGroup,{target:"e1kdzosf5"})({name:"49aokf",styles:"display:contents"}),DropdownMenuGroupLabel=(0,emotion_styled_base_browser_esm.A)(MenuGroupLabel,{target:"e1kdzosf4"})("grid-column:1/-1;padding-block-start:",(0,space.x)(3),";padding-block-end:",(0,space.x)(2),";padding-inline:",ITEM_PADDING_INLINE,";"),styles_DropdownMenuSeparator=(0,emotion_styled_base_browser_esm.A)(MenuSeparator,{target:"e1kdzosf3"})("grid-column:1/-1;border:none;height:",config_values.A.borderWidth,";background-color:",(props=>"toolbar"===props.variant?TOOLBAR_VARIANT_BORDER_COLOR:DIVIDER_COLOR),";margin-block:",(0,space.x)(2),";margin-inline:",ITEM_PADDING_INLINE,";outline:2px solid transparent;"),SubmenuChevronIcon=(0,emotion_styled_base_browser_esm.A)(build_module_icon.A,{target:"e1kdzosf2"})("width:",(0,space.x)(1.5),";",(0,rtl.h)({transform:"scaleX(1)"},{transform:"scaleX(-1)"}),";"),styles_DropdownMenuItemLabel=(0,emotion_styled_base_browser_esm.A)(truncate_component,{target:"e1kdzosf1"})("font-size:",(0,font.g)("default.fontSize"),";line-height:20px;color:inherit;"),styles_DropdownMenuItemHelpText=(0,emotion_styled_base_browser_esm.A)(truncate_component,{target:"e1kdzosf0"})("font-size:",(0,font.g)("helpText.fontSize"),";line-height:16px;color:",LIGHTER_TEXT_COLOR,";word-break:break-all;[data-active-item]:not( [data-focus-visible] ) *:not( ",MenuPopoverInnerWrapper," ) &,[aria-disabled='true'] *:not( ",MenuPopoverInnerWrapper," ) &{color:inherit;}"),DropdownMenuContext=(0,react.createContext)(void 0);var react_dom=__webpack_require__("../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js");function useTemporaryFocusVisibleFix({onBlur:onBlurProp}){const[focusVisible,setFocusVisible]=(0,react.useState)(!1);return{"data-focus-visible":focusVisible||void 0,onFocusVisible:()=>{(0,react_dom.flushSync)((()=>setFocusVisible(!0)))},onBlur:event=>{onBlurProp?.(event),setFocusVisible(!1)}}}const DropdownMenuItem=(0,react.forwardRef)((function DropdownMenuItem({prefix,suffix,children,onBlur,hideOnClick=!0,...props},ref){const focusVisibleFixProps=useTemporaryFocusVisibleFix({onBlur}),dropdownMenuContext=(0,react.useContext)(DropdownMenuContext);return(0,jsx_runtime.jsxs)(styles_DropdownMenuItem,{ref,...props,...focusVisibleFixProps,accessibleWhenDisabled:!0,hideOnClick,store:dropdownMenuContext?.store,children:[(0,jsx_runtime.jsx)(ItemPrefixWrapper,{children:prefix}),(0,jsx_runtime.jsxs)(DropdownMenuItemContentWrapper,{children:[(0,jsx_runtime.jsx)(DropdownMenuItemChildrenWrapper,{children}),suffix&&(0,jsx_runtime.jsx)(ItemSuffixWrapper,{children:suffix})]})]})}));var checkmark=(0,jsx_runtime.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,jsx_runtime.jsx)("polyline",{points:"4,8 7,12 12,4"})});var useCheckboxCheck=(0,HKOOKEDE.ab)((function useCheckboxCheck2(_a){var _b=_a,{store,checked}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","checked"]);const context=(0,react.useContext)(CheckboxCheckedContext),children=function getChildren(props){return props.checked?props.children||checkmark:"function"==typeof props.children?props.children:null}({checked:checked=null!=checked?checked:context,children:props.children});return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({"aria-hidden":!0},props),{children,style:(0,_3YLGPPWQ.IA)({width:"1em",height:"1em",pointerEvents:"none"},props.style)}),(0,PBFD2E7P.HR)(props)})),useMenuItemCheck=((0,HKOOKEDE.Rf)((function CheckboxCheck2(props){const htmlProps=useCheckboxCheck(props);return(0,HKOOKEDE.n)("span",htmlProps)})),(0,HKOOKEDE.ab)((function useMenuItemCheck2(_a){var _b=_a,{store,checked}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","checked"]);const context=(0,react.useContext)(MenuItemCheckedContext);return checked=null!=checked?checked:context,props=useCheckboxCheck((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{checked}))}))),MenuItemCheck=(0,HKOOKEDE.Rf)((function MenuItemCheck2(props){const htmlProps=useMenuItemCheck(props);return(0,HKOOKEDE.n)("span",htmlProps)})),icon=__webpack_require__("../../node_modules/.pnpm/@wordpress+icons@10.7.0_react@17.0.2/node_modules/@wordpress/icons/build-module/icon/index.js");const library_check=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),DropdownMenuCheckboxItem=(0,react.forwardRef)((function DropdownMenuCheckboxItem({suffix,children,onBlur,hideOnClick=!1,...props},ref){const focusVisibleFixProps=useTemporaryFocusVisibleFix({onBlur}),dropdownMenuContext=(0,react.useContext)(DropdownMenuContext);return(0,jsx_runtime.jsxs)(styles_DropdownMenuCheckboxItem,{ref,...props,...focusVisibleFixProps,accessibleWhenDisabled:!0,hideOnClick,store:dropdownMenuContext?.store,children:[(0,jsx_runtime.jsx)(MenuItemCheck,{store:dropdownMenuContext?.store,render:(0,jsx_runtime.jsx)(ItemPrefixWrapper,{}),style:{width:"auto",height:"auto"},children:(0,jsx_runtime.jsx)(icon.A,{icon:library_check,size:24})}),(0,jsx_runtime.jsxs)(DropdownMenuItemContentWrapper,{children:[(0,jsx_runtime.jsx)(DropdownMenuItemChildrenWrapper,{children}),suffix&&(0,jsx_runtime.jsx)(ItemSuffixWrapper,{children:suffix})]})]})})),radioCheck=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.jl,{cx:12,cy:12,r:3})}),DropdownMenuRadioItem=(0,react.forwardRef)((function DropdownMenuRadioItem({suffix,children,onBlur,hideOnClick=!1,...props},ref){const focusVisibleFixProps=useTemporaryFocusVisibleFix({onBlur}),dropdownMenuContext=(0,react.useContext)(DropdownMenuContext);return(0,jsx_runtime.jsxs)(styles_DropdownMenuRadioItem,{ref,...props,...focusVisibleFixProps,accessibleWhenDisabled:!0,hideOnClick,store:dropdownMenuContext?.store,children:[(0,jsx_runtime.jsx)(MenuItemCheck,{store:dropdownMenuContext?.store,render:(0,jsx_runtime.jsx)(ItemPrefixWrapper,{}),style:{width:"auto",height:"auto"},children:(0,jsx_runtime.jsx)(icon.A,{icon:radioCheck,size:24})}),(0,jsx_runtime.jsxs)(DropdownMenuItemContentWrapper,{children:[(0,jsx_runtime.jsx)(DropdownMenuItemChildrenWrapper,{children}),suffix&&(0,jsx_runtime.jsx)(ItemSuffixWrapper,{children:suffix})]})]})})),DropdownMenuGroup=(0,react.forwardRef)((function DropdownMenuGroup(props,ref){const dropdownMenuContext=(0,react.useContext)(DropdownMenuContext);return(0,jsx_runtime.jsx)(styles_DropdownMenuGroup,{ref,...props,store:dropdownMenuContext?.store})}));var text_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/text/component.js");const group_label_DropdownMenuGroupLabel=(0,react.forwardRef)((function DropdownMenuGroup(props,ref){const dropdownMenuContext=(0,react.useContext)(DropdownMenuContext);return(0,jsx_runtime.jsx)(DropdownMenuGroupLabel,{ref,render:(0,jsx_runtime.jsx)(text_component.A,{upperCase:!0,variant:"muted",size:"11px",weight:500,lineHeight:"16px"}),...props,store:dropdownMenuContext?.store})})),DropdownMenuSeparator=(0,react.forwardRef)((function DropdownMenuSeparator(props,ref){const dropdownMenuContext=(0,react.useContext)(DropdownMenuContext);return(0,jsx_runtime.jsx)(styles_DropdownMenuSeparator,{ref,...props,store:dropdownMenuContext?.store,variant:dropdownMenuContext?.variant})})),DropdownMenuItemLabel=(0,react.forwardRef)((function DropdownMenuItemLabel(props,ref){return(0,jsx_runtime.jsx)(styles_DropdownMenuItemLabel,{numberOfLines:1,ref,...props})})),DropdownMenuItemHelpText=(0,react.forwardRef)((function DropdownMenuItemHelpText(props,ref){return(0,jsx_runtime.jsx)(styles_DropdownMenuItemHelpText,{numberOfLines:2,ref,...props})})),DropdownMenuV2=Object.assign((0,context_connect.KZ)(((props,ref)=>{var _props$placement;const{open,defaultOpen=!1,onOpenChange,placement,trigger,gutter,children,shift,modal=!0,variant,...otherProps}=(0,use_context_system.A)(props,"DropdownMenu"),parentContext=(0,react.useContext)(DropdownMenuContext),computedDirection=(0,build_module.V8)()?"rtl":"ltr";let computedPlacement=null!==(_props$placement=props.placement)&&void 0!==_props$placement?_props$placement:parentContext?.store?"right-start":"bottom-start";"rtl"===computedDirection&&(/right/.test(computedPlacement)?computedPlacement=computedPlacement.replace("right","left"):/left/.test(computedPlacement)&&(computedPlacement=computedPlacement.replace("left","right")));const dropdownMenuStore=useMenuStore({parent:parentContext?.store,open,defaultOpen,placement:computedPlacement,focusLoop:!0,setOpen(willBeOpen){onOpenChange?.(willBeOpen)},rtl:"rtl"===computedDirection}),contextValue=(0,react.useMemo)((()=>({store:dropdownMenuStore,variant})),[dropdownMenuStore,variant]),appliedPlacementSide=(0,_2GXGCHW6.O$)(dropdownMenuStore,"currentPlacement").split("-")[0];!dropdownMenuStore.parent||(0,react.isValidElement)(trigger)&&DropdownMenuItem===trigger.type||console.warn("For nested DropdownMenus, the `trigger` should always be a `DropdownMenuItem`.");const hideOnEscape=(0,react.useCallback)((event=>(event.preventDefault(),!0)),[]),wrapperProps=(0,react.useMemo)((()=>({dir:computedDirection,style:{direction:computedDirection}})),[computedDirection]);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(MenuButton,{ref,store:dropdownMenuStore,render:dropdownMenuStore.parent?(0,react.cloneElement)(trigger,{suffix:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[trigger.props.suffix,(0,jsx_runtime.jsx)(SubmenuChevronIcon,{"aria-hidden":"true",icon:chevron_right_small,size:24,preserveAspectRatio:"xMidYMid slice"})]})}):trigger}),(0,jsx_runtime.jsx)(Menu,{...otherProps,modal,store:dropdownMenuStore,gutter:null!=gutter?gutter:dropdownMenuStore.parent?0:8,shift:null!=shift?shift:dropdownMenuStore.parent?-4:0,hideOnHoverOutside:!1,"data-side":appliedPlacementSide,wrapperProps,hideOnEscape,unmountOnHide:!0,render:renderProps=>(0,jsx_runtime.jsx)(MenuPopoverOuterWrapper,{variant,children:(0,jsx_runtime.jsx)(MenuPopoverInnerWrapper,{...renderProps})}),children:(0,jsx_runtime.jsx)(DropdownMenuContext.Provider,{value:contextValue,children})})]})}),"DropdownMenu"),{Context:Object.assign(DropdownMenuContext,{displayName:"DropdownMenuV2.Context"}),Item:Object.assign(DropdownMenuItem,{displayName:"DropdownMenuV2.Item"}),RadioItem:Object.assign(DropdownMenuRadioItem,{displayName:"DropdownMenuV2.RadioItem"}),CheckboxItem:Object.assign(DropdownMenuCheckboxItem,{displayName:"DropdownMenuV2.CheckboxItem"}),Group:Object.assign(DropdownMenuGroup,{displayName:"DropdownMenuV2.Group"}),GroupLabel:Object.assign(group_label_DropdownMenuGroupLabel,{displayName:"DropdownMenuV2.GroupLabel"}),Separator:Object.assign(DropdownMenuSeparator,{displayName:"DropdownMenuV2.Separator"}),ItemLabel:Object.assign(DropdownMenuItemLabel,{displayName:"DropdownMenuV2.ItemLabel"}),ItemHelpText:Object.assign(DropdownMenuItemHelpText,{displayName:"DropdownMenuV2.ItemHelpText"})});var context_system_provider=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/context/context-system-provider.js");const Wrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1krjpvb0"})({name:"1a3idx0",styles:"color:var( --wp-components-color-foreground, currentColor )"});var colord=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs"),a11y=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/a11y.mjs"),names=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs"),warning_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+warning@3.7.0/node_modules/@wordpress/warning/build-module/index.js");function generateThemeVariables(inputs){!function validateInputs(inputs){for(const[key,value]of Object.entries(inputs))void 0===value||(0,colord.Mj)(value).isValid()||!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)(`wp.components.Theme: "${value}" is not a valid color value for the '${key}' prop.`)}(inputs);const generatedColors={...generateAccentDependentColors(inputs.accent),...generateBackgroundDependentColors(inputs.background)};return function warnContrastIssues(issues){for(const error of Object.values(issues))error&&!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)("wp.components.Theme: "+error)}(function checkContrasts(inputs,outputs){const background=inputs.background||colors_values.l.white,accent=inputs.accent||"#3858e9",foreground=outputs.foreground||colors_values.l.gray[900],gray=outputs.gray||colors_values.l.gray;return{accent:(0,colord.Mj)(background).isReadable(accent)?void 0:`The background color ("${background}") does not have sufficient contrast against the accent color ("${accent}").`,foreground:(0,colord.Mj)(background).isReadable(foreground)?void 0:`The background color provided ("${background}") does not have sufficient contrast against the standard foreground colors.`,grays:(0,colord.Mj)(background).contrast(gray[600])>=3&&(0,colord.Mj)(background).contrast(gray[700])>=4.5?void 0:`The background color provided ("${background}") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.`}}(inputs,generatedColors)),{colors:generatedColors}}function generateAccentDependentColors(accent){return accent?{accent,accentDarker10:(0,colord.Mj)(accent).darken(.1).toHex(),accentDarker20:(0,colord.Mj)(accent).darken(.2).toHex(),accentInverted:getForegroundForColor(accent)}:{}}function generateBackgroundDependentColors(background){if(!background)return{};const foreground=getForegroundForColor(background);return{background,foreground,foregroundInverted:getForegroundForColor(foreground),gray:generateShades(background,foreground)}}function getForegroundForColor(color){return(0,colord.Mj)(color).isDark()?colors_values.l.white:colors_values.l.gray[900]}function generateShades(background,foreground){const direction=(0,colord.Mj)(background).isDark()?"lighten":"darken",range=Math.abs((0,colord.Mj)(background).toHsl().l-(0,colord.Mj)(foreground).toHsl().l)/100,result={};return Object.entries({100:.06,200:.121,300:.132,400:.2,600:.42,700:.543,800:.821}).forEach((([key,value])=>{result[parseInt(key)]=(0,colord.Mj)(background)[direction](value/.884*range).toHex()})),result}(0,colord.X$)([names.A,a11y.A]);var use_cx=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js");const theme=function Theme({accent,background,className,...props}){const cx=(0,use_cx.l)(),classes=(0,react.useMemo)((()=>cx(...(({colors})=>{const shades=Object.entries(colors.gray||{}).map((([k,v])=>`--wp-components-color-gray-${k}: ${v};`)).join("");return[(0,emotion_react_browser_esm.AH)("--wp-components-color-accent:",colors.accent,";--wp-components-color-accent-darker-10:",colors.accentDarker10,";--wp-components-color-accent-darker-20:",colors.accentDarker20,";--wp-components-color-accent-inverted:",colors.accentInverted,";--wp-components-color-background:",colors.background,";--wp-components-color-foreground:",colors.foreground,";--wp-components-color-foreground-inverted:",colors.foregroundInverted,";",shades,";","")]})(generateThemeVariables({accent,background})),className)),[accent,background,className,cx]);return(0,jsx_runtime.jsx)(Wrapper,{className:classes,...props})};var KZ2S4ZC5_ctx=(0,HKOOKEDE.B0)([_54MGSIOI.wf,WENSINUV.ws],[_54MGSIOI.s1,WENSINUV.aN]),useSelectContext=KZ2S4ZC5_ctx.useContext,_6DHTHWXD=(KZ2S4ZC5_ctx.useScopedContext,KZ2S4ZC5_ctx.useProviderContext,KZ2S4ZC5_ctx.ContextProvider,KZ2S4ZC5_ctx.ScopedContextProvider,(0,react.createContext)(!1),(0,react.createContext)(null),__webpack_require__("../../node_modules/.pnpm/@ariakit+core@0.4.9/node_modules/@ariakit/core/esm/__chunks/6DHTHWXD.js"));function createTabStore(_a={}){var _b=_a,{composite:parentComposite,combobox}=_b,props=(0,_chunks_3YLGPPWQ.YG)(_b,["composite","combobox"]);const independentKeys=["items","renderedItems","moves","orientation","virtualFocus","includesBaseElement","baseElement","focusLoop","focusShift","focusWrap"],store=(0,EQQLU3CG.od)(props.store,(0,EQQLU3CG.cJ)(parentComposite,independentKeys),(0,EQQLU3CG.cJ)(combobox,independentKeys)),syncState=null==store?void 0:store.getState(),composite=(0,D7EIQZAU.z)((0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},props),{store,includesBaseElement:(0,PBFD2E7P.Jh)(props.includesBaseElement,null==syncState?void 0:syncState.includesBaseElement,!1),orientation:(0,PBFD2E7P.Jh)(props.orientation,null==syncState?void 0:syncState.orientation,"horizontal"),focusLoop:(0,PBFD2E7P.Jh)(props.focusLoop,null==syncState?void 0:syncState.focusLoop,!0)})),panels=(0,_6DHTHWXD.I)(),initialState=(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},composite.getState()),{selectedId:(0,PBFD2E7P.Jh)(props.selectedId,null==syncState?void 0:syncState.selectedId,props.defaultSelectedId),selectOnMove:(0,PBFD2E7P.Jh)(props.selectOnMove,null==syncState?void 0:syncState.selectOnMove,!0)}),tab=(0,EQQLU3CG.y$)(initialState,composite,store);(0,EQQLU3CG.mj)(tab,(()=>(0,EQQLU3CG.OH)(tab,["moves"],(()=>{const{activeId,selectOnMove}=tab.getState();if(!selectOnMove)return;if(!activeId)return;const tabItem=composite.item(activeId);tabItem&&(tabItem.dimmed||tabItem.disabled||tab.setState("selectedId",tabItem.id))})))),(0,EQQLU3CG.mj)(tab,(()=>(0,EQQLU3CG.vA)(tab,["selectedId"],((state,prev)=>{parentComposite&&state.selectedId===prev.selectedId||tab.setState("activeId",state.selectedId)})))),(0,EQQLU3CG.mj)(tab,(()=>(0,EQQLU3CG.OH)(tab,["selectedId","renderedItems"],(state=>{if(void 0!==state.selectedId)return;const{activeId,renderedItems}=tab.getState(),tabItem=composite.item(activeId);if(!tabItem||tabItem.disabled||tabItem.dimmed){const tabItem2=renderedItems.find((item=>!item.disabled&&!item.dimmed));tab.setState("selectedId",null==tabItem2?void 0:tabItem2.id)}else tab.setState("selectedId",tabItem.id)})))),(0,EQQLU3CG.mj)(tab,(()=>(0,EQQLU3CG.OH)(tab,["renderedItems"],(state=>{const tabs=state.renderedItems;if(tabs.length)return(0,EQQLU3CG.OH)(panels,["renderedItems"],(state2=>{const items=state2.renderedItems;items.some((panel=>!panel.tabId))&&items.forEach(((panel,i)=>{if(panel.tabId)return;const tabItem=tabs[i];tabItem&&panels.renderItem((0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)({},panel),{tabId:tabItem.id}))}))}))}))));let selectedIdFromSelectedValue=null;return(0,EQQLU3CG.mj)(tab,(()=>{const backupSelectedId=()=>{selectedIdFromSelectedValue=tab.getState().selectedId},restoreSelectedId=()=>{tab.setState("selectedId",selectedIdFromSelectedValue)};return parentComposite&&"setSelectElement"in parentComposite?(0,PBFD2E7P.cy)((0,EQQLU3CG.OH)(parentComposite,["value"],backupSelectedId),(0,EQQLU3CG.OH)(parentComposite,["open"],restoreSelectedId)):combobox?(0,PBFD2E7P.cy)((0,EQQLU3CG.OH)(combobox,["selectedValue"],backupSelectedId),(0,EQQLU3CG.OH)(combobox,["open"],restoreSelectedId)):void 0})),(0,_chunks_3YLGPPWQ.ko)((0,_chunks_3YLGPPWQ.IA)((0,_chunks_3YLGPPWQ.IA)({},composite),tab),{panels,setSelectedId:id=>tab.setState("selectedId",id),select:id=>{tab.setState("selectedId",id),composite.move(id)}})}function useTabStore(props={}){const combobox=useComboboxContext(),composite=useSelectContext()||combobox;props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{composite:void 0!==props.composite?props.composite:composite,combobox:void 0!==props.combobox?props.combobox:combobox});const[store,update]=(0,_2GXGCHW6.Pj)(createTabStore,props);return function useTabStoreProps(store,update,props){(0,Z32BISHQ.w5)(update,[props.composite,props.combobox]),store=(0,UVQLZ7T5.Y)(store,update,props),(0,_2GXGCHW6.Tz)(store,props,"selectedId","setSelectedId"),(0,_2GXGCHW6.Tz)(store,props,"selectOnMove");const[panels,updatePanels]=(0,_2GXGCHW6.Pj)((()=>store.panels),{});return(0,Z32BISHQ.w5)(updatePanels,[store,updatePanels]),Object.assign((0,react.useMemo)((()=>(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},store),{panels})),[store,panels]),{composite:props.composite,combobox:props.combobox})}(store,update,props)}const TabsContext=(0,react.createContext)(void 0),useTabsContext=()=>(0,react.useContext)(TabsContext);var TNITL632_ctx=(0,HKOOKEDE.B0)([WENSINUV.ws],[WENSINUV.aN]),useTabScopedContext=(TNITL632_ctx.useContext,TNITL632_ctx.useScopedContext),useTabProviderContext=TNITL632_ctx.useProviderContext,TabScopedContextProvider=(TNITL632_ctx.ContextProvider,TNITL632_ctx.ScopedContextProvider),useTab=(0,HKOOKEDE.ab)((function useTab2(_a){var _a2,_b=_a,{store,getItem:getItemProp}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","getItem"]);const context=useTabScopedContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const defaultId=(0,Z32BISHQ.Bi)(),id=props.id||defaultId,dimmed=(0,PBFD2E7P.$f)(props),getItem=(0,react.useCallback)((item=>{const nextItem=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},item),{dimmed});return getItemProp?getItemProp(nextItem):nextItem}),[dimmed,getItemProp]),onClickProp=props.onClick,onClick=(0,Z32BISHQ._q)((event=>{null==onClickProp||onClickProp(event),event.defaultPrevented||null==store||store.setSelectedId(id)})),panelId=store.panels.useState((state=>{var _a3;return null==(_a3=state.items.find((item=>item.tabId===id)))?void 0:_a3.id})),shouldRegisterItem=!!defaultId&&props.shouldRegisterItem,isActive=store.useState((state=>!!id&&state.activeId===id)),selected=store.useState((state=>!!id&&state.selectedId===id)),hasActiveItem=store.useState((state=>!!store.item(state.activeId))),canRegisterComposedItem=isActive||selected&&!hasActiveItem,accessibleWhenDisabled=selected||null==(_a2=props.accessibleWhenDisabled)||_a2;if((0,_2GXGCHW6.O$)(store.combobox||store.composite,"virtualFocus")&&(props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{tabIndex:-1})),props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({id,role:"tab","aria-selected":selected,"aria-controls":panelId||void 0},props),{onClick}),store.composite){const defaultProps={id,accessibleWhenDisabled,store:store.composite,shouldRegisterItem:canRegisterComposedItem&&shouldRegisterItem,render:props.render};props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},props),{render:(0,jsx_runtime.jsx)(_3CCTMYB6.l,(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},defaultProps),{render:store.combobox&&store.composite!==store.combobox?(0,jsx_runtime.jsx)(_3CCTMYB6.l,(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},defaultProps),{store:store.combobox})):defaultProps.render}))})}return props=(0,_3CCTMYB6.k)((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store},props),{accessibleWhenDisabled,getItem,shouldRegisterItem}))})),Tab=(0,HKOOKEDE.ph)((0,HKOOKEDE.Rf)((function Tab2(props){const htmlProps=useTab(props);return(0,HKOOKEDE.n)("button",htmlProps)}))),PLQDTVXM=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/PLQDTVXM.js"),HGZKAGPL=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/HGZKAGPL.js"),KGK2TTFO=__webpack_require__("../../node_modules/.pnpm/@ariakit+react-core@0.4.10_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@ariakit/react-core/esm/__chunks/KGK2TTFO.js"),useTabPanel=(0,HKOOKEDE.ab)((function useTabPanel2(_a){var _b=_a,{store,unmountOnHide,tabId:tabIdProp,getItem:getItemProp}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store","unmountOnHide","tabId","getItem"]);const context=useTabProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const ref=(0,react.useRef)(null),id=(0,Z32BISHQ.Bi)(props.id),[hasTabbableChildren,setHasTabbableChildren]=(0,react.useState)(!1);(0,react.useEffect)((()=>{const element=ref.current;if(!element)return;const tabbable=(0,utils_focus.a9)(element);setHasTabbableChildren(!!tabbable.length)}),[]);const getItem=(0,react.useCallback)((item=>{const nextItem=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},item),{id:id||item.id,tabId:tabIdProp});return getItemProp?getItemProp(nextItem):nextItem}),[id,tabIdProp,getItemProp]),onKeyDownProp=props.onKeyDown,onKeyDown=(0,Z32BISHQ._q)((event=>{if(null==onKeyDownProp||onKeyDownProp(event),event.defaultPrevented)return;if(!(null==store?void 0:store.composite))return;const state=store.getState(),tab=createTabStore((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({},state),{activeId:state.selectedId}));tab.setState("renderedItems",state.renderedItems);const action={ArrowLeft:tab.previous,ArrowRight:tab.next,Home:tab.first,End:tab.last}[event.key];if(!action)return;const nextId=action();nextId&&(event.preventDefault(),store.move(nextId))}));props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(TabScopedContextProvider,{value:store,children:element})),[store]);const tabId=store.panels.useState((()=>{var _a2;return tabIdProp||(null==(_a2=null==store?void 0:store.panels.item(id))?void 0:_a2.tabId)})),open=store.useState((state=>!!tabId&&state.selectedId===tabId)),disclosure=(0,KGK2TTFO.E)({open}),mounted=disclosure.useState("mounted");return props=(0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({id,role:"tabpanel","aria-labelledby":tabId||void 0},props),{children:unmountOnHide&&!mounted?null:props.children,ref:(0,Z32BISHQ.SV)(ref,props.ref),onKeyDown}),props=(0,HGZKAGPL.W)((0,_3YLGPPWQ.IA)({focusable:!store.composite&&!hasTabbableChildren},props)),props=(0,BSEL4YAF.aT)((0,_3YLGPPWQ.IA)({store:disclosure},props)),props=(0,PLQDTVXM.v)((0,_3YLGPPWQ.ko)((0,_3YLGPPWQ.IA)({store:store.panels},props),{getItem}))})),TabPanel=(0,HKOOKEDE.Rf)((function TabPanel2(props){const htmlProps=useTabPanel(props);return(0,HKOOKEDE.n)("div",htmlProps)}));const TabListWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"enfox0g2"})("position:relative;display:flex;align-items:stretch;flex-direction:row;text-align:center;&[aria-orientation='vertical']{flex-direction:column;text-align:start;}@media not ( prefers-reduced-motion: reduce ){&.is-animation-enabled::after{transition-property:left,top,width,height;transition-duration:0.2s;transition-timing-function:ease-out;}}&::after{content:'';position:absolute;pointer-events:none;outline:2px solid transparent;outline-offset:-1px;}&:not( [aria-orientation='vertical'] )::after{bottom:0;left:var( --indicator-left );width:var( --indicator-width );height:0;border-bottom:var( --wp-admin-border-width-focus ) solid ",colors_values.l.theme.accent,";}&[aria-orientation='vertical']::after{z-index:-1;left:0;width:100%;top:var( --indicator-top );height:var( --indicator-height );background-color:",colors_values.l.theme.gray[100],";}"),styles_Tab=(0,emotion_styled_base_browser_esm.A)(Tab,{target:"enfox0g1"})("&{display:inline-flex;align-items:center;position:relative;border-radius:0;min-height:",(0,space.x)(12),";height:auto;background:transparent;border:none;box-shadow:none;cursor:pointer;line-height:1.2;padding:",(0,space.x)(4),";margin-left:0;font-weight:500;text-align:inherit;hyphens:auto;color:",colors_values.l.theme.foreground,";&[aria-disabled='true']{cursor:default;color:",colors_values.l.ui.textDisabled,";}&:not( [aria-disabled='true'] ):hover{color:",colors_values.l.theme.accent,";}&:focus:not( :disabled ){position:relative;box-shadow:none;outline:none;}&::before{content:'';position:absolute;top:",(0,space.x)(3),";right:",(0,space.x)(3),";bottom:",(0,space.x)(3),";left:",(0,space.x)(3),";pointer-events:none;outline:var( --wp-admin-border-width-focus ) solid ",colors_values.l.theme.accent,";border-radius:",config_values.A.radiusSmall,";opacity:0;@media not ( prefers-reduced-motion ){transition:opacity 0.1s linear;}}&:focus-visible::before{opacity:1;}}[aria-orientation='vertical'] &{min-height:",(0,space.x)(10),";}"),styles_TabPanel=(0,emotion_styled_base_browser_esm.A)(TabPanel,{target:"enfox0g0"})("&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",colors_values.l.theme.accent,";outline:2px solid transparent;outline-offset:0;}"),tab_Tab=(0,react.forwardRef)((function Tab({children,tabId,disabled,render,...otherProps},ref){const context=useTabsContext();if(!context)return!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)("`Tabs.Tab` must be wrapped in a `Tabs` component."),null;const{store,instanceId}=context,instancedTabId=`${instanceId}-${tabId}`;return(0,jsx_runtime.jsx)(styles_Tab,{ref,store,id:instancedTabId,disabled,render,...otherProps,children})}));var useTabList=(0,HKOOKEDE.ab)((function useTabList2(_a){var _b=_a,{store}=_b,props=(0,_3YLGPPWQ.YG)(_b,["store"]);const context=useTabProviderContext();store=store||context,(0,PBFD2E7P.V1)(store,!1);const orientation=store.useState((state=>"both"===state.orientation?void 0:state.orientation));return props=(0,Z32BISHQ.w7)(props,(element=>(0,jsx_runtime.jsx)(TabScopedContextProvider,{value:store,children:element})),[store]),store.composite&&(props=(0,_3YLGPPWQ.IA)({focusable:!1},props)),props=(0,_3YLGPPWQ.IA)({role:"tablist","aria-orientation":orientation},props),props=(0,TW35PKTK.T)((0,_3YLGPPWQ.IA)({store},props))})),tab_list_TabList=(0,HKOOKEDE.Rf)((function TabList2(props){const htmlProps=useTabList(props);return(0,HKOOKEDE.n)("div",htmlProps)}));function useEvent(callback){const ref=(0,react.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return(0,react.useInsertionEffect)((()=>{ref.current=callback})),(0,react.useCallback)(((...args)=>ref.current?.(...args)),[])}const NULL_ELEMENT_OFFSET_RECT={left:0,top:0,width:0,height:0};function useTrackElementOffsetRect(targetElement){const[indicatorPosition,setIndicatorPosition]=(0,react.useState)(NULL_ELEMENT_OFFSET_RECT);return function useTrackElementRectUpdates(targetElement,onRect,{fireOnElementInit=!0}={}){const onRectEvent=useEvent(onRect),observedElementRef=(0,react.useRef)(),resizeObserverRef=(0,react.useRef)();(0,react.useEffect)((()=>{if(targetElement===observedElementRef.current)return;observedElementRef.current=targetElement,resizeObserverRef.current||(resizeObserverRef.current=new ResizeObserver((entries=>{observedElementRef.current&&onRectEvent(observedElementRef.current,entries)})));const{current:resizeObserver}=resizeObserverRef;return targetElement&&(fireOnElementInit&&onRectEvent(targetElement),resizeObserver.observe(targetElement)),()=>{observedElementRef.current&&resizeObserver.unobserve(observedElementRef.current)}}),[fireOnElementInit,onRectEvent,targetElement])}(targetElement,(element=>setIndicatorPosition(function getElementOffsetRect(element){return{left:Math.max(element.offsetLeft-1,0),top:Math.max(element.offsetTop-1,0),width:parseFloat(getComputedStyle(element).width),height:parseFloat(getComputedStyle(element).height)}}(element)))),indicatorPosition}const TabList=(0,react.forwardRef)((function TabList({children,...otherProps},ref){const context=useTabsContext(),tabStoreState=(0,_2GXGCHW6.O$)(context?.store),selectedId=tabStoreState?.selectedId,indicatorPosition=useTrackElementOffsetRect(context?.store.item(selectedId)?.element),[animationEnabled,setAnimationEnabled]=(0,react.useState)(!1);if(function useOnValueUpdate(value,onUpdate){const previousValueRef=(0,react.useRef)(value),updateCallbackEvent=useEvent(onUpdate);(0,react.useEffect)((()=>{previousValueRef.current!==value&&(updateCallbackEvent({previousValue:previousValueRef.current}),previousValueRef.current=value)}),[updateCallbackEvent,value])}(selectedId,(({previousValue})=>previousValue&&setAnimationEnabled(!0))),!context||!tabStoreState)return!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)("`Tabs.TabList` must be wrapped in a `Tabs` component."),null;const{store}=context,{activeId,selectOnMove}=tabStoreState,{setActiveId}=store;return(0,jsx_runtime.jsx)(tab_list_TabList,{ref,store,render:(0,jsx_runtime.jsx)(TabListWrapper,{onTransitionEnd:event=>{"::after"===event.pseudoElement&&setAnimationEnabled(!1)}}),onBlur:()=>{selectOnMove&&selectedId!==activeId&&setActiveId(selectedId)},...otherProps,style:{"--indicator-left":`${indicatorPosition.left}px`,"--indicator-top":`${indicatorPosition.top}px`,"--indicator-width":`${indicatorPosition.width}px`,"--indicator-height":`${indicatorPosition.height}px`,...otherProps.style},className:(0,clsx.A)(animationEnabled?"is-animation-enabled":"",otherProps.className),children})})),tabpanel_TabPanel=(0,react.forwardRef)((function TabPanel({children,tabId,focusable=!0,...otherProps},ref){const context=useTabsContext(),selectedId=(0,_2GXGCHW6.O$)(context?.store,"selectedId");if(!context)return!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)("`Tabs.TabPanel` must be wrapped in a `Tabs` component."),null;const{store,instanceId}=context,instancedTabId=`${instanceId}-${tabId}`;return(0,jsx_runtime.jsx)(styles_TabPanel,{ref,store,id:`${instancedTabId}-view`,tabId:instancedTabId,focusable,...otherProps,children:selectedId===instancedTabId&&children})}));function Tabs({selectOnMove=!0,defaultTabId,orientation="horizontal",onSelect,children,selectedTabId}){const instanceId=(0,use_instance_id.A)(Tabs,"tabs"),store=useTabStore({selectOnMove,orientation,defaultSelectedId:defaultTabId&&`${instanceId}-${defaultTabId}`,setSelectedId:selectedId=>{const strippedDownId="string"==typeof selectedId?selectedId.replace(`${instanceId}-`,""):selectedId;onSelect?.(strippedDownId)},selectedId:selectedTabId&&`${instanceId}-${selectedTabId}`}),isControlled=void 0!==selectedTabId,{items,selectedId,activeId}=(0,_2GXGCHW6.O$)(store),{setSelectedId,setActiveId}=store,tabsHavePopulatedRef=(0,react.useRef)(!1);items.length>0&&(tabsHavePopulatedRef.current=!0);const selectedTab=items.find((item=>item.id===selectedId)),firstEnabledTab=items.find((item=>!item.dimmed)),initialTab=items.find((item=>item.id===`${instanceId}-${defaultTabId}`));(0,react.useLayoutEffect)((()=>{if(!isControlled&&(!defaultTabId||initialTab)&&!items.find((item=>item.id===selectedId))){if(initialTab&&!initialTab.dimmed)return void setSelectedId(initialTab?.id);firstEnabledTab?setSelectedId(firstEnabledTab.id):tabsHavePopulatedRef.current&&setSelectedId(null)}}),[firstEnabledTab,initialTab,defaultTabId,isControlled,items,selectedId,setSelectedId]),(0,react.useLayoutEffect)((()=>{selectedTab?.dimmed&&(isControlled?setSelectedId(null):!initialTab||initialTab.dimmed?firstEnabledTab&&setSelectedId(firstEnabledTab.id):setSelectedId(initialTab.id))}),[firstEnabledTab,initialTab,isControlled,selectedTab?.dimmed,setSelectedId]),(0,react.useLayoutEffect)((()=>{isControlled&&tabsHavePopulatedRef.current&&selectedTabId&&!selectedTab&&setSelectedId(null)}),[isControlled,selectedTab,selectedTabId,setSelectedId]),(0,react.useEffect)((()=>{null===selectedTabId&&!activeId&&firstEnabledTab?.id&&setActiveId(firstEnabledTab.id)}),[selectedTabId,activeId,firstEnabledTab?.id,setActiveId]),(0,react.useEffect)((()=>{isControlled&&requestAnimationFrame((()=>{const focusedElement=items?.[0]?.element?.ownerDocument.activeElement;focusedElement&&items.some((item=>focusedElement===item.element))&&activeId!==focusedElement.id&&setActiveId(focusedElement.id)}))}),[activeId,isControlled,items,setActiveId]);const contextValue=(0,react.useMemo)((()=>({store,instanceId})),[store,instanceId]);return(0,jsx_runtime.jsx)(TabsContext.Provider,{value:contextValue,children})}Tabs.TabList=TabList,Tabs.Tab=tab_Tab,Tabs.TabPanel=tabpanel_TabPanel,Tabs.Context=TabsContext;const tabs=Tabs;var dist_es2015=__webpack_require__("../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js");const CORE_MODULES_USING_PRIVATE_APIS=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/interface","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews"],registeredPrivateApis=[];let allowReRegistration;try{allowReRegistration=!globalThis.IS_WORDPRESS_CORE}catch(error){allowReRegistration=!0}const __dangerousOptInToUnstableAPIsOnlyForCoreModules=(consent,moduleName)=>{if(!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName))throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!allowReRegistration&®isteredPrivateApis.includes(moduleName))throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress."!==consent)throw new Error("You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.");return registeredPrivateApis.push(moduleName),{lock,unlock}};function lock(object,privateData){if(!object)throw new Error("Cannot lock an undefined object.");__private in object||(object[__private]={}),lockedData.set(object[__private],privateData)}function unlock(object){if(!object)throw new Error("Cannot unlock an undefined object.");if(!(__private in object))throw new Error("Cannot unlock an object that was not locked before. ");return lockedData.get(object[__private])}const lockedData=new WeakMap,__private=Symbol("Private API ID");const{lock:lock_unlock_lock,unlock:lock_unlock_unlock}=__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/components"),privateApis={};lock_unlock_lock(privateApis,{CompositeV2:Composite,CompositeGroupV2:Composite.Group,CompositeItemV2:Composite.Item,CompositeRowV2:Composite.Row,CompositeTypeaheadV2:Composite.Typeahead,CompositeHoverV2:Composite.Hover,useCompositeStoreV2:function useCompositeStore({focusLoop=!1,focusWrap=!1,focusShift=!1,virtualFocus=!1,orientation="both",rtl=!1,...props}={}){return UVQLZ7T5.q({focusLoop,focusWrap,focusShift,virtualFocus,orientation,rtl,...props})},__experimentalPopoverLegacyPositionToPlacement:utils.YK,createPrivateSlotFill:slot_fill.VI,ComponentsContext:context_system_provider.aG,Tabs:tabs,Theme:theme,DropdownMenuV2,kebabCase:function kebabCase(str){var _str$toString;let input=null!==(_str$toString=str?.toString?.())&&void 0!==_str$toString?_str$toString:"";return input=input.replace(/['\u2019]/,""),(0,dist_es2015.c)(input,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}});var visually_hidden_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/visually-hidden/component.js");const library_search=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),{lock:build_module_lock_unlock_lock,unlock:build_module_lock_unlock_unlock}=__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"),{CompositeV2:search_widget_Composite,CompositeItemV2:search_widget_CompositeItem,CompositeHoverV2:search_widget_CompositeHover,CompositeTypeaheadV2:search_widget_CompositeTypeahead}=build_module_lock_unlock_unlock(privateApis),search_widget_radioCheck=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.jl,{cx:12,cy:12,r:3})});function normalizeSearchInput(input=""){return remove_accents_default()(input.trim().toLowerCase())}const EMPTY_ARRAY=[],getCurrentValue=(filterDefinition,currentFilter)=>filterDefinition.singleSelection?currentFilter?.value:Array.isArray(currentFilter?.value)?currentFilter.value:!Array.isArray(currentFilter?.value)&¤tFilter?.value?[currentFilter.value]:EMPTY_ARRAY,getNewValue=(filterDefinition,currentFilter,value)=>filterDefinition.singleSelection?value:Array.isArray(currentFilter?.value)?currentFilter.value.includes(value)?currentFilter.value.filter((v=>v!==value)):[...currentFilter.value,value]:[value];function generateFilterElementCompositeItemId(prefix,filterElementValue){return`${prefix}-${filterElementValue}`}function ListBox({view,filter,onChangeView}){const baseId=(0,use_instance_id.A)(ListBox,"dataviews-filter-list-box"),[activeCompositeId,setActiveCompositeId]=(0,react.useState)(1===filter.operators?.length?void 0:null),currentFilter=view.filters?.find((f=>f.field===filter.field)),currentValue=getCurrentValue(filter,currentFilter);return(0,jsx_runtime.jsx)(search_widget_Composite,{virtualFocus:!0,focusLoop:!0,activeId:activeCompositeId,setActiveId:setActiveCompositeId,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,build_module.nv)((0,build_module.__)("List of: %1$s"),filter.name),onFocusVisible:()=>{!activeCompositeId&&filter.elements.length&&setActiveCompositeId(generateFilterElementCompositeItemId(baseId,filter.elements[0].value))},render:(0,jsx_runtime.jsx)(search_widget_CompositeTypeahead,{}),children:filter.elements.map((element=>(0,jsx_runtime.jsxs)(search_widget_CompositeHover,{render:(0,jsx_runtime.jsx)(search_widget_CompositeItem,{id:generateFilterElementCompositeItemId(baseId,element.value),render:(0,jsx_runtime.jsx)("div",{"aria-label":element.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{var _view$filters,_view$filters2;const newFilters=currentFilter?[...(null!==(_view$filters=view.filters)&&void 0!==_view$filters?_view$filters:[]).map((_filter=>_filter.field===filter.field?{..._filter,operator:currentFilter.operator||filter.operators[0],value:getNewValue(filter,currentFilter,element.value)}:_filter))]:[...null!==(_view$filters2=view.filters)&&void 0!==_view$filters2?_view$filters2:[],{field:filter.field,operator:filter.operators[0],value:getNewValue(filter,currentFilter,element.value)}];onChangeView({...view,page:1,filters:newFilters})}}),children:[(0,jsx_runtime.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-check",children:[filter.singleSelection&¤tValue===element.value&&(0,jsx_runtime.jsx)(build_module_icon.A,{icon:search_widget_radioCheck}),!filter.singleSelection&¤tValue.includes(element.value)&&(0,jsx_runtime.jsx)(build_module_icon.A,{icon:library_check})]}),(0,jsx_runtime.jsx)("span",{children:element.label})]},element.value)))})}function search_widget_ComboboxList({view,filter,onChangeView}){const[searchValue,setSearchValue]=(0,react.useState)(""),deferredSearchValue=(0,react.useDeferredValue)(searchValue),currentFilter=view.filters?.find((_filter=>_filter.field===filter.field)),currentValue=getCurrentValue(filter,currentFilter),matches=(0,react.useMemo)((()=>{const normalizedSearch=normalizeSearchInput(deferredSearchValue);return filter.elements.filter((item=>normalizeSearchInput(item.label).includes(normalizedSearch)))}),[filter.elements,deferredSearchValue]);return(0,jsx_runtime.jsxs)(ComboboxProvider,{selectedValue:currentValue,setSelectedValue:value=>{var _view$filters3,_view$filters4;const newFilters=currentFilter?[...(null!==(_view$filters3=view.filters)&&void 0!==_view$filters3?_view$filters3:[]).map((_filter=>_filter.field===filter.field?{..._filter,operator:currentFilter.operator||filter.operators[0],value}:_filter))]:[...null!==(_view$filters4=view.filters)&&void 0!==_view$filters4?_view$filters4:[],{field:filter.field,operator:filter.operators[0],value}];onChangeView({...view,page:1,filters:newFilters})},setValue:setSearchValue,children:[(0,jsx_runtime.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,jsx_runtime.jsx)(ComboboxLabel,{render:(0,jsx_runtime.jsx)(visually_hidden_component.A,{children:(0,build_module.__)("Search items")}),children:(0,build_module.__)("Search items")}),(0,jsx_runtime.jsx)(Combobox,{autoSelect:"always",placeholder:(0,build_module.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,jsx_runtime.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:library_search})})]}),(0,jsx_runtime.jsxs)(ComboboxList,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[matches.map((element=>(0,jsx_runtime.jsxs)(ComboboxItem,{resetValueOnSelect:!1,value:element.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[(0,jsx_runtime.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-check",children:[filter.singleSelection&¤tValue===element.value&&(0,jsx_runtime.jsx)(build_module_icon.A,{icon:search_widget_radioCheck}),!filter.singleSelection&¤tValue.includes(element.value)&&(0,jsx_runtime.jsx)(build_module_icon.A,{icon:library_check})]}),(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)(ComboboxItemValue,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:element.label}),!!element.description&&(0,jsx_runtime.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:element.description})]})]},element.value))),!matches.length&&(0,jsx_runtime.jsx)("p",{children:(0,build_module.__)("No results found")})]})]})}function SearchWidget(props){const Widget=props.filter.elements.length>10?search_widget_ComboboxList:ListBox;return(0,jsx_runtime.jsx)(Widget,{...props})}const ENTER="Enter",SPACE=" ",FilterText=({activeElements,filterInView,filter})=>{if(void 0===activeElements||0===activeElements.length)return filter.name;const filterTextWrappers={Name:(0,jsx_runtime.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,jsx_runtime.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};return filterInView?.operator===OPERATOR_IS_ANY?create_interpolate_element((0,build_module.nv)((0,build_module.__)("%1$s is any: %2$s"),filter.name,activeElements.map((element=>element.label)).join(", ")),filterTextWrappers):filterInView?.operator===OPERATOR_IS_NONE?create_interpolate_element((0,build_module.nv)((0,build_module.__)("%1$s is none: %2$s"),filter.name,activeElements.map((element=>element.label)).join(", ")),filterTextWrappers):"isAll"===filterInView?.operator?create_interpolate_element((0,build_module.nv)((0,build_module.__)("%1$s is all: %2$s"),filter.name,activeElements.map((element=>element.label)).join(", ")),filterTextWrappers):"isNotAll"===filterInView?.operator?create_interpolate_element((0,build_module.nv)((0,build_module.__)("%1$s is not all: %2$s"),filter.name,activeElements.map((element=>element.label)).join(", ")),filterTextWrappers):filterInView?.operator===OPERATOR_IS?create_interpolate_element((0,build_module.nv)((0,build_module.__)("%1$s is: %2$s"),filter.name,activeElements[0].label),filterTextWrappers):filterInView?.operator===OPERATOR_IS_NOT?create_interpolate_element((0,build_module.nv)((0,build_module.__)("%1$s is not: %2$s"),filter.name,activeElements[0].label),filterTextWrappers):(0,build_module.nv)((0,build_module.__)("Unknown status for %1$s"),filter.name)};function OperatorSelector({filter,view,onChangeView}){const operatorOptions=filter.operators?.map((operator=>({value:operator,label:OPERATORS[operator]?.label}))),currentFilter=view.filters?.find((_filter=>_filter.field===filter.field)),value=currentFilter?.operator||filter.operators[0];return operatorOptions.length>1&&(0,jsx_runtime.jsxs)(component.A,{spacing:2,justify:"flex-start",className:"dataviews-filters__summary-operators-container",children:[(0,jsx_runtime.jsx)(flex_item_component.A,{className:"dataviews-filters__summary-operators-filter-name",children:filter.name}),(0,jsx_runtime.jsx)(select_control.A,{label:(0,build_module.__)("Conditions"),value,options:operatorOptions,onChange:newValue=>{var _view$filters,_view$filters2;const operator=newValue,newFilters=currentFilter?[...(null!==(_view$filters=view.filters)&&void 0!==_view$filters?_view$filters:[]).map((_filter=>_filter.field===filter.field?{..._filter,operator}:_filter))]:[...null!==(_view$filters2=view.filters)&&void 0!==_view$filters2?_view$filters2:[],{field:filter.field,operator,value:void 0}];onChangeView({...view,page:1,filters:newFilters})},size:"small",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0})]})}function FilterSummary({addFilterRef,openedFilter,...commonProps}){const toggleRef=(0,react.useRef)(null),{filter,view,onChangeView}=commonProps,filterInView=view.filters?.find((f=>f.field===filter.field)),activeElements=filter.elements.filter((element=>filter.singleSelection?element.value===filterInView?.value:filterInView?.value?.includes(element.value))),isPrimary=filter.isPrimary,hasValues=void 0!==filterInView?.value,canResetOrRemove=!isPrimary||hasValues;return(0,jsx_runtime.jsx)(dropdown.A,{defaultOpen:openedFilter===filter.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{toggleRef.current?.focus()},renderToggle:({isOpen,onToggle})=>(0,jsx_runtime.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,jsx_runtime.jsx)(tooltip.Ay,{text:(0,build_module.nv)((0,build_module.__)("Filter by: %1$s"),filter.name.toLowerCase()),placement:"top",children:(0,jsx_runtime.jsx)("div",{className:(0,clsx.A)("dataviews-filters__summary-chip",{"has-reset":canResetOrRemove,"has-values":hasValues}),role:"button",tabIndex:0,onClick:onToggle,onKeyDown:event=>{[ENTER,SPACE].includes(event.key)&&(onToggle(),event.preventDefault())},"aria-pressed":isOpen,"aria-expanded":isOpen,ref:toggleRef,children:(0,jsx_runtime.jsx)(FilterText,{activeElements,filterInView,filter})})}),canResetOrRemove&&(0,jsx_runtime.jsx)(tooltip.Ay,{text:isPrimary?(0,build_module.__)("Reset"):(0,build_module.__)("Remove"),placement:"top",children:(0,jsx_runtime.jsx)("button",{className:(0,clsx.A)("dataviews-filters__summary-chip-remove",{"has-values":hasValues}),onClick:()=>{onChangeView({...view,page:1,filters:view.filters?.filter((_filter=>_filter.field!==filter.field))}),isPrimary?toggleRef.current?.focus():addFilterRef.current?.focus()},children:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:close_small.A})})})]}),renderContent:()=>(0,jsx_runtime.jsxs)(v_stack_component.A,{spacing:0,justify:"flex-start",children:[(0,jsx_runtime.jsx)(OperatorSelector,{...commonProps}),(0,jsx_runtime.jsx)(SearchWidget,{...commonProps})]})})}const{DropdownMenuV2:add_filter_DropdownMenuV2}=build_module_lock_unlock_unlock(privateApis);function AddFilterDropdownMenu({filters,view,onChangeView,setOpenedFilter,trigger}){const inactiveFilters=filters.filter((filter=>!filter.isVisible));return(0,jsx_runtime.jsx)(add_filter_DropdownMenuV2,{trigger,children:inactiveFilters.map((filter=>(0,jsx_runtime.jsx)(add_filter_DropdownMenuV2.Item,{onClick:()=>{setOpenedFilter(filter.field),onChangeView({...view,page:1,filters:[...view.filters||[],{field:filter.field,value:void 0,operator:filter.operators[0]}]})},children:(0,jsx_runtime.jsx)(add_filter_DropdownMenuV2.ItemLabel,{children:filter.name})},filter.field)))})}const add_filter=(0,react.forwardRef)((function AddFilter({filters,view,onChangeView,setOpenedFilter},ref){if(!filters.length||filters.every((({isPrimary})=>isPrimary)))return null;const inactiveFilters=filters.filter((filter=>!filter.isVisible));return(0,jsx_runtime.jsx)(AddFilterDropdownMenu,{trigger:(0,jsx_runtime.jsx)(build_module_button.Ay,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!inactiveFilters.length,ref,children:(0,build_module.__)("Add filter")}),filters,view,onChangeView,setOpenedFilter})}));function ResetFilter({filters,view,onChangeView}){const isDisabled=!view.search&&!view.filters?.some((_filter=>{return void 0!==_filter.value||(field=_filter.field,!filters.some((_filter=>_filter.field===field&&_filter.isPrimary)));var field}));return(0,jsx_runtime.jsx)(build_module_button.Ay,{disabled:isDisabled,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{onChangeView({...view,page:1,search:"",filters:[]})},children:(0,build_module.__)("Reset")})}function sanitizeOperators(field){let operators=field.filterBy?.operators;return operators&&Array.isArray(operators)||(operators=[OPERATOR_IS_ANY,OPERATOR_IS_NONE]),operators=operators.filter((operator=>ALL_OPERATORS.includes(operator))),(operators.includes(OPERATOR_IS)||operators.includes(OPERATOR_IS_NOT))&&(operators=operators.filter((operator=>[OPERATOR_IS,OPERATOR_IS_NOT].includes(operator)))),operators}function useFilters(fields,view){return(0,react.useMemo)((()=>{const filters=[];return fields.forEach((field=>{if(!field.elements?.length)return;const operators=sanitizeOperators(field);if(0===operators.length)return;const isPrimary=!!field.filterBy?.isPrimary;filters.push({field:field.id,name:field.label,elements:field.elements,singleSelection:operators.some((op=>[OPERATOR_IS,OPERATOR_IS_NOT].includes(op))),operators,isVisible:isPrimary||!!view.filters?.some((f=>f.field===field.id&&ALL_OPERATORS.includes(f.operator))),isPrimary})})),filters.sort(((a,b)=>a.isPrimary&&!b.isPrimary?-1:!a.isPrimary&&b.isPrimary?1:a.name.localeCompare(b.name))),filters}),[fields,view])}function FilterVisibilityToggle({filters,view,onChangeView,setOpenedFilter,isShowingFilter,setIsShowingFilter}){const onChangeViewWithFilterVisibility=(0,react.useCallback)((_view=>{onChangeView(_view),setIsShowingFilter(!0)}),[onChangeView,setIsShowingFilter]),hasVisibleFilters=!!filters.filter((filter=>filter.isVisible)).length;return 0===filters.length?null:hasVisibleFilters?(0,jsx_runtime.jsxs)("div",{className:"dataviews-filters__container-visibility-toggle",children:[(0,jsx_runtime.jsx)(build_module_button.Ay,{className:"dataviews-filters__visibility-toggle",size:"compact",icon:library_funnel,label:(0,build_module.__)("Toggle filter display"),onClick:()=>{isShowingFilter||setOpenedFilter(null),setIsShowingFilter(!isShowingFilter)},isPressed:isShowingFilter,"aria-expanded":isShowingFilter}),hasVisibleFilters&&!!view.filters?.length&&(0,jsx_runtime.jsx)("span",{className:"dataviews-filters-toggle__count",children:view.filters?.length})]}):(0,jsx_runtime.jsx)(AddFilterDropdownMenu,{filters,view,onChangeView:onChangeViewWithFilterVisibility,setOpenedFilter,trigger:(0,jsx_runtime.jsx)(build_module_button.Ay,{className:"dataviews-filters__visibility-toggle",size:"compact",icon:library_funnel,label:(0,build_module.__)("Add filter"),isPressed:!1,"aria-expanded":!1})})}const dataviews_filters=(0,react.memo)((function Filters(){const{fields,view,onChangeView,openedFilter,setOpenedFilter}=(0,react.useContext)(dataviews_context),addFilterRef=(0,react.useRef)(null),filters=useFilters(fields,view),addFilter=(0,jsx_runtime.jsx)(add_filter,{filters,view,onChangeView,ref:addFilterRef,setOpenedFilter},"add-filter"),visibleFilters=filters.filter((filter=>filter.isVisible));if(0===visibleFilters.length)return null;const filterComponents=[...visibleFilters.map((filter=>(0,jsx_runtime.jsx)(FilterSummary,{filter,view,onChangeView,addFilterRef,openedFilter},filter.field))),addFilter];return filterComponents.push((0,jsx_runtime.jsx)(ResetFilter,{filters,view,onChangeView},"reset-filters")),(0,jsx_runtime.jsx)(component.A,{justify:"flex-start",style:{width:"fit-content"},className:"dataviews-filters__container",wrap:!0,children:filterComponents})})),block_table=(0,jsx_runtime.jsx)(svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})}),library_category=(0,jsx_runtime.jsx)(svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})}),format_list_bullets_rtl=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),format_list_bullets=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});const spinAnimation=emotion_react_browser_esm.i7` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,StyledSpinner=(0,emotion_styled_base_browser_esm.A)("svg",{target:"ea4tfvq2"})("width:",config_values.A.spinnerSize,"px;height:",config_values.A.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:",colors_values.l.theme.accent,";overflow:visible;opacity:1;background-color:transparent;"),commonPathProps={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},SpinnerTrack=(0,emotion_styled_base_browser_esm.A)("circle",{target:"ea4tfvq1"})(commonPathProps,";stroke:",colors_values.l.gray[300],";"),SpinnerIndicator=(0,emotion_styled_base_browser_esm.A)("path",{target:"ea4tfvq0"})(commonPathProps,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",spinAnimation,";");const spinner=(0,react.forwardRef)((function UnforwardedSpinner({className,...props},forwardedRef){return(0,jsx_runtime.jsxs)(StyledSpinner,{className:(0,clsx.A)("components-spinner",className),viewBox:"0 0 100 100",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false",...props,ref:forwardedRef,children:[(0,jsx_runtime.jsx)(SpinnerTrack,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,jsx_runtime.jsx)(SpinnerIndicator,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"})]})}));var use_ref_effect=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js"),deprecated_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+deprecated@4.7.0/node_modules/@wordpress/deprecated/build-module/index.js"),library_reset=__webpack_require__("../../node_modules/.pnpm/@wordpress+icons@10.7.0_react@17.0.2/node_modules/@wordpress/icons/build-module/library/reset.js"),base_control=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/base-control/index.js");const checkbox_control=function CheckboxControl(props){const{__nextHasNoMarginBottom,label,className,heading,checked,indeterminate,help,id:idProp,onChange,...additionalProps}=props;heading&&(0,deprecated_build_module.A)("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[showCheckedIcon,setShowCheckedIcon]=(0,react.useState)(!1),[showIndeterminateIcon,setShowIndeterminateIcon]=(0,react.useState)(!1),ref=(0,use_ref_effect.A)((node=>{node&&(node.indeterminate=!!indeterminate,setShowCheckedIcon(node.matches(":checked")),setShowIndeterminateIcon(node.matches(":indeterminate")))}),[checked,indeterminate]),id=(0,use_instance_id.A)(CheckboxControl,"inspector-checkbox-control",idProp);return(0,jsx_runtime.jsx)(base_control.Ay,{__nextHasNoMarginBottom,__associatedWPComponentName:"CheckboxControl",label:heading,id,help:help&&(0,jsx_runtime.jsx)("span",{className:"components-checkbox-control__help",children:help}),className:(0,clsx.A)("components-checkbox-control",className),children:(0,jsx_runtime.jsxs)(component.A,{spacing:0,justify:"start",alignment:"top",children:[(0,jsx_runtime.jsxs)("span",{className:"components-checkbox-control__input-container",children:[(0,jsx_runtime.jsx)("input",{ref,id,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:event=>onChange(event.target.checked),checked,"aria-describedby":help?id+"__help":void 0,...additionalProps}),showIndeterminateIcon?(0,jsx_runtime.jsx)(icon.A,{icon:library_reset.A,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,showCheckedIcon?(0,jsx_runtime.jsx)(icon.A,{icon:library_check,className:"components-checkbox-control__checked",role:"presentation"}):null]}),label&&(0,jsx_runtime.jsx)("label",{className:"components-checkbox-control__label",htmlFor:id,children:label})]})})};function DataViewsSelectionCheckbox({selection,onChangeSelection,item,getItemId,primaryField,disabled}){const id=getItemId(item),checked=!disabled&&selection.includes(id);let selectionLabel;return selectionLabel=primaryField?.getValue&&item?(0,build_module.nv)(checked?(0,build_module.__)("Deselect item: %s"):(0,build_module.__)("Select item: %s"),primaryField.getValue({item})):checked?(0,build_module.__)("Select a new item"):(0,build_module.__)("Deselect item"),(0,jsx_runtime.jsx)(checkbox_control,{className:"dataviews-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":selectionLabel,"aria-disabled":disabled,checked,onChange:()=>{disabled||onChangeSelection(selection.includes(id)?selection.filter((itemId=>id!==itemId)):[...selection,id])}})}var use_focus_on_mount=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-on-mount/index.js"),use_constrained_tabbing=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-constrained-tabbing/index.js"),use_focus_return=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-return/index.js"),use_merge_refs=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-merge-refs/index.js"),library_close=__webpack_require__("../../node_modules/.pnpm/@wordpress+icons@10.7.0_react@17.0.2/node_modules/@wordpress/icons/build-module/library/close.js");function get_computed_style_getComputedStyle(element){return element.ownerDocument.defaultView,element.ownerDocument.defaultView.getComputedStyle(element)}function getScrollContainer(node,direction="vertical"){if(node){if(("vertical"===direction||"all"===direction)&&node.scrollHeight>node.clientHeight){const{overflowY}=get_computed_style_getComputedStyle(node);if(/(auto|scroll)/.test(overflowY))return node}if(("horizontal"===direction||"all"===direction)&&node.scrollWidth>node.clientWidth){const{overflowX}=get_computed_style_getComputedStyle(node);if(/(auto|scroll)/.test(overflowX))return node}return node.ownerDocument===node.parentNode?node:getScrollContainer(node.parentNode,direction)}}const LIVE_REGION_ARIA_ROLES=new Set(["alert","status","log","marquee","timer"]),hiddenElementsByDepth=[];function elementShouldBeHidden(element){const role=element.getAttribute("role");return!("SCRIPT"===element.tagName||element.hasAttribute("aria-hidden")||element.hasAttribute("aria-live")||role&&LIVE_REGION_ARIA_ROLES.has(role))}var style_provider=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/style-provider/index.js"),with_ignore_ime_events=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/with-ignore-ime-events.js");const ModalContext=(0,react.createContext)(new Set),bodyOpenClasses=new Map;const Modal=(0,react.forwardRef)((function UnforwardedModal(props,forwardedRef){const{bodyOpenClassName="modal-open",role="dialog",title=null,focusOnMount=!0,shouldCloseOnEsc=!0,shouldCloseOnClickOutside=!0,isDismissible=!0,aria={labelledby:void 0,describedby:void 0},onRequestClose,icon,closeButtonLabel,children,style,overlayClassName,className,contentLabel,onKeyDown,isFullScreen=!1,size,headerActions=null,__experimentalHideHeader=!1}=props,ref=(0,react.useRef)(),instanceId=(0,use_instance_id.A)(Modal),headingId=title?`components-modal-header-${instanceId}`:aria.labelledby,focusOnMountRef=(0,use_focus_on_mount.A)("firstContentElement"===focusOnMount?"firstElement":focusOnMount),constrainedTabbingRef=(0,use_constrained_tabbing.A)(),focusReturnRef=(0,use_focus_return.A)(),contentRef=(0,react.useRef)(null),childrenContainerRef=(0,react.useRef)(null),[hasScrolledContent,setHasScrolledContent]=(0,react.useState)(!1),[hasScrollableContent,setHasScrollableContent]=(0,react.useState)(!1);let sizeClass;isFullScreen||"fill"===size?sizeClass="is-full-screen":size&&(sizeClass=`has-size-${size}`);const isContentScrollable=(0,react.useCallback)((()=>{if(!contentRef.current)return;const closestScrollContainer=getScrollContainer(contentRef.current);contentRef.current===closestScrollContainer?setHasScrollableContent(!0):setHasScrollableContent(!1)}),[contentRef]);(0,react.useEffect)((()=>(function modalize(modalElement){const elements=Array.from(document.body.children),hiddenElements=[];hiddenElementsByDepth.push(hiddenElements);for(const element of elements)element!==modalElement&&elementShouldBeHidden(element)&&(element.setAttribute("aria-hidden","true"),hiddenElements.push(element))}(ref.current),()=>function unmodalize(){const hiddenElements=hiddenElementsByDepth.pop();if(hiddenElements)for(const element of hiddenElements)element.removeAttribute("aria-hidden")}())),[]);const onRequestCloseRef=(0,react.useRef)();(0,react.useEffect)((()=>{onRequestCloseRef.current=onRequestClose}),[onRequestClose]);const dismissers=(0,react.useContext)(ModalContext),[nestedDismissers]=(0,react.useState)((()=>new Set));(0,react.useEffect)((()=>{dismissers.add(onRequestCloseRef);for(const dismisser of dismissers)dismisser!==onRequestCloseRef&&dismisser.current?.();return()=>{for(const dismisser of nestedDismissers)dismisser.current?.();dismissers.delete(onRequestCloseRef)}}),[dismissers,nestedDismissers]),(0,react.useEffect)((()=>{var _bodyOpenClasses$get;const theClass=bodyOpenClassName,oneMore=1+(null!==(_bodyOpenClasses$get=bodyOpenClasses.get(theClass))&&void 0!==_bodyOpenClasses$get?_bodyOpenClasses$get:0);return bodyOpenClasses.set(theClass,oneMore),document.body.classList.add(bodyOpenClassName),()=>{const oneLess=bodyOpenClasses.get(theClass)-1;0===oneLess?(document.body.classList.remove(theClass),bodyOpenClasses.delete(theClass)):bodyOpenClasses.set(theClass,oneLess)}}),[bodyOpenClassName]),(0,react.useLayoutEffect)((()=>{if(!window.ResizeObserver||!childrenContainerRef.current)return;const resizeObserver=new ResizeObserver(isContentScrollable);return resizeObserver.observe(childrenContainerRef.current),isContentScrollable(),()=>{resizeObserver.disconnect()}}),[isContentScrollable,childrenContainerRef]);const onContentContainerScroll=(0,react.useCallback)((e=>{var _e$currentTarget$scro;const scrollY=null!==(_e$currentTarget$scro=e?.currentTarget?.scrollTop)&&void 0!==_e$currentTarget$scro?_e$currentTarget$scro:-1;!hasScrolledContent&&scrollY>0?setHasScrolledContent(!0):hasScrolledContent&&scrollY<=0&&setHasScrolledContent(!1)}),[hasScrolledContent]);let pressTarget=null;const overlayPressHandlers={onPointerDown:event=>{event.target===event.currentTarget&&(pressTarget=event.target,event.preventDefault())},onPointerUp:({target,button})=>{const isSameTarget=target===pressTarget;pressTarget=null,0===button&&isSameTarget&&onRequestClose()}},modal=(0,jsx_runtime.jsx)("div",{ref:(0,use_merge_refs.A)([ref,forwardedRef]),className:(0,clsx.A)("components-modal__screen-overlay",overlayClassName),onKeyDown:(0,with_ignore_ime_events.n)((function handleEscapeKeyDown(event){!shouldCloseOnEsc||"Escape"!==event.code&&"Escape"!==event.key||event.defaultPrevented||(event.preventDefault(),onRequestClose&&onRequestClose(event))})),...shouldCloseOnClickOutside?overlayPressHandlers:{},children:(0,jsx_runtime.jsx)(style_provider.A,{document,children:(0,jsx_runtime.jsx)("div",{className:(0,clsx.A)("components-modal__frame",sizeClass,className),style,ref:(0,use_merge_refs.A)([constrainedTabbingRef,focusReturnRef,"firstContentElement"!==focusOnMount?focusOnMountRef:null]),role,"aria-label":contentLabel,"aria-labelledby":contentLabel?void 0:headingId,"aria-describedby":aria.describedby,tabIndex:-1,onKeyDown,children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx.A)("components-modal__content",{"hide-header":__experimentalHideHeader,"is-scrollable":hasScrollableContent,"has-scrolled-content":hasScrolledContent}),role:"document",onScroll:onContentContainerScroll,ref:contentRef,"aria-label":hasScrollableContent?(0,build_module.__)("Scrollable section"):void 0,tabIndex:hasScrollableContent?0:void 0,children:[!__experimentalHideHeader&&(0,jsx_runtime.jsxs)("div",{className:"components-modal__header",children:[(0,jsx_runtime.jsxs)("div",{className:"components-modal__header-heading-container",children:[icon&&(0,jsx_runtime.jsx)("span",{className:"components-modal__icon-container","aria-hidden":!0,children:icon}),title&&(0,jsx_runtime.jsx)("h1",{id:headingId,className:"components-modal__header-heading",children:title})]}),headerActions,isDismissible&&(0,jsx_runtime.jsx)(build_module_button.Ay,{onClick:onRequestClose,icon:library_close.A,label:closeButtonLabel||(0,build_module.__)("Close")})]}),(0,jsx_runtime.jsx)("div",{ref:(0,use_merge_refs.A)([childrenContainerRef,"firstContentElement"===focusOnMount?focusOnMountRef:null]),children})]})})})});return(0,react_dom.createPortal)((0,jsx_runtime.jsx)(ModalContext.Provider,{value:nestedDismissers,children:modal}),document.body)})),modal=Modal,more_vertical=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var redux=__webpack_require__("../../node_modules/.pnpm/redux@4.2.1/node_modules/redux/es/redux.js"),equivalent_key_map=__webpack_require__("../../node_modules/.pnpm/equivalent-key-map@0.2.2/node_modules/equivalent-key-map/equivalent-key-map.js"),equivalent_key_map_default=__webpack_require__.n(equivalent_key_map);var dist=__webpack_require__("../../node_modules/.pnpm/rungen@0.3.2/node_modules/rungen/dist/index.js"),is_promise=__webpack_require__("../../node_modules/.pnpm/is-promise@4.0.0/node_modules/is-promise/index.mjs"),is_plain_object=__webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs");function isAction(object){return(0,is_plain_object.Q)(object)&&"string"==typeof object.type}function createRuntime(controls={},dispatch){const rungenControls=Object.entries(controls).map((([actionType,control])=>(value,next,iterate,yieldNext,yieldError)=>{if(!function isActionOfType(object,expectedType){return isAction(object)&&object.type===expectedType}(value,actionType))return!1;const routine=control(value);return(0,is_promise.A)(routine)?routine.then(yieldNext,yieldError):yieldNext(routine),!0}));rungenControls.push(((value,next)=>!!isAction(value)&&(dispatch(value),next(),!0)));const rungenRuntime=(0,dist.create)(rungenControls);return action=>new Promise(((resolve,reject)=>rungenRuntime(action,(result=>{isAction(result)&&dispatch(result),resolve(result)}),reject)))}function createMiddleware(controls={}){return store=>{const runtime=createRuntime(controls,store.dispatch);return next=>action=>function isGenerator(object){return!!object&&"function"==typeof object[Symbol.iterator]&&"function"==typeof object.next}(action)?runtime(action):next(action)}}const basePipe=(reverse=!1)=>(...funcs)=>(...args)=>{const functions=funcs.flat();return reverse&&functions.reverse(),functions.reduce(((prev,func)=>[func(...prev)]),args)[0]},higher_order_compose=(basePipe(),basePipe(!0));function createRegistryControl(registryControl){return registryControl.isRegistryControl=!0,registryControl}const builtinControls={"@@data/SELECT":createRegistryControl((registry=>({storeKey,selectorName,args})=>registry.select(storeKey)[selectorName](...args))),"@@data/RESOLVE_SELECT":createRegistryControl((registry=>({storeKey,selectorName,args})=>{const method=registry.select(storeKey)[selectorName].hasResolver?"resolveSelect":"select";return registry[method](storeKey)[selectorName](...args)})),"@@data/DISPATCH":createRegistryControl((registry=>({storeKey,actionName,args})=>registry.dispatch(storeKey)[actionName](...args)))},{lock:data_build_module_lock_unlock_lock,unlock:data_build_module_lock_unlock_unlock}=__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/data"),promise_middleware=()=>next=>action=>(0,is_promise.A)(action)?action.then((resolvedAction=>{if(resolvedAction)return next(resolvedAction)})):next(action),resolvers_cache_middleware=(registry,storeName)=>()=>next=>action=>{const resolvers=registry.select(storeName).getCachedResolvers();return Object.entries(resolvers).forEach((([selectorName,resolversByArgs])=>{const resolver=registry.stores[storeName]?.resolvers?.[selectorName];resolver&&resolver.shouldInvalidate&&resolversByArgs.forEach(((value,args)=>{void 0!==value&&("finished"!==value.status&&"error"!==value.status||resolver.shouldInvalidate(action,...args)&®istry.dispatch(storeName).invalidateResolution(selectorName,args))}))})),next(action)};function createThunkMiddleware(args){return()=>next=>action=>"function"==typeof action?action(args):next(action)}function selectorArgsToStateKey(args){if(null==args)return[];const len=args.length;let idx=len;for(;idx>0&&void 0===args[idx-1];)idx--;return idx===len?args:args.slice(0,idx)}const subKeysIsResolved=(actionProperty="selectorName",reducer=>(state={},action)=>{const key=action[actionProperty];if(void 0===key)return state;const nextKeyState=reducer(state[key],action);return nextKeyState===state[key]?state:{...state,[key]:nextKeyState}})(((state=new(equivalent_key_map_default()),action)=>{switch(action.type){case"START_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.set(selectorArgsToStateKey(action.args),{status:"resolving"}),nextState}case"FINISH_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.set(selectorArgsToStateKey(action.args),{status:"finished"}),nextState}case"FAIL_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.set(selectorArgsToStateKey(action.args),{status:"error",error:action.error}),nextState}case"START_RESOLUTIONS":{const nextState=new(equivalent_key_map_default())(state);for(const resolutionArgs of action.args)nextState.set(selectorArgsToStateKey(resolutionArgs),{status:"resolving"});return nextState}case"FINISH_RESOLUTIONS":{const nextState=new(equivalent_key_map_default())(state);for(const resolutionArgs of action.args)nextState.set(selectorArgsToStateKey(resolutionArgs),{status:"finished"});return nextState}case"FAIL_RESOLUTIONS":{const nextState=new(equivalent_key_map_default())(state);return action.args.forEach(((resolutionArgs,idx)=>{const resolutionState={status:"error",error:void 0},error=action.errors[idx];error&&(resolutionState.error=error),nextState.set(selectorArgsToStateKey(resolutionArgs),resolutionState)})),nextState}case"INVALIDATE_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.delete(selectorArgsToStateKey(action.args)),nextState}}return state}));var actionProperty;const metadata_reducer=(state={},action)=>{switch(action.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":if(action.selectorName in state){const{[action.selectorName]:removedSelector,...restState}=state;return restState}return state;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return subKeysIsResolved(state,action)}return state};function getResolutionState(state,selectorName,args){const map=state[selectorName];if(map)return map.get(selectorArgsToStateKey(args))}function getIsResolving(state,selectorName,args){(0,deprecated_build_module.A)("wp.data.select( store ).getIsResolving",{since:"6.6",version:"6.8",alternative:"wp.data.select( store ).getResolutionState"});const resolutionState=getResolutionState(state,selectorName,args);return resolutionState&&"resolving"===resolutionState.status}function hasStartedResolution(state,selectorName,args){return void 0!==getResolutionState(state,selectorName,args)}function hasFinishedResolution(state,selectorName,args){const status=getResolutionState(state,selectorName,args)?.status;return"finished"===status||"error"===status}function hasResolutionFailed(state,selectorName,args){return"error"===getResolutionState(state,selectorName,args)?.status}function getResolutionError(state,selectorName,args){const resolutionState=getResolutionState(state,selectorName,args);return"error"===resolutionState?.status?resolutionState.error:null}function isResolving(state,selectorName,args){return"resolving"===getResolutionState(state,selectorName,args)?.status}function getCachedResolvers(state){return state}function hasResolvingSelectors(state){return Object.values(state).some((selectorState=>Array.from(selectorState._map.values()).some((resolution=>"resolving"===resolution[1]?.status))))}const countSelectorsByStatus=(0,__webpack_require__("../../node_modules/.pnpm/rememo@4.0.2/node_modules/rememo/rememo.js").A)((state=>{const selectorsByStatus={};return Object.values(state).forEach((selectorState=>Array.from(selectorState._map.values()).forEach((resolution=>{var _resolution$1$status;const currentStatus=null!==(_resolution$1$status=resolution[1]?.status)&&void 0!==_resolution$1$status?_resolution$1$status:"error";selectorsByStatus[currentStatus]||(selectorsByStatus[currentStatus]=0),selectorsByStatus[currentStatus]++})))),selectorsByStatus}),(state=>[state]));function startResolution(selectorName,args){return{type:"START_RESOLUTION",selectorName,args}}function finishResolution(selectorName,args){return{type:"FINISH_RESOLUTION",selectorName,args}}function failResolution(selectorName,args,error){return{type:"FAIL_RESOLUTION",selectorName,args,error}}function startResolutions(selectorName,args){return{type:"START_RESOLUTIONS",selectorName,args}}function finishResolutions(selectorName,args){return{type:"FINISH_RESOLUTIONS",selectorName,args}}function failResolutions(selectorName,args,errors){return{type:"FAIL_RESOLUTIONS",selectorName,args,errors}}function invalidateResolution(selectorName,args){return{type:"INVALIDATE_RESOLUTION",selectorName,args}}function invalidateResolutionForStore(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function invalidateResolutionForStoreSelector(selectorName){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName}}const trimUndefinedValues=array=>{const result=[...array];for(let i=result.length-1;i>=0;i--)void 0===result[i]&&result.splice(i,1);return result},mapValues=(obj,callback)=>Object.fromEntries(Object.entries(null!=obj?obj:{}).map((([key,value])=>[key,callback(value,key)]))),devToolsReplacer=(key,state)=>state instanceof Map?Object.fromEntries(state):state instanceof window.HTMLElement?null:state;function createBindingCache(bind){const cache=new WeakMap;return{get(item,itemName){let boundItem=cache.get(item);return boundItem||(boundItem=bind(item,itemName),cache.set(item,boundItem)),boundItem}}}function createReduxStore(key,options){const privateActions={},privateSelectors={},privateRegistrationFunctions={privateActions,registerPrivateActions:actions=>{Object.assign(privateActions,actions)},privateSelectors,registerPrivateSelectors:selectors=>{Object.assign(privateSelectors,selectors)}},storeDescriptor={name:key,instantiate:registry=>{const listeners=new Set,reducer=options.reducer,store=function instantiateReduxStore(key,options,registry,thunkArgs){const controls={...options.controls,...builtinControls},normalizedControls=mapValues(controls,(control=>control.isRegistryControl?control(registry):control)),middlewares=[resolvers_cache_middleware(registry,key),promise_middleware,createMiddleware(normalizedControls),createThunkMiddleware(thunkArgs)],enhancers=[(0,redux.Tw)(...middlewares)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:key,instanceId:key,serialize:{replacer:devToolsReplacer}}));const{reducer,initialState}=options,enhancedReducer=function combineReducers(reducers){const keys=Object.keys(reducers);return function combinedReducer(state={},action){const nextState={};let hasChanged=!1;for(const key of keys){const reducer=reducers[key],prevStateForKey=state[key],nextStateForKey=reducer(prevStateForKey,action);nextState[key]=nextStateForKey,hasChanged=hasChanged||nextStateForKey!==prevStateForKey}return hasChanged?nextState:state}}({metadata:metadata_reducer,root:reducer});return(0,redux.y$)(enhancedReducer,{root:initialState},higher_order_compose(enhancers))}(key,options,registry,{registry,get dispatch(){return thunkActions},get select(){return thunkSelectors},get resolveSelect(){return getResolveSelectors()}});data_build_module_lock_unlock_lock(store,privateRegistrationFunctions);const resolversCache=function createResolversCache(){const cache={};return{isRunning:(selectorName,args)=>cache[selectorName]&&cache[selectorName].get(trimUndefinedValues(args)),clear(selectorName,args){cache[selectorName]&&cache[selectorName].delete(trimUndefinedValues(args))},markAsRunning(selectorName,args){cache[selectorName]||(cache[selectorName]=new(equivalent_key_map_default())),cache[selectorName].set(trimUndefinedValues(args),!0)}}}();function bindAction(action){return(...args)=>Promise.resolve(store.dispatch(action(...args)))}const actions={...mapValues(actions_namespaceObject,bindAction),...mapValues(options.actions,bindAction)},boundPrivateActions=createBindingCache(bindAction),allActions=new Proxy((()=>{}),{get:(target,prop)=>{const privateAction=privateActions[prop];return privateAction?boundPrivateActions.get(privateAction,prop):actions[prop]}}),thunkActions=new Proxy(allActions,{apply:(target,thisArg,[action])=>store.dispatch(action)});data_build_module_lock_unlock_lock(actions,allActions);const resolvers=options.resolvers?function mapResolvers(resolvers){return mapValues(resolvers,(resolver=>resolver.fulfill?resolver:{...resolver,fulfill:resolver}))}(options.resolvers):{};function bindSelector(selector,selectorName){selector.isRegistrySelector&&(selector.registry=registry);const boundSelector=(...args)=>{args=normalize(selector,args);const state=store.__unstableOriginalGetState();return selector.isRegistrySelector&&(selector.registry=registry),selector(state.root,...args)};boundSelector.__unstableNormalizeArgs=selector.__unstableNormalizeArgs;const resolver=resolvers[selectorName];return resolver?function mapSelectorWithResolver(selector,selectorName,resolver,store,resolversCache){function fulfillSelector(args){const state=store.getState();if(resolversCache.isRunning(selectorName,args)||"function"==typeof resolver.isFulfilled&&resolver.isFulfilled(state,...args))return;const{metadata}=store.__unstableOriginalGetState();hasStartedResolution(metadata,selectorName,args)||(resolversCache.markAsRunning(selectorName,args),setTimeout((async()=>{resolversCache.clear(selectorName,args),store.dispatch(startResolution(selectorName,args));try{const action=resolver.fulfill(...args);action&&await store.dispatch(action),store.dispatch(finishResolution(selectorName,args))}catch(error){store.dispatch(failResolution(selectorName,args,error))}}),0))}const selectorResolver=(...args)=>(fulfillSelector(args=normalize(selector,args)),selector(...args));return selectorResolver.hasResolver=!0,selectorResolver}(boundSelector,selectorName,resolver,store,resolversCache):(boundSelector.hasResolver=!1,boundSelector)}const selectors={...mapValues(selectors_namespaceObject,(function bindMetadataSelector(metaDataSelector){const boundSelector=(...args)=>{const state=store.__unstableOriginalGetState(),originalSelectorName=args&&args[0],originalSelectorArgs=args&&args[1],targetSelector=options?.selectors?.[originalSelectorName];return originalSelectorName&&targetSelector&&(args[1]=normalize(targetSelector,originalSelectorArgs)),metaDataSelector(state.metadata,...args)};return boundSelector.hasResolver=!1,boundSelector})),...mapValues(options.selectors,bindSelector)},boundPrivateSelectors=createBindingCache(bindSelector);for(const[selectorName,selector]of Object.entries(privateSelectors))boundPrivateSelectors.get(selector,selectorName);const allSelectors=new Proxy((()=>{}),{get:(target,prop)=>{const privateSelector=privateSelectors[prop];return privateSelector?boundPrivateSelectors.get(privateSelector,prop):selectors[prop]}}),thunkSelectors=new Proxy(allSelectors,{apply:(target,thisArg,[selector])=>selector(store.__unstableOriginalGetState())});data_build_module_lock_unlock_lock(selectors,allSelectors);const resolveSelectors=function mapResolveSelectors(selectors,store){const{getIsResolving,hasStartedResolution,hasFinishedResolution,hasResolutionFailed,isResolving,getCachedResolvers,getResolutionState,getResolutionError,hasResolvingSelectors,countSelectorsByStatus,...storeSelectors}=selectors;return mapValues(storeSelectors,((selector,selectorName)=>selector.hasResolver?(...args)=>new Promise(((resolve,reject)=>{const hasFinished=()=>selectors.hasFinishedResolution(selectorName,args),finalize=result=>{if(selectors.hasResolutionFailed(selectorName,args)){const error=selectors.getResolutionError(selectorName,args);reject(error)}else resolve(result)},getResult=()=>selector.apply(null,args),result=getResult();if(hasFinished())return finalize(result);const unsubscribe=store.subscribe((()=>{hasFinished()&&(unsubscribe(),finalize(getResult()))}))})):async(...args)=>selector.apply(null,args)))}(selectors,store),suspendSelectors=function mapSuspendSelectors(selectors,store){return mapValues(selectors,((selector,selectorName)=>selector.hasResolver?(...args)=>{const result=selector.apply(null,args);if(selectors.hasFinishedResolution(selectorName,args)){if(selectors.hasResolutionFailed(selectorName,args))throw selectors.getResolutionError(selectorName,args);return result}throw new Promise((resolve=>{const unsubscribe=store.subscribe((()=>{selectors.hasFinishedResolution(selectorName,args)&&(resolve(),unsubscribe())}))}))}:selector))}(selectors,store),getResolveSelectors=()=>resolveSelectors;store.__unstableOriginalGetState=store.getState,store.getState=()=>store.__unstableOriginalGetState().root;const subscribe=store&&(listener=>(listeners.add(listener),()=>listeners.delete(listener)));let lastState=store.__unstableOriginalGetState();return store.subscribe((()=>{const state=store.__unstableOriginalGetState(),hasChanged=state!==lastState;if(lastState=state,hasChanged)for(const listener of listeners)listener()})),{reducer,store,actions,selectors,resolvers,getSelectors:()=>selectors,getResolveSelectors,getSuspendSelectors:()=>suspendSelectors,getActions:()=>actions,subscribe}}};return data_build_module_lock_unlock_lock(storeDescriptor,privateRegistrationFunctions),storeDescriptor}function normalize(selector,args){return selector.__unstableNormalizeArgs&&"function"==typeof selector.__unstableNormalizeArgs&&args?.length?selector.__unstableNormalizeArgs(args):args}const store={name:"core/data",instantiate(registry){const getCoreDataSelector=selectorName=>(key,...args)=>registry.select(key)[selectorName](...args),getCoreDataAction=actionName=>(key,...args)=>registry.dispatch(key)[actionName](...args);return{getSelectors:()=>Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map((selectorName=>[selectorName,getCoreDataSelector(selectorName)]))),getActions:()=>Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map((actionName=>[actionName,getCoreDataAction(actionName)]))),subscribe:()=>()=>()=>{}}}};function createEmitter(){let isPaused=!1,isPending=!1;const listeners=new Set,notifyListeners=()=>Array.from(listeners).forEach((listener=>listener()));return{get isPaused(){return isPaused},subscribe:listener=>(listeners.add(listener),()=>listeners.delete(listener)),pause(){isPaused=!0},resume(){isPaused=!1,isPending&&(isPending=!1,notifyListeners())},emit(){isPaused?isPending=!0:notifyListeners()}}}function getStoreName(storeNameOrDescriptor){return"string"==typeof storeNameOrDescriptor?storeNameOrDescriptor:storeNameOrDescriptor.name}const default_registry=function createRegistry(storeConfigs={},parent=null){const stores={},emitter=createEmitter();let listeningStores=null;function globalListener(){emitter.emit()}function registerStoreInstance(name,createStore){if(stores[name])return console.error('Store "'+name+'" is already registered.'),stores[name];const store=createStore();if("function"!=typeof store.getSelectors)throw new TypeError("store.getSelectors must be a function");if("function"!=typeof store.getActions)throw new TypeError("store.getActions must be a function");if("function"!=typeof store.subscribe)throw new TypeError("store.subscribe must be a function");store.emitter=createEmitter();const currentSubscribe=store.subscribe;if(store.subscribe=listener=>{const unsubscribeFromEmitter=store.emitter.subscribe(listener),unsubscribeFromStore=currentSubscribe((()=>{store.emitter.isPaused?store.emitter.emit():listener()}));return()=>{unsubscribeFromStore?.(),unsubscribeFromEmitter?.()}},stores[name]=store,store.subscribe(globalListener),parent)try{data_build_module_lock_unlock_unlock(store.store).registerPrivateActions(data_build_module_lock_unlock_unlock(parent).privateActionsOf(name)),data_build_module_lock_unlock_unlock(store.store).registerPrivateSelectors(data_build_module_lock_unlock_unlock(parent).privateSelectorsOf(name))}catch(e){}return store}let registry={batch:function batch(callback){if(emitter.isPaused)callback();else{emitter.pause(),Object.values(stores).forEach((store=>store.emitter.pause()));try{callback()}finally{emitter.resume(),Object.values(stores).forEach((store=>store.emitter.resume()))}}},stores,namespaces:stores,subscribe:(listener,storeNameOrDescriptor)=>{if(!storeNameOrDescriptor)return emitter.subscribe(listener);const storeName=getStoreName(storeNameOrDescriptor),store=stores[storeName];return store?store.subscribe(listener):parent?parent.subscribe(listener,storeNameOrDescriptor):emitter.subscribe(listener)},select:function select(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor);listeningStores?.add(storeName);const store=stores[storeName];return store?store.getSelectors():parent?.select(storeName)},resolveSelect:function resolveSelect(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor);listeningStores?.add(storeName);const store=stores[storeName];return store?store.getResolveSelectors():parent&&parent.resolveSelect(storeName)},suspendSelect:function suspendSelect(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor);listeningStores?.add(storeName);const store=stores[storeName];return store?store.getSuspendSelectors():parent&&parent.suspendSelect(storeName)},dispatch:function dispatch(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor),store=stores[storeName];return store?store.getActions():parent&&parent.dispatch(storeName)},use:function use(plugin,options){if(!plugin)return;return registry={...registry,...plugin(registry,options)},registry},register:function register(store){registerStoreInstance(store.name,(()=>store.instantiate(registry)))},registerGenericStore:function registerGenericStore(name,store){(0,deprecated_build_module.A)("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),registerStoreInstance(name,(()=>store))},registerStore:function registerStore(storeName,options){if(!options.reducer)throw new TypeError("Must specify store reducer");return registerStoreInstance(storeName,(()=>createReduxStore(storeName,options).instantiate(registry))).store},__unstableMarkListeningStores:function __unstableMarkListeningStores(callback,ref){listeningStores=new Set;try{return callback.call(this)}finally{ref.current=Array.from(listeningStores),listeningStores=null}}};registry.register(store);for(const[name,config]of Object.entries(storeConfigs))registry.register(createReduxStore(name,config));parent&&parent.subscribe(globalListener);const registryWithPlugins=function withPlugins(attributes){return Object.fromEntries(Object.entries(attributes).map((([key,attribute])=>"function"!=typeof attribute?[key,attribute]:[key,function(){return registry[key].apply(null,arguments)}])))}(registry);return data_build_module_lock_unlock_lock(registryWithPlugins,{privateActionsOf:name=>{try{return data_build_module_lock_unlock_unlock(stores[name].store).privateActions}catch(e){return{}}},privateSelectorsOf:name=>{try{return data_build_module_lock_unlock_unlock(stores[name].store).privateSelectors}catch(e){return{}}}}),registryWithPlugins}(),Context=(0,react.createContext)(default_registry),{Consumer,Provider}=Context;function useRegistry(){return(0,react.useContext)(Context)}const{DropdownMenuV2:dataviews_item_actions_DropdownMenuV2,kebabCase:dataviews_item_actions_kebabCase}=build_module_lock_unlock_unlock(privateApis);function ButtonTrigger({action,onClick,items}){const label="string"==typeof action.label?action.label:action.label(items);return(0,jsx_runtime.jsx)(build_module_button.Ay,{label,icon:action.icon,isDestructive:action.isDestructive,size:"compact",onClick})}function DropdownMenuItemTrigger({action,onClick,items}){const label="string"==typeof action.label?action.label:action.label(items);return(0,jsx_runtime.jsx)(dataviews_item_actions_DropdownMenuV2.Item,{onClick,hideOnClick:!("RenderModal"in action),children:(0,jsx_runtime.jsx)(dataviews_item_actions_DropdownMenuV2.ItemLabel,{children:label})})}function ActionModal({action,items,closeModal}){const label="string"==typeof action.label?action.label:action.label(items);return(0,jsx_runtime.jsx)(modal,{title:action.modalHeader||label,__experimentalHideHeader:!!action.hideModalHeader,onRequestClose:null!=closeModal?closeModal:()=>{},focusOnMount:"firstContentElement",size:"small",overlayClassName:`dataviews-action-modal dataviews-action-modal__${dataviews_item_actions_kebabCase(action.id)}`,children:(0,jsx_runtime.jsx)(action.RenderModal,{items,closeModal})})}function ActionWithModal({action,items,ActionTrigger,isBusy}){const[isModalOpen,setIsModalOpen]=(0,react.useState)(!1),actionTriggerProps={action,onClick:()=>{setIsModalOpen(!0)},items,isBusy};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(ActionTrigger,{...actionTriggerProps}),isModalOpen&&(0,jsx_runtime.jsx)(ActionModal,{action,items,closeModal:()=>setIsModalOpen(!1)})]})}function ActionsDropdownMenuGroup({actions,item}){const registry=useRegistry();return(0,jsx_runtime.jsx)(dataviews_item_actions_DropdownMenuV2.Group,{children:actions.map((action=>"RenderModal"in action?(0,jsx_runtime.jsx)(ActionWithModal,{action,items:[item],ActionTrigger:DropdownMenuItemTrigger},action.id):(0,jsx_runtime.jsx)(DropdownMenuItemTrigger,{action,onClick:()=>{action.callback([item],{registry})},items:[item]},action.id)))})}function ItemActions({item,actions,isCompact}){const registry=useRegistry(),{primaryActions,eligibleActions}=(0,react.useMemo)((()=>{const _eligibleActions=actions.filter((action=>!action.isEligible||action.isEligible(item)));return{primaryActions:_eligibleActions.filter((action=>action.isPrimary&&!!action.icon)),eligibleActions:_eligibleActions}}),[actions,item]);return isCompact?(0,jsx_runtime.jsx)(CompactItemActions,{item,actions:eligibleActions}):(0,jsx_runtime.jsxs)(component.A,{spacing:1,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:"0",width:"auto"},children:[!!primaryActions.length&&primaryActions.map((action=>"RenderModal"in action?(0,jsx_runtime.jsx)(ActionWithModal,{action,items:[item],ActionTrigger:ButtonTrigger},action.id):(0,jsx_runtime.jsx)(ButtonTrigger,{action,onClick:()=>{action.callback([item],{registry})},items:[item]},action.id))),(0,jsx_runtime.jsx)(CompactItemActions,{item,actions:eligibleActions})]})}function CompactItemActions({item,actions}){return(0,jsx_runtime.jsx)(dataviews_item_actions_DropdownMenuV2,{trigger:(0,jsx_runtime.jsx)(build_module_button.Ay,{size:"compact",icon:more_vertical,label:(0,build_module.__)("Actions"),accessibleWhenDisabled:!0,disabled:!actions.length,className:"dataviews-all-actions-button"}),placement:"bottom-end",children:(0,jsx_runtime.jsx)(ActionsDropdownMenuGroup,{actions,item})})}function useHasAPossibleBulkAction(actions,item){return(0,react.useMemo)((()=>actions.some((action=>action.supportsBulk&&(!action.isEligible||action.isEligible(item))))),[actions,item])}function useSomeItemHasAPossibleBulkAction(actions,data){return(0,react.useMemo)((()=>data.some((item=>actions.some((action=>action.supportsBulk&&(!action.isEligible||action.isEligible(item))))))),[actions,data])}function BulkSelectionCheckbox({selection,onChangeSelection,data,actions,getItemId}){const selectableItems=(0,react.useMemo)((()=>data.filter((item=>actions.some((action=>action.supportsBulk&&(!action.isEligible||action.isEligible(item))))))),[data,actions]),selectedItems=data.filter((item=>selection.includes(getItemId(item))&&selectableItems.includes(item))),areAllSelected=selectedItems.length===selectableItems.length;return(0,jsx_runtime.jsx)(checkbox_control,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:areAllSelected,indeterminate:!areAllSelected&&!!selectedItems.length,onChange:()=>{onChangeSelection(areAllSelected?[]:selectableItems.map((item=>getItemId(item))))},"aria-label":areAllSelected?(0,build_module.__)("Deselect all"):(0,build_module.__)("Select all")})}function ActionTrigger({action,onClick,isBusy,items}){const label="string"==typeof action.label?action.label:action.label(items);return(0,jsx_runtime.jsx)(build_module_button.Ay,{disabled:isBusy,accessibleWhenDisabled:!0,label,icon:action.icon,isDestructive:action.isDestructive,size:"compact",onClick,isBusy,tooltipPosition:"top"})}const dataviews_bulk_actions_EMPTY_ARRAY=[];function ActionButton({action,selectedItems,actionInProgress,setActionInProgress}){const registry=useRegistry(),selectedEligibleItems=(0,react.useMemo)((()=>selectedItems.filter((item=>!action.isEligible||action.isEligible(item)))),[action,selectedItems]);return"RenderModal"in action?(0,jsx_runtime.jsx)(ActionWithModal,{action,items:selectedEligibleItems,ActionTrigger},action.id):(0,jsx_runtime.jsx)(ActionTrigger,{action,onClick:async()=>{setActionInProgress(action.id),await action.callback(selectedItems,{registry}),setActionInProgress(null)},items:selectedEligibleItems,isBusy:actionInProgress===action.id},action.id)}function renderFooterContent(data,actions,getItemId,selection,actionsToShow,selectedItems,actionInProgress,setActionInProgress,onChangeSelection){const message=selectedItems.length>0?(0,build_module.nv)((0,build_module._n)("%d Item selected","%d Items selected",selectedItems.length),selectedItems.length):(0,build_module.nv)((0,build_module._n)("%d Item","%d Items",data.length),data.length);return(0,jsx_runtime.jsxs)(component.A,{expanded:!1,className:"dataviews-bulk-actions-footer__container",spacing:3,children:[(0,jsx_runtime.jsx)(BulkSelectionCheckbox,{selection,onChangeSelection,data,actions,getItemId}),(0,jsx_runtime.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:message}),(0,jsx_runtime.jsxs)(component.A,{className:"dataviews-bulk-actions-footer__action-buttons",expanded:!1,spacing:1,children:[actionsToShow.map((action=>(0,jsx_runtime.jsx)(ActionButton,{action,selectedItems,actionInProgress,setActionInProgress},action.id))),selectedItems.length>0&&(0,jsx_runtime.jsx)(build_module_button.Ay,{icon:close_small.A,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,build_module.__)("Cancel"),disabled:!!actionInProgress,accessibleWhenDisabled:!1,onClick:()=>{onChangeSelection(dataviews_bulk_actions_EMPTY_ARRAY)}})]})]})}function FooterContent({selection,actions,onChangeSelection,data,getItemId}){const[actionInProgress,setActionInProgress]=(0,react.useState)(null),footerContent=(0,react.useRef)(null),bulkActions=(0,react.useMemo)((()=>actions.filter((action=>action.supportsBulk))),[actions]),selectableItems=(0,react.useMemo)((()=>data.filter((item=>bulkActions.some((action=>!action.isEligible||action.isEligible(item)))))),[data,bulkActions]),selectedItems=(0,react.useMemo)((()=>data.filter((item=>selection.includes(getItemId(item))&&selectableItems.includes(item)))),[selection,data,getItemId,selectableItems]),actionsToShow=(0,react.useMemo)((()=>actions.filter((action=>action.supportsBulk&&action.icon&&selectedItems.some((item=>!action.isEligible||action.isEligible(item)))))),[actions,selectedItems]);return actionInProgress?(footerContent.current||(footerContent.current=renderFooterContent(data,actions,getItemId,selection,actionsToShow,selectedItems,actionInProgress,setActionInProgress,onChangeSelection)),footerContent.current):(footerContent.current&&(footerContent.current=null),renderFooterContent(data,actions,getItemId,selection,actionsToShow,selectedItems,actionInProgress,setActionInProgress,onChangeSelection))}function BulkActionsFooter(){const{data,selection,actions=dataviews_bulk_actions_EMPTY_ARRAY,onChangeSelection,getItemId}=(0,react.useContext)(dataviews_context);return(0,jsx_runtime.jsx)(FooterContent,{selection,onChangeSelection,data,actions,getItemId})}const arrow_left=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),arrow_right=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),library_unseen=(0,jsx_runtime.jsx)(svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"})}),{DropdownMenuV2:column_header_menu_DropdownMenuV2}=build_module_lock_unlock_unlock(privateApis);function WithDropDownMenuSeparators({children}){return react.Children.toArray(children).filter(Boolean).map(((child,i)=>(0,jsx_runtime.jsxs)(react.Fragment,{children:[i>0&&(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Separator,{}),child]},i)))}const column_header_menu=(0,react.forwardRef)((function HeaderMenu({fieldId,view,fields,onChangeView,onHide,setOpenedFilter},ref){const visibleFieldIds=getVisibleFieldIds(view,fields),index=visibleFieldIds?.indexOf(fieldId),isSorted=view.sort?.field===fieldId;let header,isHidable=!1,isSortable=!1,canAddFilter=!1,operators=[];const combinedField=view.layout?.combinedFields?.find((f=>f.id===fieldId)),field=fields.find((f=>f.id===fieldId));if(combinedField)header=combinedField.header||combinedField.label;else{if(!field)return null;isHidable=!1!==field.enableHiding,isSortable=!1!==field.enableSorting,header=field.header,operators=sanitizeOperators(field),canAddFilter=!(view.filters?.some((_filter=>fieldId===_filter.field))||!field.elements?.length||!operators.length||field.filterBy?.isPrimary)}return(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2,{align:"start",trigger:(0,jsx_runtime.jsxs)(build_module_button.Ay,{size:"compact",className:"dataviews-view-table-header-button",ref,variant:"tertiary",children:[header,view.sort&&isSorted&&(0,jsx_runtime.jsx)("span",{"aria-hidden":"true",children:sortArrows[view.sort.direction]})]}),style:{minWidth:"240px"},children:(0,jsx_runtime.jsxs)(WithDropDownMenuSeparators,{children:[isSortable&&(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Group,{children:SORTING_DIRECTIONS.map((direction=>{const isChecked=view.sort&&isSorted&&view.sort.direction===direction,value=`${fieldId}-${direction}`;return(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.RadioItem,{name:"view-table-sorting",value,checked:isChecked,onChange:()=>{onChangeView({...view,sort:{field:fieldId,direction}})},children:(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.ItemLabel,{children:sortLabels[direction]})},value)}))}),canAddFilter&&(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Group,{children:(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Item,{prefix:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:library_funnel}),onClick:()=>{setOpenedFilter(fieldId),onChangeView({...view,page:1,filters:[...view.filters||[],{field:fieldId,value:void 0,operator:operators[0]}]})},children:(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.ItemLabel,{children:(0,build_module.__)("Add filter")})})}),(0,jsx_runtime.jsxs)(column_header_menu_DropdownMenuV2.Group,{children:[(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Item,{prefix:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:arrow_left}),disabled:index<1,onClick:()=>{var _visibleFieldIds$slic;onChangeView({...view,fields:[...null!==(_visibleFieldIds$slic=visibleFieldIds.slice(0,index-1))&&void 0!==_visibleFieldIds$slic?_visibleFieldIds$slic:[],fieldId,visibleFieldIds[index-1],...visibleFieldIds.slice(index+1)]})},children:(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.ItemLabel,{children:(0,build_module.__)("Move left")})}),(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Item,{prefix:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:arrow_right}),disabled:index>=visibleFieldIds.length-1,onClick:()=>{var _visibleFieldIds$slic2;onChangeView({...view,fields:[...null!==(_visibleFieldIds$slic2=visibleFieldIds.slice(0,index))&&void 0!==_visibleFieldIds$slic2?_visibleFieldIds$slic2:[],visibleFieldIds[index+1],fieldId,...visibleFieldIds.slice(index+2)]})},children:(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.ItemLabel,{children:(0,build_module.__)("Move right")})}),isHidable&&field&&(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.Item,{prefix:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:library_unseen}),onClick:()=>{onHide(field),onChangeView({...view,fields:visibleFieldIds.filter((id=>id!==fieldId))})},children:(0,jsx_runtime.jsx)(column_header_menu_DropdownMenuV2.ItemLabel,{children:(0,build_module.__)("Hide column")})})]})]})})}));function TableColumn({column,fields,view,...props}){const field=fields.find((f=>f.id===column));if(field)return(0,jsx_runtime.jsx)(TableColumnField,{...props,field});const combinedField=view.layout?.combinedFields?.find((f=>f.id===column));return combinedField?(0,jsx_runtime.jsx)(TableColumnCombined,{...props,fields,view,field:combinedField}):null}function TableColumnField({primaryField,item,field}){return(0,jsx_runtime.jsx)("div",{className:(0,clsx.A)("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":primaryField?.id===field.id}),children:(0,jsx_runtime.jsx)(field.render,{item})})}function TableColumnCombined({field,...props}){const children=field.children.map((child=>(0,jsx_runtime.jsx)(TableColumn,{...props,column:child},child)));return"horizontal"===field.direction?(0,jsx_runtime.jsx)(component.A,{spacing:3,children}):(0,jsx_runtime.jsx)(v_stack_component.A,{spacing:0,children})}function TableRow({hasBulkActions,item,actions,fields,id,view,primaryField,selection,getItemId,onChangeSelection}){const hasPossibleBulkAction=useHasAPossibleBulkAction(actions,item),isSelected=hasPossibleBulkAction&&selection.includes(id),[isHovered,setIsHovered]=(0,react.useState)(!1),isTouchDeviceRef=(0,react.useRef)(!1),columns=getVisibleFieldIds(view,fields);return(0,jsx_runtime.jsxs)("tr",{className:(0,clsx.A)("dataviews-view-table__row",{"is-selected":hasPossibleBulkAction&&isSelected,"is-hovered":isHovered,"has-bulk-actions":hasPossibleBulkAction}),onMouseEnter:()=>{setIsHovered(!0)},onMouseLeave:()=>{setIsHovered(!1)},onTouchStart:()=>{isTouchDeviceRef.current=!0},onClick:()=>{hasPossibleBulkAction&&(isTouchDeviceRef.current||"Range"===document.getSelection()?.type||onChangeSelection(selection.includes(id)?selection.filter((itemId=>id!==itemId)):[id]))},children:[hasBulkActions&&(0,jsx_runtime.jsx)("td",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},children:(0,jsx_runtime.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,jsx_runtime.jsx)(DataViewsSelectionCheckbox,{item,selection,onChangeSelection,getItemId,primaryField,disabled:!hasPossibleBulkAction})})}),columns.map((column=>{var _view$layout$styles$c;const{width,maxWidth,minWidth}=null!==(_view$layout$styles$c=view.layout?.styles?.[column])&&void 0!==_view$layout$styles$c?_view$layout$styles$c:{};return(0,jsx_runtime.jsx)("td",{style:{width,maxWidth,minWidth},children:(0,jsx_runtime.jsx)(TableColumn,{primaryField,fields,item,column,view})},column)})),!!actions?.length&&(0,jsx_runtime.jsx)("td",{className:"dataviews-view-table__actions-column",onClick:e=>e.stopPropagation(),children:(0,jsx_runtime.jsx)(ItemActions,{item,actions})})]})}const table=function ViewTable({actions,data,fields,getItemId,isLoading=!1,onChangeView,onChangeSelection,selection,setOpenedFilter,view}){const headerMenuRefs=(0,react.useRef)(new Map),headerMenuToFocusRef=(0,react.useRef)(),[nextHeaderMenuToFocus,setNextHeaderMenuToFocus]=(0,react.useState)(),hasBulkActions=useSomeItemHasAPossibleBulkAction(actions,data);(0,react.useEffect)((()=>{headerMenuToFocusRef.current&&(headerMenuToFocusRef.current.focus(),headerMenuToFocusRef.current=void 0)}));const tableNoticeId=(0,react.useId)();if(nextHeaderMenuToFocus)return headerMenuToFocusRef.current=nextHeaderMenuToFocus,void setNextHeaderMenuToFocus(void 0);const onHide=field=>{const hidden=headerMenuRefs.current.get(field.id),fallback=hidden?headerMenuRefs.current.get(hidden.fallback):void 0;setNextHeaderMenuToFocus(fallback?.node)},columns=getVisibleFieldIds(view,fields),hasData=!!data?.length,primaryField=fields.find((field=>field.id===view.layout?.primaryField));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("table",{className:"dataviews-view-table","aria-busy":isLoading,"aria-describedby":tableNoticeId,children:[(0,jsx_runtime.jsx)("thead",{children:(0,jsx_runtime.jsxs)("tr",{className:"dataviews-view-table__row",children:[hasBulkActions&&(0,jsx_runtime.jsx)("th",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},scope:"col",children:(0,jsx_runtime.jsx)(BulkSelectionCheckbox,{selection,onChangeSelection,data,actions,getItemId})}),columns.map(((column,index)=>{var _view$layout$styles$c2;const{width,maxWidth,minWidth}=null!==(_view$layout$styles$c2=view.layout?.styles?.[column])&&void 0!==_view$layout$styles$c2?_view$layout$styles$c2:{};return(0,jsx_runtime.jsx)("th",{style:{width,maxWidth,minWidth},"aria-sort":view.sort?.field===column?sortValues[view.sort.direction]:void 0,scope:"col",children:(0,jsx_runtime.jsx)(column_header_menu,{ref:node=>{node?headerMenuRefs.current.set(column,{node,fallback:columns[index>0?index-1:1]}):headerMenuRefs.current.delete(column)},fieldId:column,view,fields,onChangeView,onHide,setOpenedFilter})},column)})),!!actions?.length&&(0,jsx_runtime.jsx)("th",{className:"dataviews-view-table__actions-column",children:(0,jsx_runtime.jsx)("span",{className:"dataviews-view-table-header",children:(0,build_module.__)("Actions")})})]})}),(0,jsx_runtime.jsx)("tbody",{children:hasData&&data.map(((item,index)=>(0,jsx_runtime.jsx)(TableRow,{item,hasBulkActions,actions,fields,id:getItemId(item)||index.toString(),view,primaryField,selection,getItemId,onChangeSelection},getItemId(item))))})]}),(0,jsx_runtime.jsx)("div",{className:(0,clsx.A)({"dataviews-loading":isLoading,"dataviews-no-results":!hasData&&!isLoading}),id:tableNoticeId,children:!hasData&&(0,jsx_runtime.jsx)("p",{children:isLoading?(0,jsx_runtime.jsx)(spinner,{}):(0,build_module.__)("No results")})})]})};var flex_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/flex/flex/component.js");const ALIGNMENTS={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};var use_responsive_value=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/use-responsive-value.js");function useGrid(props){const{align,alignment,className,columnGap,columns=2,gap=3,isInline=!1,justify,rowGap,rows,templateColumns,templateRows,...otherProps}=(0,use_context_system.A)(props,"Grid"),columnsAsArray=Array.isArray(columns)?columns:[columns],column=(0,use_responsive_value.t)(columnsAsArray),rowsAsArray=Array.isArray(rows)?rows:[rows],row=(0,use_responsive_value.t)(rowsAsArray),gridTemplateColumns=templateColumns||!!columns&&`repeat( ${column}, 1fr )`,gridTemplateRows=templateRows||!!rows&&`repeat( ${row}, 1fr )`,cx=(0,use_cx.l)();return{...otherProps,className:(0,react.useMemo)((()=>{const alignmentProps=function getAlignmentProps(alignment){return alignment?ALIGNMENTS[alignment]:{}}(alignment),gridClasses=(0,emotion_react_browser_esm.AH)({alignItems:align,display:isInline?"inline-grid":"grid",gap:`calc( ${config_values.A.gridBase} * ${gap} )`,gridTemplateColumns:gridTemplateColumns||void 0,gridTemplateRows:gridTemplateRows||void 0,gridRowGap:rowGap,gridColumnGap:columnGap,justifyContent:justify,verticalAlign:isInline?"middle":void 0,...alignmentProps},"","");return cx(gridClasses,className)}),[align,alignment,className,columnGap,cx,gap,gridTemplateColumns,gridTemplateRows,isInline,justify,rowGap])}}const grid_component=(0,context_connect.KZ)((function UnconnectedGrid(props,forwardedRef){const gridProps=useGrid(props);return(0,jsx_runtime.jsx)(view_component.A,{...gridProps,ref:forwardedRef})}),"Grid");function GridItem({selection,onChangeSelection,getItemId,item,actions,mediaField,primaryField,visibleFields,badgeFields,columnFields}){const hasBulkAction=useHasAPossibleBulkAction(actions,item),id=getItemId(item),isSelected=selection.includes(id),renderedMediaField=mediaField?.render?(0,jsx_runtime.jsx)(mediaField.render,{item}):null,renderedPrimaryField=primaryField?.render?(0,jsx_runtime.jsx)(primaryField.render,{item}):null;return(0,jsx_runtime.jsxs)(v_stack_component.A,{spacing:0,className:(0,clsx.A)("dataviews-view-grid__card",{"is-selected":hasBulkAction&&isSelected}),onClickCapture:event=>{if(event.ctrlKey||event.metaKey){if(event.stopPropagation(),event.preventDefault(),!hasBulkAction)return;onChangeSelection(selection.includes(id)?selection.filter((itemId=>id!==itemId)):[...selection,id])}},children:[(0,jsx_runtime.jsx)("div",{className:"dataviews-view-grid__media",children:renderedMediaField}),(0,jsx_runtime.jsx)(DataViewsSelectionCheckbox,{item,selection,onChangeSelection,getItemId,primaryField,disabled:!hasBulkAction}),(0,jsx_runtime.jsxs)(component.A,{justify:"space-between",className:"dataviews-view-grid__title-actions",children:[(0,jsx_runtime.jsx)(component.A,{className:"dataviews-view-grid__primary-field",children:renderedPrimaryField}),(0,jsx_runtime.jsx)(ItemActions,{item,actions,isCompact:!0})]}),!!badgeFields?.length&&(0,jsx_runtime.jsx)(component.A,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:badgeFields.map((field=>(0,jsx_runtime.jsx)(flex_item_component.A,{className:"dataviews-view-grid__field-value",children:(0,jsx_runtime.jsx)(field.render,{item})},field.id)))}),!!visibleFields?.length&&(0,jsx_runtime.jsx)(v_stack_component.A,{className:"dataviews-view-grid__fields",spacing:1,children:visibleFields.map((field=>(0,jsx_runtime.jsx)(flex_component.A,{className:(0,clsx.A)("dataviews-view-grid__field",columnFields?.includes(field.id)?"is-column":"is-row"),gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:columnFields?.includes(field.id)?"column":"row",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(flex_item_component.A,{className:"dataviews-view-grid__field-name",children:field.header}),(0,jsx_runtime.jsx)(flex_item_component.A,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,jsx_runtime.jsx)(field.render,{item})})]})},field.id)))})]},id)}var use_previous=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-previous/index.js");const{CompositeV2:list_Composite,CompositeItemV2:list_CompositeItem,CompositeRowV2:list_CompositeRow,DropdownMenuV2:DropdownMenu}=build_module_lock_unlock_unlock(privateApis);function generateItemWrapperCompositeId(idPrefix){return`${idPrefix}-item-wrapper`}function generateDropdownTriggerCompositeId(idPrefix){return`${idPrefix}-dropdown`}function PrimaryActionGridCell({idPrefix,primaryAction,item}){const registry=useRegistry(),[isModalOpen,setIsModalOpen]=(0,react.useState)(!1),compositeItemId=function generatePrimaryActionCompositeId(idPrefix,primaryActionId){return`${idPrefix}-primary-action-${primaryActionId}`}(idPrefix,primaryAction.id),label="string"==typeof primaryAction.label?primaryAction.label:primaryAction.label([item]);return"RenderModal"in primaryAction?(0,jsx_runtime.jsx)("div",{role:"gridcell",children:(0,jsx_runtime.jsx)(list_CompositeItem,{id:compositeItemId,render:(0,jsx_runtime.jsx)(build_module_button.Ay,{label,icon:primaryAction.icon,isDestructive:primaryAction.isDestructive,size:"small",onClick:()=>setIsModalOpen(!0)}),children:isModalOpen&&(0,jsx_runtime.jsx)(ActionModal,{action:primaryAction,items:[item],closeModal:()=>setIsModalOpen(!1)})})},primaryAction.id):(0,jsx_runtime.jsx)("div",{role:"gridcell",children:(0,jsx_runtime.jsx)(list_CompositeItem,{id:compositeItemId,render:(0,jsx_runtime.jsx)(build_module_button.Ay,{label,icon:primaryAction.icon,isDestructive:primaryAction.isDestructive,size:"small",onClick:()=>{primaryAction.callback([item],{registry})}})})},primaryAction.id)}function ListItem({actions,idPrefix,isSelected,item,mediaField,onSelect,primaryField,visibleFields,onDropdownTriggerKeyDown}){const itemRef=(0,react.useRef)(null),labelId=`${idPrefix}-label`,descriptionId=`${idPrefix}-description`,[isHovered,setIsHovered]=(0,react.useState)(!1);(0,react.useEffect)((()=>{isSelected&&itemRef.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[isSelected]);const{primaryAction,eligibleActions}=(0,react.useMemo)((()=>{const _eligibleActions=actions.filter((action=>!action.isEligible||action.isEligible(item))),_primaryActions=_eligibleActions.filter((action=>action.isPrimary&&!!action.icon));return{primaryAction:_primaryActions?.[0],eligibleActions:_eligibleActions}}),[actions,item]),renderedMediaField=mediaField?.render?(0,jsx_runtime.jsx)(mediaField.render,{item}):(0,jsx_runtime.jsx)("div",{className:"dataviews-view-list__media-placeholder"}),renderedPrimaryField=primaryField?.render?(0,jsx_runtime.jsx)(primaryField.render,{item}):null;return(0,jsx_runtime.jsx)(list_CompositeRow,{ref:itemRef,render:(0,jsx_runtime.jsx)("li",{}),role:"row",className:(0,clsx.A)({"is-selected":isSelected,"is-hovered":isHovered}),onMouseEnter:()=>{setIsHovered(!0)},onMouseLeave:()=>{setIsHovered(!1)},children:(0,jsx_runtime.jsxs)(component.A,{className:"dataviews-view-list__item-wrapper",alignment:"center",spacing:0,children:[(0,jsx_runtime.jsx)("div",{role:"gridcell",children:(0,jsx_runtime.jsx)(list_CompositeItem,{render:(0,jsx_runtime.jsx)("div",{}),role:"button",id:generateItemWrapperCompositeId(idPrefix),"aria-pressed":isSelected,"aria-labelledby":labelId,"aria-describedby":descriptionId,className:"dataviews-view-list__item",onClick:()=>onSelect(item),children:(0,jsx_runtime.jsxs)(component.A,{spacing:3,justify:"start",alignment:"flex-start",children:[(0,jsx_runtime.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:renderedMediaField}),(0,jsx_runtime.jsxs)(v_stack_component.A,{spacing:1,className:"dataviews-view-list__field-wrapper",children:[(0,jsx_runtime.jsx)("span",{className:"dataviews-view-list__primary-field",id:labelId,children:renderedPrimaryField}),(0,jsx_runtime.jsx)("div",{className:"dataviews-view-list__fields",id:descriptionId,children:visibleFields.map((field=>(0,jsx_runtime.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,jsx_runtime.jsx)(visually_hidden_component.A,{as:"span",className:"dataviews-view-list__field-label",children:field.label}),(0,jsx_runtime.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,jsx_runtime.jsx)(field.render,{item})})]},field.id)))})]})]})})}),eligibleActions?.length>0&&(0,jsx_runtime.jsxs)(component.A,{spacing:3,justify:"flex-end",className:"dataviews-view-list__item-actions",style:{flexShrink:"0",width:"auto"},children:[primaryAction&&(0,jsx_runtime.jsx)(PrimaryActionGridCell,{idPrefix,primaryAction,item}),(0,jsx_runtime.jsx)("div",{role:"gridcell",children:(0,jsx_runtime.jsx)(DropdownMenu,{trigger:(0,jsx_runtime.jsx)(list_CompositeItem,{id:generateDropdownTriggerCompositeId(idPrefix),render:(0,jsx_runtime.jsx)(build_module_button.Ay,{size:"small",icon:more_vertical,label:(0,build_module.__)("Actions"),accessibleWhenDisabled:!0,disabled:!actions.length,onKeyDown:onDropdownTriggerKeyDown})}),placement:"bottom-end",children:(0,jsx_runtime.jsx)(ActionsDropdownMenuGroup,{actions:eligibleActions,item})})})]})]})})}const VIEW_LAYOUTS=[{type:LAYOUT_TABLE,label:(0,build_module.__)("Table"),component:table,icon:block_table},{type:LAYOUT_GRID,label:(0,build_module.__)("Grid"),component:function ViewGrid({actions,data,fields,getItemId,isLoading,onChangeSelection,selection,view,density}){const mediaField=fields.find((field=>field.id===view.layout?.mediaField)),primaryField=fields.find((field=>field.id===view.layout?.primaryField)),viewFields=view.fields||fields.map((field=>field.id)),{visibleFields,badgeFields}=fields.reduce(((accumulator,field)=>{if(!viewFields.includes(field.id)||[view.layout?.mediaField,view?.layout?.primaryField].includes(field.id))return accumulator;return accumulator[view.layout?.badgeFields?.includes(field.id)?"badgeFields":"visibleFields"].push(field),accumulator}),{visibleFields:[],badgeFields:[]}),hasData=!!data?.length,gridStyle=density?{gridTemplateColumns:`repeat(${density}, minmax(0, 1fr))`}:{};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[hasData&&(0,jsx_runtime.jsx)(grid_component,{gap:8,columns:2,alignment:"top",className:"dataviews-view-grid",style:gridStyle,"aria-busy":isLoading,children:data.map((item=>(0,jsx_runtime.jsx)(GridItem,{selection,onChangeSelection,getItemId,item,actions,mediaField,primaryField,visibleFields,badgeFields,columnFields:view.layout?.columnFields},getItemId(item))))}),!hasData&&(0,jsx_runtime.jsx)("div",{className:(0,clsx.A)({"dataviews-loading":isLoading,"dataviews-no-results":!isLoading}),children:(0,jsx_runtime.jsx)("p",{children:isLoading?(0,jsx_runtime.jsx)(spinner,{}):(0,build_module.__)("No results")})})]})},icon:library_category},{type:LAYOUT_LIST,label:(0,build_module.__)("List"),component:function ViewList(props){const{actions,data,fields,getItemId,isLoading,onChangeSelection,selection,view}=props,baseId=(0,use_instance_id.A)(ViewList,"view-list"),selectedItem=data?.findLast((item=>selection.includes(getItemId(item)))),mediaField=fields.find((field=>field.id===view.layout?.mediaField)),primaryField=fields.find((field=>field.id===view.layout?.primaryField)),viewFields=view.fields||fields.map((field=>field.id)),visibleFields=fields.filter((field=>viewFields.includes(field.id)&&![view.layout?.primaryField,view.layout?.mediaField].includes(field.id))),onSelect=item=>onChangeSelection([getItemId(item)]),generateCompositeItemIdPrefix=(0,react.useCallback)((item=>`${baseId}-${getItemId(item)}`),[baseId,getItemId]),isActiveCompositeItem=(0,react.useCallback)(((item,idToCheck)=>idToCheck.startsWith(generateCompositeItemIdPrefix(item))),[generateCompositeItemIdPrefix]),[activeCompositeId,setActiveCompositeId]=(0,react.useState)(void 0);(0,react.useEffect)((()=>{selectedItem&&setActiveCompositeId(generateItemWrapperCompositeId(generateCompositeItemIdPrefix(selectedItem)))}),[selectedItem,generateCompositeItemIdPrefix]);const activeItemIndex=data.findIndex((item=>isActiveCompositeItem(item,null!=activeCompositeId?activeCompositeId:""))),previousActiveItemIndex=(0,use_previous.A)(activeItemIndex),isActiveIdInList=-1!==activeItemIndex,selectCompositeItem=(0,react.useCallback)(((targetIndex,generateCompositeId)=>{const clampedIndex=Math.min(data.length-1,Math.max(0,targetIndex)),targetCompositeItemId=generateCompositeId(generateCompositeItemIdPrefix(data[clampedIndex]));setActiveCompositeId(targetCompositeItemId),document.getElementById(targetCompositeItemId)?.focus()}),[data,generateCompositeItemIdPrefix]);(0,react.useEffect)((()=>{!isActiveIdInList&&(void 0!==previousActiveItemIndex&&-1!==previousActiveItemIndex)&&selectCompositeItem(previousActiveItemIndex,generateItemWrapperCompositeId)}),[isActiveIdInList,selectCompositeItem,previousActiveItemIndex]);const onDropdownTriggerKeyDown=(0,react.useCallback)((event=>{"ArrowDown"===event.key&&(event.preventDefault(),selectCompositeItem(activeItemIndex+1,generateDropdownTriggerCompositeId)),"ArrowUp"===event.key&&(event.preventDefault(),selectCompositeItem(activeItemIndex-1,generateDropdownTriggerCompositeId))}),[selectCompositeItem,activeItemIndex]),hasData=data?.length;return hasData?(0,jsx_runtime.jsx)(list_Composite,{id:baseId,render:(0,jsx_runtime.jsx)("ul",{}),className:"dataviews-view-list",role:"grid",activeId:activeCompositeId,setActiveId:setActiveCompositeId,children:data.map((item=>{const id=generateCompositeItemIdPrefix(item);return(0,jsx_runtime.jsx)(ListItem,{idPrefix:id,actions,item,isSelected:item===selectedItem,onSelect,mediaField,primaryField,visibleFields,onDropdownTriggerKeyDown},id)}))}):(0,jsx_runtime.jsx)("div",{className:(0,clsx.A)({"dataviews-loading":isLoading,"dataviews-no-results":!hasData&&!isLoading}),children:!hasData&&(0,jsx_runtime.jsx)("p",{children:isLoading?(0,jsx_runtime.jsx)(spinner,{}):(0,build_module.__)("No results")})})},icon:(0,build_module.V8)()?format_list_bullets_rtl:format_list_bullets}];function getCombinedFieldIds(view){const combinedFields=[];return view.type===LAYOUT_TABLE&&view.layout?.combinedFields&&view.layout.combinedFields.forEach((combination=>{combinedFields.push(...combination.children)})),combinedFields}function getVisibleFieldIds(view,fields){const fieldsToExclude=getCombinedFieldIds(view);if(view.fields)return view.fields.filter((id=>!fieldsToExclude.includes(id)));const visibleFields=[];return view.type===LAYOUT_TABLE&&view.layout?.combinedFields&&visibleFields.push(...view.layout.combinedFields.map((({id})=>id))),visibleFields.push(...fields.filter((({id})=>!fieldsToExclude.includes(id))).map((({id})=>id))),visibleFields}function DataViewsLayout(){const{actions=[],data,fields,getItemId,isLoading,view,onChangeView,selection,onChangeSelection,setOpenedFilter,density}=(0,react.useContext)(dataviews_context),ViewComponent=VIEW_LAYOUTS.find((v=>v.type===view.type))?.component;return(0,jsx_runtime.jsx)(ViewComponent,{actions,data,fields,getItemId,isLoading,onChangeView,onChangeSelection,selection,setOpenedFilter,view,density})}const library_next=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),library_previous=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});const dataviews_pagination=(0,react.memo)((function DataViewsPagination(){var _view$page;const{view,onChangeView,paginationInfo:{totalItems=0,totalPages}}=(0,react.useContext)(dataviews_context);if(!totalItems||!totalPages)return null;const currentPage=null!==(_view$page=view.page)&&void 0!==_view$page?_view$page:1,pageSelectOptions=Array.from(Array(totalPages)).map(((_,i)=>{const page=i+1;return{value:page.toString(),label:page.toString(),"aria-label":currentPage===page?(0,build_module.nv)((0,build_module.__)("Page %1$s of %2$s"),currentPage,totalPages):page.toString()}}));return!!totalItems&&1!==totalPages&&(0,jsx_runtime.jsxs)(component.A,{expanded:!1,className:"dataviews-pagination",justify:"end",spacing:6,children:[(0,jsx_runtime.jsx)(component.A,{justify:"flex-start",expanded:!1,spacing:1,className:"dataviews-pagination__page-select",children:create_interpolate_element((0,build_module.nv)((0,build_module._x)("
Page
%1$s
of %2$s
","paging"),"",totalPages),{div:(0,jsx_runtime.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,jsx_runtime.jsx)(select_control.A,{"aria-label":(0,build_module.__)("Current page"),value:currentPage.toString(),options:pageSelectOptions,onChange:newValue=>{onChangeView({...view,page:+newValue})},size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,jsx_runtime.jsxs)(component.A,{expanded:!1,spacing:1,children:[(0,jsx_runtime.jsx)(build_module_button.Ay,{onClick:()=>onChangeView({...view,page:currentPage-1}),disabled:1===currentPage,accessibleWhenDisabled:!0,label:(0,build_module.__)("Previous page"),icon:(0,build_module.V8)()?library_next:library_previous,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,jsx_runtime.jsx)(build_module_button.Ay,{onClick:()=>onChangeView({...view,page:currentPage+1}),disabled:currentPage>=totalPages,accessibleWhenDisabled:!0,label:(0,build_module.__)("Next page"),icon:(0,build_module.V8)()?library_previous:library_next,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})})),dataviews_footer_EMPTY_ARRAY=[];function DataViewsFooter(){const{view,paginationInfo:{totalItems=0,totalPages},data,actions=dataviews_footer_EMPTY_ARRAY}=(0,react.useContext)(dataviews_context),hasBulkActions=useSomeItemHasAPossibleBulkAction(actions,data)&&[LAYOUT_TABLE,LAYOUT_GRID].includes(view.type);return!totalItems||!totalPages||totalPages<=1&&!hasBulkActions?null:!!totalItems&&(0,jsx_runtime.jsxs)(component.A,{expanded:!1,justify:"end",className:"dataviews-footer",children:[hasBulkActions&&(0,jsx_runtime.jsx)(BulkActionsFooter,{}),(0,jsx_runtime.jsx)(dataviews_pagination,{})]})}var input_control=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/input-control/index.js");const inlinePadding=({size})=>(0,space.x)("compact"===size?1:2),SuffixItemWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"effl84m1"})("display:flex;padding-inline-end:",inlinePadding,";svg{fill:currentColor;}"),StyledInputControl=(0,emotion_styled_base_browser_esm.A)(input_control.Ay,{target:"effl84m0"})("input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}&:not( :focus-within ){--wp-components-color-background:",colors_values.l.theme.gray[100],";}");function SuffixItem({searchRef,value,onChange,onClose}){if(!onClose&&!value)return(0,jsx_runtime.jsx)(icon.A,{icon:library_search});return(0,jsx_runtime.jsx)(build_module_button.Ay,{size:"small",icon:close_small.A,label:onClose?(0,build_module.__)("Close search"):(0,build_module.__)("Reset search"),onClick:null!=onClose?onClose:()=>{onChange(""),searchRef.current?.focus()}})}const SearchControl=(0,react.forwardRef)((function UnforwardedSearchControl({__nextHasNoMarginBottom=!1,className,onChange,value,label=(0,build_module.__)("Search"),placeholder=(0,build_module.__)("Search"),hideLabelFromVision=!0,onClose,size="default",...restProps},forwardedRef){delete restProps.disabled;const searchRef=(0,react.useRef)(null),instanceId=(0,use_instance_id.A)(SearchControl,"components-search-control"),contextValue=(0,react.useMemo)((()=>({BaseControl:{_overrides:{__nextHasNoMarginBottom},__associatedWPComponentName:"SearchControl"},InputBase:{isBorderless:!0}})),[__nextHasNoMarginBottom]);return(0,jsx_runtime.jsx)(context_system_provider.c7,{value:contextValue,children:(0,jsx_runtime.jsx)(StyledInputControl,{__next40pxDefaultSize:!0,id:instanceId,hideLabelFromVision,label,ref:(0,use_merge_refs.A)([searchRef,forwardedRef]),type:"search",size,className:(0,clsx.A)("components-search-control",className),onChange:nextValue=>onChange(null!=nextValue?nextValue:""),autoComplete:"off",placeholder,value:null!=value?value:"",suffix:(0,jsx_runtime.jsx)(SuffixItemWrapper,{size,children:(0,jsx_runtime.jsx)(SuffixItem,{searchRef,value,onChange,onClose})}),...restProps})})})),search_control=SearchControl;var use_memo_one_esm=__webpack_require__("../../node_modules/.pnpm/use-memo-one@1.1.3_react@17.0.2/node_modules/use-memo-one/dist/use-memo-one.esm.js");const debounce=(func,wait,options)=>{let lastArgs,lastThis,result,timerId,lastCallTime,maxWait=0,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;function invokeFunc(time){const args=lastArgs,thisArg=lastThis;return lastArgs=void 0,lastThis=void 0,lastInvokeTime=time,result=func.apply(thisArg,args),result}function startTimer(pendingFunc,waitTime){timerId=setTimeout(pendingFunc,waitTime)}function getTimeSinceLastCall(time){return time-(lastCallTime||0)}function shouldInvoke(time){const timeSinceLastCall=getTimeSinceLastCall(time);return void 0===lastCallTime||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&time-lastInvokeTime>=maxWait}function timerExpired(){const time=Date.now();if(shouldInvoke(time))return trailingEdge(time);startTimer(timerExpired,function remainingWait(time){const timeSinceLastCall=getTimeSinceLastCall(time),timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?Math.min(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}(time))}function clearTimer(){timerId=void 0}function trailingEdge(time){return clearTimer(),trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=void 0,result)}function pending(){return void 0!==timerId}function debounced(...args){const time=Date.now(),isInvoking=shouldInvoke(time);if(lastArgs=args,lastThis=this,lastCallTime=time,isInvoking){if(!pending())return function leadingEdge(time){return lastInvokeTime=time,startTimer(timerExpired,wait),leading?invokeFunc(time):result}(lastCallTime);if(maxing)return startTimer(timerExpired,wait),invokeFunc(lastCallTime)}return pending()||startTimer(timerExpired,wait),result}return options&&(leading=!!options.leading,maxing="maxWait"in options,void 0!==options.maxWait&&(maxWait=Math.max(options.maxWait,wait)),trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=function cancel(){!function cancelTimer(){void 0!==timerId&&clearTimeout(timerId)}(),lastInvokeTime=0,clearTimer(),lastArgs=lastCallTime=lastThis=void 0},debounced.flush=function flush(){return pending()?trailingEdge(Date.now()):result},debounced.pending=pending,debounced};function useDebouncedInput(defaultValue=""){const[input,setInput]=(0,react.useState)(defaultValue),[debouncedInput,setDebouncedState]=(0,react.useState)(defaultValue),setDebouncedInput=function useDebounce(fn,wait,options){const debounced=(0,use_memo_one_esm.MA)((()=>debounce(fn,null!=wait?wait:0,options)),[fn,wait,options]);return(0,react.useEffect)((()=>()=>debounced.cancel()),[debounced]),debounced}(setDebouncedState,250);return(0,react.useEffect)((()=>{setDebouncedInput(input)}),[input,setDebouncedInput]),[input,setInput,debouncedInput]}const DataViewsSearch=(0,react.memo)((function Search({label}){const{view,onChangeView}=(0,react.useContext)(dataviews_context),[search,setSearch,debouncedSearch]=useDebouncedInput(view.search);(0,react.useEffect)((()=>{var _view$search;setSearch(null!==(_view$search=view.search)&&void 0!==_view$search?_view$search:"")}),[view.search,setSearch]);const onChangeViewRef=(0,react.useRef)(onChangeView),viewRef=(0,react.useRef)(view);(0,react.useEffect)((()=>{onChangeViewRef.current=onChangeView,viewRef.current=view}),[onChangeView,view]),(0,react.useEffect)((()=>{debouncedSearch!==viewRef.current?.search&&onChangeViewRef.current({...viewRef.current,page:1,search:debouncedSearch})}),[debouncedSearch]);const searchLabel=label||(0,build_module.__)("Search");return(0,jsx_runtime.jsx)(search_control,{className:"dataviews-search",__nextHasNoMarginBottom:!0,onChange:setSearch,value:search,label:searchLabel,placeholder:searchLabel,size:"compact"})})),dataviews_search=DataViewsSearch;var toggle_group_control_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control/component.js"),toggle_group_control_option_base_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control-option-base/component.js");const ToggleGroupControlOptionIcon=(0,react.forwardRef)((function UnforwardedToggleGroupControlOptionIcon(props,ref){const{icon,label,...restProps}=props;return(0,jsx_runtime.jsx)(toggle_group_control_option_base_component.A,{...restProps,isIcon:!0,"aria-label":label,showTooltip:!0,ref,children:(0,jsx_runtime.jsx)(build_module_icon.A,{icon})})})),toggle_group_control_option_icon_component=ToggleGroupControlOptionIcon;var toggle_group_control_option_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control-option/component.js");const unstyledButton=as=>(0,emotion_react_browser_esm.AH)("font-size:",(0,font.g)("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:","a"===as?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",colors_values.l.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",colors_values.l.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""),itemWrapper={name:"1bcj5ek",styles:"width:100%;display:block"},item={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},bordered=(0,emotion_react_browser_esm.AH)("border:1px solid ",config_values.A.surfaceBorderColor,";",""),separated=(0,emotion_react_browser_esm.AH)(">*:not( marquee )>*{border-bottom:1px solid ",config_values.A.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),borderRadius=config_values.A.radiusSmall,styles_spacedAround=(0,emotion_react_browser_esm.AH)("border-radius:",borderRadius,";",""),rounded=(0,emotion_react_browser_esm.AH)("border-radius:",borderRadius,";>*:first-of-type>*{border-top-left-radius:",borderRadius,";border-top-right-radius:",borderRadius,";}>*:last-of-type>*{border-bottom-left-radius:",borderRadius,";border-bottom-right-radius:",borderRadius,";}",""),baseFontHeight=`calc(${config_values.A.fontSize} * ${config_values.A.fontLineHeightBase})`,paddingY=`calc((${config_values.A.controlHeight} - ${baseFontHeight} - 2px) / 2)`,paddingYSmall=`calc((${config_values.A.controlHeightSmall} - ${baseFontHeight} - 2px) / 2)`,paddingYLarge=`calc((${config_values.A.controlHeightLarge} - ${baseFontHeight} - 2px) / 2)`,itemSizes={small:(0,emotion_react_browser_esm.AH)("padding:",paddingYSmall," ",config_values.A.controlPaddingXSmall,"px;",""),medium:(0,emotion_react_browser_esm.AH)("padding:",paddingY," ",config_values.A.controlPaddingX,"px;",""),large:(0,emotion_react_browser_esm.AH)("padding:",paddingYLarge," ",config_values.A.controlPaddingXLarge,"px;","")},ItemGroupContext=(0,react.createContext)({size:"medium"}),useItemGroupContext=()=>(0,react.useContext)(ItemGroupContext);const item_component=(0,context_connect.KZ)((function UnconnectedItem(props,forwardedRef){const{role,wrapperClassName,...otherProps}=function useItem(props){const{as:asProp,className,onClick,role="listitem",size:sizeProp,...otherProps}=(0,use_context_system.A)(props,"Item"),{spacedAround,size:contextSize}=useItemGroupContext(),size=sizeProp||contextSize,as=asProp||(void 0!==onClick?"button":"div"),cx=(0,use_cx.l)(),classes=(0,react.useMemo)((()=>cx(("button"===as||"a"===as)&&unstyledButton(as),itemSizes[size]||itemSizes.medium,item,spacedAround&&styles_spacedAround,className)),[as,className,cx,size,spacedAround]),wrapperClassName=cx(itemWrapper);return{as,className:classes,onClick,wrapperClassName,role,...otherProps}}(props);return(0,jsx_runtime.jsx)("div",{role,className:wrapperClassName,children:(0,jsx_runtime.jsx)(view_component.A,{...otherProps,ref:forwardedRef})})}),"Item");const item_group_component=(0,context_connect.KZ)((function UnconnectedItemGroup(props,forwardedRef){const{isBordered,isSeparated,size:sizeProp,...otherProps}=function useItemGroup(props){const{className,isBordered=!1,isRounded=!0,isSeparated=!1,role="list",...otherProps}=(0,use_context_system.A)(props,"ItemGroup");return{isBordered,className:(0,use_cx.l)()(isBordered&&bordered,isSeparated&&separated,isRounded&&rounded,className),role,isSeparated,...otherProps}}(props),{size:contextSize}=useItemGroupContext(),contextValue={spacedAround:!isBordered&&!isSeparated,size:sizeProp||contextSize};return(0,jsx_runtime.jsx)(ItemGroupContext.Provider,{value:contextValue,children:(0,jsx_runtime.jsx)(view_component.A,{...otherProps,ref:forwardedRef})})}),"ItemGroup");var heading_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/heading/component.js"),popover=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/popover/index.js");const chevron_up=(0,jsx_runtime.jsx)(svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var chevron_down=__webpack_require__("../../node_modules/.pnpm/@wordpress+icons@10.7.0_react@17.0.2/node_modules/@wordpress/icons/build-module/library/chevron-down.js");const library_seen=(0,jsx_runtime.jsx)(svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)(svg.wA,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),library_cog=(0,jsx_runtime.jsx)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jsx_runtime.jsx)(svg.wA,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})});var values=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/values.js");const defaultOptions={initial:void 0,fallback:""};const use_controlled_state=function useControlledState(currentState,options=defaultOptions){const{initial,fallback}={...defaultOptions,...options},[internalState,setInternalState]=(0,react.useState)(currentState),hasCurrentState=(0,values.J5)(currentState);return(0,react.useEffect)((()=>{hasCurrentState&&internalState&&setInternalState(void 0)}),[hasCurrentState,internalState]),[(0,values.vD)([currentState,internalState,initial],fallback),(0,react.useCallback)((nextState=>{hasCurrentState||setInternalState(nextState)}),[hasCurrentState])]};var math=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/utils/math.js");function floatClamp(value,min,max){return"number"!=typeof value?null:parseFloat(`${(0,math.qE)(value,min,max)}`)}var number_control=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@28.7.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0_hsnmspo6xxbym6m5qywqiwgrj4/node_modules/@wordpress/components/build-module/number-control/index.js");const rangeHeight=()=>(0,emotion_react_browser_esm.AH)({height:30,minHeight:30},"",""),deprecatedHeight=({__next40pxDefaultSize})=>!__next40pxDefaultSize&&(0,emotion_react_browser_esm.AH)({minHeight:30},"",""),Root=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",deprecatedHeight,";"),wrapperColor=({color=colors_values.l.ui.borderFocus})=>(0,emotion_react_browser_esm.AH)({color},"",""),wrapperMargin=({marks,__nextHasNoMarginBottom})=>__nextHasNoMarginBottom?"":(0,emotion_react_browser_esm.AH)({marginBottom:marks?16:void 0},"",""),range_control_styles_Wrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",wrapperColor,";",rangeHeight,";",wrapperMargin,";"),BeforeIconWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",(0,rtl.h)({marginRight:6}),";"),AfterIconWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",(0,rtl.h)({marginLeft:6}),";"),railBackgroundColor=({disabled,railColor})=>{let background=railColor||"";return disabled&&(background=colors_values.l.ui.backgroundDisabled),(0,emotion_react_browser_esm.AH)({background},"","")},Rail=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk10"})("background-color:",colors_values.l.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",config_values.A.radiusFull,";",railBackgroundColor,";"),trackBackgroundColor=({disabled,trackColor})=>{let background=trackColor||"currentColor";return disabled&&(background=colors_values.l.gray[400]),(0,emotion_react_browser_esm.AH)({background},"","")},Track=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",config_values.A.radiusFull,";height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",trackBackgroundColor,";"),MarksWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),markFill=({disabled,isFilled})=>{let backgroundColor=isFilled?"currentColor":colors_values.l.gray[300];return disabled&&(backgroundColor=colors_values.l.gray[400]),(0,emotion_react_browser_esm.AH)({backgroundColor},"","")},Mark=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk7"})("height:",12,"px;left:0;position:absolute;top:9px;width:1px;",markFill,";"),markLabelFill=({isFilled})=>(0,emotion_react_browser_esm.AH)({color:isFilled?colors_values.l.gray[700]:colors_values.l.gray[300]},"",""),MarkLabel=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk6"})("color:",colors_values.l.gray[300],";font-size:11px;position:absolute;top:22px;white-space:nowrap;",(0,rtl.h)({left:0}),";",(0,rtl.h)({transform:"translateX( -50% )"},{transform:"translateX( 50% )"}),";",markLabelFill,";"),thumbColor=({disabled})=>disabled?(0,emotion_react_browser_esm.AH)("background-color:",colors_values.l.gray[400],";",""):(0,emotion_react_browser_esm.AH)("background-color:",colors_values.l.theme.accent,";",""),ThumbWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",12,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",12,"px;border-radius:",config_values.A.radiusRound,";",thumbColor,";",(0,rtl.h)({marginLeft:-10}),";",(0,rtl.h)({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),thumbFocus=({isFocused})=>isFocused?(0,emotion_react_browser_esm.AH)("&::before{content:' ';position:absolute;background-color:",colors_values.l.theme.accent,";opacity:0.4;border-radius:",config_values.A.radiusRound,";height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):"",Thumb=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk4"})("align-items:center;border-radius:",config_values.A.radiusRound,";height:100%;outline:0;position:absolute;user-select:none;width:100%;",thumbColor,";",thumbFocus,";"),InputRange=(0,emotion_styled_base_browser_esm.A)("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",12,"px );"),tooltipShow=({show})=>(0,emotion_react_browser_esm.AH)({opacity:show?1:0},"","");var _ref={name:"1cypxip",styles:"top:-80%"},_ref2={name:"1lr98c4",styles:"bottom:-80%"};const tooltipPosition=({position})=>"bottom"===position?_ref2:_ref,Tooltip=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:",config_values.A.radiusSmall,";color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;user-select:none;line-height:1.4;@media not ( prefers-reduced-motion ){transition:opacity 120ms ease;}",tooltipShow,";",tooltipPosition,";",(0,rtl.h)({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),InputNumber=(0,emotion_styled_base_browser_esm.A)(number_control.A,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",rangeHeight,";}",(0,rtl.h)({marginLeft:`${(0,space.x)(4)} !important`}),";"),ActionRightWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",rangeHeight,";}",(0,rtl.h)({marginLeft:8}),";");const input_range=(0,react.forwardRef)((function input_range_InputRange(props,ref){const{describedBy,label,value,...otherProps}=props;return(0,jsx_runtime.jsx)(InputRange,{...otherProps,"aria-describedby":describedBy,"aria-label":label,"aria-hidden":!1,ref,tabIndex:0,type:"range",value})}));function RangeMark(props){const{className,isFilled=!1,label,style={},...otherProps}=props,classes=(0,clsx.A)("components-range-control__mark",isFilled&&"is-filled",className),labelClasses=(0,clsx.A)("components-range-control__mark-label",isFilled&&"is-filled");return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Mark,{...otherProps,"aria-hidden":"true",className:classes,isFilled,style}),label&&(0,jsx_runtime.jsx)(MarkLabel,{"aria-hidden":"true",className:labelClasses,isFilled,style,children:label})]})}function RangeRail(props){const{disabled=!1,marks=!1,min=0,max=100,step=1,value=0,...restProps}=props;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Rail,{disabled,...restProps}),marks&&(0,jsx_runtime.jsx)(Marks,{disabled,marks,min,max,step,value})]})}function Marks(props){const{disabled=!1,marks=!1,min=0,max=100,step:stepProp=1,value=0}=props,marksData=function useMarks({marks,min=0,max=100,step=1,value=0}){if(!marks)return[];const range=max-min;if(!Array.isArray(marks)){marks=[];const count=1+Math.round(range/step);for(;count>marks.push({value:step*marks.length+min}););}const placedMarks=[];return marks.forEach(((mark,index)=>{if(mark.valuemax)return;const key=`mark-${index}`,isFilled=mark.value<=value,offset=(mark.value-min)/range*100+"%",offsetStyle={[(0,build_module.V8)()?"right":"left"]:offset};placedMarks.push({...mark,isFilled,key,style:offsetStyle})})),placedMarks}({marks,min,max,step:"any"===stepProp?1:stepProp,value});return(0,jsx_runtime.jsx)(MarksWrapper,{"aria-hidden":"true",className:"components-range-control__marks",children:marksData.map((mark=>(0,react.createElement)(RangeMark,{...mark,key:mark.key,"aria-hidden":"true",disabled})))})}function SimpleTooltip(props){const{className,inputRef,tooltipPosition,show=!1,style={},value=0,renderTooltipContent=v=>v,zIndex=100,...restProps}=props,position=function useTooltipPosition({inputRef,tooltipPosition}){const[position,setPosition]=(0,react.useState)(),setTooltipPosition=(0,react.useCallback)((()=>{inputRef&&inputRef.current&&setPosition(tooltipPosition)}),[tooltipPosition,inputRef]);return(0,react.useEffect)((()=>{setTooltipPosition()}),[setTooltipPosition]),(0,react.useEffect)((()=>(window.addEventListener("resize",setTooltipPosition),()=>{window.removeEventListener("resize",setTooltipPosition)}))),position}({inputRef,tooltipPosition}),classes=(0,clsx.A)("components-simple-tooltip",className),styles={...style,zIndex};return(0,jsx_runtime.jsx)(Tooltip,{...restProps,"aria-hidden":show,className:classes,position,show,role:"tooltip",style:styles,children:renderTooltipContent(value)})}const noop=()=>{};function computeResetValue({resetFallbackValue,initialPosition}){return void 0!==resetFallbackValue?Number.isNaN(resetFallbackValue)?null:resetFallbackValue:void 0!==initialPosition?Number.isNaN(initialPosition)?null:initialPosition:null}const RangeControl=(0,react.forwardRef)((function UnforwardedRangeControl(props,forwardedRef){const{__nextHasNoMarginBottom=!1,afterIcon,allowReset=!1,beforeIcon,className,color:colorProp=colors_values.l.theme.accent,currentInput,disabled=!1,help,hideLabelFromVision=!1,initialPosition,isShiftStepEnabled=!0,label,marks=!1,max=100,min=0,onBlur=noop,onChange=noop,onFocus=noop,onMouseLeave=noop,onMouseMove=noop,railColor,renderTooltipContent=v=>v,resetFallbackValue,__next40pxDefaultSize=!1,shiftStep=10,showTooltip:showTooltipProp,step=1,trackColor,value:valueProp,withInputField=!0,...otherProps}=props,[value,setValue]=function useControlledRangeValue(settings){const{min,max,value:valueProp,initial}=settings,[state,setInternalState]=use_controlled_state(floatClamp(valueProp,min,max),{initial:floatClamp(null!=initial?initial:null,min,max),fallback:null});return[state,(0,react.useCallback)((nextValue=>{setInternalState(null===nextValue?null:floatClamp(nextValue,min,max))}),[min,max,setInternalState])]}({min,max,value:null!=valueProp?valueProp:null,initial:initialPosition}),isResetPendent=(0,react.useRef)(!1);let hasTooltip=showTooltipProp,hasInputField=withInputField;"any"===step&&(hasTooltip=!1,hasInputField=!1);const[showTooltip,setShowTooltip]=(0,react.useState)(hasTooltip),[isFocused,setIsFocused]=(0,react.useState)(!1),inputRef=(0,react.useRef)(),isCurrentlyFocused=inputRef.current?.matches(":focus"),isThumbFocused=!disabled&&isFocused,isValueReset=null===value,inputSliderValue=isValueReset?"":void 0!==value?value:currentInput,rangeFillValue=isValueReset?(max-min)/2+min:value,fillValue=isValueReset?50:(value-min)/(max-min)*100,fillValueOffset=`${(0,math.qE)(fillValue,0,100)}%`,classes=(0,clsx.A)("components-range-control",className),wrapperClasses=(0,clsx.A)("components-range-control__wrapper",!!marks&&"is-marked"),id=(0,use_instance_id.A)(UnforwardedRangeControl,"inspector-range-control"),describedBy=help?`${id}__help`:void 0,enableTooltip=!1!==hasTooltip&&Number.isFinite(value),handleOnReset=()=>{const resetValue=Number.isNaN(resetFallbackValue)?null:null!=resetFallbackValue?resetFallbackValue:null;setValue(resetValue),onChange(null!=resetValue?resetValue:void 0)},offsetStyle={[(0,build_module.V8)()?"right":"left"]:fillValueOffset};return(0,jsx_runtime.jsx)(base_control.Ay,{__nextHasNoMarginBottom,__associatedWPComponentName:"RangeControl",className:classes,label,hideLabelFromVision,id:`${id}`,help,children:(0,jsx_runtime.jsxs)(Root,{className:"components-range-control__root",__next40pxDefaultSize,children:[beforeIcon&&(0,jsx_runtime.jsx)(BeforeIconWrapper,{children:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:beforeIcon})}),(0,jsx_runtime.jsxs)(range_control_styles_Wrapper,{__nextHasNoMarginBottom,className:wrapperClasses,color:colorProp,marks:!!marks,children:[(0,jsx_runtime.jsx)(input_range,{...otherProps,className:"components-range-control__slider",describedBy,disabled,id:`${id}`,label,max,min,onBlur:event=>{onBlur(event),setIsFocused(!1),setShowTooltip(!1)},onChange:event=>{const nextValue=parseFloat(event.target.value);setValue(nextValue),onChange(nextValue)},onFocus:event=>{onFocus(event),setIsFocused(!0),setShowTooltip(!0)},onMouseMove,onMouseLeave,ref:(0,use_merge_refs.A)([inputRef,forwardedRef]),step,value:null!=inputSliderValue?inputSliderValue:void 0}),(0,jsx_runtime.jsx)(RangeRail,{"aria-hidden":!0,disabled,marks,max,min,railColor,step,value:rangeFillValue}),(0,jsx_runtime.jsx)(Track,{"aria-hidden":!0,className:"components-range-control__track",disabled,style:{width:fillValueOffset},trackColor}),(0,jsx_runtime.jsx)(ThumbWrapper,{className:"components-range-control__thumb-wrapper",style:offsetStyle,disabled,children:(0,jsx_runtime.jsx)(Thumb,{"aria-hidden":!0,isFocused:isThumbFocused,disabled})}),enableTooltip&&(0,jsx_runtime.jsx)(SimpleTooltip,{className:"components-range-control__tooltip",inputRef,tooltipPosition:"bottom",renderTooltipContent,show:isCurrentlyFocused||showTooltip,style:offsetStyle,value})]}),afterIcon&&(0,jsx_runtime.jsx)(AfterIconWrapper,{children:(0,jsx_runtime.jsx)(build_module_icon.A,{icon:afterIcon})}),hasInputField&&(0,jsx_runtime.jsx)(InputNumber,{"aria-label":label,className:"components-range-control__number",disabled,inputMode:"decimal",isShiftStepEnabled,max,min,onBlur:()=>{isResetPendent.current&&(handleOnReset(),isResetPendent.current=!1)},onChange:next=>{let nextValue=parseFloat(next);setValue(nextValue),isNaN(nextValue)?allowReset&&(isResetPendent.current=!0):((nextValuemax)&&(nextValue=floatClamp(nextValue,min,max)),onChange(nextValue),isResetPendent.current=!1)},shiftStep,size:__next40pxDefaultSize?"__unstable-large":"default",__unstableInputWidth:__next40pxDefaultSize?(0,space.x)(20):(0,space.x)(16),step,value:inputSliderValue}),allowReset&&(0,jsx_runtime.jsx)(ActionRightWrapper,{children:(0,jsx_runtime.jsx)(build_module_button.Ay,{className:"components-range-control__reset",accessibleWhenDisabled:!disabled,disabled:disabled||value===computeResetValue({resetFallbackValue,initialPosition}),variant:"secondary",size:"small",onClick:handleOnReset,children:(0,build_module.__)("Reset")})})]})})})),range_control=RangeControl;var use_viewport_match=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@7.7.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js");const viewportBreaks={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 DensityPicker({density,setDensity}){const viewport=function useViewPortBreakpoint(){const isXHuge=(0,use_viewport_match.A)("xhuge",">="),isHuge=(0,use_viewport_match.A)("huge",">="),isXlarge=(0,use_viewport_match.A)("xlarge",">="),isLarge=(0,use_viewport_match.A)("large",">="),isMobile=(0,use_viewport_match.A)("mobile",">=");return isXHuge?"xhuge":isHuge?"huge":isXlarge?"xlarge":isLarge?"large":isMobile?"mobile":null}();(0,react.useEffect)((()=>{setDensity((_density=>{if(!viewport||!_density)return 0;const breakValues=viewportBreaks[viewport];return _densitybreakValues.max?breakValues.max:_density}))}),[setDensity,viewport]);const breakValues=viewportBreaks[viewport||"mobile"],densityToUse=density||breakValues.default,marks=(0,react.useMemo)((()=>Array.from({length:breakValues.max-breakValues.min+1},((_,i)=>({value:breakValues.min+i})))),[breakValues]);return viewport?(0,jsx_runtime.jsx)(range_control,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,showTooltip:!1,label:(0,build_module.__)("Preview size"),value:breakValues.max+breakValues.min-densityToUse,marks,min:breakValues.min,max:breakValues.max,withInputField:!1,onChange:(value=0)=>{setDensity(breakValues.max+breakValues.min-value)},step:1}):null}const{DropdownMenuV2:dataviews_view_config_DropdownMenuV2}=build_module_lock_unlock_unlock(privateApis);function ViewTypeMenu({defaultLayouts={list:{},grid:{},table:{}}}){const{view,onChangeView}=(0,react.useContext)(dataviews_context),availableLayouts=Object.keys(defaultLayouts);if(availableLayouts.length<=1)return null;const activeView=VIEW_LAYOUTS.find((v=>view.type===v.type));return(0,jsx_runtime.jsx)(dataviews_view_config_DropdownMenuV2,{trigger:(0,jsx_runtime.jsx)(build_module_button.Ay,{size:"compact",icon:activeView?.icon,label:(0,build_module.__)("Layout")}),children:availableLayouts.map((layout=>{const config=VIEW_LAYOUTS.find((v=>v.type===layout));return config?(0,jsx_runtime.jsx)(dataviews_view_config_DropdownMenuV2.RadioItem,{value:layout,name:"view-actions-available-view",checked:layout===view.type,hideOnClick:!0,onChange:e=>{switch(e.target.value){case"list":case"grid":case"table":return onChangeView({...view,type:e.target.value,...defaultLayouts[e.target.value]})}!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)("Invalid dataview")},children:(0,jsx_runtime.jsx)(dataviews_view_config_DropdownMenuV2.ItemLabel,{children:config.label})},layout):null}))})}function SortFieldControl(){const{view,fields,onChangeView}=(0,react.useContext)(dataviews_context),orderOptions=(0,react.useMemo)((()=>fields.filter((field=>!1!==field.enableSorting)).map((field=>({label:field.label,value:field.id})))),[fields]);return(0,jsx_runtime.jsx)(select_control.A,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,build_module.__)("Sort by"),value:view.sort?.field,options:orderOptions,onChange:value=>{onChangeView({...view,sort:{direction:view?.sort?.direction||"desc",field:value}})}})}function SortDirectionControl(){const{view,fields,onChangeView}=(0,react.useContext)(dataviews_context);if(0===fields.filter((field=>!1!==field.enableSorting)).length)return null;let value=view.sort?.direction;return!value&&view.sort?.field&&(value="desc"),(0,jsx_runtime.jsx)(toggle_group_control_component.A,{className:"dataviews-view-config__sort-direction",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,build_module.__)("Order"),value,onChange:newDirection=>{"asc"!==newDirection&&"desc"!==newDirection?!0===globalThis.SCRIPT_DEBUG&&(0,warning_build_module.A)("Invalid direction"):onChangeView({...view,sort:{direction:newDirection,field:view.sort?.field||fields.find((field=>!1!==field.enableSorting))?.id||""}})},children:SORTING_DIRECTIONS.map((direction=>(0,jsx_runtime.jsx)(toggle_group_control_option_icon_component,{value:direction,icon:sortIcons[direction],label:sortLabels[direction]},direction)))})}const PAGE_SIZE_VALUES=[10,20,50,100];function ItemsPerPageControl(){const{view,onChangeView}=(0,react.useContext)(dataviews_context);return(0,jsx_runtime.jsx)(toggle_group_control_component.A,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,build_module.__)("Items per page"),value:view.perPage||10,disabled:!view?.sort?.field,onChange:newItemsPerPage=>{const newItemsPerPageNumber="number"==typeof newItemsPerPage||void 0===newItemsPerPage?newItemsPerPage:parseInt(newItemsPerPage,10);onChangeView({...view,perPage:newItemsPerPageNumber,page:1})},children:PAGE_SIZE_VALUES.map((value=>(0,jsx_runtime.jsx)(toggle_group_control_option_component.A,{value,label:value.toString()},value)))})}function FieldItem({field:{id,label,index,isVisible,isHidable},fields,view,onChangeView}){const visibleFieldIds=getVisibleFieldIds(view,fields);return(0,jsx_runtime.jsx)(item_component,{children:(0,jsx_runtime.jsxs)(component.A,{expanded:!0,className:`dataviews-field-control__field dataviews-field-control__field-${id}`,children:[(0,jsx_runtime.jsx)("span",{children:label}),(0,jsx_runtime.jsxs)(component.A,{justify:"flex-end",expanded:!1,className:"dataviews-field-control__actions",children:[view.type===LAYOUT_TABLE&&isVisible&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(build_module_button.Ay,{disabled:index<1,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{var _visibleFieldIds$slic;onChangeView({...view,fields:[...null!==(_visibleFieldIds$slic=visibleFieldIds.slice(0,index-1))&&void 0!==_visibleFieldIds$slic?_visibleFieldIds$slic:[],id,visibleFieldIds[index-1],...visibleFieldIds.slice(index+1)]})},icon:chevron_up,label:(0,build_module.nv)((0,build_module.__)("Move %s up"),label)}),(0,jsx_runtime.jsx)(build_module_button.Ay,{disabled:index>=visibleFieldIds.length-1,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{var _visibleFieldIds$slic2;onChangeView({...view,fields:[...null!==(_visibleFieldIds$slic2=visibleFieldIds.slice(0,index))&&void 0!==_visibleFieldIds$slic2?_visibleFieldIds$slic2:[],visibleFieldIds[index+1],id,...visibleFieldIds.slice(index+2)]})},icon:chevron_down.A,label:(0,build_module.nv)((0,build_module.__)("Move %s down"),label)})," "]}),(0,jsx_runtime.jsx)(build_module_button.Ay,{className:"dataviews-field-control__field-visibility-button",disabled:!isHidable,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{onChangeView({...view,fields:isVisible?visibleFieldIds.filter((fieldId=>fieldId!==id)):[...visibleFieldIds,id]}),setTimeout((()=>{const element=document.querySelector(`.dataviews-field-control__field-${id} .dataviews-field-control__field-visibility-button`);element instanceof HTMLElement&&element.focus()}),50)},icon:isVisible?library_seen:library_unseen,label:isVisible?(0,build_module.nv)((0,build_module.__)("Hide %s"),label):(0,build_module.nv)((0,build_module.__)("Show %s"),label)})]})]})},id)}function FieldControl(){const{view,fields,onChangeView}=(0,react.useContext)(dataviews_context),visibleFieldIds=(0,react.useMemo)((()=>getVisibleFieldIds(view,fields)),[view,fields]),hiddenFieldIds=(0,react.useMemo)((()=>function getHiddenFieldIds(view,fields){const fieldsToExclude=[...getCombinedFieldIds(view),...getVisibleFieldIds(view,fields)];return view.type===LAYOUT_GRID&&view.layout?.mediaField&&fieldsToExclude.push(view.layout?.mediaField),view.type===LAYOUT_LIST&&view.layout?.mediaField&&fieldsToExclude.push(view.layout?.mediaField),fields.filter((({id,enableHiding})=>!fieldsToExclude.includes(id)&&enableHiding)).map((({id})=>id))}(view,fields)),[view,fields]),notHidableFieldIds=(0,react.useMemo)((()=>function getNotHidableFieldIds(view){var _view$layout$combined;return"table"===view.type?[view.layout?.primaryField].concat(null!==(_view$layout$combined=view.layout?.combinedFields?.flatMap((field=>field.children)))&&void 0!==_view$layout$combined?_view$layout$combined:[]).filter((item=>!!item)):"grid"===view.type||"list"===view.type?[view.layout?.primaryField,view.layout?.mediaField].filter((item=>!!item)):[]}(view)),[view]),visibleFields=fields.filter((({id})=>visibleFieldIds.includes(id))).map((({id,label,enableHiding})=>({id,label,index:visibleFieldIds.indexOf(id),isVisible:!0,isHidable:!notHidableFieldIds.includes(id)&&enableHiding})));view.type===LAYOUT_TABLE&&view.layout?.combinedFields&&view.layout.combinedFields.forEach((({id,label})=>{visibleFields.push({id,label,index:visibleFieldIds.indexOf(id),isVisible:!0,isHidable:notHidableFieldIds.includes(id)})})),visibleFields.sort(((a,b)=>a.index-b.index));const hiddenFields=fields.filter((({id})=>hiddenFieldIds.includes(id))).map((({id,label,enableHiding},index)=>({id,label,index,isVisible:!1,isHidable:enableHiding})));return visibleFields?.length||hiddenFields?.length?(0,jsx_runtime.jsxs)(v_stack_component.A,{spacing:6,className:"dataviews-field-control",children:[!!visibleFields?.length&&(0,jsx_runtime.jsx)(item_group_component,{isBordered:!0,isSeparated:!0,children:visibleFields.map((field=>(0,jsx_runtime.jsx)(FieldItem,{field,fields,view,onChangeView},field.id)))}),!!hiddenFields?.length&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)(v_stack_component.A,{spacing:4,children:[(0,jsx_runtime.jsx)(base_control.Ay.VisualLabel,{style:{margin:0},children:(0,build_module.__)("Hidden")}),(0,jsx_runtime.jsx)(item_group_component,{isBordered:!0,isSeparated:!0,children:hiddenFields.map((field=>(0,jsx_runtime.jsx)(FieldItem,{field,fields,view,onChangeView},field.id)))})]})})]}):null}function SettingsSection({title,description,children}){return(0,jsx_runtime.jsxs)(grid_component,{columns:12,className:"dataviews-settings-section",gap:4,children:[(0,jsx_runtime.jsxs)("div",{className:"dataviews-settings-section__sidebar",children:[(0,jsx_runtime.jsx)(heading_component.A,{level:2,className:"dataviews-settings-section__title",children:title}),description&&(0,jsx_runtime.jsx)(text_component.A,{variant:"muted",className:"dataviews-settings-section__description",children:description})]}),(0,jsx_runtime.jsx)(grid_component,{columns:8,gap:4,className:"dataviews-settings-section__content",children})]})}function DataviewsViewConfigContent({density,setDensity}){const{view}=(0,react.useContext)(dataviews_context);return(0,jsx_runtime.jsxs)(v_stack_component.A,{className:"dataviews-view-config",spacing:6,children:[(0,jsx_runtime.jsxs)(SettingsSection,{title:(0,build_module.__)("Appearance"),children:[(0,jsx_runtime.jsxs)(component.A,{expanded:!0,className:"is-divided-in-two",children:[(0,jsx_runtime.jsx)(SortFieldControl,{}),(0,jsx_runtime.jsx)(SortDirectionControl,{})]}),view.type===LAYOUT_GRID&&(0,jsx_runtime.jsx)(DensityPicker,{density,setDensity}),(0,jsx_runtime.jsx)(ItemsPerPageControl,{})]}),(0,jsx_runtime.jsx)(SettingsSection,{title:(0,build_module.__)("Properties"),children:(0,jsx_runtime.jsx)(FieldControl,{})})]})}const dataviews_view_config=(0,react.memo)((function _DataViewsViewConfig({density,setDensity,defaultLayouts={list:{},grid:{},table:{}}}){const[isShowingViewPopover,setIsShowingViewPopover]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(ViewTypeMenu,{defaultLayouts}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(build_module_button.Ay,{size:"compact",icon:library_cog,label:(0,build_module._x)("View options","View is used as a noun"),onClick:()=>setIsShowingViewPopover(!0)}),isShowingViewPopover&&(0,jsx_runtime.jsx)(popover.Ay,{placement:"bottom-end",onClose:()=>{setIsShowingViewPopover(!1)},focusOnMount:!0,children:(0,jsx_runtime.jsx)(DataviewsViewConfigContent,{density,setDensity})})]})]})}));var normalize_fields=__webpack_require__("../../node_modules/.pnpm/@wordpress+dataviews@4.3.0_@emotion+is-prop-valid@1.2.1_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@wordpress/dataviews/build-module/normalize-fields.js");const defaultGetItemId=item=>item.id;function DataViews({view,onChangeView,fields,search=!0,searchLabel,actions=[],data,getItemId=defaultGetItemId,isLoading=!1,paginationInfo,defaultLayouts,selection:selectionProperty,onChangeSelection,header}){const[selectionState,setSelectionState]=(0,react.useState)([]),[density,setDensity]=(0,react.useState)(0),isUncontrolled=void 0===selectionProperty||void 0===onChangeSelection,selection=isUncontrolled?selectionState:selectionProperty,[openedFilter,setOpenedFilter]=(0,react.useState)(null);const _fields=(0,react.useMemo)((()=>(0,normalize_fields.t)(fields)),[fields]),_selection=(0,react.useMemo)((()=>selection.filter((id=>data.some((item=>getItemId(item)===id))))),[selection,data,getItemId]),filters=useFilters(_fields,view),[isShowingFilter,setIsShowingFilter]=(0,react.useState)((()=>(filters||[]).some((filter=>filter.isPrimary))));return(0,jsx_runtime.jsx)(dataviews_context.Provider,{value:{view,onChangeView,fields:_fields,actions,data,isLoading,paginationInfo,selection:_selection,onChangeSelection:function setSelectionWithChange(value){const newValue="function"==typeof value?value(selection):value;isUncontrolled&&setSelectionState(newValue),onChangeSelection&&onChangeSelection(newValue)},openedFilter,setOpenedFilter,getItemId,density},children:(0,jsx_runtime.jsxs)("div",{className:"dataviews-wrapper",children:[(0,jsx_runtime.jsxs)(component.A,{alignment:"top",justify:"space-between",className:"dataviews__view-actions",spacing:1,children:[(0,jsx_runtime.jsxs)(component.A,{justify:"start",expanded:!1,className:"dataviews__search",children:[search&&(0,jsx_runtime.jsx)(dataviews_search,{label:searchLabel}),(0,jsx_runtime.jsx)(FilterVisibilityToggle,{filters,view,onChangeView,setOpenedFilter,setIsShowingFilter,isShowingFilter})]}),(0,jsx_runtime.jsxs)(component.A,{spacing:1,expanded:!1,style:{flexShrink:0},children:[(0,jsx_runtime.jsx)(dataviews_view_config,{defaultLayouts,density,setDensity}),header]})]}),isShowingFilter&&(0,jsx_runtime.jsx)(dataviews_filters,{}),(0,jsx_runtime.jsx)(DataViewsLayout,{}),(0,jsx_runtime.jsx)(DataViewsFooter,{})]})})}},"../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/a11y.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};function __WEBPACK_DEFAULT_EXPORT__(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),n=(u=t(e))>(d=t(v))?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}}},"../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var bind=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind-context.js"),uncurryThis=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js"),IndexedObject=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/indexed-object.js"),toObject=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js"),lengthOfArrayLike=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js"),arraySpeciesCreate=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-create.js"),push=uncurryThis([].push),createMethod=function(TYPE){var IS_MAP=1===TYPE,IS_FILTER=2===TYPE,IS_SOME=3===TYPE,IS_EVERY=4===TYPE,IS_FIND_INDEX=6===TYPE,IS_FILTER_REJECT=7===TYPE,NO_HOLES=5===TYPE||IS_FIND_INDEX;return function($this,callbackfn,that,specificCreate){for(var value,result,O=toObject($this),self=IndexedObject(O),length=lengthOfArrayLike(self),boundFunction=bind(callbackfn,that),index=0,create=specificCreate||arraySpeciesCreate,target=IS_MAP?create($this,length):IS_FILTER||IS_FILTER_REJECT?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(result=boundFunction(value=self[index],index,O),TYPE))if(IS_MAP)target[index]=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push(target,value)}else switch(TYPE){case 4:return!1;case 7:push(target,value)}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}};module.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}},"../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-constructor.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var isArray=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js"),isConstructor=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-constructor.js"),isObject=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js"),SPECIES=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js")("species"),$Array=Array;module.exports=function(originalArray){var C;return isArray(originalArray)&&(C=originalArray.constructor,(isConstructor(C)&&(C===$Array||isArray(C.prototype))||isObject(C)&&null===(C=C[SPECIES]))&&(C=void 0)),void 0===C?$Array:C}},"../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-create.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var arraySpeciesConstructor=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-constructor.js");module.exports=function(originalArray,length){return new(arraySpeciesConstructor(originalArray))(0===length?0:length)}},"../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var classof=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");module.exports=Array.isArray||function isArray(argument){return"Array"===classof(argument)}},"../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.function.name.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var DESCRIPTORS=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js"),FUNCTION_NAME_EXISTS=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-name.js").EXISTS,uncurryThis=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js"),defineBuiltInAccessor=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in-accessor.js"),FunctionPrototype=Function.prototype,functionToString=uncurryThis(FunctionPrototype.toString),nameRE=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,regExpExec=uncurryThis(nameRE.exec);DESCRIPTORS&&!FUNCTION_NAME_EXISTS&&defineBuiltInAccessor(FunctionPrototype,"name",{configurable:!0,get:function(){try{return regExpExec(nameRE,functionToString(this))[1]}catch(error){return""}}})},"../../node_modules/.pnpm/rememo@4.0.2/node_modules/rememo/rememo.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var LEAF_KEY={};function arrayOf(value){return[value]}function isShallowEqual(a,b,fromIndex){var i;if(a.length!==b.length)return!1;for(i=fromIndex;i{var characterMap={À:"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",й:"и",Й:"И",ё:"е",Ё:"Е"},chars=Object.keys(characterMap).join("|"),allAccents=new RegExp(chars,"g"),firstAccent=new RegExp(chars,"");function matcher(match){return characterMap[match]}var removeAccents=function(string){return string.replace(allAccents,matcher)};module.exports=removeAccents,module.exports.has=function(string){return!!string.match(firstAccent)},module.exports.remove=removeAccents},"../../node_modules/.pnpm/use-memo-one@1.1.3_react@17.0.2/node_modules/use-memo-one/dist/use-memo-one.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{MA:()=>useMemoOne});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function useMemoOne(getResult,inputs){var initial=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((function(){return{inputs,result:getResult()}}))[0],isFirstRun=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!0),committed=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(initial),cache=isFirstRun.current||Boolean(inputs&&committed.current.inputs&&function areInputsEqual(newInputs,lastInputs){if(newInputs.length!==lastInputs.length)return!1;for(var i=0;i