[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> compose.min.js (source)

   1  /*! This file is auto-generated */
   2  this.wp=this.wp||{},this.wp.compose=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="PD33")}({"1CF3":function(e,t){e.exports=window.wp.dom},GRId:function(e,t){e.exports=window.wp.element},NMb1:function(e,t){e.exports=window.wp.deprecated},PD33:function(e,t,n){"use strict";n.r(t),n.d(t,"createHigherOrderComponent",(function(){return o})),n.d(t,"compose",(function(){return i})),n.d(t,"ifCondition",(function(){return u})),n.d(t,"pure",(function(){return f})),n.d(t,"withGlobalEvents",(function(){return m})),n.d(t,"withInstanceId",(function(){return y})),n.d(t,"withSafeTimeout",(function(){return g})),n.d(t,"withState",(function(){return E})),n.d(t,"useConstrainedTabbing",(function(){return k})),n.d(t,"useCopyOnClick",(function(){return S})),n.d(t,"useCopyToClipboard",(function(){return L})),n.d(t,"__experimentalUseDialog",(function(){return I})),n.d(t,"__experimentalUseDragging",(function(){return F})),n.d(t,"useFocusOnMount",(function(){return R})),n.d(t,"__experimentalUseFocusOutside",(function(){return M})),n.d(t,"useFocusReturn",(function(){return D})),n.d(t,"useInstanceId",(function(){return b})),n.d(t,"useIsomorphicLayoutEffect",(function(){return N})),n.d(t,"useKeyboardShortcut",(function(){return q})),n.d(t,"useMediaQuery",(function(){return U})),n.d(t,"usePrevious",(function(){return G})),n.d(t,"useReducedMotion",(function(){return z})),n.d(t,"useViewportMatch",(function(){return Y})),n.d(t,"useResizeObserver",(function(){return Q})),n.d(t,"useAsyncList",(function(){return ee})),n.d(t,"useWarnOnChange",(function(){return te})),n.d(t,"useDebounce",(function(){return re})),n.d(t,"useThrottle",(function(){return oe})),n.d(t,"useMergeRefs",(function(){return A})),n.d(t,"useRefEffect",(function(){return T})),n.d(t,"__experimentalUseDropZone",(function(){return ce}));var r=n("YLtl");var o=function(e,t){return n=>{const o=e(n),i=n.displayName||n.name||"Component";return o.displayName=`$Object(r.upperFirst)(Object(r.camelCase)(t))}($i})`,o}},i=r.flowRight,c=n("GRId");var u=e=>o(t=>n=>e(n)?Object(c.createElement)(t,n):null,"ifCondition"),a=n("rl8x"),s=n.n(a);var f=o(e=>e.prototype instanceof c.Component?class extends e{shouldComponentUpdate(e,t){return!s()(e,this.props)||!s()(t,this.state)}}:class extends c.Component{shouldComponentUpdate(e){return!s()(e,this.props)}render(){return Object(c.createElement)(e,this.props)}},"pure"),l=n("wx14"),d=n("NMb1"),p=n.n(d);const h=new class{constructor(){this.listeners={},this.handleEvent=this.handleEvent.bind(this)}add(e,t){this.listeners[e]||(window.addEventListener(e,this.handleEvent),this.listeners[e]=[]),this.listeners[e].push(t)}remove(e,t){this.listeners[e]=Object(r.without)(this.listeners[e],t),this.listeners[e].length||(window.removeEventListener(e,this.handleEvent),delete this.listeners[e])}handleEvent(e){Object(r.forEach)(this.listeners[e.type],t=>{t.handleEvent(e)})}};function m(e){return p()("wp.compose.withGlobalEvents",{since:"5.7",alternative:"useEffect"}),o(t=>{class n extends c.Component{constructor(){super(...arguments),this.handleEvent=this.handleEvent.bind(this),this.handleRef=this.handleRef.bind(this)}componentDidMount(){Object(r.forEach)(e,(e,t)=>{h.add(t,this)})}componentWillUnmount(){Object(r.forEach)(e,(e,t)=>{h.remove(t,this)})}handleEvent(t){const n=e[t.type];"function"==typeof this.wrappedRef[n]&&this.wrappedRef[n](t)}handleRef(e){this.wrappedRef=e,this.props.forwardedRef&&this.props.forwardedRef(e)}render(){return Object(c.createElement)(t,Object(l.a)({},this.props.ownProps,{ref:this.handleRef}))}}return Object(c.forwardRef)((e,t)=>Object(c.createElement)(n,{ownProps:e,forwardedRef:t}))},"withGlobalEvents")}const v=new WeakMap;function b(e,t,n=""){return Object(c.useMemo)(()=>{if(n)return n;const r=function(e){const t=v.get(e)||0;return v.set(e,t+1),t}(e);return t?`$t}-$r}`:r},[e])}var y=o(e=>t=>{const n=b(e);return Object(c.createElement)(e,Object(l.a)({},t,{instanceId:n}))},"withInstanceId");var g=o(e=>class extends c.Component{constructor(){super(...arguments),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(e,t){const n=setTimeout(()=>{e(),this.clearTimeout(n)},t);return this.timeouts.push(n),n}clearTimeout(e){clearTimeout(e),this.timeouts=Object(r.without)(this.timeouts,e)}render(){return Object(c.createElement)(e,Object(l.a)({},this.props,{setTimeout:this.setTimeout,clearTimeout:this.clearTimeout}))}},"withSafeTimeout");function E(e={}){return o(t=>class extends c.Component{constructor(){super(...arguments),this.setState=this.setState.bind(this),this.state=e}render(){return Object(c.createElement)(t,Object(l.a)({},this.props,this.state,{setState:this.setState}))}},"withState")}var w=n("RxS6"),O=n("1CF3");var k=function(){return Object(c.useCallback)(e=>{e&&e.addEventListener("keydown",t=>{if(!(t instanceof window.KeyboardEvent))return;if(t.keyCode!==w.TAB)return;const n=O.focus.tabbable.find(e);if(!n.length)return;const r=n[0],o=n[n.length-1];t.shiftKey&&t.target===r?(t.preventDefault(),o.focus()):(t.shiftKey||t.target!==o)&&n.includes(t.target)||(t.preventDefault(),r.focus())})},[])},j=n("sxGJ"),x=n.n(j);function S(e,t,n=4e3){p()("wp.compose.useCopyOnClick",{since:"10.3",plugin:"Gutenberg",alternative:"wp.compose.useCopyToClipboard"});const r=Object(c.useRef)(),[o,i]=Object(c.useState)(!1);return Object(c.useEffect)(()=>{let o;return r.current=new x.a(e.current,{text:()=>"function"==typeof t?t():t}),r.current.on("success",({clearSelection:e,trigger:t})=>{e(),t&&t.focus(),n&&(i(!0),clearTimeout(o),o=setTimeout(()=>i(!1),n))}),()=>{r.current.destroy(),clearTimeout(o)}},[t,n,i]),o}function T(e,t){const n=Object(c.useRef)();return Object(c.useCallback)(t=>{t?n.current=e(t):n.current&&n.current()},t)}function C(e){const t=Object(c.useRef)(e);return t.current=e,t}function L(e,t){const n=C(e),r=C(t);return T(e=>{const t=new x.a(e,{text:()=>"function"==typeof n.current?n.current():n.current});return t.on("success",({clearSelection:t})=>{t(),e.focus(),r.current&&r.current()}),()=>{t.destroy()}},[])}function R(e="firstElement"){const t=Object(c.useRef)(e);return Object(c.useEffect)(()=>{t.current=e},[e]),Object(c.useCallback)(e=>{if(!e||!1===t.current)return;if(e.contains(e.ownerDocument.activeElement))return;let n=e;if("firstElement"===t.current){const t=O.focus.tabbable.find(e)[0];t&&(n=t)}n.focus()},[])}var D=function(e){const t=Object(c.useRef)(),n=Object(c.useRef)(),r=Object(c.useRef)(e);return Object(c.useEffect)(()=>{r.current=e},[e]),Object(c.useCallback)(e=>{if(e){if(t.current=e,n.current)return;n.current=e.ownerDocument.activeElement}else if(n.current){const e=t.current.contains(t.current.ownerDocument.activeElement);if(t.current.isConnected&&!e)return;r.current?r.current():n.current.focus()}},[])};const _=["button","submit"];function M(e){const t=Object(c.useRef)(e);Object(c.useEffect)(()=>{t.current=e},[e]);const n=Object(c.useRef)(!1),o=Object(c.useRef)(),i=Object(c.useCallback)(()=>{clearTimeout(o.current)},[]);Object(c.useEffect)(()=>()=>i(),[]),Object(c.useEffect)(()=>{e||i()},[e,i]);const u=Object(c.useCallback)(e=>{const{type:t,target:o}=e;Object(r.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(r.includes)(_,e.type)}return!1}(o)&&(n.current=!0)},[]),a=Object(c.useCallback)(e=>{e.persist(),n.current||(o.current=setTimeout(()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()},0))},[]);return{onFocus:i,onMouseDown:u,onMouseUp:u,onTouchStart:u,onTouchEnd:u,onBlur:a}}function P(e,t){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function A(e){const t=Object(c.useRef)(),n=Object(c.useRef)(!1),r=Object(c.useRef)([]),o=Object(c.useRef)(e);return o.current=e,Object(c.useLayoutEffect)(()=>{!1===n.current&&e.forEach((e,n)=>{const o=r.current[n];e!==o&&(P(o,null),P(e,t.current))}),r.current=e},e),Object(c.useLayoutEffect)(()=>{n.current=!1}),Object(c.useCallback)(e=>{P(t,e),n.current=!0;const i=e?o.current:r.current;for(const t of i)P(t,e)},[])}var I=function(e){const t=Object(c.useRef)();Object(c.useEffect)(()=>{t.current=e.onClose},[e.onClose]);const n=k(),r=R(),o=D(),i=M(e.onClose);return[A([n,o,r,Object(c.useCallback)(e=>{e&&e.addEventListener("keydown",e=>{e.keyCode===w.ESCAPE&&t.current&&(e.stopPropagation(),t.current())})},[])]),{...i,tabIndex:"-1"}]};var N="undefined"!=typeof window?c.useLayoutEffect:c.useEffect;function F({onDragStart:e,onDragMove:t,onDragEnd:n}){const[r,o]=Object(c.useState)(!1),i=Object(c.useRef)({onDragStart:e,onDragMove:t,onDragEnd:n});N(()=>{i.current.onDragStart=e,i.current.onDragMove=t,i.current.onDragEnd=n},[e,t,n]);const u=Object(c.useCallback)((...e)=>i.current.onDragMove&&i.current.onDragMove(...e),[]),a=Object(c.useCallback)((...e)=>{i.current.onDragEnd&&i.current.onDragEnd(...e),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",a),o(!1)},[]),s=Object(c.useCallback)((...e)=>{i.current.onDragStart&&i.current.onDragStart(...e),document.addEventListener("mousemove",u),document.addEventListener("mouseup",a),o(!0)},[]);return Object(c.useEffect)(()=>()=>{r&&(document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",a))},[r]),{startDrag:s,endDrag:a,isDragging:r}}var H=n("imBb"),K=n.n(H);n("VcSt");var q=function(e,t,{bindGlobal:n=!1,eventName:o="keydown",isDisabled:i=!1,target:u}={}){const a=Object(c.useRef)(t);Object(c.useEffect)(()=>{a.current=t},[t]),Object(c.useEffect)(()=>{if(i)return;const t=new K.a(u?u.current:document);return Object(r.castArray)(e).forEach(e=>{const i=e.split("+"),c=new Set(i.filter(e=>e.length>1)),u=c.has("alt"),s=c.has("shift");if(function(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||Object(r.includes)(["iPad","iPhone"],t)}()&&(1===c.size&&u||2===c.size&&u&&s))throw new Error(`Cannot bind $e}. Alt and Shift+Alt modifiers are reserved for character input.`);t[n?"bindGlobal":"bind"](e,(...e)=>a.current(...e),o)}),()=>{t.reset()}},[e,n,o,u,i])};function U(e){const[t,n]=Object(c.useState)(()=>!(!e||"undefined"==typeof window||!window.matchMedia(e).matches));return Object(c.useEffect)(()=>{if(!e)return;const t=()=>n(window.matchMedia(e).matches);t();const r=window.matchMedia(e);return r.addListener(t),()=>{r.removeListener(t)}},[e]),e&&t}function G(e){const t=Object(c.useRef)(void 0);return Object(c.useEffect)(()=>{t.current=e},[e]),t.current}var z="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0?()=>!0:()=>U("(prefers-reduced-motion: reduce)");const $={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},B={">=":"min-width","<":"max-width"},W={">=":(e,t)=>t>=e,"<":(e,t)=>t<e},V=Object(c.createContext)(null),X=(e,t=">=")=>{const n=Object(c.useContext)(V),r=U(!n&&`($B[t]}: ${$[e]}px)`);return n?W[t]($[e],n):r};X.__experimentalWidthProvider=V.Provider;var Y=X,Z=n("SSiF"),Q=n.n(Z).a,J=n("XI5e");var ee=function(e){const[t,n]=Object(c.useState)([]);return Object(c.useEffect)(()=>{const r=function(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(!t.includes(o))break;n.push(o)}return n}(e,t);n(r);const o=Object(J.createQueue)(),i=t=>()=>{e.length<=t||(n(n=>[...n,e[t]]),o.add({},i(t+1)))};return o.add({},i(r.length)),()=>o.reset()},[e]),t};var te=function(e,t="Change detection"){const n=G(e);Object.entries(null!=n?n:[]).forEach(([n,r])=>{r!==e[n]&&console.warn(`$t}: $n} key changed:`,r,e[n])})},ne=n("mHlH");function re(...e){const t=Object(ne.a)(()=>Object(r.debounce)(...e),e);return Object(c.useEffect)(()=>()=>t.cancel(),[t]),t}function oe(...e){const t=Object(ne.a)(()=>Object(r.throttle)(...e),e);return Object(c.useEffect)(()=>()=>t.cancel(),[t]),t}function ie(e){const t=Object(c.useRef)();return t.current=e,t}function ce({isDisabled:e,onDrop:t,onDragStart:n,onDragEnter:r,onDragLeave:o,onDragEnd:i,onDragOver:c}){const u=ie(t),a=ie(n),s=ie(r),f=ie(o),l=ie(i),d=ie(c);return T(t=>{if(e)return;let n=!1;const{ownerDocument:r}=t;function o(e){n||(n=!0,r.removeEventListener("dragenter",o),r.addEventListener("dragend",m),r.addEventListener("mousemove",m),a.current&&a.current(e))}function i(e){e.preventDefault(),t.contains(e.relatedTarget)||s.current&&s.current(e)}function c(e){!e.defaultPrevented&&d.current&&d.current(e),e.preventDefault()}function p(e){(function(e){if(!e||!t.contains(e))return!1;do{if(e.dataset.isDropZone)return e===t}while(e=e.parentElement);return!1})(e.relatedTarget)||f.current&&f.current(e)}function h(e){e.defaultPrevented||(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length,u.current&&u.current(e),m(e))}function m(e){n&&(n=!1,r.addEventListener("dragenter",o),r.removeEventListener("dragend",m),r.removeEventListener("mousemove",m),l.current&&l.current(e))}return t.dataset.isDropZone="true",t.addEventListener("drop",h),t.addEventListener("dragenter",i),t.addEventListener("dragover",c),t.addEventListener("dragleave",p),r.addEventListener("dragenter",o),()=>{delete t.dataset.isDropZone,t.removeEventListener("drop",h),t.removeEventListener("dragenter",i),t.removeEventListener("dragover",c),t.removeEventListener("dragleave",p),r.removeEventListener("dragend",m),r.removeEventListener("mousemove",m),r.addEventListener("dragenter",o)}},[e])}},RxS6:function(e,t){e.exports=window.wp.keycodes},SSiF:function(e,t,n){var r=n("cDcd"),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},i=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},c=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=c);var t=r.useState(e(null)),n=t[0],o=t[1],u=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(i,{onResize:u})}),[u]),n]}},VcSt:function(e,t){!function(e){if(e){var t={},n=e.prototype.stopCallback;e.prototype.stopCallback=function(e,r,o,i){return!!this.paused||!t[o]&&!t[i]&&n.call(this,e,r,o)},e.prototype.bindGlobal=function(e,n,r){if(this.bind(e,n,r),e instanceof Array)for(var o=0;o<e.length;o++)t[e[o]]=!0;else t[e]=!0},e.init()}}("undefined"!=typeof Mousetrap?Mousetrap:void 0)},XI5e:function(e,t){e.exports=window.wp.priorityQueue},YLtl:function(e,t){e.exports=window.lodash},cDcd:function(e,t){e.exports=window.React},imBb:function(e,t,n){var r;!function(o,i,c){if(o){for(var u,a={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},f={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},l={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},d=1;d<20;++d)a[111+d]="f"+d;for(d=0;d<=9;++d)a[d+96]=d.toString();y.prototype.bind=function(e,t,n){return e=e instanceof Array?e:[e],this._bindMultiple.call(this,e,t,n),this},y.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},y.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function e(t,n){return null!==t&&t!==i&&(t===n||e(t.parentNode,n))}(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},y.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},y.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(a[t]=e[t]);u=null},y.init=function(){var e=y(i);for(var t in e)"_"!==t.charAt(0)&&(y[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},y.init(),o.Mousetrap=y,e.exports&&(e.exports=y),void 0===(r=function(){return y}.call(t,n,t,e))||(e.exports=r)}function p(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function h(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return a[e.which]?a[e.which]:s[e.which]?s[e.which]:String.fromCharCode(e.which).toLowerCase()}function m(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function v(e,t,n){return n||(n=function(){if(!u)for(var e in u={},a)e>95&&e<112||a.hasOwnProperty(e)&&(u[a[e]]=e);return u}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function b(e,t){var n,r,o,i=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),o=0;o<n.length;++o)r=n[o],l[r]&&(r=l[r]),t&&"keypress"!=t&&f[r]&&(r=f[r],i.push("shift")),m(r)&&i.push(r);return{key:r,modifiers:i,action:t=v(r,i,t)}}function y(e){var t=this;if(e=e||i,!(t instanceof y))return new y(e);t.target=e,t._callbacks={},t._directMap={};var n,r={},o=!1,c=!1,u=!1;function a(e){e=e||{};var t,n=!1;for(t in r)e[t]?n=!0:r[t]=0;n||(u=!1)}function s(e,n,o,i,c,u){var a,s,f,l,d=[],p=o.type;if(!t._callbacks[e])return[];for("keyup"==p&&m(e)&&(n=[e]),a=0;a<t._callbacks[e].length;++a)if(s=t._callbacks[e][a],(i||!s.seq||r[s.seq]==s.level)&&p==s.action&&("keypress"==p&&!o.metaKey&&!o.ctrlKey||(f=n,l=s.modifiers,f.sort().join(",")===l.sort().join(",")))){var h=!i&&s.combo==c,v=i&&s.seq==i&&s.level==u;(h||v)&&t._callbacks[e].splice(a,1),d.push(s)}return d}function f(e,n,r,o){t.stopCallback(n,n.target||n.srcElement,r,o)||!1===e(n,r)&&(function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}(n),function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}(n))}function l(e){"number"!=typeof e.which&&(e.which=e.keyCode);var n=h(e);n&&("keyup"!=e.type||o!==n?t.handleKey(n,function(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}(e),e):o=!1)}function d(e,t,i,c){function s(t){return function(){u=t,++r[e],clearTimeout(n),n=setTimeout(a,1e3)}}function l(t){f(i,t,e),"keyup"!==c&&(o=h(t)),setTimeout(a,10)}r[e]=0;for(var d=0;d<t.length;++d){var p=d+1===t.length?l:s(c||b(t[d+1]).action);v(t[d],p,c,e,d)}}function v(e,n,r,o,i){t._directMap[e+":"+r]=n;var c,u=(e=e.replace(/\s+/g," ")).split(" ");u.length>1?d(e,u,n,r):(c=b(e,r),t._callbacks[c.key]=t._callbacks[c.key]||[],s(c.key,c.modifiers,{type:c.action},o,e,i),t._callbacks[c.key][o?"unshift":"push"]({callback:n,modifiers:c.modifiers,action:c.action,seq:o,level:i,combo:e}))}t._handleKey=function(e,t,n){var r,o=s(e,t,n),i={},l=0,d=!1;for(r=0;r<o.length;++r)o[r].seq&&(l=Math.max(l,o[r].level));for(r=0;r<o.length;++r)if(o[r].seq){if(o[r].level!=l)continue;d=!0,i[o[r].seq]=1,f(o[r].callback,n,o[r].combo,o[r].seq)}else d||f(o[r].callback,n,o[r].combo);var p="keypress"==n.type&&c;n.type!=u||m(e)||p||a(i),c=d&&"keydown"==n.type},t._bindMultiple=function(e,t,n){for(var r=0;r<e.length;++r)v(e[r],t,n)},p(e,"keypress",l),p(e,"keydown",l),p(e,"keyup",l)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},mHlH:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("cDcd");function o(e,t){var n=Object(r.useState)((function(){return{inputs:t,result:e()}}))[0],o=Object(r.useRef)(!0),i=Object(r.useRef)(n),c=o.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return Object(r.useEffect)((function(){o.current=!1,i.current=c}),[c]),c.result}},rl8x:function(e,t){e.exports=window.wp.isShallowEqual},sxGJ:function(e,t,n){
   3  /*!
   4   * clipboard.js v2.0.8
   5   * https://clipboardjs.com/
   6   *
   7   * Licensed MIT © Zeno Rocha
   8   */
   9  var r;r=function(){return function(){var e={134:function(e,t,n){"use strict";n.d(t,{default:function(){return g}});var r=n(279),o=n.n(r),i=n(370),c=n.n(i),u=n(817),a=n.n(u);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}var t,n,r;return t=e,(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=a()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=a()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==s(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}])&&f(t.prototype,n),r&&f(t,r),e}();function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(i,e);var t,n,r,o=m(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this)).resolveOptions(t),n.listenClick(e),n}return t=i,r=[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=c()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return y("action",e)}},{key:"defaultTarget",value:function(e){var t=y("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return y("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&p(t.prototype,n),r&&p(t,r),i}(o())},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var c=i.apply(this,arguments);return e.addEventListener(n,c,o),{destroy:function(){e.removeEventListener(n,c,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,c=r.length;i<c;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(134)}().default},e.exports=r()},wx14:function(e,t,n){"use strict";function r(){return(r=Object.assign||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}).apply(this,arguments)}n.d(t,"a",(function(){return r}))}});


Generated: Tue Sep 21 01:00:05 2021 Cross-referenced by PHPXref 0.7.1