%PDF- %PDF-
Direktori : /var/www/projetos/beta2.gracafilmes.com.br/wp-includes/js/dist/ |
Current File : /var/www/projetos/beta2.gracafilmes.com.br/wp-includes/js/dist/commands.min.js |
/*! This file is auto-generated */ (()=>{var e={6007:e=>{var t=1,n=.9,r=.3,o=.1,a=0,c=.999,u=.9999,i=.99,l=/[\\\/\-_+.# \t"@\[\(\{&]/,s=/[\\\/\-_+.# \t"@\[\(\{&]/g;function d(e,f,m,p,v,h){if(h===f.length)return v===e.length?t:i;for(var g,E,b,y=p.charAt(h),w=m.indexOf(y,v),C=0;w>=0;)(g=d(e,f,m,p,w+1,h+1))>C&&(w===v?g*=t:l.test(e.charAt(w-1))?(g*=n,(b=e.slice(v,w-1).match(s))&&v>0&&(g*=Math.pow(c,b.length))):l.test(e.slice(v,w-1))?(g*=a,v>0&&(g*=Math.pow(c,w-v))):(g*=r,v>0&&(g*=Math.pow(c,w-v))),e.charAt(w)!==f.charAt(h)&&(g*=u)),g<o&&m.charAt(w-1)===p.charAt(h+1)&&m.charAt(w-1)!==p.charAt(h)&&(E=d(e,f,m,p,w+1,h+2))*o>g&&(g=E*o),g>C&&(C=g),w=m.indexOf(y,w+1);return C}e.exports=function(e,t){return d(e,t,e.toLowerCase(),t.toLowerCase(),0,0)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{CommandMenu:()=>On,privateApis:()=>kn,store:()=>yn,useCommand:()=>Ln,useCommandLoader:()=>An});var e={};n.r(e),n.d(e,{close:()=>dn,open:()=>sn,registerCommand:()=>an,registerCommandLoader:()=>un,unregisterCommand:()=>cn,unregisterCommandLoader:()=>ln});var t={};n.r(t),n.d(t,{getCommandLoaders:()=>mn,getCommands:()=>fn,getContext:()=>vn,isOpen:()=>pn});var o={};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}n.r(o),n.d(o,{setContext:()=>hn});const c=window.React;function u(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function i(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function l(...e){return(0,c.useCallback)(i(...e),e)}function s(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,c.useMemo)((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}const d=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?c.useLayoutEffect:()=>{},f=c["useId".toString()]||(()=>{});let m=0;function p(e){const[t,n]=c.useState(f());return d((()=>{e||n((e=>null!=e?e:String(m++)))}),[e]),e||(t?`radix-${t}`:"")}function v(e){const t=(0,c.useRef)(e);return(0,c.useEffect)((()=>{t.current=e})),(0,c.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function h({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=(0,c.useState)(e),[r]=n,o=(0,c.useRef)(r),a=v(t);return(0,c.useEffect)((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,u=a?e:r,i=v(n);return[u,(0,c.useCallback)((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&i(n)}else o(t)}),[a,e,o,i])]}const g=window.ReactDOM;var E=n.n(g);const b=(0,c.forwardRef)(((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),u=o.find(C);if(u){const e=u.props.children,n=o.map((t=>t===u?c.Children.count(e)>1?c.Children.only(null):(0,c.isValidElement)(e)?e.props.children:null:t));return(0,c.createElement)(y,a({},r,{ref:t}),(0,c.isValidElement)(e)?(0,c.cloneElement)(e,void 0,n):null)}return(0,c.createElement)(y,a({},r,{ref:t}),n)}));b.displayName="Slot";const y=(0,c.forwardRef)(((e,t)=>{const{children:n,...r}=e;return(0,c.isValidElement)(n)?(0,c.cloneElement)(n,{...S(r,n.props),ref:i(t,n.ref)}):c.Children.count(n)>1?c.Children.only(null):null}));y.displayName="SlotClone";const w=({children:e})=>(0,c.createElement)(c.Fragment,null,e);function C(e){return(0,c.isValidElement)(e)&&e.type===w}function S(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==a||a(...e),null==o||o(...e)}:"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const x=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,c.forwardRef)(((e,n)=>{const{asChild:r,...o}=e,u=r?b:t;return(0,c.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,c.createElement)(u,a({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});const R="dismissableLayer.update",O="dismissableLayer.pointerDownOutside",k="dismissableLayer.focusOutside";let L;const A=(0,c.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N=(0,c.forwardRef)(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:d,...f}=e,m=(0,c.useContext)(A),[p,h]=(0,c.useState)(null),[,g]=(0,c.useState)({}),E=l(t,(e=>h(e))),b=Array.from(m.layers),[y]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(y),C=p?b.indexOf(p):-1,S=m.layersWithOutsidePointerEventsDisabled.size>0,N=C>=w,_=function(e){const t=v(e),n=(0,c.useRef)(!1),r=(0,c.useRef)((()=>{}));return(0,c.useEffect)((()=>{const e=e=>{if(e.target&&!n.current){const o={originalEvent:e};function a(){D(O,t,o,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",r.current),r.current=a,document.addEventListener("click",r.current,{once:!0})):a()}n.current=!1},o=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",e),document.removeEventListener("click",r.current)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,n=[...m.branches].some((e=>e.contains(t)));N&&!n&&(null==o||o(e),null==s||s(e),e.defaultPrevented||null==d||d())})),P=function(e){const t=v(e),n=(0,c.useRef)(!1);return(0,c.useEffect)((()=>{const e=e=>{if(e.target&&!n.current){D(k,t,{originalEvent:e},{discrete:!1})}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...m.branches].some((e=>e.contains(t)))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==d||d())}));return function(e){const t=v(e);(0,c.useEffect)((()=>{const e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t])}((e=>{C===m.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))})),(0,c.useEffect)((()=>{if(p)return n&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(L=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),M(),()=>{n&&1===m.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=L)}}),[p,n,m]),(0,c.useEffect)((()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),M())}),[p,m]),(0,c.useEffect)((()=>{const e=()=>g({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)}),[]),(0,c.createElement)(x.div,a({},f,{ref:E,style:{pointerEvents:S?N?"auto":"none":void 0,...e.style},onFocusCapture:u(e.onFocusCapture,P.onFocusCapture),onBlurCapture:u(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:u(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function M(){const e=new CustomEvent(R);document.dispatchEvent(e)}function D(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&(0,g.flushSync)((()=>e.dispatchEvent(t)))}(o,a):o.dispatchEvent(a)}const _="focusScope.autoFocusOnMount",P="focusScope.autoFocusOnUnmount",I={bubbles:!1,cancelable:!0},T=(0,c.forwardRef)(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...i}=e,[s,d]=(0,c.useState)(null),f=v(o),m=v(u),p=(0,c.useRef)(null),h=l(t,(e=>d(e))),g=(0,c.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,c.useEffect)((()=>{if(r){function e(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?p.current=t:U(p.current,{select:!0})}function t(e){!g.paused&&s&&(s.contains(e.relatedTarget)||U(p.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,s,g.paused]),(0,c.useEffect)((()=>{if(s){B.add(g);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(_,I);s.addEventListener(_,f),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(U(r,{select:t}),document.activeElement!==n)return}((e=j(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&U(s))}return()=>{s.removeEventListener(_,f),setTimeout((()=>{const e=new CustomEvent(P,I);s.addEventListener(P,m),s.dispatchEvent(e),e.defaultPrevented||U(null!=t?t:document.body,{select:!0}),s.removeEventListener(P,m),B.remove(g)}),0)}}var e}),[s,f,m,g]);const E=(0,c.useCallback)((e=>{if(!n&&!r)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=j(e),n=F(t,e),r=F(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&U(a,{select:!0})):(e.preventDefault(),n&&U(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,g.paused]);return(0,c.createElement)(x.div,a({tabIndex:-1},i,{ref:h,onKeyDown:E}))}));function j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F(e,t){for(const n of e)if(!W(n,{upTo:t}))return n}function W(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function U(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const B=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=K(e,t),e.unshift(t)},remove(t){var n;e=K(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function K(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const $=(0,c.forwardRef)(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?E().createPortal((0,c.createElement)(x.div,a({},o,{ref:t})),r):null}));const z=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=(0,c.useState)(),r=(0,c.useRef)({}),o=(0,c.useRef)(e),a=(0,c.useRef)("none"),u=e?"mounted":"unmounted",[i,l]=function(e,t){return(0,c.useReducer)(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,c.useEffect)((()=>{const e=q(r.current);a.current="mounted"===i?e:"none"}),[i]),d((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,c=q(t);if(e)l("MOUNT");else if("none"===c||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==c?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,l]),d((()=>{if(t){const e=e=>{const n=q(r.current).includes(e.animationName);e.target===t&&n&&(0,g.flushSync)((()=>l("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=q(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:(0,c.useCallback)((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):c.Children.only(n),a=l(r.ref,o.ref);return"function"==typeof n||r.isPresent?(0,c.cloneElement)(o,{ref:a}):null};function q(e){return(null==e?void 0:e.animationName)||"none"}z.displayName="Presence";let G=0;function H(){(0,c.useEffect)((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:V()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:V()),G++,()=>{1===G&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),G--}}),[])}function V(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X.apply(this,arguments)};function Y(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;function Z(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var J="right-scroll-bar-position",Q="width-before-scroll-bar";function ee(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(o=(0,c.useState)((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade;var n,r,o}function te(e){return e}function ne(e,t){void 0===t&&(t=te);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}};return o}var re=function(e){void 0===e&&(e={});var t=ne(null);return t.options=X({async:!0,ssr:!1},e),t}(),oe=function(){},ae=c.forwardRef((function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:oe,onWheelCapture:oe,onTouchMoveCapture:oe}),o=r[0],a=r[1],u=e.forwardProps,i=e.children,l=e.className,s=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noIsolation,v=e.inert,h=e.allowPinchZoom,g=e.as,E=void 0===g?"div":g,b=Y(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=m,w=ee([n,t]),C=X(X({},b),o);return c.createElement(c.Fragment,null,d&&c.createElement(y,{sideCar:re,removeScrollBar:s,shards:f,noIsolation:p,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:n}),u?c.cloneElement(c.Children.only(i),X(X({},C),{ref:w})):c.createElement(E,X({},C,{className:l,ref:w}),i))}));ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ae.classNames={fullWidth:Q,zeroRight:J};var ce,ue=function(e){var t=e.sideCar,n=Y(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,X({},n))};ue.isSideCarExport=!0;function ie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ce||n.nc;return t&&e.setAttribute("nonce",t),e}var le=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=ie())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},se=function(){var e,t=(e=le(),function(t,n){c.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},de={left:0,top:0,right:0,gap:0},fe=function(e){return parseInt(e||"",10)||0},me=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return de;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[fe(n),fe(r),fe(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},pe=se(),ve=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(u,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(u,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(J," {\n right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(Q," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(J," .").concat(J," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Q," .").concat(Q," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},he=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,a=c.useMemo((function(){return me(o)}),[o]);return c.createElement(pe,{styles:ve(a,!t,o,n?"":"!important")})},ge=!1;if("undefined"!=typeof window)try{var Ee=Object.defineProperty({},"passive",{get:function(){return ge=!0,!0}});window.addEventListener("test",Ee,Ee),window.removeEventListener("test",Ee,Ee)}catch(e){ge=!1}var be=!!ge&&{passive:!1},ye=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),we(e,n)){var r=Ce(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},we=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Ce=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Se=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xe=function(e){return[e.deltaX,e.deltaY]},Re=function(e){return e&&"current"in e?e.current:e},Oe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ke=0,Le=[];const Ae=(Ne=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(ke++)[0],a=c.useState((function(){return se()}))[0],u=c.useRef(e);c.useEffect((function(){u.current=e}),[e]),c.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=Z([e.lockRef.current],(e.shards||[]).map(Re),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var o,a=Se(e),c=n.current,i="deltaX"in e?e.deltaX:c[0]-a[0],l="deltaY"in e?e.deltaY:c[1]-a[1],s=e.target,d=Math.abs(i)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=ye(d,s);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=ye(d,s)),!f)return!1;if(!r.current&&"changedTouches"in e&&(i||l)&&(r.current=o),!o)return!0;var m=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),c=a*r,u=n.target,i=t.contains(u),l=!1,s=c>0,d=0,f=0;do{var m=Ce(e,u),p=m[0],v=m[1]-m[2]-a*p;(p||v)&&we(e,u)&&(d+=v,f+=p),u=u.parentNode}while(!i&&u!==document.body||i&&(t.contains(u)||t===u));return(s&&(o&&0===d||!o&&c>d)||!s&&(o&&0===f||!o&&-c>f))&&(l=!0),l}(m,t,e,"h"===m?i:l,!0)}),[]),l=c.useCallback((function(e){var n=e;if(Le.length&&Le[Le.length-1]===a){var r="deltaY"in n?xe(n):Se(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var c=(u.current.shards||[]).map(Re).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?i(n,c[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=c.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),d=c.useCallback((function(e){n.current=Se(e),r.current=void 0}),[]),f=c.useCallback((function(t){s(t.type,xe(t),t.target,i(t,e.lockRef.current))}),[]),m=c.useCallback((function(t){s(t.type,Se(t),t.target,i(t,e.lockRef.current))}),[]);c.useEffect((function(){return Le.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,be),document.addEventListener("touchmove",l,be),document.addEventListener("touchstart",d,be),function(){Le=Le.filter((function(e){return e!==a})),document.removeEventListener("wheel",l,be),document.removeEventListener("touchmove",l,be),document.removeEventListener("touchstart",d,be)}}),[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(a,{styles:Oe(o)}):null,p?c.createElement(he,{gapMode:"margin"}):null)},re.useMedium(Ne),ue);var Ne,Me=c.forwardRef((function(e,t){return c.createElement(ae,X({},e,{ref:t,sideCar:Ae}))}));Me.classNames=ae.classNames;const De=Me;var _e=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Pe=new WeakMap,Ie=new WeakMap,Te={},je=0,Fe=function(e){return e&&(e.host||Fe(e.parentNode))},We=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Fe(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Te[n]||(Te[n]=new WeakMap);var a=Te[n],c=[],u=new Set,i=new Set(o),l=function(e){e&&!u.has(e)&&(u.add(e),l(e.parentNode))};o.forEach(l);var s=function(e){e&&!i.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(u.has(e))s(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,i=(Pe.get(e)||0)+1,l=(a.get(e)||0)+1;Pe.set(e,i),a.set(e,l),c.push(e),1===i&&o&&Ie.set(e,!0),1===l&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return s(t),u.clear(),je++,function(){c.forEach((function(e){var t=Pe.get(e)-1,o=a.get(e)-1;Pe.set(e,t),a.set(e,o),t||(Ie.has(e)||e.removeAttribute(r),Ie.delete(e)),o||e.removeAttribute(n)})),--je||(Pe=new WeakMap,Pe=new WeakMap,Ie=new WeakMap,Te={})}},Ue=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||_e(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),We(r,o,n,"aria-hidden")):function(){return null}};const Be="Dialog",[Ke,$e]=function(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>(0,c.createContext)(e)));return function(n){const r=(null==n?void 0:n[e])||t;return(0,c.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=(0,c.createContext)(r),a=n.length;function u(t){const{scope:n,children:r,...u}=t,i=(null==n?void 0:n[e][a])||o,l=(0,c.useMemo)((()=>u),Object.values(u));return(0,c.createElement)(i.Provider,{value:l},r)}return n=[...n,r],u.displayName=t+"Provider",[u,function(n,u){const i=(null==u?void 0:u[e][a])||o,l=(0,c.useContext)(i);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},s(r,...t)]}(Be),[ze,qe]=Ke(Be),Ge=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,i=(0,c.useRef)(null),l=(0,c.useRef)(null),[s=!1,d]=h({prop:r,defaultProp:o,onChange:a});return(0,c.createElement)(ze,{scope:t,triggerRef:i,contentRef:l,contentId:p(),titleId:p(),descriptionId:p(),open:s,onOpenChange:d,onOpenToggle:(0,c.useCallback)((()=>d((e=>!e))),[d]),modal:u},n)},He="DialogPortal",[Ve,Xe]=Ke(He,{forceMount:void 0}),Ye=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=qe(He,t);return(0,c.createElement)(Ve,{scope:t,forceMount:n},c.Children.map(r,(e=>(0,c.createElement)(z,{present:n||a.open},(0,c.createElement)($,{asChild:!0,container:o},e)))))},Ze="DialogOverlay",Je=(0,c.forwardRef)(((e,t)=>{const n=Xe(Ze,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,u=qe(Ze,e.__scopeDialog);return u.modal?(0,c.createElement)(z,{present:r||u.open},(0,c.createElement)(Qe,a({},o,{ref:t}))):null})),Qe=(0,c.forwardRef)(((e,t)=>{const{__scopeDialog:n,...r}=e,o=qe(Ze,n);return(0,c.createElement)(De,{as:b,allowPinchZoom:!0,shards:[o.contentRef]},(0,c.createElement)(x.div,a({"data-state":ct(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),et="DialogContent",tt=(0,c.forwardRef)(((e,t)=>{const n=Xe(et,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,u=qe(et,e.__scopeDialog);return(0,c.createElement)(z,{present:r||u.open},u.modal?(0,c.createElement)(nt,a({},o,{ref:t})):(0,c.createElement)(rt,a({},o,{ref:t})))})),nt=(0,c.forwardRef)(((e,t)=>{const n=qe(et,e.__scopeDialog),r=(0,c.useRef)(null),o=l(t,n.contentRef,r);return(0,c.useEffect)((()=>{const e=r.current;if(e)return Ue(e)}),[]),(0,c.createElement)(ot,a({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:u(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:u(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:u(e.onFocusOutside,(e=>e.preventDefault()))}))})),rt=(0,c.forwardRef)(((e,t)=>{const n=qe(et,e.__scopeDialog),r=(0,c.useRef)(!1);return(0,c.createElement)(ot,a({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const c=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(c))&&t.preventDefault()}}))})),ot=(0,c.forwardRef)(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:u,...i}=e,s=qe(et,n),d=l(t,(0,c.useRef)(null));return H(),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(T,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:u},(0,c.createElement)(N,a({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ct(s.open)},i,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)})),at="DialogTitle";function ct(e){return e?"open":"closed"}const ut="DialogTitleWarning",[it,lt]=function(e,t){const n=(0,c.createContext)(t);function r(e){const{children:t,...r}=e,o=(0,c.useMemo)((()=>r),Object.values(r));return(0,c.createElement)(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=(0,c.useContext)(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(ut,{contentName:et,titleName:at,docsSlug:"dialog"}),st=Ge,dt=Ye,ft=Je,mt=tt;var pt=n(6007),vt='[cmdk-group=""]',ht='[cmdk-group-items=""]',gt='[cmdk-item=""]',Et=`${gt}:not([aria-disabled="true"])`,bt="cmdk-item-select",yt="data-value",wt=(e,t)=>pt(e,t),Ct=c.createContext(void 0),St=()=>c.useContext(Ct),xt=c.createContext(void 0),Rt=()=>c.useContext(xt),Ot=c.createContext(void 0),kt=c.forwardRef(((e,t)=>{let n=c.useRef(null),r=Bt((()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}}))),o=Bt((()=>new Set)),a=Bt((()=>new Map)),u=Bt((()=>new Map)),i=Bt((()=>new Set)),l=Wt(e),{label:s,children:d,value:f,onValueChange:m,filter:p,shouldFilter:v,...h}=e,g=c.useId(),E=c.useId(),b=c.useId(),y=qt();Ut((()=>{if(void 0!==f){let e=f.trim().toLowerCase();r.current.value=e,y(6,k),w.emit()}}),[f]);let w=c.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,a,c;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)O(),x(),y(1,R);else if("value"===e){if(void 0!==(null==(o=l.current)?void 0:o.value))return void(null==(c=(a=l.current).onValueChange)||c.call(a,t));n||y(5,k)}w.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),C=c.useMemo((()=>({value:(e,t)=>{t!==u.current.get(e)&&(u.current.set(e,t),r.current.filtered.items.set(e,S(t)),y(2,(()=>{x(),w.emit()})))},item:(e,t)=>(o.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),y(3,(()=>{O(),x(),r.current.value||R(),w.emit()})),()=>{u.current.delete(e),o.current.delete(e),r.current.filtered.items.delete(e),y(4,(()=>{O(),R(),w.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{u.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],listId:g,inputId:b,labelId:E})),[]);function S(e){var t;let n=(null==(t=l.current)?void 0:t.filter)??wt;return e?n(e,r.current.search):0}function x(){if(!n.current||!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let o=n.current.querySelector('[cmdk-list-sizer=""]');A().sort(((t,n)=>{let r=t.getAttribute(yt),o=n.getAttribute(yt);return(e.get(o)??0)-(e.get(r)??0)})).forEach((e=>{let t=e.closest(ht);t?t.appendChild(e.parentElement===t?e:e.closest(`${ht} > *`)):o.appendChild(e.parentElement===o?e:e.closest(`${ht} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=n.current.querySelector(`${vt}[${yt}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)}))}function R(){let e=A().find((e=>!e.ariaDisabled)),t=null==e?void 0:e.getAttribute(yt);w.setState("value",t||void 0)}function O(){if(!r.current.search||!1===l.current.shouldFilter)return void(r.current.filtered.count=o.current.size);r.current.filtered.groups=new Set;let e=0;for(let t of o.current){let n=S(u.current.get(t));r.current.filtered.items.set(t,n),n>0&&e++}for(let[e,t]of a.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=e}function k(){var e,t,n;let r=L();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(vt))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function L(){return n.current.querySelector(`${gt}[aria-selected="true"]`)}function A(){return Array.from(n.current.querySelectorAll(Et))}function N(e){let t=A()[e];t&&w.setState("value",t.getAttribute(yt))}function M(e){var t;let n=L(),r=A(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&w.setState("value",a.getAttribute(yt))}function D(e){let t,n=L(),r=null==n?void 0:n.closest(vt);for(;r&&!t;)r=e>0?jt(r,vt):Ft(r,vt),t=null==r?void 0:r.querySelector(Et);t?w.setState("value",t.getAttribute(yt)):M(e)}let _=()=>N(A().length-1),P=e=>{e.preventDefault(),e.metaKey?_():e.altKey?D(1):M(1)},I=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?D(-1):M(-1)};return c.createElement("div",{ref:Kt([n,t]),...h,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=h.onKeyDown)||t.call(h,e),!e.defaultPrevented)switch(e.key){case"n":case"j":e.ctrlKey&&P(e);break;case"ArrowDown":P(e);break;case"p":case"k":e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),N(0);break;case"End":e.preventDefault(),_();break;case"Enter":{e.preventDefault();let t=L();if(t){let e=new Event(bt);t.dispatchEvent(e)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Gt},s),c.createElement(xt.Provider,{value:w},c.createElement(Ct.Provider,{value:C},d)))})),Lt=c.forwardRef(((e,t)=>{let n=c.useId(),r=c.useRef(null),o=c.useContext(Ot),a=St(),u=Wt(e);Ut((()=>a.item(n,o)),[]);let i=zt(n,r,[e.value,e.children,r]),l=Rt(),s=$t((e=>e.value&&e.value===i.current)),d=$t((e=>!1===a.filter()||(!e.search||e.filtered.items.get(n)>0)));function f(){var e,t;null==(t=(e=u.current).onSelect)||t.call(e,i.current)}if(c.useEffect((()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(bt,f),()=>t.removeEventListener(bt,f)}),[d,e.onSelect,e.disabled]),!d)return null;let{disabled:m,value:p,onSelect:v,...h}=e;return c.createElement("div",{ref:Kt([r,t]),...h,"cmdk-item":"",role:"option","aria-disabled":m||void 0,"aria-selected":s||void 0,"data-selected":s||void 0,onPointerMove:m?void 0:function(){l.setState("value",i.current,!0)},onClick:m?void 0:f},e.children)})),At=c.forwardRef(((e,t)=>{let{heading:n,children:r,...o}=e,a=c.useId(),u=c.useRef(null),i=c.useRef(null),l=c.useId(),s=St(),d=$t((e=>!1===s.filter()||(!e.search||e.filtered.groups.has(a))));Ut((()=>s.group(a)),[]),zt(a,u,[e.value,e.heading,i]);let f=c.createElement(Ot.Provider,{value:a},r);return c.createElement("div",{ref:Kt([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&c.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},f))})),Nt=c.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),a=$t((e=>!e.search));return n||a?c.createElement("div",{ref:Kt([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),Mt=c.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=Rt(),u=$t((e=>e.search)),i=St();return c.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),c.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,id:i.inputId,type:"text",value:o?e.value:u,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),Dt=c.forwardRef(((e,t)=>{let{children:n,...r}=e,o=c.useRef(null),a=c.useRef(null),u=St();return c.useEffect((()=>{if(a.current&&o.current){let e,t=a.current,n=o.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.getBoundingClientRect().height;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),c.createElement("div",{ref:Kt([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:u.listId,"aria-labelledby":u.inputId},c.createElement("div",{ref:a,"cmdk-list-sizer":""},n))})),_t=c.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,container:o,...a}=e;return c.createElement(st,{open:n,onOpenChange:r},c.createElement(dt,{container:o},c.createElement(ft,{"cmdk-overlay":""}),c.createElement(mt,{"aria-label":e.label,"cmdk-dialog":""},c.createElement(kt,{ref:t,...a}))))})),Pt=c.forwardRef(((e,t)=>{let n=c.useRef(!0),r=$t((e=>0===e.filtered.count));return c.useEffect((()=>{n.current=!1}),[]),n.current||!r?null:c.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})})),It=c.forwardRef(((e,t)=>{let{progress:n,children:r,...o}=e;return c.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},c.createElement("div",{"aria-hidden":!0},r))})),Tt=Object.assign(kt,{List:Dt,Item:Lt,Input:Mt,Group:At,Separator:Nt,Dialog:_t,Empty:Pt,Loading:It});function jt(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ft(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Wt(e){let t=c.useRef(e);return Ut((()=>{t.current=e})),t}var Ut=typeof window>"u"?c.useEffect:c.useLayoutEffect;function Bt(e){let t=c.useRef();return void 0===t.current&&(t.current=e()),t}function Kt(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function $t(e){let t=Rt(),n=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,n,n)}function zt(e,t,n){let r=c.useRef(),o=St();return Ut((()=>{var a;let c=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim().toLowerCase();if("object"==typeof t&&"current"in t&&t.current)return null==(e=t.current.textContent)?void 0:e.trim().toLowerCase()}})();o.value(e,c),null==(a=t.current)||a.setAttribute(yt,c),r.current=c})),r}var qt=()=>{let[e,t]=c.useState(),n=Bt((()=>new Map));return Ut((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}},Gt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Ht(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ht(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const Vt=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ht(e))&&(r&&(r+=" "),r+=t);return r},Xt=window.wp.data,Yt=window.wp.element,Zt=window.wp.i18n,Jt=window.wp.components,Qt=window.wp.keyboardShortcuts;const en=(0,Yt.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,Yt.cloneElement)(e,{width:t,height:t,...n,ref:r})})),tn=window.wp.primitives,nn=window.ReactJSXRuntime,rn=(0,nn.jsx)(tn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nn.jsx)(tn.Path,{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"})});const on=(0,Xt.combineReducers)({commands:function(e={},t){switch(t.type){case"REGISTER_COMMAND":return{...e,[t.name]:{name:t.name,label:t.label,searchLabel:t.searchLabel,context:t.context,callback:t.callback,icon:t.icon}};case"UNREGISTER_COMMAND":{const{[t.name]:n,...r}=e;return r}}return e},commandLoaders:function(e={},t){switch(t.type){case"REGISTER_COMMAND_LOADER":return{...e,[t.name]:{name:t.name,context:t.context,hook:t.hook}};case"UNREGISTER_COMMAND_LOADER":{const{[t.name]:n,...r}=e;return r}}return e},isOpen:function(e=!1,t){switch(t.type){case"OPEN":return!0;case"CLOSE":return!1}return e},context:function(e="root",t){return"SET_CONTEXT"===t.type?t.context:e}});function an(e){return{type:"REGISTER_COMMAND",...e}}function cn(e){return{type:"UNREGISTER_COMMAND",name:e}}function un(e){return{type:"REGISTER_COMMAND_LOADER",...e}}function ln(e){return{type:"UNREGISTER_COMMAND_LOADER",name:e}}function sn(){return{type:"OPEN"}}function dn(){return{type:"CLOSE"}}const fn=(0,Xt.createSelector)(((e,t=!1)=>Object.values(e.commands).filter((n=>{const r=n.context&&n.context===e.context;return t?r:!r}))),(e=>[e.commands,e.context])),mn=(0,Xt.createSelector)(((e,t=!1)=>Object.values(e.commandLoaders).filter((n=>{const r=n.context&&n.context===e.context;return t?r:!r}))),(e=>[e.commandLoaders,e.context]));function pn(e){return e.isOpen}function vn(e){return e.context}function hn(e){return{type:"SET_CONTEXT",context:e}}const gn=window.wp.privateApis,{lock:En,unlock:bn}=(0,gn.__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/commands"),yn=(0,Xt.createReduxStore)("core/commands",{reducer:on,actions:e,selectors:t});(0,Xt.register)(yn),bn(yn).registerPrivateActions(o);const wn=(0,Zt.__)("Search commands and settings");function Cn({name:e,search:t,hook:n,setLoader:r,close:o}){var a;const{isLoading:c,commands:u=[]}=null!==(a=n({search:t}))&&void 0!==a?a:{};return(0,Yt.useEffect)((()=>{r(e,c)}),[r,e,c]),u.length?(0,nn.jsx)(nn.Fragment,{children:u.map((e=>{var n;return(0,nn.jsx)(Tt.Item,{value:null!==(n=e.searchLabel)&&void 0!==n?n:e.label,onSelect:()=>e.callback({close:o}),id:e.name,children:(0,nn.jsxs)(Jt.__experimentalHStack,{alignment:"left",className:Vt("commands-command-menu__item",{"has-icon":e.icon}),children:[e.icon&&(0,nn.jsx)(en,{icon:e.icon}),(0,nn.jsx)("span",{children:(0,nn.jsx)(Jt.TextHighlight,{text:e.label,highlight:t})})]})},e.name)}))}):null}function Sn({hook:e,search:t,setLoader:n,close:r}){const o=(0,Yt.useRef)(e),[a,c]=(0,Yt.useState)(0);return(0,Yt.useEffect)((()=>{o.current!==e&&(o.current=e,c((e=>e+1)))}),[e]),(0,nn.jsx)(Cn,{hook:o.current,search:t,setLoader:n,close:r},a)}function xn({isContextual:e,search:t,setLoader:n,close:r}){const{commands:o,loaders:a}=(0,Xt.useSelect)((t=>{const{getCommands:n,getCommandLoaders:r}=t(yn);return{commands:n(e),loaders:r(e)}}),[e]);return o.length||a.length?(0,nn.jsxs)(Tt.Group,{children:[o.map((e=>{var n;return(0,nn.jsx)(Tt.Item,{value:null!==(n=e.searchLabel)&&void 0!==n?n:e.label,onSelect:()=>e.callback({close:r}),id:e.name,children:(0,nn.jsxs)(Jt.__experimentalHStack,{alignment:"left",className:Vt("commands-command-menu__item",{"has-icon":e.icon}),children:[e.icon&&(0,nn.jsx)(en,{icon:e.icon}),(0,nn.jsx)("span",{children:(0,nn.jsx)(Jt.TextHighlight,{text:e.label,highlight:t})})]})},e.name)})),a.map((e=>(0,nn.jsx)(Sn,{hook:e.hook,search:t,setLoader:n,close:r},e.name)))]}):null}function Rn({isOpen:e,search:t,setSearch:n}){const r=(0,Yt.useRef)(),o=$t((e=>e.value)),a=(0,Yt.useMemo)((()=>{const e=document.querySelector(`[cmdk-item=""][data-value="${o}"]`);return e?.getAttribute("id")}),[o]);return(0,Yt.useEffect)((()=>{e&&r.current.focus()}),[e]),(0,nn.jsx)(Tt.Input,{ref:r,value:t,onValueChange:n,placeholder:wn,"aria-activedescendant":a,icon:t})}function On(){const{registerShortcut:e}=(0,Xt.useDispatch)(Qt.store),[t,n]=(0,Yt.useState)(""),r=(0,Xt.useSelect)((e=>e(yn).isOpen()),[]),{open:o,close:a}=(0,Xt.useDispatch)(yn),[c,u]=(0,Yt.useState)({}),i=(0,Yt.useRef)();(0,Yt.useEffect)((()=>{e({name:"core/commands",category:"global",description:(0,Zt.__)("Open the command palette."),keyCombination:{modifier:"primary",character:"k"}})}),[e]),(0,Yt.useEffect)((()=>{i.current?.removeAttribute("aria-labelledby"),i.current?.setAttribute("aria-label",(0,Zt.__)("Command suggestions"))}),[i.current]),(0,Qt.useShortcut)("core/commands",(e=>{e.defaultPrevented||(e.preventDefault(),r?a():o())}),{bindGlobal:!0});const l=(0,Yt.useCallback)(((e,t)=>u((n=>({...n,[e]:t})))),[]),s=()=>{n(""),a()};if(!r)return!1;const d=Object.values(c).some(Boolean);return(0,nn.jsx)(Jt.Modal,{className:"commands-command-menu",overlayClassName:"commands-command-menu__overlay",onRequestClose:s,__experimentalHideHeader:!0,contentLabel:(0,Zt.__)("Command palette"),children:(0,nn.jsx)("div",{className:"commands-command-menu__container",children:(0,nn.jsxs)(Tt,{label:wn,onKeyDown:e=>{(e.nativeEvent.isComposing||229===e.keyCode)&&e.preventDefault()},children:[(0,nn.jsxs)("div",{className:"commands-command-menu__header",children:[(0,nn.jsx)(Rn,{search:t,setSearch:n,isOpen:r}),(0,nn.jsx)(en,{icon:rn})]}),(0,nn.jsxs)(Tt.List,{ref:i,children:[t&&!d&&(0,nn.jsx)(Tt.Empty,{children:(0,Zt.__)("No results found.")}),(0,nn.jsx)(xn,{search:t,setLoader:l,close:s,isContextual:!0}),t&&(0,nn.jsx)(xn,{search:t,setLoader:l,close:s})]})]})})})}const kn={};function Ln(e){const{registerCommand:t,unregisterCommand:n}=(0,Xt.useDispatch)(yn),r=(0,Yt.useRef)(e.callback);(0,Yt.useEffect)((()=>{r.current=e.callback}),[e.callback]),(0,Yt.useEffect)((()=>{if(!e.disabled)return t({name:e.name,context:e.context,label:e.label,searchLabel:e.searchLabel,icon:e.icon,callback:(...e)=>r.current(...e)}),()=>{n(e.name)}}),[e.name,e.label,e.searchLabel,e.icon,e.context,e.disabled,t,n])}function An(e){const{registerCommandLoader:t,unregisterCommandLoader:n}=(0,Xt.useDispatch)(yn);(0,Yt.useEffect)((()=>{if(!e.disabled)return t({name:e.name,hook:e.hook,context:e.context}),()=>{n(e.name)}}),[e.name,e.hook,e.context,e.disabled,t,n])}En(kn,{useCommandContext:function(e){const{getContext:t}=(0,Xt.useSelect)(yn),n=(0,Yt.useRef)(t()),{setContext:r}=bn((0,Xt.useDispatch)(yn));(0,Yt.useEffect)((()=>{r(e)}),[e,r]),(0,Yt.useEffect)((()=>{const e=n.current;return()=>r(e)}),[r])}})})(),(window.wp=window.wp||{}).commands=r})();