WordPress/wp-includes/js/dist/commands.min.js

2 lines
48 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
(()=>{"use strict";var e,t,n={},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&r&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((e=>c[e]=()=>n[e]));return c.default=()=>n,o.d(a,c),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var a={};o.r(a),o.d(a,{CommandMenu:()=>Vn,privateApis:()=>qn,store:()=>Fn,useCommand:()=>zn,useCommandLoader:()=>Gn});var c={};o.r(c),o.d(c,{close:()=>Nn,open:()=>An,registerCommand:()=>xn,registerCommandLoader:()=>Rn,unregisterCommand:()=>On,unregisterCommandLoader:()=>kn});var u={};o.r(u),o.d(u,{getCommandLoaders:()=>Mn,getCommands:()=>Ln,getContext:()=>Tn,isOpen:()=>_n});var i={};o.r(i),o.d(i,{setContext:()=>Dn});var l=.999,s=/[\\\/_+.#"@\[\(\{&]/,d=/[\\\/_+.#"@\[\(\{&]/g,f=/[\s-]/,m=/[\s-]/g;function v(e,t,n,r,o,a,c){if(a===t.length)return o===e.length?1:.99;var u=`${o},${a}`;if(void 0!==c[u])return c[u];for(var i,p,h,g,b=r.charAt(a),E=n.indexOf(b,o),y=0;E>=0;)(i=v(e,t,n,r,E+1,a+1,c))>y&&(E===o?i*=1:s.test(e.charAt(E-1))?(i*=.8,(h=e.slice(o,E-1).match(d))&&o>0&&(i*=Math.pow(l,h.length))):f.test(e.charAt(E-1))?(i*=.9,(g=e.slice(o,E-1).match(m))&&o>0&&(i*=Math.pow(l,g.length))):(i*=.17,o>0&&(i*=Math.pow(l,E-o))),e.charAt(E)!==t.charAt(a)&&(i*=.9999)),(i<.1&&n.charAt(E-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(E-1)!==r.charAt(a))&&(.1*(p=v(e,t,n,r,E+1,a+2,c))>i&&(i=.1*p)),i>y&&(y=i),E=n.indexOf(b,E+1);return c[u]=y,y}function p(e){return e.toLowerCase().replace(m," ")}function h(e,t,n){return v(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,p(e),p(t),0,0,{})}function g(){return g=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},g.apply(this,arguments)}const b=window.React;var E=o.t(b,2);function y(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 w(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function C(...e){return(0,b.useCallback)(w(...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,b.useMemo)((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}const x=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?b.useLayoutEffect:()=>{},O=E["useId".toString()]||(()=>{});let R=0;function k(e){const[t,n]=b.useState(O());return x((()=>{e||n((e=>null!=e?e:String(R++)))}),[e]),e||(t?`radix-${t}`:"")}function A(e){const t=(0,b.useRef)(e);return(0,b.useEffect)((()=>{t.current=e})),(0,b.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function N({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=(0,b.useState)(e),[r]=n,o=(0,b.useRef)(r),a=A(t);return(0,b.useEffect)((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,c=a?e:r,u=A(n);return[c,(0,b.useCallback)((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)}),[a,e,o,u])]}const L=window.ReactDOM,M=(0,b.forwardRef)(((e,t)=>{const{children:n,...r}=e,o=b.Children.toArray(n),a=o.find(D);if(a){cons