From e63b7504abe9eb3ebe056e503bf87cb468f9d5d5 Mon Sep 17 00:00:00 2001 From: Miguel Axcar Date: Thu, 7 Dec 2023 17:12:08 -0300 Subject: [PATCH] Build version v1.7.2 --- build/editor.js | 2 +- build/editorStyles.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/editor.js b/build/editor.js index d114a70..7fe38ae 100644 --- a/build/editor.js +++ b/build/editor.js @@ -1 +1 @@ -!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}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=175)}([function(e,t,n){e.exports=n(70)()},function(e,t){e.exports=wp},function(e,t){e.exports=React},function(e,t){e.exports=wp.element},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(73),o=n(74),a=n(43),i=n(75);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(76),o=n(77),a=n(43),i=n(78);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(17),o=n(19);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(14),o=n(36),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(a.Component);m.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.default=m},function(e,t,n){"use strict";var r=n(168),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(m){var o=d(n);o&&o!==m&&e(t,o,r)}var i=c(n);p&&(i=i.concat(p(n)));for(var s=u(t),h=u(n),v=0;ve.length)&&(t=e.length);for(var n=0,r=new Array(t);nc))return!1;var f=u.get(e),d=u.get(t);if(f&&d)return f==t&&d==e;var m=-1,h=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++m-1&&e%1==0&&e=200){var h=t?null:s(e);if(h)return u(h);f=!1,c=i,m=new r}else m=t?[]:d;e:for(;++l-1}},function(e,t,n){var r=n(22);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(21);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(21),o=n(30),a=n(32);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(45),o=n(94),a=n(31),i=n(47),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:s).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(18),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(u){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(95),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(13)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(98),o=n(21),a=n(30);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(99),o=n(100),a=n(101),i=n(102),s=n(103);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&a(c)?n>1?e(c,n-1,a,i,s):r(s,c):i||(s[s.length]=c)}return s}},function(e,t,n){var r=n(18),o=n(34),a=n(14),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||o(e)||!!(i&&e&&e[i])}},function(e,t,n){var r=n(140);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(141),o=n(142),a=n(143);e.exports=function(e,t,n){return t===t?a(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(169)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case i:case u:case s:case m:return e;default:switch(e=e&&e.$$typeof){case c:case d:case b:case v:case l:return e;default:return t}}case a:return t}}}function S(e){return w(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Lazy=b,t.Memo=v,t.Portal=a,t.Profiler=u,t.StrictMode=s,t.Suspense=m,t.isAsyncMode=function(e){return S(e)||w(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===b},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===u},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===m},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===f||e===u||e===s||e===m||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===O||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},function(e,t,n){var r=n(171),o=n(29),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];a.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(172);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(16),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=e.length,a=t.length,i={};++r0?Se(De,--Re):0,ke--,10===Ie&&(ke=1,Me--),Ie}function Ve(){return Ie=Re2||He(Ie)>3?"":" "}function Ye(e,t){for(;--t&&Ve()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return Ue(e,ze()+(t<6&&32==Ne()&&32==Ve()))}function Ge(e){for(;Ve();)switch(Ie){case e:return Re;case 34:case 39:34!==e&&39!==e&&Ge(Ie);break;case 40:41===e&&Ge(e);break;case 92:Ve()}return Re}function Xe(e,t){for(;Ve()&&e+Ie!==57&&(e+Ie!==84||47!==Ne()););return"/*"+Ue(t,Re-1)+"*"+ge(47===e?e:Ve())}function Ke(e){for(;!He(Ne());)Ve();return Ue(e,Re)}function Qe(e){return qe(Ze("",null,null,null,[""],e=Be(e),0,[0],e))}function Ze(e,t,n,r,o,a,i,s,u){for(var l=0,c=0,p=i,f=0,d=0,m=0,h=1,v=1,b=1,g=0,y="",O=o,x=a,w=r,S=y;v;)switch(m=g,g=Ve()){case 40:if(108!=m&&58==S.charCodeAt(p-1)){-1!=we(S+=xe($e(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=$e(g);break;case 9:case 10:case 13:case 32:S+=We(m);break;case 92:S+=Ye(ze()-1,7);continue;case 47:switch(Ne()){case 42:case 47:Ce(et(Xe(Ve(),ze()),t,n),u);break;default:S+="/"}break;case 123*h:s[l++]=je(S)*b;case 125*h:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+c:d>0&&je(S)-p&&Ce(d>32?tt(S+";",r,n,p-1):tt(xe(S," ","")+";",r,n,p-2),u);break;case 59:S+=";";default:if(Ce(w=Je(S,t,n,l,c,o,s,y,O=[],x=[],p),a),123===g)if(0===c)Ze(S,t,w,w,O,a,p,s,x);else switch(f){case 100:case 109:case 115:Ze(e,w,w,r&&Ce(Je(e,w,w,0,0,o,s,y,o,O=[],p),x),o,x,p,s,r?O:x);break;default:Ze(S,w,w,w,[""],x,0,s,x)}}l=c=d=0,h=b=1,y=S="",p=i;break;case 58:p=1+je(S),d=m;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==Le())continue;switch(S+=ge(g),g*h){case 38:b=c>0?1:(S+="\f",-1);break;case 44:s[l++]=(je(S)-1)*b,b=1;break;case 64:45===Ne()&&(S+=$e(Ve())),f=Ne(),c=p=je(y=S+=Ke(ze())),g++;break;case 45:45===m&&2==je(S)&&(h=0)}}return a}function Je(e,t,n,r,o,a,i,s,u,l,c){for(var p=o-1,f=0===o?a:[""],d=Ee(f),m=0,h=0,v=0;m0?f[b]+" "+g:xe(g,/&\f/g,f[b])))&&(u[v++]=y);return Fe(e,t,n,0===o?me:s,u,l,c)}function et(e,t,n){return Fe(e,t,n,de,ge(Ie),Pe(e,2,-2),0)}function tt(e,t,n,r){return Fe(e,t,n,he,Pe(e,0,r),Pe(e,r+1,-1),r)}function nt(e,t){switch(function(e,t){return(((t<<2^Se(e,0))<<2^Se(e,1))<<2^Se(e,2))<<2^Se(e,3)}(e,t)){case 5103:return"-webkit-print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fe+e+pe+e+ce+e+e;case 6828:case 4268:return fe+e+ce+e+e;case 6165:return fe+e+ce+"flex-"+e+e;case 5187:return fe+e+xe(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return fe+e+ce+"flex-item-"+xe(e,/flex-|-self/,"")+e;case 4675:return fe+e+ce+"flex-line-pack"+xe(e,/align-content|flex-|-self/,"")+e;case 5548:return fe+e+ce+xe(e,"shrink","negative")+e;case 5292:return fe+e+ce+xe(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+xe(e,"-grow","")+fe+e+ce+xe(e,"grow","positive")+e;case 4554:return fe+xe(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return xe(xe(xe(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return xe(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return xe(xe(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+fe+e+e;case 4095:case 3583:case 4068:case 2532:return xe(e,/(.+)-inline(.+)/,"-webkit-$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(je(e)-1-t>6)switch(Se(e,t+1)){case 109:if(45!==Se(e,t+4))break;case 102:return xe(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+pe+(108==Se(e,t+3)?"$3":"$2-$3"))+e;case 115:return~we(e,"stretch")?nt(xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Se(e,t+1))break;case 6444:switch(Se(e,je(e)-3-(~we(e,"!important")&&10))){case 107:return xe(e,":",":-webkit-")+e;case 101:return xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===Se(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+ce+"$2box$3")+e}break;case 5936:switch(Se(e,t+11)){case 114:return fe+e+ce+xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fe+e+ce+xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fe+e+ce+xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fe+e+ce+e+e}return e}function rt(e,t){for(var n="",r=Ee(e),o=0;o-1&&!e.return)switch(e.type){case he:e.return=nt(e.value,e.length);break;case ve:return rt([Ae(e,{value:xe(e.value,"@","@-webkit-")})],r);case me:if(e.length)return _e(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rt([Ae(e,{props:[xe(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return rt([Ae(e,{props:[xe(t,/:(plac\w+)/,":-webkit-input-$1")]}),Ae(e,{props:[xe(t,/:(plac\w+)/,":-moz-$1")]}),Ae(e,{props:[xe(t,/:(plac\w+)/,ce+"input-$1")]})],r)}return""}))}}],dt=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ft;var o,a,i={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},gt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yt=/[A-Z]|^ms/g,Ot=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xt=function(e){return 45===e.charCodeAt(1)},wt=function(e){return null!=e&&"boolean"!==typeof e},St=it((function(e){return xt(e)?e:e.replace(yt,"-$&").toLowerCase()})),Pt=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(Ot,(function(e,t,n){return Et={name:t,styles:n,next:Et},t}))}return 1===gt[e]||xt(e)||"number"!==typeof t||0===t?t:t+"px"};function jt(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Et={name:n.name,styles:n.styles,next:Et},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Et={name:r.name,styles:r.styles,next:Et},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Yt(e){return Yt="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},Yt(e)}var Gt=n(39),Xt=n.n(Gt);function Kt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qt(e,t){for(var n=0;n-1}function hn(e){return mn(e)?window.pageYOffset:e.scrollTop}function vn(e,t){mn(e)?window.scrollTo(0,t):e.scrollTop=t}function bn(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function gn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ln,o=hn(e),a=t-o,i=10,s=0;function u(){var t=bn(s+=i,o,a,n);vn(e,t),s=d)return{placement:"bottom",maxHeight:t};if(S>=d&&!i)return a&&gn(u,P,E),{placement:"bottom",maxHeight:t};if(!i&&S>=r||i&&x>=r)return a&&gn(u,P,E),{placement:"bottom",maxHeight:i?x-g:S-g};if("auto"===o||i){var C=t,_=i?O:w;return _>=r&&(C=Math.min(_-g-s.controlHeight,t)),{placement:"top",maxHeight:C}}if("bottom"===o)return a&&vn(u,P),{placement:"bottom",maxHeight:t};break;case"top":if(O>=d)return{placement:"top",maxHeight:t};if(w>=d&&!i)return a&&gn(u,j,E),{placement:"top",maxHeight:t};if(!i&&w>=r||i&&O>=r){var M=t;return(!i&&w>=r||i&&O>=r)&&(M=i?O-y:w-y),a&&gn(u,j,E),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var jn=function(e){return"auto"===e?"bottom":e},En=Object(i.createContext)({getPortalPlacement:null}),Cn=function(e){en(n,e);var t=un(n);function n(){var e;Kt(this,n);for(var r=arguments.length,o=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,h=p-f-l,v=!1;h>t&&s.current&&(r&&r(e),s.current=!1),m&&u.current&&(a&&a(e),u.current=!1),m&&t>h?(n&&!s.current&&n(e),d.scrollTop=p,v=!0,s.current=!0):!m&&-t>l&&(o&&!u.current&&o(e),d.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),f=Object(i.useCallback)((function(e){p(e,e.deltaY)}),[p]),d=Object(i.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),m=Object(i.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;p(e,t)}),[p]),h=Object(i.useCallback)((function(e){if(e){var t=!!Sn&&{passive:!1};"function"===typeof e.addEventListener&&e.addEventListener("wheel",f,t),"function"===typeof e.addEventListener&&e.addEventListener("touchstart",d,t),"function"===typeof e.addEventListener&&e.addEventListener("touchmove",m,t)}}),[m,d,f]),v=Object(i.useCallback)((function(e){e&&("function"===typeof e.removeEventListener&&e.removeEventListener("wheel",f,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchstart",d,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchmove",m,!1))}),[m,d,f]);return Object(i.useEffect)((function(){if(t){var e=c.current;return h(e),function(){v(e)}}}),[t,h,v]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=Object(i.useRef)({}),a=Object(i.useRef)(null),s=Object(i.useCallback)((function(e){if(jr){var t=document.body,n=t&&t.style;if(r&&yr.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&Er<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,s=window.innerWidth-i+a||0;Object.keys(Or).forEach((function(e){var t=Or[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Pr()&&(t.addEventListener("touchmove",xr,Cr),e&&(e.addEventListener("touchstart",Sr,Cr),e.addEventListener("touchmove",wr,Cr))),Er+=1}}),[]),u=Object(i.useCallback)((function(e){if(jr){var t=document.body,n=t&&t.style;Er=Math.max(Er-1,0),r&&Er<1&&yr.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Pr()&&(t.removeEventListener("touchmove",xr,Cr),e&&(e.removeEventListener("touchstart",Sr,Cr),e.removeEventListener("touchmove",wr,Cr)))}}),[]);return Object(i.useEffect)((function(){if(t){var e=a.current;return s(e),function(){u(e)}}}),[t,s,u]),function(e){a.current=e}}({isEnabled:n});return zt(s.a.Fragment,null,n&&zt("div",{onClick:_r,css:Mr}),t((function(e){o(e),a(e)})))}var Tr={clearIndicator:Bn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Hn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:kn,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return tn(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),tn(t,"backgroundColor",i.neutral0),tn(t,"borderRadius",o),tn(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),tn(t,"marginBottom",a.menuGutter),tn(t,"marginTop",a.menuGutter),tn(t,"position","absolute"),tn(t,"width","100%"),tn(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Mn,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{label:"option",backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?i.primary:i.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Rr,Ir={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Dr={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:yn(),captureMenuScroll:!yn(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=on({ignoreCase:!0,ignoreAccents:!0,stringify:br,trim:!0,matchFrom:"any"},Rr),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,s=n.matchFrom,u=i?vr(t):t,l=i?vr(a(e)):a(e);return r&&(u=u.toLowerCase(),l=l.toLowerCase()),o&&(u=hr(u),l=mr(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(ce){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Fr(e,t,n,r){return{type:"option",data:t,isDisabled:Ur(e,t,n),isSelected:Hr(e,t,n),label:Nr(e,t),value:zr(e,t),index:r}}function Ar(e,t){return e.options.map((function(n,r){if(n.options){var o=n.options.map((function(n,r){return Fr(e,n,t,r)})).filter((function(t){return Vr(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=Fr(e,n,t,r);return Vr(e,a)?a:void 0})).filter((function(e){return!!e}))}function Lr(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,er(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Vr(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,s=t.value;return(!qr(e)||!a)&&Br(e,{label:i,value:s,data:o},r)}var Nr=function(e,t){return e.getOptionLabel(t)},zr=function(e,t){return e.getOptionValue(t)};function Ur(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Hr(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=zr(e,t);return n.some((function(t){return zr(e,t)===r}))}function Br(e,t,n){return!e.filterOption||e.filterOption(t,n)}var qr=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},$r=1,Wr=function(e){en(n,e);var t=un(n);function n(e){var r;return Kt(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,o=r.props,a=o.closeMenuOnSelect,i=o.isMulti;r.onInputChange("",{action:"set-value"}),a&&(r.setState({inputIsHiddenAfterUpdate:!i}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,a=t.name,i=r.state.selectValue,s=o&&r.isOptionSelected(e,i),u=r.isOptionDisabled(e,i);if(s){var l=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==l})),"deselect-option",e)}else{if(u)return void r.ariaOnChange(e,{action:"select-option",name:a});o?r.setValue([].concat(er(i),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),a=n.filter((function(e){return r.getOptionValue(e)!==o})),i=t?a:a[0]||null;r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),a=e?o:o[0]||null;r.onChange(a,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return qr(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=r.state,m=d.focusedOption,h=d.focusedValue,v=d.selectValue;if(!u&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!p||!m||f&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(l){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(i)return;if(!l){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++$r),r.state.selectValue=fn(e.value),r}return Zt(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(!function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?vn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o-1&&(i=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Ir):on(on({},Ir),this.props.theme):Ir}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,a=this.setValue,i=this.props,s=i.isMulti,u=i.isRtl,l=i.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:o,selectProps:i,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Ur(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Hr(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Br(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=e.form,u=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,p=r||this.getElementId("input"),f={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?s.a.createElement(u,ue({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},f)):s.a.createElement(gr,ue({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ln,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,form:i,value:""},f))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,l=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,m=c.inputValue,h=c.placeholder,v=this.state,b=v.selectValue,g=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!p)return m?null:s.a.createElement(u,ue({},l,{key:"placeholder",isDisabled:f,isFocused:y}),h);if(d){var O=b.map((function(t,i){var u=t===g;return s.a.createElement(n,ue({},l,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:f,key:"".concat(e.getOptionValue(t)).concat(i),index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return O}if(m)return null;var x=b[0];return s.a.createElement(i,ue({},l,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return s.a.createElement(e,ue({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return s.a.createElement(e,ue({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return s.a.createElement(n,ue({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return s.a.createElement(e,ue({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,p=this.commonProps,f=this.state.focusedOption,d=this.props,m=d.captureMenuScroll,h=d.inputValue,v=d.isLoading,b=d.loadingMessage,g=d.minMenuHeight,y=d.maxMenuHeight,O=d.menuIsOpen,x=d.menuPlacement,w=d.menuPosition,S=d.menuPortalTarget,P=d.menuShouldBlockScroll,j=d.menuShouldScrollIntoView,E=d.noOptionsMessage,C=d.onMenuScrollToTop,_=d.onMenuScrollToBottom;if(!O)return null;var M,k=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,u=t.label,l=t.value,d=f===o,m=a?void 0:function(){return e.onOptionHover(o)},h=a?void 0:function(){return e.selectOption(o)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1};return s.a.createElement(c,ue({},p,{innerProps:b,data:o,isDisabled:a,isSelected:i,key:v,label:u,type:r,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,u="".concat(e.getElementId("group"),"-").concat(i),l="".concat(u,"-heading");return s.a.createElement(n,ue({},p,{key:u,data:o,options:a,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return k(e,"".concat(i,"-").concat(e.index))})))}if("option"===t.type)return k(t,"".concat(t.index))}));else if(v){var T=b({inputValue:h});if(null===T)return null;M=s.a.createElement(u,p,T)}else{var R=E({inputValue:h});if(null===R)return null;M=s.a.createElement(l,p,R)}var I={minMenuHeight:g,maxMenuHeight:y,menuPlacement:x,menuPosition:w,menuShouldScrollIntoView:j},D=s.a.createElement(Cn,ue({},p,I),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return s.a.createElement(o,ue({},p,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),s.a.createElement(kr,{captureEnabled:m,onTopArrive:C,onBottomArrive:_,lockEnabled:P},(function(t){return s.a.createElement(a,ue({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:v,maxHeight:u,focusedOption:f}),M)})))}));return S||"fixed"===w?s.a.createElement(i,ue({},p,{appendTo:S,controlElement:this.controlRef,menuPlacement:x,menuPosition:w}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map((function(t){return e.getOptionValue(t)})).join(n);return s.a.createElement("input",{name:a,type:"hidden",value:u})}var l=i.length>0?i.map((function(t,n){return s.a.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):s.a.createElement("input",{name:a,type:"hidden"});return s.a.createElement("div",null,l)}var c=i[0]?this.getOptionValue(i[0]):"";return s.a.createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,i=t.selectValue,u=this.getFocusableOptions();return s.a.createElement(sr,ue({},e,{ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:u}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,l=a.isDisabled,c=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.a.createElement(r,ue({},f,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),s.a.createElement(t,ue({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:c}),s.a.createElement(o,ue({},f,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),s.a.createElement(n,ue({},f,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=e.options,i=e.value,s=e.menuIsOpen,u=e.inputValue,l={};if(n&&(i!==n.value||a!==n.options||s!==n.menuIsOpen||u!==n.inputValue)){var c=fn(i),p=s?function(e,t){return Lr(Ar(e,t))}(e,c):[],f=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,p);l={selectValue:c,focusedOption:d,focusedValue:f,clearFocusValueOnUpdate:!1}}var m=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{};return on(on(on({},l),m),{},{prevProps:e})}}]),n}(i.Component);Wr.defaultProps=Dr;var Yr={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Gr=(n(165),n(167),n(41),i.Component,function(e){var t,n;return n=t=function(t){en(r,t);var n=un(r);function r(){var e;Kt(this,r);for(var t=arguments.length,o=new Array(t),a=0;a1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:["x-wp-totalpages"];return new Promise((function(n){oo(ro(ro({},e),{},{parse:!1})).then((function(e){return Promise.all([e.json?e.json():[],to()(t,t.map((function(t){return e.headers.get(t)})))])})).then((function(e){return n(e)})).catch((function(){}))}))};function uo(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(ce){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 U()(this,n)}}var lo=wp.url.addQueryArgs,co=wp.i18n,po=co.sprintf,fo=co.__,mo=wp.hooks.applyFilters,ho=function(e){N()(n,e);var t=uo(n);function n(e){var r;return I()(this,n),(r=t.call(this,e)).state={options:[],isLoading:!1,page:1,hasMore:!1,value:[]},r}return F()(n,[{key:"componentDidMount",value:function(){this.fetchPostAbortController=new AbortController,this.fetchTerms()}},{key:"componentWillUnmount",value:function(){this.fetchPostAbortController&&this.fetchPostAbortController.abort()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.restBase,n=this.state,r=n.page,o=n.options,a=n.search,i={page:r,per_page:10},s=mo("hmGbTools.termSelect.searchMinLength",3);a&&a.length>=s&&(i.search=a),this.setState({isLoading:!0}),i=mo("hmGbTools.termSelect.query",i),so({path:lo("wp/v2/".concat(t,"/"),i),signal:this.fetchPostAbortController.signal}).then((function(t){var n=Q()(t,2),a=n[0],i=n[1],s=e.props.value,u=se()([].concat(X()(o),X()(a.map((function(e){return{value:e.id,label:e.name}})))),"value"),l=s.map((function(e){return u.find((function(t){return t.value===e}))})).filter(Boolean);e.setState({options:u,hasMore:parseInt(i["x-wp-totalpages"],10)>r,isLoading:!1,value:l})}))}},{key:"fetchMoreTerms",value:function(){var e=this,t=this.state,n=t.page,r=t.hasMore,o=t.isLoading;r&&!o&&this.setState({page:n+1},(function(){return e.fetchTerms()}))}},{key:"updateSearch",value:function(e){var t=this,n=mo("hmGbTools.termSelect.searchMinLength",3);e.length>=n&&this.setState({search:e,page:1},(function(){return t.fetchTerms()}))}},{key:"handleChange",value:function(e){var t=this.props.onChange;this.setState({search:null,page:1,value:e}),t((e||[]).map((function(e){return e.value})))}},{key:"render",value:function(){var e=this,t=po(fo("Filter by %s","hm-gb-tools"),this.props.label);return wp.element.createElement(Jr,P()({},this.props,this.state,{fieldId:this.props.fieldId,label:t,placeholder:t,onChange:function(t){return e.handleChange(t)},onFetchMoreTerms:function(){return e.fetchMoreTerms()},onUpdateSearch:function(t){return e.updateSearch(t)}}))}}]),n}(s.a.Component);ho.defaultProps={value:[]},ho.propTypes={fieldId:a.a.string.isRequired,label:a.a.string.isRequired,restBase:a.a.string.isRequired,value:a.a.arrayOf(a.a.number),onChange:a.a.func.isRequired};var vo=ho,bo=n(15);function go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var yo=function(e){var t=e.dateId,n=e.description,r=e.setErrorMessage,o=e.value,a=e.onUpdateDateFilter,i=function(e){r("");var n=function(e){for(var t=1;ts&&(r("The published after date cannot be after the published before date."),i=null);break;case"before":i.setHours(23,59,59);var u=o.after?new Date(o.after):null;u&&i1&&l.a.element.createElement(Jr,{fieldId:"".concat(t,"-post-type"),label:To("Filter by Post Type","hm-gb-tools"),options:a.map((function(e){return{label:e.labels.name,value:e.slug}})),placeholder:To("Filter by Post Type","hm-gb-tools"),onChange:function(e){return s(Mo(Mo({},n),{},{type:e.map((function(e){return e.value}))}))}}),o.map((function(e){return l.a.element.createElement(vo,{key:"term-filter-".concat(e.slug),fieldId:"".concat(t,"-").concat(e.slug),label:e.labels.name,restBase:e.rest_base,value:n[e.rest_base],onChange:function(t){return s(Mo(Mo({},n),{},$()({},e.rest_base,t)))}})})),l.a.element.createElement(Jr,{key:"status-filter",fieldId:"".concat(t,"-status"),label:To("Filter by Status","hm-gb-tools"),options:Object.entries(Ro).map((function(e){var t=Q()(e,2),n=t[0],r=t[1];return{label:r.charAt(0).toUpperCase()+r.slice(1),value:n}})),placeholder:To("Filter by Status","hm-gb-tools"),onChange:function(e){return s(Mo(Mo({},n),{},{status:e.map((function(e){return e.value}))}))}}),l.a.element.createElement(ko,{isPrimary:!0,type:"submit"},"Filter Posts"))};Io.defaultProps={value:{},terms:[]},Io.propTypes={value:a.a.objectOf(a.a.oneOfType([a.a.arrayOf(a.a.number),a.a.string])),onUpdateFilters:a.a.func.isRequired,terms:a.a.arrayOf(a.a.object)};var Do=Io;function Fo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t0?l.a.element.createElement("ol",{className:"post-list"},n.map((function(e){return l.a.element.createElement(Ko,{key:e.id,isSelected:o.findIndex((function(t){return t.id===e.id}))>=0,post:e,postType:e.type,onToggleSelected:function(){return a(e)}})}))):l.a.element.createElement("p",{className:"no-results"},Qo("No results found.")),c&&l.a.element.createElement(Zo,{className:"next-page",onClick:function(){return f()}},"Next page"))))};ea.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postTypes:a.a.arrayOf(a.a.string).isRequired,selection:a.a.array,onToggleSelected:a.a.func.isRequired,termFilters:a.a.arrayOf(a.a.string),hasPrev:a.a.bool.isRequired,hasMore:a.a.bool.isRequired,onPrevPostsPage:a.a.func.isRequired,onNextPostsPage:a.a.func.isRequired,onApplyFilters:a.a.func.isRequired};var ta=ea;function na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ra(e){for(var t=1;t1,isLoading:!1})})).catch((function(){}))}}},{key:"render",value:function(){var e=this,t=this.state,n=t.filters,r=t.posts,o=t.hasPrev,a=t.hasMore,i=t.isLoading,s=this.props,u=s.selection,l=s.onToggleSelected,c=s.termFilters,p=s.postType,f=s.showDateFilters;return wp.element.createElement(ta,{filters:n,hasMore:a,hasPrev:o,isLoading:i,posts:r,postTypes:Array.isArray(p)?p:[p],selection:u,showDateFilters:f,termFilters:c,onApplyFilters:function(t){return e.applyFilters(t)},onNextPostsPage:function(){return e.nextPage()},onPrevPostsPage:function(){return e.prevPage()},onToggleSelected:l})}},{key:"nextPage",value:function(){var e=this;this.setState({page:this.state.page+1},(function(){return e.fetchPosts()}))}},{key:"prevPage",value:function(){var e=this;this.setState({page:this.state.page-1},(function(){return e.fetchPosts()}))}},{key:"applyFilters",value:function(e){var t=this,n=this.state,r=n.filters,o=n.page,a=!J()(r,e);this.setState({filters:e,page:a?1:o},(function(){return t.fetchPosts()}))}}]),n}(s.a.Component);sa.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postType:a.a.arrayOf(a.a.string).isRequired,selection:a.a.arrayOf(a.a.object).isRequired,onToggleSelected:a.a.func.isRequired,termFilters:a.a.arrayOf(a.a.string)};var ua=sa,la=l.a.i18n.__,ca=l.a.components.Button,pa=function(e){var t=e.modalTitle,n=e.onClose,r=e.modalRef,o=e.modalContent,a=e.modalToolbar;return l.a.element.createElement("div",{className:"post-select post-select-modal"},l.a.element.createElement("div",{className:"media-modal-backdrop"}),l.a.element.createElement("div",{ref:r,"aria-labelledby":"media-modal-title","aria-modal":"true",className:"modal media-modal wp-core-ui",role:"dialog",tabIndex:"-1",onKeyDown:function(e){return 27===e.keyCode&&n()}},l.a.element.createElement(ca,{className:"media-modal-close",onClick:function(){return n()}},l.a.element.createElement("span",{className:"media-modal-icon"},l.a.element.createElement("span",{className:"screen-reader-text"},la("Close modal","hm-gb-tools")))),l.a.element.createElement("div",{className:"media-frame-title"},l.a.element.createElement("h1",{id:"media-modal-title"},t)),l.a.element.createElement("div",{className:"media-modal-content"},o),l.a.element.createElement("div",{className:"media-frame-toolbar"},l.a.element.createElement("div",{className:"media-toolbar"},a))))};pa.propTypes={onClose:a.a.func.isRequired,modalTitle:a.a.string.isRequired,modalContent:a.a.node.isRequired,modalToolbar:a.a.node.isRequired,modalRef:a.a.node.isRequired};var fa=pa,da=l.a.components,ma=da.Button,ha=da.Dashicon,va=function(e){var t=e.text,n=e.icon,r=e.onClick,o=e.disabled;return l.a.element.createElement(ma,{className:"post-list-item-remove",disabled:o,isSmall:!0,onClick:r},l.a.element.createElement(ha,{icon:n}),l.a.element.createElement("span",{className:"screen-reader-text"},t))};va.propTypes={id:a.a.string.isRequired,text:a.a.string.isRequired,icon:a.a.string.isRequired,onClick:a.a.func.isRequired,disabled:a.a.bool},va.defaultProps={disabled:!1};var ba=va,ga=l.a.components.Spinner,ya=l.a.i18n.__,Oa=function(e){var t=e.post,n=e.thumbnail,r=e.author,o=e.postTypeObject,a=e.isSelected,s=e.actions;return l.a.element.createElement("li",{className:Ho()("post-list-item post-list-item--selection",{"post-list-item--selected":a,"post-list-item--has-thumbnail":n})},t?l.a.element.createElement(i.Fragment,null,n?l.a.element.createElement("img",{alt:t.title.rendered,className:"post-list-item--image",src:n.media_details.sizes.thumbnail.source_url}):"",l.a.element.createElement("div",{className:"post-list-item--inner"},l.a.element.createElement("h2",{dangerouslySetInnerHTML:{__html:t.title.rendered}}),l.a.element.createElement("div",{className:"post-list-item--meta"},o&&l.a.element.createElement("span",null,l.a.element.createElement("b",null,ya("Type:","hm-gb-tools"))," ",o.labels.singular_name),l.a.element.createElement("span",null,l.a.element.createElement("b",null,ya("Status:","hm-gb-tools"))," ",t.status),l.a.element.createElement("span",null,l.a.element.createElement("b",null,ya("Published / Last Modified:","hm-gb-tools"))," ",qo()(t.date_gmt).format("Do MMM, YYYY")),r&&l.a.element.createElement("span",null,l.a.element.createElement("b",null,"Author:")," ",r.name)),l.a.element.createElement("div",{className:"post-list-item-actions"},s.map((function(e){return l.a.element.createElement(ba,P()({key:e.id},e))}))))):l.a.element.createElement(ga,null))};Oa.propTypes={post:a.a.object,thumbnail:a.a.object,isSelected:a.a.bool,actions:a.a.array},Oa.defaultProps={actions:[],onSelectItem:function(){}};var xa=Oa;function wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sa(e){for(var t=1;t0?l.a.element.createElement("ol",{className:"post-list"},t.map((function(e){return l.a.element.createElement(Pa,{key:e.id,actions:[{id:"move-post-up",text:ja("Move post up","hm-gb-tools"),icon:"arrow-up-alt2",disabled:e.id===t[0].id,onClick:function(){return r(e)}},{id:"move-post-down",text:ja("Move post down","hm-gb-tools"),icon:"arrow-down-alt2",disabled:e.id===t[t.length-1].id,onClick:function(){return o(e)}},{id:"remove-post",text:ja("Remove post from selections","hm-gb-tools"),icon:"dismiss",onClick:function(){return n(e)}}],post:e,postType:e.type})}))):l.a.element.createElement("p",{className:"no-selection"},ja("Nothing selected","hm-gb-tools")))};Ea.propTypes={selection:a.a.arrayOf(a.a.object).isRequired,onRemoveItem:a.a.func.isRequired,onMoveItemUp:a.a.func.isRequired,onMoveItemDown:a.a.func.isRequired};var Ca=Ea,_a=l.a.components.Button,Ma=l.a.i18n.__,ka=function(e){var t=e.filters,n=e.modalTitle,r=e.postType,o=e.onSelect,a=e.onClose,s=e.onToggleSelected,u=e.onMoveItemUp,c=e.onMoveItemDown,p=e.onChangeContentState,f=e.contentState,d=e.termFilters,m=e.selection,h=e.showDateFilters,v=e.modalRef,b=e.isLoading,g=l.a.element.createElement(i.Fragment,null,l.a.element.createElement(_a,{isPrimary:!0,onClick:function(){return o()}},"Select"),"selection"!==f&&l.a.element.createElement(_a,{isPrimary:!1,onClick:function(){return p("selection")}},Ma("Manage current selection","hm-gb-tools")),"browse"!==f&&l.a.element.createElement(_a,{isPrimary:!1,onClick:function(){return p("browse")}},Ma("Browse posts","hm-gb-tools"))),y=l.a.element.createElement(i.Fragment,null,"browse"===f&&l.a.element.createElement(ua,{filters:t,postType:r,selection:m,showDateFilters:h,termFilters:d,onToggleSelected:s}),"selection"===f&&l.a.element.createElement(Ca,{postType:r,selection:m,onMoveItemDown:c,onMoveItemUp:u,onRemoveItem:s}));return l.a.element.createElement(fa,{modalContent:b?l.a.element.createElement(i.Fragment,null):y,modalRef:v,modalTitle:n,modalToolbar:g,onClose:a})};ka.defaultProps={modalTitle:Ma("Select a post","hm-gb-tools"),contentState:"browse",selection:[]},ka.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postType:a.a.array.isRequired,modalTitle:a.a.string,onSelect:a.a.func.isRequired,onClose:a.a.func.isRequired,onToggleSelected:a.a.func.isRequired,onMoveItemUp:a.a.func.isRequired,onMoveItemDown:a.a.func.isRequired,onChangeContentState:a.a.func.isRequired,contentState:a.a.string.isRequired,termFilters:a.a.array,selection:a.a.arrayOf(a.a.object),modalRef:a.a.func.isRequired,showDateFilters:a.a.bool};var Ta=ka,Ra=function(e,t){var n=X()(e);return n.splice(t,1),n},Ia=function(e,t){var n=X()(e);if(t<1)return n;var r=e[t-1],o=X()(n.splice(t,1));return n.splice.apply(n,[n.indexOf(r),0].concat(X()(o))),n},Da=function(e,t){var n=X()(e);if(!(t>e.length-1)){var r=e[t+1],o=X()(n.splice(t,1));return n.splice.apply(n,[n.indexOf(r)+1,0].concat(X()(o))),n}};function Fa(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(ce){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 U()(this,n)}}var Aa=l.a.i18n,La=Aa.sprintf,Va=Aa.__,Na=function(e){N()(n,e);var t=Fa(n);function n(e){var r;return I()(this,n),(r=t.call(this,e)).state={isLoadingSelection:!0,selection:[],contentState:"browse"},r}return F()(n,[{key:"componentDidMount",value:function(){this.fetchSelection(),this.modalElement&&this.modalElement.focus()}},{key:"componentDidUpdate",value:function(e,t){this.modalElement&&this.state.contentState!==t.contentState&&this.modalElement&&this.modalElement.focus()}},{key:"fetchSelection",value:function(){var e=this;this.setState({isLoadingSelection:!0});var t=Array.isArray(this.props.postType)?this.props.postType:[this.props.postType];(function(e,t){return!e||e.length<1?Promise.resolve([]):new Promise((function(n){so({path:ao(io,{include:e,per_page:e.length,context:"view",types:t.map((function(e){return e.slug}))})}).then((function(e){var t=Q()(e,2),r=t[0],o=t[1];n(r,o)})).catch((function(){}))}))})(this.props.value,t).then((function(t){return e.setState({isLoadingSelection:!1,selection:t})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.filters,r=t.onClose,o=t.modalTitle,a=t.showDateFilters,i=t.termFilters,s=t.onSelect,u=this.state,c=u.selection,p=u.contentState,f=u.isLoadingSelection,d=Array.isArray(this.props.postType)?this.props.postType:[this.props.postType];return l.a.element.createElement(Ta,{contentState:p,filters:n,isLoading:f,modalRef:function(t){return e.modalElement=t},modalTitle:o,postType:d,selection:c,showDateFilters:a,termFilters:i,onChangeContentState:function(t){return e.setState({contentState:t})},onClose:r,onMoveItemDown:function(t){return e.moveDown(t)},onMoveItemUp:function(t){return e.moveUp(t)},onSelect:function(){return s(c)},onToggleSelected:function(t){return e.toggleSelected(t)}})}},{key:"moveUp",value:function(e){var t=this.state.selection.findIndex((function(t){return t.id===e.id}));this.setState({selection:Ia(this.state.selection,t)})}},{key:"moveDown",value:function(e){var t=this.state.selection.findIndex((function(t){return t.id===e.id}));this.setState({selection:Da(this.state.selection,t)})}},{key:"toggleSelected",value:function(e){var t=this.state.selection,n=this.props.maxPosts,r=t.findIndex((function(t){return t.id===e.id}));if(r>=0)this.setState({selection:Ra(t,r)});else if(n&&1===n)this.setState({selection:[e]});else{if(n&&t.length>=n)return void alert(La(Va("Max number %d reached.","hm-gb-tools"),n));this.setState({selection:[].concat(X()(t),[e])})}}}]),n}(s.a.Component);Na.defaultProps={minPosts:0,maxPosts:0,postType:["post"],showDateFilters:!1,value:[],modalTitle:Va("Select a post","hm-gb-tools")},Na.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postType:a.a.oneOfType([a.a.string,a.a.array]),minPosts:a.a.number,maxPosts:a.a.number,onSelect:a.a.func.isRequired,onClose:a.a.func.isRequired,modalTitle:a.a.string,showDateFilters:a.a.bool,termFilters:a.a.arrayOf(a.a.string)};var za=Na;function Ua(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t0&&l.a.element.createElement(T,{postIds:a,postType:i.postType||"post"}))};Xa.defaultProps={btnText:Ga("Select post"),postSelectProps:{btnProps:{}}},Xa.propTypes={label:a.a.string.isRequired,help:a.a.string,id:a.a.string,onChange:a.a.func.isRequired,value:a.a.arrayOf(a.a.number).isRequired,postSelectProps:a.a.object,btnText:a.a.string};var Ka=Xa;function Qa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:d;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];if("string"===typeof t){const e=o(t);e!==t&&(n(r)||(r[a]=e),t=e)}e[t]=!0}return e}function E(t){const n=s(null);for(const[r,a]of e(t))void 0!==o(t,r)&&(n[r]=a);return n}function P(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return x(n.get);if("function"===typeof n.value)return x(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const _=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),T=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),j=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=a(["#text"]),I=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),A=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),L=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),N=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=i(/<%[\w\W]*|[\w\W]*%>/gm),V=i(/\${[\w\W]*}/gm),U=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),H=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=i(/^(?:\w+script|data):/i),q=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:N,ERB_EXPR:F,TMPLIT_EXPR:V,DATA_ATTR:U,ARIA_ATTR:z,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:q,DOCTYPE_NAME:W});const G=function(){return"undefined"===typeof window?null:window},Y=function(e,t){if("object"!==typeof e||"function"!==typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(a){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function X(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G();const n=e=>X(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:l,HTMLTemplateElement:u,Node:x,Element:w,NodeFilter:N,NamedNodeMap:F=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:V,DOMParser:U,trustedTypes:z}=t,B=w.prototype,q=P(B,"cloneNode"),K=P(B,"nextSibling"),Z=P(B,"childNodes"),Q=P(B,"parentNode");if("function"===typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ae}=o;let ie={};n.isSupported="function"===typeof e&&"function"===typeof Q&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:le,TMPLIT_EXPR:ue,DATA_ATTR:ce,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:de}=$;let{IS_ALLOWED_URI:me}=$,he=null;const ve=S({},[..._,...T,...C,...k,...R]);let be=null;const ge=S({},[...I,...A,...D,...L]);let ye=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,xe=null,we=!0,Se=!0,Ee=!1,Pe=!0,_e=!1,Te=!1,Ce=!1,je=!1,ke=!1,Me=!1,Re=!1,Ie=!0,Ae=!1;const De="user-content-";let Le=!0,Ne=!1,Fe={},Ve=null;const Ue=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ze=null;const He=S({},["audio","video","img","source","image","track"]);let Be=null;const qe=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let Ye=Ge,Xe=!1,Ke=null;const Ze=S({},[We,$e,Ge],m);let Qe=null;const Je=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"===typeof e||(e={}),e=E(e),Qe=Qe=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?m:d,he="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,tt):ve,be="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,tt):ge,Ke="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,m):Ze,Be="ADD_URI_SAFE_ATTR"in e?S(E(qe),e.ADD_URI_SAFE_ATTR,tt):qe,ze="ADD_DATA_URI_TAGS"in e?S(E(He),e.ADD_DATA_URI_TAGS,tt):He,Ve="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,tt):Ue,Oe="FORBID_TAGS"in e?S({},e.FORBID_TAGS,tt):{},xe="FORBID_ATTR"in e?S({},e.FORBID_ATTR,tt):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,_e=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Ie=!1!==e.SANITIZE_DOM,Ae=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,Ne=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||H,Ye=e.NAMESPACE||Ge,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Se=!1),Me&&(ke=!0),Fe&&(he=S({},[...R]),be=[],!0===Fe.html&&(S(he,_),S(be,I)),!0===Fe.svg&&(S(he,T),S(be,A),S(be,L)),!0===Fe.svgFilters&&(S(he,C),S(be,A),S(be,L)),!0===Fe.mathMl&&(S(he,k),S(be,D),S(be,L))),e.ADD_TAGS&&(he===ve&&(he=E(he)),S(he,e.ADD_TAGS,tt)),e.ADD_ATTR&&(be===ge&&(be=E(be)),S(be,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(Be,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Ve===Ue&&(Ve=E(Ve)),S(Ve,e.FORBID_CONTENTS,tt)),Le&&(he["#text"]=!0),Te&&S(he,["html","head","body"]),he.table&&(S(he,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!==typeof e.TRUSTED_TYPES_POLICY.createHTML)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=Y(z,i)),null!==J&&"string"===typeof ee&&(ee=J.createHTML(""));a&&a(e),nt=e}},it=S({},["mi","mo","mn","ms","mtext"]),st=S({},["foreignobject","desc","title","annotation-xml"]),lt=S({},["title","style","font","a","script"]),ut=S({},T);S(ut,C),S(ut,j);const ct=S({},k);S(ct,M);const pt=function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});const n=d(e.tagName),r=d(t.tagName);return!!Ke[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||it[r]):Boolean(ut[n]):e.namespaceURI===We?t.namespaceURI===Ge?"math"===n:t.namespaceURI===$e?"math"===n&&st[r]:Boolean(ct[n]):e.namespaceURI===Ge?!(t.namespaceURI===$e&&!st[r])&&!(t.namespaceURI===We&&!it[r])&&!ct[n]&&(lt[n]||!ut[n]):!("application/xhtml+xml"!==Qe||!Ke[e.namespaceURI]))},ft=function(e){f(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{f(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){f(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(ke||Me)try{ft(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},mt=function(e){let t=null,n=null;if(je)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&Ye===Ge&&(e=''+e+"");const o=J?J.createHTML(e):e;if(Ye===Ge)try{t=(new U).parseFromString(o,Qe)}catch(i){}if(!t||!t.documentElement){t=te.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Xe?ee:o}catch(i){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Ye===Ge?oe.call(t,Te?"html":"body")[0]:Te?t.documentElement:a},ht=function(e){return ne.call(e.ownerDocument||e,e,N.SHOW_ELEMENT|N.SHOW_COMMENT|N.SHOW_TEXT,null)},vt=function(e){return e instanceof V&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof F)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore||"function"!==typeof e.hasChildNodes)},bt=function(e){return"function"===typeof x&&e instanceof x},gt=function(e,t,r){ie[e]&&c(ie[e],(e=>{e.call(n,t,r,nt)}))},yt=function(e){let t=null;if(gt("beforeSanitizeElements",e,null),vt(e))return ft(e),!0;const r=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:r,allowedTags:he}),e.hasChildNodes()&&!bt(e.firstElementChild)&&y(/<[/\w]/g,e.innerHTML)&&y(/<[/\w]/g,e.textContent))return ft(e),!0;if(!he[r]||Oe[r]){if(!Oe[r]&&xt(r)){if(ye.tagNameCheck instanceof RegExp&&y(ye.tagNameCheck,r))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(r))return!1}if(Le&&!Ve[r]){const t=Q(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(q(n[r],!0),K(e))}return ft(e),!0}return e instanceof w&&!pt(e)?(ft(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!y(/<\/no(script|embed|frames)/i,e.innerHTML)?(_e&&3===e.nodeType&&(t=e.textContent,c([se,le,ue],(e=>{t=v(t,e," ")})),e.textContent!==t&&(f(n.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(ft(e),!0)},Ot=function(e,t,n){if(Ie&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Se&&!xe[t]&&y(ce,t));else if(we&&y(pe,t));else if(!be[t]||xe[t]){if(!(xt(e)&&(ye.tagNameCheck instanceof RegExp&&y(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&y(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&y(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Be[t]);else if(y(me,v(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!ze[e])if(Ee&&!y(fe,v(n,de,"")));else if(n)return!1;return!0},xt=function(e){return e.indexOf("-")>0},wt=function(e){gt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:l,value:u}=i,f=tt(s);let d="value"===s?u:g(u);if(r.attrName=f,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,r),d=r.attrValue,r.forceKeepAttr)continue;if(dt(s,e),!r.keepAttr)continue;if(!Pe&&y(/\/>/i,d)){dt(s,e);continue}_e&&c([se,le,ue],(e=>{d=v(d,e," ")}));const m=tt(e.nodeName);if(Ot(m,f,d)){if(!Ae||"id"!==f&&"name"!==f||(dt(s,e),d=De+d),J&&"object"===typeof z&&"function"===typeof z.getAttributeType)if(l);else switch(z.getAttributeType(m,f)){case"TrustedHTML":d=J.createHTML(d);break;case"TrustedScriptURL":d=J.createScriptURL(d)}try{l?e.setAttributeNS(l,s,d):e.setAttribute(s,d),p(n.removed)}catch(a){}}}gt("afterSanitizeAttributes",e,null)},St=function e(t){let n=null;const r=ht(t);for(gt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)gt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof l&&e(n.content),wt(n));gt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,i=null,s=null;if(Xe=!e,Xe&&(e="\x3c!--\x3e"),"string"!==typeof e&&!bt(e)){if("function"!==typeof e.toString)throw O("toString is not a function");if("string"!==typeof(e=e.toString()))throw O("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ce||at(t),n.removed=[],"string"===typeof e&&(Ne=!1),Ne){if(e.nodeName){const t=tt(e.nodeName);if(!he[t]||Oe[t])throw O("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof x)r=mt("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!ke&&!_e&&!Te&&-1===e.indexOf("<"))return J&&Re?J.createHTML(e):e;if(r=mt(e),!r)return ke?null:Re?ee:""}r&&je&&ft(r.firstChild);const u=ht(Ne?e:r);for(;i=u.nextNode();)yt(i)||(i.content instanceof l&&St(i.content),wt(i));if(Ne)return e;if(ke){if(Me)for(s=re.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(be.shadowroot||be.shadowrootmode)&&(s=ae.call(o,s,!0)),s}let p=Te?r.outerHTML:r.innerHTML;return Te&&he["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&y(W,r.ownerDocument.doctype.name)&&(p="\n"+p),_e&&c([se,le,ue],(e=>{p=v(p,e," ")})),J&&Re?J.createHTML(p):p},n.setConfig=function(){at(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ce=!0},n.clearConfig=function(){nt=null,Ce=!1},n.isValidAttribute=function(e,t,n){nt||at({});const r=tt(e),o=tt(t);return Ot(r,o,n)},n.addHook=function(e,t){"function"===typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},n.removeHook=function(e){if(ie[e])return p(ie[e])},n.removeHooks=function(e){ie[e]&&(ie[e]=[])},n.removeAllHooks=function(){ie={}},n}return X()}()},function(e,t,n){var r=n(19),o=n(93),a=n(94),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t,n){var r=n(13).Symbol;e.exports=r},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=ReactDOM},function(e,t,n){var r=n(81),o=n(82),a=n(83),i=n(84),s=n(85);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(18),o=n(20);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(14),o=n(37),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(a.Component);m.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.default=m},function(e,t,n){"use strict";var r=n(169),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(m){var o=d(n);o&&o!==m&&e(t,o,r)}var i=c(n);p&&(i=i.concat(p(n)));for(var s=l(t),h=l(n),v=0;ve.length)&&(t=e.length);for(var n=0,r=new Array(t);nc))return!1;var f=l.get(e),d=l.get(t);if(f&&d)return f==t&&d==e;var m=-1,h=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e=200){var h=t?null:s(e);if(h)return l(h);f=!1,c=i,m=new r}else m=t?[]:d;e:for(;++u-1}},function(e,t,n){var r=n(23);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(22);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(22),o=n(31),a=n(33);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(46),o=n(95),a=n(32),i=n(48),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,p=u.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:s).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(19),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(96),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(13)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(99),o=n(22),a=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(100),o=n(101),a=n(102),i=n(103),s=n(104);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&a(c)?n>1?e(c,n-1,a,i,s):r(s,c):i||(s[s.length]=c)}return s}},function(e,t,n){var r=n(19),o=n(35),a=n(14),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||o(e)||!!(i&&e&&e[i])}},function(e,t,n){var r=n(141);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(142),o=n(143),a=n(144);e.exports=function(e,t,n){return t===t?a(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(170)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case i:case l:case s:case m:return e;default:switch(e=e&&e.$$typeof){case c:case d:case b:case v:case u:return e;default:return t}}case a:return t}}}function S(e){return w(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Lazy=b,t.Memo=v,t.Portal=a,t.Profiler=l,t.StrictMode=s,t.Suspense=m,t.isAsyncMode=function(e){return S(e)||w(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===b},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===m},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===f||e===l||e===s||e===m||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===O||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},function(e,t,n){var r=n(172),o=n(30),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];a.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(173);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(16),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=e.length,a=t.length,i={};++r0?Se(Ae,--Re):0,ke--,10===Ie&&(ke=1,je--),Ie}function Fe(){return Ie=Re2||He(Ie)>3?"":" "}function Ge(e,t){for(;--t&&Fe()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return ze(e,Ue()+(t<6&&32==Ve()&&32==Fe()))}function Ye(e){for(;Fe();)switch(Ie){case e:return Re;case 34:case 39:34!==e&&39!==e&&Ye(Ie);break;case 40:41===e&&Ye(e);break;case 92:Fe()}return Re}function Xe(e,t){for(;Fe()&&e+Ie!==57&&(e+Ie!==84||47!==Ve()););return"/*"+ze(t,Re-1)+"*"+ge(47===e?e:Fe())}function Ke(e){for(;!He(Ve());)Fe();return ze(e,Re)}function Ze(e){return qe(Qe("",null,null,null,[""],e=Be(e),0,[0],e))}function Qe(e,t,n,r,o,a,i,s,l){for(var u=0,c=0,p=i,f=0,d=0,m=0,h=1,v=1,b=1,g=0,y="",O=o,x=a,w=r,S=y;v;)switch(m=g,g=Fe()){case 40:if(108!=m&&58==S.charCodeAt(p-1)){-1!=we(S+=xe(We(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=We(g);break;case 9:case 10:case 13:case 32:S+=$e(m);break;case 92:S+=Ge(Ue()-1,7);continue;case 47:switch(Ve()){case 42:case 47:Te(et(Xe(Fe(),Ue()),t,n),l);break;default:S+="/"}break;case 123*h:s[u++]=Pe(S)*b;case 125*h:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+c:d>0&&Pe(S)-p&&Te(d>32?tt(S+";",r,n,p-1):tt(xe(S," ","")+";",r,n,p-2),l);break;case 59:S+=";";default:if(Te(w=Je(S,t,n,u,c,o,s,y,O=[],x=[],p),a),123===g)if(0===c)Qe(S,t,w,w,O,a,p,s,x);else switch(f){case 100:case 109:case 115:Qe(e,w,w,r&&Te(Je(e,w,w,0,0,o,s,y,o,O=[],p),x),o,x,p,s,r?O:x);break;default:Qe(S,w,w,w,[""],x,0,s,x)}}u=c=d=0,h=b=1,y=S="",p=i;break;case 58:p=1+Pe(S),d=m;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==Ne())continue;switch(S+=ge(g),g*h){case 38:b=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(Pe(S)-1)*b,b=1;break;case 64:45===Ve()&&(S+=We(Fe())),f=Ve(),c=p=Pe(y=S+=Ke(Ue())),g++;break;case 45:45===m&&2==Pe(S)&&(h=0)}}return a}function Je(e,t,n,r,o,a,i,s,l,u,c){for(var p=o-1,f=0===o?a:[""],d=_e(f),m=0,h=0,v=0;m0?f[b]+" "+g:xe(g,/&\f/g,f[b])))&&(l[v++]=y);return De(e,t,n,0===o?me:s,l,u,c)}function et(e,t,n){return De(e,t,n,de,ge(Ie),Ee(e,2,-2),0)}function tt(e,t,n,r){return De(e,t,n,he,Ee(e,0,r),Ee(e,r+1,-1),r)}function nt(e,t){switch(function(e,t){return(((t<<2^Se(e,0))<<2^Se(e,1))<<2^Se(e,2))<<2^Se(e,3)}(e,t)){case 5103:return"-webkit-print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fe+e+pe+e+ce+e+e;case 6828:case 4268:return fe+e+ce+e+e;case 6165:return fe+e+ce+"flex-"+e+e;case 5187:return fe+e+xe(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return fe+e+ce+"flex-item-"+xe(e,/flex-|-self/,"")+e;case 4675:return fe+e+ce+"flex-line-pack"+xe(e,/align-content|flex-|-self/,"")+e;case 5548:return fe+e+ce+xe(e,"shrink","negative")+e;case 5292:return fe+e+ce+xe(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+xe(e,"-grow","")+fe+e+ce+xe(e,"grow","positive")+e;case 4554:return fe+xe(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return xe(xe(xe(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return xe(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return xe(xe(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+fe+e+e;case 4095:case 3583:case 4068:case 2532:return xe(e,/(.+)-inline(.+)/,"-webkit-$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Pe(e)-1-t>6)switch(Se(e,t+1)){case 109:if(45!==Se(e,t+4))break;case 102:return xe(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+pe+(108==Se(e,t+3)?"$3":"$2-$3"))+e;case 115:return~we(e,"stretch")?nt(xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Se(e,t+1))break;case 6444:switch(Se(e,Pe(e)-3-(~we(e,"!important")&&10))){case 107:return xe(e,":",":-webkit-")+e;case 101:return xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===Se(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+ce+"$2box$3")+e}break;case 5936:switch(Se(e,t+11)){case 114:return fe+e+ce+xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fe+e+ce+xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fe+e+ce+xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fe+e+ce+e+e}return e}function rt(e,t){for(var n="",r=_e(e),o=0;o-1&&!e.return)switch(e.type){case he:e.return=nt(e.value,e.length);break;case ve:return rt([Le(e,{value:xe(e.value,"@","@-webkit-")})],r);case me:if(e.length)return Ce(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rt([Le(e,{props:[xe(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return rt([Le(e,{props:[xe(t,/:(plac\w+)/,":-webkit-input-$1")]}),Le(e,{props:[xe(t,/:(plac\w+)/,":-moz-$1")]}),Le(e,{props:[xe(t,/:(plac\w+)/,ce+"input-$1")]})],r)}return""}))}}],dt=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ft;var o,a,i={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},gt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yt=/[A-Z]|^ms/g,Ot=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xt=function(e){return 45===e.charCodeAt(1)},wt=function(e){return null!=e&&"boolean"!==typeof e},St=it((function(e){return xt(e)?e:e.replace(yt,"-$&").toLowerCase()})),Et=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(Ot,(function(e,t,n){return _t={name:t,styles:n,next:_t},t}))}return 1===gt[e]||xt(e)||"number"!==typeof t||0===t?t:t+"px"};function Pt(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return _t={name:n.name,styles:n.styles,next:_t},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)_t={name:r.name,styles:r.styles,next:_t},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Gt(e){return Gt="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},Gt(e)}var Yt=n(40),Xt=n.n(Yt);function Kt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var n=0;n-1}function hn(e){return mn(e)?window.pageYOffset:e.scrollTop}function vn(e,t){mn(e)?window.scrollTo(0,t):e.scrollTop=t}function bn(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function gn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:un,o=hn(e),a=t-o,i=10,s=0;function l(){var t=bn(s+=i,o,a,n);vn(e,t),s=d)return{placement:"bottom",maxHeight:t};if(S>=d&&!i)return a&&gn(l,E,_),{placement:"bottom",maxHeight:t};if(!i&&S>=r||i&&x>=r)return a&&gn(l,E,_),{placement:"bottom",maxHeight:i?x-g:S-g};if("auto"===o||i){var T=t,C=i?O:w;return C>=r&&(T=Math.min(C-g-s.controlHeight,t)),{placement:"top",maxHeight:T}}if("bottom"===o)return a&&vn(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(O>=d)return{placement:"top",maxHeight:t};if(w>=d&&!i)return a&&gn(l,P,_),{placement:"top",maxHeight:t};if(!i&&w>=r||i&&O>=r){var j=t;return(!i&&w>=r||i&&O>=r)&&(j=i?O-y:w-y),a&&gn(l,P,_),{placement:"top",maxHeight:j}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var Pn=function(e){return"auto"===e?"bottom":e},_n=Object(i.createContext)({getPortalPlacement:null}),Tn=function(e){en(n,e);var t=ln(n);function n(){var e;Kt(this,n);for(var r=arguments.length,o=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,h=p-f-u,v=!1;h>t&&s.current&&(r&&r(e),s.current=!1),m&&l.current&&(a&&a(e),l.current=!1),m&&t>h?(n&&!s.current&&n(e),d.scrollTop=p,v=!0,s.current=!0):!m&&-t>u&&(o&&!l.current&&o(e),d.scrollTop=0,v=!0,l.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),f=Object(i.useCallback)((function(e){p(e,e.deltaY)}),[p]),d=Object(i.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),m=Object(i.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;p(e,t)}),[p]),h=Object(i.useCallback)((function(e){if(e){var t=!!Sn&&{passive:!1};"function"===typeof e.addEventListener&&e.addEventListener("wheel",f,t),"function"===typeof e.addEventListener&&e.addEventListener("touchstart",d,t),"function"===typeof e.addEventListener&&e.addEventListener("touchmove",m,t)}}),[m,d,f]),v=Object(i.useCallback)((function(e){e&&("function"===typeof e.removeEventListener&&e.removeEventListener("wheel",f,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchstart",d,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchmove",m,!1))}),[m,d,f]);return Object(i.useEffect)((function(){if(t){var e=c.current;return h(e),function(){v(e)}}}),[t,h,v]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=Object(i.useRef)({}),a=Object(i.useRef)(null),s=Object(i.useCallback)((function(e){if(Pr){var t=document.body,n=t&&t.style;if(r&&yr.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&_r<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,s=window.innerWidth-i+a||0;Object.keys(Or).forEach((function(e){var t=Or[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Er()&&(t.addEventListener("touchmove",xr,Tr),e&&(e.addEventListener("touchstart",Sr,Tr),e.addEventListener("touchmove",wr,Tr))),_r+=1}}),[]),l=Object(i.useCallback)((function(e){if(Pr){var t=document.body,n=t&&t.style;_r=Math.max(_r-1,0),r&&_r<1&&yr.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Er()&&(t.removeEventListener("touchmove",xr,Tr),e&&(e.removeEventListener("touchstart",Sr,Tr),e.removeEventListener("touchmove",wr,Tr)))}}),[]);return Object(i.useEffect)((function(){if(t){var e=a.current;return s(e),function(){l(e)}}}),[t,s,l]),function(e){a.current=e}}({isEnabled:n});return Ut(s.a.Fragment,null,n&&Ut("div",{onClick:Cr,css:jr}),t((function(e){o(e),a(e)})))}var Mr={clearIndicator:Bn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Hn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:kn,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return tn(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),tn(t,"backgroundColor",i.neutral0),tn(t,"borderRadius",o),tn(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),tn(t,"marginBottom",a.menuGutter),tn(t,"marginTop",a.menuGutter),tn(t,"position","absolute"),tn(t,"width","100%"),tn(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:jn,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{label:"option",backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?i.primary:i.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Rr,Ir={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Ar={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:yn(),captureMenuScroll:!yn(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=on({ignoreCase:!0,ignoreAccents:!0,stringify:br,trim:!0,matchFrom:"any"},Rr),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,s=n.matchFrom,l=i?vr(t):t,u=i?vr(a(e)):a(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=hr(l),u=mr(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(ce){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Dr(e,t,n,r){return{type:"option",data:t,isDisabled:zr(e,t,n),isSelected:Hr(e,t,n),label:Vr(e,t),value:Ur(e,t),index:r}}function Lr(e,t){return e.options.map((function(n,r){if(n.options){var o=n.options.map((function(n,r){return Dr(e,n,t,r)})).filter((function(t){return Fr(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=Dr(e,n,t,r);return Fr(e,a)?a:void 0})).filter((function(e){return!!e}))}function Nr(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,er(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Fr(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,s=t.value;return(!qr(e)||!a)&&Br(e,{label:i,value:s,data:o},r)}var Vr=function(e,t){return e.getOptionLabel(t)},Ur=function(e,t){return e.getOptionValue(t)};function zr(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Hr(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Ur(e,t);return n.some((function(t){return Ur(e,t)===r}))}function Br(e,t,n){return!e.filterOption||e.filterOption(t,n)}var qr=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Wr=1,$r=function(e){en(n,e);var t=ln(n);function n(e){var r;return Kt(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,o=r.props,a=o.closeMenuOnSelect,i=o.isMulti;r.onInputChange("",{action:"set-value"}),a&&(r.setState({inputIsHiddenAfterUpdate:!i}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,a=t.name,i=r.state.selectValue,s=o&&r.isOptionSelected(e,i),l=r.isOptionDisabled(e,i);if(s){var u=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",name:a});o?r.setValue([].concat(er(i),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),a=n.filter((function(e){return r.getOptionValue(e)!==o})),i=t?a:a[0]||null;r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),a=e?o:o[0]||null;r.onChange(a,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return qr(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=r.state,m=d.focusedOption,h=d.focusedValue,v=d.selectValue;if(!l&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!p||!m||f&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(u){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(i)return;if(!u){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++Wr),r.state.selectValue=fn(e.value),r}return Qt(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(!function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?vn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o-1&&(i=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Ir):on(on({},Ir),this.props.theme):Ir}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,a=this.setValue,i=this.props,s=i.isMulti,l=i.isRtl,u=i.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:u,selectOption:o,selectProps:i,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return zr(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Hr(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Br(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=e.form,l=this.getComponents().Input,u=this.state.inputIsHidden,c=this.commonProps,p=r||this.getElementId("input"),f={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?s.a.createElement(l,le({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},f)):s.a.createElement(gr,le({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:un,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,form:i,value:""},f))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,l=t.Placeholder,u=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,m=c.inputValue,h=c.placeholder,v=this.state,b=v.selectValue,g=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!p)return m?null:s.a.createElement(l,le({},u,{key:"placeholder",isDisabled:f,isFocused:y}),h);if(d){var O=b.map((function(t,i){var l=t===g;return s.a.createElement(n,le({},u,{components:{Container:r,Label:o,Remove:a},isFocused:l,isDisabled:f,key:"".concat(e.getOptionValue(t)).concat(i),index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return O}if(m)return null;var x=b[0];return s.a.createElement(i,le({},u,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return s.a.createElement(e,le({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return s.a.createElement(e,le({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return s.a.createElement(n,le({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return s.a.createElement(e,le({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,l=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,p=this.commonProps,f=this.state.focusedOption,d=this.props,m=d.captureMenuScroll,h=d.inputValue,v=d.isLoading,b=d.loadingMessage,g=d.minMenuHeight,y=d.maxMenuHeight,O=d.menuIsOpen,x=d.menuPlacement,w=d.menuPosition,S=d.menuPortalTarget,E=d.menuShouldBlockScroll,P=d.menuShouldScrollIntoView,_=d.noOptionsMessage,T=d.onMenuScrollToTop,C=d.onMenuScrollToBottom;if(!O)return null;var j,k=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,l=t.label,u=t.value,d=f===o,m=a?void 0:function(){return e.onOptionHover(o)},h=a?void 0:function(){return e.selectOption(o)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1};return s.a.createElement(c,le({},p,{innerProps:b,data:o,isDisabled:a,isSelected:i,key:v,label:l,type:r,value:u,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())j=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,l="".concat(e.getElementId("group"),"-").concat(i),u="".concat(l,"-heading");return s.a.createElement(n,le({},p,{key:l,data:o,options:a,Heading:r,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return k(e,"".concat(i,"-").concat(e.index))})))}if("option"===t.type)return k(t,"".concat(t.index))}));else if(v){var M=b({inputValue:h});if(null===M)return null;j=s.a.createElement(l,p,M)}else{var R=_({inputValue:h});if(null===R)return null;j=s.a.createElement(u,p,R)}var I={minMenuHeight:g,maxMenuHeight:y,menuPlacement:x,menuPosition:w,menuShouldScrollIntoView:P},A=s.a.createElement(Tn,le({},p,I),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,l=r.maxHeight;return s.a.createElement(o,le({},p,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),s.a.createElement(kr,{captureEnabled:m,onTopArrive:T,onBottomArrive:C,lockEnabled:E},(function(t){return s.a.createElement(a,le({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:v,maxHeight:l,focusedOption:f}),j)})))}));return S||"fixed"===w?s.a.createElement(i,le({},p,{appendTo:S,controlElement:this.controlRef,menuPlacement:x,menuPosition:w}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var l=i.map((function(t){return e.getOptionValue(t)})).join(n);return s.a.createElement("input",{name:a,type:"hidden",value:l})}var u=i.length>0?i.map((function(t,n){return s.a.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):s.a.createElement("input",{name:a,type:"hidden"});return s.a.createElement("div",null,u)}var c=i[0]?this.getOptionValue(i[0]):"";return s.a.createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,i=t.selectValue,l=this.getFocusableOptions();return s.a.createElement(sr,le({},e,{ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.a.createElement(r,le({},f,{className:i,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:p}),this.renderLiveRegion(),s.a.createElement(t,le({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:p,menuIsOpen:c}),s.a.createElement(o,le({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),s.a.createElement(n,le({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=e.options,i=e.value,s=e.menuIsOpen,l=e.inputValue,u={};if(n&&(i!==n.value||a!==n.options||s!==n.menuIsOpen||l!==n.inputValue)){var c=fn(i),p=s?function(e,t){return Nr(Lr(e,t))}(e,c):[],f=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,p);u={selectValue:c,focusedOption:d,focusedValue:f,clearFocusValueOnUpdate:!1}}var m=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{};return on(on(on({},u),m),{},{prevProps:e})}}]),n}(i.Component);$r.defaultProps=Ar;var Gr={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Yr=(n(166),n(168),n(42),i.Component,function(e){var t,n;return n=t=function(t){en(r,t);var n=ln(r);function r(){var e;Kt(this,r);for(var t=arguments.length,o=new Array(t),a=0;a1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:["x-wp-totalpages"];return new Promise((function(n){oo(ro(ro({},e),{},{parse:!1})).then((function(e){return Promise.all([e.json?e.json():[],to()(t,t.map((function(t){return e.headers.get(t)})))])})).then((function(e){return n(e)})).catch((function(){}))}))};function lo(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(ce){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 z()(this,n)}}var uo=wp.url.addQueryArgs,co=wp.i18n,po=co.sprintf,fo=co.__,mo=wp.hooks.applyFilters,ho=function(e){V()(n,e);var t=lo(n);function n(e){var r;return I()(this,n),(r=t.call(this,e)).state={options:[],isLoading:!1,page:1,hasMore:!1,value:[]},r}return D()(n,[{key:"componentDidMount",value:function(){this.fetchPostAbortController=new AbortController,this.fetchTerms()}},{key:"componentWillUnmount",value:function(){this.fetchPostAbortController&&this.fetchPostAbortController.abort()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.restBase,n=this.state,r=n.page,o=n.options,a=n.search,i={page:r,per_page:10},s=mo("hmGbTools.termSelect.searchMinLength",3);a&&a.length>=s&&(i.search=a),this.setState({isLoading:!0}),i=mo("hmGbTools.termSelect.query",i),so({path:uo("wp/v2/".concat(t,"/"),i),signal:this.fetchPostAbortController.signal}).then((function(t){var n=Z()(t,2),a=n[0],i=n[1],s=e.props.value,l=se()([].concat(X()(o),X()(a.map((function(e){return{value:e.id,label:e.name}})))),"value"),u=s.map((function(e){return l.find((function(t){return t.value===e}))})).filter(Boolean);e.setState({options:l,hasMore:parseInt(i["x-wp-totalpages"],10)>r,isLoading:!1,value:u})}))}},{key:"fetchMoreTerms",value:function(){var e=this,t=this.state,n=t.page,r=t.hasMore,o=t.isLoading;r&&!o&&this.setState({page:n+1},(function(){return e.fetchTerms()}))}},{key:"updateSearch",value:function(e){var t=this,n=mo("hmGbTools.termSelect.searchMinLength",3);e.length>=n&&this.setState({search:e,page:1},(function(){return t.fetchTerms()}))}},{key:"handleChange",value:function(e){var t=this.props.onChange;this.setState({search:null,page:1,value:e}),t((e||[]).map((function(e){return e.value})))}},{key:"render",value:function(){var e=this,t=po(fo("Filter by %s","hm-gb-tools"),this.props.label);return wp.element.createElement(Jr,E()({},this.props,this.state,{fieldId:this.props.fieldId,label:t,placeholder:t,onChange:function(t){return e.handleChange(t)},onFetchMoreTerms:function(){return e.fetchMoreTerms()},onUpdateSearch:function(t){return e.updateSearch(t)}}))}}]),n}(s.a.Component);ho.defaultProps={value:[]},ho.propTypes={fieldId:a.a.string.isRequired,label:a.a.string.isRequired,restBase:a.a.string.isRequired,value:a.a.arrayOf(a.a.number),onChange:a.a.func.isRequired};var vo=ho,bo=n(15);function go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var yo=function(e){var t=e.dateId,n=e.description,r=e.setErrorMessage,o=e.value,a=e.onUpdateDateFilter,i=function(e){r("");var n=function(e){for(var t=1;ts&&(r("The published after date cannot be after the published before date."),i=null);break;case"before":i.setHours(23,59,59);var l=o.after?new Date(o.after):null;l&&i1&&u.a.element.createElement(Jr,{fieldId:"".concat(t,"-post-type"),label:Mo("Filter by Post Type","hm-gb-tools"),options:a.map((function(e){return{label:e.labels.name,value:e.slug}})),placeholder:Mo("Filter by Post Type","hm-gb-tools"),onChange:function(e){return s(jo(jo({},n),{},{type:e.map((function(e){return e.value}))}))}}),o.map((function(e){return u.a.element.createElement(vo,{key:"term-filter-".concat(e.slug),fieldId:"".concat(t,"-").concat(e.slug),label:e.labels.name,restBase:e.rest_base,value:n[e.rest_base],onChange:function(t){return s(jo(jo({},n),{},W()({},e.rest_base,t)))}})})),u.a.element.createElement(Jr,{key:"status-filter",fieldId:"".concat(t,"-status"),label:Mo("Filter by Status","hm-gb-tools"),options:Object.entries(Ro).map((function(e){var t=Z()(e,2),n=t[0],r=t[1];return{label:r.charAt(0).toUpperCase()+r.slice(1),value:n}})),placeholder:Mo("Filter by Status","hm-gb-tools"),onChange:function(e){return s(jo(jo({},n),{},{status:e.map((function(e){return e.value}))}))}}),u.a.element.createElement(ko,{isPrimary:!0,type:"submit"},"Filter Posts"))};Io.defaultProps={value:{},terms:[]},Io.propTypes={value:a.a.objectOf(a.a.oneOfType([a.a.arrayOf(a.a.number),a.a.string])),onUpdateFilters:a.a.func.isRequired,terms:a.a.arrayOf(a.a.object)};var Ao=Io;function Do(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t0?u.a.element.createElement("ol",{className:"post-list"},n.map((function(e){return u.a.element.createElement(Qo,{key:e.id,isSelected:o.findIndex((function(t){return t.id===e.id}))>=0,post:e,postType:e.type,onToggleSelected:function(){return a(e)}})}))):u.a.element.createElement("p",{className:"no-results"},Jo("No results found.")),c&&u.a.element.createElement(ea,{className:"next-page",onClick:function(){return f()}},"Next page"))))};na.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postTypes:a.a.arrayOf(a.a.string).isRequired,selection:a.a.array,onToggleSelected:a.a.func.isRequired,termFilters:a.a.arrayOf(a.a.string),hasPrev:a.a.bool.isRequired,hasMore:a.a.bool.isRequired,onPrevPostsPage:a.a.func.isRequired,onNextPostsPage:a.a.func.isRequired,onApplyFilters:a.a.func.isRequired};var ra=na;function oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t1,isLoading:!1})})).catch((function(){}))}}},{key:"render",value:function(){var e=this,t=this.state,n=t.filters,r=t.posts,o=t.hasPrev,a=t.hasMore,i=t.isLoading,s=this.props,l=s.selection,u=s.onToggleSelected,c=s.termFilters,p=s.postType,f=s.showDateFilters;return wp.element.createElement(ra,{filters:n,hasMore:a,hasPrev:o,isLoading:i,posts:r,postTypes:Array.isArray(p)?p:[p],selection:l,showDateFilters:f,termFilters:c,onApplyFilters:function(t){return e.applyFilters(t)},onNextPostsPage:function(){return e.nextPage()},onPrevPostsPage:function(){return e.prevPage()},onToggleSelected:u})}},{key:"nextPage",value:function(){var e=this;this.setState({page:this.state.page+1},(function(){return e.fetchPosts()}))}},{key:"prevPage",value:function(){var e=this;this.setState({page:this.state.page-1},(function(){return e.fetchPosts()}))}},{key:"applyFilters",value:function(e){var t=this,n=this.state,r=n.filters,o=n.page,a=!J()(r,e);this.setState({filters:e,page:a?1:o},(function(){return t.fetchPosts()}))}}]),n}(s.a.Component);ua.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postType:a.a.arrayOf(a.a.string).isRequired,selection:a.a.arrayOf(a.a.object).isRequired,onToggleSelected:a.a.func.isRequired,termFilters:a.a.arrayOf(a.a.string)};var ca=ua,pa=u.a.i18n.__,fa=u.a.components.Button,da=function(e){var t=e.modalTitle,n=e.onClose,r=e.modalRef,o=e.modalContent,a=e.modalToolbar;return u.a.element.createElement("div",{className:"post-select post-select-modal"},u.a.element.createElement("div",{className:"media-modal-backdrop"}),u.a.element.createElement("div",{ref:r,"aria-labelledby":"media-modal-title","aria-modal":"true",className:"modal media-modal wp-core-ui",role:"dialog",tabIndex:"-1",onKeyDown:function(e){return 27===e.keyCode&&n()}},u.a.element.createElement(fa,{className:"media-modal-close",onClick:function(){return n()}},u.a.element.createElement("span",{className:"media-modal-icon"},u.a.element.createElement("span",{className:"screen-reader-text"},pa("Close modal","hm-gb-tools")))),u.a.element.createElement("div",{className:"media-frame-title"},u.a.element.createElement("h1",{id:"media-modal-title"},t)),u.a.element.createElement("div",{className:"media-modal-content"},o),u.a.element.createElement("div",{className:"media-frame-toolbar"},u.a.element.createElement("div",{className:"media-toolbar"},a))))};da.propTypes={onClose:a.a.func.isRequired,modalTitle:a.a.string.isRequired,modalContent:a.a.node.isRequired,modalToolbar:a.a.node.isRequired,modalRef:a.a.node.isRequired};var ma=da,ha=u.a.components,va=ha.Button,ba=ha.Dashicon,ga=function(e){var t=e.text,n=e.icon,r=e.onClick,o=e.disabled;return u.a.element.createElement(va,{className:"post-list-item-remove",disabled:o,isSmall:!0,onClick:r},u.a.element.createElement(ba,{icon:n}),u.a.element.createElement("span",{className:"screen-reader-text"},t))};ga.propTypes={id:a.a.string.isRequired,text:a.a.string.isRequired,icon:a.a.string.isRequired,onClick:a.a.func.isRequired,disabled:a.a.bool},ga.defaultProps={disabled:!1};var ya=ga,Oa=u.a.components.Spinner,xa=u.a.i18n.__,wa=function(e){var t=e.post,n=e.thumbnail,r=e.author,o=e.postTypeObject,a=e.isSelected,s=e.actions;return u.a.element.createElement("li",{className:Ho()("post-list-item post-list-item--selection",{"post-list-item--selected":a,"post-list-item--has-thumbnail":n})},t?u.a.element.createElement(i.Fragment,null,n?u.a.element.createElement("img",{alt:qo.a.sanitize(t.title.rendered),className:"post-list-item--image",src:n.media_details.sizes.thumbnail.source_url}):"",u.a.element.createElement("div",{className:"post-list-item--inner"},u.a.element.createElement("h2",{dangerouslySetInnerHTML:{__html:qo.a.sanitize(t.title.rendered)}}),u.a.element.createElement("div",{className:"post-list-item--meta"},o&&u.a.element.createElement("span",null,u.a.element.createElement("b",null,xa("Type:","hm-gb-tools"))," ",o.labels.singular_name),u.a.element.createElement("span",null,u.a.element.createElement("b",null,xa("Status:","hm-gb-tools"))," ",t.status),u.a.element.createElement("span",null,u.a.element.createElement("b",null,xa("Published / Last Modified:","hm-gb-tools"))," ",$o()(t.date_gmt).format("Do MMM, YYYY")),r&&u.a.element.createElement("span",null,u.a.element.createElement("b",null,"Author:")," ",r.name)),u.a.element.createElement("div",{className:"post-list-item-actions"},s.map((function(e){return u.a.element.createElement(ya,E()({key:e.id},e))}))))):u.a.element.createElement(Oa,null))};wa.propTypes={post:a.a.object,thumbnail:a.a.object,isSelected:a.a.bool,actions:a.a.array},wa.defaultProps={actions:[],onSelectItem:function(){}};var Sa=wa;function Ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t0?u.a.element.createElement("ol",{className:"post-list"},t.map((function(e){return u.a.element.createElement(_a,{key:e.id,actions:[{id:"move-post-up",text:Ta("Move post up","hm-gb-tools"),icon:"arrow-up-alt2",disabled:e.id===t[0].id,onClick:function(){return r(e)}},{id:"move-post-down",text:Ta("Move post down","hm-gb-tools"),icon:"arrow-down-alt2",disabled:e.id===t[t.length-1].id,onClick:function(){return o(e)}},{id:"remove-post",text:Ta("Remove post from selections","hm-gb-tools"),icon:"dismiss",onClick:function(){return n(e)}}],post:e,postType:e.type})}))):u.a.element.createElement("p",{className:"no-selection"},Ta("Nothing selected","hm-gb-tools")))};Ca.propTypes={selection:a.a.arrayOf(a.a.object).isRequired,onRemoveItem:a.a.func.isRequired,onMoveItemUp:a.a.func.isRequired,onMoveItemDown:a.a.func.isRequired};var ja=Ca,ka=u.a.components.Button,Ma=u.a.i18n.__,Ra=function(e){var t=e.filters,n=e.modalTitle,r=e.postType,o=e.onSelect,a=e.onClose,s=e.onToggleSelected,l=e.onMoveItemUp,c=e.onMoveItemDown,p=e.onChangeContentState,f=e.contentState,d=e.termFilters,m=e.selection,h=e.showDateFilters,v=e.modalRef,b=e.isLoading,g=u.a.element.createElement(i.Fragment,null,u.a.element.createElement(ka,{isPrimary:!0,onClick:function(){return o()}},"Select"),"selection"!==f&&u.a.element.createElement(ka,{isPrimary:!1,onClick:function(){return p("selection")}},Ma("Manage current selection","hm-gb-tools")),"browse"!==f&&u.a.element.createElement(ka,{isPrimary:!1,onClick:function(){return p("browse")}},Ma("Browse posts","hm-gb-tools"))),y=u.a.element.createElement(i.Fragment,null,"browse"===f&&u.a.element.createElement(ca,{filters:t,postType:r,selection:m,showDateFilters:h,termFilters:d,onToggleSelected:s}),"selection"===f&&u.a.element.createElement(ja,{postType:r,selection:m,onMoveItemDown:c,onMoveItemUp:l,onRemoveItem:s}));return u.a.element.createElement(ma,{modalContent:b?u.a.element.createElement(i.Fragment,null):y,modalRef:v,modalTitle:n,modalToolbar:g,onClose:a})};Ra.defaultProps={modalTitle:Ma("Select a post","hm-gb-tools"),contentState:"browse",selection:[]},Ra.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postType:a.a.array.isRequired,modalTitle:a.a.string,onSelect:a.a.func.isRequired,onClose:a.a.func.isRequired,onToggleSelected:a.a.func.isRequired,onMoveItemUp:a.a.func.isRequired,onMoveItemDown:a.a.func.isRequired,onChangeContentState:a.a.func.isRequired,contentState:a.a.string.isRequired,termFilters:a.a.array,selection:a.a.arrayOf(a.a.object),modalRef:a.a.func.isRequired,showDateFilters:a.a.bool};var Ia=Ra,Aa=function(e,t){var n=X()(e);return n.splice(t,1),n},Da=function(e,t){var n=X()(e);if(t<1)return n;var r=e[t-1],o=X()(n.splice(t,1));return n.splice.apply(n,[n.indexOf(r),0].concat(X()(o))),n},La=function(e,t){var n=X()(e);if(!(t>e.length-1)){var r=e[t+1],o=X()(n.splice(t,1));return n.splice.apply(n,[n.indexOf(r)+1,0].concat(X()(o))),n}};function Na(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(ce){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 z()(this,n)}}var Fa=u.a.i18n,Va=Fa.sprintf,Ua=Fa.__,za=function(e){V()(n,e);var t=Na(n);function n(e){var r;return I()(this,n),(r=t.call(this,e)).state={isLoadingSelection:!0,selection:[],contentState:"browse"},r}return D()(n,[{key:"componentDidMount",value:function(){this.fetchSelection(),this.modalElement&&this.modalElement.focus()}},{key:"componentDidUpdate",value:function(e,t){this.modalElement&&this.state.contentState!==t.contentState&&this.modalElement&&this.modalElement.focus()}},{key:"fetchSelection",value:function(){var e=this;this.setState({isLoadingSelection:!0});var t=Array.isArray(this.props.postType)?this.props.postType:[this.props.postType];(function(e,t){return!e||e.length<1?Promise.resolve([]):new Promise((function(n){so({path:ao(io,{include:e,per_page:e.length,context:"view",types:t.map((function(e){return e.slug}))})}).then((function(e){var t=Z()(e,2),r=t[0],o=t[1];n(r,o)})).catch((function(){}))}))})(this.props.value,t).then((function(t){return e.setState({isLoadingSelection:!1,selection:t})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.filters,r=t.onClose,o=t.modalTitle,a=t.showDateFilters,i=t.termFilters,s=t.onSelect,l=this.state,c=l.selection,p=l.contentState,f=l.isLoadingSelection,d=Array.isArray(this.props.postType)?this.props.postType:[this.props.postType];return u.a.element.createElement(Ia,{contentState:p,filters:n,isLoading:f,modalRef:function(t){return e.modalElement=t},modalTitle:o,postType:d,selection:c,showDateFilters:a,termFilters:i,onChangeContentState:function(t){return e.setState({contentState:t})},onClose:r,onMoveItemDown:function(t){return e.moveDown(t)},onMoveItemUp:function(t){return e.moveUp(t)},onSelect:function(){return s(c)},onToggleSelected:function(t){return e.toggleSelected(t)}})}},{key:"moveUp",value:function(e){var t=this.state.selection.findIndex((function(t){return t.id===e.id}));this.setState({selection:Da(this.state.selection,t)})}},{key:"moveDown",value:function(e){var t=this.state.selection.findIndex((function(t){return t.id===e.id}));this.setState({selection:La(this.state.selection,t)})}},{key:"toggleSelected",value:function(e){var t=this.state.selection,n=this.props.maxPosts,r=t.findIndex((function(t){return t.id===e.id}));if(r>=0)this.setState({selection:Aa(t,r)});else if(n&&1===n)this.setState({selection:[e]});else{if(n&&t.length>=n)return void alert(Va(Ua("Max number %d reached.","hm-gb-tools"),n));this.setState({selection:[].concat(X()(t),[e])})}}}]),n}(s.a.Component);za.defaultProps={minPosts:0,maxPosts:0,postType:["post"],showDateFilters:!1,value:[],modalTitle:Ua("Select a post","hm-gb-tools")},za.propTypes={filters:a.a.objectOf(a.a.arrayOf(a.a.number)),postType:a.a.oneOfType([a.a.string,a.a.array]),minPosts:a.a.number,maxPosts:a.a.number,onSelect:a.a.func.isRequired,onClose:a.a.func.isRequired,modalTitle:a.a.string,showDateFilters:a.a.bool,termFilters:a.a.arrayOf(a.a.string)};var Ha=za;function Ba(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t0&&u.a.element.createElement(M,{postIds:a,postType:i.postType||"post"}))};Za.defaultProps={btnText:Ka("Select post"),postSelectProps:{btnProps:{}}},Za.propTypes={label:a.a.string.isRequired,help:a.a.string,id:a.a.string,onChange:a.a.func.isRequired,value:a.a.arrayOf(a.a.number).isRequired,postSelectProps:a.a.object,btnText:a.a.string};var Qa=Za;function Ja(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ei(e){for(var t=1;t