Plugin Directory

Changeset 3127796


Ignore:
Timestamp:
07/30/2024 05:16:08 AM (18 months ago)
Author:
shamimmoeen
Message:

Releasing v4.2.1

Location:
wc-ajax-product-filter/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wc-ajax-product-filter/trunk/build/form.asset.php

    r2958786 r3127796  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '0321c282eacc11187716');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '1b8ae0a7a36930c38239');
  • wc-ajax-product-filter/trunk/build/form.js

    r2958786 r3127796  
    1 !function(){var e={601:function(e,t){"use strict";t.Z=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return r(e[0],e[1])||null;var n=e.slice(1).reduce((function(e,t){return r(e,t)}),e[0]);return n||null};var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var o=r.get(t)||function(n){a(e,n),a(t,n)};return r.set(t,o),o}return e||t}function a(e,t){"function"==typeof e?e(t):e.current=t}},669:function(e,t,n){e.exports=n(609)},448:function(e,t,n){"use strict";var r=n(867),a=n(26),o=n(372),i=n(327),l=n(97),s=n(109),c=n(985),u=n(874),d=n(648),p=n(644),f=n(205);e.exports=function(e){return new Promise((function(t,n){var m,h=e.data,_=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}r.isFormData(h)&&r.isStandardBrowserEnv()&&delete _["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(y+":"+w)}var x=l(e.baseURL,e.url);function E(){if(b){var r="getAllResponseHeaders"in b?s(b.getAllResponseHeaders()):null,o={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};a((function(e){t(e),g()}),(function(e){n(e),g()}),o),b=null}}if(b.open(e.method.toUpperCase(),i(x,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=E:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(E)},b.onabort=function(){b&&(n(new d("Request aborted",d.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(x))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;C&&(_[e.xsrfHeaderName]=C)}"setRequestHeader"in b&&r.forEach(_,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete _[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),v&&"json"!==v&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){b&&(n(!e||e&&e.type?new p:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),h||(h=null);var S=f(x);S&&-1===["http","https","file"].indexOf(S)?n(new d("Unsupported protocol "+S+":",d.ERR_BAD_REQUEST,e)):b.send(h)}))}},609:function(e,t,n){"use strict";var r=n(867),a=n(849),o=n(321),i=n(185),l=function e(t){var n=new o(t),l=a(o.prototype.request,n);return r.extend(l,o.prototype,n),r.extend(l,n),l.create=function(n){return e(i(t,n))},l}(n(546));l.Axios=o,l.CanceledError=n(644),l.CancelToken=n(972),l.isCancel=n(502),l.VERSION=n(288).version,l.toFormData=n(675),l.AxiosError=n(648),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=n(713),l.isAxiosError=n(268),e.exports=l,e.exports.default=l},972:function(e,t,n){"use strict";var r=n(644);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},a.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},644:function(e,t,n){"use strict";var r=n(648);function a(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(867).inherits(a,r,{__CANCEL__:!0}),e.exports=a},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(867),a=n(327),o=n(782),i=n(572),l=n(185),s=n(97),c=n(875),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=l(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!a){var d=[i,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(s),o=Promise.resolve(t);d.length;)o=o.then(d.shift(),d.shift());return o}for(var p=t;r.length;){var f=r.shift(),m=r.shift();try{p=f(p)}catch(e){m(e);break}}try{o=i(p)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},d.prototype.getUri=function(e){e=l(this.defaults,e);var t=s(e.baseURL,e.url);return a(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(l(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(l(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},648:function(e,t,n){"use strict";var r=n(867);function a(e,t,n,r,a){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}r.inherits(a,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=a.prototype,i={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){i[e]={value:e}})),Object.defineProperties(a,i),Object.defineProperty(o,"isAxiosError",{value:!0}),a.from=function(e,t,n,i,l,s){var c=Object.create(o);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),a.call(c,e.message,t,n,i,l),c.name=e.name,s&&Object.assign(c,s),c},e.exports=a},782:function(e,t,n){"use strict";var r=n(867);function a(){this.handlers=[]}a.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},97:function(e,t,n){"use strict";var r=n(793),a=n(303);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},572:function(e,t,n){"use strict";var r=n(867),a=n(527),o=n(502),i=n(546),l=n(644);function s(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new l}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},185:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function a(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:a(void 0,e[n]):a(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return a(void 0,t[e])}function l(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:a(void 0,e[n]):a(void 0,t[n])}function s(n){return n in t?a(e[n],t[n]):n in e?a(void 0,e[n]):void 0}var c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,a=t(e);r.isUndefined(a)&&t!==s||(n[e]=a)})),n}},26:function(e,t,n){"use strict";var r=n(648);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},527:function(e,t,n){"use strict";var r=n(867),a=n(546);e.exports=function(e,t,n){var o=this||a;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},546:function(e,t,n){"use strict";var r=n(867),a=n(16),o=n(648),i=n(874),l=n(675),s={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:i,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(448)),u),transformRequest:[function(e,t){if(a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,o=r.isObject(e),i=t&&t["Content-Type"];if((n=r.isFileList(e))||o&&"multipart/form-data"===i){var s=this.env&&this.env.FormData;return l(n?{"files[]":e}:e,s&&new s)}return o||"application/json"===i?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){d.headers[e]=r.merge(s)})),e.exports=d},874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:function(e){e.exports={version:"0.27.2"}},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},327:function(e,t,n){"use strict";var r=n(867);function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(a(t)+"="+a(e))})))})),o=i.join("&")}if(o){var l=e.indexOf("#");-1!==l&&(e=e.slice(0,l)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,a,o,i){var l=[];l.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),r.isString(a)&&l.push("path="+a),r.isString(o)&&l.push("domain="+o),!0===i&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},268:function(e,t,n){"use strict";var r=n(867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},985:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},623:function(e){e.exports=null},109:function(e,t,n){"use strict";var r=n(867),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,i={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(i[t]&&a.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},205:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},675:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||new FormData;var n=[];function a(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,i){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+i);n.push(o),r.forEach(o,(function(n,o){if(!r.isUndefined(n)){var l,s=i?i+"."+o:o;if(n&&!i&&"object"==typeof n)if(r.endsWith(o,"{}"))n=JSON.stringify(n);else if(r.endsWith(o,"[]")&&(l=r.toArray(n)))return void l.forEach((function(e){!r.isUndefined(e)&&t.append(s,a(e))}));e(n,s)}})),n.pop()}else t.append(i,a(o))}(e),t}},875:function(e,t,n){"use strict";var r=n(288).version,a=n(648),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,l){if(!1===e)throw new a(o(r," has been removed"+(t?" in "+t:"")),a.ERR_DEPRECATED);return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,l)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new a("options must be an object",a.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],l=t[i];if(l){var s=e[i],c=void 0===s||l(s,i,e);if(!0!==c)throw new a("option "+i+" must be "+c,a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new a("Unknown option "+i,a.ERR_BAD_OPTION)}},validators:o}},867:function(e,t,n){"use strict";var r,a=n(849),o=Object.prototype.toString,i=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function l(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function s(e){return Array.isArray(e)}function c(e){return void 0===e}var u=l("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=l("Date"),m=l("File"),h=l("Blob"),_=l("FileList");function v(e){return"[object Function]"===o.call(e)}var g=l("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}var y,w=(y="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return y&&e instanceof y});e.exports={isArray:s,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||v(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:p,isUndefined:c,isDate:f,isFile:m,isBlob:h,isFunction:v,isStream:function(e){return d(e)&&v(e.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):s(n)?t[r]=n.slice():t[r]=n}for(var r=0,a=arguments.length;r<a;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&"function"==typeof t?a(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,a,o,i={};t=t||{};do{for(a=(r=Object.getOwnPropertyNames(e)).length;a-- >0;)i[o=r[a]]||(t[o]=e[o],i[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:l,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:_}},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var l in n)r.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},679:function(e,t,n){"use strict";var r=n(864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={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},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),_=0;_<i.length;++_){var v=i[_];if(!(o[v]||r&&r[v]||h&&h[v]||l&&l[v])){var g=p(n,v);try{c(t,v,g)}catch(e){}}}}return t}},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,l,s=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(s[u]=i[u]);if(t){l=t(i);for(var d=0;d<l.length;d++)r.call(i,l[d])&&(s[l[d]]=i[l[d]])}}return s}},921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,y=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case l:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case _:case h:case s:return e;default:return t}}case a:return t}}}function x(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=_,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||w(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===_},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b||e.$$typeof===y||e.$$typeof===v)},t.typeOf=w},864:function(e,t,n){"use strict";e.exports=n(921)},941:function(e,t,n){var r=n(474),a=n(184),o=n(196),i=n(177);function l(e){return e&&e.__esModule?e.default:e}function s(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const r=e.children[n]||null;e.insertBefore(t,r)}(e.parentElement,e.element,e.oldIndex)}))}function p(e,t){const n=h(e),r={parentElement:e.from};let a=[];switch(n){case"normal":a=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":a=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...r},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...r}];break;case"multidrag":a=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...r})))}const o=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(a,t);return o}function f(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function m(e,t,n,r){const a=[...t];return e.forEach((e=>{const t=r&&n&&r(e.item,n);a.splice(e.newIndex,0,t||e.item)})),a}function h(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(e.exports,"ReactSortable",(()=>v));const _={dragging:null};class v extends o.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,o.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,_),l(i)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();l(r).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:r}=this.props,a={style:t,className:n,id:r},i=e&&null!==e?e:"div";return(0,o.createElement)(i,{ref:this.ref,...a},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const f=t||"data-id";return o.Children.map(e,((e,t)=>{if(void 0===e)return;const i=p[t]||{},{className:s}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!i.filtered},u=l(a)(s,{[n]:i.selected,[r]:i.chosen,...c});return(0,o.cloneElement)(e,{[f]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:r,tag:a,style:o,className:i,clone:l,onAdd:s,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:f,onRemove:m,onSort:h,onStart:_,onUnchoose:v,onUpdate:g,onMove:b,onSpill:y,onSelect:w,onDeselect:x,...E}=e;return E}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;const a=n(e,t,this.sortable,_);return void 0!==a&&a}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,_)}onAdd(e){const{list:t,setList:n,clone:r}=this.props,a=p(e,[..._.dragging.props.list]);u(a),n(m(a,t,e,r).map((e=>Object.assign(e,{selected:!1}))),this.sortable,_)}onRemove(e){const{list:t,setList:n}=this.props,r=h(e),a=p(e,t);d(a);let o=[...t];if("clone"!==e.pullMode)o=f(a,o);else{let t=a;switch(r){case"multidrag":t=a.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=a.map((t=>({...t,element:e.clone})));break;default:l(i)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}u(t),a.forEach((t=>{const n=t.oldIndex,r=this.props.clone(t.item,e);o.splice(n,1,r)}))}o=o.map((e=>Object.assign(e,{selected:!1}))),n(o,this.sortable,_)}onUpdate(e){const{list:t,setList:n}=this.props,r=p(e,t);return u(r),d(r),n(function(e,t){return m(e,f(e,t))}(r,t),this.sortable,_)}onStart(){_.dragging=this}onEnd(){_.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r})),this.sortable,_)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r})),this.sortable,_)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);r[n].selected=!0})),n(r,this.sortable,_)}onDeselect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(r[t].selected=!0)})),n(r,this.sortable,_)}}var g,b;g=e.exports,b={},Object.keys(b).forEach((function(e){"default"===e||"__esModule"===e||g.hasOwnProperty(e)||Object.defineProperty(g,e,{enumerable:!0,get:function(){return b[e]}})}))},251:function(e,t,n){"use strict";n(418);var r=n(196),a=60103;if("function"==typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),o("react.fragment")}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:i.current}}},893:function(e,t,n){"use strict";e.exports=n(251)},474:function(e,t,n){"use strict";function r(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return o="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},o(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:function(){return yt},Sortable:function(){return Be},Swap:function(){return ct}});var d=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=u(/Edge/i),f=u(/firefox/i),m=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),h=u(/iP(ad|od|hone)/i),_=u(/chrome/i)&&u(/android/i),v={capture:!1,passive:!1};function g(e,t,n){e.addEventListener(t,n,!d&&v)}function b(e,t,n){e.removeEventListener(t,n,!d&&v)}function y(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function x(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&y(e,t):y(e,t))||r&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var E,C=/\s+/g;function S(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(C," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(C," ")}}function O(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function j(e,t){var n="";if("string"==typeof e)n=e;else do{var r=O(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function T(e,t,n){if(e){var r=e.getElementsByTagName(t),a=0,o=r.length;if(n)for(;a<o;a++)n(r[a],a);return r}return[]}function k(){return document.scrollingElement||document.documentElement}function N(e,t,n,r,a){if(e.getBoundingClientRect||e===window){var o,i,l,s,c,u,p;if(e!==window&&e.parentNode&&e!==k()?(i=(o=e.getBoundingClientRect()).top,l=o.left,s=o.bottom,c=o.right,u=o.height,p=o.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!d))do{if(a&&a.getBoundingClientRect&&("none"!==O(a,"transform")||n&&"static"!==O(a,"position"))){var f=a.getBoundingClientRect();i-=f.top+parseInt(O(a,"border-top-width")),l-=f.left+parseInt(O(a,"border-left-width")),s=i+o.height,c=l+o.width;break}}while(a=a.parentNode);if(r&&e!==window){var m=j(a||e),h=m&&m.a,_=m&&m.d;m&&(s=(i/=_)+(u/=_),c=(l/=h)+(p/=h))}return{top:i,left:l,bottom:s,right:c,width:p,height:u}}}function D(e,t,n){for(var r=A(e,!0),a=N(e)[t];r;){var o=N(r)[n];if(!("top"===n||"left"===n?a>=o:a<=o))return r;if(r===k())break;r=A(r,!1)}return!1}function I(e,t,n,r){for(var a=0,o=0,i=e.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Be.ghost&&(r||i[o]!==Be.dragged)&&x(i[o],n.draggable,e,!1)){if(a===t)return i[o];a++}o++}return null}function M(e,t){for(var n=e.lastElementChild;n&&(n===Be.ghost||"none"===O(n,"display")||t&&!y(n,t));)n=n.previousElementSibling;return n||null}function F(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Be.clone||t&&!y(e,t)||n++;return n}function P(e){var t=0,n=0,r=k();if(e)do{var a=j(e),o=a.a,i=a.d;t+=e.scrollLeft*o,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function A(e,t){if(!e||!e.getBoundingClientRect)return k();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=O(n);if(n.clientWidth<n.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!n.getBoundingClientRect||n===document.body)return k();if(r||t)return n;r=!0}}}while(n=n.parentNode);return k()}function R(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function L(e,t){return function(){if(!E){var n=arguments,r=this;1===n.length?e.call(r,n[0]):e.apply(r,n),E=setTimeout((function(){E=void 0}),t)}}}function V(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function H(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function B(e,t){O(e,"position","absolute"),O(e,"top",t.top),O(e,"left",t.left),O(e,"width",t.width),O(e,"height",t.height)}function U(e){O(e,"position",""),O(e,"top",""),O(e,"left",""),O(e,"width",""),O(e,"height","")}var $="Sortable"+(new Date).getTime();var z=[],W={initializeByDefault:!0},q={mount:function(e){for(var t in W)W.hasOwnProperty(t)&&!(t in e)&&(e[t]=W[t]);z.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),z.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";z.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](a({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](a({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var a in z.forEach((function(r){var a=r.pluginName;if(e.options[a]||r.initializeByDefault){var o=new r(e,t,e.options);o.sortable=e,o.options=e.options,e[a]=o,l(n,o.defaults)}})),e.options)if(e.options.hasOwnProperty(a)){var o=this.modifyOption(e,a,e.options[a]);void 0!==o&&(e.options[a]=o)}},getEventProperties:function(e,t){var n={};return z.forEach((function(r){"function"==typeof r.eventProperties&&l(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return z.forEach((function(a){e[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[t]&&(r=a.optionListeners[t].call(e[a.pluginName],n))})),r}};function G(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,i=e.cloneEl,l=e.toEl,s=e.fromEl,c=e.oldIndex,u=e.newIndex,f=e.oldDraggableIndex,m=e.newDraggableIndex,h=e.originalEvent,_=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[$]){var g,b=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||d||p?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=l||n,g.from=s||n,g.item=o||n,g.clone=i,g.oldIndex=c,g.newIndex=u,g.oldDraggableIndex=f,g.newDraggableIndex=m,g.originalEvent=h,g.pullMode=_?_.lastPutMode:void 0;var w=a(a({},v),q.getEventProperties(r,t));for(var x in w)g[x]=w[x];n&&n.dispatchEvent(g),b[y]&&b[y].call(t,g)}}var Y=["evt"],X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=s(n,Y);q.pluginEvent.bind(Be)(e,t,a({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:re,cloneHidden:ae,dragStarted:ve,putSortable:ue,activeSortable:Be.active,originalEvent:r,oldIndex:oe,oldDraggableIndex:le,newIndex:ie,newDraggableIndex:se,hideGhostForTarget:Re,unhideGhostForTarget:Le,cloneNowHidden:function(){ae=!0},cloneNowShown:function(){ae=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:r})}},o))};function K(e){G(a({putSortable:ue,cloneEl:re,targetEl:Z,rootEl:ee,oldIndex:oe,oldDraggableIndex:le,newIndex:ie,newDraggableIndex:se},e))}var Z,J,Q,ee,te,ne,re,ae,oe,ie,le,se,ce,ue,de,pe,fe,me,he,_e,ve,ge,be,ye,we,xe=!1,Ee=!1,Ce=[],Se=!1,Oe=!1,je=[],Te=!1,ke=[],Ne="undefined"!=typeof document,De=h,Ie=p||d?"cssFloat":"float",Me=Ne&&!_&&!h&&"draggable"in document.createElement("div"),Fe=function(){if(Ne){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var n=O(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=I(e,0,t),o=I(e,1,t),i=a&&O(a),l=o&&O(o),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+N(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+N(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!o||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=r&&"none"===n[Ie]||o&&"none"===n[Ie]&&s+c>r)?"vertical":"horizontal"},Ae=function(e){function t(e,n){return function(r,a,o,i){var l=r.options.group.name&&a.options.group.name&&r.options.group.name===a.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,a,o,i),n)(r,a,o,i);var s=(n?r:a).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},r=e.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Re=function(){!Fe&&Q&&O(Q,"display","none")},Le=function(){!Fe&&Q&&O(Q,"display","")};Ne&&!_&&document.addEventListener("click",(function(e){if(Ee)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ee=!1,!1}),!0);var Ve=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(a=e.clientX,o=e.clientY,Ce.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!M(e)){var n=N(e),r=a>=n.left-t&&a<=n.right+t,l=o>=n.top-t&&o<=n.bottom+t;return r&&l?i=e:void 0}})),i);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var a,o,i},He=function(e){Z&&Z.parentNode[$]._isOutsideThisEl(e.target)};function Be(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=l({},t),e[$]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Be.supportPointer&&"PointerEvent"in window&&!m,emptyInsertThreshold:5};for(var i in q.initializePlugins(this,e,o),o)!(i in t)&&(t[i]=o[i]);for(var s in Ae(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Me,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?g(e,"pointerdown",this._onTapStart):(g(e,"mousedown",this._onTapStart),g(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(e,"dragover",this),g(e,"dragenter",this)),Ce.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),l(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==O(e,"display")&&e!==Be.ghost){r.push({target:e,rect:N(e)});var t=a({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=j(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var a=!1,o=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,l=N(r),s=r.prevFromRect,c=r.prevToRect,u=e.rect,d=j(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&R(s,l)&&!R(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(u,s,c,t.options)),R(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=t.options.animation),t.animate(r,u,l,n)),n&&(a=!0,o=Math.max(o,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),a?n=setTimeout((function(){"function"==typeof e&&e()}),o):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){O(e,"transition",""),O(e,"transform","");var a=j(this.el),o=a&&a.a,i=a&&a.d,l=(t.left-n.left)/(o||1),s=(t.top-n.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,O(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),O(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),O(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){O(e,"transition",""),O(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function Ue(e,t,n,r,a,o,i,l){var s,c,u=e[$],f=u.options.onMove;return!window.CustomEvent||d||p?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=r,s.related=a||t,s.relatedRect=o||N(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),f&&(c=f.call(u,s,i)),c}function $e(e){e.draggable=!1}function ze(){Te=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function qe(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}Be.prototype={constructor:Be,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ge=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,a=r.preventOnFilter,o=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=r.filter;if(function(e){ke.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&ke.push(r)}}(n),!Z&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!m||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=x(l,r.draggable,n,!1))&&l.animated||ne===l)){if(oe=F(l),le=F(l,r.draggable),"function"==typeof c){if(c.call(this,e,l,this))return K({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),X("filter",t,{evt:e}),void(a&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=x(s,r.trim(),n,!1))return K({sortable:t,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),X("filter",t,{evt:e}),!0}))))return void(a&&e.cancelable&&e.preventDefault());r.handle&&!x(s,r.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var r,a=this,o=a.el,i=a.options,l=o.ownerDocument;if(n&&!Z&&n.parentNode===o){var s=N(n);if(ee=o,J=(Z=n).parentNode,te=Z.nextSibling,ne=n,ce=i.group,Be.dragged=Z,de={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},he=de.clientX-s.left,_e=de.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",r=function(){X("delayEnded",a,{evt:e}),Be.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!f&&a.nativeDraggable&&(Z.draggable=!0),a._triggerDragStart(e,t),K({sortable:a,name:"choose",originalEvent:e}),S(Z,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){T(Z,e.trim(),$e)})),g(l,"dragover",Ve),g(l,"mousemove",Ve),g(l,"touchmove",Ve),g(l,"mouseup",a._onDrop),g(l,"touchend",a._onDrop),g(l,"touchcancel",a._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),X("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(p||d))r();else{if(Be.eventCanceled)return void this._onDrop();g(l,"mouseup",a._disableDelayedDrag),g(l,"touchend",a._disableDelayedDrag),g(l,"touchcancel",a._disableDelayedDrag),g(l,"mousemove",a._delayedDragTouchMoveHandler),g(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&g(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&$e(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,t?"touchmove":"mousemove",this._onTouchMove):(g(Z,"dragend",this),g(ee,"dragstart",this._onDragStart));try{document.selection?qe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(xe=!1,ee&&Z){X("dragStarted",this,{evt:t}),this.nativeDraggable&&g(document,"dragover",He);var n=this.options;!e&&S(Z,n.dragClass,!1),S(Z,n.ghostClass,!0),Be.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Re();for(var e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==t;)t=e;if(Z.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Le()}},_onTouchMove:function(e){if(de){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,a=e.touches?e.touches[0]:e,o=Q&&j(Q,!0),i=Q&&o&&o.a,l=Q&&o&&o.d,s=De&&we&&P(we),c=(a.clientX-de.clientX+r.x)/(i||1)+(s?s[0]-je[0]:0)/(i||1),u=(a.clientY-de.clientY+r.y)/(l||1)+(s?s[1]-je[1]:0)/(l||1);if(!Be.active&&!xe){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Q){o?(o.e+=c-(fe||0),o.f+=u-(me||0)):o={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");O(Q,"webkitTransform",d),O(Q,"mozTransform",d),O(Q,"msTransform",d),O(Q,"transform",d),fe=c,me=u,pe=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,t=N(Z,!0,De,!0,e),n=this.options;if(De){for(we=e;"static"===O(we,"position")&&"none"===O(we,"transform")&&we!==document;)we=we.parentNode;we!==document.body&&we!==document.documentElement?(we===document&&(we=k()),t.top+=we.scrollTop,t.left+=we.scrollLeft):we=k(),je=P(we)}S(Q=Z.cloneNode(!0),n.ghostClass,!1),S(Q,n.fallbackClass,!0),S(Q,n.dragClass,!0),O(Q,"transition",""),O(Q,"transform",""),O(Q,"box-sizing","border-box"),O(Q,"margin",0),O(Q,"top",t.top),O(Q,"left",t.left),O(Q,"width",t.width),O(Q,"height",t.height),O(Q,"opacity","0.8"),O(Q,"position",De?"absolute":"fixed"),O(Q,"zIndex","100000"),O(Q,"pointerEvents","none"),Be.ghost=Q,e.appendChild(Q),O(Q,"transform-origin",he/parseInt(Q.style.width)*100+"% "+_e/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,a=n.options;X("dragStart",this,{evt:e}),Be.eventCanceled?this._onDrop():(X("setupClone",this),Be.eventCanceled||((re=H(Z)).removeAttribute("id"),re.draggable=!1,re.style["will-change"]="",this._hideClone(),S(re,this.options.chosenClass,!1),Be.clone=re),n.cloneId=qe((function(){X("clone",n),Be.eventCanceled||(n.options.removeCloneOnHide||ee.insertBefore(re,Z),n._hideClone(),K({sortable:n,name:"clone"}))})),!t&&S(Z,a.dragClass,!0),t?(Ee=!0,n._loopId=setInterval(n._emulateDragOver,50)):(b(document,"mouseup",n._onDrop),b(document,"touchend",n._onDrop),b(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(n,r,Z)),g(document,"drop",n),O(Z,"transform","translateZ(0)")),xe=!0,n._dragStartId=qe(n._dragStarted.bind(n,t,e)),g(document,"selectstart",n),ve=!0,m&&O(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,l=e.target,s=this.options,c=s.group,u=Be.active,d=ce===c,p=s.sort,f=ue||u,m=this,h=!1;if(!Te){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=x(l,s.draggable,i,!0),L("dragOver"),Be.eventCanceled)return h;if(Z.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||m._ignoreWhileAnimating===l)return B(!1);if(Ee=!1,u&&!s.disabled&&(d?p||(r=J!==ee):ue===this||(this.lastPutMode=ce.checkPull(this,u,Z,e))&&c.checkPut(this,u,Z,e))){if(o="vertical"===this._getDirection(e,l),t=N(Z),L("dragOverValid"),Be.eventCanceled)return h;if(r)return J=ee,H(),this._hideClone(),L("revert"),Be.eventCanceled||(te?ee.insertBefore(Z,te):ee.appendChild(Z)),B(!0);var _=M(i,s.draggable);if(!_||function(e,t,n){var r=N(M(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,o,this)&&!_.animated){if(_===Z)return B(!1);if(_&&i===e.target&&(l=_),l&&(n=N(l)),!1!==Ue(ee,i,Z,t,l,n,e,!!l))return H(),_&&_.nextSibling?i.insertBefore(Z,_.nextSibling):i.appendChild(Z),J=i,U(),B(!0)}else if(_&&function(e,t,n){var r=N(I(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,o,this)){var v=I(i,0,s,!0);if(v===Z)return B(!1);if(n=N(l=v),!1!==Ue(ee,i,Z,t,l,n,e,!1))return H(),i.insertBefore(Z,v),J=i,U(),B(!0)}else if(l.parentNode===i){n=N(l);var g,b,y,w=Z.parentNode!==i,E=!function(e,t,n){var r=n?e.left:e.top,a=n?e.right:e.bottom,o=n?e.width:e.height,i=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return r===i||a===l||r+o/2===i+s/2}(Z.animated&&Z.toRect||t,l.animated&&l.toRect||n,o),C=o?"top":"left",j=D(l,"top","top")||D(Z,"top","top"),T=j?j.scrollTop:void 0;if(ge!==l&&(b=n[C],Se=!1,Oe=!E&&s.invertSwap||w),g=function(e,t,n,r,a,o,i,l){var s=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!i)if(l&&ye<c*a){if(!Se&&(1===be?s>u+c*o/2:s<d-c*o/2)&&(Se=!0),Se)p=!0;else if(1===be?s<u+ye:s>d-ye)return-be}else if(s>u+c*(1-a)/2&&s<d-c*(1-a)/2)return function(e){return F(Z)<F(e)?1:-1}(t);return(p=p||i)&&(s<u+c*o/2||s>d-c*o/2)?s>u+c/2?1:-1:0}(e,l,n,o,E?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Oe,ge===l),0!==g){var k=F(Z);do{k-=g,y=J.children[k]}while(y&&("none"===O(y,"display")||y===Q))}if(0===g||y===l)return B(!1);ge=l,be=g;var P=l.nextElementSibling,A=!1,R=Ue(ee,i,Z,t,l,n,e,A=1===g);if(!1!==R)return 1!==R&&-1!==R||(A=1===R),Te=!0,setTimeout(ze,30),H(),A&&!P?i.appendChild(Z):l.parentNode.insertBefore(Z,A?P:l),j&&V(j,0,T-j.scrollTop),J=Z.parentNode,void 0===b||Oe||(ye=Math.abs(b-N(l)[C])),U(),B(!0)}if(i.contains(Z))return B(!1)}return!1}function L(s,c){X(s,m,a({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:l,completed:B,onMove:function(n,r){return Ue(ee,i,Z,t,n,N(n),e,r)},changed:U},c))}function H(){L("dragOverAnimationCapture"),m.captureAnimationState(),m!==f&&f.captureAnimationState()}function B(t){return L("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(m),m!==f&&(S(Z,ue?ue.options.ghostClass:u.options.ghostClass,!1),S(Z,s.ghostClass,!0)),ue!==m&&m!==Be.active?ue=m:m===Be.active&&ue&&(ue=null),f===m&&(m._ignoreWhileAnimating=l),m.animateAll((function(){L("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===Z&&!Z.animated||l===i&&!l.animated)&&(ge=null),s.dragoverBubble||e.rootEl||l===document||(Z.parentNode[$]._isOutsideThisEl(e.target),!t&&Ve(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function U(){ie=F(Z),se=F(Z,s.draggable),K({sortable:m,name:"change",toEl:i,newIndex:ie,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Ve),b(document,"mousemove",Ve),b(document,"touchmove",Ve)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ie=F(Z),se=F(Z,n.draggable),X("drop",this,{evt:e}),J=Z&&Z.parentNode,ie=F(Z),se=F(Z,n.draggable),Be.eventCanceled||(xe=!1,Oe=!1,Se=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&O(document.body,"user-select",""),O(Z,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===J||ue&&"clone"!==ue.lastPutMode)&&re&&re.parentNode&&re.parentNode.removeChild(re),Z&&(this.nativeDraggable&&b(Z,"dragend",this),$e(Z),Z.style["will-change"]="",ve&&!xe&&S(Z,ue?ue.options.ghostClass:this.options.ghostClass,!1),S(Z,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==J?(ie>=0&&(K({rootEl:J,name:"add",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"remove",toEl:J,originalEvent:e}),K({rootEl:J,name:"sort",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),ue&&ue.save()):ie!==oe&&ie>=0&&(K({sortable:this,name:"update",toEl:J,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),Be.active&&(null!=ie&&-1!==ie||(ie=oe,se=le),K({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),ee=Z=J=Q=te=re=ne=ae=de=pe=ve=ie=se=oe=le=ge=be=ue=ce=Be.dragged=Be.ghost=Be.clone=Be.active=null,ke.forEach((function(e){e.checked=!0})),ke.length=fe=me=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,a=n.length,o=this.options;r<a;r++)x(e=n[r],o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||We(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var a=r.children[t];x(a,this.options.draggable,r,!1)&&(n[e]=a)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return x(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=q.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Ae(n)},destroy:function(){X("destroy",this);var e=this.el;e[$]=null,b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart),b(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ce.splice(Ce.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ae){if(X("hideClone",this),Be.eventCanceled)return;O(re,"display","none"),this.options.removeCloneOnHide&&re.parentNode&&re.parentNode.removeChild(re),ae=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ae){if(X("showClone",this),Be.eventCanceled)return;Z.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(re,te):ee.appendChild(re):ee.insertBefore(re,Z),this.options.group.revertClone&&this.animate(Z,re),O(re,"display",""),ae=!1}}else this._hideClone()}},Ne&&g(document,"touchmove",(function(e){(Be.active||xe)&&e.cancelable&&e.preventDefault()})),Be.utils={on:g,off:b,css:O,find:T,is:function(e,t){return!!x(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:L,closest:x,toggleClass:S,clone:H,index:F,nextTick:qe,cancelNextTick:Ge,detectDirection:Pe,getChild:I},Be.get=function(e){return e[$]},Be.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Be.utils=a(a({},Be.utils),e.utils)),q.mount(e)}))},Be.create=function(e,t){return new Be(e,t)},Be.version="1.15.0";var Ye,Xe,Ke,Ze,Je,Qe,et=[],tt=!1;function nt(){et.forEach((function(e){clearInterval(e.pid)})),et=[]}function rt(){clearInterval(Qe)}var at,ot=L((function(e,t,n,r){if(t.scroll){var a,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=k(),u=!1;Xe!==n&&(Xe=n,nt(),Ye=t.scroll,a=t.scrollFn,!0===Ye&&(Ye=A(n,!0)));var d=0,p=Ye;do{var f=p,m=N(f),h=m.top,_=m.bottom,v=m.left,g=m.right,b=m.width,y=m.height,w=void 0,x=void 0,E=f.scrollWidth,C=f.scrollHeight,S=O(f),j=f.scrollLeft,T=f.scrollTop;f===c?(w=b<E&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),x=y<C&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(w=b<E&&("auto"===S.overflowX||"scroll"===S.overflowX),x=y<C&&("auto"===S.overflowY||"scroll"===S.overflowY));var D=w&&(Math.abs(g-o)<=l&&j+b<E)-(Math.abs(v-o)<=l&&!!j),I=x&&(Math.abs(_-i)<=l&&T+y<C)-(Math.abs(h-i)<=l&&!!T);if(!et[d])for(var M=0;M<=d;M++)et[M]||(et[M]={});et[d].vx==D&&et[d].vy==I&&et[d].el===f||(et[d].el=f,et[d].vx=D,et[d].vy=I,clearInterval(et[d].pid),0==D&&0==I||(u=!0,et[d].pid=setInterval(function(){r&&0===this.layer&&Be.active._onTouchMove(Je);var t=et[this.layer].vy?et[this.layer].vy*s:0,n=et[this.layer].vx?et[this.layer].vx*s:0;"function"==typeof a&&"continue"!==a.call(Be.dragged.parentNode[$],n,t,e,Je,et[this.layer].el)||V(et[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=A(p,!1)));tt=u}}),30),it=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,a=e.activeSortable,o=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||a;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function lt(){}function st(){}function ct(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;at=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,a=e.activeSortable,o=e.changed,i=e.cancel;if(a.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=at;!1!==r(n)?(S(n,s.swapClass,!0),at=n):at=null,c&&c!==at&&S(c,s.swapClass,!1)}o(),t(!0),i()}},drop:function(e){var t,n,r,a,o,i,l=e.activeSortable,s=e.putSortable,c=e.dragEl,u=s||this.sortable,d=this.options;at&&S(at,d.swapClass,!1),at&&(d.swap||s&&s.options.swap)&&c!==at&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),n=at,o=(t=c).parentNode,i=n.parentNode,o&&i&&!o.isEqualNode(n)&&!i.isEqualNode(t)&&(r=F(t),a=F(n),o.isEqualNode(i)&&r<a&&a++,o.insertBefore(n,o.children[r]),i.insertBefore(t,i.children[a])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){at=null}},l(e,{pluginName:"swap",eventProperties:function(){return{swapItem:at}}})}lt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=I(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:it},l(lt,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:it},l(st,{pluginName:"removeOnSpill"});var ut,dt,pt,ft,mt,ht=[],_t=[],vt=!1,gt=!1,bt=!1;function yt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?g(document,"pointerup",this._deselectMultiDrag):(g(document,"mouseup",this._deselectMultiDrag),g(document,"touchend",this._deselectMultiDrag))),g(document,"keydown",this._checkKeyDown),g(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var r="";ht.length&&dt===e?ht.forEach((function(e,t){r+=(t?", ":"")+e.textContent})):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;pt=t},delayEnded:function(){this.isMultiDrag=~ht.indexOf(pt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<ht.length;r++)_t.push(H(ht[r])),_t[r].sortableIndex=ht[r].sortableIndex,_t[r].draggable=!1,_t[r].style["will-change"]="",S(_t[r],this.options.selectedClass,!1),ht[r]===pt&&S(_t[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,a=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ht.length&&dt===t&&(wt(!0,n),r("clone"),a()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(wt(!1,n),_t.forEach((function(e){O(e,"display","")})),t(),mt=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(_t.forEach((function(e){O(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),mt=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&dt&&dt.multiDrag._deselectMultiDrag(),ht.forEach((function(e){e.sortableIndex=F(e)})),ht=ht.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),bt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ht.forEach((function(e){e!==pt&&O(e,"position","absolute")}));var r=N(pt,!1,!0,!0);ht.forEach((function(e){e!==pt&&B(e,r)})),gt=!0,vt=!0}n.animateAll((function(){gt=!1,vt=!1,t.options.animation&&ht.forEach((function(e){U(e)})),t.options.sort&&xt()}))}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;gt&&~ht.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,a=e.dragRect;ht.length>1&&(ht.forEach((function(e){r.addAnimationState({target:e,rect:gt?N(e):a}),U(e),e.fromRect=a,t.removeAnimationState(e)})),gt=!1,function(e,t){ht.forEach((function(n,r){var a=t.children[n.sortableIndex+(e?Number(r):0)];a?t.insertBefore(n,a):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,a=e.activeSortable,o=e.parentEl,i=e.putSortable,l=this.options;if(r){if(n&&a._hideClone(),vt=!1,l.animation&&ht.length>1&&(gt||!n&&!a.options.sort&&!i)){var s=N(pt,!1,!0,!0);ht.forEach((function(e){e!==pt&&(B(e,s),o.appendChild(e))})),gt=!0}if(!n)if(gt||xt(),ht.length>1){var c=mt;a._showClone(t),a.options.animation&&!mt&&c&&_t.forEach((function(e){a.addAnimationState({target:e,rect:ft}),e.fromRect=ft,e.thisAnimationDuration=null}))}else a._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(ht.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ft=l({},t);var a=j(pt,!0);ft.top-=a.f,ft.left-=a.e}},dragOverAnimationComplete:function(){gt&&(gt=!1,xt())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,a=e.sortable,o=e.dispatchSortableEvent,i=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=r.children;if(!bt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),S(pt,c.selectedClass,!~ht.indexOf(pt)),~ht.indexOf(pt))ht.splice(ht.indexOf(pt),1),ut=null,G({sortable:a,rootEl:n,name:"deselect",targetEl:pt,originalEvent:t});else{if(ht.push(pt),G({sortable:a,rootEl:n,name:"select",targetEl:pt,originalEvent:t}),t.shiftKey&&ut&&a.el.contains(ut)){var d,p,f=F(ut),m=F(pt);if(~f&&~m&&f!==m)for(m>f?(p=f,d=m):(p=m,d=f+1);p<d;p++)~ht.indexOf(u[p])||(S(u[p],c.selectedClass,!0),ht.push(u[p]),G({sortable:a,rootEl:n,name:"select",targetEl:u[p],originalEvent:t}))}else ut=pt;dt=s}if(bt&&this.isMultiDrag){if(gt=!1,(r[$].options.sort||r!==n)&&ht.length>1){var h=N(pt),_=F(pt,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(pt.thisAnimationDuration=null),s.captureAnimationState(),!vt&&(c.animation&&(pt.fromRect=h,ht.forEach((function(e){if(e.thisAnimationDuration=null,e!==pt){var t=gt?N(e):h;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),xt(),ht.forEach((function(e){u[_]?r.insertBefore(e,u[_]):r.appendChild(e),_++})),i===F(pt))){var v=!1;ht.forEach((function(e){e.sortableIndex===F(e)||(v=!0)})),v&&o("update")}ht.forEach((function(e){U(e)})),s.animateAll()}dt=s}(n===r||l&&"clone"!==l.lastPutMode)&&_t.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=bt=!1,_t.length=0},destroyGlobal:function(){this._deselectMultiDrag(),b(document,"pointerup",this._deselectMultiDrag),b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==bt&&bt||dt!==this.sortable||e&&x(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;ht.length;){var t=ht[0];S(t,this.options.selectedClass,!1),ht.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[$];t&&t.options.multiDrag&&!~ht.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),S(e,t.options.selectedClass,!0),ht.push(e))},deselect:function(e){var t=e.parentNode[$],n=ht.indexOf(e);t&&t.options.multiDrag&&~n&&(S(e,t.options.selectedClass,!1),ht.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return ht.forEach((function(e){var a;n.push({multiDragElement:e,index:e.sortableIndex}),a=gt&&e!==pt?-1:gt?F(e,":not(."+t.options.selectedClass+")"):F(e),r.push({multiDragElement:e,index:a})})),{items:(e=ht,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(_t),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function wt(e,t){_t.forEach((function(n,r){var a=t.children[n.sortableIndex+(e?Number(r):0)];a?t.insertBefore(n,a):t.appendChild(n)}))}function xt(){ht.forEach((function(e){e!==pt&&e.parentNode&&e.parentNode.removeChild(e)}))}Be.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):this.options.supportPointer?g(document,"pointermove",this._handleFallbackAutoScroll):t.touches?g(document,"touchmove",this._handleFallbackAutoScroll):g(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),rt(),nt(),clearTimeout(E),E=void 0},nulling:function(){Je=Xe=Ye=tt=Qe=Ke=Ze=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=document.elementFromPoint(r,a);if(Je=e,t||this.options.forceAutoScrollFallback||p||d||m){ot(e,this.options,o,t);var i=A(o,!0);!tt||Qe&&r===Ke&&a===Ze||(Qe&&rt(),Qe=setInterval((function(){var o=A(document.elementFromPoint(r,a),!0);o!==i&&(i=o,nt()),ot(e,n.options,o,t)}),10),Ke=r,Ze=a)}else{if(!this.options.bubbleScroll||A(o,!0)===k())return void nt();ot(e,this.options,A(o,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),Be.mount(st,lt),t.default=Be},177:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r}});function r(e,t){if(!e)throw new Error("Invariant failed")}},196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=window.wp.element;const t={isLoading:!0,isDirty:!1,title:wcapf_admin_params.form_data.post_title,formId:wcapf_admin_params.form_data.post_id,filterKeys:[],currentTab:"filters",addFilterIndex:1,filterStates:{},formFilters:[],formSettings:{},saveError:"",showReviewNotice:wcapf_admin_params.show_review_notice_for_milestone_achieved};var r=(e,t)=>{switch(t.type){case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_DIRTY":return{...e,isDirty:t.payload};case"SET_TITLE":return{...e,title:t.payload};case"SET_FORM_ID":return{...e,formId:t.payload};case"SET_FILTER_KEYS":return{...e,filterKeys:t.payload};case"SET_CURRENT_TAB":return{...e,currentTab:t.payload};case"INCREMENT_ADD_FILTER_INDEX":return{...e,addFilterIndex:e.addFilterIndex+1};case"SET_FILTER_STATES":return{...e,filterStates:t.payload};case"SET_FORM_FILTERS":return{...e,formFilters:t.payload};case"SET_FORM_SETTINGS":return{...e,formSettings:t.payload};case"SET_ERROR":return{...e,saveError:t.payload};case"SET_SHOW_REVIEW_NOTICE":return{...e,showReviewNotice:t.payload};default:return e}};const a=(0,e.createContext)(t),o=n=>{let{children:o}=n;const[i,l]=(0,e.useReducer)(r,t);return(0,e.createElement)(a.Provider,{value:{state:i,dispatch:l}},o)},i=()=>{const t=(0,e.useContext)(a);if(void 0===t)throw new Error("useForm must be used within a FormProvider");return t};var l=n(669),s=n.n(l),c=window.lodash,u=window.wp.i18n,d=window.wp.components;(0,e.createElement)("svg",{viewBox:"0 0 48 48"},(0,e.createElement)("path",{d:"M16.1161 39.6339C15.628 39.1457 15.628 38.3543 16.1161 37.8661L29.9822 24L16.1161 10.1339C15.628 9.64573 15.628 8.85427 16.1161 8.36612C16.6043 7.87796 17.3957 7.87796 17.8839 8.36612L32.6339 23.1161C33.122 23.6043 33.122 24.3957 32.6339 24.8839L17.8839 39.6339C17.3957 40.122 16.6043 40.122 16.1161 39.6339Z"})),(0,e.createElement)("svg",{viewBox:"0 0 256 256"},(0,e.createElement)("path",{d:"M215.99609,52H172V40a20.0226,20.0226,0,0,0-20-20H104A20.0226,20.0226,0,0,0,84,40V52H39.99609a4,4,0,0,0,0,8h12V208a12.01375,12.01375,0,0,0,12,12h128a12.01375,12.01375,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12.01375,12.01375,0,0,1,12-12h48a12.01375,12.01375,0,0,1,12,12V52H92ZM195.99609,208a4.00458,4.00458,0,0,1-4,4h-128a4.00458,4.00458,0,0,1-4-4V60h136ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"})),(0,e.createElement)("svg",{viewBox:"0 0 16 16"},(0,e.createElement)("path",{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"})),(0,e.createElement)("svg",{viewBox:"0 0 255.99316 255.99316"},(0,e.createElement)("path",{d:"M219.99268,39.99414v144.001a4,4,0,0,1-8,0V43.99414H71.98584a4,4,0,0,1,0-8H215.99268A4.0002,4.0002,0,0,1,219.99268,39.99414Zm-32,32.001v144a4.0002,4.0002,0,0,1-4,4H39.98584a4.0002,4.0002,0,0,1-4-4v-144a4.0002,4.0002,0,0,1,4-4H183.99268A4.0002,4.0002,0,0,1,187.99268,71.99512Zm-8,4H43.98584v136H179.99268Z"}));const p=(0,e.createElement)("svg",{viewBox:"0 0 512.006 512.006"},(0,e.createElement)("path",{d:"M388.419,475.59L168.834,256.005L388.418,36.421c8.341-8.341,8.341-21.824,0-30.165s-21.824-8.341-30.165,0    L123.586,240.923c-8.341,8.341-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251    c5.461,0,10.923-2.091,15.083-6.251C396.76,497.414,396.76,483.931,388.419,475.59z"})),f=(0,e.createElement)("svg",{viewBox:"0 0 21 21"},(0,e.createElement)("g",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(4 3)"},(0,e.createElement)("path",{d:"m6.5 11.5-3-3 3-3"}),(0,e.createElement)("path",{d:"m3.5 8.5h11"}),(0,e.createElement)("path",{d:"m12.5 6.5v-4.00491374c0-.51283735-.3860402-.93550867-.8833789-.99327378l-.1190802-.00672622-1.9975409.00491374m-6 0-1.99754087-.00492752c-.51283429-.00124584-.93645365.38375378-.99544161.88094891l-.00701752.11906329v10.99753792c.00061497.5520447.44795562.9996604 1 1.0006148l10 .0061554c.5128356.0008784.9357441-.3848611.993815-.8821612l.006185-.1172316v-2.5"}),(0,e.createElement)("path",{d:"m4.5.5h4c.55228475 0 1 .44771525 1 1s-.44771525 1-1 1h-4c-.55228475 0-1-.44771525-1-1s.44771525-1 1-1z"}))),m=(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("path",{id:"Diamond",d:"M63.6870499,18.5730648L48.7831497,4.278266c-0.1855011-0.1758003-0.4316025-0.4813001-0.6870003-0.4813001 H15.9037514c-0.2553005,0-0.5014,0.3054998-0.6870003,0.4813001l-14.9038,14.1908998 c-0.374,0.3535004-0.4184,0.9855995-0.1025,1.3917999c0.21,0.2703991,30.8237991,39.7256012,31.0517006,39.9812012 c0.1022987,0.1149979,0.2402992,0.2215996,0.3428001,0.266098c0.2763996,0.1206017,0.5077,0.1296997,0.7900982,0.0065002 c0.1025009-0.0444984,0.2404022-0.1348991,0.3428001-0.2499008c0.0151024-0.0168991,0.0377007-0.0224991,0.0517006-0.0404968 L63.789547,19.9121666C64.1054459,19.5058651,64.0610504,18.9265652,63.6870499,18.5730648z M15.6273508,6.4344659 l4.9945002,11.3625011H3.6061509L15.6273508,6.4344659z M24.0795517,17.7969666l7.9203987-11.2617006l7.9204979,11.2617006 H24.0795517z M40.7191467,19.7969666l-8.7191963,34.8769989l-8.719099-34.8769989H40.7191467z M33.9257507,5.7969656h12.5423012 l-4.8240013,10.9746008L33.9257507,5.7969656z M22.3559513,16.7715664L17.53195,5.7969656h12.5423012L22.3559513,16.7715664z M21.2191505,19.7969666l8.6596012,34.638401L2.975451,19.7969666H21.2191505z M42.7808495,19.7969666h18.2436981 l-26.9032974,34.638401L42.7808495,19.7969666z M43.3781471,17.7969666l4.9944992-11.3625011l12.0212021,11.3625011H43.3781471z"})),h=((0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,e.createElement)("svg",{viewBox:"0 0 492 492"},(0,e.createElement)("path",{d:"M465.064,207.566l0.028,0H284.436V27.25c0-14.84-12.016-27.248-26.856-27.248h-23.116 c-14.836,0-26.904,12.408-26.904,27.248v180.316H26.908c-14.832,0-26.908,12-26.908,26.844v23.248 c0,14.832,12.072,26.78,26.908,26.78h180.656v180.968c0,14.832,12.064,26.592,26.904,26.592h23.116 c14.84,0,26.856-11.764,26.856-26.592V284.438h180.624c14.84,0,26.936-11.952,26.936-26.78V234.41 C492,219.566,479.904,207.566,465.064,207.566z"})),(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M3 5.75C3 4.23122 4.23122 3 5.75 3H15.7145C16.5764 3 17.4031 3.34241 18.0126 3.9519L20.0481 5.98744C20.6576 6.59693 21 7.42358 21 8.28553V18.25C21 19.7688 19.7688 21 18.25 21H5.75C4.23122 21 3 19.7688 3 18.25V5.75ZM5.75 4.5C5.05964 4.5 4.5 5.05964 4.5 5.75V18.25C4.5 18.9404 5.05964 19.5 5.75 19.5H6V14.25C6 13.0074 7.00736 12 8.25 12H15.75C16.9926 12 18 13.0074 18 14.25V19.5H18.25C18.9404 19.5 19.5 18.9404 19.5 18.25V8.28553C19.5 7.8214 19.3156 7.37629 18.9874 7.0481L16.9519 5.01256C16.6918 4.75246 16.3582 4.58269 16 4.52344V7.25C16 8.49264 14.9926 9.5 13.75 9.5H9.25C8.00736 9.5 7 8.49264 7 7.25V4.5H5.75ZM16.5 19.5V14.25C16.5 13.8358 16.1642 13.5 15.75 13.5H8.25C7.83579 13.5 7.5 13.8358 7.5 14.25V19.5H16.5ZM8.5 4.5V7.25C8.5 7.66421 8.83579 8 9.25 8H13.75C14.1642 8 14.5 7.66421 14.5 7.25V4.5H8.5Z"})),(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M16.4 19.62H6.39999C5.40543 19.62 4.4516 19.2249 3.74834 18.5216C3.04508 17.8184 2.64999 16.8646 2.64999 15.87V13.37C2.64999 13.1711 2.72901 12.9803 2.86966 12.8397C3.01032 12.699 3.20108 12.62 3.39999 12.62C3.59891 12.62 3.78967 12.699 3.93032 12.8397C4.07098 12.9803 4.14999 13.1711 4.14999 13.37V15.87C4.14999 16.4667 4.38705 17.039 4.809 17.461C5.23096 17.8829 5.80326 18.12 6.39999 18.12H16.4C16.9967 18.12 17.569 17.8829 17.991 17.461C18.4129 17.039 18.65 16.4667 18.65 15.87V13.37C18.65 13.1711 18.729 12.9803 18.8697 12.8397C19.0103 12.699 19.2011 12.62 19.4 12.62C19.5989 12.62 19.7897 12.699 19.9303 12.8397C20.071 12.9803 20.15 13.1711 20.15 13.37V15.87C20.15 16.8646 19.7549 17.8184 19.0516 18.5216C18.3484 19.2249 17.3946 19.62 16.4 19.62Z"}),(0,e.createElement)("path",{d:"M11.4 14.88C11.2011 14.88 11.0103 14.801 10.8697 14.6603C10.729 14.5197 10.65 14.3289 10.65 14.13V5.13C10.65 4.93109 10.729 4.74033 10.8697 4.59967C11.0103 4.45902 11.2011 4.38 11.4 4.38C11.5989 4.38 11.7897 4.45902 11.9303 4.59967C12.071 4.74033 12.15 4.93109 12.15 5.13V14.13C12.1474 14.3281 12.0676 14.5174 11.9275 14.6575C11.7874 14.7976 11.5981 14.8774 11.4 14.88Z"}),(0,e.createElement)("path",{d:"M11.4 16.12C11.3014 16.121 11.2036 16.1021 11.1125 16.0643C11.0214 16.0265 10.9389 15.9706 10.87 15.9L6.63 11.66C6.55925 11.5911 6.50301 11.5086 6.46461 11.4176C6.42621 11.3266 6.40643 11.2288 6.40643 11.13C6.40643 11.0312 6.42621 10.9334 6.46461 10.8424C6.50301 10.7514 6.55925 10.669 6.63 10.6C6.77063 10.4596 6.96125 10.3807 7.16 10.3807C7.35875 10.3807 7.54938 10.4596 7.69 10.6L11.4 14.31L15.11 10.6C15.1787 10.5263 15.2615 10.4672 15.3535 10.4262C15.4455 10.3852 15.5448 10.3632 15.6455 10.3614C15.7462 10.3596 15.8462 10.3782 15.9396 10.4159C16.033 10.4536 16.1178 10.5097 16.189 10.581C16.2603 10.6522 16.3164 10.737 16.3541 10.8304C16.3918 10.9238 16.4104 11.0238 16.4086 11.1245C16.4068 11.2252 16.3848 11.3245 16.3438 11.4165C16.3028 11.5085 16.2437 11.5913 16.17 11.66L11.93 15.9C11.8608 15.9701 11.7782 16.0257 11.6872 16.0635C11.5962 16.1013 11.4985 16.1205 11.4 16.12Z"})),(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M0,3.26315v57.4737015h64V3.26315H0z M62,5.2631502V34.480751L47.1523018,20.5346508 c-0.1992035-0.1875-0.4580002-0.2890015-0.7422028-0.2695007c-0.2733994,0.0156002-0.5282974,0.1425991-0.7059975,0.352499 L28.4267006,41.04245L15.4111004,30.3715496c-0.3984003-0.3270988-0.9863005-0.2967987-1.3496008,0.075201L2,42.8066483V5.2631502 H62z M2,58.7368507V45.6702499l12.8525-13.1707001l13.0684004,10.7137985 c0.4228001,0.347702,1.044899,0.2901001,1.3973999-0.1278992l17.2325001-20.3720989L62,37.2237511v21.5130997H2z"}),(0,e.createElement)("path",{d:"M26,26.2631493c3.8593006,0,7-3.1406002,7-7c0-3.8592997-3.1406994-6.999999-7-6.999999 c-3.8593998,0-7,3.1406994-7,6.999999C19,23.1225491,22.1406002,26.2631493,26,26.2631493z M26,14.2631502 c2.7567997,0,5,2.2431993,5,4.999999c0,2.7569008-2.2432003,5-5,5c-2.7569008,0-5-2.2430992-5-5 C21,16.5063496,23.2430992,14.2631502,26,14.2631502z"})))),_=((0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 20 20"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z"}))),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",fill:"none"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8c0-1.525.525-2.927 1.404-4.035l1.787 1.787A3.982 3.982 0 004 8c0 .834.255 1.608.691 2.248l-1.787 1.787A6.472 6.472 0 011.5 8zm2.465 5.096l1.787-1.787C6.392 11.745 7.166 12 8 12c.834 0 1.608-.255 2.248-.691l1.787 1.787A6.472 6.472 0 018 14.5a6.473 6.473 0 01-4.035-1.404zm9.131-1.06A6.472 6.472 0 0014.5 8a6.473 6.473 0 00-1.404-4.035l-1.787 1.787C11.745 6.392 12 7.166 12 8c0 .834-.255 1.608-.691 2.248l1.787 1.787zm-1.06-9.132A6.472 6.472 0 008 1.5a6.472 6.472 0 00-4.035 1.404l1.787 1.787A3.982 3.982 0 018 4c.834 0 1.608.255 2.248.691l1.787-1.787zM5.5 8a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z",clipRule:"evenodd"})),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M12.9121 1.59053C12.7508 1.2312 12.3936 1 11.9997 1C11.6059 1 11.2487 1.2312 11.0874 1.59053L8.27041 7.86702L1.43062 8.60661C1.03903 8.64895 0.708778 8.91721 0.587066 9.2918C0.465355 9.66639 0.574861 10.0775 0.866772 10.342L5.96556 14.9606L4.55534 21.6942C4.4746 22.0797 4.62768 22.4767 4.94632 22.7082C5.26497 22.9397 5.68983 22.9626 6.03151 22.7667L11.9997 19.3447L17.968 22.7667C18.3097 22.9626 18.7345 22.9397 19.0532 22.7082C19.3718 22.4767 19.5249 22.0797 19.4441 21.6942L18.0339 14.9606L23.1327 10.342C23.4246 10.0775 23.5341 9.66639 23.4124 9.2918C23.2907 8.91721 22.9605 8.64895 22.5689 8.60661L15.7291 7.86702L12.9121 1.59053Z"})),(0,e.createElement)("svg",{viewBox:"0 0 36 36"},(0,e.createElement)("path",{d:"M18,2A16,16,0,1,0,34,18,16,16,0,0,0,18,2Zm-.22,25.85a1.65,1.65,0,1,1,1.65-1.65A1.65,1.65,0,0,1,17.78,27.85Zm1.37-8.06v1.72a1.37,1.37,0,0,1-1.3,1.36h-.11a1.34,1.34,0,0,1-1.39-1.3c0-.44,0-2.76,0-2.76a1.19,1.19,0,0,1,1.12-1.31c1.57-.12,4.18-.7,4.18-3.25,0-1.83-1.41-3.07-3.43-3.07a5.31,5.31,0,0,0-4,1.92,1.36,1.36,0,0,1-2.35-.9,1.43,1.43,0,0,1,.43-1,7.77,7.77,0,0,1,6-2.69c3.7,0,6.28,2.3,6.28,5.6C24.58,17.16,22.61,19.2,19.15,19.79Z"}),(0,e.createElement)("rect",{x:"0",y:"0",width:"36",height:"36",fillOpacity:"0"}))),v=((0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M8 6.5H20V8H8V6.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 16.5H20V18H8V16.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 11.5H20V13H8V11.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 6H6V8H4V6Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 11H6V13H4V11Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 16H6V18H4V16Z",fill:"currentColor"})),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 64 64",strokeWidth:"3",stroke:"currentColor",fill:"none"},(0,e.createElement)("path",{d:"M45,14.67l-2.76,2a1,1,0,0,1-1,.11L37.65,15.3a1,1,0,0,1-.61-.76l-.66-3.77a1,1,0,0,0-1-.84H30.52a1,1,0,0,0-1,.77l-.93,3.72a1,1,0,0,1-.53.65l-3.3,1.66a1,1,0,0,1-1-.08l-3-2.13a1,1,0,0,0-1.31.12l-3.65,3.74a1,1,0,0,0-.13,1.26l1.87,2.88a1,1,0,0,1,.1.89L16.34,27a1,1,0,0,1-.68.63l-3.85,1.06a1,1,0,0,0-.74,1v4.74a1,1,0,0,0,.8,1l3.9.8a1,1,0,0,1,.72.57l1.42,3.15a1,1,0,0,1-.05.92l-2.13,3.63a1,1,0,0,0,.17,1.24L19.32,49a1,1,0,0,0,1.29.09L23.49,47a1,1,0,0,1,1-.1l3.74,1.67a1,1,0,0,1,.59.75l.66,3.79a1,1,0,0,0,1,.84h4.89a1,1,0,0,0,1-.86l.58-4a1,1,0,0,1,.58-.77l3.58-1.62a1,1,0,0,1,1,.09l3.14,2.12a1,1,0,0,0,1.3-.15L50,45.06a1,1,0,0,0,.09-1.27l-2.08-3a1,1,0,0,1-.09-1l1.48-3.43a1,1,0,0,1,.71-.59L53.77,35a1,1,0,0,0,.8-1V29.42a1,1,0,0,0-.8-1l-3.72-.78a1,1,0,0,1-.73-.62l-1.45-3.65a1,1,0,0,1,.11-.94l2.15-3.14A1,1,0,0,0,50,18l-3.71-3.25A1,1,0,0,0,45,14.67Z"}),(0,e.createElement)("circle",{cx:"32.82",cy:"31.94",r:"9.94"})),(0,u.__)("Please fix the errors below.","wc-ajax-product-filter")),g=(0,u.__)("Filter key is in use by another entity.","wc-ajax-product-filter");function b(){return wcapf_admin_params.nonce||""}function y(){return wcapf_admin_params.pro_update_notice||null}function w(){return parseFloat(wcapf_admin_params.wp_version)}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e;return""!==t&&(r+="-"+t),""!==n&&(r+="-"+n),r}function E(t){return t?(0,e.createElement)("span",{className:"__pro_tag"}):null}function C(){return wcapf_admin_params.forms_page_link}function S(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r){const r=t.map((e=>(e.isPro=!0,e)));n=(0,c.concat)(e,[{proGroup:!0,options:r}])}else n=(0,c.concat)(e,t);return n}const O=wcapf_admin_params.show_v4_migration_notice,j=wcapf_admin_params.v4_migrated_form_url,T=wcapf_admin_params.v4_migration_doc_url,k=y();var N=()=>(0,e.createElement)(e.Fragment,null,O&&(0,e.createElement)("div",{className:"notice notice-info v4-update-notice",id:"wcapf-v4-migration-notice"},(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"WCAPF - WooCommerce Ajax Product Filter (v4 Migration Notice)")),(0,e.createElement)("p",null,"The WC Ajax Product Filter plugin has been updated to v4 and is now named WCAPF - WooCommerce Ajax Product Filter. We have redesigned the admin UI to provide a more intuitive user experience and refactored the codebase for improved performance and easier future enhancements. As part of the migration process, a form has been automatically created with all the existing filters from your shop. We kindly request that you visit the form and review the order of the filters."),(0,e.createElement)("p",null,(0,e.createElement)(d.Button,{variant:"link",href:j},"Review the filters")," ","|"," ",(0,e.createElement)(d.Button,{variant:"link",href:T,target:"_blank"},"Learn more about migration")," ","|"," ",(0,e.createElement)(d.Button,{variant:"link",onClick:()=>{"function"==typeof removeWCAPFMigrationNotice&&removeWCAPFMigrationNotice()}},"I understand, remove the notice"))),k&&(0,e.createElement)("div",{className:"notice notice-error pro-update-notice"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:k}})));const D="https://wordpress.org/support/plugin/wc-ajax-product-filter/reviews/?filter=5";var I=t=>{let{noticeType:n,timeSince:r}=t;const a=e=>{"function"==typeof wcapfDismissNotice&&wcapfDismissNotice(e)};let o,i,l;return"milestone-achieved"===n?(o="notice notice-info is-dismissible review-notice",i="wcapf-review-notice-for-milestone-achieved",l=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,e.createElement)("span",{className:"dashicons dashicons-smiley wcapf-dashicon-smiley"})," Great job! You have updated the filters five times. Your feedback encourages me to improve the plugin. Please consider"," ",(0,e.createElement)("a",{href:D,target:"_blank"},"writing a review on WordPress"),". Thank you in advance :)"),(0,e.createElement)("button",{type:"button",className:"notice-dismiss",onClick:()=>a("milestone-achieved")},(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice")))):(o="notice notice-info review-notice",i="wcapf-review-notice-for-time-since",l=(0,e.createElement)("p",null,"Awesome! You've been using WCAPF - WooCommerce Ajax Product Filter for more than ",r,". Would you mind taking a few seconds to give it a 5-star rating on WordPress? Thank you in advance :)"," ",(0,e.createElement)("a",{href:D,target:"_blank"},"Ok, you deserved it")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>a("permanently-dismiss-time-since")},"I already did")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>a("postpone-time-since")},"No, not good enough"))),(0,e.createElement)("div",{className:o,id:i},l)};const M=wcapf_admin_params.show_review_notice_for_milestone_achieved,F=wcapf_admin_params.show_review_notice_for_time_since;var P=()=>M?(0,e.createElement)(I,{noticeType:"milestone-achieved"}):F?(0,e.createElement)(I,{noticeType:"time-since",timeSince:F}):null;const A=[{label:(0,u.__)("Forms","wc-ajax-product-filter"),id:"forms",href:C()},{label:(0,u.__)("Settings","wc-ajax-product-filter"),id:"settings",href:wcapf_admin_params.settings_page_link}];var R=t=>{let{view:n}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__top_bar"},(0,e.createElement)("div",{className:"__navbar"},(0,e.createElement)("h2",null,(0,e.createElement)(d.Icon,{icon:"filter",className:"__icon"}),"WCAPF - WooCommerce Ajax Product Filter"),A.map((t=>{const r=("form"===n?"forms":n)===t.id?"is-active":"";return(0,e.createElement)("a",{className:r,href:t.href,key:t.id},t.label)}))),(0,e.createElement)("div",{className:"__cta"},(0,e.createElement)("a",{target:"_blank",href:"https://wptools.io/wc-ajax-product-filter/?utm_source=WCAPF+Free&utm_medium=inside+plugin&utm_campaign=WCAPF+Pro+Upgrade",className:"__upgrade_btn"},(0,e.createElement)(d.Icon,{icon:m,size:18}),(0,u.__)("Upgrade to Pro","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__plan"},(0,e.createElement)("div",null,(0,u.__)("You are on the","wc-ajax-product-filter")),(0,e.createElement)("div",null,(0,u.__)("Free Plan"))),(0,e.createElement)("div",{className:"__version"},(0,e.createElement)("div",null,(0,u.__)("Version","wc-ajax-product-filter")),(0,e.createElement)("div",null,wcapf_admin_params.free_version)))),(0,e.createElement)(N,null),"form"!==n&&(0,e.createElement)(P,null))},L=(e,t)=>{const{isDirty:n,saveError:r}=e;return{setDirty:()=>{n||(t({type:"SET_DIRTY",payload:!0}),wcapf_admin_params.dirty=!0),r&&t({type:"SET_ERROR",payload:""})}}},V=window.wp.data;function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,V.dispatch)("core/notices").createSuccessNotice(e,{type:"snackbar",id:t,icon:n})}function B(e){(0,V.dispatch)("core/notices").removeNotice(e)}function U(){B("copied-to-clipboard")}const $="item-save-success",z="item-save-error";function W(e){H(e,z,"😟")}function q(){B($),B(z)}const G="filter-delete-error";function Y(e){H(e,G,"😟")}function X(){B(G)}function K(e){!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,V.dispatch)("core/notices").createErrorNotice(e,{type:"snackbar",id:t,icon:n})}(e,"get-form-filters-error","😟")}function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}function J(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){return e instanceof J(e).Element||e instanceof Element}function ee(e){return e instanceof J(e).HTMLElement||e instanceof HTMLElement}function te(e){return"undefined"!=typeof ShadowRoot&&(e instanceof J(e).ShadowRoot||e instanceof ShadowRoot)}var ne=Math.max,re=Math.min,ae=Math.round;function oe(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,a=1;if(ee(e)&&t){var o=e.offsetHeight,i=e.offsetWidth;i>0&&(r=ae(n.width)/i||1),o>0&&(a=ae(n.height)/o||1)}return{width:n.width/r,height:n.height/a,top:n.top/a,right:n.right/r,bottom:n.bottom/a,left:n.left/r,x:n.left/r,y:n.top/a}}function ie(e){var t=J(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return e?(e.nodeName||"").toLowerCase():null}function se(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function ce(e){return oe(se(e)).left+ie(e).scrollLeft}function ue(e){return J(e).getComputedStyle(e)}function de(e){var t=ue(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function pe(e,t,n){void 0===n&&(n=!1);var r=ee(t),a=ee(t)&&function(e){var t=e.getBoundingClientRect(),n=ae(t.width)/e.offsetWidth||1,r=ae(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=se(t),i=oe(e,a),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&(("body"!==le(t)||de(o))&&(l=function(e){return e!==J(e)&&ee(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:ie(e);var t}(t)),ee(t)?((s=oe(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):o&&(s.x=ce(o))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function fe(e){var t=oe(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function me(e){return"html"===le(e)?e:e.assignedSlot||e.parentNode||(te(e)?e.host:null)||se(e)}function he(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:ee(e)&&de(e)?e:he(me(e))}function _e(e,t){var n;void 0===t&&(t=[]);var r=he(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=J(r),i=a?[o].concat(o.visualViewport||[],de(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(_e(me(i)))}function ve(e){return["table","td","th"].indexOf(le(e))>=0}function ge(e){return ee(e)&&"fixed"!==ue(e).position?e.offsetParent:null}function be(e){for(var t=J(e),n=ge(e);n&&ve(n)&&"static"===ue(n).position;)n=ge(n);return n&&("html"===le(n)||"body"===le(n)&&"static"===ue(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ee(e)&&"fixed"===ue(e).position)return null;var n=me(e);for(te(n)&&(n=n.host);ee(n)&&["html","body"].indexOf(le(n))<0;){var r=ue(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var ye="top",we="bottom",xe="right",Ee="left",Ce="auto",Se=[ye,we,xe,Ee],Oe="start",je="end",Te="viewport",ke="popper",Ne=Se.reduce((function(e,t){return e.concat([t+"-"+Oe,t+"-"+je])}),[]),De=[].concat(Se,[Ce]).reduce((function(e,t){return e.concat([t,t+"-"+Oe,t+"-"+je])}),[]),Ie=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Me(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}var Fe={placement:"bottom",modifiers:[],strategy:"absolute"};function Pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Ae(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,a=t.defaultOptions,o=void 0===a?Fe:a;return function(e,t,n){void 0===n&&(n=o);var a,i,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fe,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:l,setOptions:function(n){var a="function"==typeof n?n(l.options):n;d(),l.options=Object.assign({},o,l.options,a),l.scrollParents={reference:Q(e)?_e(e):e.contextElement?_e(e.contextElement):[],popper:_e(t)};var i,c,p=function(e){var t=Me(e);return Ie.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,l.options.modifiers),c=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return l.orderedModifiers=p.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,a=e.effect;if("function"==typeof a){var o=a({state:l,name:t,instance:u,options:r});s.push(o||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=l.elements,t=e.reference,n=e.popper;if(Pe(t,n)){l.rects={reference:pe(t,be(n),"fixed"===l.options.strategy),popper:fe(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var a=l.orderedModifiers[r],o=a.fn,i=a.options,s=void 0===i?{}:i,d=a.name;"function"==typeof o&&(l=o({state:l,options:s,name:d,instance:u})||l)}else l.reset=!1,r=-1}}},update:(a=function(){return new Promise((function(e){u.forceUpdate(),e(l)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(a())}))}))),i}),destroy:function(){d(),c=!0}};if(!Pe(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Re={passive:!0},Le={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=void 0===a||a,i=r.resize,l=void 0===i||i,s=J(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,Re)})),l&&s.addEventListener("resize",n.update,Re),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Re)})),l&&s.removeEventListener("resize",n.update,Re)}},data:{}};function Ve(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function Be(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ue(e){var t,n=e.reference,r=e.element,a=e.placement,o=a?Ve(a):null,i=a?He(a):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case ye:t={x:l,y:n.y-r.height};break;case we:t={x:l,y:n.y+n.height};break;case xe:t={x:n.x+n.width,y:s};break;case Ee:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=o?Be(o):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case Oe:t[c]=t[c]-(n[u]/2-r[u]/2);break;case je:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var $e={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ue({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function We(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=i.x,f=void 0===p?0:p,m=i.y,h=void 0===m?0:m,_="function"==typeof u?u({x:f,y:h}):{x:f,y:h};f=_.x,h=_.y;var v=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=Ee,y=ye,w=window;if(c){var x=be(n),E="clientHeight",C="clientWidth";x===J(n)&&"static"!==ue(x=se(n)).position&&"absolute"===l&&(E="scrollHeight",C="scrollWidth"),(a===ye||(a===Ee||a===xe)&&o===je)&&(y=we,h-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[E])-r.height,h*=s?1:-1),a!==Ee&&(a!==ye&&a!==we||o!==je)||(b=xe,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[C])-r.width,f*=s?1:-1)}var S,O=Object.assign({position:l},c&&ze),j=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:ae(t*r)/r||0,y:ae(n*r)/r||0}}({x:f,y:h}):{x:f,y:h};return f=j.x,h=j.y,s?Object.assign({},O,((S={})[y]=g?"0":"",S[b]=v?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+h+"px)":"translate3d("+f+"px, "+h+"px, 0)",S)):Object.assign({},O,((t={})[y]=g?h+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var qe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,o=n.adaptive,i=void 0===o||o,l=n.roundOffsets,s=void 0===l||l,c={placement:Ve(t.placement),variation:He(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,We(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,We(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ge={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},a=t.elements[e];ee(a)&&le(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],a=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});ee(r)&&le(r)&&(Object.assign(r.style,o),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Ye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=void 0===a?[0,0]:a,i=De.reduce((function(e,n){return e[n]=function(e,t,n){var r=Ve(e),a=[Ee,ye].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=o[0],l=o[1];return i=i||0,l=(l||0)*a,[Ee,xe].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,o),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},Xe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ke(e){return e.replace(/left|right|bottom|top/g,(function(e){return Xe[e]}))}var Ze={start:"end",end:"start"};function Je(e){return e.replace(/start|end/g,(function(e){return Ze[e]}))}function Qe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&te(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function et(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function tt(e,t){return t===Te?et(function(e){var t=J(e),n=se(e),r=t.visualViewport,a=n.clientWidth,o=n.clientHeight,i=0,l=0;return r&&(a=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=r.offsetLeft,l=r.offsetTop)),{width:a,height:o,x:i+ce(e),y:l}}(e)):Q(t)?function(e){var t=oe(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):et(function(e){var t,n=se(e),r=ie(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=ne(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=ne(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-r.scrollLeft+ce(e),s=-r.scrollTop;return"rtl"===ue(a||n).direction&&(l+=ne(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:l,y:s}}(se(e)))}function nt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function rt(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function at(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,o=n.boundary,i=void 0===o?"clippingParents":o,l=n.rootBoundary,s=void 0===l?Te:l,c=n.elementContext,u=void 0===c?ke:c,d=n.altBoundary,p=void 0!==d&&d,f=n.padding,m=void 0===f?0:f,h=nt("number"!=typeof m?m:rt(m,Se)),_=u===ke?"reference":ke,v=e.rects.popper,g=e.elements[p?_:u],b=function(e,t,n){var r="clippingParents"===t?function(e){var t=_e(me(e)),n=["absolute","fixed"].indexOf(ue(e).position)>=0&&ee(e)?be(e):e;return Q(n)?t.filter((function(e){return Q(e)&&Qe(e,n)&&"body"!==le(e)})):[]}(e):[].concat(t),a=[].concat(r,[n]),o=a[0],i=a.reduce((function(t,n){var r=tt(e,n);return t.top=ne(r.top,t.top),t.right=re(r.right,t.right),t.bottom=re(r.bottom,t.bottom),t.left=ne(r.left,t.left),t}),tt(e,o));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(Q(g)?g:g.contextElement||se(e.elements.popper),i,s),y=oe(e.elements.reference),w=Ue({reference:y,element:v,strategy:"absolute",placement:a}),x=et(Object.assign({},v,w)),E=u===ke?x:y,C={top:b.top-E.top+h.top,bottom:E.bottom-b.bottom+h.bottom,left:b.left-E.left+h.left,right:E.right-b.right+h.right},S=e.modifiersData.offset;if(u===ke&&S){var O=S[a];Object.keys(C).forEach((function(e){var t=[xe,we].indexOf(e)>=0?1:-1,n=[ye,we].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}var ot={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=void 0===a||a,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=void 0===f||f,h=n.allowedAutoPlacements,_=t.options.placement,v=Ve(_),g=s||(v!==_&&m?function(e){if(Ve(e)===Ce)return[];var t=Ke(e);return[Je(e),t,Je(t)]}(_):[Ke(_)]),b=[_].concat(g).reduce((function(e,n){return e.concat(Ve(n)===Ce?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?De:s,u=He(r),d=u?l?Ne:Ne.filter((function(e){return He(e)===u})):Se,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=at(e,{placement:n,boundary:a,rootBoundary:o,padding:i})[Ve(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),y=t.rects.reference,w=t.rects.popper,x=new Map,E=!0,C=b[0],S=0;S<b.length;S++){var O=b[S],j=Ve(O),T=He(O)===Oe,k=[ye,we].indexOf(j)>=0,N=k?"width":"height",D=at(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),I=k?T?xe:Ee:T?we:ye;y[N]>w[N]&&(I=Ke(I));var M=Ke(I),F=[];if(o&&F.push(D[j]<=0),l&&F.push(D[I]<=0,D[M]<=0),F.every((function(e){return e}))){C=O,E=!1;break}x.set(O,F)}if(E)for(var P=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},A=m?3:1;A>0&&"break"!==P(A);A--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function it(e,t,n){return ne(e,re(t,n))}var lt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=void 0===a||a,i=n.altAxis,l=void 0!==i&&i,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,m=n.tetherOffset,h=void 0===m?0:m,_=at(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),v=Ve(t.placement),g=He(t.placement),b=!g,y=Be(v),w="x"===y?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,O="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(x){if(o){var k,N="y"===y?ye:Ee,D="y"===y?we:xe,I="y"===y?"height":"width",M=x[y],F=M+_[N],P=M-_[D],A=f?-C[I]/2:0,R=g===Oe?E[I]:C[I],L=g===Oe?-C[I]:-E[I],V=t.elements.arrow,H=f&&V?fe(V):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=B[N],$=B[D],z=it(0,E[I],H[I]),W=b?E[I]/2-A-z-U-O.mainAxis:R-z-U-O.mainAxis,q=b?-E[I]/2+A+z+$+O.mainAxis:L+z+$+O.mainAxis,G=t.elements.arrow&&be(t.elements.arrow),Y=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,X=null!=(k=null==j?void 0:j[y])?k:0,K=M+q-X,Z=it(f?re(F,M+W-X-Y):F,M,f?ne(P,K):P);x[y]=Z,T[y]=Z-M}if(l){var J,Q="x"===y?ye:Ee,ee="x"===y?we:xe,te=x[w],ae="y"===w?"height":"width",oe=te+_[Q],ie=te-_[ee],le=-1!==[ye,Ee].indexOf(v),se=null!=(J=null==j?void 0:j[w])?J:0,ce=le?oe:te-E[ae]-C[ae]-se+O.altAxis,ue=le?te+E[ae]+C[ae]-se-O.altAxis:ie,de=f&&le?function(e,t,n){var r=it(e,t,n);return r>n?n:r}(ce,te,ue):it(f?ce:oe,te,f?ue:ie);x[w]=de,T[w]=de-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]},st={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Ve(n.placement),s=Be(l),c=[Ee,xe].indexOf(l)>=0?"height":"width";if(o&&i){var u=function(e,t){return nt("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:rt(e,Se))}(a.padding,n),d=fe(o),p="y"===s?ye:Ee,f="y"===s?we:xe,m=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],h=i[s]-n.rects.reference[s],_=be(o),v=_?"y"===s?_.clientHeight||0:_.clientWidth||0:0,g=m/2-h/2,b=u[p],y=v-d[c]-u[f],w=v/2-d[c]/2+g,x=it(b,w,y),E=s;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Qe(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ct(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ut(e){return[ye,xe,we,Ee].some((function(t){return e[t]>=0}))}var dt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=at(t,{elementContext:"reference"}),l=at(t,{altBoundary:!0}),s=ct(i,r),c=ct(l,a,o),u=ut(s),d=ut(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},pt=Ae({defaultModifiers:[Le,$e,qe,Ge,Ye,ot,lt,st,dt]}),ft="tippy-content",mt="tippy-arrow",ht="tippy-svg-arrow",_t={passive:!0,capture:!0},vt=function(){return document.body};function gt(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function bt(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function yt(e,t){return"function"==typeof e?e.apply(void 0,t):e}function wt(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function xt(e){return[].concat(e)}function Et(e,t){-1===e.indexOf(t)&&e.push(t)}function Ct(e){return[].slice.call(e)}function St(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Ot(){return document.createElement("div")}function jt(e){return["Element","Fragment"].some((function(t){return bt(e,t)}))}function Tt(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function kt(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Nt(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function Dt(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var It={isTouch:!1},Mt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",Pt))}function Pt(){var e=performance.now();e-Mt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",Pt)),Mt=e}function At(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Rt=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Lt=Object.assign({appendTo:vt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Vt=Object.keys(Lt);function Ht(e){var t=(e.plugins||[]).reduce((function(t,n){var r,a=n.name,o=n.defaultValue;return a&&(t[a]=void 0!==e[a]?e[a]:null!=(r=Lt[a])?r:o),t}),{});return Object.assign({},e,t)}function Bt(e,t){var n=Object.assign({},t,{content:yt(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ht(Object.assign({},Lt,{plugins:t}))):Vt).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Lt.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Ut(e,t){e.innerHTML=t}function $t(e){var t=Ot();return!0===e?t.className=mt:(t.className=ht,jt(e)?t.appendChild(e):Ut(t,e)),t}function zt(e,t){jt(t.content)?(Ut(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Ut(e,t.content):e.textContent=t.content)}function Wt(e){var t=e.firstElementChild,n=Ct(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ft)})),arrow:n.find((function(e){return e.classList.contains(mt)||e.classList.contains(ht)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function qt(e){var t=Ot(),n=Ot();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ot();function a(n,r){var a=Wt(t),o=a.box,i=a.content,l=a.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||zt(i,e.props),r.arrow?l?n.arrow!==r.arrow&&(o.removeChild(l),o.appendChild($t(r.arrow))):o.appendChild($t(r.arrow)):l&&o.removeChild(l)}return r.className=ft,r.setAttribute("data-state","hidden"),zt(r,e.props),t.appendChild(n),n.appendChild(r),a(e.props,e.props),{popper:t,onUpdate:a}}qt.$$tippy=!0;var Gt=1,Yt=[],Xt=[];function Kt(e,t){var n,r,a,o,i,l,s,c,u=Bt(e,Object.assign({},Lt,Ht(St(t)))),d=!1,p=!1,f=!1,m=!1,h=[],_=wt(G,u.interactiveDebounce),v=Gt++,g=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:v,reference:e,popper:Ot(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(a)},setProps:function(t){if(!b.state.isDestroyed){M("onBeforeUpdate",[b,t]),W();var n=b.props,r=Bt(e,Object.assign({},n,St(t),{ignoreAttributes:!0}));b.props=r,z(),n.interactiveDebounce!==r.interactiveDebounce&&(A(),_=wt(G,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?xt(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded"),P(),I(),x&&x(n,r),b.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),M("onAfterUpdate",[b,t])}},setContent:function(e){b.setProps({content:e})},show:function(){var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=It.isTouch&&!b.props.touch,a=gt(b.props.duration,0,Lt.duration);if(!(e||t||n||r||T().hasAttribute("disabled")||(M("onShow",[b],!1),!1===b.props.onShow(b)))){if(b.state.isVisible=!0,j()&&(w.style.visibility="visible"),I(),H(),b.state.isMounted||(w.style.transition="none"),j()){var o=N();Tt([o.box,o.content],0)}l=function(){var e;if(b.state.isVisible&&!m){if(m=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,j()&&b.props.animation){var t=N(),n=t.box,r=t.content;Tt([n,r],a),kt([n,r],"visible")}F(),P(),Et(Xt,b),null==(e=b.popperInstance)||e.forceUpdate(),M("onMount",[b]),b.props.animation&&j()&&function(e,t){U(e,(function(){b.state.isShown=!0,M("onShown",[b])}))}(a)}},function(){var e,t=b.props.appendTo,n=T();(e=b.props.interactive&&t===vt||"parent"===t?n.parentNode:yt(t,[n])).contains(w)||e.appendChild(w),b.state.isMounted=!0,Z()}()}},hide:function(){var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=gt(b.props.duration,1,Lt.duration);if(!(e||t||n)&&(M("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,m=!1,d=!1,j()&&(w.style.visibility="hidden"),A(),B(),I(!0),j()){var a=N(),o=a.box,i=a.content;b.props.animation&&(Tt([o,i],r),kt([o,i],"hidden"))}F(),P(),b.props.animation?j()&&function(e,t){U(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()}},hideWithInteractivity:function(e){k().addEventListener("mousemove",_),Et(Yt,_),_(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(J(),Q().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w),Xt=Xt.filter((function(e){return e!==b})),b.state.isMounted=!1,M("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),W(),delete e._tippy,b.state.isDestroyed=!0,M("onDestroy",[b]))}};if(!u.render)return b;var y=u.render(b),w=y.popper,x=y.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var E=g.map((function(e){return e.fn(b)})),C=e.hasAttribute("aria-expanded");return z(),P(),I(),M("onCreate",[b]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",_)})),b;function S(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function O(){return"hold"===S()[0]}function j(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function T(){return s||e}function k(){var e,t,n=T().parentNode;return n?null!=(t=xt(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function N(){return Wt(w)}function D(e){return b.state.isMounted&&!b.state.isVisible||It.isTouch||o&&"focus"===o.type?0:gt(b.props.delay,e?0:1,Lt.delay)}function I(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function M(e,t,n){var r;void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(r=b.props)[e].apply(r,t)}function F(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;xt(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var a=t&&t.replace(r,"").trim();a?e.setAttribute(n,a):e.removeAttribute(n)}}))}}function P(){!C&&b.props.aria.expanded&&xt(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function A(){k().removeEventListener("mousemove",_),Yt=Yt.filter((function(e){return e!==_}))}function R(t){if(!It.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Dt(w,n)){if(xt(b.props.triggerTarget||e).some((function(e){return Dt(e,n)}))){if(It.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),p=!0,setTimeout((function(){p=!1})),b.state.isMounted||B())}}}function L(){f=!0}function V(){f=!1}function H(){var e=k();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,_t),e.addEventListener("touchstart",V,_t),e.addEventListener("touchmove",L,_t)}function B(){var e=k();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,_t),e.removeEventListener("touchstart",V,_t),e.removeEventListener("touchmove",L,_t)}function U(e,t){var n=N().box;function r(e){e.target===n&&(Nt(n,"remove",r),t())}if(0===e)return t();Nt(n,"remove",i),Nt(n,"add",r),i=r}function $(t,n,r){void 0===r&&(r=!1),xt(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function z(){var e;O()&&($("touchstart",q,{passive:!0}),$("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,q),e){case"mouseenter":$("mouseleave",Y);break;case"focus":$(Rt?"focusout":"blur",X);break;case"focusin":$("focusout",X)}}))}function W(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,a=e.options;t.removeEventListener(n,r,a)})),h=[]}function q(e){var t,n=!1;if(b.state.isEnabled&&!K(e)&&!p){var r="focus"===(null==(t=o)?void 0:t.type);o=e,s=e.currentTarget,P(),!b.state.isVisible&&bt(e,"MouseEvent")&&Yt.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function G(e){var t=e.target,n=T().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,a=e.popperState,o=e.props.interactiveBorder,i=a.placement.split("-")[0],l=a.modifiersData.offset;if(!l)return!0;var s="bottom"===i?l.top.y:0,c="top"===i?l.bottom.y:0,u="right"===i?l.left.x:0,d="left"===i?l.right.x:0,p=t.top-r+s>o,f=r-t.bottom-c>o,m=t.left-n+u>o,h=n-t.right-d>o;return p||f||m||h}))})(r,e)&&(A(),te(e))}}function Y(e){K(e)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==T()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function K(e){return!!It.isTouch&&O()!==e.type.indexOf("touch")>=0}function Z(){J();var t=b.props,n=t.popperOptions,r=t.placement,a=t.offset,o=t.getReferenceClientRect,i=t.moveTransition,s=j()?Wt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(j()){var n=N().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];j()&&s&&d.push({name:"arrow",options:{element:s,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),b.popperInstance=pt(c,w,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:d}))}function J(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return Ct(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&M("onTrigger",[b,e]),H();var t=D(!0),r=S(),a=r[0],o=r[1];It.isTouch&&"hold"===a&&o&&(t=o),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),M("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=D(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):a=requestAnimationFrame((function(){b.hide()}))}}else B()}}function Zt(e,t){void 0===t&&(t={});var n=Lt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ft,_t),window.addEventListener("blur",At);var r,a=Object.assign({},t,{plugins:n}),o=(r=e,jt(r)?[r]:function(e){return bt(e,"NodeList")}(r)?Ct(r):Array.isArray(r)?r:Ct(document.querySelectorAll(r))).reduce((function(e,t){var n=t&&Kt(t,a);return n&&e.push(n),e}),[]);return jt(e)?o[0]:o}Zt.defaultProps=Lt,Zt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Lt[t]=e[t]}))},Zt.currentInput=It,Object.assign({},Ge,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Zt.setDefaultProps({render:qt});var Jt=Zt,Qt=n(196),en=n.n(Qt),tn=window.ReactDOM;function nn(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var rn="undefined"!=typeof window&&"undefined"!=typeof document;function an(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function on(){return rn&&document.createElement("div")}function ln(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!ln(e[n],t[n]))return!1}return!0}return!1}function sn(e){var t=[];return e.forEach((function(e){t.find((function(t){return ln(e,t)}))||t.push(e)})),t}var cn=rn?Qt.useLayoutEffect:Qt.useEffect;function un(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var dn={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||un(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&un(t,"remove",e.props.className)},onAfterUpdate:r}}};function pn(e){return function(t){var n,r,a=t.children,o=t.content,i=t.visible,l=t.singleton,s=t.render,c=t.reference,u=t.disabled,d=void 0!==u&&u,p=t.ignoreAttributes,f=void 0===p||p,m=(t.__source,t.__self,nn(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),h=void 0!==i,_=void 0!==l,v=(0,Qt.useState)(!1),g=v[0],b=v[1],y=(0,Qt.useState)({}),w=y[0],x=y[1],E=(0,Qt.useState)(),C=E[0],S=E[1],O=(n=function(){return{container:on(),renders:1}},(r=(0,Qt.useRef)()).current||(r.current="function"==typeof n?n():n),r.current),j=Object.assign({ignoreAttributes:f},m,{content:O.container});h&&(j.trigger="manual",j.hideOnClick=!1),_&&(d=!0);var T=j,k=j.plugins||[];s&&(T=Object.assign({},j,{plugins:_&&null!=l.data?[].concat(k,[{fn:function(){return{onTrigger:function(e,t){var n=l.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,S(n.content)}}}}]):k,render:function(){return{popper:O.container}}}));var N=[c].concat(a?[a.type]:[]);return cn((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||O.ref||on(),Object.assign({},T,{plugins:[dn].concat(j.plugins||[])}));return O.instance=n,d&&n.disable(),i&&n.show(),_&&l.hook({instance:n,content:o,props:T,setSingletonContent:S}),b(!0),function(){n.destroy(),null==l||l.cleanup(n)}}),N),cn((function(){var e,t,n,r,a;if(1!==O.renders){var s=O.instance;s.setProps((t=s.props,n=T,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:sn([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(a=n.popperOptions)?void 0:a.modifiers)||[]))})}))),null==(e=s.popperInstance)||e.forceUpdate(),d?s.disable():s.enable(),h&&(i?s.show():s.hide()),_&&l.hook({instance:s,content:o,props:T,setSingletonContent:S})}else O.renders++})),cn((function(){var e;if(s){var t=O.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;w.placement===n.placement&&w.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&w.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[w.placement,w.referenceHidden,w.escaped].concat(N)),en().createElement(en().Fragment,null,a?(0,Qt.cloneElement)(a,{ref:function(e){O.ref=e,an(a.ref,e)}}):null,g&&(0,tn.createPortal)(s?s(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(w),C,O.instance):o,O.container))}}var fn=function(e,t){return(0,Qt.forwardRef)((function(n,r){var a=n.children,o=nn(n,["children"]);return en().createElement(e,Object.assign({},t,o),a?(0,Qt.cloneElement)(a,{ref:function(e){an(r,e),an(a.ref,e)}}):null)}))},mn=fn(pn(Jt)),hn=t=>{let{content:n}=t;return(0,e.createElement)(mn,{content:n,className:"__tippy_tooltip"},(0,e.createElement)("span",{className:"__help_info"},(0,e.createElement)(d.Icon,{icon:_,size:16})))};const vn=t=>{let{inputId:n,id:r,index:a,initialValue:o,onChange:i,type:l="text",isDisabled:s,customClass:c,...u}=t;const[d,p]=(0,e.useState)(o);(0,e.useLayoutEffect)((()=>{p(o)}),[o]);let f="components-text-control__input";return c&&(f+=` ${c}`),(0,e.createElement)("input",Z({type:l,id:n,className:f,disabled:s,value:d,onChange:e=>{p(e.target.value)},onBlur:()=>i(d,r,a)},u))},gn=t=>{let{inputId:n,id:r,index:a,initialValue:o,onChange:i,type:l="text",isDisabled:s,customClass:c,...u}=t,d="components-text-control__input";return c&&(d+=` ${c}`),(0,e.createElement)("input",Z({type:l,id:n,className:d,disabled:s,value:o,onChange:e=>i(e.target.value,r,a)},u))};var bn=t=>{let{label:n,id:r,index:a="",value:o,onChange:i,description:l,type:s="text",renderAsFormField:c=!0,isFilterKey:u=!1,isDisabled:d=!1,tooltip:p,customClass:f="",isPro:m,...h}=t;const _=x(r,a);return c?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:_},n,"field_key"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"For example, the URL will be",(0,e.createElement)("br",null),"www.site.com/shop/?color=blue&size=large",(0,e.createElement)("br",null),"where ",(0,e.createElement)("b",null,"color")," and ",(0,e.createElement)("b",null,"size")," ","are the filter keys.")}),"keyword_filter_placeholder"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable for the input field of the keyword filter.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search products"')}),"keyword_filter_prefix"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the keyword.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Keyword:". For a value "shirt", it becomes "Keyword: shirt" in the active filters.')}),"search_field_default_placeholder"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view. This will be overridden by the placeholder value of the filter itself.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search"')}),"no_results_text"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view and combobox enabled in the dropdown view.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No results for:". For a keyword "purple", the text will be "No results for: ',(0,e.createElement)("u",null,"purple"),'"')}),"combobox_no_options_text"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when combobox is enabled in the dropdown(multiselect) view and all options have been chosen.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No options to choose"')}),"empty_filter_text"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when there are no options to filter by or the filter is empty.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "N/A"')}),"results_count_markup"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Default: Found %d product|Found %d products",(0,e.createElement)("br",null),(0,e.createElement)("br",null),"Here two markups are separated by the pipe(|) character. The first markup is for the singular result and the second one is for the plural result. %d will be replaced with product count.")}),"sort_by_prefix"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the sort by value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Sort by:". For a value "Title", it becomes "Sort by: Title" in the active filters.')}),"per_page_prefix"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the per page value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Per page:". For a value of "15", it becomes "Per page: 15" in the active filters.')}),E(m))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},u?(0,e.createElement)(vn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)):(0,e.createElement)(gn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)),p&&(0,e.createElement)(hn,{content:p})))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}})):(0,e.createElement)(e.Fragment,null,u?(0,e.createElement)(vn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)):(0,e.createElement)(gn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)))},yn=t=>{let{loading:n,handleTitleChange:r,handleSubmit:a}=t;const{state:{title:o,filterStatus:l,isDirty:s}}=i();let c,f,m=!1;return l?(c=(0,e.createElement)("span",null,(0,u.__)("Save","wc-ajax-product-filter")),f="primary",m=!0):s?(c=(0,e.createElement)("span",null,(0,u.__)("Save","wc-ajax-product-filter")),f="primary"):(c=(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"__icon"},"🔥"),(0,u.__)("Publish","wc-ajax-product-filter")),f="secondary"),n&&(m=!0),(0,e.createElement)("div",{className:"__title_wrapper"},(0,e.createElement)(d.Button,{href:C(),className:"__back_button"},(0,e.createElement)(d.Icon,{icon:p})),(0,e.createElement)(bn,{value:o,onChange:r,renderAsFormField:!1}),(0,e.createElement)(d.Button,{variant:f,className:"__save_button",onClick:a,isBusy:n,disabled:m},c))},wn=t=>{let{isOpen:n,closeModal:r}=t;const a=window.isSecureContext&&navigator.clipboard;return n&&(0,e.createElement)(d.Modal,{onRequestClose:r,__experimentalHideHeader:!0,className:"__publish_modal"},(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,u.__)("Publish Form","wc-ajax-product-filter")),(0,e.createElement)(d.TabPanel,{className:"__publish_tab_panel",activeClass:"active-tab",onSelect:()=>{U()},tabs:[{name:"widget",title:(0,u.__)("Widget","wc-ajax-product-filter")},{name:"shortcode",title:(0,u.__)("Shortcode","wc-ajax-product-filter")},{name:"php-code",title:(0,u.__)("PHP Code","wc-ajax-product-filter")}]},(t=>{let{name:n}=t;return(t=>{let n,o;const i=wcapf_admin_params.widgets_page_link;"shortcode"===t?(n=(0,u.__)("If you want to publish using shortcode, just copy code below and use it.","wc-ajax-product-filter"),o="[wcapf_form]"):"php-code"===t?(n=(0,u.__)("If you want to publish using PHP code, just copy code below and use it.","wc-ajax-product-filter"),o="<?php echo do_shortcode( '[wcapf_form]' ); ?>"):n=(0,u.sprintf)((0,u.__)("Go to the widgets page, add <b>%s</b> widget to the desired area.","wc-ajax-product-filter"),"WCAPF - Product Filter Form");let l="__code";return a&&(l+=" __clipboard-api-found"),(0,e.createElement)("div",{className:"__publish_tab_content"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:n}}),("shortcode"===t||"php-code"===t)&&(0,e.createElement)("div",{className:l,tabIndex:0,onClick:()=>{return e=o,void(a&&(navigator.clipboard.writeText(e),H((0,u.__)("Copied to clipboard","wc-ajax-product-filter"),"copied-to-clipboard")));var e}},(0,e.createElement)("div",{className:"__text"},o),a&&(0,e.createElement)(d.Icon,{icon:f,size:24})),"widget"===t&&(0,e.createElement)("div",{className:"__link"},(0,e.createElement)(d.Button,{variant:"primary",href:i,target:"_blank"},(0,u.__)("Go to Widgets","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},(0,u.__)("Cancel","wc-ajax-product-filter"))))})(n)}))))};function xn(e){const{type:t,taxonomy:n,component:r}=e,a=wcapf_admin_params.filter_types;let o;if("taxonomy"===t){const e=(0,c.find)(a,{value:t});o=(0,c.find)(e.options,{value:n})}else if("component"===t){const e=(0,c.find)(a,{value:t});o=(0,c.find)(e.options,{value:r})}else o=(0,c.find)(a,{value:t});return o}function En(e,t){const{title:n,type:r,meta_key:a}=e;let o=n;return o||(o=t.label,"post-meta"===r&&a&&(o+=`[${a}]`)),o}function Cn(e,t){const{field_key:n,type:r,meta_key:a}=e;let o=n;return o||("post-meta"===r?a&&(o=`_${a}`):"component"!==r&&(o=t.key)),o}function Sn(e){const{type:t,taxonomy:n,meta_key:r}=e;let a;return a="taxonomy"===t?`taxonomy>${n}`:"post-meta"===t?`post-meta>${r}`:t,a}function On(e,t){const{id:n,type:r,taxonomy:a,meta_key:o}=t;if(!n)if("taxonomy"===r){const t=(0,c.find)(e,{type:r,taxonomy:a});if(t)return t.field_key}else if("post-meta"===r){const t=(0,c.find)(e,{type:r,meta_key:o});if(t)return t.field_key}else{const t=(0,c.find)(e,{type:r});if(t)return t.field_key}}function jn(e,t,n,r){if(t.id)return;let a;const o=t.field_key;if((0,c.isEmpty)(o))return;const i=[],l=wcapf_admin_params.filter_types,s=(0,c.find)(l,{value:"taxonomy"}).options;for(let e=0;e<n.length;e++){if(e===r)continue;const t={...n[e]};if((0,c.isEmpty)(t.field_key)){const{type:e,taxonomy:n,meta_key:r}=t;if("taxonomy"===e){const e=(0,c.find)(s,{value:n});t.field_key=e.key}else if("post-meta"===e)t.field_key=`_${r}`;else{const n=(0,c.find)(l,{value:e});t.field_key=n.key}}i.push(t)}return(0,c.find)(i,{field_key:o})?(console.log("found in this form",(0,c.find)(i,{field_key:o})),a=g):(0,c.find)(e,{field_key:o})&&(console.log("found in other forms",(0,c.find)(e,{field_key:o})),a=g),a}function Tn(){return wcapf_admin_params.filter_default_data}function kn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[{label:(0,u.__)("Off","wc-ajax-product-filter"),value:"off"},{label:(0,u.__)("Include","wc-ajax-product-filter"),value:"include"},{label:(0,u.__)("Exclude","wc-ajax-product-filter"),value:"exclude"}],r=[{label:(0,u.__)("Child of","wc-ajax-product-filter"),value:"child"},{label:(0,u.__)("Parent Only","wc-ajax-product-filter"),value:"parent_only"}];return e?S(n,r,t):n}function Nn(){return[{label:(0,u.__)("ASC","wc-ajax-product-filter"),value:"asc"},{label:(0,u.__)("DESC","wc-ajax-product-filter"),value:"desc"}]}const Dn=[{label:(0,u.__)("Checkbox","wc-ajax-product-filter"),value:"checkbox"},{label:(0,u.__)("Radio","wc-ajax-product-filter"),value:"radio"},{label:(0,u.__)("Select","wc-ajax-product-filter"),value:"select"},{label:(0,u.__)("Multiselect","wc-ajax-product-filter"),value:"multi-select"},{label:(0,u.__)("Label","wc-ajax-product-filter"),value:"label"}];function In(){return Dn}function Mn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[{label:(0,u.__)("Range - Slider","wc-ajax-product-filter"),value:"range_slider"},{label:(0,u.__)("Range - Number","wc-ajax-product-filter"),value:"range_number"}],n=[{label:(0,u.__)("Range - Checkbox","wc-ajax-product-filter"),value:"range_checkbox"},{label:(0,u.__)("Range - Radio","wc-ajax-product-filter"),value:"range_radio"},{label:(0,u.__)("Range - Select","wc-ajax-product-filter"),value:"range_select"},{label:(0,u.__)("Range - Multiselect","wc-ajax-product-filter"),value:"range_multiselect"},{label:(0,u.__)("Range - Label","wc-ajax-product-filter"),value:"range_label"}];return S(t,n,e)}function Fn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[{label:(0,u.__)("Input - Date","wc-ajax-product-filter"),value:"input_date"},{label:(0,u.__)("Input - Date Range","wc-ajax-product-filter"),value:"input_date_range"}],n=[{label:(0,u.__)("Time Period - Checkbox","wc-ajax-product-filter"),value:"time_period_checkbox"},{label:(0,u.__)("Time Period - Radio","wc-ajax-product-filter"),value:"time_period_radio"},{label:(0,u.__)("Time Period - Select","wc-ajax-product-filter"),value:"time_period_select"},{label:(0,u.__)("Time Period - Multiselect","wc-ajax-product-filter"),value:"time_period_multiselect"},{label:(0,u.__)("Time Period - Label","wc-ajax-product-filter"),value:"time_period_label"}];return S(t,n,e)}function Pn(e){const{type:t,value_type:n,display_type:r,number_display_type:a,date_display_type:o}=e;let i=!1;const l=["select","multi-select","hierarchy-select"],s=["range_slider","range_number","range_select","range_multiselect"];return"price"===t?s.includes(a)||(i=!0):"post-meta"===t?"text"===n?l.includes(r)||(i=!0):"number"===n?s.includes(a)||(i=!0):"date"===n&&(["input_date","input_date_range","time_period_select","time_period_multiselect"].includes(o)||(i=!0)):l.includes(r)||(i=!0),i}function An(e){const{type:t,display_type:n}=e;return!("taxonomy"!==t||!["checkbox","radio","label"].includes(n))}function Rn(){const e=wcapf_admin_params.form_default_data;return(0,c.merge)({},e,{form_locations:[{location:"product_archive_pages",sub_location:"",results_method:"",product_query:wcapf_admin_params.default_product_query||{}}]})}const Ln=[{label:(0,u.__)("Slide-out panel on desktop","wc-ajax-product-filter"),value:"slide_out_panel_on_desktop"},{label:(0,u.__)("Slide-out panel on mobile","wc-ajax-product-filter"),value:"slide_out_panel_on_mobile"},{label:(0,u.__)("Slide-out panel on both","wc-ajax-product-filter"),value:"slide_out_panel_on_both"}],Vn=y();var Hn=t=>{let{isOpen:n,closeModal:r}=t;return n&&(0,e.createElement)(d.Modal,{onRequestClose:r,__experimentalHideHeader:!0,className:"__pro_update_modal"},(0,e.createElement)("h3",null,"WCAPF - WooCommerce Ajax Product Filter Pro (Update Required)"),(0,e.createElement)("div",{className:"__separator"}),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:Vn}}),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},(0,u.__)("Cancel","wc-ajax-product-filter"))))},Bn=()=>{const{state:t,dispatch:n}=i(),{setDirty:r}=L(t,n),[a,o]=(0,e.useState)(!1),[l,d]=(0,e.useState)(!1),[p,f]=(0,e.useState)(!1),{isDirty:m,title:h,formId:_,filterKeys:g,currentTab:w,filterStates:x,formFilters:E,formSettings:C}=t;(0,e.useEffect)((()=>{m&&(q(),X())}),[m]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yn,{loading:p,handleTitleChange:e=>{h!==e&&(n({type:"SET_TITLE",payload:e}),r())},handleSubmit:()=>{m?y()?d(!0):(()=>{q();const{isValid:e,validatedFormFilters:t}=(()=>{n({type:"SET_ERROR",payload:""});const e=[],t=[];let r=!0;const a=["sort-by","per-page"],o=["results-count","apply-mode","submit-mode"];for(let n=0;n<E.length;n++){const i=E[n];if(a.includes(i.type)||o.includes(i.component))continue;const l=(0,c.omit)(i,["type_error","meta_key_error","field_key_error","field_key_error_"]);let s=!1;(0,c.isEmpty)(l.type)&&(s=!0,l.type_error=(0,u.__)("Filter type is required.","wc-ajax-product-filter")),"post-meta"===l.type&&(0,c.isEmpty)(l.meta_key)&&(s=!0,l.meta_key_error=(0,u.__)("Meta key is required.","wc-ajax-product-filter"));const d=jn(g,i,E,n);d&&(s=!0,l.field_key_error=d),s&&((0,c.has)(l,"isNew")?t.push(l.uniqueIndex):t.push(l.id),r=!1),e.push(l)}if(!r){const e={};for(const n in x)t.map(String).includes(n)?e[n]={accordionStatus:!0,currentTab:"general"}:e[n]={...x[n],accordionStatus:!1};n({type:"SET_FILTER_STATES",payload:e})}return n({type:"SET_FORM_FILTERS",payload:e}),r||(n({type:"SET_ERROR",payload:v}),"filters"!==w&&n({type:"SET_CURRENT_TAB",payload:"filters"})),{isValid:r,validatedFormFilters:e}})();if(!e)return;const r=(e=>{const t=[];return e.forEach((e=>{const n=["grid_columns","enable_swatch","swatch_type","swatch_with_label","get_options","manual_options","parent_term","direct_child_only","number_range_enable_multiple_filter","number_range_query_type","number_range_select_all_items_label","number_range_show_count","number_get_options","number_manual_options","value_type","value_decimal","value_decimal_places","date_input_format","time_period_enable_multiple_filter","time_period_query_type","time_period_select_all_items_label","time_period_show_count","time_period_options","options_order_type","search_field_placeholder","enable_visibility_rules","visibility_rules"];["color","image","hierarchy-select"].includes(e.display_type)&&n.push("display_type"),["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(e.number_display_type)&&n.push("number_display_type"),["time_period_checkbox","time_period_radio","time_period_select","time_period_multiselect","time_period_label"].includes(e.date_display_type)&&n.push("date_display_type"),["slug","count","include"].includes(e.order_terms_by)&&n.push("order_terms_by"),["child","parent_only"].includes(e.limit_options)&&n.push("limit_options"),["value","label","count","include"].includes(e.options_order_by)&&n.push("options_order_by"),["count","include"].includes(e.post_author_order_by)&&n.push("post_author_order_by"),"grid"===e.native_display_type_layout&&n.push("native_display_type_layout"),"grid"===e.custom_display_type_layout&&n.push("custom_display_type_layout");const r=(0,c.pick)(Tn(),n),a={...e,...r};t.push(a)})),t})(t),a=(()=>{const e=["form_locations","priority","form_layout","columns_per_row","show_form_on_top_of_products","filter_mode","show_clear_btn"];Ln.map((e=>e.value)).includes(C.form_visibility)&&e.push("form_visibility");const t=(0,c.pick)(Rn(),e);return{...C,...t}})();f(!0);const o=new FormData;o.append("action","wcapf_save_form"),o.append("nonce",b()),o.append("form_title",h),o.append("form_id",_),o.append("form_filters",JSON.stringify(r)),o.append("form_settings",JSON.stringify(a)),s().post(wcapf_admin_params.ajaxurl,o).then((e=>{f(!1);const{data:{data:t,success:r}}=e;if(r)n({type:"SET_FILTER_KEYS",payload:t.filter_keys}),n({type:"SET_FORM_FILTERS",payload:t.form_filters}),n({type:"SET_FORM_SETTINGS",payload:t.form_settings}),n({type:"SET_SHOW_REVIEW_NOTICE",payload:t.show_review_notice}),n({type:"SET_DIRTY",payload:!1}),wcapf_admin_params.dirty=!1,function(e){H(e,$,"👌")}((0,u.__)("Form saved successfully","wc-ajax-product-filter"));else if(t.errors){n({type:"SET_ERROR",payload:v});const e=t.errors;console.log(e);const r=E.map(((t,n)=>{const r=(0,c.find)(e,{order:n});if(r){const{key:e,message:n}=r;return{...t,[e]:n,type_error:"",meta_key_error:"",field_key_error:""}}return t}));n({type:"SET_FORM_FILTERS",payload:r});const a={};for(let t=0;t<r.length;t++){const n=(0,c.find)(e,{order:t}),o=r[t];let i;i=(0,c.has)(o,"isNew")?o.uniqueIndex:o.id,a[i]=n?{accordionStatus:!0,currentTab:"general"}:{...x[i],accordionStatus:!1}}n({type:"SET_FILTER_STATES",payload:a}),"filters"!==w&&n({type:"SET_CURRENT_TAB",payload:"filters"})}else W(t)})).catch((e=>{console.log(e),f(!1),W(e.message)}))})():(q(),o(!0))}}),(0,e.createElement)(wn,{isOpen:a,closeModal:()=>{U(),o(!1)}}),(0,e.createElement)(Hn,{isOpen:l,closeModal:()=>{d(!1)}}))},Un=window.wp.primitives,$n=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),zn=n(941),Wn=(0,e.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Un.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),qn=(0,e.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Un.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),Gn=function(t){let{icon:n,size:r=24,...a}=t;return(0,e.cloneElement)(n,{width:r,height:r,...a})},Yn=(0,e.createElement)(Un.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})),Xn=n(184),Kn=n.n(Xn),Zn=(e,t)=>{const{setDirty:n}=L(e,t),{formFilters:r}=e,a=(e,a,o)=>{if(r[e][a]===o)return;const i=r.map(((t,n)=>n===e?{...t,[a]:o}:t));t({type:"SET_FORM_FILTERS",payload:i}),n()},o=function(e,a,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=r[e];if(l[a]===o)return;const s=r.map(((t,n)=>n===e?{...t,...i}:t));t({type:"SET_FORM_FILTERS",payload:s}),n()},i=function(e,a,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=r[e];if(l[a]===o)return;const s=(0,c.pick)(Tn(),["taxonomy","taxHierarchical","meta_key","component","display_type","native_display_type_layout","custom_display_type_layout","grid_columns","enable_swatch","swatch_type","swatch_with_label","get_options","order_terms_by","order_terms_dir","limit_options","include_terms","include_child","exclude_terms","exclude_child","parent_term","direct_child_only","number_get_options","manual_options","number_manual_options","time_period_options","sort_by_options","per_page_options","value_type","value_decimal","value_decimal_places","options_order_by","options_order_dir","options_order_type"]),u=r.map(((t,n)=>{if(n===e){const e={...t,...s,...i};return["sort-by","per-page"].includes(o)&&(e.display_type="radio"),e}return t}));t({type:"SET_FORM_FILTERS",payload:u}),n()};return{handleFilterTypeChange:(e,t,n)=>{const{value:r,type:a,taxHierarchical:o}=e;"taxonomy"!==a?"component"!==a?i(n,t,r,{[t]:r,type_error:"",field_key_error_:""}):i(n,a,r,{[t]:a,component:r,type_error:"",field_key_error_:""}):i(n,a,r,{[t]:a,type_error:"",field_key_error_:"",taxonomy:r,taxHierarchical:o?"1":"",display_type:"checkbox"})},handleFilterKeyChange:(e,t,n)=>{const r=wpFeSanitizeTitle(e);o(n,[t],r,{[t]:r,field_key_error:"",field_key_error_:""})},handleMetaKeyChange:(e,t,n)=>{const a=e.value,i={[t]:a};a&&r[n].meta_key_error&&(i.meta_key_error=""),o(n,[t],a,i)},handleGetOptionsChange:(e,t,n)=>{const i=e.target.value,l=r[n];if("automatically"!==i)return void a(n,t,i);const{type:s,value_type:c}=l;"post-meta"===s&&"text"===c&&"include"===l.options_order_by?o(n,t,i,{[t]:i,options_order_by:"none"}):a(n,t,i)},handleCheckboxChange:(e,t,n)=>{a(n,t,e?"1":"")},handleRadioChange:(e,t,n)=>{const r=e.target.value;a(n,t,r)},handleTextFieldChange:(e,t,n)=>{a(n,t,e)},handleToggleGroupChange:(e,t,n)=>{a(n,t,e)},handleSelectChange:(e,t,n)=>{a(n,t,e.value)},handleSelectTermChange:(e,t,n)=>{a(n,t,e)},handleManualOptionsChange:function(e,a,o){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const l=r.map(((t,n)=>n===o?{...t,[a]:e}:t));t({type:"SET_FORM_FILTERS",payload:l}),i&&n()},handleShowHierarchyChange:(e,t,n)=>{const a=e?"1":"",i={[t]:a};a&&"soft_limit"===r[n].enable_reduce_height&&(i.enable_reduce_height="no"),o(n,[t],a,i)},handleVisibilityRulesChange:(e,t,n)=>{a(n,t,e)}}},Jn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Qn=Math.abs,er=String.fromCharCode,tr=Object.assign;function nr(e){return e.trim()}function rr(e,t,n){return e.replace(t,n)}function ar(e,t){return e.indexOf(t)}function or(e,t){return 0|e.charCodeAt(t)}function ir(e,t,n){return e.slice(t,n)}function lr(e){return e.length}function sr(e){return e.length}function cr(e,t){return t.push(e),e}var ur=1,dr=1,pr=0,fr=0,mr=0,hr="";function _r(e,t,n,r,a,o,i){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:ur,column:dr,length:i,return:""}}function vr(e,t){return tr(_r("",null,null,"",null,null,0),e,{length:-e.length},t)}function gr(){return mr=fr>0?or(hr,--fr):0,dr--,10===mr&&(dr=1,ur--),mr}function br(){return mr=fr<pr?or(hr,fr++):0,dr++,10===mr&&(dr=1,ur++),mr}function yr(){return or(hr,fr)}function wr(){return fr}function xr(e,t){return ir(hr,e,t)}function Er(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Cr(e){return ur=dr=1,pr=lr(hr=e),fr=0,[]}function Sr(e){return hr="",e}function Or(e){return nr(xr(fr-1,kr(91===e?e+2:40===e?e+1:e)))}function jr(e){for(;(mr=yr())&&mr<33;)br();return Er(e)>2||Er(mr)>3?"":" "}function Tr(e,t){for(;--t&&br()&&!(mr<48||mr>102||mr>57&&mr<65||mr>70&&mr<97););return xr(e,wr()+(t<6&&32==yr()&&32==br()))}function kr(e){for(;br();)switch(mr){case e:return fr;case 34:case 39:34!==e&&39!==e&&kr(mr);break;case 40:41===e&&kr(e);break;case 92:br()}return fr}function Nr(e,t){for(;br()&&e+mr!==57&&(e+mr!==84||47!==yr()););return"/*"+xr(t,fr-1)+"*"+er(47===e?e:br())}function Dr(e){for(;!Er(yr());)br();return xr(e,fr)}var Ir="-ms-",Mr="-moz-",Fr="-webkit-",Pr="comm",Ar="rule",Rr="decl",Lr="@keyframes";function Vr(e,t){for(var n="",r=sr(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function Hr(e,t,n,r){switch(e.type){case"@import":case Rr:return e.return=e.return||e.value;case Pr:return"";case Lr:return e.return=e.value+"{"+Vr(e.children,r)+"}";case Ar:e.value=e.props.join(",")}return lr(n=Vr(e.children,r))?e.return=e.value+"{"+n+"}":""}function Br(e,t){switch(function(e,t){return(((t<<2^or(e,0))<<2^or(e,1))<<2^or(e,2))<<2^or(e,3)}(e,t)){case 5103:return Fr+"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 Fr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fr+e+Mr+e+Ir+e+e;case 6828:case 4268:return Fr+e+Ir+e+e;case 6165:return Fr+e+Ir+"flex-"+e+e;case 5187:return Fr+e+rr(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Fr+e+Ir+"flex-item-"+rr(e,/flex-|-self/,"")+e;case 4675:return Fr+e+Ir+"flex-line-pack"+rr(e,/align-content|flex-|-self/,"")+e;case 5548:return Fr+e+Ir+rr(e,"shrink","negative")+e;case 5292:return Fr+e+Ir+rr(e,"basis","preferred-size")+e;case 6060:return Fr+"box-"+rr(e,"-grow","")+Fr+e+Ir+rr(e,"grow","positive")+e;case 4554:return Fr+rr(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return rr(rr(rr(e,/(zoom-|grab)/,Fr+"$1"),/(image-set)/,Fr+"$1"),e,"")+e;case 5495:case 3959:return rr(e,/(image-set\([^]*)/,Fr+"$1$`$1");case 4968:return rr(rr(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Fr+e+e;case 4095:case 3583:case 4068:case 2532:return rr(e,/(.+)-inline(.+)/,Fr+"$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(lr(e)-1-t>6)switch(or(e,t+1)){case 109:if(45!==or(e,t+4))break;case 102:return rr(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+Mr+(108==or(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ar(e,"stretch")?Br(rr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==or(e,t+1))break;case 6444:switch(or(e,lr(e)-3-(~ar(e,"!important")&&10))){case 107:return rr(e,":",":"+Fr)+e;case 101:return rr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Fr+(45===or(e,14)?"inline-":"")+"box$3$1"+Fr+"$2$3$1"+Ir+"$2box$3")+e}break;case 5936:switch(or(e,t+11)){case 114:return Fr+e+Ir+rr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fr+e+Ir+rr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fr+e+Ir+rr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Fr+e+Ir+e+e}return e}function Ur(e){return Sr($r("",null,null,null,[""],e=Cr(e),0,[0],e))}function $r(e,t,n,r,a,o,i,l,s){for(var c=0,u=0,d=i,p=0,f=0,m=0,h=1,_=1,v=1,g=0,b="",y=a,w=o,x=r,E=b;_;)switch(m=g,g=br()){case 40:if(108!=m&&58==E.charCodeAt(d-1)){-1!=ar(E+=rr(Or(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=Or(g);break;case 9:case 10:case 13:case 32:E+=jr(m);break;case 92:E+=Tr(wr()-1,7);continue;case 47:switch(yr()){case 42:case 47:cr(Wr(Nr(br(),wr()),t,n),s);break;default:E+="/"}break;case 123*h:l[c++]=lr(E)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:_=0;case 59+u:f>0&&lr(E)-d&&cr(f>32?qr(E+";",r,n,d-1):qr(rr(E," ","")+";",r,n,d-2),s);break;case 59:E+=";";default:if(cr(x=zr(E,t,n,c,u,a,l,b,y=[],w=[],d),o),123===g)if(0===u)$r(E,t,x,x,y,o,d,l,w);else switch(p){case 100:case 109:case 115:$r(e,x,x,r&&cr(zr(e,x,x,0,0,a,l,b,a,y=[],d),w),a,w,d,l,r?y:w);break;default:$r(E,x,x,x,[""],w,0,l,w)}}c=u=f=0,h=v=1,b=E="",d=i;break;case 58:d=1+lr(E),f=m;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==gr())continue;switch(E+=er(g),g*h){case 38:v=u>0?1:(E+="\f",-1);break;case 44:l[c++]=(lr(E)-1)*v,v=1;break;case 64:45===yr()&&(E+=Or(br())),p=yr(),u=d=lr(b=E+=Dr(wr())),g++;break;case 45:45===m&&2==lr(E)&&(h=0)}}return o}function zr(e,t,n,r,a,o,i,l,s,c,u){for(var d=a-1,p=0===a?o:[""],f=sr(p),m=0,h=0,_=0;m<r;++m)for(var v=0,g=ir(e,d+1,d=Qn(h=i[m])),b=e;v<f;++v)(b=nr(h>0?p[v]+" "+g:rr(g,/&\f/g,p[v])))&&(s[_++]=b);return _r(e,t,n,0===a?Ar:l,s,c,u)}function Wr(e,t,n){return _r(e,t,n,Pr,er(mr),ir(e,2,-2),0)}function qr(e,t,n,r){return _r(e,t,n,Rr,ir(e,0,r),ir(e,r+1,-1),r)}var Gr=function(e,t,n){for(var r=0,a=0;r=a,a=yr(),38===r&&12===a&&(t[n]=1),!Er(a);)br();return xr(e,fr)},Yr=new WeakMap,Xr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Yr.get(n))&&!r){Yr.set(e,!0);for(var a=[],o=function(e,t){return Sr(function(e,t){var n=-1,r=44;do{switch(Er(r)){case 0:38===r&&12===yr()&&(t[n]=1),e[n]+=Gr(fr-1,t,n);break;case 2:e[n]+=Or(r);break;case 4:if(44===r){e[++n]=58===yr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=er(r)}}while(r=br());return e}(Cr(e),t))}(t,a),i=n.props,l=0,s=0;l<o.length;l++)for(var c=0;c<i.length;c++,s++)e.props[s]=a[l]?o[l].replace(/&\f/g,i[c]):i[c]+" "+o[l]}}},Kr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},Zr=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Rr:e.return=Br(e.value,e.length);break;case Lr:return Vr([vr(e,{value:rr(e.value,"@","@"+Fr)})],r);case Ar:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Vr([vr(e,{props:[rr(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Vr([vr(e,{props:[rr(t,/:(plac\w+)/,":-webkit-input-$1")]}),vr(e,{props:[rr(t,/:(plac\w+)/,":-moz-$1")]}),vr(e,{props:[rr(t,/:(plac\w+)/,Ir+"input-$1")]})],r)}return""}))}}],Jr=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,a,o=e.stylisPlugins||Zr,i={},l=[];r=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<t.length;n++)i[t[n]]=!0;l.push(e)}));var s,c,u,d,p=[Hr,(d=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[Xr,Kr].concat(o,p),u=sr(c),function(e,t,n,r){for(var a="",o=0;o<u;o++)a+=c[o](e,t,n,r)||"";return a});a=function(e,t,n,r){s=n,Vr(Ur(e?e+"{"+t.styles+"}":t.styles),f),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new Jn({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:a};return m.sheet.hydrate(l),m};function Qr(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var ea=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ta=function(e,t,n){ea(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}},na=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=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(a){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)},ra={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},aa=/[A-Z]|^ms/g,oa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ia=function(e){return 45===e.charCodeAt(1)},la=function(e){return null!=e&&"boolean"!=typeof e},sa=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=ia(n=e)?n:n.replace(aa,"-$&").toLowerCase()),t[e];var n}}(),ca=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(oa,(function(e,t,n){return da={name:t,styles:n,next:da},t}))}return 1===ra[e]||ia(e)||"number"!=typeof t||0===t?t:t+"px"};function ua(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 da={name:n.name,styles:n.styles,next:da},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)da={name:r.name,styles:r.styles,next:da},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=ua(e,t,n[a])+";";else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=o+"{"+t[i]+"}":la(i)&&(r+=sa(o)+":"+ca(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=ua(e,t,i);switch(o){case"animation":case"animationName":r+=sa(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var s=0;s<i.length;s++)la(i[s])&&(r+=sa(o)+":"+ca(o,i[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=da,o=n(e);return da=a,ua(e,t,o)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var da,pa=/label:\s*([^\s;\n{]+)\s*(;|$)/g,fa=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";da=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=ua(n,t,o)):a+=o[0];for(var i=1;i<e.length;i++)a+=ua(n,t,e[i]),r&&(a+=o[i]);pa.lastIndex=0;for(var l,s="";null!==(l=pa.exec(a));)s+="-"+l[1];return{name:na(a)+s,styles:a,next:da}},ma={}.hasOwnProperty,ha=(0,Qt.createContext)("undefined"!=typeof HTMLElement?Jr({key:"css"}):null);ha.Provider;var _a=function(e){return(0,Qt.forwardRef)((function(t,n){var r=(0,Qt.useContext)(ha);return e(t,r,n)}))},va=(0,Qt.createContext)({}),ga=Qt.useInsertionEffect?Qt.useInsertionEffect:function(e){e()};function ba(e){ga(e)}var ya="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",wa=function(e,t){var n={};for(var r in t)ma.call(t,r)&&(n[r]=t[r]);return n[ya]=e,n},xa=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ea(t,n,r),ba((function(){return ta(t,n,r)})),null},Ea=_a((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var a=e[ya],o=[r],i="";"string"==typeof e.className?i=Qr(t.registered,o,e.className):null!=e.className&&(i=e.className+" ");var l=fa(o,void 0,(0,Qt.useContext)(va));i+=t.key+"-"+l.name;var s={};for(var c in e)ma.call(e,c)&&"css"!==c&&c!==ya&&(s[c]=e[c]);return s.ref=n,s.className=i,(0,Qt.createElement)(Qt.Fragment,null,(0,Qt.createElement)(xa,{cache:t,serialized:l,isStringTag:"string"==typeof a}),(0,Qt.createElement)(a,s))}));n(679);var Ca=function(e,t){var n=arguments;if(null==t||!ma.call(t,"css"))return Qt.createElement.apply(void 0,n);var r=n.length,a=new Array(r);a[0]=Ea,a[1]=wa(e,t);for(var o=2;o<r;o++)a[o]=n[o];return Qt.createElement.apply(null,a)};function Sa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fa(t)}Qt.useInsertionEffect?Qt.useInsertionEffect:Qt.useLayoutEffect;var Oa=function e(t){for(var n=t.length,r=0,a="";r<n;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var l in i="",o)o[l]&&l&&(i&&(i+=" "),i+=l);break;default:i=o}i&&(a&&(a+=" "),a+=i)}}return a};function ja(e,t,n){var r=[],a=Qr(e,r,n);return r.length<2?n:a+t(r)}var Ta=function(e){var t=e.cache,n=e.serializedArr;return ba((function(){for(var e=0;e<n.length;e++)ta(t,n[e],!1)})),null},ka=_a((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];var o=fa(r,t.registered);return n.push(o),ea(t,o,!1),t.key+"-"+o.name},a={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return ja(t.registered,r,Oa(n))},theme:(0,Qt.useContext)(va)},o=e.children(a);return(0,Qt.createElement)(Qt.Fragment,null,(0,Qt.createElement)(Ta,{cache:t,serializedArr:n}),o)}));function Na(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ia(e,t){if(e){if("string"==typeof e)return Da(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Da(e,t):void 0}}function Ma(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(e){i=!0,a=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||Ia(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fa(e){return Fa="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},Fa(e)}function Pa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Aa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ra(e,t,n){return t&&Aa(e.prototype,t),n&&Aa(e,n),e}function La(e,t){return La=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},La(e,t)}function Va(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&La(e,t)}function Ha(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 $a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ua(Object(n),!0).forEach((function(t){Ba(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ua(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},za(e)}function Wa(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qa(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(e){return!1}}();return function(){var n,r=za(e);if(t){var a=za(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Wa(this,n)}}var Ga=["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ya=function(){};function Xa(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Ka(e,t,n){var r=[n];if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&r.push("".concat(Xa(e,a)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Za=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===Fa(e)&&null!==e?[e]:[];var t},Ja=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,$a({},Na(e,Ga))};function Qa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function eo(e){return Qa(e)?window.pageYOffset:e.scrollTop}function to(e,t){Qa(e)?window.scrollTo(0,t):e.scrollTop=t}function no(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ro(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ya,a=eo(e),o=t-a,i=10,l=0;function s(){var t=no(l+=i,a,o,n);to(e,t),l<n?window.requestAnimationFrame(s):r(e)}s()}function ao(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var oo=!1,io={get passive(){return oo=!0}},lo="undefined"!=typeof window?window:{};lo.addEventListener&&lo.removeEventListener&&(lo.addEventListener("p",Ya,io),lo.removeEventListener("p",Ya,!1));var so=oo;function co(e){return null!=e}function uo(e,t,n){return e?t:n}function po(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,a=e.placement,o=e.shouldScroll,i=e.isFixedPosition,l=e.theme.spacing,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return a;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=s.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,_=n.offsetParent.getBoundingClientRect().top,v=i||Qa(u=s)?window.innerHeight:u.clientHeight,g=eo(s),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),w=_-y,x=v-h,E=w+g,C=d-g-h,S=f-v+g+b,O=g+h-y,j=160;switch(a){case"auto":case"bottom":if(x>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!i)return o&&ro(s,S,j),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&x>=r)return o&&ro(s,S,j),{placement:"bottom",maxHeight:i?x-b:C-b};if("auto"===a||i){var T=t,k=i?w:E;return k>=r&&(T=Math.min(k-b-l.controlHeight,t)),{placement:"top",maxHeight:T}}if("bottom"===a)return o&&to(s,S),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(E>=m&&!i)return o&&ro(s,O,j),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&w>=r){var N=t;return(!i&&E>=r||i&&w>=r)&&(N=i?w-y:E-y),o&&ro(s,O,j),{placement:"top",maxHeight:N}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return c}var fo=function(e){return"auto"===e?"bottom":e},mo=(0,Qt.createContext)({getPortalPlacement:null}),ho=function(e){Va(n,e);var t=qa(n);function n(){var e;Pa(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.context=void 0,e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,a=n.maxMenuHeight,o=n.menuPlacement,i=n.menuPosition,l=n.menuShouldScrollIntoView,s=n.theme;if(t){var c="fixed"===i,u=po({maxHeight:a,menuEl:t,minHeight:r,placement:o,shouldScroll:l&&!c,isFixedPosition:c,theme:s}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||fo(t);return $a($a({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return Ra(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(Qt.Component);ho.contextType=mo;var _o=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},vo=_o,go=_o,bo=function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps;return Ca("div",Z({css:a("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},o),t)};bo.defaultProps={children:"No options"};var yo=function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps;return Ca("div",Z({css:a("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},o),t)};yo.defaultProps={children:"Loading..."};var wo,xo,Eo,Co=function(e){Va(n,e);var t=qa(n);function n(){var e;Pa(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==fo(e.props.menuPlacement)&&e.setState({placement:n})},e}return Ra(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.className,a=e.controlElement,o=e.cx,i=e.innerProps,l=e.menuPlacement,s=e.menuPosition,c=e.getStyles,u="fixed"===s;if(!t&&!u||!a)return null;var d=this.state.placement||fo(l),p=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(a),f=u?0:window.pageYOffset,m=p[d]+f,h=Ca("div",Z({css:c("menuPortal",{offset:m,position:s,rect:p}),className:o({"menu-portal":!0},r)},i),n);return Ca(mo.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,tn.createPortal)(h,t):h)}}]),n}(Qt.Component),So=["size"],Oo={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},jo=function(e){var t=e.size,n=Na(e,So);return Ca("svg",Z({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Oo},n))},To=function(e){return Ca(jo,Z({size:20},e),Ca("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ko=function(e){return Ca(jo,Z({size:20},e),Ca("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},No=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,a=n.colors;return{label:"indicatorContainer",color:t?a.neutral60:a.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?a.neutral80:a.neutral40}}},Do=No,Io=No,Mo=function(){var e=Sa.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(wo||(xo=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Eo||(Eo=xo.slice(0)),wo=Object.freeze(Object.defineProperties(xo,{raw:{value:Object.freeze(Eo)}})))),Fo=function(e){var t=e.delay,n=e.offset;return Ca("span",{css:Sa({animation:"".concat(Mo," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Po=function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerProps,o=e.isRtl;return Ca("div",Z({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},a),Ca(Fo,{delay:0,offset:o}),Ca(Fo,{delay:160,offset:!0}),Ca(Fo,{delay:320,offset:!o}))};Po.defaultProps={size:4};var Ao=["data"],Ro=["innerRef","isDisabled","isHidden","inputClassName"],Lo={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Vo={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":$a({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Lo)},Ho=function(e){return $a({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Lo)},Bo=function(e){var t=e.children,n=e.innerProps;return Ca("div",n,t)},Uo={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps;return Ca("div",Z({css:a("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},o),t||Ca(To,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,a=e.className,o=e.isDisabled,i=e.isFocused,l=e.innerRef,s=e.innerProps,c=e.menuIsOpen;return Ca("div",Z({ref:l,css:r("control",e),className:n({control:!0,"control--is-disabled":o,"control--is-focused":i,"control--menu-is-open":c},a)},s),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps;return Ca("div",Z({css:a("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},o),t||Ca(ko,null))},DownChevron:ko,CrossIcon:To,Group:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.Heading,i=e.headingProps,l=e.innerProps,s=e.label,c=e.theme,u=e.selectProps;return Ca("div",Z({css:a("group",e),className:r({group:!0},n)},l),Ca(o,Z({},i,{selectProps:u,theme:c,getStyles:a,cx:r}),s),Ca("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,a=Ja(e);a.data;var o=Na(a,Ao);return Ca("div",Z({css:t("groupHeading",e),className:n({"group-heading":!0},r)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,a=e.innerProps,o=e.getStyles;return Ca("div",Z({css:o("indicatorsContainer",e),className:r({indicators:!0},n)},a),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerProps;return Ca("span",Z({},a,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.value,o=Ja(e),i=o.innerRef,l=o.isDisabled,s=o.isHidden,c=o.inputClassName,u=Na(o,Ro);return Ca("div",{className:n({"input-container":!0},t),css:r("input",e),"data-value":a||""},Ca("input",Z({className:n({input:!0},c),ref:i,style:Ho(s),disabled:l},u)))},LoadingIndicator:Po,Menu:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerRef,i=e.innerProps;return Ca("div",Z({css:a("menu",e),className:r({menu:!0},n),ref:o},i),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps,i=e.innerRef,l=e.isMulti;return Ca("div",Z({css:a("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":l},n),ref:i},o),t)},MenuPortal:Co,LoadingMessage:yo,NoOptionsMessage:bo,MultiValue:function(e){var t=e.children,n=e.className,r=e.components,a=e.cx,o=e.data,i=e.getStyles,l=e.innerProps,s=e.isDisabled,c=e.removeProps,u=e.selectProps,d=r.Container,p=r.Label,f=r.Remove;return Ca(ka,null,(function(r){var m=r.css,h=r.cx;return Ca(d,{data:o,innerProps:$a({className:h(m(i("multiValue",e)),a({"multi-value":!0,"multi-value--is-disabled":s},n))},l),selectProps:u},Ca(p,{data:o,innerProps:{className:h(m(i("multiValueLabel",e)),a({"multi-value__label":!0},n))},selectProps:u},t),Ca(f,{data:o,innerProps:$a({className:h(m(i("multiValueRemove",e)),a({"multi-value__remove":!0},n)),"aria-label":"Remove ".concat(t||"option")},c),selectProps:u}))}))},MultiValueContainer:Bo,MultiValueLabel:Bo,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ca("div",Z({role:"button"},n),t||Ca(To,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.isDisabled,i=e.isFocused,l=e.isSelected,s=e.innerRef,c=e.innerProps;return Ca("div",Z({css:a("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":i,"option--is-selected":l},n),ref:s,"aria-disabled":o},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps;return Ca("div",Z({css:a("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.innerProps,i=e.isDisabled,l=e.isRtl;return Ca("div",Z({css:a("container",e),className:r({"--is-disabled":i,"--is-rtl":l},n)},o),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,a=e.getStyles,o=e.isDisabled,i=e.innerProps;return Ca("div",Z({css:a("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},i),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,a=e.innerProps,o=e.isMulti,i=e.getStyles,l=e.hasValue;return Ca("div",Z({css:i("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":l},n)},a),t)}},$o=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function zo(e){return function(e){if(Array.isArray(e))return Da(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ia(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Wo=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function qo(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(a=t[n])||Wo(r)&&Wo(a)))return!1;var r,a;return!0}for(var Go={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Yo=function(e){return Ca("span",Z({css:Go},e))},Xo={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,a=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,a=e.labels,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,a=e.label,o=void 0===a?"":a,i=e.selectValue,l=e.isDisabled,s=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(o," focused, ").concat(c(i,n),".");if("menu"===t){var u=l?" disabled":"",d="".concat(s?"selected":"focused").concat(u);return"option ".concat(o," ").concat(d,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Ko=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,a=e.focusableOptions,o=e.isFocused,i=e.selectValue,l=e.selectProps,s=e.id,c=l.ariaLiveMessages,u=l.getOptionLabel,d=l.inputValue,p=l.isMulti,f=l.isOptionDisabled,m=l.isSearchable,h=l.menuIsOpen,_=l.options,v=l.screenReaderStatus,g=l.tabSelectsValue,b=l["aria-label"],y=l["aria-live"],w=(0,Qt.useMemo)((function(){return $a($a({},Xo),c||{})}),[c]),x=(0,Qt.useMemo)((function(){var e,n="";if(t&&w.onChange){var r=t.option,a=t.options,o=t.removedValue,l=t.removedValues,s=t.value,c=o||r||(e=s,Array.isArray(e)?null:e),d=c?u(c):"",p=a||l||void 0,m=p?p.map(u):[],h=$a({isDisabled:c&&f(c,i),label:d,labels:m},t);n=w.onChange(h)}return n}),[t,w,f,i,u]),E=(0,Qt.useMemo)((function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&w.onFocus){var o={focused:t,label:u(t),isDisabled:f(t,i),isSelected:a,options:_,context:t===n?"menu":"value",selectValue:i};e=w.onFocus(o)}return e}),[n,r,u,f,w,_,i]),C=(0,Qt.useMemo)((function(){var e="";if(h&&_.length&&w.onFilter){var t=v({count:a.length});e=w.onFilter({inputValue:d,resultsMessage:t})}return e}),[a,d,h,w,_,v]),S=(0,Qt.useMemo)((function(){var e="";if(w.guidance){var t=r?"value":h?"menu":"input";e=w.guidance({"aria-label":b,context:t,isDisabled:n&&f(n,i),isMulti:p,isSearchable:m,tabSelectsValue:g})}return e}),[b,n,r,p,f,m,h,w,i,g]),O="".concat(E," ").concat(C," ").concat(S),j=Ca(Qt.Fragment,null,Ca("span",{id:"aria-selection"},x),Ca("span",{id:"aria-context"},O)),T="initial-input-focus"===(null==t?void 0:t.action);return Ca(Qt.Fragment,null,Ca(Yo,{id:s},T&&j),Ca(Yo,{"aria-live":y,"aria-atomic":"false","aria-relevant":"additions text"},o&&!T&&j))},Zo=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Jo=new RegExp("["+Zo.map((function(e){return e.letters})).join("")+"]","g"),Qo={},ei=0;ei<Zo.length;ei++)for(var ti=Zo[ei],ni=0;ni<ti.letters.length;ni++)Qo[ti.letters[ni]]=ti.base;var ri=function(e){return e.replace(Jo,(function(e){return Qo[e]}))},ai=function(e,t){var n;void 0===t&&(t=qo);var r,a=[],o=!1;return function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];return o&&n===this&&t(i,a)||(r=e.apply(this,i),o=!0,n=this,a=i),r}}(ri),oi=function(e){return e.replace(/^\s+|\s+$/g,"")},ii=function(e){return"".concat(e.label," ").concat(e.value)},li=["innerRef"];function si(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=Object.entries(e).filter((function(e){var t=Ma(e,1)[0];return!n.includes(t)}));return a.reduce((function(e,t){var n=Ma(t,2),r=n[0],a=n[1];return e[r]=a,e}),{})}(Na(e,li),"onExited","in","enter","exit","appear");return Ca("input",Z({ref:t},n,{css:Sa({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var ci=["boxSizing","height","overflow","paddingRight","position"],ui={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function di(e){e.preventDefault()}function pi(e){e.stopPropagation()}function fi(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function mi(){return"ontouchstart"in window||navigator.maxTouchPoints}var hi=!("undefined"==typeof window||!window.document||!window.document.createElement),_i=0,vi={capture:!1,passive:!1},gi=function(){return document.activeElement&&document.activeElement.blur()},bi={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function yi(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,a=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,a=e.onTopArrive,o=e.onTopLeave,i=(0,Qt.useRef)(!1),l=(0,Qt.useRef)(!1),s=(0,Qt.useRef)(0),c=(0,Qt.useRef)(null),u=(0,Qt.useCallback)((function(e,t){if(null!==c.current){var s=c.current,u=s.scrollTop,d=s.scrollHeight,p=s.clientHeight,f=c.current,m=t>0,h=d-p-u,_=!1;h>t&&i.current&&(r&&r(e),i.current=!1),m&&l.current&&(o&&o(e),l.current=!1),m&&t>h?(n&&!i.current&&n(e),f.scrollTop=d,_=!0,i.current=!0):!m&&-t>u&&(a&&!l.current&&a(e),f.scrollTop=0,_=!0,l.current=!0),_&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,a,o]),d=(0,Qt.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,Qt.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),f=(0,Qt.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;u(e,t)}),[u]),m=(0,Qt.useCallback)((function(e){if(e){var t=!!so&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),h=(0,Qt.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,Qt.useEffect)((function(){if(t){var e=c.current;return m(e),function(){h(e)}}}),[t,m,h]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,a=(0,Qt.useRef)({}),o=(0,Qt.useRef)(null),i=(0,Qt.useCallback)((function(e){if(hi){var t=document.body,n=t&&t.style;if(r&&ci.forEach((function(e){var t=n&&n[e];a.current[e]=t})),r&&_i<1){var o=parseInt(a.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,l=window.innerWidth-i+o||0;Object.keys(ui).forEach((function(e){var t=ui[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&mi()&&(t.addEventListener("touchmove",di,vi),e&&(e.addEventListener("touchstart",fi,vi),e.addEventListener("touchmove",pi,vi))),_i+=1}}),[r]),l=(0,Qt.useCallback)((function(e){if(hi){var t=document.body,n=t&&t.style;_i=Math.max(_i-1,0),r&&_i<1&&ci.forEach((function(e){var t=a.current[e];n&&(n[e]=t)})),t&&mi()&&(t.removeEventListener("touchmove",di,vi),e&&(e.removeEventListener("touchstart",fi,vi),e.removeEventListener("touchmove",pi,vi)))}}),[r]);return(0,Qt.useEffect)((function(){if(t){var e=o.current;return i(e),function(){l(e)}}}),[t,i,l]),function(e){o.current=e}}({isEnabled:n});return Ca(Qt.Fragment,null,n&&Ca("div",{onClick:gi,css:bi}),t((function(e){a(e),o(e)})))}var wi={clearIndicator:Io,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,a=r.colors,o=r.borderRadius,i=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?a.neutral5:a.neutral0,borderColor:t?a.neutral10:n?a.primary:a.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(a.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?a.primary:a.neutral30}}},dropdownIndicator:Do,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,a=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?a.neutral10:a.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.value,r=e.theme,a=r.spacing,o=r.colors;return $a({margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80,transform:n?"translateZ(0)":""},Vo)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,a=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?a.neutral60:a.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:go,menu:function(e){var t,n=e.placement,r=e.theme,a=r.borderRadius,o=r.spacing,i=r.colors;return Ha(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ha(t,"backgroundColor",i.neutral0),Ha(t,"borderRadius",a),Ha(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ha(t,"marginBottom",o.menuGutter),Ha(t,"marginTop",o.menuGutter),Ha(t,"position","absolute"),Ha(t,"width","100%"),Ha(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,a=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:a||void 0===a?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,a=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused?a.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}}},noOptionsMessage:vo,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,a=e.theme,o=a.spacing,i=a.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*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,a=n.colors;return{label:"singleValue",color:t?a.neutral40:a.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,r=e.hasValue,a=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&r&&a?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},xi={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}},Ei={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ao(),captureMenuScroll:!ao(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=$a({ignoreCase:!0,ignoreAccents:!0,stringify:ii,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,a=n.ignoreAccents,o=n.stringify,i=n.trim,l=n.matchFrom,s=i?oi(t):t,c=i?oi(o(e)):o(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),a&&(s=ai(s),c=ri(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-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(e){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 Ci(e,t,n,r){return{type:"option",data:t,isDisabled:Ni(e,t,n),isSelected:Di(e,t,n),label:Ti(e,t),value:ki(e,t),index:r}}function Si(e,t){return e.options.map((function(n,r){if("options"in n){var a=n.options.map((function(n,r){return Ci(e,n,t,r)})).filter((function(t){return ji(e,t)}));return a.length>0?{type:"group",data:n,options:a,index:r}:void 0}var o=Ci(e,n,t,r);return ji(e,o)?o:void 0})).filter(co)}function Oi(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,zo(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ji(e,t){var n=e.inputValue,r=void 0===n?"":n,a=t.data,o=t.isSelected,i=t.label,l=t.value;return(!Mi(e)||!o)&&Ii(e,{label:i,value:l,data:a},r)}var Ti=function(e,t){return e.getOptionLabel(t)},ki=function(e,t){return e.getOptionValue(t)};function Ni(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Di(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ki(e,t);return n.some((function(t){return ki(e,t)===r}))}function Ii(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Mi=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Fi=1,Pi=function(e){Va(n,e);var t=qa(n);function n(e){var r;return Pa(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!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,a=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),a(e,t)},r.setValue=function(e,t,n){var a=r.props,o=a.closeMenuOnSelect,i=a.isMulti,l=a.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),o&&(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,a=t.isMulti,o=t.name,i=r.state.selectValue,l=a&&r.isOptionSelected(e,i),s=r.isOptionDisabled(e,i);if(l){var c=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:o});a?r.setValue([].concat(zo(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,a=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==a})),i=uo(t,o,o[0]||null);r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(uo(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],a=t.slice(0,t.length-1),o=uo(e,a,a[0]||null);r.onChange(o,{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;n<e;n++)t[n]=arguments[n];return Ka.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Ti(r.props,e)},r.getOptionValue=function(e){return ki(r.props,e)},r.getStyles=function(e,t){var n=wi[e](t);n.boxSizing="border-box";var a=r.props.styles[e];return a?a(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,$a($a({},Uo),e.components);var e},r.buildCategorizedOptions=function(){return Si(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Oi(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:$a({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,a=t.menuIsOpen;r.focusInput(),a?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Qa(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var a=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=a>5||o>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=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),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){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),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 Mi(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,a=t.backspaceRemovesValue,o=t.escapeClearsValue,i=t.inputValue,l=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,_=f.selectValue;if(!(s||"function"==typeof u&&(u(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(!a)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&r.isOptionSelected(m,_))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):l&&o&&r.clearValue();break;case" ":if(i)return;if(!c){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++Fi),r.state.selectValue=Za(e.value),r}return Ra(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,n,r,a,o,i=this.props,l=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!l&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),c&&l&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),a=n.getBoundingClientRect(),o=n.offsetHeight/3,a.bottom+o>r.bottom?to(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):a.top-o<r.top&&to(t,Math.max(n.offsetTop-o,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,a=n.isFocused,o=this.buildFocusableOptions(),i="first"===e?0:o.length-1;if(!this.props.isMulti){var l=o.indexOf(r[0]);l>-1&&(i=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[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 a=n.indexOf(r);r||(a=-1);var o=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===a?0:-1===a?o:a-1;break;case"next":a>-1&&a<o&&(i=a+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var a=0,o=r.indexOf(n);n||(o=-1),"up"===e?a=o>0?o-1:r.length-1:"down"===e?a=(o+1)%r.length:"pageup"===e?(a=o-t)<0&&(a=0):"pagedown"===e?(a=o+t)>r.length-1&&(a=r.length-1):"last"===e&&(a=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(xi):$a($a({},xi),this.props.theme):xi}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,a=this.selectOption,o=this.setValue,i=this.props,l=i.isMulti,s=i.isRtl,c=i.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:s,options:c,selectOption:a,selectProps:i,setValue:o,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 Ni(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Di(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Ii(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,a=e.inputValue,o=e.tabIndex,i=e.form,l=e.menuIsOpen,s=this.getComponents().Input,c=this.state,u=c.inputIsHidden,d=c.ariaSelection,p=this.commonProps,f=r||this.getElementId("input"),m=$a($a($a({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},l&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Qt.createElement(s,Z({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:i,type:"text",value:a},m)):Qt.createElement(si,Z({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ya,onFocus:this.onInputFocus,disabled:t,tabIndex:o,inputMode:"none",form:i,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,a=t.MultiValueLabel,o=t.MultiValueRemove,i=t.SingleValue,l=t.Placeholder,s=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,m=c.placeholder,h=this.state,_=h.selectValue,v=h.focusedValue,g=h.isFocused;if(!this.hasValue()||!u)return f?null:Qt.createElement(l,Z({},s,{key:"placeholder",isDisabled:d,isFocused:g,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return _.map((function(t,i){var l=t===v,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Qt.createElement(n,Z({},s,{components:{Container:r,Label:a,Remove:o},isFocused:l,isDisabled:d,key:c,index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var b=_[0];return Qt.createElement(i,Z({},s,{data:b,isDisabled:d}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,a=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||a)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Qt.createElement(e,Z({},t,{innerProps:i,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,a=n.isLoading,o=this.state.isFocused;return e&&a?Qt.createElement(e,Z({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,a=this.props.isDisabled,o=this.state.isFocused;return Qt.createElement(n,Z({},r,{isDisabled:a,isFocused:o}))}},{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,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Qt.createElement(e,Z({},t,{innerProps:a,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,a=t.Menu,o=t.MenuList,i=t.MenuPortal,l=t.LoadingMessage,s=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,m=p.inputValue,h=p.isLoading,_=p.loadingMessage,v=p.minMenuHeight,g=p.maxMenuHeight,b=p.menuIsOpen,y=p.menuPlacement,w=p.menuPosition,x=p.menuPortalTarget,E=p.menuShouldBlockScroll,C=p.menuShouldScrollIntoView,S=p.noOptionsMessage,O=p.onMenuScrollToTop,j=p.onMenuScrollToBottom;if(!b)return null;var T,k=function(t,n){var r=t.type,a=t.data,o=t.isDisabled,i=t.isSelected,l=t.label,s=t.value,p=d===a,f=o?void 0:function(){return e.onOptionHover(a)},m=o?void 0:function(){return e.selectOption(a)},h="".concat(e.getElementId("option"),"-").concat(n),_={id:h,onClick:m,onMouseMove:f,onMouseOver:f,tabIndex:-1};return Qt.createElement(c,Z({},u,{innerProps:_,data:a,isDisabled:o,isSelected:i,key:h,label:l,type:r,value:s,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var a=t.data,o=t.options,i=t.index,l="".concat(e.getElementId("group"),"-").concat(i),s="".concat(l,"-heading");return Qt.createElement(n,Z({},u,{key:l,data:a,options:o,Heading:r,headingProps:{id:s,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(h){var N=_({inputValue:m});if(null===N)return null;T=Qt.createElement(l,u,N)}else{var D=S({inputValue:m});if(null===D)return null;T=Qt.createElement(s,u,D)}var I={minMenuHeight:v,maxMenuHeight:g,menuPlacement:y,menuPosition:w,menuShouldScrollIntoView:C},M=Qt.createElement(ho,Z({},u,I),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,l=r.maxHeight;return Qt.createElement(a,Z({},u,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:h,placement:i}),Qt.createElement(yi,{captureEnabled:f,onTopArrive:O,onBottomArrive:j,lockEnabled:E},(function(t){return Qt.createElement(o,Z({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:h,maxHeight:l,focusedOption:d}),T)})))}));return x||"fixed"===w?Qt.createElement(i,Z({},u,{appendTo:x,controlElement:this.controlRef,menuPlacement:y,menuPosition:w}),M):M}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,a=t.isMulti,o=t.name,i=this.state.selectValue;if(o&&!r){if(a){if(n){var l=i.map((function(t){return e.getOptionValue(t)})).join(n);return Qt.createElement("input",{name:o,type:"hidden",value:l})}var s=i.length>0?i.map((function(t,n){return Qt.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):Qt.createElement("input",{name:o,type:"hidden"});return Qt.createElement("div",null,s)}var c=i[0]?this.getOptionValue(i[0]):"";return Qt.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,a=t.focusedValue,o=t.isFocused,i=t.selectValue,l=this.getFocusableOptions();return Qt.createElement(Ko,Z({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:a,isFocused:o,selectValue:i,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,a=e.ValueContainer,o=this.props,i=o.className,l=o.id,s=o.isDisabled,c=o.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return Qt.createElement(r,Z({},d,{className:i,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:u}),this.renderLiveRegion(),Qt.createElement(t,Z({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:u,menuIsOpen:c}),Qt.createElement(a,Z({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),Qt.createElement(n,Z({},d,{isDisabled:s}),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,a=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,i=t.isFocused,l=t.prevWasFocused,s=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,f=Za(c),m={};if(n&&(c!==n.value||s!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var h=u?function(e,t){return Oi(Si(e,t))}(e,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<t.length)return t[r]}return null}(t,f):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,h);m={selectValue:f,focusedOption:v,focusedValue:_,clearFocusValueOnUpdate:!1}}var g=null!=a&&e!==n?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},b=o,y=i&&l;return i&&!y&&(b={value:uo(p,f,f[0]||null),options:f,action:"initial-input-focus"},y=!l),"initial-input-focus"===(null==o?void 0:o.action)&&(b=null),$a($a($a({},m),g),{},{prevProps:e,ariaSelection:b,prevWasFocused:y})}}]),n}(Qt.Component);Pi.defaultProps=Ei;var Ai=(0,Qt.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,a=void 0!==r&&r,o=e.defaultValue,i=void 0===o?null:o,l=e.inputValue,s=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,f=e.value,m=Na(e,$o),h=Ma((0,Qt.useState)(void 0!==l?l:n),2),_=h[0],v=h[1],g=Ma((0,Qt.useState)(void 0!==s?s:a),2),b=g[0],y=g[1],w=Ma((0,Qt.useState)(void 0!==f?f:i),2),x=w[0],E=w[1],C=(0,Qt.useCallback)((function(e,t){"function"==typeof c&&c(e,t),E(e)}),[c]),S=(0,Qt.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),v(void 0!==n?n:e)}),[u]),O=(0,Qt.useCallback)((function(){"function"==typeof p&&p(),y(!0)}),[p]),j=(0,Qt.useCallback)((function(){"function"==typeof d&&d(),y(!1)}),[d]),T=void 0!==l?l:_,k=void 0!==s?s:b,N=void 0!==f?f:x;return $a($a({},m),{},{inputValue:T,menuIsOpen:k,onChange:C,onInputChange:S,onMenuClose:j,onMenuOpen:O,value:N})}(e);return Qt.createElement(Pi,Z({ref:t},n))})),Ri=Ai,Li=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const Vi={control:e=>({...e,height:30,minHeight:30}),dropdownIndicator:e=>({...e,padding:"0 4px 0 0"}),clearIndicator:e=>({...e,paddingTop:0,paddingBottom:0}),input:e=>({...e,paddingTop:0,paddingBottom:0}),singleValue:e=>({...e,marginLeft:0,marginRight:0}),menuPortal:e=>({...e,zIndex:300}),menu:e=>({...e,borderRadius:2,boxShadow:"none",border:"1px solid #ddd",marginTop:5,marginBottom:5,zIndex:300}),menuList:e=>({...e,padding:0,borderRadius:2}),option:(e,t)=>{let{isFocused:n}=t;return{...e,padding:"1px 8px",lineHeight:"28px",backgroundColor:n?"#ddd":"transparent",color:"unset"}},group:e=>({...e,paddingBottom:0}),groupHeading:e=>({...e,padding:"0 8px"})},Hi=()=>null,Bi=()=>(0,e.createElement)(d.Icon,{icon:qn,size:18}),Ui=t=>(0,e.createElement)(Uo.DropdownIndicator,t,(0,e.createElement)(Bi,null)),$i=t=>{const{data:n,isSelected:r}=t,{label:a,isPro:o}=n;return(0,e.createElement)(Uo.Option,t,(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__option_label"},a,o&&(0,e.createElement)("span",{className:"__pro_tag"})),r&&(0,e.createElement)(d.Icon,{icon:Li,className:"__icon"})))},zi=t=>{let{value:n}=t;return(0,e.createElement)("span",{className:"__info"},"[",(0,u.sprintf)((0,u.__)("ID: %s","wc-ajax-product-filter"),n),"]")},Wi=t=>{const{data:n}=t,{label:r,isPro:a}=n;return(0,e.createElement)(Uo.SingleValue,t,r,a&&(0,e.createElement)("span",{className:"__pro_tag"}))},qi=t=>t.data.proGroup?(0,e.createElement)(Uo.Group,Z({},t,{className:"__pro_group"})):t.data.components?(0,e.createElement)(Uo.Group,Z({},t,{className:"__form_components"})):(0,e.createElement)(Uo.Group,t),Gi=t=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"__name"},t.label),(0,e.createElement)(zi,{value:t.value})),Yi=t=>t.proGroup?(0,e.createElement)("span",{className:"__pro_heading_wrapper"},(0,e.createElement)("span",{className:"__pro_heading"},(0,u.__)("Pro","wc-ajax-product-filter"))):t.components?(0,e.createElement)("span",{className:"__form_components_divider"},(0,e.createElement)("span",{className:"__form_components_heading"},(0,u.__)("Components","wc-ajax-product-filter"))):(0,e.createElement)("span",null,t.label),Xi=t=>{let{inputId:n,placeholder:r,options:a,value:o,onChange:i,classes:l,isSearchable:s,portalTarget:c,maxMenuHeight:d,isDisabled:p}=t;return(0,e.createElement)(Ri,{inputId:n,components:{IndicatorSeparator:Hi,DropdownIndicator:Ui,Option:$i,SingleValue:Wi,Group:qi},formatGroupLabel:Yi,isSearchable:s,placeholder:r,noOptionsMessage:()=>(0,u.__)("No option found","wc-ajax-product-filter"),options:a,value:o,onChange:i,styles:Vi,className:l,isDisabled:p,menuPortalTarget:c,maxMenuHeight:d,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})})};var Ki=t=>{let n,{id:r,index:a="",label:o,description:i,placeholder:l,options:s,value:c,onChange:u,isSearchable:d=!1,renderAsFormField:p=!1,inputKey:f,portalTarget:m=!1,maxMenuHeight:h,isPro:_=!1,isDisabled:v=!1,tooltip:g}=t,b="__custom_react_select __single_select";r&&(b+=` ${r}`);const y=x(r,a);return n=p?(0,e.createElement)("div",{className:"__form_control react_select_simple"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:y},o,E(_))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Xi,{key:f,inputId:y,placeholder:l,options:s,value:c,classes:b,isSearchable:d,isDisabled:v,portalTarget:m,maxMenuHeight:h,onChange:e=>u(e,r,a)}),g&&(0,e.createElement)(hn,{content:g})))),i&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:i}})):(0,e.createElement)(Xi,{key:f,inputId:y,placeholder:l,options:s,value:c,classes:b,isDisabled:v,portalTarget:m,maxMenuHeight:h,onChange:e=>u(e),isSearchable:d}),n},Zi=t=>{let{id:n,index:r="",label:a,isChecked:o,onChange:i,description:l,tooltip:s,isPro:c,isDisabled:u}=t;const p=x(n,r);return(0,e.createElement)("div",{className:"__form_control __checkbox_toggle"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:p},a,E(c),s&&(0,e.createElement)(hn,{content:s}))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(d.CheckboxControl,{checked:o,id:p,onChange:e=>i(e,n,r),disabled:u})))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}}))},Ji=t=>{let{label:n,id:r,index:a="",value:o,onChange:i,description:l,isPro:s,...c}=t;return(0,e.createElement)("div",{className:"__form_control number"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:x(r,a)},n,E(s))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(bn,Z({id:r,index:a,value:o,onChange:i,renderAsFormField:!1,type:"number"},c))))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}}))},Qi=t=>{let{label:n,id:r,index:a="",value:o,options:i,isVertical:l,onChange:s,description:c,tooltip:u,isPro:d}=t;return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,E(d),u&&(0,e.createElement)(hn,{content:u}))),(0,e.createElement)("div",{className:Kn()("__wrapper","radio-group",r,{"radio-group-vertical":l})},(0,e.createElement)("div",{className:"__input_wrapper"},i.map(((t,n)=>{const i=x(r,a,n);return(0,e.createElement)("div",{key:i,className:"components-radio-control__option"},(0,e.createElement)("input",{id:i,className:"components-radio-control__input",type:"radio",value:t.value,onChange:e=>s(e,r,a),checked:t.value===o}),(0,e.createElement)("label",{htmlFor:i},t.label,E(t.isPro)))}))))),c&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:c}}))};const el=["reset-button","results-count","apply-mode","submit-mode"];var tl=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleFilterTypeChange:o,handleFilterKeyChange:l,handleMetaKeyChange:s,handleTextFieldChange:p,handleRadioChange:f,handleCheckboxChange:m}=Zn(r,a),{filterKeys:h,formFilters:_}=r,v=_[n],{id:g,title:b,type_error:y,type:w,meta_key_error:x,meta_key:E,component:C,value_type:S,value_decimal:O,value_decimal_places:j,date_input_format:T,field_key:k,field_key_error:N,field_key_error_:D,show_title:I,active_filters_layout:M,empty_filter_message:F,show_if_empty:P}=v;let A,R,L,V,H;if(g&&(A=(0,u.__)("Filter type can not be changed once it is saved. But you can permanently delete the filter and add a new one.","wc-ajax-product-filter"),R=(0,u.__)('Once a filter key is set, you can not change it from the filter. But you can change the filter keys globally from "Settings > Filter Keys" tab.',"wc-ajax-product-filter")),g)L=wcapf_admin_params.filter_types,V=wcapf_admin_params.meta_keys;else{const e=[..._];e.splice(n,1),L=function(e){const t=wcapf_admin_params.filter_types,n=(0,c.find)(t,{value:"taxonomy"}).options.map((t=>{const{value:n}=t;return(0,c.find)(e,{taxonomy:n})?{...t,isDisabled:!0}:t}));return t.map((t=>{const{value:r}=t;return"taxonomy"===r?{...t,options:n}:"post-meta"===r?t:(0,c.find)(e,{type:r})?{...t,isDisabled:!0}:t}))}(e),V=function(e){return wcapf_admin_params.meta_keys.map((t=>(0,c.find)(e,{meta_key:t.value})?{...t,isDisabled:!0}:t))}(e),H=On(h,v),H&&(R=(0,u.__)('This key is already assigned for this entity and can not be changed from here. But you can change the filter keys globally from "Settings > Filter Keys" tab.',"wc-ajax-product-filter"))}const B=xn(v),U=En(v,B),$=Cn(v,B),z=V.find((e=>e.value===E));let W;!H&&N?W=N:D&&(W=D);const q=!("component"===w&&el.includes(C));return(0,e.createElement)(e.Fragment,null,q&&(0,e.createElement)(bn,{id:"title",index:n,label:(0,u.__)("Filter Title","wc-ajax-product-filter"),description:(0,u.__)("Give a title to the filter that will appear before the filter options.","wc-ajax-product-filter"),value:b,placeholder:U,onChange:p}),y&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},y),(0,e.createElement)(Ki,{id:"type",index:n,label:(0,u.__)("Filter Type","wc-ajax-product-filter"),description:(0,u.__)("Determines the entity by which the products will be filtered.","wc-ajax-product-filter"),options:L,value:B,onChange:o,isDisabled:g,renderAsFormField:!0,tooltip:A}),"post-meta"===w&&(0,e.createElement)(e.Fragment,null,x&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},x),(0,e.createElement)(Ki,{id:"meta_key",index:n,label:(0,u.__)("Meta Key","wc-ajax-product-filter"),description:(0,u.__)("Select the meta key that values will be available as filter options.","wc-ajax-product-filter"),options:V,value:z,onChange:s,isSearchable:!0,isDisabled:g,renderAsFormField:!0}),(0,e.createElement)(Qi,{id:"value_type",index:n,label:(0,u.__)("Value Type","wc-ajax-product-filter"),description:(0,u.__)("Determines the meta value type.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Text","wc-ajax-product-filter"),value:"text"},{label:(0,u.__)("Number","wc-ajax-product-filter"),value:"number",isPro:!0},{label:(0,u.__)("Date","wc-ajax-product-filter"),value:"date",isPro:!0}],onChange:f,value:S,isDisabled:g})),"post-meta"===w&&"number"===S&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"value_decimal",index:n,label:(0,u.__)("Value is decimal","wc-ajax-product-filter"),description:(0,u.__)("Enable this if the meta values have decimal places. It'll filter the products more accurately.","wc-ajax-product-filter"),isChecked:O,onChange:m}),"1"===O&&(0,e.createElement)(Ji,{id:"value_decimal_places",index:n,label:(0,u.__)("Decimal Places","wc-ajax-product-filter"),description:(0,u.__)("Determines the number of decimal places in meta values.","wc-ajax-product-filter"),value:j,onChange:p,min:0})),"post-meta"===w&&"date"===S&&(0,e.createElement)(Qi,{id:"date_input_format",index:n,label:(0,u.__)("Date Format","wc-ajax-product-filter"),description:(0,u.__)("Determines the format of the date saved in the database.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Timestamp","wc-ajax-product-filter"),value:"timestamp"},{label:(0,u.__)("YYYYMMDD","wc-ajax-product-filter"),value:"yyyymmdd"}],value:T,onChange:f}),"component"!==w&&(0,e.createElement)(e.Fragment,null,W&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},W),(0,e.createElement)(bn,{id:"field_key",index:n,label:(0,u.__)("Filter Key","wc-ajax-product-filter"),description:(0,u.__)('The unique key that will be used in the URL. Only a-z, 0-9, "_" and "-" symbols are supported.',"wc-ajax-product-filter"),value:H||k,placeholder:$,onChange:l,isDisabled:g||H,tooltip:R,isFilterKey:!0})),"active-filters"===C&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"show_title",index:n,label:(0,u.__)("Show title","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the title before the active filters.","wc-ajax-product-filter"),isChecked:I,onChange:m}),(0,e.createElement)(Qi,{id:"active_filters_layout",index:n,label:(0,u.__)("Layout","wc-ajax-product-filter"),description:(0,u.__)("Simple: Show all the active items one by one, Extended: Group the active items by filter type and show them separately with filter title.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Simple","wc-ajax-product-filter"),value:"simple"},{label:(0,u.__)("Extended","wc-ajax-product-filter"),value:"extended"}],value:M,onChange:f}),(0,e.createElement)(bn,{id:"empty_filter_message",index:n,label:(0,u.__)("No filter applied message","wc-ajax-product-filter"),description:(0,u.__)("Show a message when no filter is applied. Leave it empty to not show the active filters when no filter is applied.","wc-ajax-product-filter"),value:F,onChange:p}),(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("p",null,"A shortcode ",(0,e.createElement)("code",null,"[wcapf_active_filters]")," is available to show the active filters outside the form."))),"reset-button"===C&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"show_if_empty",index:n,label:(0,u.__)("Always show","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the reset button as disabled when no filter is applied.","wc-ajax-product-filter"),isChecked:P,onChange:m}),(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("p",null,"A shortcode ",(0,e.createElement)("code",null,"[wcapf_reset_button]")," is available to show the reset button outside the form."))),"results-count"===C&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"show_if_empty",index:n,label:(0,u.__)("Show conditionally","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the results count only when a filter is applied.","wc-ajax-product-filter"),isChecked:P,onChange:m}),(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("p",null,"A shortcode ",(0,e.createElement)("code",null,"[wcapf_results_count]")," is available to show the results count outside the form."))))},nl=t=>{let{label:n,id:r,index:a="",value:o,options:i,onChange:l,description:s,isPro:c,isDisabled:u=!1}=t;return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,E(c))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(d.ButtonGroup,null,i.map((t=>{const n=x(r,a,t.value);return(0,e.createElement)(d.Button,{value:t.value,key:n,onClick:()=>l(t.value,r,a),variant:o===t.value?"primary":"",disabled:u},t.label,E(t.isPro))})))))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))},rl=(t,n)=>{const{state:r,dispatch:a}=i(),{handleSelectChange:o,handleRadioChange:l,handleCheckboxChange:s,handleTextFieldChange:c,handleToggleGroupChange:d}=Zn(r,a),{formFilters:p}=r,f=p[n],{type:m,display_type:h,native_display_type_layout:_,custom_display_type_layout:v,grid_columns:g,enable_multiple_filter:b,enable_tooltip:y,tooltip_position:w,show_count_in_tooltip:x,number_display_type:E,number_range_enable_multiple_filter:C,date_display_type:S,time_period_enable_multiple_filter:O}=f,j=Pn(f);return{layoutFields:t=>{let r,a,i=[];if(["checkbox","radio","range_checkbox","range_radio","time_period_checkbox","time_period_radio"].includes(t)?(r=_,a="native_display_type_layout",i=[{label:(0,u.__)("List","wc-ajax-product-filter"),value:"list"},{label:(0,u.__)("Inline","wc-ajax-product-filter"),value:"inline"},{label:(0,u.__)("Grid","wc-ajax-product-filter"),value:"grid",isPro:!0}]):["label","range_label","time_period_label"].includes(t)&&(r=v,a="custom_display_type_layout",i=[{label:(0,u.__)("Inline","wc-ajax-product-filter"),value:"inline"},{label:(0,u.__)("Grid","wc-ajax-product-filter"),value:"grid",isPro:!0}]),!r)return;const l=i.find((e=>r===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ki,{id:a,index:n,label:(0,u.__)("Layout","wc-ajax-product-filter"),description:(0,u.__)("Determines the arrangement of the filter options in the front end.","wc-ajax-product-filter"),options:i,value:l,onChange:o,renderAsFormField:!0}),"grid"===r&&(0,e.createElement)(Ji,{id:"grid_columns",index:n,label:(0,u.__)("Columns","wc-ajax-product-filter"),description:(0,u.__)("Specifies the number of columns to be displayed in the grid layout.","wc-ajax-product-filter"),value:g,onChange:c,min:1,max:12}))},enableMultipleFilterField:r=>{let a=!1;if("text"===t?a="label"===h||"color"===h||"image"===h:"number"===t?a="range_label"===E:"date"===t&&(a="time_period_label"===S),a)return(0,e.createElement)(Zi,{id:r,index:n,label:(0,u.__)("Multiple Selection","wc-ajax-product-filter"),description:(0,u.__)("Controls whether users can select multiple options when filtering products.","wc-ajax-product-filter"),isChecked:f[r],onChange:s})},queryTypeField:r=>{let a=!1;if("text"===t?"checkbox"===h||"multi-select"===h?a=!0:"label"!==h&&"color"!==h&&"image"!==h||"1"!==b||(a=!0):"number"===t?("range_checkbox"===E||"range_multiselect"===E||"range_label"===E&&"1"===C)&&(a=!0):"date"===t&&("time_period_checkbox"===S||"time_period_multiselect"===S||"time_period_label"===S&&"1"===O)&&(a=!0),a)return(0,e.createElement)(Qi,{id:r,index:n,label:(0,u.__)("Query Type","wc-ajax-product-filter"),description:(0,u.__)('Choose "OR" to display products matching any selected option or "AND" to show products matching all selected options.',"wc-ajax-product-filter"),options:[{label:(0,u.__)("OR","wc-ajax-product-filter"),value:"or"},{label:(0,u.__)("AND","wc-ajax-product-filter"),value:"and"}],onChange:l,value:f[r]})},allItemsLabelField:r=>{let a=!1;if("text"===t?a=["radio","select","multi-select"].includes(h):"number"===t?a=["range_radio","range_select","range_multiselect"].includes(E):"date"===t&&(a=["time_period_radio","time_period_select","time_period_multiselect"].includes(S)),a)return(0,e.createElement)(bn,{id:r,index:n,label:(0,u.__)("All Items Label","wc-ajax-product-filter"),description:(0,u.__)("Change the default option label. Leave blank to use the default label.","wc-ajax-product-filter"),value:f[r],onChange:c})},showCountField:r=>{if((()=>{let e=!1;return"text"===t?e=!["sort-by","per-page"].includes(m):"number"===t?["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(E)&&(e=!0):"date"===t&&["time_period_checkbox","time_period_radio","time_period_select","time_period_multiselect","time_period_label"].includes(S)&&(e=!0),e})())return(0,e.createElement)(Zi,{id:r,index:n,label:(0,u.__)("Show count","wc-ajax-product-filter"),description:(0,u.__)("Determines whether the product count is shown alongside the filter options.","wc-ajax-product-filter"),isChecked:f[r],onChange:s})},enableTooltipField:()=>{if(j)return(0,e.createElement)(Zi,{id:"enable_tooltip",index:n,label:(0,u.__)("Enable tooltip","wc-ajax-product-filter"),description:(0,u.__)("Display additional information in a tooltip when users hover over the option.","wc-ajax-product-filter"),isChecked:y,onChange:s})},tooltipPositionField:()=>{if(j&&"1"===y)return(0,e.createElement)(nl,{id:"tooltip_position",index:n,label:(0,u.__)("Tooltip position","wc-ajax-product-filter"),description:(0,u.__)("Determines on which side the tooltip will be placed.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Top","wc-ajax-product-filter"),value:"top"},{label:(0,u.__)("Right","wc-ajax-product-filter"),value:"right"},{label:(0,u.__)("Bottom","wc-ajax-product-filter"),value:"bottom"},{label:(0,u.__)("Left","wc-ajax-product-filter"),value:"left"}],onChange:d,value:w})},showCountInTooltipField:()=>{if(j&&"1"===y)return(0,e.createElement)(Zi,{id:"show_count_in_tooltip",index:n,label:(0,u.__)("Count in tooltip","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the product count in the tooltip.","wc-ajax-product-filter"),isChecked:x,onChange:s})}}},al=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleCheckboxChange:o,handleSelectChange:l,handleShowHierarchyChange:s,handleRadioChange:d}=Zn(r,a),{layoutFields:p,enableMultipleFilterField:f,queryTypeField:m,allItemsLabelField:h,showCountField:_,enableTooltipField:v,tooltipPositionField:g,showCountInTooltipField:b}=rl("text",n),{formFilters:y}=r,w=y[n],{type:x,taxHierarchical:E,display_type:C,native_display_type_layout:O,hierarchical:j,enable_hierarchy_accordion:T,value_type:k,enable_swatch:N,swatch_type:D,swatch_with_label:I}=w;return(0,e.createElement)(e.Fragment,null,(()=>{let t,r=[];return r="taxonomy"===x?function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return S(Dn,[],e)}(!0,E):"post-meta"===x&&"text"===k?In():"sort-by"===x||"per-page"===x?[{label:(0,u.__)("Radio","wc-ajax-product-filter"),value:"radio"},{label:(0,u.__)("Select","wc-ajax-product-filter"),value:"select"}]:In(),t=r.find((e=>C===e.value)),["checkbox","radio","select","multi-select","label"].includes(C)||(t=(0,c.find)(r,{proGroup:!0}).options.find((e=>e.value===C))),(0,e.createElement)(Ki,{id:"display_type",index:n,label:(0,u.__)("Display","wc-ajax-product-filter"),description:(0,u.__)("Determines how the filter options are presented in the front end.","wc-ajax-product-filter"),options:r,value:t,onChange:l,renderAsFormField:!0})})(),p(C),f("enable_multiple_filter"),m("query_type"),h("all_items_label"),(()=>{if("1"===E&&["checkbox","radio","select","multi-select"].includes(C)&&"list"===O)return(0,e.createElement)(Zi,{id:"hierarchical",index:n,label:(0,u.__)("Show hierarchy","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the filter options as hierarchical.","wc-ajax-product-filter"),isChecked:j,onChange:s})})(),(()=>{if("1"===E&&"1"===j&&["checkbox","radio","select","multi-select"].includes(C)&&"list"===O&&!["select","multi-select"].includes(C))return(0,e.createElement)(Zi,{id:"enable_hierarchy_accordion",index:n,label:(0,u.__)("Enable hierarchy accordion","wc-ajax-product-filter"),description:(0,u.__)("Whether to enable accordion for the hierarchy filter options.","wc-ajax-product-filter"),isChecked:T,onChange:o})})(),_("show_count"),v(),g(),b(),(()=>{if(An(w))return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"enable_swatch",index:n,label:(0,u.__)("Enable swatches","wc-ajax-product-filter"),description:(0,u.__)("Should the filter options be displayed using color/image swatches?","wc-ajax-product-filter"),isChecked:N,onChange:o,isPro:!0}),"1"===N&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qi,{id:"swatch_type",index:n,label:(0,u.__)("Swatch type","wc-ajax-product-filter"),description:(0,u.__)("Select the swatch type, color, or image.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Color","wc-ajax-product-filter"),value:"color"},{label:(0,u.__)("Image","wc-ajax-product-filter"),value:"image"}],onChange:d,value:D}),(0,e.createElement)(Zi,{id:"swatch_with_label",index:n,label:(0,u.__)("Swatch with label","wc-ajax-product-filter"),description:(0,u.__)("Enable this to display the label beside the swatch.","wc-ajax-product-filter"),isChecked:I,onChange:o})))})())},ol=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleRadioChange:o,handleToggleGroupChange:l,handleSelectChange:s,handleCheckboxChange:d}=Zn(r,a),{formFilters:p}=r,f=p[n],{layoutFields:m,enableMultipleFilterField:h,queryTypeField:_,allItemsLabelField:v,showCountField:g,enableTooltipField:b,showCountInTooltipField:y,tooltipPositionField:w}=rl("number",n),{number_display_type:x,number_range_slider_display_values_as:E,alignment:C,input_type_number:S}=f;return(0,e.createElement)(e.Fragment,null,(()=>{const t=Mn(!0);let r;return r=t.find((e=>e.value===x)),["range_slider","range_number"].includes(x)||(r=(0,c.find)(t,{proGroup:!0}).options.find((e=>e.value===x))),(0,e.createElement)(Ki,{id:"number_display_type",index:n,label:(0,u.__)("Display Type","wc-ajax-product-filter"),description:(0,u.__)("Determines how the filter will be shown in the front end.","wc-ajax-product-filter"),options:t,value:r,onChange:s,renderAsFormField:!0})})(),(()=>{if("range_slider"===x)return(0,e.createElement)(Qi,{id:"number_range_slider_display_values_as",index:n,label:(0,u.__)("Display slider values as","wc-ajax-product-filter"),description:(0,u.__)("Determines how the slider values will be shown in the front end.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Input Field","wc-ajax-product-filter"),value:"input_field"},{label:(0,u.__)("Plain Text","wc-ajax-product-filter"),value:"plain_text"}],onChange:o,value:E})})(),m(x),(()=>{if("range_slider"===x&&"plain_text"===E)return(0,e.createElement)(nl,{id:"alignment",index:n,label:(0,u.__)("Alignment","wc-ajax-product-filter"),description:(0,u.__)("Whether to align the text in the center or justified by distributing space between them.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Default","wc-ajax-product-filter"),value:"default"},{label:(0,u.__)("Centered","wc-ajax-product-filter"),value:"centered"},{label:(0,u.__)("Justified","wc-ajax-product-filter"),value:"justified"}],value:C,onChange:l})})(),(()=>{if("range_slider"===x&&"input_field"===E||"range_number"===x)return(0,e.createElement)(Zi,{id:"input_type_number",index:n,label:(0,u.__)("Input type number","wc-ajax-product-filter"),description:(0,u.__)("Enable this to hide units and display them as spinbox with up and down arrows.","wc-ajax-product-filter"),isChecked:S,onChange:d})})(),h("number_range_enable_multiple_filter"),_("number_range_query_type"),v("number_range_select_all_items_label"),g("number_range_show_count"),b(),w(),y())};const il=wcapf_admin_params.date_formats;var ll=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleRadioChange:o,handleCheckboxChange:l,handleSelectChange:s}=Zn(r,a),{formFilters:d}=r,p=d[n],{layoutFields:f,enableMultipleFilterField:m,queryTypeField:h,allItemsLabelField:_,showCountField:v,enableTooltipField:g,tooltipPositionField:b,showCountInTooltipField:y}=rl("date",n),{date_display_type:w,date_format:x,show_date_inputs_inline:E,date_picker_month_dropdown:C,date_picker_year_dropdown:S}=p;return(0,e.createElement)(e.Fragment,null,(()=>{const t=Fn(!0);let r;return r=t.find((e=>e.value===w)),["input_date","input_date_range"].includes(w)||(r=(0,c.find)(t,{proGroup:!0}).options.find((e=>e.value===w))),(0,e.createElement)(Ki,{id:"date_display_type",index:n,label:(0,u.__)("Display Type","wc-ajax-product-filter"),description:(0,u.__)("Determines how the filter will be shown in the front end.","wc-ajax-product-filter"),options:t,value:r,onChange:s,renderAsFormField:!0})})(),(()=>{if("input_date"===w||"input_date_range"===w)return(0,e.createElement)(Qi,{id:"date_format",index:n,label:(0,u.__)("Date Display Format","wc-ajax-product-filter"),description:(0,u.__)("Determines how the date will be displayed in the front end.","wc-ajax-product-filter"),options:il,onChange:o,value:x,isVertical:!0})})(),(()=>{if("input_date_range"===w)return(0,e.createElement)(Zi,{id:"show_date_inputs_inline",index:n,label:(0,u.__)("Inline Date Inputs","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the date input fields in a single line.","wc-ajax-product-filter"),isChecked:E,onChange:l})})(),(()=>{if("input_date"===w||"input_date_range"===w)return(0,e.createElement)(Zi,{id:"date_picker_month_dropdown",index:n,label:(0,u.__)("Use dropdown for Month","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the month dropdown in the date picker.","wc-ajax-product-filter"),isChecked:C,onChange:l})})(),(()=>{if("input_date"===w||"input_date_range"===w)return(0,e.createElement)(Zi,{id:"date_picker_year_dropdown",index:n,label:(0,u.__)("Use dropdown for Year","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the year dropdown in the date picker.","wc-ajax-product-filter"),isChecked:S,onChange:l})})(),f(w),m("time_period_enable_multiple_filter"),h("time_period_query_type"),_("time_period_select_all_items_label"),v("time_period_show_count"),g(),b(),y())},sl=t=>{let{index:n}=t;const{state:r}=i(),{formFilters:a}=r,o=a[n],{type:l,value_type:s}=o;return(()=>{let t;return"taxonomy"===l&&"number"===s||"price"===l?t=(0,e.createElement)(ol,{index:n}):"post-meta"===l?"text"===s?t=(0,e.createElement)(al,{index:n}):"number"===s?t=(0,e.createElement)(ol,{index:n}):"date"===s&&(t=(0,e.createElement)(ll,{index:n})):t=(0,e.createElement)(al,{index:n}),t})()},cl=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),ul=(0,e.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Un.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}));const dl=t=>{let n,{value:r,onChange:a,disableAlpha:o,slotName:i}=t;return n=6.2<=w()?{popoverProps:{noArrow:!1,__unstableSlotName:i,position:"bottom right"}}:{popoverProps:{noArrow:!1,__unstableSlotName:i},position:"bottom right"},(0,e.createElement)(d.Dropdown,Z({},n,{renderToggle:t=>{let{isOpen:n,onToggle:a}=t;return(0,e.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},(0,e.createElement)(d.Button,{onClick:a,"aria-expanded":n,className:"components-circular-option-picker__option",style:{backgroundColor:r||"#fff",color:r||"#fff"}}))},renderContent:()=>(0,e.createElement)(d.ColorPicker,{color:r,onChange:e=>a(e),defaultValue:"#fff",enableAlpha:!o})}))};var pl=t=>{let{label:n,value:r,onChange:a,description:o,isPro:i,disableAlpha:l=!0,renderAsFormField:s=!1,slotName:c}=t;return s?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,E(i))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(dl,{value:r,onChange:a,disableAlpha:l,slotName:c})))),o&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:o}})):(0,e.createElement)(dl,{value:r,onChange:a,slotName:c})};const fl=wcapf_admin_params.status_options,ml=wcapf_admin_params.time_periods,hl=wcapf_admin_params.sort_by_options,_l=wcapf_admin_params.meta_keys,vl=wcapf_admin_params.meta_types,gl=Nn(),bl="popover-slot-for-options-table";var yl=t=>{let{index:n,openModal:r}=t;const{state:a,dispatch:o}=i(),{setDirty:l}=L(a,o),{handleManualOptionsChange:s}=Zn(a,o),{formFilters:p}=a,f=p[n],{type:m}=f,{swatch_type:_,enable_tooltip:v}=f,{type:g,optionsKey:b}=function(e,t){let n,r;if("price"===e||"rating"===e)n="number-options",r="number_manual_options";else if("product-status"===e)n="product-status-options",r="product_status_options";else if("post-meta"===e){const{value_type:e}=t;"text"===e?(n="text-options",r="manual_options"):"number"===e?(n="number-options",r="number_manual_options"):"date"===e&&(n="time-period-options",r="time_period_options")}else"sort-by"===e?(n="sort-by-options",r="sort_by_options"):"per-page"===e?(n="per-page-options",r="per_page_options"):"post-author"===e?(n="post-author-options",r="manual_options"):"taxonomy"===e&&(n="taxonomy-options",r="manual_options");return{type:n,optionsKey:r}}(m,f),y=f[b],w=Pn(f)&&"1"===v,x=function(e){if(!An(e))return!1;const{enable_swatch:t}=e;return!!t}(f),E=()=>{let e;return"product-status-options"===g?e={value:fl[0].value,label:""}:"text-options"===g?e={value:"",label:""}:"number-options"===g?e="rating"===m?{min_value:"",max_value:"",label:"",secondary_label:""}:{min_value:"",max_value:"",label:""}:"time-period-options"===g?e={value:ml[0].value,label:""}:"sort-by-options"===g?e={value:hl[0].value,direction:gl[1].value,label:""}:"per-page-options"===g&&(e={value:"",label:""}),e},C=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];s(e,b,n,t)},S=(e,t,n)=>{t&&n.dragging&&C(e,!1)},O=()=>{const e=[...y,E()];C(e)},j=(e,t,n)=>{if(y[t][n]===e)return;const r=y.map(((r,a)=>a===t?{...r,[n]:e}:r));C(r)},T=(e,t,n)=>{j(e,n,t)},k=(e,t)=>{const n=y.map(((n,r)=>r===e?{...n,swatch:t}:n));C(n)},N=(t,n,r,a)=>(0,e.createElement)("div",{className:t},(0,e.createElement)(bn,{id:r,index:n,value:a,onChange:T,renderAsFormField:!1})),D=(t,n,r,a,o)=>(0,e.createElement)("div",{className:t},(0,e.createElement)(Ki,{options:a,value:o,onChange:e=>((e,t,n)=>{j(e.value,t,n)})(e,n,r),portalTarget:document.querySelector("body")})),I=(t,n)=>{const{tooltip:r,swatch:a,color:o,secondary_color_enabled:i,secondary_color:l,image_id:s,image_url:c}=t,p=a||_;return(0,e.createElement)(e.Fragment,null,w&&(0,e.createElement)("td",null,N("__tooltip",n,"tooltip",r)),x&&(0,e.createElement)("td",null,(0,e.createElement)("div",{className:"__swatch_wrapper"},(0,e.createElement)("div",{className:"__primary_settings"},"color"===p?(0,e.createElement)("div",{className:"__swatch_switches"},(0,u.__)("Color","wc-ajax-product-filter")," ","/"," ",(0,e.createElement)(d.Button,{variant:"link",onClick:()=>k(n,"image")},(0,u.__)("Image","wc-ajax-product-filter"))):"image"===p?(0,e.createElement)("div",{className:"__swatch_switches"},(0,e.createElement)(d.Button,{variant:"link",onClick:()=>k(n,"color")},(0,u.__)("Color","wc-ajax-product-filter"))," ","/"," ",(0,u.__)("Image","wc-ajax-product-filter")):void 0,"color"===p&&(0,e.createElement)("div",{className:"__color"},(0,e.createElement)(pl,{slotName:bl,value:o,onChange:e=>j(e,n,"color")}),o&&("1"===i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(pl,{slotName:bl,value:l,onChange:e=>j(e,n,"secondary_color")}),(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>(e=>{const t=y.map(((t,n)=>n===e?{...t,secondary_color_enabled:"",secondary_color:""}:t));C(t)})(n)},(0,e.createElement)(d.Icon,{icon:cl}))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>j("",n,"color")},(0,e.createElement)(d.Icon,{icon:cl})),(0,e.createElement)(d.Button,{isSmall:!0,icon:$n,onClick:()=>j("1",n,"secondary_color_enabled")})))),"image"===p&&(0,e.createElement)("div",{className:"__image"},s?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("img",{className:"__img_preview",src:c}),(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>(e=>{const t=y.map(((t,n)=>n===e?{...t,image_id:"",image_url:""}:t));C(t)})(n)},(0,e.createElement)(d.Icon,{icon:cl}))):(0,e.createElement)(d.Button,{icon:h,onClick:()=>(e=>{const t=wp.media({library:{type:"image"},multiple:!1}).on("select",(function(){const n=t.state().get("selection").first().toJSON(),{id:r,url:a}=n;((e,t,n)=>{const r=y.map(((r,a)=>a===n?{...r,image_id:e,image_url:t}:r));C(r)})(r,a,e)}));t.open()})(n)}))),(0,e.createElement)("div",{className:"__more_settings"}))))};let M=(0,u.__)("Add the options that will be available to the filter.","wc-ajax-product-filter");return"rating"===m?M=(0,u.sprintf)((0,u.__)("Add the options that will be available to the filter. To show stars in the label, put <code>[star]</code> for filled star, <code>[star-empty]</code> for empty star and <code>[star-half]</code> for half star.","wc-ajax-product-filter")):["taxonomy","product-status","post-meta"].includes(m)&&(M=(0,u.sprintf)((0,u.__)("Add the options that will be available to the filter. <b>Note:</b> Leave the label and tooltip fields empty if you do not want to override.","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__options_table"},(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,(0,u.__)("Filter Options","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"}))),(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:M}})),!(0,c.isEmpty)(y)&&(()=>{const t=Kn()("__responsive_table",g,{"tooltip-enabled":w},{"swatch-enabled":x});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:t},(0,e.createElement)("table",{className:"wp-list-table widefat fixed striped"},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"__drag_handle"}),(()=>{if("product-status-options"===g)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__product_status"},(0,u.__)("Status","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter")));if("text-options"===g)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__value"},(0,u.__)("Value","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter")));if("number-options"===g){let t="__label";return"rating"===m&&(t="__rating_label"),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__min_value"},(0,u.__)("Min Value","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__max_value"},(0,u.__)("Max Value","wc-ajax-product-filter")),(0,e.createElement)("th",{className:t},(0,u.__)("Label","wc-ajax-product-filter")),"rating"===m&&(0,e.createElement)("th",{className:"__secondary_label"},(0,u.__)("Secondary Label","wc-ajax-product-filter")))}return"time-period-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__time_period"},(0,u.__)("Period","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"sort-by-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__sort_by"},(0,u.__)("Sort by","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__direction"},(0,u.__)("Direction","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"per-page-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__per_page"},(0,u.__)("Per page","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"taxonomy-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__term"},(0,u.__)("Term","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"post-author-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__author"},(0,u.__)("Author","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):void 0})(),(0,e.createElement)(e.Fragment,null,w&&(0,e.createElement)("th",{className:"__tooltip"},(0,u.__)("Tooltip","wc-ajax-product-filter")),x&&(0,e.createElement)("th",{className:"__color_image"},(0,u.__)("Color / Image Swatch","wc-ajax-product-filter"))),(0,e.createElement)("th",{className:"__action"}))),(0,e.createElement)(zn.ReactSortable,{list:y,setList:S,tag:"tbody",direction:"vertical",handle:".__drag_handler",onSort:l},y.map(((t,n)=>(0,e.createElement)("tr",{key:`filter-option-${n}`},(0,e.createElement)("td",null,(0,e.createElement)("div",{className:"__drag_handler_wrapper"},(0,e.createElement)(d.Icon,{icon:Yn,className:"__drag_handler"}))),((t,n)=>{if("product-status-options"===g){const{value:r,label:a}=t,o=fl,i=o.find((e=>r===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,D("__product_status",n,"value",o,i)),(0,e.createElement)("td",null,N("__label",n,"label",a)))}if("text-options"===g){const{value:r,label:a}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,N("__value",n,"value",r)),(0,e.createElement)("td",null,N("__label",n,"label",a)))}if("number-options"===g){const{min_value:r,max_value:a,label:o,secondary_label:i}=t;let l="__label";return"rating"===m&&(l="__rating_label"),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,N("__min_value",n,"min_value",r)),(0,e.createElement)("td",null,N("__max_value",n,"max_value",a)),(0,e.createElement)("td",null,N(l,n,"label",o)),"rating"===m&&(0,e.createElement)("td",null,N("secondary_label",n,"secondary_label",i)))}if("time-period-options"===g){const{value:r,label:a}=t,o=ml,i=o.find((e=>r===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,D("__time_period",n,"value",o,i)),(0,e.createElement)("td",null,N("__label",n,"label",a)))}if("sort-by-options"===g){const{value:r,direction:a,label:o,meta_key:i,meta_type:l}=t,s=hl.find((e=>r===e.value)),c=gl.find((e=>a===e.value)),d="rand"===r,p=_l.find((e=>i===e.value)),f=vl.find((e=>l===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,D("__sort_by",n,"value",hl,s),"meta_value"===r&&(0,e.createElement)("div",{className:"__meta_info"},(0,e.createElement)("div",null,(0,u.__)("Meta Key","wc-ajax-product-filter"),D("__meta_key",n,"meta_key",_l,p)),(0,e.createElement)("div",null,(0,u.__)("Meta Type","wc-ajax-product-filter"),D("__meta_type",n,"meta_type",vl,f)))),(0,e.createElement)("td",null,!d&&D("__direction",n,"direction",gl,c)),(0,e.createElement)("td",null,N("__label",n,"label",o)))}if("per-page-options"===g){const{value:r,label:a}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,N("__per_page",n,"value",r)),(0,e.createElement)("td",null,N("__label",n,"label",a)))}if("taxonomy-options"===g){const{name:r,value:a,label:o}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,(0,e.createElement)("span",{className:"__term_name"},r),(0,e.createElement)("span",{className:"__term_id"},(0,u.sprintf)((0,u.__)("ID: %d","wc-ajax-product-filter"),a))),(0,e.createElement)("td",null,N("__label",n,"label",o)))}if("post-author-options"===g){const{name:r,value:a,label:o}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,(0,e.createElement)("span",{className:"__author_name"},r),(0,e.createElement)("span",{className:"__author_id"},(0,u.sprintf)((0,u.__)("ID: %d","wc-ajax-product-filter"),a))),(0,e.createElement)("td",null,N("__label",n,"label",o)))}})(t,n),I(t,n),(0,e.createElement)("td",null,(0,e.createElement)("div",{className:"__remove_row_button_wrapper"},(0,e.createElement)("button",{className:"button-link button-link-delete",onClick:()=>(e=>{const t=[...y];t.splice(e,1),C(t)})(n)},(0,e.createElement)(d.Icon,{icon:ul,size:20})))))))))))})(),(0,e.createElement)("div",{className:"__action_buttons"},(()=>{const t=(0,u.__)("Browse Options","wc-ajax-product-filter");return(0,e.createElement)("div",null,["taxonomy-options","post-author-options"].includes(g)?(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},t):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(d.Button,{variant:"secondary",onClick:O},(0,u.__)("Add Option","wc-ajax-product-filter")),"text-options"===g&&(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},t)))})(),!(0,c.isEmpty)(y)&&(0,e.createElement)(d.Button,{variant:"tertiary",isDestructive:!0,onClick:()=>{C([])}},(0,u.__)("Remove All","wc-ajax-product-filter"))))},wl=t=>{const{state:n,dispatch:r}=i(),{handleGetOptionsChange:a,handleRadioChange:o,handleSelectChange:l}=Zn(n,r),{formFilters:s}=n,d=s[t],{get_options:p}=d;return{getOptionsField:n=>(0,e.createElement)(Qi,{id:n,index:t,label:(0,u.__)("Get Options","wc-ajax-product-filter"),description:(0,u.__)("Determines whether you want the options to be obtained automatically or if you prefer to add them manually."),options:[{label:(0,u.__)("Automatically","wc-ajax-product-filter"),value:"automatically"},{label:(0,u.__)("Manual Entry","wc-ajax-product-filter"),value:"manual_entry",isPro:!0}],value:d[n],onChange:a}),orderByField:n=>{const r="manual_entry"===p;let a,o,i;return"order_terms_by"===n?(a=function(e){const t=[{label:(0,u.__)("Default","wc-ajax-product-filter"),value:"default"},{label:(0,u.__)("ID","wc-ajax-product-filter"),value:"id"},{label:(0,u.__)("Name","wc-ajax-product-filter"),value:"name"}];let n;return n=e?(0,u.__)("Entry","wc-ajax-product-filter"):(0,u.__)("Include","wc-ajax-product-filter"),S(t,[{label:(0,u.__)("Slug","wc-ajax-product-filter"),value:"slug"},{label:(0,u.__)("Count","wc-ajax-product-filter"),value:"count"},{label:n,value:"include"}],!0)}(r),o=["slug","count","include"]):"options_order_by"===n?(a=function(e){const t=[{label:(0,u.__)("None","wc-ajax-product-filter"),value:"none"}],n=[{label:(0,u.__)("Value","wc-ajax-product-filter"),value:"value"},{label:(0,u.__)("Label","wc-ajax-product-filter"),value:"label"},{label:(0,u.__)("Count","wc-ajax-product-filter"),value:"count"}];return e&&n.push({label:(0,u.__)("Entry","wc-ajax-product-filter"),value:"include"}),S(t,n,!0)}(r),o=["value","label","count","include"]):"post_author_order_by"===n&&(a=function(e){const t=[{label:(0,u.__)("Default","wc-ajax-product-filter"),value:"default"},{label:(0,u.__)("ID","wc-ajax-product-filter"),value:"id"},{label:(0,u.__)("Name","wc-ajax-product-filter"),value:"name"}];let n;return n=e?(0,u.__)("Entry","wc-ajax-product-filter"):(0,u.__)("Include","wc-ajax-product-filter"),S(t,[{label:(0,u.__)("Count","wc-ajax-product-filter"),value:"count"},{label:n,value:"include"}],!0)}(r),o=["count","include"]),i=a.find((e=>e.value===d[n])),o.includes(d[n])&&(i=(0,c.find)(a,{proGroup:!0}).options.find((e=>e.value===d[n]))),(0,e.createElement)(Ki,{id:n,index:t,label:(0,u.__)("Order By","wc-ajax-product-filter"),description:(0,u.__)("Select the criteria by which you want the items to be ordered.","wc-ajax-product-filter"),options:a,value:i,onChange:l,renderAsFormField:!0})},orderDirectionField:n=>(0,e.createElement)(Qi,{id:n,index:t,label:(0,u.__)("Order Direction","wc-ajax-product-filter"),description:(0,u.__)("Whether to order options in ascending or descending order.","wc-ajax-product-filter"),options:Nn(),value:d[n],onChange:o}),orderTypeField:n=>(0,e.createElement)(Qi,{id:n,index:t,label:(0,u.__)("Order Type","wc-ajax-product-filter"),description:(0,u.__)("Whether to arrange the options in alphabetical or numerical order.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Alphabetical","wc-ajax-product-filter"),value:"alphabetical"},{label:(0,u.__)("Numerical","wc-ajax-product-filter"),value:"numerical"}],value:d[n],onChange:o})}},xl=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleCheckboxChange:o,handleTextFieldChange:l}=Zn(r,a),{getOptionsField:s}=wl(n),{formFilters:c}=r,d=c[n],{number_display_type:p,number_range_slider_display_values_as:f,number_get_options:m,auto_detect_min_max:h,min_value:_,max_value:v,step:g,gap:b,value_prefix:y,value_postfix:w,values_separator:x,text_before_min_value:E,text_before_max_value:C,format_numbers:S,decimal_places:O,thousand_separator:j,decimal_separator:T}=d;return(0,e.createElement)(e.Fragment,null,(()=>{let e=!1;if(["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(p)&&(e=!0),e)return s("number_get_options")})(),(()=>{let t=!1;const r=["range_slider","range_number"];if((r.includes(p)||"automatically"===m)&&(t=!0),t)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"auto_detect_min_max",index:n,label:(0,u.__)("Auto-detect min and max","wc-ajax-product-filter"),description:(0,u.__)("Whether to detect the min and max values from the database.","wc-ajax-product-filter"),isChecked:h,onChange:o}),"1"!==h&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ji,{id:"min_value",index:n,label:(0,u.__)("Min Value","wc-ajax-product-filter"),description:(0,u.__)("The minimum value that a user can select.","wc-ajax-product-filter"),value:_,onChange:l}),(0,e.createElement)(Ji,{id:"max_value",index:n,label:(0,u.__)("Max Value","wc-ajax-product-filter"),description:(0,u.__)("The maximum value that a user can select.","wc-ajax-product-filter"),value:v,onChange:l})),(0,e.createElement)(Ji,{id:"step",index:n,label:(0,u.__)("Step","wc-ajax-product-filter"),description:(0,u.__)("Determines the size of the increment amount.","wc-ajax-product-filter"),value:g,onChange:l,min:"1"}),!r.includes(p)&&(0,e.createElement)(Ji,{id:"gap",index:n,label:(0,u.__)("Gap","wc-ajax-product-filter"),description:(0,u.__)("Determines the gap between the ranges.","wc-ajax-product-filter"),value:b,onChange:l,min:"0"}),(0,e.createElement)(bn,{id:"value_prefix",index:n,label:(0,u.__)("Value Prefix","wc-ajax-product-filter"),description:(0,u.__)("This should be used for the unit, space(s) allowed. Example: $","wc-ajax-product-filter"),value:y,onChange:l,customClass:"input-small"}),(0,e.createElement)(bn,{id:"value_postfix",index:n,label:(0,u.__)("Value Postfix","wc-ajax-product-filter"),description:(0,u.__)("This should be used for the unit, space(s) allowed. Example: €","wc-ajax-product-filter"),value:w,onChange:l,customClass:"input-small"}),(0,e.createElement)(bn,{id:"values_separator",index:n,label:(0,u.__)("Values Separator","wc-ajax-product-filter"),description:(0,u.__)("Text to appear between the min and max values, space(s) allowed. Example: –","wc-ajax-product-filter"),value:x,onChange:l}),"range_slider"===p&&"plain_text"===f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"text_before_min_value",index:n,label:(0,u.__)("Text before min value","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the min value.","wc-ajax-product-filter"),value:E,onChange:l}),(0,e.createElement)(bn,{id:"text_before_max_value",index:n,label:(0,u.__)("Text before max value","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the max value.","wc-ajax-product-filter"),value:C,onChange:l})),(0,e.createElement)(Zi,{id:"format_numbers",index:n,label:(0,u.__)("Format Numbers","wc-ajax-product-filter"),description:(0,u.__)("Enable this if you want to format the numbers.","wc-ajax-product-filter"),isChecked:S,onChange:o}),"1"===S&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ji,{id:"decimal_places",index:n,label:(0,u.__)("Decimal Places","wc-ajax-product-filter"),value:O,onChange:l,min:"1",max:"6"}),(0,e.createElement)(bn,{id:"thousand_separator",index:n,label:(0,u.__)("Thousand Separator","wc-ajax-product-filter"),value:j,onChange:l,customClass:"input-small"}),(0,e.createElement)(bn,{id:"decimal_separator",index:n,label:(0,u.__)("Decimal Separator","wc-ajax-product-filter"),value:T,onChange:l,customClass:"input-small"})))})(),(()=>{let t=!1;if(["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(p)&&"manual_entry"===m&&(t=!0),t)return(0,e.createElement)(yl,{index:n})})())};const El="__manual_options_modal",Cl=wcapf_admin_params.author_roles;var Sl=t=>{let{index:n,open:r,closeModal:a}=t;const[o,l]=(0,e.useState)(!0),[p,f]=(0,e.useState)([]),[m,h]=(0,e.useState)(""),[_,v]=(0,e.useState)(El),[g,y]=(0,e.useState)(!1),[w,x]=(0,e.useState)(""),{state:E,dispatch:C}=i(),{handleManualOptionsChange:S}=Zn(E,C),{formFilters:O}=E,j=O[n],{type:T,taxonomy:k,meta_key:N,manual_options:D}=j;(0,e.useEffect)((()=>{if(!r)return;let e;if("taxonomy"===T){if(!k)return l(!1),void h((0,u.__)("Please select a taxonomy.","wc-ajax-product-filter"));e={action:"wcapf_get_terms_for_modal",taxonomy:k}}else if("post-author"===T){if((0,c.isEmpty)(Cl))return l(!1),void h((0,u.__)("Please select the author roles from <strong>Settings > Others</strong> tab.","wc-ajax-product-filter"));e={action:"wcapf_get_post_authors_for_modal",roles:Cl}}else{if(!N)return l(!1),void h((0,u.__)("Please select a meta key.","wc-ajax-product-filter"));e={action:"wcapf_get_meta_values_for_modal",meta_key:N}}e.nonce=b(),s().get(wcapf_admin_params.ajaxurl,{params:e}).then((e=>{l(!1);const t=e.data.data;if(!(0,c.isEmpty)(t)){const e=`${El} ajax-done`;if("taxonomy"===T||"post-author"===T){const e=I(t);f(e)}else f(t);v(e)}})).catch((e=>{console.log(e),l(!1),h((0,u.__)("There was an error fetching the options.","wc-ajax-product-filter"))}))}),[r]),(0,e.useEffect)((()=>{r||(l(!0),f([]),h(""),v(El),y(!1),x(""))}),[r]),(0,e.useEffect)((()=>{let e;e=w?p.map((e=>{const{label:t,value:n}=e;return t.toLowerCase().includes(w.toLowerCase())||n.toString().toLowerCase().includes(w.toLowerCase())?{...e,matched:"1"}:{...e,matched:"0"}})):p.map((e=>({...e,matched:"1"}))),f(e)}),[w]);const I=e=>{const t=D||[];return e.map((e=>t.find((t=>t.value==e.value))?{...e,status:"added"}:{...e,status:""}))},M=()=>{const e=p.map((e=>(e.status="added",e)));f(e)},F=()=>{const e=p.map((e=>(e.status="",e)));f(e)},P=()=>{const e=D||[],t=[];if(p.forEach((n=>{if("added"===n.status){if(("taxonomy"===T||"post-author"===T)&&e.find((e=>e.value==n.value)))return;const r={value:n.value,label:"",tooltip:"",color:"",secondary_color_enabled:"",secondary_color:"",image_id:"",image_url:""};("taxonomy"===T||"post-author"===T)&&(r.name=n.label),t.push(r)}})),!(0,c.isEmpty)(t)){let r=[];r=g?t:[...e,...t],S(r,"manual_options",n)}a()},A=Kn()(_,{__meta_values_modal:"post-meta"===T});return(0,e.createElement)(e.Fragment,null,r&&(0,e.createElement)(d.Modal,{title:(0,u.__)("Available Options","wc-ajax-product-filter"),onRequestClose:a,className:A},(()=>{if(o)return(0,e.createElement)("div",{className:"__loader"},(0,e.createElement)(d.Spinner,null));if(m)return(0,e.createElement)("p",{className:"__description",dangerouslySetInnerHTML:{__html:m}});if((0,c.isEmpty)(p)){let t;return"taxonomy"===T?t=(0,u.sprintf)((0,u.__)("No terms found for <strong>%s</strong>.","wc-ajax-product-filter"),k):"post-meta"===T?t=(0,u.sprintf)((0,u.__)("No meta values found for <strong>%s</strong>.","wc-ajax-product-filter"),N):"post-author"===T&&(t=(0,u.sprintf)((0,u.__)("No authors found in user roles <strong>%s</strong>.","wc-ajax-product-filter"),Cl.join(", "))),(0,e.createElement)("p",{className:"__description",dangerouslySetInnerHTML:{__html:t}})}return(0,e.createElement)(e.Fragment,null,(()=>{const t=p.length;let n;return"taxonomy"===T?n=(0,u.sprintf)((0,u._n)("Found %d term for <strong>%s</strong>.","Found %d terms for <strong>%s</strong>.",t,"wc-ajax-product-filter"),t,k):"post-meta"===T?n=(0,u.sprintf)((0,u._n)("Found %d meta value for <strong>%s</strong>.","Found %d meta values for <strong>%s</strong>.",t,"wc-ajax-product-filter"),t,N):"post-author"===T&&(n=(0,u.sprintf)((0,u._n)("Found %d author for roles of <strong>%s</strong>.","Found %d authors for roles of <strong>%s</strong>.",t,"wc-ajax-product-filter"),t,Cl.join(", "))),(0,e.createElement)("div",{className:"__header"},(0,e.createElement)("div",{className:"__results_info"},(0,e.createElement)("p",{className:"__description",dangerouslySetInnerHTML:{__html:n}})),(0,e.createElement)("div",{className:"__search_box"},(0,e.createElement)(d.SearchControl,{value:w,onChange:x})))})(),(0,e.createElement)("div",{className:"__options"},p.map(((t,n)=>(0,e.createElement)("div",{key:`modal-option-${n}`,className:Kn()("__option",{__hide_option:"0"===t.matched})},(0,e.createElement)("label",null,(0,e.createElement)(d.CheckboxControl,{checked:"added"===t.status,onChange:e=>((e,t)=>{const n=p[t],r=p.map((t=>t.value===n.value?e?{...t,status:"added"}:{...t,status:""}:t));f(r)})(e,n)}),(0,e.createElement)("span",{className:"__label"},t.label),"post-meta"!==T&&(0,e.createElement)("span",{className:"__info"},(0,u.sprintf)((0,u.__)("ID: %d","wc-ajax-product-filter"),t.value))))))),(0,e.createElement)("div",{className:"__modal_footer"},(0,e.createElement)("div",null,(0,e.createElement)(d.Button,{variant:"secondary",onClick:M},(0,u.__)("Select All","wc-ajax-product-filter")),(0,e.createElement)(d.Button,{variant:"secondary",onClick:F},(0,u.__)("Clear Selection","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__add_options_btn_group"},"post-meta"===T&&(0,e.createElement)(d.CheckboxControl,{label:(0,u.__)("Replace current options?","wc-ajax-product-filter"),checked:g,onChange:e=>y(e)}),(0,e.createElement)(d.Button,{variant:"primary",onClick:P},(0,u.__)("Add Options","wc-ajax-product-filter")))))})()))};function Ol(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jl(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 Tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jl(Object(n),!0).forEach((function(t){Ol(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kl(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Nl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dl(e,t){if(e){if("string"==typeof e)return Nl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nl(e,t):void 0}}function Il(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(e){i=!0,a=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||Dl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ml(e){return Ml="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},Ml(e)}function Fl(e){var t=function(e,t){if("object"!==Ml(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Ml(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Ml(t)?t:String(t)}function Pl(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}var Al=window.regeneratorRuntime,Rl=n.n(Al),Ll=setTimeout;function Vl(e,t){var n=t.useCachedSetTimeout?Ll:setTimeout;return new Promise((function(t){n(t,e)}))}var Hl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.useCachedSetTimeout,r=Vl(e,{useCachedSetTimeout:n});function a(e){return r.then((function(){return e}))}return a.then=function(){return r.then.apply(r,arguments)},a.catch=Promise.resolve().catch,a};function Bl(){var e=(0,Qt.useRef)(!1);return(0,Qt.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var Ul=function(e,t,n){return e-t-10<n};function $l(e){return function(e){if(Array.isArray(e))return Nl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Dl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var zl=function(e,t){return[].concat($l(e),$l(t))},Wl='[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.',ql=function(e,t){if(!t)throw e.error(Wl,"Received:",t),new Error(Wl);if(!Array.isArray(t.options))throw e.error(Wl,"Received:",t),new Error(Wl)},Gl=function(e){var t=e.options,n=e.defaultOptions,r=e.additional,a=e.defaultAdditional,o=!0===n?null:n instanceof Array?n:t;return o?{"":{isFirstLoad:!1,isLoading:!1,options:o,hasMore:!0,additional:a||r}}:{}},Yl=function(e){return{isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,additional:e.additional}},Xl=function(){var e,t=(e=Rl().mark((function e(t,n,r,a,o,i,l,s){var c,u,d,p,f,m,h,_,v,g,b;return Rl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=n.current.inputValue,u=!r.current[c],!(d=u?Yl(n.current):r.current[c]).isLoading&&d.hasMore){e.next=5;break}return e.abrupt("return");case 5:if(i((function(e){return Tl(Tl({},e),{},Ol({},c,Tl(Tl({},d),{},{isLoading:!0})))})),!(a>0&&"input-change"===t)){e.next=13;break}return e.next=9,o(a);case 9:if(p=n.current.inputValue,c===p){e.next=13;break}return i((function(e){return u?(e[c],kl(e,[c].map(Fl))):Tl(Tl({},e),{},Ol({},c,Tl(Tl({},d),{},{isLoading:!1})))})),e.abrupt("return");case 13:return e.prev=13,h=n.current.loadOptions,e.next=17,h(c,d.options,d.additional);case 17:f=e.sent,m=!1,e.next=24;break;case 21:e.prev=21,e.t0=e.catch(13),m=!0;case 24:if(!m){e.next=27;break}return i((function(e){return Tl(Tl({},e),{},Ol({},c,Tl(Tl({},d),{},{isLoading:!1})))})),e.abrupt("return");case 27:l(console,f),v=(_=f).options,g=_.hasMore,b=f.hasOwnProperty("additional")?f.additional:d.additional,i((function(e){return Tl(Tl({},e),{},Ol({},c,Tl(Tl({},d),{},{options:s(d.options,v,b),hasMore:!!g,isLoading:!1,isFirstLoad:!1,additional:b})))}));case 31:case"end":return e.stop()}}),e,null,[[13,21]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Pl(o,r,a,i,l,"next",e)}function l(e){Pl(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(_x,e,n,r,a,o,i,l){return t.apply(this,arguments)}}(),Kl=function(e){return e+1},Zl=function(e,t,n,r,a,o,i,l){var s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],c=l.defaultOptions,u=l.loadOptionsOnMenuOpen,d=void 0===u||u,p=l.debounceTimeout,f=void 0===p?0:p,m=l.inputValue,h=l.menuIsOpen,_=l.filterOption,v=void 0===_?null:_,g=l.reduceOptions,b=void 0===g?zl:g,y=l.shouldLoadMore,w=void 0===y?Ul:y,x=Bl(),E=e(!0),C=e(l);C.current=l;var S=t(0)[1],O=e(null);null===O.current&&(O.current=o(l));var j=r((function(e){i(e,C,O,f,Hl,(function(e){O.current=e(O.current),x.current&&S(Kl)}),a,b)}),[f]),T=r((function(){var e=C.current.inputValue;O.current[e]&&j("menu-scroll")}),[j]);n((function(){E.current?E.current=!1:(O.current={},S(Kl)),!0===c&&j("autoload")}),s),n((function(){h&&!O.current[m]&&j("input-change")}),[m]),n((function(){h&&!O.current[""]&&d&&j("menu-toggle")}),[h]);var k=O.current[m]||Yl(l);return{handleScrolledToBottom:T,shouldLoadMore:w,filterOption:v,isLoading:k.isLoading,isFirstLoad:k.isFirstLoad,options:k.options}},Jl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Zl(Qt.useRef,Qt.useState,Qt.useEffect,Qt.useCallback,ql,Gl,Xl,e,t)},Ql=function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=r.inputValue,i=r.menuIsOpen,l=r.defaultInputValue,s=r.defaultMenuIsOpen,c=r.onInputChange,u=r.onMenuClose,d=r.onMenuOpen,p=e(l||""),f=Il(p,2),m=f[0],h=f[1],_=e(!!s),v=Il(_,2),g=v[0],b=v[1],y="string"==typeof o?o:m,w="boolean"==typeof i?i:g,x=t((function(e,t){c&&c(e,t),h(e)}),[c]),E=t((function(){u&&u(),b(!1)}),[u]),C=t((function(){d&&d(),b(!0)}),[d]),S=n(Tl(Tl({},r),{},{inputValue:y,menuIsOpen:w}),a);return Tl(Tl({},S),{},{inputValue:y,menuIsOpen:w,onInputChange:x,onMenuClose:E,onMenuOpen:C})},es=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Ql(Qt.useState,Qt.useCallback,Jl,e,t)},ts=n(601),ns=n(893),rs=function(e){function t(t){var n=t.selectProps,r=n.handleScrolledToBottom,a=n.shouldLoadMore,o=t.innerRef,i=t.useEffect,l=t.useRef,s=t.useCallback,c=t.setTimeout,u=t.clearTimeout,d=l(null),p=l(null),f=s((function(){var e=p.current;if(!e)return!1;var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return a(n,r,t)}),[a]),m=s((function(){f()&&r&&r()}),[f,r]),h=s((function(){m(),d.current=c(h,300)}),[m]);return i((function(){return h(),function(){d.current&&u(d.current)}}),[]),(0,ns.jsx)(e,Tl(Tl({},t),{},{innerRef:(0,ts.Z)(o,p)}))}return t.defaultProps={useEffect:Qt.useEffect,useRef:Qt.useRef,useCallback:Qt.useCallback,setTimeout:setTimeout,clearTimeout:clearTimeout},t}(Uo.MenuList),as=function(e){return function(e,t){return e((function(){return Tl({MenuList:rs},t)}),[t])}(Qt.useMemo,e)},os=["components","selectRef","isLoading","useComponents","useAsyncPaginate","cacheUniqs"],is=function(e){function t(t){var n=t.components,r=t.selectRef,a=t.isLoading,o=t.useComponents,i=t.useAsyncPaginate,l=t.cacheUniqs,s=i(kl(t,os),l),c=o(n),u="boolean"==typeof a?a:s.isLoading;return(0,ns.jsx)(e,Tl(Tl(Tl({},t),s),{},{isLoading:u,components:c,ref:r}))}return t.defaultProps={selectRef:null,cacheUniqs:[],components:{},useComponents:as,useAsyncPaginate:es},t}(Ri),ls=t=>{let{label:n,id:r,index:a="",description:o,value:i,onChange:l,taxonomy:c,onlyParent:p=!1,isMultiple:f=!1,type:m="taxonomy",isUserRoles:h=!1,options:_,showIncludeChildren:v=!1,checkboxId:g,checkIsChecked:y,onCheckChange:w,renderAsFormField:E=!0,inputKey:C,inputPlaceholder:S,inputNoOptionsMessage:O,maxMenuHeight:j}=t;const T=async(e,t,n)=>{let r,{page:a}=n;r="author"===m?{action:"wcapf_get_authors_for_dropdown",keyword:e,page:a}:"page"===m?{action:"wcapf_get_pages_for_dropdown",keyword:e,page:a}:"product"===m?{action:"wcapf_get_products_for_dropdown",keyword:e,page:a}:{action:"wcapf_get_terms_for_dropdown",taxonomy:c,only_parent:p,keyword:e,page:a},r.nonce=b();try{const e=(await s().get(wcapf_admin_params.ajaxurl,{params:r})).data.data;return{options:e,hasMore:e.length>=1,additional:{page:a+1}}}catch(e){console.log(e)}};let k,N,D;k=f?`__custom_react_select full-width ${r}`:`__custom_react_select fixed-width ${r}`,"author"===m?h?(N=(0,u.__)("Start typing to find the role","wc-ajax-product-filter"),D=(0,u.__)("No roles found","wc-ajax-product-filter")):(N=(0,u.__)("Start typing to find the author","wc-ajax-product-filter"),D=(0,u.__)("No authors found","wc-ajax-product-filter")):(N=(0,u.__)("Start typing to find the term","wc-ajax-product-filter"),D=(0,u.__)("No terms found","wc-ajax-product-filter")),S&&(N=S),O&&(D=O);const I=(0,u.__)("Loading...","wc-ajax-product-filter"),M=x(r,a),F=()=>h?(0,e.createElement)(Ri,{inputId:M,value:i,options:_,placeholder:N,noOptionsMessage:()=>D,loadingMessage:()=>I,formatOptionLabel:Gi,isMulti:f,maxMenuHeight:j,closeMenuOnSelect:!f,onChange:e=>l(e,r,a),isClearable:!0,className:k,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})}):(0,e.createElement)(is,{key:C,inputId:M,value:i,loadOptions:T,additional:{page:1},placeholder:N,noOptionsMessage:()=>D,loadingMessage:()=>I,formatOptionLabel:Gi,isMulti:f,maxMenuHeight:j,closeMenuOnSelect:!f,onChange:e=>l(e,r,a),isClearable:!0,className:k,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})});return E?(0,e.createElement)("div",{className:"__form_control react_select"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:M},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},F(),v&&(()=>{let t;return t="direct_child_only"===g?(0,u.__)("Direct child only","wc-ajax-product-filter"):(0,u.__)("Include children","wc-ajax-product-filter"),(0,e.createElement)(d.CheckboxControl,{label:t,className:"__include_child_terms",checked:y,onChange:e=>w(e,g,a)})})()))),o&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:o}})):F()},ss=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleCheckboxChange:o,handleToggleGroupChange:l,handleSelectChange:s,handleSelectTermChange:d}=Zn(r,a),{getOptionsField:p,orderByField:f,orderDirectionField:m}=wl(n),[h,_]=(0,e.useState)(!1),v=()=>_(!0),g=()=>_(!1),{formFilters:b}=r,y=b[n],{taxHierarchical:w,taxonomy:x,get_options:E,limit_options:C,include_terms:S,include_child:O,exclude_terms:j,exclude_child:T,parent_term:k,direct_child_only:N}=y;return(0,e.createElement)(e.Fragment,null,p("get_options"),f("order_terms_by"),m("order_terms_dir"),(()=>{if("automatically"===E){if(w){const t=kn(w,!0),r=["child","parent_only"];let a;return a=t.find((e=>e.value===C)),r.includes(C)&&(a=(0,c.find)(t,{proGroup:!0}).options.find((e=>e.value===C))),(0,e.createElement)(Ki,{id:"limit_options",index:n,label:(0,u.__)("Limit Options","wc-ajax-product-filter"),description:(0,u.__)("Limit the filter options.","wc-ajax-product-filter"),options:t,value:a,onChange:s,renderAsFormField:!0})}{const t=kn();return(0,e.createElement)(nl,{id:"limit_options",index:n,label:(0,u.__)("Limit Options","wc-ajax-product-filter"),description:(0,u.__)("Limit the filter options.","wc-ajax-product-filter"),options:t,onChange:l,value:C})}}})(),(()=>{if("automatically"===E&&"include"===C)return(0,e.createElement)(ls,{id:"include_terms",index:n,label:(0,u.__)("Terms to include","wc-ajax-product-filter"),description:(0,u.__)("Select the terms that will be available to filter by.","wc-ajax-product-filter"),taxonomy:x,isMultiple:!0,value:S,onChange:d,showIncludeChildren:w,checkboxId:"include_child",checkIsChecked:O,onCheckChange:o})})(),(()=>{if("automatically"===E&&"exclude"===C)return(0,e.createElement)(ls,{id:"exclude_terms",index:n,label:(0,u.__)("Terms to exclude","wc-ajax-product-filter"),description:(0,u.__)("Select the terms that will be excluded from the filter by options.","wc-ajax-product-filter"),taxonomy:x,isMultiple:!0,value:j,onChange:d,showIncludeChildren:w,checkboxId:"exclude_child",checkIsChecked:T,onCheckChange:o})})(),(()=>{if("automatically"===E&&"child"===C&&w)return(0,e.createElement)(ls,{id:"parent_term",index:n,label:(0,u.__)("Parent Term","wc-ajax-product-filter"),description:(0,u.__)("Select the parent term for which child terms will be available as filter options.","wc-ajax-product-filter"),taxonomy:x,onlyParent:!0,value:k,onChange:d,showIncludeChildren:w,checkboxId:"direct_child_only",checkIsChecked:N,onCheckChange:o})})(),(()=>{if("manual_entry"===E)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yl,{index:n,openModal:v}),(0,e.createElement)(Sl,{index:n,open:h,closeModal:g}))})())},cs=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{}=Zn(r,a),{formFilters:o}=r,l=o[n],{getOptionsField:s}=wl(n),{number_get_options:c}=l;return(0,e.createElement)(e.Fragment,null,s("number_get_options"),(()=>{if("manual_entry"===c)return(0,e.createElement)(yl,{index:n})})())},us=t=>{let{index:n}=t;const{state:r}=i(),{getOptionsField:a,orderByField:o,orderDirectionField:l,orderTypeField:s}=wl(n),[c,u]=(0,e.useState)(!1),d=()=>u(!0),p=()=>u(!1),{formFilters:f}=r,m=f[n],{get_options:h,options_order_by:_}=m;return(0,e.createElement)(e.Fragment,null,a("get_options"),o("options_order_by"),(()=>{if("none"!==_)return l("options_order_dir")})(),(()=>{if(["label","value"].includes(_))return s("options_order_type")})(),(()=>{if("manual_entry"===h)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yl,{index:n,openModal:d}),(0,e.createElement)(Sl,{index:n,open:c,closeModal:p}))})())},ds=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleTextFieldChange:o}=Zn(r,a),{formFilters:l}=r,s=l[n],{date_display_type:c,date_from_prefix:d,date_from_postfix:p,date_from_placeholder:f,date_to_prefix:m,date_to_postfix:h,date_to_placeholder:_}=s;return(0,e.createElement)(e.Fragment,null,(()=>{if("input_date"===c||"input_date_range"===c)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"date_from_prefix",index:n,label:(0,u.__)("From Prefix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the From field.","wc-ajax-product-filter"),value:d,onChange:o}),(0,e.createElement)(bn,{id:"date_from_postfix",index:n,label:(0,u.__)("From Postfix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear after the From field.","wc-ajax-product-filter"),value:p,onChange:o}),(0,e.createElement)(bn,{id:"date_from_placeholder",index:n,label:(0,u.__)("From Placeholder","wc-ajax-product-filter"),description:(0,u.__)("The placeholder text to appear for the From field.","wc-ajax-product-filter"),value:f,onChange:o}),"input_date_range"===c&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"date_to_prefix",index:n,label:(0,u.__)("To Prefix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the To field.","wc-ajax-product-filter"),value:m,onChange:o}),(0,e.createElement)(bn,{id:"date_to_postfix",index:n,label:(0,u.__)("To Postfix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear after the To field.","wc-ajax-product-filter"),value:h,onChange:o}),(0,e.createElement)(bn,{id:"date_to_placeholder",index:n,label:(0,u.__)("To Placeholder","wc-ajax-product-filter"),description:(0,u.__)("The placeholder text to appear for the To field.","wc-ajax-product-filter"),value:_,onChange:o})))})(),(()=>{if(["time_period_checkbox","time_period_radio","time_period_select","time_period_multiselect","time_period_label"].includes(c))return(0,e.createElement)(yl,{index:n})})())};const ps=wcapf_admin_params.user_roles;var fs=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleToggleGroupChange:o,handleSelectTermChange:l}=Zn(r,a),{getOptionsField:s,orderByField:c,orderDirectionField:d}=wl(n),[p,f]=(0,e.useState)(!1),m=()=>f(!0),h=()=>f(!1),{formFilters:_}=r,v=_[n],{get_options:g,limit_options:b,include_authors:y,exclude_authors:w,include_user_roles:x}=v;return(0,e.createElement)(e.Fragment,null,s("get_options"),c("post_author_order_by"),d("post_author_order_dir"),(()=>{if("automatically"===g){const t=[{label:(0,u.__)("Off","wc-ajax-product-filter"),value:"off"},{label:(0,u.__)("Include","wc-ajax-product-filter"),value:"include"},{label:(0,u.__)("Exclude","wc-ajax-product-filter"),value:"exclude"},{label:(0,u.__)("Role","wc-ajax-product-filter"),value:"user_roles"}];return(0,e.createElement)(nl,{id:"limit_options",index:n,label:(0,u.__)("Limit Options","wc-ajax-product-filter"),description:(0,u.__)("Limit the filter options.","wc-ajax-product-filter"),options:t,onChange:o,value:b})}})(),(()=>{if("automatically"===g&&"include"===b)return(0,e.createElement)(ls,{id:"include_authors",index:n,label:(0,u.__)("Authors to include","wc-ajax-product-filter"),description:(0,u.__)("Select the authors that will be available to filter by.","wc-ajax-product-filter"),isMultiple:!0,value:y,onChange:l,type:"author"})})(),(()=>{if("automatically"===g&&"exclude"===b)return(0,e.createElement)(ls,{id:"exclude_authors",index:n,label:(0,u.__)("Authors to exclude","wc-ajax-product-filter"),description:(0,u.__)("Select the authors that will be excluded from the filter by options.","wc-ajax-product-filter"),isMultiple:!0,value:w,onChange:l,type:"author"})})(),(()=>{if("automatically"===g&&"user_roles"===b)return(0,e.createElement)(ls,{id:"include_user_roles",index:n,label:(0,u.__)("Author Roles","wc-ajax-product-filter"),description:(0,u.__)("Select the roles; matched authors must have at least one of these roles.","wc-ajax-product-filter"),isMultiple:!0,value:x,onChange:l,type:"author",isUserRoles:!0,options:ps})})(),(()=>{if("manual_entry"===g)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yl,{index:n,openModal:m}),(0,e.createElement)(Sl,{index:n,open:p,closeModal:h}))})())},ms=t=>{let{index:n}=t;const{state:r}=i(),{formFilters:a}=r,o=a[n],{type:l,value_type:s}=o;return(0,e.createElement)(d.SlotFillProvider,null,(()=>{let t;return"taxonomy"===l?t="number"===s?(0,e.createElement)(xl,{index:n}):(0,e.createElement)(ss,{index:n}):"price"===l?t=(0,e.createElement)(xl,{index:n}):"rating"===l?t=(0,e.createElement)(cs,{index:n}):"product-status"===l||"sort-by"===l||"per-page"===l?t=(0,e.createElement)(yl,{index:n}):"post-meta"===l?"text"===s?t=(0,e.createElement)(us,{index:n}):"number"===s?t=(0,e.createElement)(xl,{index:n}):"date"===s&&(t=(0,e.createElement)(ds,{index:n})):"post-author"===l&&(t=(0,e.createElement)(fs,{index:n})),t})(),(0,e.createElement)(d.Popover.Slot,{name:"popover-slot-for-options-table"}))},hs=t=>{let{label:n,id:r,index:a="",value:o,onChange:i,description:l,...s}=t;const c=x(r,a);return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:c},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)("textarea",Z({className:"components-textarea-control__input",id:c,value:o,onChange:e=>i(e.target.value,r,a)},s))))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}}))};(0,u.__)("Archive","wc-ajax-product-filter"),(0,u.__)("Page","wc-ajax-product-filter"),(0,u.__)("User","wc-ajax-product-filter"),(0,u.__)("Equal","wc-ajax-product-filter"),(0,u.__)("Not equal","wc-ajax-product-filter"),(0,u.__)("Active","wc-ajax-product-filter"),(0,u.__)("Not active","wc-ajax-product-filter"),(0,u.__)("Logged in","wc-ajax-product-filter"),(0,u.__)("Logged out","wc-ajax-product-filter"),wcapf_admin_params.user_roles,wcapf_admin_params.taxonomies_with_archive;var _s=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleRadioChange:o,handleCheckboxChange:l,handleTextFieldChange:s}=Zn(r,a),{formFilters:c}=r,d=c[n],{type:p,component:f,taxHierarchical:m,display_type:h,native_display_type_layout:_,number_display_type:v,date_display_type:g,hierarchical:b,value_type:y,show_title:w,enable_accordion:x,accordion_default_state:E,help_text:C,enable_search_field:S,search_field_placeholder:O,enable_reduce_height:j,soft_limit:T,max_height:k,show_in_active_filters:N,enable_visibility_rules:D}=d,I="active-filters"===f,M=()=>{let e;return"taxonomy"===p?e=h:"price"===p?e=v:"post-author"===p?e=h:"post-meta"===p?"text"===y?e=h:"number"===y?e=v:"date"===y&&(e=g):e=h,e},F=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"reduce-height";if(I||"keyword"===p)return!1;if("taxonomy"===p&&m&&["checkbox","radio","select","multi-select"].includes(h)&&"1"===b&&"list"===_&&"search"===t)return!1;if("taxonomy"===p&&m&&"hierarchy-select"===h)return!1;const n=M();let r;return r="reduce-height"===t?["select","multi-select","range_slider","range_number","range_select","range_multiselect","input_date","input_date_range","time_period_select","time_period_multiselect"]:["multi-select","range_multiselect","time_period_multiselect","range_slider","range_number","input_date","input_date_range"],e=!r.includes(n),e};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,{id:"show_title",index:n,label:(0,u.__)("Show title","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the filter title before the filter options.","wc-ajax-product-filter"),isChecked:w,onChange:l}),(()=>{if("1"===w)return(0,e.createElement)(Zi,{id:"enable_accordion",index:n,label:(0,u.__)("Enable accordion","wc-ajax-product-filter"),description:(0,u.__)("Place more filters by collapsing the filter options.","wc-ajax-product-filter"),isChecked:x,onChange:l})})(),(()=>{if("1"===w&&"1"===x)return(0,e.createElement)(Qi,{id:"accordion_default_state",index:n,label:(0,u.__)("Accordion state","wc-ajax-product-filter"),description:(0,u.__)("Determines how the accordion should appear initially.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Expanded","wc-ajax-product-filter"),value:"expanded"},{label:(0,u.__)("Collapsed","wc-ajax-product-filter"),value:"collapsed"}],value:E,onChange:o})})(),(()=>{if("1"===w)return(0,e.createElement)(hs,{id:"help_text",index:n,label:(0,u.__)("Help Text","wc-ajax-product-filter"),description:(0,u.__)("Show additional information in a tooltip. Supports basic markup.","wc-ajax-product-filter\t"),value:C,onChange:s,rows:2})})(),(()=>{if(F("search"))return(0,e.createElement)(Zi,{id:"enable_search_field",index:n,label:(0,u.__)("Search Field","wc-ajax-product-filter"),description:(0,u.__)("Adds a search field to narrow down the filter options.","wc-ajax-product-filter"),isChecked:S,onChange:l})})(),(()=>{if(F("search")&&"1"===S&&!["select","range_select","time_period_select"].includes(M()))return(0,e.createElement)(bn,{id:"search_field_placeholder",index:n,label:(0,u.__)("Placeholder","wc-ajax-product-filter"),description:(0,u.__)("Change the default placeholder for the search input field.","wc-ajax-product-filter"),value:O,onChange:s,isPro:!0})})(),(()=>{if(F()){let t;return t="taxonomy"===p&&m&&["checkbox","radio","select","multi-select"].includes(h)&&"1"===b&&"list"===_?[{label:(0,u.__)("No","wc-ajax-product-filter"),value:"no"},{label:(0,u.__)("Set max height","wc-ajax-product-filter"),value:"max_height"}]:[{label:(0,u.__)("No","wc-ajax-product-filter"),value:"no"},{label:(0,u.__)("Set max height","wc-ajax-product-filter"),value:"max_height"},{label:(0,u.__)("Soft Limit","wc-ajax-product-filter"),value:"soft_limit"}],(0,e.createElement)(Qi,{id:"enable_reduce_height",index:n,label:(0,u.__)("Reduce height","wc-ajax-product-filter"),description:(0,u.__)("Enable this if you want to reduce the filter height.","wc-ajax-product-filter"),options:t,onChange:o,value:j})}})(),(()=>{if("max_height"===j&&F())return(0,e.createElement)(Ji,{id:"max_height",index:n,label:(0,u.__)("Filter max-height","wc-ajax-product-filter\t"),description:(0,u.__)("Set the filter container max height in px.","wc-ajax-product-filter\t"),value:k,onChange:s,min:1})})(),(()=>{if("soft_limit"===j&&F())return(0,e.createElement)(Ji,{id:"soft_limit",index:n,label:(0,u.__)("Number of visible options","wc-ajax-product-filter\t"),description:(0,u.__)("Show a <b>Show More/Show Less</b> toggle after this many options.","wc-ajax-product-filter\t"),value:T,onChange:s,min:1})})(),(()=>{if(!I)return(0,e.createElement)(Zi,{id:"show_in_active_filters",index:n,label:(0,u.__)("Show in Active Filters","wc-ajax-product-filter"),description:(0,u.__)("Determines if we show the selected options in active filters.","wc-ajax-product-filter"),isChecked:N,onChange:l})})(),(0,e.createElement)(Zi,{id:"enable_visibility_rules",index:n,label:(0,u.__)("Visibility Rules","wc-ajax-product-filter"),description:(0,u.__)("Enable this to control filter display based on page, archive and user role.","wc-ajax-product-filter"),isChecked:!1,onChange:l,isDisabled:!0,isPro:!0}),void 0)},vs=window.wp.compose;const gs=t=>{let{tabId:n,onClick:r,children:a,selected:o,...i}=t;return(0,e.createElement)(d.Button,Z({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:n,onClick:r},i),a)};function bs(t){var n;let{className:r,children:a,tabs:o,initialTabName:i,orientation:l="horizontal",activeClass:s="is-active",onSelect:u=c.noop,currentTab:p,onChangeTab:f}=t;const m=(0,vs.useInstanceId)(bs,"tab-panel"),h=e=>{f(e),u(e)},_=(0,c.find)(o,{name:p}),v=`${m}-${null!==(n=null==_?void 0:_.name)&&void 0!==n?n:"none"}`;return(0,e.useEffect)((()=>{if(!(0,c.find)(o,{name:p})){const e=i||(o.length>0?o[0].name:null);f(e)}}),[o]),(0,e.createElement)("div",{className:r},(0,e.createElement)(d.NavigableMenu,{role:"tablist",orientation:l,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},o.map((t=>(0,e.createElement)(gs,{className:Kn()("components-tab-panel__tabs-item",t.className,{[s]:t.name===p}),tabId:`${m}-${t.name}`,"aria-controls":`${m}-${t.name}-view`,selected:t.name===p,key:t.name,onClick:(0,c.partial)(h,t.name)},t.title)))),_&&(0,e.createElement)("div",{key:v,"aria-labelledby":v,role:"tabpanel",id:`${v}-view`,className:"components-tab-panel__tab-content"},a(_)))}const ys=["reset-button","results-count","apply-mode","submit-mode"];var ws=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{setDirty:o}=L(r,a),[l,p]=(0,e.useState)(!1),{filterKeys:f,filterStates:m,formFilters:h}=r,_=h[n],{id:v,uniqueIndex:g,type:y,meta_key:x,component:E}=_;let C;C=_.isNew?g:v;const O=m[C]||{},j=(null==O?void 0:O.accordionStatus)||!1,T=(null==O?void 0:O.currentTab)||"general",k=(0,e.useRef)(""),N=(0,e.useRef)(""),D=(e,t)=>{const n={...m,[C]:{...m[C],[e]:t}};a({type:"SET_FILTER_STATES",payload:n})},I=e=>{X(),k.current.contains(e.target)||D("accordionStatus",!j)},M=()=>{const e=[...h];e.splice(n,1),a({type:"SET_FORM_FILTERS",payload:e});const t=(0,c.omit)(m,C);if(a({type:"SET_FILTER_STATES",payload:t}),v){const e=f.filter((e=>e.id!==v));a({type:"SET_FILTER_KEYS",payload:e})}o()},F=function(e,t){if(!e)return!1;const n=[];let r;const a=["component"];for(let o=0;o<e.length;o++){const i=e[o];o===t?r=Sn(i):a.includes(i.type)||n.push(Sn(i))}return n.includes(r)}(h,n),P=(0,u.__)("There are multiple filters found in the form for the same entity. Please remove the other ones then save the form.","wc-ajax-product-filter"),A=j?Wn:qn,R=Kn()("__top",{open:j},{multiple_filter_instance_found:F}),V=xn(_),H=En(_,V),B=On(f,_)||Cn(_,V),U=function(e){const{type:t,value_type:n,display_type:r,number_display_type:a,date_display_type:o}=e;let i,l;return"number"===n||"price"===t?(i=Mn(),l=a):"date"===n?(i=Fn(),l=o):(i=S(Dn,[]),l=r),i.find((e=>e.value===l))}(_),$="component"===y&&ys.includes(E),z="active-filters"===E,W=function(e){const t=[{name:"general",title:(0,u.__)("General","wc-ajax-product-filter")},{name:"appearance",title:(0,u.__)("Appearance","wc-ajax-product-filter")},{name:"options",title:(0,u.__)("Options","wc-ajax-product-filter")},{name:"advanced",title:(0,u.__)("Advanced","wc-ajax-product-filter")}],{type:n}=e;return"component"===n?t.filter((e=>{let{name:t}=e;return"general"===t})):"keyword"===n?t.filter((e=>{let{name:t}=e;return["general","advanced"].includes(t)})):t}(_);let q;return q=6.2<=w()?{popoverProps:{noArrow:!1,position:"top center"}}:{popoverProps:{noArrow:!1},position:"top center"},(0,e.createElement)("div",{className:"__item"},(0,e.createElement)("div",{className:R,onClick:I},(0,e.createElement)("div",{className:"__drag_handle_wrapper",ref:k},(0,e.createElement)(Gn,{className:"__drag_handler",icon:Yn})),(0,e.createElement)("div",{className:"_filter_header"},(0,e.createElement)("div",{className:"__title"},(0,e.createElement)("div",{className:"__truncated"},$?(0,e.createElement)("span",null,"—"):H)),(0,e.createElement)("div",{className:"__type"},(0,e.createElement)("div",{className:"__wrapper"},V&&(0,e.createElement)("div",{className:"__filter_type"},V.label),"post-meta"===y&&(0,e.createElement)("div",{className:"__truncated __meta_key"},x))),(0,e.createElement)("div",{className:"__key"},(0,e.createElement)("div",{className:"__truncated"},$||z?(0,e.createElement)("span",null,"—"):B)),(0,e.createElement)("div",{className:"__display"},(0,e.createElement)("div",{className:"__truncated"},$||z?(0,e.createElement)("span",null,"—"):null==U?void 0:U.label))),(0,e.createElement)("div",{className:"__accordion_toggle_button"},(0,e.createElement)(d.Button,{isSmall:!0,icon:A,ref:N}))),j&&(0,e.createElement)("div",{className:"__accordion_body"},(0,e.createElement)(bs,{className:"__tab_panel",activeClass:"active-tab",tabs:W,currentTab:T,onChangeTab:e=>{D("currentTab",e)}},(t=>{let{name:r}=t;return(0,e.createElement)(e.Fragment,null,F&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1,className:"multiple_filter_instance_notice"},P),(t=>"general"===t?(0,e.createElement)(tl,{index:n}):"appearance"===t?(0,e.createElement)(sl,{index:n}):"options"===t?(0,e.createElement)(ms,{index:n}):"advanced"===t?(0,e.createElement)(_s,{index:n}):void 0)(r))})),(0,e.createElement)("div",{className:"__action_buttons"},(0,e.createElement)(d.Button,{variant:"link",onClick:e=>{I(e),N.current.focus()}},(0,u.__)("Close","wc-ajax-product-filter"))," | ",(0,e.createElement)(d.Dropdown,Z({},q,{contentClassName:"__remove_popover",focusOnMount:!0,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,isBusy:l,disabled:l,onClick:r,"aria-expanded":n},(0,u.__)("Delete","wc-ajax-product-filter"))},renderContent:t=>{let{onToggle:n}=t;return(0,e.createElement)(e.Fragment,null,(0,u.__)("Are you sure?","wc-ajax-product-filter")," ",(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>(e=>{if(v){e(),p(!0);const t={action:"wcapf_delete_filter",nonce:b(),post_id:v};s().get(wcapf_admin_params.ajaxurl,{params:t}).then((e=>{p(!1);const{data:{data:t,success:n}}=e;n?M():Y(t)})).catch((e=>{p(!1),Y(e.message)}))}else M()})(n)},(0,u.__)("Delete","wc-ajax-product-filter"))," ",(0,e.createElement)(d.Button,{variant:"link",onClick:n},(0,u.__)("Cancel","wc-ajax-product-filter")))}})))))},xs=t=>{let{addFilter:n}=t;return(0,e.createElement)("div",{className:"__empty_form"},(0,e.createElement)(d.Icon,{icon:"filter"}),(0,e.createElement)("h3",null,(0,u.__)("You don't have any filters yet.","wc-ajax-product-filter")),(0,e.createElement)("p",{className:"__description"},(0,u.__)("Click on the button below to add your first filter.","wc-ajax-product-filter")),(0,e.createElement)(d.Button,{variant:"primary",onClick:n,className:"__add_filter_btn"},(0,e.createElement)(d.Icon,{icon:$n}),(0,u.__)("Add Filter","wc-ajax-product-filter")))},Es=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const Cs=wcapf_admin_params.show_v4_review_filters_notice;var Ss=()=>(0,e.createElement)(e.Fragment,null,Cs&&(0,e.createElement)("div",{className:"components-notice is-info is-dismissible",id:"wcapf-v4-review-filters-notice"},(0,e.createElement)("div",{className:"components-notice__content"},(0,e.createElement)("p",null,"Please review your filters carefully after the migration. None of your previous filters have been removed; only the filter data has been migrated. Take a close look at the filters and consider adjusting their order if necessary."),(0,e.createElement)("p",null,"Additionally, please ensure that there is only one filter per entity in the form. If multiple filters for the same entity are present, indicated by a light-red background, kindly remove the duplicates, as having multiple filters for the same entity in a single form is not allowed.")),(0,e.createElement)(d.Button,{className:"components-notice__dismiss",icon:Es,onClick:()=>{"function"==typeof removeWCAPFReviewFiltersNotice&&removeWCAPFReviewFiltersNotice()}}))),Os=()=>{const{state:t,dispatch:n}=i(),{setDirty:r}=L(t,n),{addFilterIndex:a,filterStates:o,formFilters:l,saveError:s}=t,p=()=>{const e={...o,[a]:{accordionStatus:!0,currentTab:"general"}};n({type:"SET_FILTER_STATES",payload:e});const t=function(e,t){let n={};const r=wcapf_admin_params.filter_types,a=(0,c.find)(r,{value:"taxonomy"}).options;for(let e=0;e<a.length;e++){const r=a[e],{type:o,value:i,taxHierarchical:l}=r;if(!(0,c.find)(t,{type:o,taxonomy:i})){n={type:o,taxonomy:i,taxHierarchical:l?"1":""};break}}if((0,c.isEmpty)(n)){const e=["taxonomy","sort-by","per-page","component"];for(let a=0;a<r.length;a++){const o=r[a];if(!e.includes(o.value)){const{value:e}=o;if(!(0,c.find)(t,{type:e})){n={type:e};break}}}}return(0,c.isEmpty)(n)&&(n={type:"post-meta"}),(0,c.merge)({},Tn(),n,{isNew:!0,uniqueIndex:e})}(a,l),i=[...l,t];n({type:"SET_FORM_FILTERS",payload:i}),r(),n({type:"INCREMENT_ADD_FILTER_INDEX"})};return(0,e.createElement)("div",{className:"__filters_drop_zone",id:"__filters_drop_zone"},(0,c.isEmpty)(l)?(0,e.createElement)(xs,{addFilter:p}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ss,null),s&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},s),(0,e.createElement)("div",{className:"__filters_list_header"},(0,e.createElement)("div",{className:"__title"},(0,u.__)("Title","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__type"},(0,u.__)("Type","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__key"},(0,u.__)("Key","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__display"},(0,u.__)("Display","wc-ajax-product-filter"))),(0,e.createElement)(zn.ReactSortable,{list:l,setList:(e,t,r)=>{t&&r.dragging&&n({type:"SET_FORM_FILTERS",payload:e})},direction:"vertical",handle:".__drag_handler",onSort:r,className:"__form_filters"},l.map(((t,n)=>{const r=t.isNew?t.uniqueIndex:t.id;return(0,e.createElement)(ws,{key:r,index:n,filter:t})}))),(0,e.createElement)(d.Flex,{justify:"flex-end"},(0,e.createElement)(d.Button,{variant:"secondary",className:"__add_filter_btn",onClick:p},(0,e.createElement)(d.Icon,{icon:$n}),(0,u.__)("Add Filter")))))},js=(e,t)=>{const{setDirty:n}=L(e,t),{formSettings:r}=e,a=(e,a)=>{a!==r[e]&&(t({type:"SET_FORM_SETTINGS",payload:{...r,[e]:a}}),U(),n())};return{handleRadioChange:(e,t)=>{const n=e.target.value;a(t,n)},handleCheckboxChange:(e,t)=>{a(t,e?"1":"")},handleTextFieldChange:(e,t)=>{a(t,e)},handleSelectChange:(e,t)=>{a(t,e.value)},handleFormLocations:e=>{a("form_locations",e)}}};(0,u.__)("Standard shop loop","wc-ajax-product-filter"),(0,u.__)("Products + Pagination","wc-ajax-product-filter"),(0,u.__)("Products only","wc-ajax-product-filter"),(0,u.__)("Default","wc-ajax-product-filter"),(0,u.__)("On Sale","wc-ajax-product-filter"),(0,u.__)("Best Selling","wc-ajax-product-filter"),(0,u.__)("Top Rated","wc-ajax-product-filter"),(0,u.__)("Visible","wc-ajax-product-filter"),(0,u.__)("Catalog","wc-ajax-product-filter"),(0,u.__)("Search","wc-ajax-product-filter"),(0,u.__)("Hidden","wc-ajax-product-filter"),(0,u.__)("Featured","wc-ajax-product-filter"),(0,u.__)("Default","wc-ajax-product-filter"),(0,u.__)("Date","wc-ajax-product-filter"),(0,u.__)("ID","wc-ajax-product-filter"),(0,u.__)("Menu Order","wc-ajax-product-filter"),(0,u.__)("Popularity","wc-ajax-product-filter"),(0,u.__)("Price","wc-ajax-product-filter"),(0,u.__)("Rating","wc-ajax-product-filter"),(0,u.__)("Random","wc-ajax-product-filter"),(0,u.__)("Title","wc-ajax-product-filter"),Nn(),wcapf_admin_params.meta_keys,wcapf_admin_params.meta_types;const Ts=wcapf_admin_params.filter_types.find((e=>"taxonomy"===e.value));Ts&&Ts.options,(0,u.__)("IN","wc-ajax-product-filter"),(0,u.__)("NOT IN","wc-ajax-product-filter"),(0,u.__)("AND","wc-ajax-product-filter"),(0,u.__)("= (equals)","wc-ajax-product-filter"),(0,u.__)("!= (not equals)","wc-ajax-product-filter"),(0,u.__)("< (less than)","wc-ajax-product-filter"),(0,u.__)("> (greater than)","wc-ajax-product-filter"),(0,u.__)("<= (less than or equal)","wc-ajax-product-filter"),(0,u.__)(">= (greater than or equal)","wc-ajax-product-filter"),(0,u.__)("like","wc-ajax-product-filter"),(0,u.__)("not like","wc-ajax-product-filter"),(0,u.__)("exists","wc-ajax-product-filter"),(0,u.__)("not exists","wc-ajax-product-filter"),wcapf_admin_params.form_places;const ks=wcapf_admin_params.multiple_form_locations;var Ns=()=>{const{state:t,dispatch:n}=i(),{handleFormLocations:r}=js(t,n),{formSettings:{form_locations:a}}=t;let o=[];return o&&(o=ks?[...a]:a.slice(0,1)),ks&&o.length,(0,e.createElement)("div",{className:"__form_control __available_on"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,(0,u.__)("Available on","wc-ajax-product-filter"),E(!0),!1)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(e.Fragment,null,(0,e.createElement)("input",{type:"text",className:"components-text-control__input",disabled:!0,value:(0,u.__)("Product archive pages","wc-ajax-product-filter")}),(0,e.createElement)(hn,{content:(0,u.__)((0,e.createElement)(e.Fragment,null,"For example, you may want to use a different form of filters on"," ",(0,e.createElement)("b",null,"Women's clothing")," or"," ",(0,e.createElement)("b",null,"Men's clothing"),". Or you may want to show the products on singular pages and want to integrate the filters there. In the Pro version, you will be able to do that."))}))))),(0,e.createElement)("p",{className:"description"},(0,u.__)("Determines where you want to show the form to filter the products.","wc-ajax-product-filter")))},Ds=()=>{const{state:t,dispatch:n}=i(),{handleTextFieldChange:r,handleCheckboxChange:a}=js(t,n),{formSettings:{priority:o,show_clear_btn:l}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ns,null),!1,(0,e.createElement)(Zi,{id:"show_clear_btn",label:(0,u.__)("Enable clear filter","wc-ajax-product-filter"),isChecked:l,onChange:a,description:(0,u.__)("Whether to show a button in each filter to clear the active options.","wc-ajax-product-filter"),isPro:!0}))},Is=()=>{const{state:t,dispatch:n}=i(),{isLoading:r,currentTab:a,filterStates:o}=t;return(0,e.useEffect)((()=>{if("settings"===a){const e={};for(const t in o)e[t]={accordionStatus:!1,currentTab:"general"};n({type:"SET_FILTER_STATES",payload:e})}}),[a]),(0,e.createElement)(bs,{currentTab:a,onChangeTab:e=>{n({type:"SET_CURRENT_TAB",payload:e})},className:"__tab_panel __form_tab_panel",activeClass:"active-tab",tabs:[{name:"filters",title:(0,u.__)("Filters","wc-ajax-product-filter")},{name:"settings",title:(0,u.__)("Settings","wc-ajax-product-filter")}]},(t=>{let{name:n}=t;return r?(0,e.createElement)("div",{className:"__loader"},(0,e.createElement)(d.Spinner,null)):"filters"===n?(0,e.createElement)(Os,null):"settings"===n?(0,e.createElement)("div",{className:"__form_settings"},(0,e.createElement)(Ds,null)):void 0}))},Ms=window.wp.notices,Fs=()=>{const t=(0,V.useSelect)((e=>e(Ms.store).getNotices()),[]),{removeNotice:n}=(0,V.useDispatch)(Ms.store),r=t.filter((e=>{let{type:t}=e;return"snackbar"===t}));return(0,e.createElement)(d.SnackbarList,{notices:r,className:"components-editor-notices__snackbar",onRemove:n})};const Ps=wcapf_admin_params.show_review_notice_for_time_since;var As=()=>{const{state:{showReviewNotice:t}}=i();return t?(0,e.createElement)(I,{noticeType:"milestone-achieved"}):Ps?(0,e.createElement)(I,{noticeType:"time-since",timeSince:Ps}):null},Rs=()=>{const{dispatch:t}=i();return(0,e.useEffect)((()=>{(()=>{const e=new URL(window.location.href).searchParams.get("id"),t={action:"wcapf_get_form_data",nonce:b(),post_id:e};return s().get(wcapf_admin_params.ajaxurl,{params:t})})().then((e=>{const{data:{data:n,success:r}}=e;if(!r)return K(n),void t({type:"SET_LOADING",payload:!1});const a=n.filter_keys,o=[],i=n.form_filters,l=n.form_settings,s=["sort-by","per-page"],u=["results-count","apply-mode","submit-mode"];if(i)for(let e=0;e<i.length;e++){const t=i[e];if(s.includes(t.type)||u.includes(t.component))continue;const n={...Tn(),...t};o.push(n)}t({type:"SET_FILTER_KEYS",payload:a});const d={};for(let e=0;e<o.length;e++){let t=!1,n="general";d[o[e].id]={accordionStatus:t,currentTab:n}}t({type:"SET_FILTER_STATES",payload:d}),t({type:"SET_FORM_FILTERS",payload:o}),t({type:"SET_FORM_SETTINGS",payload:(0,c.merge)({},Rn(),l)}),t({type:"SET_LOADING",payload:!1})})).catch((e=>{K(e.message),console.log(e),t({type:"SET_LOADING",payload:!1})}))}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__wcapf_admin"},(0,e.createElement)(R,{view:"form"}),(0,e.createElement)(As,null),(0,e.createElement)("div",{className:"__edit_filter"},(0,e.createElement)("div",{className:"__edit_filter_from"},(0,e.createElement)("div",{className:"__content"},(0,e.createElement)(Bn,null),(0,e.createElement)(Is,null)))),(0,e.createElement)(Fs,null)))};const Ls=()=>(0,e.createElement)(o,null,(0,e.createElement)(Rs,null));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("wcapf-form-admin-ui");t&&(0,e.render)((0,e.createElement)(e.StrictMode,null,(0,e.createElement)(Ls,null)),t)}))}()}();
     1!function(){var e={601:function(e,t){"use strict";t.Z=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return r(e[0],e[1])||null;var n=e.slice(1).reduce((function(e,t){return r(e,t)}),e[0]);return n||null};var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var o=r.get(t)||function(n){a(e,n),a(t,n)};return r.set(t,o),o}return e||t}function a(e,t){"function"==typeof e?e(t):e.current=t}},669:function(e,t,n){e.exports=n(609)},448:function(e,t,n){"use strict";var r=n(867),a=n(26),o=n(372),i=n(327),l=n(97),s=n(109),c=n(985),u=n(874),d=n(648),p=n(644),f=n(205);e.exports=function(e){return new Promise((function(t,n){var m,h=e.data,_=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}r.isFormData(h)&&r.isStandardBrowserEnv()&&delete _["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(y+":"+w)}var E=l(e.baseURL,e.url);function x(){if(b){var r="getAllResponseHeaders"in b?s(b.getAllResponseHeaders()):null,o={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};a((function(e){t(e),g()}),(function(e){n(e),g()}),o),b=null}}if(b.open(e.method.toUpperCase(),i(E,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(x)},b.onabort=function(){b&&(n(new d("Request aborted",d.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(E))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;C&&(_[e.xsrfHeaderName]=C)}"setRequestHeader"in b&&r.forEach(_,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete _[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),v&&"json"!==v&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){b&&(n(!e||e&&e.type?new p:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),h||(h=null);var O=f(E);O&&-1===["http","https","file"].indexOf(O)?n(new d("Unsupported protocol "+O+":",d.ERR_BAD_REQUEST,e)):b.send(h)}))}},609:function(e,t,n){"use strict";var r=n(867),a=n(849),o=n(321),i=n(185),l=function e(t){var n=new o(t),l=a(o.prototype.request,n);return r.extend(l,o.prototype,n),r.extend(l,n),l.create=function(n){return e(i(t,n))},l}(n(546));l.Axios=o,l.CanceledError=n(644),l.CancelToken=n(972),l.isCancel=n(502),l.VERSION=n(288).version,l.toFormData=n(675),l.AxiosError=n(648),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=n(713),l.isAxiosError=n(268),e.exports=l,e.exports.default=l},972:function(e,t,n){"use strict";var r=n(644);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},a.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},644:function(e,t,n){"use strict";var r=n(648);function a(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(867).inherits(a,r,{__CANCEL__:!0}),e.exports=a},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(867),a=n(327),o=n(782),i=n(572),l=n(185),s=n(97),c=n(875),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=l(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!a){var d=[i,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(s),o=Promise.resolve(t);d.length;)o=o.then(d.shift(),d.shift());return o}for(var p=t;r.length;){var f=r.shift(),m=r.shift();try{p=f(p)}catch(e){m(e);break}}try{o=i(p)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},d.prototype.getUri=function(e){e=l(this.defaults,e);var t=s(e.baseURL,e.url);return a(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(l(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(l(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},648:function(e,t,n){"use strict";var r=n(867);function a(e,t,n,r,a){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}r.inherits(a,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=a.prototype,i={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){i[e]={value:e}})),Object.defineProperties(a,i),Object.defineProperty(o,"isAxiosError",{value:!0}),a.from=function(e,t,n,i,l,s){var c=Object.create(o);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),a.call(c,e.message,t,n,i,l),c.name=e.name,s&&Object.assign(c,s),c},e.exports=a},782:function(e,t,n){"use strict";var r=n(867);function a(){this.handlers=[]}a.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},97:function(e,t,n){"use strict";var r=n(793),a=n(303);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},572:function(e,t,n){"use strict";var r=n(867),a=n(527),o=n(502),i=n(546),l=n(644);function s(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new l}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},185:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function a(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:a(void 0,e[n]):a(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return a(void 0,t[e])}function l(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:a(void 0,e[n]):a(void 0,t[n])}function s(n){return n in t?a(e[n],t[n]):n in e?a(void 0,e[n]):void 0}var c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,a=t(e);r.isUndefined(a)&&t!==s||(n[e]=a)})),n}},26:function(e,t,n){"use strict";var r=n(648);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},527:function(e,t,n){"use strict";var r=n(867),a=n(546);e.exports=function(e,t,n){var o=this||a;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},546:function(e,t,n){"use strict";var r=n(867),a=n(16),o=n(648),i=n(874),l=n(675),s={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:i,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(448)),u),transformRequest:[function(e,t){if(a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,o=r.isObject(e),i=t&&t["Content-Type"];if((n=r.isFileList(e))||o&&"multipart/form-data"===i){var s=this.env&&this.env.FormData;return l(n?{"files[]":e}:e,s&&new s)}return o||"application/json"===i?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){d.headers[e]=r.merge(s)})),e.exports=d},874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:function(e){e.exports={version:"0.27.2"}},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},327:function(e,t,n){"use strict";var r=n(867);function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(a(t)+"="+a(e))})))})),o=i.join("&")}if(o){var l=e.indexOf("#");-1!==l&&(e=e.slice(0,l)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,a,o,i){var l=[];l.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),r.isString(a)&&l.push("path="+a),r.isString(o)&&l.push("domain="+o),!0===i&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},268:function(e,t,n){"use strict";var r=n(867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},985:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},623:function(e){e.exports=null},109:function(e,t,n){"use strict";var r=n(867),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,i={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(i[t]&&a.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},205:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},675:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||new FormData;var n=[];function a(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,i){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+i);n.push(o),r.forEach(o,(function(n,o){if(!r.isUndefined(n)){var l,s=i?i+"."+o:o;if(n&&!i&&"object"==typeof n)if(r.endsWith(o,"{}"))n=JSON.stringify(n);else if(r.endsWith(o,"[]")&&(l=r.toArray(n)))return void l.forEach((function(e){!r.isUndefined(e)&&t.append(s,a(e))}));e(n,s)}})),n.pop()}else t.append(i,a(o))}(e),t}},875:function(e,t,n){"use strict";var r=n(288).version,a=n(648),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,l){if(!1===e)throw new a(o(r," has been removed"+(t?" in "+t:"")),a.ERR_DEPRECATED);return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,l)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new a("options must be an object",a.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],l=t[i];if(l){var s=e[i],c=void 0===s||l(s,i,e);if(!0!==c)throw new a("option "+i+" must be "+c,a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new a("Unknown option "+i,a.ERR_BAD_OPTION)}},validators:o}},867:function(e,t,n){"use strict";var r,a=n(849),o=Object.prototype.toString,i=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function l(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function s(e){return Array.isArray(e)}function c(e){return void 0===e}var u=l("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=l("Date"),m=l("File"),h=l("Blob"),_=l("FileList");function v(e){return"[object Function]"===o.call(e)}var g=l("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}var y,w=(y="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return y&&e instanceof y});e.exports={isArray:s,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||v(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:p,isUndefined:c,isDate:f,isFile:m,isBlob:h,isFunction:v,isStream:function(e){return d(e)&&v(e.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):s(n)?t[r]=n.slice():t[r]=n}for(var r=0,a=arguments.length;r<a;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&"function"==typeof t?a(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,a,o,i={};t=t||{};do{for(a=(r=Object.getOwnPropertyNames(e)).length;a-- >0;)i[o=r[a]]||(t[o]=e[o],i[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:l,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:_}},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var l in n)r.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},679:function(e,t,n){"use strict";var r=n(864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={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},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),_=0;_<i.length;++_){var v=i[_];if(!(o[v]||r&&r[v]||h&&h[v]||l&&l[v])){var g=p(n,v);try{c(t,v,g)}catch(e){}}}}return t}},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,l,s=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(s[u]=i[u]);if(t){l=t(i);for(var d=0;d<l.length;d++)r.call(i,l[d])&&(s[l[d]]=i[l[d]])}}return s}},921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,y=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case l:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case _:case h:case s:return e;default:return t}}case a:return t}}}function E(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=_,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||w(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===_},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b||e.$$typeof===y||e.$$typeof===v)},t.typeOf=w},864:function(e,t,n){"use strict";e.exports=n(921)},941:function(e,t,n){var r=n(474),a=n(184),o=n(196),i=n(177);function l(e){return e&&e.__esModule?e.default:e}function s(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const r=e.children[n]||null;e.insertBefore(t,r)}(e.parentElement,e.element,e.oldIndex)}))}function p(e,t){const n=h(e),r={parentElement:e.from};let a=[];switch(n){case"normal":a=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":a=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...r},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...r}];break;case"multidrag":a=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...r})))}const o=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(a,t);return o}function f(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function m(e,t,n,r){const a=[...t];return e.forEach((e=>{const t=r&&n&&r(e.item,n);a.splice(e.newIndex,0,t||e.item)})),a}function h(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(e.exports,"ReactSortable",(()=>v));const _={dragging:null};class v extends o.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,o.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,_),l(i)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();l(r).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:r}=this.props,a={style:t,className:n,id:r},i=e&&null!==e?e:"div";return(0,o.createElement)(i,{ref:this.ref,...a},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const f=t||"data-id";return o.Children.map(e,((e,t)=>{if(void 0===e)return;const i=p[t]||{},{className:s}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!i.filtered},u=l(a)(s,{[n]:i.selected,[r]:i.chosen,...c});return(0,o.cloneElement)(e,{[f]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:r,tag:a,style:o,className:i,clone:l,onAdd:s,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:f,onRemove:m,onSort:h,onStart:_,onUnchoose:v,onUpdate:g,onMove:b,onSpill:y,onSelect:w,onDeselect:E,...x}=e;return x}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;const a=n(e,t,this.sortable,_);return void 0!==a&&a}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,_)}onAdd(e){const{list:t,setList:n,clone:r}=this.props,a=p(e,[..._.dragging.props.list]);u(a),n(m(a,t,e,r).map((e=>Object.assign(e,{selected:!1}))),this.sortable,_)}onRemove(e){const{list:t,setList:n}=this.props,r=h(e),a=p(e,t);d(a);let o=[...t];if("clone"!==e.pullMode)o=f(a,o);else{let t=a;switch(r){case"multidrag":t=a.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=a.map((t=>({...t,element:e.clone})));break;default:l(i)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}u(t),a.forEach((t=>{const n=t.oldIndex,r=this.props.clone(t.item,e);o.splice(n,1,r)}))}o=o.map((e=>Object.assign(e,{selected:!1}))),n(o,this.sortable,_)}onUpdate(e){const{list:t,setList:n}=this.props,r=p(e,t);return u(r),d(r),n(function(e,t){return m(e,f(e,t))}(r,t),this.sortable,_)}onStart(){_.dragging=this}onEnd(){_.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r})),this.sortable,_)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r})),this.sortable,_)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);r[n].selected=!0})),n(r,this.sortable,_)}onDeselect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(r[t].selected=!0)})),n(r,this.sortable,_)}}var g,b;g=e.exports,b={},Object.keys(b).forEach((function(e){"default"===e||"__esModule"===e||g.hasOwnProperty(e)||Object.defineProperty(g,e,{enumerable:!0,get:function(){return b[e]}})}))},251:function(e,t,n){"use strict";n(418);var r=n(196),a=60103;if("function"==typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),o("react.fragment")}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:i.current}}},893:function(e,t,n){"use strict";e.exports=n(251)},474:function(e,t,n){"use strict";function r(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return o="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},o(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:function(){return yt},Sortable:function(){return Be},Swap:function(){return ct}});var d=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=u(/Edge/i),f=u(/firefox/i),m=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),h=u(/iP(ad|od|hone)/i),_=u(/chrome/i)&&u(/android/i),v={capture:!1,passive:!1};function g(e,t,n){e.addEventListener(t,n,!d&&v)}function b(e,t,n){e.removeEventListener(t,n,!d&&v)}function y(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&y(e,t):y(e,t))||r&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var x,C=/\s+/g;function O(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(C," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(C," ")}}function S(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function j(e,t){var n="";if("string"==typeof e)n=e;else do{var r=S(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function T(e,t,n){if(e){var r=e.getElementsByTagName(t),a=0,o=r.length;if(n)for(;a<o;a++)n(r[a],a);return r}return[]}function k(){return document.scrollingElement||document.documentElement}function D(e,t,n,r,a){if(e.getBoundingClientRect||e===window){var o,i,l,s,c,u,p;if(e!==window&&e.parentNode&&e!==k()?(i=(o=e.getBoundingClientRect()).top,l=o.left,s=o.bottom,c=o.right,u=o.height,p=o.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!d))do{if(a&&a.getBoundingClientRect&&("none"!==S(a,"transform")||n&&"static"!==S(a,"position"))){var f=a.getBoundingClientRect();i-=f.top+parseInt(S(a,"border-top-width")),l-=f.left+parseInt(S(a,"border-left-width")),s=i+o.height,c=l+o.width;break}}while(a=a.parentNode);if(r&&e!==window){var m=j(a||e),h=m&&m.a,_=m&&m.d;m&&(s=(i/=_)+(u/=_),c=(l/=h)+(p/=h))}return{top:i,left:l,bottom:s,right:c,width:p,height:u}}}function N(e,t,n){for(var r=R(e,!0),a=D(e)[t];r;){var o=D(r)[n];if(!("top"===n||"left"===n?a>=o:a<=o))return r;if(r===k())break;r=R(r,!1)}return!1}function I(e,t,n,r){for(var a=0,o=0,i=e.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Be.ghost&&(r||i[o]!==Be.dragged)&&E(i[o],n.draggable,e,!1)){if(a===t)return i[o];a++}o++}return null}function F(e,t){for(var n=e.lastElementChild;n&&(n===Be.ghost||"none"===S(n,"display")||t&&!y(n,t));)n=n.previousElementSibling;return n||null}function M(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Be.clone||t&&!y(e,t)||n++;return n}function A(e){var t=0,n=0,r=k();if(e)do{var a=j(e),o=a.a,i=a.d;t+=e.scrollLeft*o,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function R(e,t){if(!e||!e.getBoundingClientRect)return k();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=S(n);if(n.clientWidth<n.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!n.getBoundingClientRect||n===document.body)return k();if(r||t)return n;r=!0}}}while(n=n.parentNode);return k()}function P(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function L(e,t){return function(){if(!x){var n=arguments,r=this;1===n.length?e.call(r,n[0]):e.apply(r,n),x=setTimeout((function(){x=void 0}),t)}}}function V(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function H(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function B(e,t){S(e,"position","absolute"),S(e,"top",t.top),S(e,"left",t.left),S(e,"width",t.width),S(e,"height",t.height)}function U(e){S(e,"position",""),S(e,"top",""),S(e,"left",""),S(e,"width",""),S(e,"height","")}var $="Sortable"+(new Date).getTime();var z=[],W={initializeByDefault:!0},q={mount:function(e){for(var t in W)W.hasOwnProperty(t)&&!(t in e)&&(e[t]=W[t]);z.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),z.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";z.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](a({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](a({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var a in z.forEach((function(r){var a=r.pluginName;if(e.options[a]||r.initializeByDefault){var o=new r(e,t,e.options);o.sortable=e,o.options=e.options,e[a]=o,l(n,o.defaults)}})),e.options)if(e.options.hasOwnProperty(a)){var o=this.modifyOption(e,a,e.options[a]);void 0!==o&&(e.options[a]=o)}},getEventProperties:function(e,t){var n={};return z.forEach((function(r){"function"==typeof r.eventProperties&&l(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return z.forEach((function(a){e[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[t]&&(r=a.optionListeners[t].call(e[a.pluginName],n))})),r}};function G(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,i=e.cloneEl,l=e.toEl,s=e.fromEl,c=e.oldIndex,u=e.newIndex,f=e.oldDraggableIndex,m=e.newDraggableIndex,h=e.originalEvent,_=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[$]){var g,b=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||d||p?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=l||n,g.from=s||n,g.item=o||n,g.clone=i,g.oldIndex=c,g.newIndex=u,g.oldDraggableIndex=f,g.newDraggableIndex=m,g.originalEvent=h,g.pullMode=_?_.lastPutMode:void 0;var w=a(a({},v),q.getEventProperties(r,t));for(var E in w)g[E]=w[E];n&&n.dispatchEvent(g),b[y]&&b[y].call(t,g)}}var Y=["evt"],X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=s(n,Y);q.pluginEvent.bind(Be)(e,t,a({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:re,cloneHidden:ae,dragStarted:ve,putSortable:ue,activeSortable:Be.active,originalEvent:r,oldIndex:oe,oldDraggableIndex:le,newIndex:ie,newDraggableIndex:se,hideGhostForTarget:Pe,unhideGhostForTarget:Le,cloneNowHidden:function(){ae=!0},cloneNowShown:function(){ae=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:r})}},o))};function K(e){G(a({putSortable:ue,cloneEl:re,targetEl:Z,rootEl:ee,oldIndex:oe,oldDraggableIndex:le,newIndex:ie,newDraggableIndex:se},e))}var Z,J,Q,ee,te,ne,re,ae,oe,ie,le,se,ce,ue,de,pe,fe,me,he,_e,ve,ge,be,ye,we,Ee=!1,xe=!1,Ce=[],Oe=!1,Se=!1,je=[],Te=!1,ke=[],De="undefined"!=typeof document,Ne=h,Ie=p||d?"cssFloat":"float",Fe=De&&!_&&!h&&"draggable"in document.createElement("div"),Me=function(){if(De){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ae=function(e,t){var n=S(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=I(e,0,t),o=I(e,1,t),i=a&&S(a),l=o&&S(o),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+D(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+D(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!o||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=r&&"none"===n[Ie]||o&&"none"===n[Ie]&&s+c>r)?"vertical":"horizontal"},Re=function(e){function t(e,n){return function(r,a,o,i){var l=r.options.group.name&&a.options.group.name&&r.options.group.name===a.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,a,o,i),n)(r,a,o,i);var s=(n?r:a).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},r=e.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Pe=function(){!Me&&Q&&S(Q,"display","none")},Le=function(){!Me&&Q&&S(Q,"display","")};De&&!_&&document.addEventListener("click",(function(e){if(xe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xe=!1,!1}),!0);var Ve=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(a=e.clientX,o=e.clientY,Ce.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!F(e)){var n=D(e),r=a>=n.left-t&&a<=n.right+t,l=o>=n.top-t&&o<=n.bottom+t;return r&&l?i=e:void 0}})),i);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var a,o,i},He=function(e){Z&&Z.parentNode[$]._isOutsideThisEl(e.target)};function Be(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=l({},t),e[$]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ae(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Be.supportPointer&&"PointerEvent"in window&&!m,emptyInsertThreshold:5};for(var i in q.initializePlugins(this,e,o),o)!(i in t)&&(t[i]=o[i]);for(var s in Re(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Fe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?g(e,"pointerdown",this._onTapStart):(g(e,"mousedown",this._onTapStart),g(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(e,"dragover",this),g(e,"dragenter",this)),Ce.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),l(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==S(e,"display")&&e!==Be.ghost){r.push({target:e,rect:D(e)});var t=a({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=j(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var a=!1,o=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,l=D(r),s=r.prevFromRect,c=r.prevToRect,u=e.rect,d=j(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&P(s,l)&&!P(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(u,s,c,t.options)),P(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=t.options.animation),t.animate(r,u,l,n)),n&&(a=!0,o=Math.max(o,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),a?n=setTimeout((function(){"function"==typeof e&&e()}),o):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){S(e,"transition",""),S(e,"transform","");var a=j(this.el),o=a&&a.a,i=a&&a.d,l=(t.left-n.left)/(o||1),s=(t.top-n.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,S(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),S(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),S(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){S(e,"transition",""),S(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function Ue(e,t,n,r,a,o,i,l){var s,c,u=e[$],f=u.options.onMove;return!window.CustomEvent||d||p?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=r,s.related=a||t,s.relatedRect=o||D(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),f&&(c=f.call(u,s,i)),c}function $e(e){e.draggable=!1}function ze(){Te=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function qe(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}Be.prototype={constructor:Be,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ge=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,a=r.preventOnFilter,o=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=r.filter;if(function(e){ke.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&ke.push(r)}}(n),!Z&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!m||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=E(l,r.draggable,n,!1))&&l.animated||ne===l)){if(oe=M(l),le=M(l,r.draggable),"function"==typeof c){if(c.call(this,e,l,this))return K({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),X("filter",t,{evt:e}),void(a&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=E(s,r.trim(),n,!1))return K({sortable:t,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),X("filter",t,{evt:e}),!0}))))return void(a&&e.cancelable&&e.preventDefault());r.handle&&!E(s,r.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var r,a=this,o=a.el,i=a.options,l=o.ownerDocument;if(n&&!Z&&n.parentNode===o){var s=D(n);if(ee=o,J=(Z=n).parentNode,te=Z.nextSibling,ne=n,ce=i.group,Be.dragged=Z,de={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},he=de.clientX-s.left,_e=de.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",r=function(){X("delayEnded",a,{evt:e}),Be.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!f&&a.nativeDraggable&&(Z.draggable=!0),a._triggerDragStart(e,t),K({sortable:a,name:"choose",originalEvent:e}),O(Z,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){T(Z,e.trim(),$e)})),g(l,"dragover",Ve),g(l,"mousemove",Ve),g(l,"touchmove",Ve),g(l,"mouseup",a._onDrop),g(l,"touchend",a._onDrop),g(l,"touchcancel",a._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),X("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(p||d))r();else{if(Be.eventCanceled)return void this._onDrop();g(l,"mouseup",a._disableDelayedDrag),g(l,"touchend",a._disableDelayedDrag),g(l,"touchcancel",a._disableDelayedDrag),g(l,"mousemove",a._delayedDragTouchMoveHandler),g(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&g(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&$e(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,t?"touchmove":"mousemove",this._onTouchMove):(g(Z,"dragend",this),g(ee,"dragstart",this._onDragStart));try{document.selection?qe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Ee=!1,ee&&Z){X("dragStarted",this,{evt:t}),this.nativeDraggable&&g(document,"dragover",He);var n=this.options;!e&&O(Z,n.dragClass,!1),O(Z,n.ghostClass,!0),Be.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Pe();for(var e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==t;)t=e;if(Z.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Le()}},_onTouchMove:function(e){if(de){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,a=e.touches?e.touches[0]:e,o=Q&&j(Q,!0),i=Q&&o&&o.a,l=Q&&o&&o.d,s=Ne&&we&&A(we),c=(a.clientX-de.clientX+r.x)/(i||1)+(s?s[0]-je[0]:0)/(i||1),u=(a.clientY-de.clientY+r.y)/(l||1)+(s?s[1]-je[1]:0)/(l||1);if(!Be.active&&!Ee){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Q){o?(o.e+=c-(fe||0),o.f+=u-(me||0)):o={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");S(Q,"webkitTransform",d),S(Q,"mozTransform",d),S(Q,"msTransform",d),S(Q,"transform",d),fe=c,me=u,pe=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,t=D(Z,!0,Ne,!0,e),n=this.options;if(Ne){for(we=e;"static"===S(we,"position")&&"none"===S(we,"transform")&&we!==document;)we=we.parentNode;we!==document.body&&we!==document.documentElement?(we===document&&(we=k()),t.top+=we.scrollTop,t.left+=we.scrollLeft):we=k(),je=A(we)}O(Q=Z.cloneNode(!0),n.ghostClass,!1),O(Q,n.fallbackClass,!0),O(Q,n.dragClass,!0),S(Q,"transition",""),S(Q,"transform",""),S(Q,"box-sizing","border-box"),S(Q,"margin",0),S(Q,"top",t.top),S(Q,"left",t.left),S(Q,"width",t.width),S(Q,"height",t.height),S(Q,"opacity","0.8"),S(Q,"position",Ne?"absolute":"fixed"),S(Q,"zIndex","100000"),S(Q,"pointerEvents","none"),Be.ghost=Q,e.appendChild(Q),S(Q,"transform-origin",he/parseInt(Q.style.width)*100+"% "+_e/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,a=n.options;X("dragStart",this,{evt:e}),Be.eventCanceled?this._onDrop():(X("setupClone",this),Be.eventCanceled||((re=H(Z)).removeAttribute("id"),re.draggable=!1,re.style["will-change"]="",this._hideClone(),O(re,this.options.chosenClass,!1),Be.clone=re),n.cloneId=qe((function(){X("clone",n),Be.eventCanceled||(n.options.removeCloneOnHide||ee.insertBefore(re,Z),n._hideClone(),K({sortable:n,name:"clone"}))})),!t&&O(Z,a.dragClass,!0),t?(xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(b(document,"mouseup",n._onDrop),b(document,"touchend",n._onDrop),b(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(n,r,Z)),g(document,"drop",n),S(Z,"transform","translateZ(0)")),Ee=!0,n._dragStartId=qe(n._dragStarted.bind(n,t,e)),g(document,"selectstart",n),ve=!0,m&&S(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,l=e.target,s=this.options,c=s.group,u=Be.active,d=ce===c,p=s.sort,f=ue||u,m=this,h=!1;if(!Te){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=E(l,s.draggable,i,!0),L("dragOver"),Be.eventCanceled)return h;if(Z.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||m._ignoreWhileAnimating===l)return B(!1);if(xe=!1,u&&!s.disabled&&(d?p||(r=J!==ee):ue===this||(this.lastPutMode=ce.checkPull(this,u,Z,e))&&c.checkPut(this,u,Z,e))){if(o="vertical"===this._getDirection(e,l),t=D(Z),L("dragOverValid"),Be.eventCanceled)return h;if(r)return J=ee,H(),this._hideClone(),L("revert"),Be.eventCanceled||(te?ee.insertBefore(Z,te):ee.appendChild(Z)),B(!0);var _=F(i,s.draggable);if(!_||function(e,t,n){var r=D(F(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,o,this)&&!_.animated){if(_===Z)return B(!1);if(_&&i===e.target&&(l=_),l&&(n=D(l)),!1!==Ue(ee,i,Z,t,l,n,e,!!l))return H(),_&&_.nextSibling?i.insertBefore(Z,_.nextSibling):i.appendChild(Z),J=i,U(),B(!0)}else if(_&&function(e,t,n){var r=D(I(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,o,this)){var v=I(i,0,s,!0);if(v===Z)return B(!1);if(n=D(l=v),!1!==Ue(ee,i,Z,t,l,n,e,!1))return H(),i.insertBefore(Z,v),J=i,U(),B(!0)}else if(l.parentNode===i){n=D(l);var g,b,y,w=Z.parentNode!==i,x=!function(e,t,n){var r=n?e.left:e.top,a=n?e.right:e.bottom,o=n?e.width:e.height,i=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return r===i||a===l||r+o/2===i+s/2}(Z.animated&&Z.toRect||t,l.animated&&l.toRect||n,o),C=o?"top":"left",j=N(l,"top","top")||N(Z,"top","top"),T=j?j.scrollTop:void 0;if(ge!==l&&(b=n[C],Oe=!1,Se=!x&&s.invertSwap||w),g=function(e,t,n,r,a,o,i,l){var s=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!i)if(l&&ye<c*a){if(!Oe&&(1===be?s>u+c*o/2:s<d-c*o/2)&&(Oe=!0),Oe)p=!0;else if(1===be?s<u+ye:s>d-ye)return-be}else if(s>u+c*(1-a)/2&&s<d-c*(1-a)/2)return function(e){return M(Z)<M(e)?1:-1}(t);return(p=p||i)&&(s<u+c*o/2||s>d-c*o/2)?s>u+c/2?1:-1:0}(e,l,n,o,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Se,ge===l),0!==g){var k=M(Z);do{k-=g,y=J.children[k]}while(y&&("none"===S(y,"display")||y===Q))}if(0===g||y===l)return B(!1);ge=l,be=g;var A=l.nextElementSibling,R=!1,P=Ue(ee,i,Z,t,l,n,e,R=1===g);if(!1!==P)return 1!==P&&-1!==P||(R=1===P),Te=!0,setTimeout(ze,30),H(),R&&!A?i.appendChild(Z):l.parentNode.insertBefore(Z,R?A:l),j&&V(j,0,T-j.scrollTop),J=Z.parentNode,void 0===b||Se||(ye=Math.abs(b-D(l)[C])),U(),B(!0)}if(i.contains(Z))return B(!1)}return!1}function L(s,c){X(s,m,a({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:l,completed:B,onMove:function(n,r){return Ue(ee,i,Z,t,n,D(n),e,r)},changed:U},c))}function H(){L("dragOverAnimationCapture"),m.captureAnimationState(),m!==f&&f.captureAnimationState()}function B(t){return L("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(m),m!==f&&(O(Z,ue?ue.options.ghostClass:u.options.ghostClass,!1),O(Z,s.ghostClass,!0)),ue!==m&&m!==Be.active?ue=m:m===Be.active&&ue&&(ue=null),f===m&&(m._ignoreWhileAnimating=l),m.animateAll((function(){L("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===Z&&!Z.animated||l===i&&!l.animated)&&(ge=null),s.dragoverBubble||e.rootEl||l===document||(Z.parentNode[$]._isOutsideThisEl(e.target),!t&&Ve(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function U(){ie=M(Z),se=M(Z,s.draggable),K({sortable:m,name:"change",toEl:i,newIndex:ie,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Ve),b(document,"mousemove",Ve),b(document,"touchmove",Ve)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ie=M(Z),se=M(Z,n.draggable),X("drop",this,{evt:e}),J=Z&&Z.parentNode,ie=M(Z),se=M(Z,n.draggable),Be.eventCanceled||(Ee=!1,Se=!1,Oe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&S(document.body,"user-select",""),S(Z,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===J||ue&&"clone"!==ue.lastPutMode)&&re&&re.parentNode&&re.parentNode.removeChild(re),Z&&(this.nativeDraggable&&b(Z,"dragend",this),$e(Z),Z.style["will-change"]="",ve&&!Ee&&O(Z,ue?ue.options.ghostClass:this.options.ghostClass,!1),O(Z,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==J?(ie>=0&&(K({rootEl:J,name:"add",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"remove",toEl:J,originalEvent:e}),K({rootEl:J,name:"sort",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),ue&&ue.save()):ie!==oe&&ie>=0&&(K({sortable:this,name:"update",toEl:J,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),Be.active&&(null!=ie&&-1!==ie||(ie=oe,se=le),K({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),ee=Z=J=Q=te=re=ne=ae=de=pe=ve=ie=se=oe=le=ge=be=ue=ce=Be.dragged=Be.ghost=Be.clone=Be.active=null,ke.forEach((function(e){e.checked=!0})),ke.length=fe=me=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,a=n.length,o=this.options;r<a;r++)E(e=n[r],o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||We(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var a=r.children[t];E(a,this.options.draggable,r,!1)&&(n[e]=a)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return E(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=q.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Re(n)},destroy:function(){X("destroy",this);var e=this.el;e[$]=null,b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart),b(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ce.splice(Ce.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ae){if(X("hideClone",this),Be.eventCanceled)return;S(re,"display","none"),this.options.removeCloneOnHide&&re.parentNode&&re.parentNode.removeChild(re),ae=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ae){if(X("showClone",this),Be.eventCanceled)return;Z.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(re,te):ee.appendChild(re):ee.insertBefore(re,Z),this.options.group.revertClone&&this.animate(Z,re),S(re,"display",""),ae=!1}}else this._hideClone()}},De&&g(document,"touchmove",(function(e){(Be.active||Ee)&&e.cancelable&&e.preventDefault()})),Be.utils={on:g,off:b,css:S,find:T,is:function(e,t){return!!E(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:L,closest:E,toggleClass:O,clone:H,index:M,nextTick:qe,cancelNextTick:Ge,detectDirection:Ae,getChild:I},Be.get=function(e){return e[$]},Be.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Be.utils=a(a({},Be.utils),e.utils)),q.mount(e)}))},Be.create=function(e,t){return new Be(e,t)},Be.version="1.15.0";var Ye,Xe,Ke,Ze,Je,Qe,et=[],tt=!1;function nt(){et.forEach((function(e){clearInterval(e.pid)})),et=[]}function rt(){clearInterval(Qe)}var at,ot=L((function(e,t,n,r){if(t.scroll){var a,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=k(),u=!1;Xe!==n&&(Xe=n,nt(),Ye=t.scroll,a=t.scrollFn,!0===Ye&&(Ye=R(n,!0)));var d=0,p=Ye;do{var f=p,m=D(f),h=m.top,_=m.bottom,v=m.left,g=m.right,b=m.width,y=m.height,w=void 0,E=void 0,x=f.scrollWidth,C=f.scrollHeight,O=S(f),j=f.scrollLeft,T=f.scrollTop;f===c?(w=b<x&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),E=y<C&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(w=b<x&&("auto"===O.overflowX||"scroll"===O.overflowX),E=y<C&&("auto"===O.overflowY||"scroll"===O.overflowY));var N=w&&(Math.abs(g-o)<=l&&j+b<x)-(Math.abs(v-o)<=l&&!!j),I=E&&(Math.abs(_-i)<=l&&T+y<C)-(Math.abs(h-i)<=l&&!!T);if(!et[d])for(var F=0;F<=d;F++)et[F]||(et[F]={});et[d].vx==N&&et[d].vy==I&&et[d].el===f||(et[d].el=f,et[d].vx=N,et[d].vy=I,clearInterval(et[d].pid),0==N&&0==I||(u=!0,et[d].pid=setInterval(function(){r&&0===this.layer&&Be.active._onTouchMove(Je);var t=et[this.layer].vy?et[this.layer].vy*s:0,n=et[this.layer].vx?et[this.layer].vx*s:0;"function"==typeof a&&"continue"!==a.call(Be.dragged.parentNode[$],n,t,e,Je,et[this.layer].el)||V(et[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=R(p,!1)));tt=u}}),30),it=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,a=e.activeSortable,o=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||a;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function lt(){}function st(){}function ct(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;at=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,a=e.activeSortable,o=e.changed,i=e.cancel;if(a.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=at;!1!==r(n)?(O(n,s.swapClass,!0),at=n):at=null,c&&c!==at&&O(c,s.swapClass,!1)}o(),t(!0),i()}},drop:function(e){var t,n,r,a,o,i,l=e.activeSortable,s=e.putSortable,c=e.dragEl,u=s||this.sortable,d=this.options;at&&O(at,d.swapClass,!1),at&&(d.swap||s&&s.options.swap)&&c!==at&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),n=at,o=(t=c).parentNode,i=n.parentNode,o&&i&&!o.isEqualNode(n)&&!i.isEqualNode(t)&&(r=M(t),a=M(n),o.isEqualNode(i)&&r<a&&a++,o.insertBefore(n,o.children[r]),i.insertBefore(t,i.children[a])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){at=null}},l(e,{pluginName:"swap",eventProperties:function(){return{swapItem:at}}})}lt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=I(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:it},l(lt,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:it},l(st,{pluginName:"removeOnSpill"});var ut,dt,pt,ft,mt,ht=[],_t=[],vt=!1,gt=!1,bt=!1;function yt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?g(document,"pointerup",this._deselectMultiDrag):(g(document,"mouseup",this._deselectMultiDrag),g(document,"touchend",this._deselectMultiDrag))),g(document,"keydown",this._checkKeyDown),g(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var r="";ht.length&&dt===e?ht.forEach((function(e,t){r+=(t?", ":"")+e.textContent})):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;pt=t},delayEnded:function(){this.isMultiDrag=~ht.indexOf(pt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<ht.length;r++)_t.push(H(ht[r])),_t[r].sortableIndex=ht[r].sortableIndex,_t[r].draggable=!1,_t[r].style["will-change"]="",O(_t[r],this.options.selectedClass,!1),ht[r]===pt&&O(_t[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,a=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ht.length&&dt===t&&(wt(!0,n),r("clone"),a()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(wt(!1,n),_t.forEach((function(e){S(e,"display","")})),t(),mt=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(_t.forEach((function(e){S(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),mt=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&dt&&dt.multiDrag._deselectMultiDrag(),ht.forEach((function(e){e.sortableIndex=M(e)})),ht=ht.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),bt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ht.forEach((function(e){e!==pt&&S(e,"position","absolute")}));var r=D(pt,!1,!0,!0);ht.forEach((function(e){e!==pt&&B(e,r)})),gt=!0,vt=!0}n.animateAll((function(){gt=!1,vt=!1,t.options.animation&&ht.forEach((function(e){U(e)})),t.options.sort&&Et()}))}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;gt&&~ht.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,a=e.dragRect;ht.length>1&&(ht.forEach((function(e){r.addAnimationState({target:e,rect:gt?D(e):a}),U(e),e.fromRect=a,t.removeAnimationState(e)})),gt=!1,function(e,t){ht.forEach((function(n,r){var a=t.children[n.sortableIndex+(e?Number(r):0)];a?t.insertBefore(n,a):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,a=e.activeSortable,o=e.parentEl,i=e.putSortable,l=this.options;if(r){if(n&&a._hideClone(),vt=!1,l.animation&&ht.length>1&&(gt||!n&&!a.options.sort&&!i)){var s=D(pt,!1,!0,!0);ht.forEach((function(e){e!==pt&&(B(e,s),o.appendChild(e))})),gt=!0}if(!n)if(gt||Et(),ht.length>1){var c=mt;a._showClone(t),a.options.animation&&!mt&&c&&_t.forEach((function(e){a.addAnimationState({target:e,rect:ft}),e.fromRect=ft,e.thisAnimationDuration=null}))}else a._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(ht.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ft=l({},t);var a=j(pt,!0);ft.top-=a.f,ft.left-=a.e}},dragOverAnimationComplete:function(){gt&&(gt=!1,Et())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,a=e.sortable,o=e.dispatchSortableEvent,i=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=r.children;if(!bt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),O(pt,c.selectedClass,!~ht.indexOf(pt)),~ht.indexOf(pt))ht.splice(ht.indexOf(pt),1),ut=null,G({sortable:a,rootEl:n,name:"deselect",targetEl:pt,originalEvent:t});else{if(ht.push(pt),G({sortable:a,rootEl:n,name:"select",targetEl:pt,originalEvent:t}),t.shiftKey&&ut&&a.el.contains(ut)){var d,p,f=M(ut),m=M(pt);if(~f&&~m&&f!==m)for(m>f?(p=f,d=m):(p=m,d=f+1);p<d;p++)~ht.indexOf(u[p])||(O(u[p],c.selectedClass,!0),ht.push(u[p]),G({sortable:a,rootEl:n,name:"select",targetEl:u[p],originalEvent:t}))}else ut=pt;dt=s}if(bt&&this.isMultiDrag){if(gt=!1,(r[$].options.sort||r!==n)&&ht.length>1){var h=D(pt),_=M(pt,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(pt.thisAnimationDuration=null),s.captureAnimationState(),!vt&&(c.animation&&(pt.fromRect=h,ht.forEach((function(e){if(e.thisAnimationDuration=null,e!==pt){var t=gt?D(e):h;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),Et(),ht.forEach((function(e){u[_]?r.insertBefore(e,u[_]):r.appendChild(e),_++})),i===M(pt))){var v=!1;ht.forEach((function(e){e.sortableIndex===M(e)||(v=!0)})),v&&o("update")}ht.forEach((function(e){U(e)})),s.animateAll()}dt=s}(n===r||l&&"clone"!==l.lastPutMode)&&_t.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=bt=!1,_t.length=0},destroyGlobal:function(){this._deselectMultiDrag(),b(document,"pointerup",this._deselectMultiDrag),b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==bt&&bt||dt!==this.sortable||e&&E(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;ht.length;){var t=ht[0];O(t,this.options.selectedClass,!1),ht.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[$];t&&t.options.multiDrag&&!~ht.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),O(e,t.options.selectedClass,!0),ht.push(e))},deselect:function(e){var t=e.parentNode[$],n=ht.indexOf(e);t&&t.options.multiDrag&&~n&&(O(e,t.options.selectedClass,!1),ht.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return ht.forEach((function(e){var a;n.push({multiDragElement:e,index:e.sortableIndex}),a=gt&&e!==pt?-1:gt?M(e,":not(."+t.options.selectedClass+")"):M(e),r.push({multiDragElement:e,index:a})})),{items:(e=ht,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(_t),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function wt(e,t){_t.forEach((function(n,r){var a=t.children[n.sortableIndex+(e?Number(r):0)];a?t.insertBefore(n,a):t.appendChild(n)}))}function Et(){ht.forEach((function(e){e!==pt&&e.parentNode&&e.parentNode.removeChild(e)}))}Be.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):this.options.supportPointer?g(document,"pointermove",this._handleFallbackAutoScroll):t.touches?g(document,"touchmove",this._handleFallbackAutoScroll):g(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),rt(),nt(),clearTimeout(x),x=void 0},nulling:function(){Je=Xe=Ye=tt=Qe=Ke=Ze=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=document.elementFromPoint(r,a);if(Je=e,t||this.options.forceAutoScrollFallback||p||d||m){ot(e,this.options,o,t);var i=R(o,!0);!tt||Qe&&r===Ke&&a===Ze||(Qe&&rt(),Qe=setInterval((function(){var o=R(document.elementFromPoint(r,a),!0);o!==i&&(i=o,nt()),ot(e,n.options,o,t)}),10),Ke=r,Ze=a)}else{if(!this.options.bubbleScroll||R(o,!0)===k())return void nt();ot(e,this.options,R(o,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),Be.mount(st,lt),t.default=Be},177:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r}});function r(e,t){if(!e)throw new Error("Invariant failed")}},196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=window.wp.element;const t={isLoading:!0,isDirty:!1,title:wcapf_admin_params.form_data.post_title,formId:wcapf_admin_params.form_data.post_id,filterKeys:[],currentTab:"filters",addFilterIndex:1,filterStates:{},formFilters:[],formSettings:{},saveError:"",showReviewNotice:wcapf_admin_params.show_review_notice_for_milestone_achieved};var r=(e,t)=>{switch(t.type){case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_DIRTY":return{...e,isDirty:t.payload};case"SET_TITLE":return{...e,title:t.payload};case"SET_FORM_ID":return{...e,formId:t.payload};case"SET_FILTER_KEYS":return{...e,filterKeys:t.payload};case"SET_CURRENT_TAB":return{...e,currentTab:t.payload};case"INCREMENT_ADD_FILTER_INDEX":return{...e,addFilterIndex:e.addFilterIndex+1};case"SET_FILTER_STATES":return{...e,filterStates:t.payload};case"SET_FORM_FILTERS":return{...e,formFilters:t.payload};case"SET_FORM_SETTINGS":return{...e,formSettings:t.payload};case"SET_ERROR":return{...e,saveError:t.payload};case"SET_SHOW_REVIEW_NOTICE":return{...e,showReviewNotice:t.payload};default:return e}};const a=(0,e.createContext)(t),o=n=>{let{children:o}=n;const[i,l]=(0,e.useReducer)(r,t);return(0,e.createElement)(a.Provider,{value:{state:i,dispatch:l}},o)},i=()=>{const t=(0,e.useContext)(a);if(void 0===t)throw new Error("useForm must be used within a FormProvider");return t};var l=n(669),s=n.n(l),c=window.lodash,u=window.wp.i18n,d=window.wp.components;(0,e.createElement)("svg",{viewBox:"0 0 48 48"},(0,e.createElement)("path",{d:"M16.1161 39.6339C15.628 39.1457 15.628 38.3543 16.1161 37.8661L29.9822 24L16.1161 10.1339C15.628 9.64573 15.628 8.85427 16.1161 8.36612C16.6043 7.87796 17.3957 7.87796 17.8839 8.36612L32.6339 23.1161C33.122 23.6043 33.122 24.3957 32.6339 24.8839L17.8839 39.6339C17.3957 40.122 16.6043 40.122 16.1161 39.6339Z"})),(0,e.createElement)("svg",{viewBox:"0 0 256 256"},(0,e.createElement)("path",{d:"M215.99609,52H172V40a20.0226,20.0226,0,0,0-20-20H104A20.0226,20.0226,0,0,0,84,40V52H39.99609a4,4,0,0,0,0,8h12V208a12.01375,12.01375,0,0,0,12,12h128a12.01375,12.01375,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12.01375,12.01375,0,0,1,12-12h48a12.01375,12.01375,0,0,1,12,12V52H92ZM195.99609,208a4.00458,4.00458,0,0,1-4,4h-128a4.00458,4.00458,0,0,1-4-4V60h136ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"})),(0,e.createElement)("svg",{viewBox:"0 0 16 16"},(0,e.createElement)("path",{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"})),(0,e.createElement)("svg",{viewBox:"0 0 255.99316 255.99316"},(0,e.createElement)("path",{d:"M219.99268,39.99414v144.001a4,4,0,0,1-8,0V43.99414H71.98584a4,4,0,0,1,0-8H215.99268A4.0002,4.0002,0,0,1,219.99268,39.99414Zm-32,32.001v144a4.0002,4.0002,0,0,1-4,4H39.98584a4.0002,4.0002,0,0,1-4-4v-144a4.0002,4.0002,0,0,1,4-4H183.99268A4.0002,4.0002,0,0,1,187.99268,71.99512Zm-8,4H43.98584v136H179.99268Z"}));const p=(0,e.createElement)("svg",{viewBox:"0 0 512.006 512.006"},(0,e.createElement)("path",{d:"M388.419,475.59L168.834,256.005L388.418,36.421c8.341-8.341,8.341-21.824,0-30.165s-21.824-8.341-30.165,0    L123.586,240.923c-8.341,8.341-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251    c5.461,0,10.923-2.091,15.083-6.251C396.76,497.414,396.76,483.931,388.419,475.59z"})),f=(0,e.createElement)("svg",{viewBox:"0 0 21 21"},(0,e.createElement)("g",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(4 3)"},(0,e.createElement)("path",{d:"m6.5 11.5-3-3 3-3"}),(0,e.createElement)("path",{d:"m3.5 8.5h11"}),(0,e.createElement)("path",{d:"m12.5 6.5v-4.00491374c0-.51283735-.3860402-.93550867-.8833789-.99327378l-.1190802-.00672622-1.9975409.00491374m-6 0-1.99754087-.00492752c-.51283429-.00124584-.93645365.38375378-.99544161.88094891l-.00701752.11906329v10.99753792c.00061497.5520447.44795562.9996604 1 1.0006148l10 .0061554c.5128356.0008784.9357441-.3848611.993815-.8821612l.006185-.1172316v-2.5"}),(0,e.createElement)("path",{d:"m4.5.5h4c.55228475 0 1 .44771525 1 1s-.44771525 1-1 1h-4c-.55228475 0-1-.44771525-1-1s.44771525-1 1-1z"}))),m=(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("path",{id:"Diamond",d:"M63.6870499,18.5730648L48.7831497,4.278266c-0.1855011-0.1758003-0.4316025-0.4813001-0.6870003-0.4813001 H15.9037514c-0.2553005,0-0.5014,0.3054998-0.6870003,0.4813001l-14.9038,14.1908998 c-0.374,0.3535004-0.4184,0.9855995-0.1025,1.3917999c0.21,0.2703991,30.8237991,39.7256012,31.0517006,39.9812012 c0.1022987,0.1149979,0.2402992,0.2215996,0.3428001,0.266098c0.2763996,0.1206017,0.5077,0.1296997,0.7900982,0.0065002 c0.1025009-0.0444984,0.2404022-0.1348991,0.3428001-0.2499008c0.0151024-0.0168991,0.0377007-0.0224991,0.0517006-0.0404968 L63.789547,19.9121666C64.1054459,19.5058651,64.0610504,18.9265652,63.6870499,18.5730648z M15.6273508,6.4344659 l4.9945002,11.3625011H3.6061509L15.6273508,6.4344659z M24.0795517,17.7969666l7.9203987-11.2617006l7.9204979,11.2617006 H24.0795517z M40.7191467,19.7969666l-8.7191963,34.8769989l-8.719099-34.8769989H40.7191467z M33.9257507,5.7969656h12.5423012 l-4.8240013,10.9746008L33.9257507,5.7969656z M22.3559513,16.7715664L17.53195,5.7969656h12.5423012L22.3559513,16.7715664z M21.2191505,19.7969666l8.6596012,34.638401L2.975451,19.7969666H21.2191505z M42.7808495,19.7969666h18.2436981 l-26.9032974,34.638401L42.7808495,19.7969666z M43.3781471,17.7969666l4.9944992-11.3625011l12.0212021,11.3625011H43.3781471z"})),h=((0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,e.createElement)("svg",{viewBox:"0 0 492 492"},(0,e.createElement)("path",{d:"M465.064,207.566l0.028,0H284.436V27.25c0-14.84-12.016-27.248-26.856-27.248h-23.116 c-14.836,0-26.904,12.408-26.904,27.248v180.316H26.908c-14.832,0-26.908,12-26.908,26.844v23.248 c0,14.832,12.072,26.78,26.908,26.78h180.656v180.968c0,14.832,12.064,26.592,26.904,26.592h23.116 c14.84,0,26.856-11.764,26.856-26.592V284.438h180.624c14.84,0,26.936-11.952,26.936-26.78V234.41 C492,219.566,479.904,207.566,465.064,207.566z"})),(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M3 5.75C3 4.23122 4.23122 3 5.75 3H15.7145C16.5764 3 17.4031 3.34241 18.0126 3.9519L20.0481 5.98744C20.6576 6.59693 21 7.42358 21 8.28553V18.25C21 19.7688 19.7688 21 18.25 21H5.75C4.23122 21 3 19.7688 3 18.25V5.75ZM5.75 4.5C5.05964 4.5 4.5 5.05964 4.5 5.75V18.25C4.5 18.9404 5.05964 19.5 5.75 19.5H6V14.25C6 13.0074 7.00736 12 8.25 12H15.75C16.9926 12 18 13.0074 18 14.25V19.5H18.25C18.9404 19.5 19.5 18.9404 19.5 18.25V8.28553C19.5 7.8214 19.3156 7.37629 18.9874 7.0481L16.9519 5.01256C16.6918 4.75246 16.3582 4.58269 16 4.52344V7.25C16 8.49264 14.9926 9.5 13.75 9.5H9.25C8.00736 9.5 7 8.49264 7 7.25V4.5H5.75ZM16.5 19.5V14.25C16.5 13.8358 16.1642 13.5 15.75 13.5H8.25C7.83579 13.5 7.5 13.8358 7.5 14.25V19.5H16.5ZM8.5 4.5V7.25C8.5 7.66421 8.83579 8 9.25 8H13.75C14.1642 8 14.5 7.66421 14.5 7.25V4.5H8.5Z"})),(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M16.4 19.62H6.39999C5.40543 19.62 4.4516 19.2249 3.74834 18.5216C3.04508 17.8184 2.64999 16.8646 2.64999 15.87V13.37C2.64999 13.1711 2.72901 12.9803 2.86966 12.8397C3.01032 12.699 3.20108 12.62 3.39999 12.62C3.59891 12.62 3.78967 12.699 3.93032 12.8397C4.07098 12.9803 4.14999 13.1711 4.14999 13.37V15.87C4.14999 16.4667 4.38705 17.039 4.809 17.461C5.23096 17.8829 5.80326 18.12 6.39999 18.12H16.4C16.9967 18.12 17.569 17.8829 17.991 17.461C18.4129 17.039 18.65 16.4667 18.65 15.87V13.37C18.65 13.1711 18.729 12.9803 18.8697 12.8397C19.0103 12.699 19.2011 12.62 19.4 12.62C19.5989 12.62 19.7897 12.699 19.9303 12.8397C20.071 12.9803 20.15 13.1711 20.15 13.37V15.87C20.15 16.8646 19.7549 17.8184 19.0516 18.5216C18.3484 19.2249 17.3946 19.62 16.4 19.62Z"}),(0,e.createElement)("path",{d:"M11.4 14.88C11.2011 14.88 11.0103 14.801 10.8697 14.6603C10.729 14.5197 10.65 14.3289 10.65 14.13V5.13C10.65 4.93109 10.729 4.74033 10.8697 4.59967C11.0103 4.45902 11.2011 4.38 11.4 4.38C11.5989 4.38 11.7897 4.45902 11.9303 4.59967C12.071 4.74033 12.15 4.93109 12.15 5.13V14.13C12.1474 14.3281 12.0676 14.5174 11.9275 14.6575C11.7874 14.7976 11.5981 14.8774 11.4 14.88Z"}),(0,e.createElement)("path",{d:"M11.4 16.12C11.3014 16.121 11.2036 16.1021 11.1125 16.0643C11.0214 16.0265 10.9389 15.9706 10.87 15.9L6.63 11.66C6.55925 11.5911 6.50301 11.5086 6.46461 11.4176C6.42621 11.3266 6.40643 11.2288 6.40643 11.13C6.40643 11.0312 6.42621 10.9334 6.46461 10.8424C6.50301 10.7514 6.55925 10.669 6.63 10.6C6.77063 10.4596 6.96125 10.3807 7.16 10.3807C7.35875 10.3807 7.54938 10.4596 7.69 10.6L11.4 14.31L15.11 10.6C15.1787 10.5263 15.2615 10.4672 15.3535 10.4262C15.4455 10.3852 15.5448 10.3632 15.6455 10.3614C15.7462 10.3596 15.8462 10.3782 15.9396 10.4159C16.033 10.4536 16.1178 10.5097 16.189 10.581C16.2603 10.6522 16.3164 10.737 16.3541 10.8304C16.3918 10.9238 16.4104 11.0238 16.4086 11.1245C16.4068 11.2252 16.3848 11.3245 16.3438 11.4165C16.3028 11.5085 16.2437 11.5913 16.17 11.66L11.93 15.9C11.8608 15.9701 11.7782 16.0257 11.6872 16.0635C11.5962 16.1013 11.4985 16.1205 11.4 16.12Z"})),(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M0,3.26315v57.4737015h64V3.26315H0z M62,5.2631502V34.480751L47.1523018,20.5346508 c-0.1992035-0.1875-0.4580002-0.2890015-0.7422028-0.2695007c-0.2733994,0.0156002-0.5282974,0.1425991-0.7059975,0.352499 L28.4267006,41.04245L15.4111004,30.3715496c-0.3984003-0.3270988-0.9863005-0.2967987-1.3496008,0.075201L2,42.8066483V5.2631502 H62z M2,58.7368507V45.6702499l12.8525-13.1707001l13.0684004,10.7137985 c0.4228001,0.347702,1.044899,0.2901001,1.3973999-0.1278992l17.2325001-20.3720989L62,37.2237511v21.5130997H2z"}),(0,e.createElement)("path",{d:"M26,26.2631493c3.8593006,0,7-3.1406002,7-7c0-3.8592997-3.1406994-6.999999-7-6.999999 c-3.8593998,0-7,3.1406994-7,6.999999C19,23.1225491,22.1406002,26.2631493,26,26.2631493z M26,14.2631502 c2.7567997,0,5,2.2431993,5,4.999999c0,2.7569008-2.2432003,5-5,5c-2.7569008,0-5-2.2430992-5-5 C21,16.5063496,23.2430992,14.2631502,26,14.2631502z"})))),_=((0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 20 20"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z"}))),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",fill:"none"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8c0-1.525.525-2.927 1.404-4.035l1.787 1.787A3.982 3.982 0 004 8c0 .834.255 1.608.691 2.248l-1.787 1.787A6.472 6.472 0 011.5 8zm2.465 5.096l1.787-1.787C6.392 11.745 7.166 12 8 12c.834 0 1.608-.255 2.248-.691l1.787 1.787A6.472 6.472 0 018 14.5a6.473 6.473 0 01-4.035-1.404zm9.131-1.06A6.472 6.472 0 0014.5 8a6.473 6.473 0 00-1.404-4.035l-1.787 1.787C11.745 6.392 12 7.166 12 8c0 .834-.255 1.608-.691 2.248l1.787 1.787zm-1.06-9.132A6.472 6.472 0 008 1.5a6.472 6.472 0 00-4.035 1.404l1.787 1.787A3.982 3.982 0 018 4c.834 0 1.608.255 2.248.691l1.787-1.787zM5.5 8a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z",clipRule:"evenodd"})),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M12.9121 1.59053C12.7508 1.2312 12.3936 1 11.9997 1C11.6059 1 11.2487 1.2312 11.0874 1.59053L8.27041 7.86702L1.43062 8.60661C1.03903 8.64895 0.708778 8.91721 0.587066 9.2918C0.465355 9.66639 0.574861 10.0775 0.866772 10.342L5.96556 14.9606L4.55534 21.6942C4.4746 22.0797 4.62768 22.4767 4.94632 22.7082C5.26497 22.9397 5.68983 22.9626 6.03151 22.7667L11.9997 19.3447L17.968 22.7667C18.3097 22.9626 18.7345 22.9397 19.0532 22.7082C19.3718 22.4767 19.5249 22.0797 19.4441 21.6942L18.0339 14.9606L23.1327 10.342C23.4246 10.0775 23.5341 9.66639 23.4124 9.2918C23.2907 8.91721 22.9605 8.64895 22.5689 8.60661L15.7291 7.86702L12.9121 1.59053Z"})),(0,e.createElement)("svg",{viewBox:"0 0 36 36"},(0,e.createElement)("path",{d:"M18,2A16,16,0,1,0,34,18,16,16,0,0,0,18,2Zm-.22,25.85a1.65,1.65,0,1,1,1.65-1.65A1.65,1.65,0,0,1,17.78,27.85Zm1.37-8.06v1.72a1.37,1.37,0,0,1-1.3,1.36h-.11a1.34,1.34,0,0,1-1.39-1.3c0-.44,0-2.76,0-2.76a1.19,1.19,0,0,1,1.12-1.31c1.57-.12,4.18-.7,4.18-3.25,0-1.83-1.41-3.07-3.43-3.07a5.31,5.31,0,0,0-4,1.92,1.36,1.36,0,0,1-2.35-.9,1.43,1.43,0,0,1,.43-1,7.77,7.77,0,0,1,6-2.69c3.7,0,6.28,2.3,6.28,5.6C24.58,17.16,22.61,19.2,19.15,19.79Z"}),(0,e.createElement)("rect",{x:"0",y:"0",width:"36",height:"36",fillOpacity:"0"}))),v=((0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M8 6.5H20V8H8V6.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 16.5H20V18H8V16.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 11.5H20V13H8V11.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 6H6V8H4V6Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 11H6V13H4V11Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 16H6V18H4V16Z",fill:"currentColor"})),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 64 64",strokeWidth:"3",stroke:"currentColor",fill:"none"},(0,e.createElement)("path",{d:"M45,14.67l-2.76,2a1,1,0,0,1-1,.11L37.65,15.3a1,1,0,0,1-.61-.76l-.66-3.77a1,1,0,0,0-1-.84H30.52a1,1,0,0,0-1,.77l-.93,3.72a1,1,0,0,1-.53.65l-3.3,1.66a1,1,0,0,1-1-.08l-3-2.13a1,1,0,0,0-1.31.12l-3.65,3.74a1,1,0,0,0-.13,1.26l1.87,2.88a1,1,0,0,1,.1.89L16.34,27a1,1,0,0,1-.68.63l-3.85,1.06a1,1,0,0,0-.74,1v4.74a1,1,0,0,0,.8,1l3.9.8a1,1,0,0,1,.72.57l1.42,3.15a1,1,0,0,1-.05.92l-2.13,3.63a1,1,0,0,0,.17,1.24L19.32,49a1,1,0,0,0,1.29.09L23.49,47a1,1,0,0,1,1-.1l3.74,1.67a1,1,0,0,1,.59.75l.66,3.79a1,1,0,0,0,1,.84h4.89a1,1,0,0,0,1-.86l.58-4a1,1,0,0,1,.58-.77l3.58-1.62a1,1,0,0,1,1,.09l3.14,2.12a1,1,0,0,0,1.3-.15L50,45.06a1,1,0,0,0,.09-1.27l-2.08-3a1,1,0,0,1-.09-1l1.48-3.43a1,1,0,0,1,.71-.59L53.77,35a1,1,0,0,0,.8-1V29.42a1,1,0,0,0-.8-1l-3.72-.78a1,1,0,0,1-.73-.62l-1.45-3.65a1,1,0,0,1,.11-.94l2.15-3.14A1,1,0,0,0,50,18l-3.71-3.25A1,1,0,0,0,45,14.67Z"}),(0,e.createElement)("circle",{cx:"32.82",cy:"31.94",r:"9.94"})),(0,u.__)("Please fix the errors below.","wc-ajax-product-filter")),g=(0,u.__)("Filter key is in use by another entity.","wc-ajax-product-filter");function b(){return wcapf_admin_params.nonce||""}function y(){return wcapf_admin_params.pro_update_notice||null}function w(){return parseFloat(wcapf_admin_params.wp_version)}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e;return""!==t&&(r+="-"+t),""!==n&&(r+="-"+n),r}function x(t){return t?(0,e.createElement)("span",{className:"__pro_tag"}):null}function C(){return wcapf_admin_params.forms_page_link}function O(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r){const r=t.map((e=>(e.isPro=!0,e)));n=(0,c.concat)(e,[{proGroup:!0,options:r}])}else n=(0,c.concat)(e,t);return n}const S=wcapf_admin_params.show_v4_migration_notice,j=wcapf_admin_params.v4_migrated_form_url,T=wcapf_admin_params.v4_migration_doc_url,k=y();var D=()=>(0,e.createElement)(e.Fragment,null,S&&(0,e.createElement)("div",{className:"notice notice-info v4-update-notice",id:"wcapf-v4-migration-notice"},(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"WCAPF - WooCommerce Ajax Product Filter (v4 Migration Notice)")),(0,e.createElement)("p",null,"The WC Ajax Product Filter plugin has been updated to v4 and is now named WCAPF - WooCommerce Ajax Product Filter. We have redesigned the admin UI to provide a more intuitive user experience and refactored the codebase for improved performance and easier future enhancements. As part of the migration process, a form has been automatically created with all the existing filters from your shop. We kindly request that you visit the form and review the order of the filters."),(0,e.createElement)("p",null,(0,e.createElement)(d.Button,{variant:"link",href:j},"Review the filters")," ","|"," ",(0,e.createElement)(d.Button,{variant:"link",href:T,target:"_blank"},"Learn more about migration")," ","|"," ",(0,e.createElement)(d.Button,{variant:"link",onClick:()=>{"function"==typeof removeWCAPFMigrationNotice&&removeWCAPFMigrationNotice()}},"I understand, remove the notice"))),k&&(0,e.createElement)("div",{className:"notice notice-error pro-update-notice"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:k}})));const N="https://wordpress.org/support/plugin/wc-ajax-product-filter/reviews/?filter=5";var I=t=>{let{noticeType:n,timeSince:r}=t;const a=e=>{"function"==typeof wcapfDismissNotice&&wcapfDismissNotice(e)};let o,i,l;return"milestone-achieved"===n?(o="notice notice-info is-dismissible review-notice",i="wcapf-review-notice-for-milestone-achieved",l=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,e.createElement)("span",{className:"dashicons dashicons-smiley wcapf-dashicon-smiley"})," Great job! You have updated the filters five times. Your feedback encourages me to improve the plugin. Please consider"," ",(0,e.createElement)("a",{href:N,target:"_blank"},"writing a review on WordPress"),". Thank you in advance :)"),(0,e.createElement)("button",{type:"button",className:"notice-dismiss",onClick:()=>a("milestone-achieved")},(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice")))):(o="notice notice-info review-notice",i="wcapf-review-notice-for-time-since",l=(0,e.createElement)("p",null,"Awesome! You've been using WCAPF - WooCommerce Ajax Product Filter for more than ",r,". Would you mind taking a few seconds to give it a 5-star rating on WordPress? Thank you in advance :)"," ",(0,e.createElement)("a",{href:N,target:"_blank"},"Ok, you deserved it")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>a("permanently-dismiss-time-since")},"I already did")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>a("postpone-time-since")},"No, not good enough"))),(0,e.createElement)("div",{className:o,id:i},l)};const F=wcapf_admin_params.show_review_notice_for_milestone_achieved,M=wcapf_admin_params.show_review_notice_for_time_since;var A=()=>F?(0,e.createElement)(I,{noticeType:"milestone-achieved"}):M?(0,e.createElement)(I,{noticeType:"time-since",timeSince:M}):null;const R=[{label:(0,u.__)("Forms","wc-ajax-product-filter"),id:"forms",href:C()},{label:(0,u.__)("Settings","wc-ajax-product-filter"),id:"settings",href:wcapf_admin_params.settings_page_link}];var P=t=>{let{view:n}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__top_bar"},(0,e.createElement)("div",{className:"__navbar"},(0,e.createElement)("h2",null,(0,e.createElement)(d.Icon,{icon:"filter",className:"__icon"}),"WCAPF - WooCommerce Ajax Product Filter"),R.map((t=>{const r=("form"===n?"forms":n)===t.id?"is-active":"";return(0,e.createElement)("a",{className:r,href:t.href,key:t.id},t.label)}))),(0,e.createElement)("div",{className:"__cta"},(0,e.createElement)("a",{target:"_blank",href:"https://wptools.io/wc-ajax-product-filter/?utm_source=WCAPF+Free&utm_medium=inside+plugin&utm_campaign=WCAPF+Pro+Upgrade",className:"__upgrade_btn"},(0,e.createElement)(d.Icon,{icon:m,size:18}),(0,u.__)("Upgrade to Pro","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__plan"},(0,e.createElement)("div",null,(0,u.__)("You are on the","wc-ajax-product-filter")),(0,e.createElement)("div",null,(0,u.__)("Free Plan"))),(0,e.createElement)("div",{className:"__version"},(0,e.createElement)("div",null,(0,u.__)("Version","wc-ajax-product-filter")),(0,e.createElement)("div",null,wcapf_admin_params.free_version)))),(0,e.createElement)(D,null),"form"!==n&&(0,e.createElement)(A,null))},L=(e,t)=>{const{isDirty:n,saveError:r}=e;return{setDirty:()=>{n||(t({type:"SET_DIRTY",payload:!0}),wcapf_admin_params.dirty=!0),r&&t({type:"SET_ERROR",payload:""})}}},V=window.wp.data;function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,V.dispatch)("core/notices").createSuccessNotice(e,{type:"snackbar",id:t,icon:n})}function B(e){(0,V.dispatch)("core/notices").removeNotice(e)}function U(){B("copied-to-clipboard")}const $="item-save-success",z="item-save-error";function W(e){H(e,z,"😟")}function q(){B($),B(z)}const G="filter-delete-error";function Y(e){H(e,G,"😟")}function X(){B(G)}function K(e){!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,V.dispatch)("core/notices").createErrorNotice(e,{type:"snackbar",id:t,icon:n})}(e,"get-form-filters-error","😟")}function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}function J(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){return e instanceof J(e).Element||e instanceof Element}function ee(e){return e instanceof J(e).HTMLElement||e instanceof HTMLElement}function te(e){return"undefined"!=typeof ShadowRoot&&(e instanceof J(e).ShadowRoot||e instanceof ShadowRoot)}var ne=Math.max,re=Math.min,ae=Math.round;function oe(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,a=1;if(ee(e)&&t){var o=e.offsetHeight,i=e.offsetWidth;i>0&&(r=ae(n.width)/i||1),o>0&&(a=ae(n.height)/o||1)}return{width:n.width/r,height:n.height/a,top:n.top/a,right:n.right/r,bottom:n.bottom/a,left:n.left/r,x:n.left/r,y:n.top/a}}function ie(e){var t=J(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return e?(e.nodeName||"").toLowerCase():null}function se(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function ce(e){return oe(se(e)).left+ie(e).scrollLeft}function ue(e){return J(e).getComputedStyle(e)}function de(e){var t=ue(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function pe(e,t,n){void 0===n&&(n=!1);var r=ee(t),a=ee(t)&&function(e){var t=e.getBoundingClientRect(),n=ae(t.width)/e.offsetWidth||1,r=ae(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=se(t),i=oe(e,a),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&(("body"!==le(t)||de(o))&&(l=function(e){return e!==J(e)&&ee(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:ie(e);var t}(t)),ee(t)?((s=oe(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):o&&(s.x=ce(o))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function fe(e){var t=oe(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function me(e){return"html"===le(e)?e:e.assignedSlot||e.parentNode||(te(e)?e.host:null)||se(e)}function he(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:ee(e)&&de(e)?e:he(me(e))}function _e(e,t){var n;void 0===t&&(t=[]);var r=he(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=J(r),i=a?[o].concat(o.visualViewport||[],de(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(_e(me(i)))}function ve(e){return["table","td","th"].indexOf(le(e))>=0}function ge(e){return ee(e)&&"fixed"!==ue(e).position?e.offsetParent:null}function be(e){for(var t=J(e),n=ge(e);n&&ve(n)&&"static"===ue(n).position;)n=ge(n);return n&&("html"===le(n)||"body"===le(n)&&"static"===ue(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ee(e)&&"fixed"===ue(e).position)return null;var n=me(e);for(te(n)&&(n=n.host);ee(n)&&["html","body"].indexOf(le(n))<0;){var r=ue(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var ye="top",we="bottom",Ee="right",xe="left",Ce="auto",Oe=[ye,we,Ee,xe],Se="start",je="end",Te="viewport",ke="popper",De=Oe.reduce((function(e,t){return e.concat([t+"-"+Se,t+"-"+je])}),[]),Ne=[].concat(Oe,[Ce]).reduce((function(e,t){return e.concat([t,t+"-"+Se,t+"-"+je])}),[]),Ie=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Fe(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}var Me={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Re(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,a=t.defaultOptions,o=void 0===a?Me:a;return function(e,t,n){void 0===n&&(n=o);var a,i,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Me,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:l,setOptions:function(n){var a="function"==typeof n?n(l.options):n;d(),l.options=Object.assign({},o,l.options,a),l.scrollParents={reference:Q(e)?_e(e):e.contextElement?_e(e.contextElement):[],popper:_e(t)};var i,c,p=function(e){var t=Fe(e);return Ie.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,l.options.modifiers),c=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return l.orderedModifiers=p.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,a=e.effect;if("function"==typeof a){var o=a({state:l,name:t,instance:u,options:r});s.push(o||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=l.elements,t=e.reference,n=e.popper;if(Ae(t,n)){l.rects={reference:pe(t,be(n),"fixed"===l.options.strategy),popper:fe(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var a=l.orderedModifiers[r],o=a.fn,i=a.options,s=void 0===i?{}:i,d=a.name;"function"==typeof o&&(l=o({state:l,options:s,name:d,instance:u})||l)}else l.reset=!1,r=-1}}},update:(a=function(){return new Promise((function(e){u.forceUpdate(),e(l)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(a())}))}))),i}),destroy:function(){d(),c=!0}};if(!Ae(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Pe={passive:!0},Le={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=void 0===a||a,i=r.resize,l=void 0===i||i,s=J(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,Pe)})),l&&s.addEventListener("resize",n.update,Pe),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Pe)})),l&&s.removeEventListener("resize",n.update,Pe)}},data:{}};function Ve(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function Be(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ue(e){var t,n=e.reference,r=e.element,a=e.placement,o=a?Ve(a):null,i=a?He(a):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case ye:t={x:l,y:n.y-r.height};break;case we:t={x:l,y:n.y+n.height};break;case Ee:t={x:n.x+n.width,y:s};break;case xe:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=o?Be(o):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case Se:t[c]=t[c]-(n[u]/2-r[u]/2);break;case je:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var $e={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ue({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function We(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=i.x,f=void 0===p?0:p,m=i.y,h=void 0===m?0:m,_="function"==typeof u?u({x:f,y:h}):{x:f,y:h};f=_.x,h=_.y;var v=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=xe,y=ye,w=window;if(c){var E=be(n),x="clientHeight",C="clientWidth";E===J(n)&&"static"!==ue(E=se(n)).position&&"absolute"===l&&(x="scrollHeight",C="scrollWidth"),(a===ye||(a===xe||a===Ee)&&o===je)&&(y=we,h-=(d&&E===w&&w.visualViewport?w.visualViewport.height:E[x])-r.height,h*=s?1:-1),a!==xe&&(a!==ye&&a!==we||o!==je)||(b=Ee,f-=(d&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-r.width,f*=s?1:-1)}var O,S=Object.assign({position:l},c&&ze),j=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:ae(t*r)/r||0,y:ae(n*r)/r||0}}({x:f,y:h}):{x:f,y:h};return f=j.x,h=j.y,s?Object.assign({},S,((O={})[y]=g?"0":"",O[b]=v?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+h+"px)":"translate3d("+f+"px, "+h+"px, 0)",O)):Object.assign({},S,((t={})[y]=g?h+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var qe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,o=n.adaptive,i=void 0===o||o,l=n.roundOffsets,s=void 0===l||l,c={placement:Ve(t.placement),variation:He(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,We(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,We(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ge={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},a=t.elements[e];ee(a)&&le(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],a=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});ee(r)&&le(r)&&(Object.assign(r.style,o),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Ye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=void 0===a?[0,0]:a,i=Ne.reduce((function(e,n){return e[n]=function(e,t,n){var r=Ve(e),a=[xe,ye].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=o[0],l=o[1];return i=i||0,l=(l||0)*a,[xe,Ee].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,o),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},Xe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ke(e){return e.replace(/left|right|bottom|top/g,(function(e){return Xe[e]}))}var Ze={start:"end",end:"start"};function Je(e){return e.replace(/start|end/g,(function(e){return Ze[e]}))}function Qe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&te(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function et(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function tt(e,t){return t===Te?et(function(e){var t=J(e),n=se(e),r=t.visualViewport,a=n.clientWidth,o=n.clientHeight,i=0,l=0;return r&&(a=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=r.offsetLeft,l=r.offsetTop)),{width:a,height:o,x:i+ce(e),y:l}}(e)):Q(t)?function(e){var t=oe(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):et(function(e){var t,n=se(e),r=ie(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=ne(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=ne(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-r.scrollLeft+ce(e),s=-r.scrollTop;return"rtl"===ue(a||n).direction&&(l+=ne(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:l,y:s}}(se(e)))}function nt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function rt(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function at(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,o=n.boundary,i=void 0===o?"clippingParents":o,l=n.rootBoundary,s=void 0===l?Te:l,c=n.elementContext,u=void 0===c?ke:c,d=n.altBoundary,p=void 0!==d&&d,f=n.padding,m=void 0===f?0:f,h=nt("number"!=typeof m?m:rt(m,Oe)),_=u===ke?"reference":ke,v=e.rects.popper,g=e.elements[p?_:u],b=function(e,t,n){var r="clippingParents"===t?function(e){var t=_e(me(e)),n=["absolute","fixed"].indexOf(ue(e).position)>=0&&ee(e)?be(e):e;return Q(n)?t.filter((function(e){return Q(e)&&Qe(e,n)&&"body"!==le(e)})):[]}(e):[].concat(t),a=[].concat(r,[n]),o=a[0],i=a.reduce((function(t,n){var r=tt(e,n);return t.top=ne(r.top,t.top),t.right=re(r.right,t.right),t.bottom=re(r.bottom,t.bottom),t.left=ne(r.left,t.left),t}),tt(e,o));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(Q(g)?g:g.contextElement||se(e.elements.popper),i,s),y=oe(e.elements.reference),w=Ue({reference:y,element:v,strategy:"absolute",placement:a}),E=et(Object.assign({},v,w)),x=u===ke?E:y,C={top:b.top-x.top+h.top,bottom:x.bottom-b.bottom+h.bottom,left:b.left-x.left+h.left,right:x.right-b.right+h.right},O=e.modifiersData.offset;if(u===ke&&O){var S=O[a];Object.keys(C).forEach((function(e){var t=[Ee,we].indexOf(e)>=0?1:-1,n=[ye,we].indexOf(e)>=0?"y":"x";C[e]+=S[n]*t}))}return C}var ot={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=void 0===a||a,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=void 0===f||f,h=n.allowedAutoPlacements,_=t.options.placement,v=Ve(_),g=s||(v!==_&&m?function(e){if(Ve(e)===Ce)return[];var t=Ke(e);return[Je(e),t,Je(t)]}(_):[Ke(_)]),b=[_].concat(g).reduce((function(e,n){return e.concat(Ve(n)===Ce?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?Ne:s,u=He(r),d=u?l?De:De.filter((function(e){return He(e)===u})):Oe,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=at(e,{placement:n,boundary:a,rootBoundary:o,padding:i})[Ve(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),y=t.rects.reference,w=t.rects.popper,E=new Map,x=!0,C=b[0],O=0;O<b.length;O++){var S=b[O],j=Ve(S),T=He(S)===Se,k=[ye,we].indexOf(j)>=0,D=k?"width":"height",N=at(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),I=k?T?Ee:xe:T?we:ye;y[D]>w[D]&&(I=Ke(I));var F=Ke(I),M=[];if(o&&M.push(N[j]<=0),l&&M.push(N[I]<=0,N[F]<=0),M.every((function(e){return e}))){C=S,x=!1;break}E.set(S,M)}if(x)for(var A=function(e){var t=b.find((function(t){var n=E.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},R=m?3:1;R>0&&"break"!==A(R);R--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function it(e,t,n){return ne(e,re(t,n))}var lt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=void 0===a||a,i=n.altAxis,l=void 0!==i&&i,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,m=n.tetherOffset,h=void 0===m?0:m,_=at(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),v=Ve(t.placement),g=He(t.placement),b=!g,y=Be(v),w="x"===y?"y":"x",E=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,O="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,S="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(E){if(o){var k,D="y"===y?ye:xe,N="y"===y?we:Ee,I="y"===y?"height":"width",F=E[y],M=F+_[D],A=F-_[N],R=f?-C[I]/2:0,P=g===Se?x[I]:C[I],L=g===Se?-C[I]:-x[I],V=t.elements.arrow,H=f&&V?fe(V):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=B[D],$=B[N],z=it(0,x[I],H[I]),W=b?x[I]/2-R-z-U-S.mainAxis:P-z-U-S.mainAxis,q=b?-x[I]/2+R+z+$+S.mainAxis:L+z+$+S.mainAxis,G=t.elements.arrow&&be(t.elements.arrow),Y=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,X=null!=(k=null==j?void 0:j[y])?k:0,K=F+q-X,Z=it(f?re(M,F+W-X-Y):M,F,f?ne(A,K):A);E[y]=Z,T[y]=Z-F}if(l){var J,Q="x"===y?ye:xe,ee="x"===y?we:Ee,te=E[w],ae="y"===w?"height":"width",oe=te+_[Q],ie=te-_[ee],le=-1!==[ye,xe].indexOf(v),se=null!=(J=null==j?void 0:j[w])?J:0,ce=le?oe:te-x[ae]-C[ae]-se+S.altAxis,ue=le?te+x[ae]+C[ae]-se-S.altAxis:ie,de=f&&le?function(e,t,n){var r=it(e,t,n);return r>n?n:r}(ce,te,ue):it(f?ce:oe,te,f?ue:ie);E[w]=de,T[w]=de-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]},st={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Ve(n.placement),s=Be(l),c=[xe,Ee].indexOf(l)>=0?"height":"width";if(o&&i){var u=function(e,t){return nt("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:rt(e,Oe))}(a.padding,n),d=fe(o),p="y"===s?ye:xe,f="y"===s?we:Ee,m=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],h=i[s]-n.rects.reference[s],_=be(o),v=_?"y"===s?_.clientHeight||0:_.clientWidth||0:0,g=m/2-h/2,b=u[p],y=v-d[c]-u[f],w=v/2-d[c]/2+g,E=it(b,w,y),x=s;n.modifiersData[r]=((t={})[x]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Qe(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ct(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ut(e){return[ye,Ee,we,xe].some((function(t){return e[t]>=0}))}var dt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=at(t,{elementContext:"reference"}),l=at(t,{altBoundary:!0}),s=ct(i,r),c=ct(l,a,o),u=ut(s),d=ut(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},pt=Re({defaultModifiers:[Le,$e,qe,Ge,Ye,ot,lt,st,dt]}),ft="tippy-content",mt="tippy-arrow",ht="tippy-svg-arrow",_t={passive:!0,capture:!0},vt=function(){return document.body};function gt(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function bt(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function yt(e,t){return"function"==typeof e?e.apply(void 0,t):e}function wt(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Et(e){return[].concat(e)}function xt(e,t){-1===e.indexOf(t)&&e.push(t)}function Ct(e){return[].slice.call(e)}function Ot(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function St(){return document.createElement("div")}function jt(e){return["Element","Fragment"].some((function(t){return bt(e,t)}))}function Tt(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function kt(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Dt(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function Nt(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var It={isTouch:!1},Ft=0;function Mt(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",At))}function At(){var e=performance.now();e-Ft<20&&(It.isTouch=!1,document.removeEventListener("mousemove",At)),Ft=e}function Rt(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Pt=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Lt=Object.assign({appendTo:vt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Vt=Object.keys(Lt);function Ht(e){var t=(e.plugins||[]).reduce((function(t,n){var r,a=n.name,o=n.defaultValue;return a&&(t[a]=void 0!==e[a]?e[a]:null!=(r=Lt[a])?r:o),t}),{});return Object.assign({},e,t)}function Bt(e,t){var n=Object.assign({},t,{content:yt(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ht(Object.assign({},Lt,{plugins:t}))):Vt).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Lt.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Ut(e,t){e.innerHTML=t}function $t(e){var t=St();return!0===e?t.className=mt:(t.className=ht,jt(e)?t.appendChild(e):Ut(t,e)),t}function zt(e,t){jt(t.content)?(Ut(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Ut(e,t.content):e.textContent=t.content)}function Wt(e){var t=e.firstElementChild,n=Ct(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ft)})),arrow:n.find((function(e){return e.classList.contains(mt)||e.classList.contains(ht)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function qt(e){var t=St(),n=St();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=St();function a(n,r){var a=Wt(t),o=a.box,i=a.content,l=a.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||zt(i,e.props),r.arrow?l?n.arrow!==r.arrow&&(o.removeChild(l),o.appendChild($t(r.arrow))):o.appendChild($t(r.arrow)):l&&o.removeChild(l)}return r.className=ft,r.setAttribute("data-state","hidden"),zt(r,e.props),t.appendChild(n),n.appendChild(r),a(e.props,e.props),{popper:t,onUpdate:a}}qt.$$tippy=!0;var Gt=1,Yt=[],Xt=[];function Kt(e,t){var n,r,a,o,i,l,s,c,u=Bt(e,Object.assign({},Lt,Ht(Ot(t)))),d=!1,p=!1,f=!1,m=!1,h=[],_=wt(G,u.interactiveDebounce),v=Gt++,g=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:v,reference:e,popper:St(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(a)},setProps:function(t){if(!b.state.isDestroyed){F("onBeforeUpdate",[b,t]),W();var n=b.props,r=Bt(e,Object.assign({},n,Ot(t),{ignoreAttributes:!0}));b.props=r,z(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),_=wt(G,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?Et(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded"),A(),I(),E&&E(n,r),b.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),F("onAfterUpdate",[b,t])}},setContent:function(e){b.setProps({content:e})},show:function(){var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=It.isTouch&&!b.props.touch,a=gt(b.props.duration,0,Lt.duration);if(!(e||t||n||r||T().hasAttribute("disabled")||(F("onShow",[b],!1),!1===b.props.onShow(b)))){if(b.state.isVisible=!0,j()&&(w.style.visibility="visible"),I(),H(),b.state.isMounted||(w.style.transition="none"),j()){var o=D();Tt([o.box,o.content],0)}l=function(){var e;if(b.state.isVisible&&!m){if(m=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,j()&&b.props.animation){var t=D(),n=t.box,r=t.content;Tt([n,r],a),kt([n,r],"visible")}M(),A(),xt(Xt,b),null==(e=b.popperInstance)||e.forceUpdate(),F("onMount",[b]),b.props.animation&&j()&&function(e,t){U(e,(function(){b.state.isShown=!0,F("onShown",[b])}))}(a)}},function(){var e,t=b.props.appendTo,n=T();(e=b.props.interactive&&t===vt||"parent"===t?n.parentNode:yt(t,[n])).contains(w)||e.appendChild(w),b.state.isMounted=!0,Z()}()}},hide:function(){var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=gt(b.props.duration,1,Lt.duration);if(!(e||t||n)&&(F("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,m=!1,d=!1,j()&&(w.style.visibility="hidden"),R(),B(),I(!0),j()){var a=D(),o=a.box,i=a.content;b.props.animation&&(Tt([o,i],r),kt([o,i],"hidden"))}M(),A(),b.props.animation?j()&&function(e,t){U(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()}},hideWithInteractivity:function(e){k().addEventListener("mousemove",_),xt(Yt,_),_(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(J(),Q().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w),Xt=Xt.filter((function(e){return e!==b})),b.state.isMounted=!1,F("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),W(),delete e._tippy,b.state.isDestroyed=!0,F("onDestroy",[b]))}};if(!u.render)return b;var y=u.render(b),w=y.popper,E=y.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var x=g.map((function(e){return e.fn(b)})),C=e.hasAttribute("aria-expanded");return z(),A(),I(),F("onCreate",[b]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",_)})),b;function O(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===O()[0]}function j(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function T(){return s||e}function k(){var e,t,n=T().parentNode;return n?null!=(t=Et(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function D(){return Wt(w)}function N(e){return b.state.isMounted&&!b.state.isVisible||It.isTouch||o&&"focus"===o.type?0:gt(b.props.delay,e?0:1,Lt.delay)}function I(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function F(e,t,n){var r;void 0===n&&(n=!0),x.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(r=b.props)[e].apply(r,t)}function M(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;Et(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var a=t&&t.replace(r,"").trim();a?e.setAttribute(n,a):e.removeAttribute(n)}}))}}function A(){!C&&b.props.aria.expanded&&Et(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){k().removeEventListener("mousemove",_),Yt=Yt.filter((function(e){return e!==_}))}function P(t){if(!It.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Nt(w,n)){if(Et(b.props.triggerTarget||e).some((function(e){return Nt(e,n)}))){if(It.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),p=!0,setTimeout((function(){p=!1})),b.state.isMounted||B())}}}function L(){f=!0}function V(){f=!1}function H(){var e=k();e.addEventListener("mousedown",P,!0),e.addEventListener("touchend",P,_t),e.addEventListener("touchstart",V,_t),e.addEventListener("touchmove",L,_t)}function B(){var e=k();e.removeEventListener("mousedown",P,!0),e.removeEventListener("touchend",P,_t),e.removeEventListener("touchstart",V,_t),e.removeEventListener("touchmove",L,_t)}function U(e,t){var n=D().box;function r(e){e.target===n&&(Dt(n,"remove",r),t())}if(0===e)return t();Dt(n,"remove",i),Dt(n,"add",r),i=r}function $(t,n,r){void 0===r&&(r=!1),Et(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function z(){var e;S()&&($("touchstart",q,{passive:!0}),$("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,q),e){case"mouseenter":$("mouseleave",Y);break;case"focus":$(Pt?"focusout":"blur",X);break;case"focusin":$("focusout",X)}}))}function W(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,a=e.options;t.removeEventListener(n,r,a)})),h=[]}function q(e){var t,n=!1;if(b.state.isEnabled&&!K(e)&&!p){var r="focus"===(null==(t=o)?void 0:t.type);o=e,s=e.currentTarget,A(),!b.state.isVisible&&bt(e,"MouseEvent")&&Yt.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function G(e){var t=e.target,n=T().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,a=e.popperState,o=e.props.interactiveBorder,i=a.placement.split("-")[0],l=a.modifiersData.offset;if(!l)return!0;var s="bottom"===i?l.top.y:0,c="top"===i?l.bottom.y:0,u="right"===i?l.left.x:0,d="left"===i?l.right.x:0,p=t.top-r+s>o,f=r-t.bottom-c>o,m=t.left-n+u>o,h=n-t.right-d>o;return p||f||m||h}))})(r,e)&&(R(),te(e))}}function Y(e){K(e)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==T()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function K(e){return!!It.isTouch&&S()!==e.type.indexOf("touch")>=0}function Z(){J();var t=b.props,n=t.popperOptions,r=t.placement,a=t.offset,o=t.getReferenceClientRect,i=t.moveTransition,s=j()?Wt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(j()){var n=D().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];j()&&s&&d.push({name:"arrow",options:{element:s,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),b.popperInstance=pt(c,w,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:d}))}function J(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return Ct(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&F("onTrigger",[b,e]),H();var t=N(!0),r=O(),a=r[0],o=r[1];It.isTouch&&"hold"===a&&o&&(t=o),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),F("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=N(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):a=requestAnimationFrame((function(){b.hide()}))}}else B()}}function Zt(e,t){void 0===t&&(t={});var n=Lt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Mt,_t),window.addEventListener("blur",Rt);var r,a=Object.assign({},t,{plugins:n}),o=(r=e,jt(r)?[r]:function(e){return bt(e,"NodeList")}(r)?Ct(r):Array.isArray(r)?r:Ct(document.querySelectorAll(r))).reduce((function(e,t){var n=t&&Kt(t,a);return n&&e.push(n),e}),[]);return jt(e)?o[0]:o}Zt.defaultProps=Lt,Zt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Lt[t]=e[t]}))},Zt.currentInput=It,Object.assign({},Ge,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Zt.setDefaultProps({render:qt});var Jt=Zt,Qt=n(196),en=n.n(Qt),tn=window.ReactDOM;function nn(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var rn="undefined"!=typeof window&&"undefined"!=typeof document;function an(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function on(){return rn&&document.createElement("div")}function ln(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!ln(e[n],t[n]))return!1}return!0}return!1}function sn(e){var t=[];return e.forEach((function(e){t.find((function(t){return ln(e,t)}))||t.push(e)})),t}var cn=rn?Qt.useLayoutEffect:Qt.useEffect;function un(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var dn={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||un(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&un(t,"remove",e.props.className)},onAfterUpdate:r}}};function pn(e){return function(t){var n,r,a=t.children,o=t.content,i=t.visible,l=t.singleton,s=t.render,c=t.reference,u=t.disabled,d=void 0!==u&&u,p=t.ignoreAttributes,f=void 0===p||p,m=(t.__source,t.__self,nn(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),h=void 0!==i,_=void 0!==l,v=(0,Qt.useState)(!1),g=v[0],b=v[1],y=(0,Qt.useState)({}),w=y[0],E=y[1],x=(0,Qt.useState)(),C=x[0],O=x[1],S=(n=function(){return{container:on(),renders:1}},(r=(0,Qt.useRef)()).current||(r.current="function"==typeof n?n():n),r.current),j=Object.assign({ignoreAttributes:f},m,{content:S.container});h&&(j.trigger="manual",j.hideOnClick=!1),_&&(d=!0);var T=j,k=j.plugins||[];s&&(T=Object.assign({},j,{plugins:_&&null!=l.data?[].concat(k,[{fn:function(){return{onTrigger:function(e,t){var n=l.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,O(n.content)}}}}]):k,render:function(){return{popper:S.container}}}));var D=[c].concat(a?[a.type]:[]);return cn((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||S.ref||on(),Object.assign({},T,{plugins:[dn].concat(j.plugins||[])}));return S.instance=n,d&&n.disable(),i&&n.show(),_&&l.hook({instance:n,content:o,props:T,setSingletonContent:O}),b(!0),function(){n.destroy(),null==l||l.cleanup(n)}}),D),cn((function(){var e,t,n,r,a;if(1!==S.renders){var s=S.instance;s.setProps((t=s.props,n=T,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:sn([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(a=n.popperOptions)?void 0:a.modifiers)||[]))})}))),null==(e=s.popperInstance)||e.forceUpdate(),d?s.disable():s.enable(),h&&(i?s.show():s.hide()),_&&l.hook({instance:s,content:o,props:T,setSingletonContent:O})}else S.renders++})),cn((function(){var e;if(s){var t=S.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;w.placement===n.placement&&w.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&w.escaped===(null==r?void 0:r.hasPopperEscaped)||E({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[w.placement,w.referenceHidden,w.escaped].concat(D)),en().createElement(en().Fragment,null,a?(0,Qt.cloneElement)(a,{ref:function(e){S.ref=e,an(a.ref,e)}}):null,g&&(0,tn.createPortal)(s?s(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(w),C,S.instance):o,S.container))}}var fn=function(e,t){return(0,Qt.forwardRef)((function(n,r){var a=n.children,o=nn(n,["children"]);return en().createElement(e,Object.assign({},t,o),a?(0,Qt.cloneElement)(a,{ref:function(e){an(r,e),an(a.ref,e)}}):null)}))},mn=fn(pn(Jt)),hn=t=>{let{content:n}=t;return(0,e.createElement)(mn,{content:n,className:"__tippy_tooltip"},(0,e.createElement)("span",{className:"__help_info"},(0,e.createElement)(d.Icon,{icon:_,size:16})))};const vn=t=>{let{inputId:n,id:r,index:a,initialValue:o,onChange:i,type:l="text",isDisabled:s,customClass:c,...u}=t;const[d,p]=(0,e.useState)(o);(0,e.useLayoutEffect)((()=>{p(o)}),[o]);let f="components-text-control__input";return c&&(f+=` ${c}`),(0,e.createElement)("input",Z({type:l,id:n,className:f,disabled:s,value:d,onChange:e=>{p(e.target.value)},onBlur:()=>i(d,r,a)},u))},gn=t=>{let{inputId:n,id:r,index:a,initialValue:o,onChange:i,type:l="text",isDisabled:s,customClass:c,...u}=t,d="components-text-control__input";return c&&(d+=` ${c}`),(0,e.createElement)("input",Z({type:l,id:n,className:d,disabled:s,value:o,onChange:e=>i(e.target.value,r,a)},u))};var bn=t=>{let{label:n,id:r,index:a="",value:o,onChange:i,description:l,type:s="text",renderAsFormField:c=!0,isFilterKey:u=!1,isDisabled:d=!1,tooltip:p,customClass:f="",isPro:m,...h}=t;const _=E(r,a);return c?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:_},n,"field_key"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"For example, the URL will be",(0,e.createElement)("br",null),"www.site.com/shop/?color=blue&size=large",(0,e.createElement)("br",null),"where ",(0,e.createElement)("b",null,"color")," and ",(0,e.createElement)("b",null,"size")," ","are the filter keys.")}),"keyword_filter_placeholder"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable for the input field of the keyword filter.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search products"')}),"keyword_filter_prefix"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the keyword.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Keyword:". For a value "shirt", it becomes "Keyword: shirt" in the active filters.')}),"search_field_default_placeholder"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view. This will be overridden by the placeholder value of the filter itself.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search"')}),"no_results_text"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view and combobox enabled in the dropdown view.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No results for:". For a keyword "purple", the text will be "No results for: ',(0,e.createElement)("u",null,"purple"),'"')}),"combobox_no_options_text"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when combobox is enabled in the dropdown(multiselect) view and all options have been chosen.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No options to choose"')}),"empty_filter_text"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when there are no options to filter by or the filter is empty.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "N/A"')}),"results_count_markup"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"Default: Found %d product|Found %d products",(0,e.createElement)("br",null),(0,e.createElement)("br",null),"Here two markups are separated by the pipe(|) character. The first markup is for the singular result and the second one is for the plural result. %d will be replaced with product count.")}),"sort_by_prefix"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the sort by value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Sort by:". For a value "Title", it becomes "Sort by: Title" in the active filters.')}),"per_page_prefix"===r&&(0,e.createElement)(hn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the per page value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Per page:". For a value of "15", it becomes "Per page: 15" in the active filters.')}),x(m))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},u?(0,e.createElement)(vn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)):(0,e.createElement)(gn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)),p&&(0,e.createElement)(hn,{content:p})))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}})):(0,e.createElement)(e.Fragment,null,u?(0,e.createElement)(vn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)):(0,e.createElement)(gn,Z({inputId:_,id:r,index:a,initialValue:o,onChange:i,type:s,isDisabled:d,customClass:f},h)))},yn=t=>{let{loading:n,handleTitleChange:r,handleSubmit:a}=t;const{state:{title:o,filterStatus:l,isDirty:s}}=i();let c,f,m=!1;return l?(c=(0,e.createElement)("span",null,(0,u.__)("Save","wc-ajax-product-filter")),f="primary",m=!0):s?(c=(0,e.createElement)("span",null,(0,u.__)("Save","wc-ajax-product-filter")),f="primary"):(c=(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"__icon"},"🔥"),(0,u.__)("Publish","wc-ajax-product-filter")),f="secondary"),n&&(m=!0),(0,e.createElement)("div",{className:"__title_wrapper"},(0,e.createElement)(d.Button,{href:C(),className:"__back_button"},(0,e.createElement)(d.Icon,{icon:p})),(0,e.createElement)(bn,{value:o,onChange:r,renderAsFormField:!1}),(0,e.createElement)(d.Button,{variant:f,className:"__save_button",onClick:a,isBusy:n,disabled:m},c))},wn=t=>{let{isOpen:n,closeModal:r}=t;const a=window.isSecureContext&&navigator.clipboard;return n&&(0,e.createElement)(d.Modal,{onRequestClose:r,__experimentalHideHeader:!0,className:"__publish_modal"},(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,u.__)("Publish Form","wc-ajax-product-filter")),(0,e.createElement)(d.TabPanel,{className:"__publish_tab_panel",activeClass:"active-tab",onSelect:()=>{U()},tabs:[{name:"widget",title:(0,u.__)("Widget","wc-ajax-product-filter")},{name:"shortcode",title:(0,u.__)("Shortcode","wc-ajax-product-filter")},{name:"php-code",title:(0,u.__)("PHP Code","wc-ajax-product-filter")}]},(t=>{let{name:n}=t;return(t=>{let n,o;const i=wcapf_admin_params.widgets_page_link;"shortcode"===t?(n=(0,u.__)("If you want to publish using shortcode, just copy code below and use it.","wc-ajax-product-filter"),o="[wcapf_form]"):"php-code"===t?(n=(0,u.__)("If you want to publish using PHP code, just copy code below and use it.","wc-ajax-product-filter"),o="<?php echo do_shortcode( '[wcapf_form]' ); ?>"):n=(0,u.sprintf)((0,u.__)("Go to the widgets page, add <b>%s</b> widget to the desired area.","wc-ajax-product-filter"),"WCAPF - Product Filter Form");let l="__code";return a&&(l+=" __clipboard-api-found"),(0,e.createElement)("div",{className:"__publish_tab_content"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:n}}),("shortcode"===t||"php-code"===t)&&(0,e.createElement)("div",{className:l,tabIndex:0,onClick:()=>{return e=o,void(a&&(navigator.clipboard.writeText(e),H((0,u.__)("Copied to clipboard","wc-ajax-product-filter"),"copied-to-clipboard")));var e}},(0,e.createElement)("div",{className:"__text"},o),a&&(0,e.createElement)(d.Icon,{icon:f,size:24})),"widget"===t&&(0,e.createElement)("div",{className:"__link"},(0,e.createElement)(d.Button,{variant:"primary",href:i,target:"_blank"},(0,u.__)("Go to Widgets","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},(0,u.__)("Cancel","wc-ajax-product-filter"))))})(n)}))))};function En(e){const{type:t,taxonomy:n,component:r}=e,a=wcapf_admin_params.filter_types;let o;if("taxonomy"===t){const e=(0,c.find)(a,{value:t});o=(0,c.find)(e.options,{value:n})}else if("component"===t){const e=(0,c.find)(a,{value:t});o=(0,c.find)(e.options,{value:r})}else o=(0,c.find)(a,{value:t});return o}function xn(e,t){const{title:n,type:r,meta_key:a}=e;let o=n;return o||(o=t.label,"post-meta"===r&&a&&(o+=`[${a}]`)),o}function Cn(e,t){const{field_key:n,type:r,meta_key:a}=e;let o=n;return o||("post-meta"===r?a&&(o=`_${a}`):"component"!==r&&(o=t.key)),o}function On(e){const{type:t,taxonomy:n,meta_key:r}=e;let a;return a="taxonomy"===t?`taxonomy>${n}`:"post-meta"===t?`post-meta>${r}`:t,a}function Sn(e,t){const{id:n,type:r,taxonomy:a,meta_key:o}=t;if(!n)if("taxonomy"===r){const t=(0,c.find)(e,{type:r,taxonomy:a});if(t)return t.field_key}else if("post-meta"===r){const t=(0,c.find)(e,{type:r,meta_key:o});if(t)return t.field_key}else{const t=(0,c.find)(e,{type:r});if(t)return t.field_key}}function jn(e,t,n,r){if(t.id)return;let a;const o=t.field_key;if((0,c.isEmpty)(o))return;const i=[],l=wcapf_admin_params.filter_types,s=(0,c.find)(l,{value:"taxonomy"}).options;for(let e=0;e<n.length;e++){if(e===r)continue;const t={...n[e]};if((0,c.isEmpty)(t.field_key)){const{type:e,taxonomy:n,meta_key:r}=t;if("taxonomy"===e){const e=(0,c.find)(s,{value:n});t.field_key=e.key}else if("post-meta"===e)t.field_key=`_${r}`;else{const n=(0,c.find)(l,{value:e});t.field_key=n.key}}i.push(t)}return(0,c.find)(i,{field_key:o})?(console.log("found in this form",(0,c.find)(i,{field_key:o})),a=g):(0,c.find)(e,{field_key:o})&&(console.log("found in other forms",(0,c.find)(e,{field_key:o})),a=g),a}function Tn(){return wcapf_admin_params.filter_default_data}function kn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[{label:(0,u.__)("Off","wc-ajax-product-filter"),value:"off"},{label:(0,u.__)("Include","wc-ajax-product-filter"),value:"include"},{label:(0,u.__)("Exclude","wc-ajax-product-filter"),value:"exclude"}],r=[{label:(0,u.__)("Child of","wc-ajax-product-filter"),value:"child"},{label:(0,u.__)("Parent Only","wc-ajax-product-filter"),value:"parent_only"}];return e?O(n,r,t):n}function Dn(){return[{label:(0,u.__)("ASC","wc-ajax-product-filter"),value:"asc"},{label:(0,u.__)("DESC","wc-ajax-product-filter"),value:"desc"}]}const Nn=[{label:(0,u.__)("Checkbox","wc-ajax-product-filter"),value:"checkbox"},{label:(0,u.__)("Radio","wc-ajax-product-filter"),value:"radio"},{label:(0,u.__)("Select","wc-ajax-product-filter"),value:"select"},{label:(0,u.__)("Multiselect","wc-ajax-product-filter"),value:"multi-select"},{label:(0,u.__)("Label","wc-ajax-product-filter"),value:"label"}];function In(){return Nn}function Fn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[{label:(0,u.__)("Range - Slider","wc-ajax-product-filter"),value:"range_slider"},{label:(0,u.__)("Range - Number","wc-ajax-product-filter"),value:"range_number"}],n=[{label:(0,u.__)("Range - Checkbox","wc-ajax-product-filter"),value:"range_checkbox"},{label:(0,u.__)("Range - Radio","wc-ajax-product-filter"),value:"range_radio"},{label:(0,u.__)("Range - Select","wc-ajax-product-filter"),value:"range_select"},{label:(0,u.__)("Range - Multiselect","wc-ajax-product-filter"),value:"range_multiselect"},{label:(0,u.__)("Range - Label","wc-ajax-product-filter"),value:"range_label"}];return O(t,n,e)}function Mn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[{label:(0,u.__)("Input - Date","wc-ajax-product-filter"),value:"input_date"},{label:(0,u.__)("Input - Date Range","wc-ajax-product-filter"),value:"input_date_range"}],n=[{label:(0,u.__)("Time Period - Checkbox","wc-ajax-product-filter"),value:"time_period_checkbox"},{label:(0,u.__)("Time Period - Radio","wc-ajax-product-filter"),value:"time_period_radio"},{label:(0,u.__)("Time Period - Select","wc-ajax-product-filter"),value:"time_period_select"},{label:(0,u.__)("Time Period - Multiselect","wc-ajax-product-filter"),value:"time_period_multiselect"},{label:(0,u.__)("Time Period - Label","wc-ajax-product-filter"),value:"time_period_label"}];return O(t,n,e)}function An(e){const{type:t,value_type:n,display_type:r,number_display_type:a,date_display_type:o}=e;let i=!1;const l=["select","multi-select","hierarchy-select"],s=["range_slider","range_number","range_select","range_multiselect"];return"price"===t?s.includes(a)||(i=!0):"post-meta"===t?"text"===n?l.includes(r)||(i=!0):"number"===n?s.includes(a)||(i=!0):"date"===n&&(["input_date","input_date_range","time_period_select","time_period_multiselect"].includes(o)||(i=!0)):l.includes(r)||(i=!0),i}function Rn(e){const{type:t,display_type:n}=e;return!("taxonomy"!==t||!["checkbox","radio","label"].includes(n))}function Pn(){const e=wcapf_admin_params.form_default_data;return(0,c.merge)({},e,{form_locations:[{location:"product_archive_pages",sub_location:"",results_method:"",product_query:wcapf_admin_params.default_product_query||{}}]})}const Ln=[{label:(0,u.__)("Slide-out panel on desktop","wc-ajax-product-filter"),value:"slide_out_panel_on_desktop"},{label:(0,u.__)("Slide-out panel on mobile","wc-ajax-product-filter"),value:"slide_out_panel_on_mobile"},{label:(0,u.__)("Slide-out panel on both","wc-ajax-product-filter"),value:"slide_out_panel_on_both"}],Vn=y();var Hn=t=>{let{isOpen:n,closeModal:r}=t;return n&&(0,e.createElement)(d.Modal,{onRequestClose:r,__experimentalHideHeader:!0,className:"__pro_update_modal"},(0,e.createElement)("h3",null,"WCAPF - WooCommerce Ajax Product Filter Pro (Update Required)"),(0,e.createElement)("div",{className:"__separator"}),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:Vn}}),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},(0,u.__)("Cancel","wc-ajax-product-filter"))))},Bn=()=>{const{state:t,dispatch:n}=i(),{setDirty:r}=L(t,n),[a,o]=(0,e.useState)(!1),[l,d]=(0,e.useState)(!1),[p,f]=(0,e.useState)(!1),{isDirty:m,title:h,formId:_,filterKeys:g,currentTab:w,filterStates:E,formFilters:x,formSettings:C}=t;(0,e.useEffect)((()=>{m&&(q(),X())}),[m]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yn,{loading:p,handleTitleChange:e=>{h!==e&&(n({type:"SET_TITLE",payload:e}),r())},handleSubmit:()=>{m?y()?d(!0):(()=>{q();const{isValid:e,validatedFormFilters:t}=(()=>{n({type:"SET_ERROR",payload:""});const e=[],t=[];let r=!0;const a=["sort-by","per-page"],o=["results-count","apply-mode","submit-mode"];for(let n=0;n<x.length;n++){const i=x[n];if(a.includes(i.type)||o.includes(i.component))continue;const l=(0,c.omit)(i,["type_error","meta_key_error","field_key_error","field_key_error_"]);let s=!1;(0,c.isEmpty)(l.type)&&(s=!0,l.type_error=(0,u.__)("Filter type is required.","wc-ajax-product-filter")),"post-meta"===l.type&&(0,c.isEmpty)(l.meta_key)&&(s=!0,l.meta_key_error=(0,u.__)("Meta key is required.","wc-ajax-product-filter"));const d=jn(g,i,x,n);d&&(s=!0,l.field_key_error=d),s&&((0,c.has)(l,"isNew")?t.push(l.uniqueIndex):t.push(l.id),r=!1),e.push(l)}if(!r){const e={};for(const n in E)t.map(String).includes(n)?e[n]={accordionStatus:!0,currentTab:"general"}:e[n]={...E[n],accordionStatus:!1};n({type:"SET_FILTER_STATES",payload:e})}return n({type:"SET_FORM_FILTERS",payload:e}),r||(n({type:"SET_ERROR",payload:v}),"filters"!==w&&n({type:"SET_CURRENT_TAB",payload:"filters"})),{isValid:r,validatedFormFilters:e}})();if(!e)return;const r=(e=>{const t=[];return e.forEach((e=>{const n=["grid_columns","enable_swatch","swatch_type","swatch_with_label","get_options","manual_options","parent_term","direct_child_only","number_range_enable_multiple_filter","number_range_query_type","number_range_select_all_items_label","number_range_show_count","number_get_options","number_manual_options","value_type","value_decimal","value_decimal_places","date_input_format","time_period_enable_multiple_filter","time_period_query_type","time_period_select_all_items_label","time_period_show_count","time_period_options","options_order_type","search_field_placeholder","enable_visibility_rules","visibility_rules"];["color","image","hierarchy-select"].includes(e.display_type)&&n.push("display_type"),["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(e.number_display_type)&&n.push("number_display_type"),["time_period_checkbox","time_period_radio","time_period_select","time_period_multiselect","time_period_label"].includes(e.date_display_type)&&n.push("date_display_type"),["slug","count","include"].includes(e.order_terms_by)&&n.push("order_terms_by"),["child","parent_only"].includes(e.limit_options)&&n.push("limit_options"),["value","label","count","include"].includes(e.options_order_by)&&n.push("options_order_by"),["count","include"].includes(e.post_author_order_by)&&n.push("post_author_order_by"),"grid"===e.native_display_type_layout&&n.push("native_display_type_layout"),"grid"===e.custom_display_type_layout&&n.push("custom_display_type_layout");const r=(0,c.pick)(Tn(),n),a={...e,...r};t.push(a)})),t})(t),a=(()=>{const e=["form_locations","priority","form_layout","columns_per_row","show_form_on_top_of_products","filter_mode","show_clear_btn"];Ln.map((e=>e.value)).includes(C.form_visibility)&&e.push("form_visibility");const t=(0,c.pick)(Pn(),e);return{...C,...t}})();f(!0);const o=new FormData;o.append("action","wcapf_save_form"),o.append("nonce",b()),o.append("form_title",h),o.append("form_id",_),o.append("form_filters",JSON.stringify(r)),o.append("form_settings",JSON.stringify(a)),s().post(wcapf_admin_params.ajaxurl,o).then((e=>{f(!1);const{data:{data:t,success:r}}=e;if(r)n({type:"SET_FILTER_KEYS",payload:t.filter_keys}),n({type:"SET_FORM_FILTERS",payload:t.form_filters}),n({type:"SET_FORM_SETTINGS",payload:t.form_settings}),n({type:"SET_SHOW_REVIEW_NOTICE",payload:t.show_review_notice}),n({type:"SET_DIRTY",payload:!1}),wcapf_admin_params.dirty=!1,function(e){H(e,$,"👌")}((0,u.__)("Form saved successfully","wc-ajax-product-filter"));else if(t.errors){n({type:"SET_ERROR",payload:v});const e=t.errors;console.log(e);const r=x.map(((t,n)=>{const r=(0,c.find)(e,{order:n});if(r){const{key:e,message:n}=r;return{...t,[e]:n,type_error:"",meta_key_error:"",field_key_error:""}}return t}));n({type:"SET_FORM_FILTERS",payload:r});const a={};for(let t=0;t<r.length;t++){const n=(0,c.find)(e,{order:t}),o=r[t];let i;i=(0,c.has)(o,"isNew")?o.uniqueIndex:o.id,a[i]=n?{accordionStatus:!0,currentTab:"general"}:{...E[i],accordionStatus:!1}}n({type:"SET_FILTER_STATES",payload:a}),"filters"!==w&&n({type:"SET_CURRENT_TAB",payload:"filters"})}else W(t)})).catch((e=>{console.log(e),f(!1),W(e.message)}))})():(q(),o(!0))}}),(0,e.createElement)(wn,{isOpen:a,closeModal:()=>{U(),o(!1)}}),(0,e.createElement)(Hn,{isOpen:l,closeModal:()=>{d(!1)}}))},Un=window.wp.primitives,$n=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),zn=n(941),Wn=(0,e.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Un.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),qn=(0,e.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Un.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),Gn=function(t){let{icon:n,size:r=24,...a}=t;return(0,e.cloneElement)(n,{width:r,height:r,...a})},Yn=(0,e.createElement)(Un.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})),Xn=n(184),Kn=n.n(Xn),Zn=(e,t)=>{const{setDirty:n}=L(e,t),{formFilters:r}=e,a=(e,a,o)=>{if(r[e][a]===o)return;const i=r.map(((t,n)=>n===e?{...t,[a]:o}:t));t({type:"SET_FORM_FILTERS",payload:i}),n()},o=function(e,a,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=r[e];if(l[a]===o)return;const s=r.map(((t,n)=>n===e?{...t,...i}:t));t({type:"SET_FORM_FILTERS",payload:s}),n()},i=function(e,a,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=r[e];if(l[a]===o)return;const s=(0,c.pick)(Tn(),["taxonomy","taxHierarchical","meta_key","component","display_type","native_display_type_layout","custom_display_type_layout","grid_columns","enable_swatch","swatch_type","swatch_with_label","get_options","order_terms_by","order_terms_dir","limit_options","include_terms","include_child","exclude_terms","exclude_child","parent_term","direct_child_only","number_get_options","manual_options","number_manual_options","time_period_options","sort_by_options","per_page_options","value_type","value_decimal","value_decimal_places","options_order_by","options_order_dir","options_order_type"]),u=r.map(((t,n)=>{if(n===e){const e={...t,...s,...i};return["sort-by","per-page"].includes(o)&&(e.display_type="radio"),e}return t}));t({type:"SET_FORM_FILTERS",payload:u}),n()};return{handleFilterTypeChange:(e,t,n)=>{const{value:r,type:a,taxHierarchical:o}=e;"taxonomy"!==a?"component"!==a?i(n,t,r,{[t]:r,type_error:"",field_key_error_:""}):i(n,a,r,{[t]:a,component:r,type_error:"",field_key_error_:""}):i(n,a,r,{[t]:a,type_error:"",field_key_error_:"",taxonomy:r,taxHierarchical:o?"1":"",display_type:"checkbox"})},handleFilterKeyChange:(e,t,n)=>{const r=wpFeSanitizeTitle(e);o(n,[t],r,{[t]:r,field_key_error:"",field_key_error_:""})},handleMetaKeyChange:(e,t,n)=>{const a=e.value,i={[t]:a};a&&r[n].meta_key_error&&(i.meta_key_error=""),o(n,[t],a,i)},handleGetOptionsChange:(e,t,n)=>{const i=e.target.value,l=r[n];if("automatically"!==i)return void a(n,t,i);const{type:s,value_type:c}=l;"post-meta"===s&&"text"===c&&"include"===l.options_order_by?o(n,t,i,{[t]:i,options_order_by:"none"}):a(n,t,i)},handleCheckboxChange:(e,t,n)=>{a(n,t,e?"1":"")},handleRadioChange:(e,t,n)=>{const r=e.target.value;a(n,t,r)},handleTextFieldChange:(e,t,n)=>{a(n,t,e)},handleToggleGroupChange:(e,t,n)=>{a(n,t,e)},handleSelectChange:(e,t,n)=>{a(n,t,e.value)},handleSelectTermChange:(e,t,n)=>{a(n,t,e)},handleManualOptionsChange:function(e,a,o){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const l=r.map(((t,n)=>n===o?{...t,[a]:e}:t));t({type:"SET_FORM_FILTERS",payload:l}),i&&n()},handleShowHierarchyChange:(e,t,n)=>{const a=e?"1":"",i={[t]:a};a&&"soft_limit"===r[n].enable_reduce_height&&(i.enable_reduce_height="no"),o(n,[t],a,i)},handleVisibilityRulesChange:(e,t,n)=>{a(n,t,e)}}};function Jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qn(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 er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(n),!0).forEach((function(t){Jn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nr(e,t){if(e){if("string"==typeof e)return tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(e,t):void 0}}function rr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(e){i=!0,a=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||nr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ar(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var or=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lr(e,t){return lr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lr(e,t)}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function cr(e){return cr="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},cr(e)}function ur(e,t){if(t&&("object"===cr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dr(e){return function(e){if(Array.isArray(e))return tr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pr=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),fr=Math.abs,mr=String.fromCharCode,hr=Object.assign;function _r(e){return e.trim()}function vr(e,t,n){return e.replace(t,n)}function gr(e,t){return e.indexOf(t)}function br(e,t){return 0|e.charCodeAt(t)}function yr(e,t,n){return e.slice(t,n)}function wr(e){return e.length}function Er(e){return e.length}function xr(e,t){return t.push(e),e}var Cr=1,Or=1,Sr=0,jr=0,Tr=0,kr="";function Dr(e,t,n,r,a,o,i){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:Cr,column:Or,length:i,return:""}}function Nr(e,t){return hr(Dr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ir(){return Tr=jr>0?br(kr,--jr):0,Or--,10===Tr&&(Or=1,Cr--),Tr}function Fr(){return Tr=jr<Sr?br(kr,jr++):0,Or++,10===Tr&&(Or=1,Cr++),Tr}function Mr(){return br(kr,jr)}function Ar(){return jr}function Rr(e,t){return yr(kr,e,t)}function Pr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Lr(e){return Cr=Or=1,Sr=wr(kr=e),jr=0,[]}function Vr(e){return kr="",e}function Hr(e){return _r(Rr(jr-1,$r(91===e?e+2:40===e?e+1:e)))}function Br(e){for(;(Tr=Mr())&&Tr<33;)Fr();return Pr(e)>2||Pr(Tr)>3?"":" "}function Ur(e,t){for(;--t&&Fr()&&!(Tr<48||Tr>102||Tr>57&&Tr<65||Tr>70&&Tr<97););return Rr(e,Ar()+(t<6&&32==Mr()&&32==Fr()))}function $r(e){for(;Fr();)switch(Tr){case e:return jr;case 34:case 39:34!==e&&39!==e&&$r(Tr);break;case 40:41===e&&$r(e);break;case 92:Fr()}return jr}function zr(e,t){for(;Fr()&&e+Tr!==57&&(e+Tr!==84||47!==Mr()););return"/*"+Rr(t,jr-1)+"*"+mr(47===e?e:Fr())}function Wr(e){for(;!Pr(Mr());)Fr();return Rr(e,jr)}var qr="-ms-",Gr="-moz-",Yr="-webkit-",Xr="comm",Kr="rule",Zr="decl",Jr="@keyframes";function Qr(e,t){for(var n="",r=Er(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function ea(e,t,n,r){switch(e.type){case"@import":case Zr:return e.return=e.return||e.value;case Xr:return"";case Jr:return e.return=e.value+"{"+Qr(e.children,r)+"}";case Kr:e.value=e.props.join(",")}return wr(n=Qr(e.children,r))?e.return=e.value+"{"+n+"}":""}function ta(e,t){switch(function(e,t){return(((t<<2^br(e,0))<<2^br(e,1))<<2^br(e,2))<<2^br(e,3)}(e,t)){case 5103:return Yr+"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 Yr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Yr+e+Gr+e+qr+e+e;case 6828:case 4268:return Yr+e+qr+e+e;case 6165:return Yr+e+qr+"flex-"+e+e;case 5187:return Yr+e+vr(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Yr+e+qr+"flex-item-"+vr(e,/flex-|-self/,"")+e;case 4675:return Yr+e+qr+"flex-line-pack"+vr(e,/align-content|flex-|-self/,"")+e;case 5548:return Yr+e+qr+vr(e,"shrink","negative")+e;case 5292:return Yr+e+qr+vr(e,"basis","preferred-size")+e;case 6060:return Yr+"box-"+vr(e,"-grow","")+Yr+e+qr+vr(e,"grow","positive")+e;case 4554:return Yr+vr(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return vr(vr(vr(e,/(zoom-|grab)/,Yr+"$1"),/(image-set)/,Yr+"$1"),e,"")+e;case 5495:case 3959:return vr(e,/(image-set\([^]*)/,Yr+"$1$`$1");case 4968:return vr(vr(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Yr+e+e;case 4095:case 3583:case 4068:case 2532:return vr(e,/(.+)-inline(.+)/,Yr+"$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(wr(e)-1-t>6)switch(br(e,t+1)){case 109:if(45!==br(e,t+4))break;case 102:return vr(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+Gr+(108==br(e,t+3)?"$3":"$2-$3"))+e;case 115:return~gr(e,"stretch")?ta(vr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==br(e,t+1))break;case 6444:switch(br(e,wr(e)-3-(~gr(e,"!important")&&10))){case 107:return vr(e,":",":"+Yr)+e;case 101:return vr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Yr+(45===br(e,14)?"inline-":"")+"box$3$1"+Yr+"$2$3$1"+qr+"$2box$3")+e}break;case 5936:switch(br(e,t+11)){case 114:return Yr+e+qr+vr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Yr+e+qr+vr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Yr+e+qr+vr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Yr+e+qr+e+e}return e}function na(e){return Vr(ra("",null,null,null,[""],e=Lr(e),0,[0],e))}function ra(e,t,n,r,a,o,i,l,s){for(var c=0,u=0,d=i,p=0,f=0,m=0,h=1,_=1,v=1,g=0,b="",y=a,w=o,E=r,x=b;_;)switch(m=g,g=Fr()){case 40:if(108!=m&&58==x.charCodeAt(d-1)){-1!=gr(x+=vr(Hr(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=Hr(g);break;case 9:case 10:case 13:case 32:x+=Br(m);break;case 92:x+=Ur(Ar()-1,7);continue;case 47:switch(Mr()){case 42:case 47:xr(oa(zr(Fr(),Ar()),t,n),s);break;default:x+="/"}break;case 123*h:l[c++]=wr(x)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:_=0;case 59+u:f>0&&wr(x)-d&&xr(f>32?ia(x+";",r,n,d-1):ia(vr(x," ","")+";",r,n,d-2),s);break;case 59:x+=";";default:if(xr(E=aa(x,t,n,c,u,a,l,b,y=[],w=[],d),o),123===g)if(0===u)ra(x,t,E,E,y,o,d,l,w);else switch(p){case 100:case 109:case 115:ra(e,E,E,r&&xr(aa(e,E,E,0,0,a,l,b,a,y=[],d),w),a,w,d,l,r?y:w);break;default:ra(x,E,E,E,[""],w,0,l,w)}}c=u=f=0,h=v=1,b=x="",d=i;break;case 58:d=1+wr(x),f=m;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==Ir())continue;switch(x+=mr(g),g*h){case 38:v=u>0?1:(x+="\f",-1);break;case 44:l[c++]=(wr(x)-1)*v,v=1;break;case 64:45===Mr()&&(x+=Hr(Fr())),p=Mr(),u=d=wr(b=x+=Wr(Ar())),g++;break;case 45:45===m&&2==wr(x)&&(h=0)}}return o}function aa(e,t,n,r,a,o,i,l,s,c,u){for(var d=a-1,p=0===a?o:[""],f=Er(p),m=0,h=0,_=0;m<r;++m)for(var v=0,g=yr(e,d+1,d=fr(h=i[m])),b=e;v<f;++v)(b=_r(h>0?p[v]+" "+g:vr(g,/&\f/g,p[v])))&&(s[_++]=b);return Dr(e,t,n,0===a?Kr:l,s,c,u)}function oa(e,t,n){return Dr(e,t,n,Xr,mr(Tr),yr(e,2,-2),0)}function ia(e,t,n,r){return Dr(e,t,n,Zr,yr(e,0,r),yr(e,r+1,-1),r)}var la=function(e,t,n){for(var r=0,a=0;r=a,a=Mr(),38===r&&12===a&&(t[n]=1),!Pr(a);)Fr();return Rr(e,jr)},sa=new WeakMap,ca=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||sa.get(n))&&!r){sa.set(e,!0);for(var a=[],o=function(e,t){return Vr(function(e,t){var n=-1,r=44;do{switch(Pr(r)){case 0:38===r&&12===Mr()&&(t[n]=1),e[n]+=la(jr-1,t,n);break;case 2:e[n]+=Hr(r);break;case 4:if(44===r){e[++n]=58===Mr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=mr(r)}}while(r=Fr());return e}(Lr(e),t))}(t,a),i=n.props,l=0,s=0;l<o.length;l++)for(var c=0;c<i.length;c++,s++)e.props[s]=a[l]?o[l].replace(/&\f/g,i[c]):i[c]+" "+o[l]}}},ua=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},da=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Zr:e.return=ta(e.value,e.length);break;case Jr:return Qr([Nr(e,{value:vr(e.value,"@","@"+Yr)})],r);case Kr:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Qr([Nr(e,{props:[vr(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Qr([Nr(e,{props:[vr(t,/:(plac\w+)/,":-webkit-input-$1")]}),Nr(e,{props:[vr(t,/:(plac\w+)/,":-moz-$1")]}),Nr(e,{props:[vr(t,/:(plac\w+)/,qr+"input-$1")]})],r)}return""}))}}],pa=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,a,o=e.stylisPlugins||da,i={},l=[];r=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<t.length;n++)i[t[n]]=!0;l.push(e)}));var s,c,u,d,p=[ea,(d=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[ca,ua].concat(o,p),u=Er(c),function(e,t,n,r){for(var a="",o=0;o<u;o++)a+=c[o](e,t,n,r)||"";return a});a=function(e,t,n,r){s=n,Qr(na(e?e+"{"+t.styles+"}":t.styles),f),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new pr({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:a};return m.sheet.hydrate(l),m},fa=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ma=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=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(a){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)},ha={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},_a=/[A-Z]|^ms/g,va=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ga=function(e){return 45===e.charCodeAt(1)},ba=function(e){return null!=e&&"boolean"!=typeof e},ya=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=ga(n=e)?n:n.replace(_a,"-$&").toLowerCase()),t[e];var n}}(),wa=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(va,(function(e,t,n){return xa={name:t,styles:n,next:xa},t}))}return 1===ha[e]||ga(e)||"number"!=typeof t||0===t?t:t+"px"};function Ea(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 xa={name:n.name,styles:n.styles,next:xa},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)xa={name:r.name,styles:r.styles,next:xa},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=Ea(e,t,n[a])+";";else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=o+"{"+t[i]+"}":ba(i)&&(r+=ya(o)+":"+wa(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=Ea(e,t,i);switch(o){case"animation":case"animationName":r+=ya(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var s=0;s<i.length;s++)ba(i[s])&&(r+=ya(o)+":"+wa(o,i[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=xa,o=n(e);return xa=a,Ea(e,t,o)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var xa,Ca=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Oa=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";xa=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=Ea(n,t,o)):a+=o[0];for(var i=1;i<e.length;i++)a+=Ea(n,t,e[i]),r&&(a+=o[i]);Ca.lastIndex=0;for(var l,s="";null!==(l=Ca.exec(a));)s+="-"+l[1];return{name:ma(a)+s,styles:a,next:xa}},Sa={}.hasOwnProperty,ja=(0,Qt.createContext)("undefined"!=typeof HTMLElement?pa({key:"css"}):null);ja.Provider;var Ta=function(e){return(0,Qt.forwardRef)((function(t,n){var r=(0,Qt.useContext)(ja);return e(t,r,n)}))},ka=(0,Qt.createContext)({}),Da=Qt.useInsertionEffect?Qt.useInsertionEffect:function(e){e()},Na="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ia=function(e,t){var n={};for(var r in t)Sa.call(t,r)&&(n[r]=t[r]);return n[Na]=e,n},Fa=function(e){var t,n=e.cache,r=e.serialized,a=e.isStringTag;return fa(n,r,a),t=function(){return function(e,t,n){fa(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}(n,r,a)},Da(t),null},Ma=Ta((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var a=e[Na],o=[r],i="";"string"==typeof e.className?i=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,o,e.className):null!=e.className&&(i=e.className+" ");var l=Oa(o,void 0,(0,Qt.useContext)(ka));i+=t.key+"-"+l.name;var s={};for(var c in e)Sa.call(e,c)&&"css"!==c&&c!==Na&&(s[c]=e[c]);return s.ref=n,s.className=i,(0,Qt.createElement)(Qt.Fragment,null,(0,Qt.createElement)(Fa,{cache:t,serialized:l,isStringTag:"string"==typeof a}),(0,Qt.createElement)(a,s))}));n(679);var Aa=function(e,t){var n=arguments;if(null==t||!Sa.call(t,"css"))return Qt.createElement.apply(void 0,n);var r=n.length,a=new Array(r);a[0]=Ma,a[1]=Ia(e,t);for(var o=2;o<r;o++)a[o]=n[o];return Qt.createElement.apply(null,a)};function Ra(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oa(t)}Qt.useInsertionEffect?Qt.useInsertionEffect:Qt.useLayoutEffect;const Pa=Math.min,La=Math.max,Va=Math.round,Ha=Math.floor,Ba=e=>({x:e,y:e});function Ua(e){return Wa(e)?(e.nodeName||"").toLowerCase():"#document"}function $a(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function za(e){var t;return null==(t=(Wa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Wa(e){return e instanceof Node||e instanceof $a(e).Node}function qa(e){return e instanceof Element||e instanceof $a(e).Element}function Ga(e){return e instanceof HTMLElement||e instanceof $a(e).HTMLElement}function Ya(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof $a(e).ShadowRoot)}function Xa(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Ka(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function Ka(e){return $a(e).getComputedStyle(e)}function Za(e){const t=function(e){if("html"===Ua(e))return e;const t=e.assignedSlot||e.parentNode||Ya(e)&&e.host||za(e);return Ya(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(Ua(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ga(t)&&Xa(t)?t:Za(t)}function Ja(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=Za(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=$a(a);return o?t.concat(i,i.visualViewport||[],Xa(a)?a:[],i.frameElement&&n?Ja(i.frameElement):[]):t.concat(a,Ja(a,[],n))}function Qa(e){return qa(e)?e:e.contextElement}function eo(e){const t=Qa(e);if(!Ga(t))return Ba(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=function(e){const t=Ka(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ga(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=Va(n)!==o||Va(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}(t);let i=(o?Va(n.width):n.width)/r,l=(o?Va(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const to=Ba(0);function no(e){const t=$a(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:to}function ro(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=Qa(e);let i=Ba(1);t&&(r?qa(r)&&(i=eo(r)):i=eo(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==$a(e))&&t}(o,n,r)?no(o):Ba(0);let s=(a.left+l.x)/i.x,c=(a.top+l.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=$a(o),t=r&&qa(r)?$a(r):r;let n=e,a=n.frameElement;for(;a&&r&&t!==n;){const e=eo(a),t=a.getBoundingClientRect(),r=Ka(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=o,c+=i,n=$a(a),a=n.frameElement}}return function(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}({width:u,height:d,x:s,y:c})}var ao=Qt.useLayoutEffect,oo=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],io=function(){};function lo(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function so(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&o.push("".concat(lo(e,i)));return o.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var co=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===cr(e)&&null!==e?[e]:[];var t},uo=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,er({},ar(e,oo))},po=function(e,t,n){var r=e.cx,a=e.getStyles,o=e.getClassNames,i=e.className;return{css:a(t,e),className:r(null!=n?n:{},o(t,e),i)}};function fo(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function mo(e){return fo(e)?window.pageYOffset:e.scrollTop}function ho(e,t){fo(e)?window.scrollTo(0,t):e.scrollTop=t}function _o(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function vo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:io,a=mo(e),o=t-a,i=10,l=0;function s(){var t=_o(l+=i,a,o,n);ho(e,t),l<n?window.requestAnimationFrame(s):r(e)}s()}function go(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=t.offsetHeight/3;r.bottom+a>n.bottom?ho(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+a,e.scrollHeight)):r.top-a<n.top&&ho(e,Math.max(t.offsetTop-a,0))}function bo(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var yo=!1,wo={get passive(){return yo=!0}},Eo="undefined"!=typeof window?window:{};Eo.addEventListener&&Eo.removeEventListener&&(Eo.addEventListener("p",io,wo),Eo.removeEventListener("p",io,!1));var xo=yo;function Co(e){return null!=e}function Oo(e,t,n){return e?t:n}var So=["children","innerProps"],jo=["children","innerProps"];var To,ko,Do,No=function(e){return"auto"===e?"bottom":e},Io=(0,Qt.createContext)(null),Fo=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,a=e.menuPlacement,o=e.menuPosition,i=e.menuShouldScrollIntoView,l=e.theme,s=((0,Qt.useContext)(Io)||{}).setPortalPlacement,c=(0,Qt.useRef)(null),u=rr((0,Qt.useState)(r),2),d=u[0],p=u[1],f=rr((0,Qt.useState)(null),2),m=f[0],h=f[1],_=l.spacing.controlHeight;return ao((function(){var e=c.current;if(e){var t="fixed"===o,l=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,a=e.placement,o=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return a;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=s.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,_=n.offsetParent.getBoundingClientRect().top,v=i||fo(u=s)?window.innerHeight:u.clientHeight,g=mo(s),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),w=_-y,E=v-h,x=w+g,C=d-g-h,O=f-v+g+b,S=g+h-y,j=160;switch(a){case"auto":case"bottom":if(E>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!i)return o&&vo(s,O,j),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&E>=r)return o&&vo(s,O,j),{placement:"bottom",maxHeight:i?E-b:C-b};if("auto"===a||i){var T=t,k=i?w:x;return k>=r&&(T=Math.min(k-b-l,t)),{placement:"top",maxHeight:T}}if("bottom"===a)return o&&ho(s,O),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(x>=m&&!i)return o&&vo(s,S,j),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var D=t;return(!i&&x>=r||i&&w>=r)&&(D=i?w-y:x-y),o&&vo(s,S,j),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:a,shouldScroll:i&&!t,isFixedPosition:t,controlHeight:_});p(l.maxHeight),h(l.placement),null==s||s(l.placement)}}),[r,a,o,i,n,s,_]),t({ref:c,placerProps:er(er({},e),{},{placement:m||No(a),maxHeight:d})})},Mo=function(e,t){var n=e.theme,r=n.spacing.baseUnit,a=n.colors;return er({textAlign:"center"},t?{}:{color:a.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Ao=Mo,Ro=Mo,Po=["size"],Lo=["innerProps","isRtl","size"],Vo={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ho=function(e){var t=e.size,n=ar(e,Po);return Aa("svg",Z({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Vo},n))},Bo=function(e){return Aa(Ho,Z({size:20},e),Aa("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Uo=function(e){return Aa(Ho,Z({size:20},e),Aa("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},$o=function(e,t){var n=e.isFocused,r=e.theme,a=r.spacing.baseUnit,o=r.colors;return er({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*a,":hover":{color:n?o.neutral80:o.neutral40}})},zo=$o,Wo=$o,qo=function(){var e=Ra.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(To||(ko=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Do||(Do=ko.slice(0)),To=Object.freeze(Object.defineProperties(ko,{raw:{value:Object.freeze(Do)}})))),Go=function(e){var t=e.delay,n=e.offset;return Aa("span",{css:Ra({animation:"".concat(qo," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Yo=["data"],Xo=["innerRef","isDisabled","isHidden","inputClassName"],Ko={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Zo={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":er({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ko)},Jo=function(e){return er({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Ko)},Qo=function(e){var t=e.children,n=e.innerProps;return Aa("div",n,t)},ei={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Aa("div",Z({},po(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Aa(Bo,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,a=e.innerRef,o=e.innerProps,i=e.menuIsOpen;return Aa("div",Z({ref:a},po(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),o,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Aa("div",Z({},po(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Aa(Uo,null))},DownChevron:Uo,CrossIcon:Bo,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,a=e.getClassNames,o=e.Heading,i=e.headingProps,l=e.innerProps,s=e.label,c=e.theme,u=e.selectProps;return Aa("div",Z({},po(e,"group",{group:!0}),l),Aa(o,Z({},i,{selectProps:u,theme:c,getStyles:r,getClassNames:a,cx:n}),s),Aa("div",null,t))},GroupHeading:function(e){var t=uo(e);t.data;var n=ar(t,Yo);return Aa("div",Z({},po(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Aa("div",Z({},po(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Aa("span",Z({},t,po(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=uo(e),a=r.innerRef,o=r.isDisabled,i=r.isHidden,l=r.inputClassName,s=ar(r,Xo);return Aa("div",Z({},po(e,"input",{"input-container":!0}),{"data-value":n||""}),Aa("input",Z({className:t({input:!0},l),ref:a,style:Jo(i),disabled:o},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,a=void 0===r?4:r,o=ar(e,Lo);return Aa("div",Z({},po(er(er({},o),{},{innerProps:t,isRtl:n,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Aa(Go,{delay:0,offset:n}),Aa(Go,{delay:160,offset:!0}),Aa(Go,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Aa("div",Z({},po(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,a=e.isMulti;return Aa("div",Z({},po(e,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,a=e.innerProps,o=e.menuPlacement,i=e.menuPosition,l=(0,Qt.useRef)(null),s=(0,Qt.useRef)(null),c=rr((0,Qt.useState)(No(o)),2),u=c[0],d=c[1],p=(0,Qt.useMemo)((function(){return{setPortalPlacement:d}}),[]),f=rr((0,Qt.useState)(null),2),m=f[0],h=f[1],_=(0,Qt.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===i?0:window.pageYOffset,n=e[u]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||h({offset:n,rect:e})}}),[r,i,u,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);ao((function(){_()}),[_]);var v=(0,Qt.useCallback)((function(){"function"==typeof s.current&&(s.current(),s.current=null),r&&l.current&&(s.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Qa(e),u=a||o?[...c?Ja(c):[],...Ja(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const a=za(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const f={rootMargin:-Ha(u)+"px "+-Ha(a.clientWidth-(c+d))+"px "+-Ha(a.clientHeight-(u+p))+"px "+-Ha(c)+"px",threshold:La(0,Pa(1,s))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==s){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}m=!1}try{r=new IntersectionObserver(h,{...f,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(h,f)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,m=null;i&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!s&&m.observe(c),m.observe(t));let h=s?ro(e):null;return s&&function t(){const r=ro(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n(),h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(p)}}(r,l.current,_,{elementResize:"ResizeObserver"in window}))}),[r,_]);ao((function(){v()}),[v]);var g=(0,Qt.useCallback)((function(e){l.current=e,v()}),[v]);if(!t&&"fixed"!==i||!m)return null;var b=Aa("div",Z({ref:g},po(er(er({},e),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),a),n);return Aa(Io.Provider,{value:p},t?(0,tn.createPortal)(b,t):b)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,a=ar(e,jo);return Aa("div",Z({},po(er(er({},a),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,a=ar(e,So);return Aa("div",Z({},po(er(er({},a),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,a=e.innerProps,o=e.isDisabled,i=e.removeProps,l=e.selectProps,s=n.Container,c=n.Label,u=n.Remove;return Aa(s,{data:r,innerProps:er(er({},po(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),a),selectProps:l},Aa(c,{data:r,innerProps:er({},po(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Aa(u,{data:r,innerProps:er(er({},po(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:l}))},MultiValueContainer:Qo,MultiValueLabel:Qo,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Aa("div",Z({role:"button"},n),t||Aa(Bo,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,a=e.isSelected,o=e.innerRef,i=e.innerProps;return Aa("div",Z({},po(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":a}),{ref:o,"aria-disabled":n},i),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Aa("div",Z({},po(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,a=e.isRtl;return Aa("div",Z({},po(e,"container",{"--is-disabled":r,"--is-rtl":a}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Aa("div",Z({},po(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,a=e.hasValue;return Aa("div",Z({},po(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":a}),n),t)}},ti=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ni(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(a=t[n])||ti(r)&&ti(a)))return!1;var r,a;return!0}for(var ri={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},ai=function(e){return Aa("span",Z({css:ri},e))},oi={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,a=e.context,o=e.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,a=e.labels,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,a=e.label,o=void 0===a?"":a,i=e.selectValue,l=e.isDisabled,s=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(o," focused, ").concat(u(i,n),".");if("menu"===t&&c){var d=l?" disabled":"",p="".concat(s?" selected":"").concat(d);return"".concat(o).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ii=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,a=e.focusableOptions,o=e.isFocused,i=e.selectValue,l=e.selectProps,s=e.id,c=e.isAppleDevice,u=l.ariaLiveMessages,d=l.getOptionLabel,p=l.inputValue,f=l.isMulti,m=l.isOptionDisabled,h=l.isSearchable,_=l.menuIsOpen,v=l.options,g=l.screenReaderStatus,b=l.tabSelectsValue,y=l.isLoading,w=l["aria-label"],E=l["aria-live"],x=(0,Qt.useMemo)((function(){return er(er({},oi),u||{})}),[u]),C=(0,Qt.useMemo)((function(){var e,n="";if(t&&x.onChange){var r=t.option,a=t.options,o=t.removedValue,l=t.removedValues,s=t.value,c=o||r||(e=s,Array.isArray(e)?null:e),u=c?d(c):"",p=a||l||void 0,f=p?p.map(d):[],h=er({isDisabled:c&&m(c,i),label:u,labels:f},t);n=x.onChange(h)}return n}),[t,x,m,i,d]),O=(0,Qt.useMemo)((function(){var e="",t=n||r,o=!!(n&&i&&i.includes(n));if(t&&x.onFocus){var l={focused:t,label:d(t),isDisabled:m(t,i),isSelected:o,options:a,context:t===n?"menu":"value",selectValue:i,isAppleDevice:c};e=x.onFocus(l)}return e}),[n,r,d,m,x,a,i,c]),S=(0,Qt.useMemo)((function(){var e="";if(_&&v.length&&!y&&x.onFilter){var t=g({count:a.length});e=x.onFilter({inputValue:p,resultsMessage:t})}return e}),[a,p,_,x,v,g,y]),j="initial-input-focus"===(null==t?void 0:t.action),T=(0,Qt.useMemo)((function(){var e="";if(x.guidance){var t=r?"value":_?"menu":"input";e=x.guidance({"aria-label":w,context:t,isDisabled:n&&m(n,i),isMulti:f,isSearchable:h,tabSelectsValue:b,isInitialFocus:j})}return e}),[w,n,r,f,m,h,_,x,i,b,j]),k=Aa(Qt.Fragment,null,Aa("span",{id:"aria-selection"},C),Aa("span",{id:"aria-focused"},O),Aa("span",{id:"aria-results"},S),Aa("span",{id:"aria-guidance"},T));return Aa(Qt.Fragment,null,Aa(ai,{id:s},j&&k),Aa(ai,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!j&&k))},li=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],si=new RegExp("["+li.map((function(e){return e.letters})).join("")+"]","g"),ci={},ui=0;ui<li.length;ui++)for(var di=li[ui],pi=0;pi<di.letters.length;pi++)ci[di.letters[pi]]=di.base;var fi=function(e){return e.replace(si,(function(e){return ci[e]}))},mi=function(e,t){void 0===t&&(t=ni);var n=null;function r(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}(fi),hi=function(e){return e.replace(/^\s+|\s+$/g,"")},_i=function(e){return"".concat(e.label," ").concat(e.value)},vi=["innerRef"];function gi(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=Object.entries(e).filter((function(e){var t=rr(e,1)[0];return!n.includes(t)}));return a.reduce((function(e,t){var n=rr(t,2),r=n[0],a=n[1];return e[r]=a,e}),{})}(ar(e,vi),"onExited","in","enter","exit","appear");return Aa("input",Z({ref:t},n,{css:Ra({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var bi=["boxSizing","height","overflow","paddingRight","position"],yi={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function wi(e){e.preventDefault()}function Ei(e){e.stopPropagation()}function xi(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ci(){return"ontouchstart"in window||navigator.maxTouchPoints}var Oi=!("undefined"==typeof window||!window.document||!window.document.createElement),Si=0,ji={capture:!1,passive:!1},Ti=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},ki={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Di(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,a=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,a=e.onTopArrive,o=e.onTopLeave,i=(0,Qt.useRef)(!1),l=(0,Qt.useRef)(!1),s=(0,Qt.useRef)(0),c=(0,Qt.useRef)(null),u=(0,Qt.useCallback)((function(e,t){if(null!==c.current){var s=c.current,u=s.scrollTop,d=s.scrollHeight,p=s.clientHeight,f=c.current,m=t>0,h=d-p-u,_=!1;h>t&&i.current&&(r&&r(e),i.current=!1),m&&l.current&&(o&&o(e),l.current=!1),m&&t>h?(n&&!i.current&&n(e),f.scrollTop=d,_=!0,i.current=!0):!m&&-t>u&&(a&&!l.current&&a(e),f.scrollTop=0,_=!0,l.current=!0),_&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,a,o]),d=(0,Qt.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,Qt.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),f=(0,Qt.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;u(e,t)}),[u]),m=(0,Qt.useCallback)((function(e){if(e){var t=!!xo&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),h=(0,Qt.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,Qt.useEffect)((function(){if(t){var e=c.current;return m(e),function(){h(e)}}}),[t,m,h]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,a=(0,Qt.useRef)({}),o=(0,Qt.useRef)(null),i=(0,Qt.useCallback)((function(e){if(Oi){var t=document.body,n=t&&t.style;if(r&&bi.forEach((function(e){var t=n&&n[e];a.current[e]=t})),r&&Si<1){var o=parseInt(a.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,l=window.innerWidth-i+o||0;Object.keys(yi).forEach((function(e){var t=yi[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&Ci()&&(t.addEventListener("touchmove",wi,ji),e&&(e.addEventListener("touchstart",xi,ji),e.addEventListener("touchmove",Ei,ji))),Si+=1}}),[r]),l=(0,Qt.useCallback)((function(e){if(Oi){var t=document.body,n=t&&t.style;Si=Math.max(Si-1,0),r&&Si<1&&bi.forEach((function(e){var t=a.current[e];n&&(n[e]=t)})),t&&Ci()&&(t.removeEventListener("touchmove",wi,ji),e&&(e.removeEventListener("touchstart",xi,ji),e.removeEventListener("touchmove",Ei,ji)))}}),[r]);return(0,Qt.useEffect)((function(){if(t){var e=o.current;return i(e),function(){l(e)}}}),[t,i,l]),function(e){o.current=e}}({isEnabled:n});return Aa(Qt.Fragment,null,n&&Aa("div",{onClick:Ti,css:ki}),t((function(e){a(e),o(e)})))}var Ni={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Ii=function(e){var t=e.name,n=e.onFocus;return Aa("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Ni,value:"",onChange:function(){}})};function Fi(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Mi(){return Fi(/^Mac/i)}var Ai={clearIndicator:Wo,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,a=e.theme,o=a.colors,i=a.borderRadius;return er({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},dropdownIndicator:zo,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,a=n.spacing;return er({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*a.baseUnit,paddingRight:3*a.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,a=r.spacing.baseUnit,o=r.colors;return er({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*a,marginTop:2*a})},input:function(e,t){var n=e.isDisabled,r=e.value,a=e.theme,o=a.spacing,i=a.colors;return er(er({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Zo),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:i.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,a=e.theme,o=a.colors,i=a.spacing.baseUnit;return er({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*i})},loadingMessage:Ro,menu:function(e,t){var n,r=e.placement,a=e.theme,o=a.borderRadius,i=a.spacing,l=a.colors;return er((Jn(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Jn(n,"position","absolute"),Jn(n,"width","100%"),Jn(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return er({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},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,t){var n=e.theme,r=n.spacing,a=n.borderRadius,o=n.colors;return er({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:a/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,a=n.colors,o=e.cropWithEllipsis;return er({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,a=n.borderRadius,o=n.colors,i=e.isFocused;return er({alignItems:"center",display:"flex"},t?{}:{borderRadius:a/2,backgroundColor:i?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:Ao,option:function(e,t){var n=e.isDisabled,r=e.isFocused,a=e.isSelected,o=e.theme,i=o.spacing,l=o.colors;return er({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:a?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),":active":{backgroundColor:n?void 0:a?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,a=n.colors;return er({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:a.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,a=r.spacing,o=r.colors;return er({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,a=e.hasValue,o=e.selectProps.controlShouldRenderValue;return er({alignItems:"center",display:r&&a&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Ri={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}},Pi={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:bo(),captureMenuScroll:!bo(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=er({ignoreCase:!0,ignoreAccents:!0,stringify:_i,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,a=n.ignoreAccents,o=n.stringify,i=n.trim,l=n.matchFrom,s=i?hi(t):t,c=i?hi(o(e)):o(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),a&&(s=mi(s),c=fi(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-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(e){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,unstyled:!1};function Li(e,t,n,r){return{type:"option",data:t,isDisabled:qi(e,t,n),isSelected:Gi(e,t,n),label:zi(e,t),value:Wi(e,t),index:r}}function Vi(e,t){return e.options.map((function(n,r){if("options"in n){var a=n.options.map((function(n,r){return Li(e,n,t,r)})).filter((function(t){return Ui(e,t)}));return a.length>0?{type:"group",data:n,options:a,index:r}:void 0}var o=Li(e,n,t,r);return Ui(e,o)?o:void 0})).filter(Co)}function Hi(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,dr(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Bi(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,dr(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function Ui(e,t){var n=e.inputValue,r=void 0===n?"":n,a=t.data,o=t.isSelected,i=t.label,l=t.value;return(!Xi(e)||!o)&&Yi(e,{label:i,value:l,data:a},r)}var $i=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},zi=function(e,t){return e.getOptionLabel(t)},Wi=function(e,t){return e.getOptionValue(t)};function qi(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Gi(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Wi(e,t);return n.some((function(t){return Wi(e,t)===r}))}function Yi(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Xi=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Ki=1,Zi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lr(e,t)}(l,e);var t,n,r,a,o,i=(a=l,o=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(e){return!1}}(),function(){var e,t=sr(a);if(o){var n=sr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ur(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=Mi()||Fi(/^iPhone/i)||Fi(/^iPad/i)||Mi()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,a=r.onChange,o=r.name;n.name=o,t.ariaOnChange(e,n),a(e,n)},t.setValue=function(e,n,r){var a=t.props,o=a.closeMenuOnSelect,i=a.isMulti,l=a.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:l}),o&&(t.setState({inputIsHiddenAfterUpdate:!i}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,a=n.isMulti,o=n.name,i=t.state.selectValue,l=a&&t.isOptionSelected(e,i),s=t.isOptionDisabled(e,i);if(l){var c=t.getOptionValue(e);t.setValue(i.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void t.ariaOnChange(e,{action:"select-option",option:e,name:o});a?t.setValue([].concat(dr(i),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,a=t.getOptionValue(e),o=r.filter((function(e){return t.getOptionValue(e)!==a})),i=Oo(n,o,o[0]||null);t.onChange(i,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Oo(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],a=n.slice(0,n.length-1),o=Oo(e,a,a[0]||null);t.onChange(o,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return $i(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return Bi(Vi(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return so.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return zi(t.props,e)},t.getOptionValue=function(e){return Wi(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,a=Ai[e](n,r);a.boxSizing="border-box";var o=t.props.styles[e];return o?o(a,n):a},t.getClassNames=function(e,n){var r,a;return null===(r=(a=t.props.classNames)[e])||void 0===r?void 0:r.call(a,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,er(er({},ei),e.components);var e},t.buildCategorizedOptions=function(){return Vi(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return Hi(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:er({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,a=n.menuIsOpen;t.focusInput(),a?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&fo(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var a=Math.abs(r.clientX-t.initialTouchX),o=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=a>5||o>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return Xi(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,a=n.backspaceRemovesValue,o=n.escapeClearsValue,i=n.inputValue,l=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,m=f.focusedOption,h=f.focusedValue,_=f.selectValue;if(!(s||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||i)return;t.focusValue("previous");break;case"ArrowRight":if(!r||i)return;t.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(h)t.removeValue(h);else{if(!a)return;r?t.popValue():l&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&t.isOptionSelected(m,_))return;t.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(t.isComposing)return;t.selectOption(m);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:i}),t.onMenuClose()):l&&o&&t.clearValue();break;case" ":if(i)return;if(!c){t.openMenu("first");break}if(!m)return;t.selectOption(m);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++Ki),t.state.selectValue=co(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),r=t.buildFocusableOptions(),a=r.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=r[a],t.state.focusedOptionId=$i(n,r[a])}return t}return t=l,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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&go(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,a=this.state.isFocused;(a&&!n&&e.isDisabled||a&&r&&!e.menuIsOpen)&&this.focusInput(),a&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):a||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(go(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,a=n.isFocused,o=this.buildFocusableOptions(),i="first"===e?0:o.length-1;if(!this.props.isMulti){var l=o.indexOf(r[0]);l>-1&&(i=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[i],focusedOptionId:this.getFocusedOptionId(o[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 a=n.indexOf(r);r||(a=-1);var o=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===a?0:-1===a?o:a-1;break;case"next":a>-1&&a<o&&(i=a+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var a=0,o=r.indexOf(n);n||(o=-1),"up"===e?a=o>0?o-1:r.length-1:"down"===e?a=(o+1)%r.length:"pageup"===e?(a=o-t)<0&&(a=0):"pagedown"===e?(a=o+t)>r.length-1&&(a=r.length-1):"last"===e&&(a=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[a],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[a])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ri):er(er({},Ri),this.props.theme):Ri}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,a=this.getValue,o=this.selectOption,i=this.setValue,l=this.props,s=l.isMulti,c=l.isRtl,u=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:a,hasValue:this.hasValue(),isMulti:s,isRtl:c,options:u,selectOption:o,selectProps:l,setValue:i,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 qi(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Gi(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Yi(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,a=e.inputValue,o=e.tabIndex,i=e.form,l=e.menuIsOpen,s=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,f=this.commonProps,m=r||this.getElementId("input"),h=er(er(er({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":s,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Qt.createElement(c,Z({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:i,type:"text",value:a},h)):Qt.createElement(gi,Z({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:io,onFocus:this.onInputFocus,disabled:t,tabIndex:o,inputMode:"none",form:i,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,a=t.MultiValueLabel,o=t.MultiValueRemove,i=t.SingleValue,l=t.Placeholder,s=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,m=c.placeholder,h=this.state,_=h.selectValue,v=h.focusedValue,g=h.isFocused;if(!this.hasValue()||!u)return f?null:Qt.createElement(l,Z({},s,{key:"placeholder",isDisabled:d,isFocused:g,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return _.map((function(t,i){var l=t===v,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Qt.createElement(n,Z({},s,{components:{Container:r,Label:a,Remove:o},isFocused:l,isDisabled:d,key:c,index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var b=_[0];return Qt.createElement(i,Z({},s,{data:b,isDisabled:d}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,a=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||a)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Qt.createElement(e,Z({},t,{innerProps:i,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,a=n.isLoading,o=this.state.isFocused;return e&&a?Qt.createElement(e,Z({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,a=this.props.isDisabled,o=this.state.isFocused;return Qt.createElement(n,Z({},r,{isDisabled:a,isFocused:o}))}},{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,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Qt.createElement(e,Z({},t,{innerProps:a,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,a=t.Menu,o=t.MenuList,i=t.MenuPortal,l=t.LoadingMessage,s=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,m=p.inputValue,h=p.isLoading,_=p.loadingMessage,v=p.minMenuHeight,g=p.maxMenuHeight,b=p.menuIsOpen,y=p.menuPlacement,w=p.menuPosition,E=p.menuPortalTarget,x=p.menuShouldBlockScroll,C=p.menuShouldScrollIntoView,O=p.noOptionsMessage,S=p.onMenuScrollToTop,j=p.onMenuScrollToBottom;if(!b)return null;var T,k=function(t,n){var r=t.type,a=t.data,o=t.isDisabled,i=t.isSelected,l=t.label,s=t.value,p=d===a,f=o?void 0:function(){return e.onOptionHover(a)},m=o?void 0:function(){return e.selectOption(a)},h="".concat(e.getElementId("option"),"-").concat(n),_={id:h,onClick:m,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:i};return Qt.createElement(c,Z({},u,{innerProps:_,data:a,isDisabled:o,isSelected:i,key:h,label:l,type:r,value:s,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var a=t.data,o=t.options,i=t.index,l="".concat(e.getElementId("group"),"-").concat(i),s="".concat(l,"-heading");return Qt.createElement(n,Z({},u,{key:l,data:a,options:o,Heading:r,headingProps:{id:s,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(h){var D=_({inputValue:m});if(null===D)return null;T=Qt.createElement(l,u,D)}else{var N=O({inputValue:m});if(null===N)return null;T=Qt.createElement(s,u,N)}var I={minMenuHeight:v,maxMenuHeight:g,menuPlacement:y,menuPosition:w,menuShouldScrollIntoView:C},F=Qt.createElement(Fo,Z({},u,I),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,l=r.maxHeight;return Qt.createElement(a,Z({},u,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:i}),Qt.createElement(Di,{captureEnabled:f,onTopArrive:S,onBottomArrive:j,lockEnabled:x},(function(t){return Qt.createElement(o,Z({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:h,maxHeight:l,focusedOption:d}),T)})))}));return E||"fixed"===w?Qt.createElement(i,Z({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:y,menuPosition:w}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,a=t.isMulti,o=t.name,i=t.required,l=this.state.selectValue;if(i&&!this.hasValue()&&!r)return Qt.createElement(Ii,{name:o,onFocus:this.onValueInputFocus});if(o&&!r){if(a){if(n){var s=l.map((function(t){return e.getOptionValue(t)})).join(n);return Qt.createElement("input",{name:o,type:"hidden",value:s})}var c=l.length>0?l.map((function(t,n){return Qt.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):Qt.createElement("input",{name:o,type:"hidden",value:""});return Qt.createElement("div",null,c)}var u=l[0]?this.getOptionValue(l[0]):"";return Qt.createElement("input",{name:o,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,a=t.focusedValue,o=t.isFocused,i=t.selectValue,l=this.getFocusableOptions();return Qt.createElement(ii,Z({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:a,isFocused:o,selectValue:i,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,a=e.ValueContainer,o=this.props,i=o.className,l=o.id,s=o.isDisabled,c=o.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return Qt.createElement(r,Z({},d,{className:i,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:u}),this.renderLiveRegion(),Qt.createElement(t,Z({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:u,menuIsOpen:c}),Qt.createElement(a,Z({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),Qt.createElement(n,Z({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,a=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,i=t.isFocused,l=t.prevWasFocused,s=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=co(u),h={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var _=d?function(e,t){return Hi(Vi(e,t))}(e,m):[],v=d?Bi(Vi(e,m),"".concat(s,"-option")):[],g=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<t.length)return t[r]}return null}(t,m):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,_);h={selectValue:m,focusedOption:b,focusedOptionId:$i(v,b),focusableOptionsWithIds:v,focusedValue:g,clearFocusValueOnUpdate:!1}}var y=null!=a&&e!==n?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},w=o,E=i&&l;return i&&!E&&(w={value:Oo(f,m,m[0]||null),options:m,action:"initial-input-focus"},E=!l),"initial-input-focus"===(null==o?void 0:o.action)&&(w=null),er(er(er({},h),y),{},{prevProps:e,ariaSelection:w,prevWasFocused:E})}}],n&&ir(t.prototype,n),r&&ir(t,r),l}(Qt.Component);Zi.defaultProps=Pi;var Ji=(0,Qt.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,a=void 0!==r&&r,o=e.defaultValue,i=void 0===o?null:o,l=e.inputValue,s=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,f=e.value,m=ar(e,or),h=rr((0,Qt.useState)(void 0!==l?l:n),2),_=h[0],v=h[1],g=rr((0,Qt.useState)(void 0!==s?s:a),2),b=g[0],y=g[1],w=rr((0,Qt.useState)(void 0!==f?f:i),2),E=w[0],x=w[1],C=(0,Qt.useCallback)((function(e,t){"function"==typeof c&&c(e,t),x(e)}),[c]),O=(0,Qt.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),v(void 0!==n?n:e)}),[u]),S=(0,Qt.useCallback)((function(){"function"==typeof p&&p(),y(!0)}),[p]),j=(0,Qt.useCallback)((function(){"function"==typeof d&&d(),y(!1)}),[d]),T=void 0!==l?l:_,k=void 0!==s?s:b,D=void 0!==f?f:E;return er(er({},m),{},{inputValue:T,menuIsOpen:k,onChange:C,onInputChange:O,onMenuClose:j,onMenuOpen:S,value:D})}(e);return Qt.createElement(Zi,Z({ref:t},n))})),Qi=Ji,el=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const tl={control:e=>({...e,height:30,minHeight:30}),dropdownIndicator:e=>({...e,padding:"0 4px 0 0"}),clearIndicator:e=>({...e,paddingTop:0,paddingBottom:0}),input:e=>({...e,paddingTop:0,paddingBottom:0}),singleValue:e=>({...e,marginLeft:0,marginRight:0}),menuPortal:e=>({...e,zIndex:300}),menu:e=>({...e,borderRadius:2,boxShadow:"none",border:"1px solid #ddd",marginTop:5,marginBottom:5,zIndex:300}),menuList:e=>({...e,padding:0,borderRadius:2}),option:(e,t)=>{let{isFocused:n}=t;return{...e,padding:"1px 8px",lineHeight:"28px",backgroundColor:n?"#ddd":"transparent",color:"unset"}},group:e=>({...e,paddingBottom:0}),groupHeading:e=>({...e,padding:"0 8px"})},nl=()=>null,rl=()=>(0,e.createElement)(d.Icon,{icon:qn,size:18}),al=t=>(0,e.createElement)(ei.DropdownIndicator,t,(0,e.createElement)(rl,null)),ol=t=>{const{data:n,isSelected:r}=t,{label:a,isPro:o}=n;return(0,e.createElement)(ei.Option,t,(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__option_label"},a,o&&(0,e.createElement)("span",{className:"__pro_tag"})),r&&(0,e.createElement)(d.Icon,{icon:el,className:"__icon"})))},il=t=>{let{value:n}=t;return(0,e.createElement)("span",{className:"__info"},"[",(0,u.sprintf)((0,u.__)("ID: %s","wc-ajax-product-filter"),n),"]")},ll=t=>{const{data:n}=t,{label:r,isPro:a}=n;return(0,e.createElement)(ei.SingleValue,t,r,a&&(0,e.createElement)("span",{className:"__pro_tag"}))},sl=t=>t.data.proGroup?(0,e.createElement)(ei.Group,Z({},t,{className:"__pro_group"})):t.data.components?(0,e.createElement)(ei.Group,Z({},t,{className:"__form_components"})):(0,e.createElement)(ei.Group,t),cl=t=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"__name"},t.label),(0,e.createElement)(il,{value:t.value})),ul=t=>t.proGroup?(0,e.createElement)("span",{className:"__pro_heading_wrapper"},(0,e.createElement)("span",{className:"__pro_heading"},(0,u.__)("Pro","wc-ajax-product-filter"))):t.components?(0,e.createElement)("span",{className:"__form_components_divider"},(0,e.createElement)("span",{className:"__form_components_heading"},(0,u.__)("Components","wc-ajax-product-filter"))):(0,e.createElement)("span",null,t.label),dl=t=>{let{inputId:n,placeholder:r,options:a,value:o,onChange:i,classes:l,isSearchable:s,portalTarget:c,maxMenuHeight:d,isDisabled:p}=t;return(0,e.createElement)(Qi,{inputId:n,components:{IndicatorSeparator:nl,DropdownIndicator:al,Option:ol,SingleValue:ll,Group:sl},formatGroupLabel:ul,isSearchable:s,placeholder:r,noOptionsMessage:()=>(0,u.__)("No option found","wc-ajax-product-filter"),options:a,value:o,onChange:i,styles:tl,className:l,isDisabled:p,menuPortalTarget:c,maxMenuHeight:d,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})})};var pl=t=>{let n,{id:r,index:a="",label:o,description:i,placeholder:l,options:s,value:c,onChange:u,isSearchable:d=!1,renderAsFormField:p=!1,inputKey:f,portalTarget:m=!1,maxMenuHeight:h,isPro:_=!1,isDisabled:v=!1,tooltip:g}=t,b="__custom_react_select __single_select";r&&(b+=` ${r}`);const y=E(r,a);return n=p?(0,e.createElement)("div",{className:"__form_control react_select_simple"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:y},o,x(_))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(dl,{key:f,inputId:y,placeholder:l,options:s,value:c,classes:b,isSearchable:d,isDisabled:v,portalTarget:m,maxMenuHeight:h,onChange:e=>u(e,r,a)}),g&&(0,e.createElement)(hn,{content:g})))),i&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:i}})):(0,e.createElement)(dl,{key:f,inputId:y,placeholder:l,options:s,value:c,classes:b,isDisabled:v,portalTarget:m,maxMenuHeight:h,onChange:e=>u(e),isSearchable:d}),n},fl=t=>{let{id:n,index:r="",label:a,isChecked:o,onChange:i,description:l,tooltip:s,isPro:c,isDisabled:u}=t;const p=E(n,r);return(0,e.createElement)("div",{className:"__form_control __checkbox_toggle"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:p},a,x(c),s&&(0,e.createElement)(hn,{content:s}))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(d.CheckboxControl,{checked:o,id:p,onChange:e=>i(e,n,r),disabled:u})))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}}))},ml=t=>{let{label:n,id:r,index:a="",value:o,onChange:i,description:l,isPro:s,...c}=t;return(0,e.createElement)("div",{className:"__form_control number"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:E(r,a)},n,x(s))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(bn,Z({id:r,index:a,value:o,onChange:i,renderAsFormField:!1,type:"number"},c))))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}}))},hl=t=>{let{label:n,id:r,index:a="",value:o,options:i,isVertical:l,onChange:s,description:c,tooltip:u,isPro:d}=t;return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,x(d),u&&(0,e.createElement)(hn,{content:u}))),(0,e.createElement)("div",{className:Kn()("__wrapper","radio-group",r,{"radio-group-vertical":l})},(0,e.createElement)("div",{className:"__input_wrapper"},i.map(((t,n)=>{const i=E(r,a,n);return(0,e.createElement)("div",{key:i,className:"components-radio-control__option"},(0,e.createElement)("input",{id:i,className:"components-radio-control__input",type:"radio",value:t.value,onChange:e=>s(e,r,a),checked:t.value===o}),(0,e.createElement)("label",{htmlFor:i},t.label,x(t.isPro)))}))))),c&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:c}}))};const _l=["reset-button","results-count","apply-mode","submit-mode"];var vl=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleFilterTypeChange:o,handleFilterKeyChange:l,handleMetaKeyChange:s,handleTextFieldChange:p,handleRadioChange:f,handleCheckboxChange:m}=Zn(r,a),{filterKeys:h,formFilters:_}=r,v=_[n],{id:g,title:b,type_error:y,type:w,meta_key_error:E,meta_key:x,component:C,value_type:O,value_decimal:S,value_decimal_places:j,date_input_format:T,field_key:k,field_key_error:D,field_key_error_:N,show_title:I,active_filters_layout:F,empty_filter_message:M,show_if_empty:A}=v;let R,P,L,V,H;if(g&&(R=(0,u.__)("Filter type can not be changed once it is saved. But you can permanently delete the filter and add a new one.","wc-ajax-product-filter"),P=(0,u.__)('Once a filter key is set, you can not change it from the filter. But you can change the filter keys globally from "Settings > Filter Keys" tab.',"wc-ajax-product-filter")),g)L=wcapf_admin_params.filter_types,V=wcapf_admin_params.meta_keys;else{const e=[..._];e.splice(n,1),L=function(e){const t=wcapf_admin_params.filter_types,n=(0,c.find)(t,{value:"taxonomy"}).options.map((t=>{const{value:n}=t;return(0,c.find)(e,{taxonomy:n})?{...t,isDisabled:!0}:t}));return t.map((t=>{const{value:r}=t;return"taxonomy"===r?{...t,options:n}:"post-meta"===r?t:(0,c.find)(e,{type:r})?{...t,isDisabled:!0}:t}))}(e),V=function(e){return wcapf_admin_params.meta_keys.map((t=>(0,c.find)(e,{meta_key:t.value})?{...t,isDisabled:!0}:t))}(e),H=Sn(h,v),H&&(P=(0,u.__)('This key is already assigned for this entity and can not be changed from here. But you can change the filter keys globally from "Settings > Filter Keys" tab.',"wc-ajax-product-filter"))}const B=En(v),U=xn(v,B),$=Cn(v,B),z=V.find((e=>e.value===x));let W;!H&&D?W=D:N&&(W=N);const q=!("component"===w&&_l.includes(C));return(0,e.createElement)(e.Fragment,null,q&&(0,e.createElement)(bn,{id:"title",index:n,label:(0,u.__)("Filter Title","wc-ajax-product-filter"),description:(0,u.__)("Give a title to the filter that will appear before the filter options.","wc-ajax-product-filter"),value:b,placeholder:U,onChange:p}),y&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},y),(0,e.createElement)(pl,{id:"type",index:n,label:(0,u.__)("Filter Type","wc-ajax-product-filter"),description:(0,u.__)("Determines the entity by which the products will be filtered.","wc-ajax-product-filter"),options:L,value:B,onChange:o,isDisabled:g,renderAsFormField:!0,tooltip:R}),"post-meta"===w&&(0,e.createElement)(e.Fragment,null,E&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},E),(0,e.createElement)(pl,{id:"meta_key",index:n,label:(0,u.__)("Meta Key","wc-ajax-product-filter"),description:(0,u.__)("Select the meta key that values will be available as filter options.","wc-ajax-product-filter"),options:V,value:z,onChange:s,isSearchable:!0,isDisabled:g,renderAsFormField:!0}),(0,e.createElement)(hl,{id:"value_type",index:n,label:(0,u.__)("Value Type","wc-ajax-product-filter"),description:(0,u.__)("Determines the meta value type.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Text","wc-ajax-product-filter"),value:"text"},{label:(0,u.__)("Number","wc-ajax-product-filter"),value:"number",isPro:!0},{label:(0,u.__)("Date","wc-ajax-product-filter"),value:"date",isPro:!0}],onChange:f,value:O,isDisabled:g})),"post-meta"===w&&"number"===O&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"value_decimal",index:n,label:(0,u.__)("Value is decimal","wc-ajax-product-filter"),description:(0,u.__)("Enable this if the meta values have decimal places. It'll filter the products more accurately.","wc-ajax-product-filter"),isChecked:S,onChange:m}),"1"===S&&(0,e.createElement)(ml,{id:"value_decimal_places",index:n,label:(0,u.__)("Decimal Places","wc-ajax-product-filter"),description:(0,u.__)("Determines the number of decimal places in meta values.","wc-ajax-product-filter"),value:j,onChange:p,min:0})),"post-meta"===w&&"date"===O&&(0,e.createElement)(hl,{id:"date_input_format",index:n,label:(0,u.__)("Date Format","wc-ajax-product-filter"),description:(0,u.__)("Determines the format of the date saved in the database.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Timestamp","wc-ajax-product-filter"),value:"timestamp"},{label:(0,u.__)("YYYYMMDD","wc-ajax-product-filter"),value:"yyyymmdd"}],value:T,onChange:f}),"component"!==w&&(0,e.createElement)(e.Fragment,null,W&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},W),(0,e.createElement)(bn,{id:"field_key",index:n,label:(0,u.__)("Filter Key","wc-ajax-product-filter"),description:(0,u.__)('The unique key that will be used in the URL. Only a-z, 0-9, "_" and "-" symbols are supported.',"wc-ajax-product-filter"),value:H||k,placeholder:$,onChange:l,isDisabled:g||H,tooltip:P,isFilterKey:!0})),"active-filters"===C&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"show_title",index:n,label:(0,u.__)("Show title","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the title before the active filters.","wc-ajax-product-filter"),isChecked:I,onChange:m}),(0,e.createElement)(hl,{id:"active_filters_layout",index:n,label:(0,u.__)("Layout","wc-ajax-product-filter"),description:(0,u.__)("Simple: Show all the active items one by one, Extended: Group the active items by filter type and show them separately with filter title.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Simple","wc-ajax-product-filter"),value:"simple"},{label:(0,u.__)("Extended","wc-ajax-product-filter"),value:"extended"}],value:F,onChange:f}),(0,e.createElement)(bn,{id:"empty_filter_message",index:n,label:(0,u.__)("No filter applied message","wc-ajax-product-filter"),description:(0,u.__)("Show a message when no filter is applied. Leave it empty to not show the active filters when no filter is applied.","wc-ajax-product-filter"),value:M,onChange:p}),(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("p",null,"A shortcode ",(0,e.createElement)("code",null,"[wcapf_active_filters]")," is available to show the active filters outside the form."))),"reset-button"===C&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"show_if_empty",index:n,label:(0,u.__)("Always show","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the reset button as disabled when no filter is applied.","wc-ajax-product-filter"),isChecked:A,onChange:m}),(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("p",null,"A shortcode ",(0,e.createElement)("code",null,"[wcapf_reset_button]")," is available to show the reset button outside the form."))),"results-count"===C&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"show_if_empty",index:n,label:(0,u.__)("Show conditionally","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the results count only when a filter is applied.","wc-ajax-product-filter"),isChecked:A,onChange:m}),(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("p",null,"A shortcode ",(0,e.createElement)("code",null,"[wcapf_results_count]")," is available to show the results count outside the form."))))},gl=t=>{let{label:n,id:r,index:a="",value:o,options:i,onChange:l,description:s,isPro:c,isDisabled:u=!1}=t;return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,x(c))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(d.ButtonGroup,null,i.map((t=>{const n=E(r,a,t.value);return(0,e.createElement)(d.Button,{value:t.value,key:n,onClick:()=>l(t.value,r,a),variant:o===t.value?"primary":"",disabled:u},t.label,x(t.isPro))})))))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))},bl=(t,n)=>{const{state:r,dispatch:a}=i(),{handleSelectChange:o,handleRadioChange:l,handleCheckboxChange:s,handleTextFieldChange:c,handleToggleGroupChange:d}=Zn(r,a),{formFilters:p}=r,f=p[n],{type:m,display_type:h,native_display_type_layout:_,custom_display_type_layout:v,grid_columns:g,enable_multiple_filter:b,enable_tooltip:y,tooltip_position:w,show_count_in_tooltip:E,number_display_type:x,number_range_enable_multiple_filter:C,date_display_type:O,time_period_enable_multiple_filter:S}=f,j=An(f);return{layoutFields:t=>{let r,a,i=[];if(["checkbox","radio","range_checkbox","range_radio","time_period_checkbox","time_period_radio"].includes(t)?(r=_,a="native_display_type_layout",i=[{label:(0,u.__)("List","wc-ajax-product-filter"),value:"list"},{label:(0,u.__)("Inline","wc-ajax-product-filter"),value:"inline"},{label:(0,u.__)("Grid","wc-ajax-product-filter"),value:"grid",isPro:!0}]):["label","range_label","time_period_label"].includes(t)&&(r=v,a="custom_display_type_layout",i=[{label:(0,u.__)("Inline","wc-ajax-product-filter"),value:"inline"},{label:(0,u.__)("Grid","wc-ajax-product-filter"),value:"grid",isPro:!0}]),!r)return;const l=i.find((e=>r===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(pl,{id:a,index:n,label:(0,u.__)("Layout","wc-ajax-product-filter"),description:(0,u.__)("Determines the arrangement of the filter options in the front end.","wc-ajax-product-filter"),options:i,value:l,onChange:o,renderAsFormField:!0}),"grid"===r&&(0,e.createElement)(ml,{id:"grid_columns",index:n,label:(0,u.__)("Columns","wc-ajax-product-filter"),description:(0,u.__)("Specifies the number of columns to be displayed in the grid layout.","wc-ajax-product-filter"),value:g,onChange:c,min:1,max:12}))},enableMultipleFilterField:r=>{let a=!1;if("text"===t?a="label"===h||"color"===h||"image"===h:"number"===t?a="range_label"===x:"date"===t&&(a="time_period_label"===O),a)return(0,e.createElement)(fl,{id:r,index:n,label:(0,u.__)("Multiple Selection","wc-ajax-product-filter"),description:(0,u.__)("Controls whether users can select multiple options when filtering products.","wc-ajax-product-filter"),isChecked:f[r],onChange:s})},queryTypeField:r=>{let a=!1;if("text"===t?"checkbox"===h||"multi-select"===h?a=!0:"label"!==h&&"color"!==h&&"image"!==h||"1"!==b||(a=!0):"number"===t?("range_checkbox"===x||"range_multiselect"===x||"range_label"===x&&"1"===C)&&(a=!0):"date"===t&&("time_period_checkbox"===O||"time_period_multiselect"===O||"time_period_label"===O&&"1"===S)&&(a=!0),a)return(0,e.createElement)(hl,{id:r,index:n,label:(0,u.__)("Query Type","wc-ajax-product-filter"),description:(0,u.__)('Choose "OR" to display products matching any selected option or "AND" to show products matching all selected options.',"wc-ajax-product-filter"),options:[{label:(0,u.__)("OR","wc-ajax-product-filter"),value:"or"},{label:(0,u.__)("AND","wc-ajax-product-filter"),value:"and"}],onChange:l,value:f[r]})},allItemsLabelField:r=>{let a=!1;if("text"===t?a=["radio","select","multi-select"].includes(h):"number"===t?a=["range_radio","range_select","range_multiselect"].includes(x):"date"===t&&(a=["time_period_radio","time_period_select","time_period_multiselect"].includes(O)),a)return(0,e.createElement)(bn,{id:r,index:n,label:(0,u.__)("All Items Label","wc-ajax-product-filter"),description:(0,u.__)("Change the default option label. Leave blank to use the default label.","wc-ajax-product-filter"),value:f[r],onChange:c})},showCountField:r=>{if((()=>{let e=!1;return"text"===t?e=!["sort-by","per-page"].includes(m):"number"===t?["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(x)&&(e=!0):"date"===t&&["time_period_checkbox","time_period_radio","time_period_select","time_period_multiselect","time_period_label"].includes(O)&&(e=!0),e})())return(0,e.createElement)(fl,{id:r,index:n,label:(0,u.__)("Show count","wc-ajax-product-filter"),description:(0,u.__)("Determines whether the product count is shown alongside the filter options.","wc-ajax-product-filter"),isChecked:f[r],onChange:s})},enableTooltipField:()=>{if(j)return(0,e.createElement)(fl,{id:"enable_tooltip",index:n,label:(0,u.__)("Enable tooltip","wc-ajax-product-filter"),description:(0,u.__)("Display additional information in a tooltip when users hover over the option.","wc-ajax-product-filter"),isChecked:y,onChange:s})},tooltipPositionField:()=>{if(j&&"1"===y)return(0,e.createElement)(gl,{id:"tooltip_position",index:n,label:(0,u.__)("Tooltip position","wc-ajax-product-filter"),description:(0,u.__)("Determines on which side the tooltip will be placed.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Top","wc-ajax-product-filter"),value:"top"},{label:(0,u.__)("Right","wc-ajax-product-filter"),value:"right"},{label:(0,u.__)("Bottom","wc-ajax-product-filter"),value:"bottom"},{label:(0,u.__)("Left","wc-ajax-product-filter"),value:"left"}],onChange:d,value:w})},showCountInTooltipField:()=>{if(j&&"1"===y)return(0,e.createElement)(fl,{id:"show_count_in_tooltip",index:n,label:(0,u.__)("Count in tooltip","wc-ajax-product-filter"),description:(0,u.__)("Enable this to show the product count in the tooltip.","wc-ajax-product-filter"),isChecked:E,onChange:s})}}},yl=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleCheckboxChange:o,handleSelectChange:l,handleShowHierarchyChange:s,handleRadioChange:d}=Zn(r,a),{layoutFields:p,enableMultipleFilterField:f,queryTypeField:m,allItemsLabelField:h,showCountField:_,enableTooltipField:v,tooltipPositionField:g,showCountInTooltipField:b}=bl("text",n),{formFilters:y}=r,w=y[n],{type:E,taxHierarchical:x,display_type:C,native_display_type_layout:S,hierarchical:j,enable_hierarchy_accordion:T,value_type:k,enable_swatch:D,swatch_type:N,swatch_with_label:I}=w;return(0,e.createElement)(e.Fragment,null,(()=>{let t,r=[];return r="taxonomy"===E?function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return O(Nn,[],e)}(!0,x):"post-meta"===E&&"text"===k?In():"sort-by"===E||"per-page"===E?[{label:(0,u.__)("Radio","wc-ajax-product-filter"),value:"radio"},{label:(0,u.__)("Select","wc-ajax-product-filter"),value:"select"}]:In(),t=r.find((e=>C===e.value)),["checkbox","radio","select","multi-select","label"].includes(C)||(t=(0,c.find)(r,{proGroup:!0}).options.find((e=>e.value===C))),(0,e.createElement)(pl,{id:"display_type",index:n,label:(0,u.__)("Display","wc-ajax-product-filter"),description:(0,u.__)("Determines how the filter options are presented in the front end.","wc-ajax-product-filter"),options:r,value:t,onChange:l,renderAsFormField:!0})})(),p(C),f("enable_multiple_filter"),m("query_type"),h("all_items_label"),(()=>{if("1"===x&&["checkbox","radio","select","multi-select"].includes(C)&&"list"===S)return(0,e.createElement)(fl,{id:"hierarchical",index:n,label:(0,u.__)("Show hierarchy","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the filter options as hierarchical.","wc-ajax-product-filter"),isChecked:j,onChange:s})})(),(()=>{if("1"===x&&"1"===j&&["checkbox","radio","select","multi-select"].includes(C)&&"list"===S&&!["select","multi-select"].includes(C))return(0,e.createElement)(fl,{id:"enable_hierarchy_accordion",index:n,label:(0,u.__)("Enable hierarchy accordion","wc-ajax-product-filter"),description:(0,u.__)("Whether to enable accordion for the hierarchy filter options.","wc-ajax-product-filter"),isChecked:T,onChange:o})})(),_("show_count"),v(),g(),b(),(()=>{if(Rn(w))return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"enable_swatch",index:n,label:(0,u.__)("Enable swatches","wc-ajax-product-filter"),description:(0,u.__)("Should the filter options be displayed using color/image swatches?","wc-ajax-product-filter"),isChecked:D,onChange:o,isPro:!0}),"1"===D&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(hl,{id:"swatch_type",index:n,label:(0,u.__)("Swatch type","wc-ajax-product-filter"),description:(0,u.__)("Select the swatch type, color, or image.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Color","wc-ajax-product-filter"),value:"color"},{label:(0,u.__)("Image","wc-ajax-product-filter"),value:"image"}],onChange:d,value:N}),(0,e.createElement)(fl,{id:"swatch_with_label",index:n,label:(0,u.__)("Swatch with label","wc-ajax-product-filter"),description:(0,u.__)("Enable this to display the label beside the swatch.","wc-ajax-product-filter"),isChecked:I,onChange:o})))})())},wl=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleRadioChange:o,handleToggleGroupChange:l,handleSelectChange:s,handleCheckboxChange:d}=Zn(r,a),{formFilters:p}=r,f=p[n],{layoutFields:m,enableMultipleFilterField:h,queryTypeField:_,allItemsLabelField:v,showCountField:g,enableTooltipField:b,showCountInTooltipField:y,tooltipPositionField:w}=bl("number",n),{number_display_type:E,number_range_slider_display_values_as:x,alignment:C,input_type_number:O}=f;return(0,e.createElement)(e.Fragment,null,(()=>{const t=Fn(!0);let r;return r=t.find((e=>e.value===E)),["range_slider","range_number"].includes(E)||(r=(0,c.find)(t,{proGroup:!0}).options.find((e=>e.value===E))),(0,e.createElement)(pl,{id:"number_display_type",index:n,label:(0,u.__)("Display Type","wc-ajax-product-filter"),description:(0,u.__)("Determines how the filter will be shown in the front end.","wc-ajax-product-filter"),options:t,value:r,onChange:s,renderAsFormField:!0})})(),(()=>{if("range_slider"===E)return(0,e.createElement)(hl,{id:"number_range_slider_display_values_as",index:n,label:(0,u.__)("Display slider values as","wc-ajax-product-filter"),description:(0,u.__)("Determines how the slider values will be shown in the front end.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Input Field","wc-ajax-product-filter"),value:"input_field"},{label:(0,u.__)("Plain Text","wc-ajax-product-filter"),value:"plain_text"}],onChange:o,value:x})})(),m(E),(()=>{if("range_slider"===E&&"plain_text"===x)return(0,e.createElement)(gl,{id:"alignment",index:n,label:(0,u.__)("Alignment","wc-ajax-product-filter"),description:(0,u.__)("Whether to align the text in the center or justified by distributing space between them.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Default","wc-ajax-product-filter"),value:"default"},{label:(0,u.__)("Centered","wc-ajax-product-filter"),value:"centered"},{label:(0,u.__)("Justified","wc-ajax-product-filter"),value:"justified"}],value:C,onChange:l})})(),(()=>{if("range_slider"===E&&"input_field"===x||"range_number"===E)return(0,e.createElement)(fl,{id:"input_type_number",index:n,label:(0,u.__)("Input type number","wc-ajax-product-filter"),description:(0,u.__)("Enable this to hide units and display them as spinbox with up and down arrows.","wc-ajax-product-filter"),isChecked:O,onChange:d})})(),h("number_range_enable_multiple_filter"),_("number_range_query_type"),v("number_range_select_all_items_label"),g("number_range_show_count"),b(),w(),y())};const El=wcapf_admin_params.date_formats;var xl=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleRadioChange:o,handleCheckboxChange:l,handleSelectChange:s}=Zn(r,a),{formFilters:d}=r,p=d[n],{layoutFields:f,enableMultipleFilterField:m,queryTypeField:h,allItemsLabelField:_,showCountField:v,enableTooltipField:g,tooltipPositionField:b,showCountInTooltipField:y}=bl("date",n),{date_display_type:w,date_format:E,show_date_inputs_inline:x,date_picker_month_dropdown:C,date_picker_year_dropdown:O}=p;return(0,e.createElement)(e.Fragment,null,(()=>{const t=Mn(!0);let r;return r=t.find((e=>e.value===w)),["input_date","input_date_range"].includes(w)||(r=(0,c.find)(t,{proGroup:!0}).options.find((e=>e.value===w))),(0,e.createElement)(pl,{id:"date_display_type",index:n,label:(0,u.__)("Display Type","wc-ajax-product-filter"),description:(0,u.__)("Determines how the filter will be shown in the front end.","wc-ajax-product-filter"),options:t,value:r,onChange:s,renderAsFormField:!0})})(),(()=>{if("input_date"===w||"input_date_range"===w)return(0,e.createElement)(hl,{id:"date_format",index:n,label:(0,u.__)("Date Display Format","wc-ajax-product-filter"),description:(0,u.__)("Determines how the date will be displayed in the front end.","wc-ajax-product-filter"),options:El,onChange:o,value:E,isVertical:!0})})(),(()=>{if("input_date_range"===w)return(0,e.createElement)(fl,{id:"show_date_inputs_inline",index:n,label:(0,u.__)("Inline Date Inputs","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the date input fields in a single line.","wc-ajax-product-filter"),isChecked:x,onChange:l})})(),(()=>{if("input_date"===w||"input_date_range"===w)return(0,e.createElement)(fl,{id:"date_picker_month_dropdown",index:n,label:(0,u.__)("Use dropdown for Month","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the month dropdown in the date picker.","wc-ajax-product-filter"),isChecked:C,onChange:l})})(),(()=>{if("input_date"===w||"input_date_range"===w)return(0,e.createElement)(fl,{id:"date_picker_year_dropdown",index:n,label:(0,u.__)("Use dropdown for Year","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the year dropdown in the date picker.","wc-ajax-product-filter"),isChecked:O,onChange:l})})(),f(w),m("time_period_enable_multiple_filter"),h("time_period_query_type"),_("time_period_select_all_items_label"),v("time_period_show_count"),g(),b(),y())},Cl=t=>{let{index:n}=t;const{state:r}=i(),{formFilters:a}=r,o=a[n],{type:l,value_type:s}=o;return(()=>{let t;return"taxonomy"===l&&"number"===s||"price"===l?t=(0,e.createElement)(wl,{index:n}):"post-meta"===l?"text"===s?t=(0,e.createElement)(yl,{index:n}):"number"===s?t=(0,e.createElement)(wl,{index:n}):"date"===s&&(t=(0,e.createElement)(xl,{index:n})):t=(0,e.createElement)(yl,{index:n}),t})()},Ol=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Sl=(0,e.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Un.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}));const jl=t=>{let n,{value:r,onChange:a,disableAlpha:o,slotName:i}=t;return n=6.2<=w()?{popoverProps:{noArrow:!1,__unstableSlotName:i,position:"bottom right"}}:{popoverProps:{noArrow:!1,__unstableSlotName:i},position:"bottom right"},(0,e.createElement)(d.Dropdown,Z({},n,{renderToggle:t=>{let{isOpen:n,onToggle:a}=t;return(0,e.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},(0,e.createElement)(d.Button,{onClick:a,"aria-expanded":n,className:"components-circular-option-picker__option",style:{backgroundColor:r||"#fff",color:r||"#fff"}}))},renderContent:()=>(0,e.createElement)(d.ColorPicker,{color:r,onChange:e=>a(e),defaultValue:"#fff",enableAlpha:!o})}))};var Tl=t=>{let{label:n,value:r,onChange:a,description:o,isPro:i,disableAlpha:l=!0,renderAsFormField:s=!1,slotName:c}=t;return s?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,x(i))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(jl,{value:r,onChange:a,disableAlpha:l,slotName:c})))),o&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:o}})):(0,e.createElement)(jl,{value:r,onChange:a,slotName:c})};const kl=wcapf_admin_params.status_options,Dl=wcapf_admin_params.time_periods,Nl=wcapf_admin_params.sort_by_options,Il=wcapf_admin_params.meta_keys,Fl=wcapf_admin_params.meta_types,Ml=Dn(),Al="popover-slot-for-options-table";var Rl=t=>{let{index:n,openModal:r}=t;const{state:a,dispatch:o}=i(),{setDirty:l}=L(a,o),{handleManualOptionsChange:s}=Zn(a,o),{formFilters:p}=a,f=p[n],{type:m}=f,{swatch_type:_,enable_tooltip:v}=f,{type:g,optionsKey:b}=function(e,t){let n,r;if("price"===e||"rating"===e)n="number-options",r="number_manual_options";else if("product-status"===e)n="product-status-options",r="product_status_options";else if("post-meta"===e){const{value_type:e}=t;"text"===e?(n="text-options",r="manual_options"):"number"===e?(n="number-options",r="number_manual_options"):"date"===e&&(n="time-period-options",r="time_period_options")}else"sort-by"===e?(n="sort-by-options",r="sort_by_options"):"per-page"===e?(n="per-page-options",r="per_page_options"):"post-author"===e?(n="post-author-options",r="manual_options"):"taxonomy"===e&&(n="taxonomy-options",r="manual_options");return{type:n,optionsKey:r}}(m,f),y=f[b],w=An(f)&&"1"===v,E=function(e){if(!Rn(e))return!1;const{enable_swatch:t}=e;return!!t}(f),x=()=>{let e;return"product-status-options"===g?e={value:kl[0].value,label:""}:"text-options"===g?e={value:"",label:""}:"number-options"===g?e="rating"===m?{min_value:"",max_value:"",label:"",secondary_label:""}:{min_value:"",max_value:"",label:""}:"time-period-options"===g?e={value:Dl[0].value,label:""}:"sort-by-options"===g?e={value:Nl[0].value,direction:Ml[1].value,label:""}:"per-page-options"===g&&(e={value:"",label:""}),e},C=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];s(e,b,n,t)},O=(e,t,n)=>{t&&n.dragging&&C(e,!1)},S=()=>{const e=[...y,x()];C(e)},j=(e,t,n)=>{if(y[t][n]===e)return;const r=y.map(((r,a)=>a===t?{...r,[n]:e}:r));C(r)},T=(e,t,n)=>{j(e,n,t)},k=(e,t)=>{const n=y.map(((n,r)=>r===e?{...n,swatch:t}:n));C(n)},D=(t,n,r,a)=>(0,e.createElement)("div",{className:t},(0,e.createElement)(bn,{id:r,index:n,value:a,onChange:T,renderAsFormField:!1})),N=(t,n,r,a,o)=>(0,e.createElement)("div",{className:t},(0,e.createElement)(pl,{options:a,value:o,onChange:e=>((e,t,n)=>{j(e.value,t,n)})(e,n,r),portalTarget:document.querySelector("body")})),I=(t,n)=>{const{tooltip:r,swatch:a,color:o,secondary_color_enabled:i,secondary_color:l,image_id:s,image_url:c}=t,p=a||_;return(0,e.createElement)(e.Fragment,null,w&&(0,e.createElement)("td",null,D("__tooltip",n,"tooltip",r)),E&&(0,e.createElement)("td",null,(0,e.createElement)("div",{className:"__swatch_wrapper"},(0,e.createElement)("div",{className:"__primary_settings"},"color"===p?(0,e.createElement)("div",{className:"__swatch_switches"},(0,u.__)("Color","wc-ajax-product-filter")," ","/"," ",(0,e.createElement)(d.Button,{variant:"link",onClick:()=>k(n,"image")},(0,u.__)("Image","wc-ajax-product-filter"))):"image"===p?(0,e.createElement)("div",{className:"__swatch_switches"},(0,e.createElement)(d.Button,{variant:"link",onClick:()=>k(n,"color")},(0,u.__)("Color","wc-ajax-product-filter"))," ","/"," ",(0,u.__)("Image","wc-ajax-product-filter")):void 0,"color"===p&&(0,e.createElement)("div",{className:"__color"},(0,e.createElement)(Tl,{slotName:Al,value:o,onChange:e=>j(e,n,"color")}),o&&("1"===i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tl,{slotName:Al,value:l,onChange:e=>j(e,n,"secondary_color")}),(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>(e=>{const t=y.map(((t,n)=>n===e?{...t,secondary_color_enabled:"",secondary_color:""}:t));C(t)})(n)},(0,e.createElement)(d.Icon,{icon:Ol}))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>j("",n,"color")},(0,e.createElement)(d.Icon,{icon:Ol})),(0,e.createElement)(d.Button,{isSmall:!0,icon:$n,onClick:()=>j("1",n,"secondary_color_enabled")})))),"image"===p&&(0,e.createElement)("div",{className:"__image"},s?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("img",{className:"__img_preview",src:c}),(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>(e=>{const t=y.map(((t,n)=>n===e?{...t,image_id:"",image_url:""}:t));C(t)})(n)},(0,e.createElement)(d.Icon,{icon:Ol}))):(0,e.createElement)(d.Button,{icon:h,onClick:()=>(e=>{const t=wp.media({library:{type:"image"},multiple:!1}).on("select",(function(){const n=t.state().get("selection").first().toJSON(),{id:r,url:a}=n;((e,t,n)=>{const r=y.map(((r,a)=>a===n?{...r,image_id:e,image_url:t}:r));C(r)})(r,a,e)}));t.open()})(n)}))),(0,e.createElement)("div",{className:"__more_settings"}))))};let F=(0,u.__)("Add the options that will be available to the filter.","wc-ajax-product-filter");return"rating"===m?F=(0,u.sprintf)((0,u.__)("Add the options that will be available to the filter. To show stars in the label, put <code>[star]</code> for filled star, <code>[star-empty]</code> for empty star and <code>[star-half]</code> for half star.","wc-ajax-product-filter")):["taxonomy","product-status","post-meta"].includes(m)&&(F=(0,u.sprintf)((0,u.__)("Add the options that will be available to the filter. <b>Note:</b> Leave the label and tooltip fields empty if you do not want to override.","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__options_table"},(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,(0,u.__)("Filter Options","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"}))),(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:F}})),!(0,c.isEmpty)(y)&&(()=>{const t=Kn()("__responsive_table",g,{"tooltip-enabled":w},{"swatch-enabled":E});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:t},(0,e.createElement)("table",{className:"wp-list-table widefat fixed striped"},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"__drag_handle"}),(()=>{if("product-status-options"===g)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__product_status"},(0,u.__)("Status","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter")));if("text-options"===g)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__value"},(0,u.__)("Value","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter")));if("number-options"===g){let t="__label";return"rating"===m&&(t="__rating_label"),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__min_value"},(0,u.__)("Min Value","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__max_value"},(0,u.__)("Max Value","wc-ajax-product-filter")),(0,e.createElement)("th",{className:t},(0,u.__)("Label","wc-ajax-product-filter")),"rating"===m&&(0,e.createElement)("th",{className:"__secondary_label"},(0,u.__)("Secondary Label","wc-ajax-product-filter")))}return"time-period-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__time_period"},(0,u.__)("Period","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"sort-by-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__sort_by"},(0,u.__)("Sort by","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__direction"},(0,u.__)("Direction","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"per-page-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__per_page"},(0,u.__)("Per page","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"taxonomy-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__term"},(0,u.__)("Term","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):"post-author-options"===g?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("th",{className:"__author"},(0,u.__)("Author","wc-ajax-product-filter")),(0,e.createElement)("th",{className:"__label"},(0,u.__)("Label","wc-ajax-product-filter"))):void 0})(),(0,e.createElement)(e.Fragment,null,w&&(0,e.createElement)("th",{className:"__tooltip"},(0,u.__)("Tooltip","wc-ajax-product-filter")),E&&(0,e.createElement)("th",{className:"__color_image"},(0,u.__)("Color / Image Swatch","wc-ajax-product-filter"))),(0,e.createElement)("th",{className:"__action"}))),(0,e.createElement)(zn.ReactSortable,{list:y,setList:O,tag:"tbody",direction:"vertical",handle:".__drag_handler",onSort:l},y.map(((t,n)=>(0,e.createElement)("tr",{key:`filter-option-${n}`},(0,e.createElement)("td",null,(0,e.createElement)("div",{className:"__drag_handler_wrapper"},(0,e.createElement)(d.Icon,{icon:Yn,className:"__drag_handler"}))),((t,n)=>{if("product-status-options"===g){const{value:r,label:a}=t,o=kl,i=o.find((e=>r===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,N("__product_status",n,"value",o,i)),(0,e.createElement)("td",null,D("__label",n,"label",a)))}if("text-options"===g){const{value:r,label:a}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,D("__value",n,"value",r)),(0,e.createElement)("td",null,D("__label",n,"label",a)))}if("number-options"===g){const{min_value:r,max_value:a,label:o,secondary_label:i}=t;let l="__label";return"rating"===m&&(l="__rating_label"),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,D("__min_value",n,"min_value",r)),(0,e.createElement)("td",null,D("__max_value",n,"max_value",a)),(0,e.createElement)("td",null,D(l,n,"label",o)),"rating"===m&&(0,e.createElement)("td",null,D("secondary_label",n,"secondary_label",i)))}if("time-period-options"===g){const{value:r,label:a}=t,o=Dl,i=o.find((e=>r===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,N("__time_period",n,"value",o,i)),(0,e.createElement)("td",null,D("__label",n,"label",a)))}if("sort-by-options"===g){const{value:r,direction:a,label:o,meta_key:i,meta_type:l}=t,s=Nl.find((e=>r===e.value)),c=Ml.find((e=>a===e.value)),d="rand"===r,p=Il.find((e=>i===e.value)),f=Fl.find((e=>l===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,N("__sort_by",n,"value",Nl,s),"meta_value"===r&&(0,e.createElement)("div",{className:"__meta_info"},(0,e.createElement)("div",null,(0,u.__)("Meta Key","wc-ajax-product-filter"),N("__meta_key",n,"meta_key",Il,p)),(0,e.createElement)("div",null,(0,u.__)("Meta Type","wc-ajax-product-filter"),N("__meta_type",n,"meta_type",Fl,f)))),(0,e.createElement)("td",null,!d&&N("__direction",n,"direction",Ml,c)),(0,e.createElement)("td",null,D("__label",n,"label",o)))}if("per-page-options"===g){const{value:r,label:a}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,D("__per_page",n,"value",r)),(0,e.createElement)("td",null,D("__label",n,"label",a)))}if("taxonomy-options"===g){const{name:r,value:a,label:o}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,(0,e.createElement)("span",{className:"__term_name"},r),(0,e.createElement)("span",{className:"__term_id"},(0,u.sprintf)((0,u.__)("ID: %d","wc-ajax-product-filter"),a))),(0,e.createElement)("td",null,D("__label",n,"label",o)))}if("post-author-options"===g){const{name:r,value:a,label:o}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("td",null,(0,e.createElement)("span",{className:"__author_name"},r),(0,e.createElement)("span",{className:"__author_id"},(0,u.sprintf)((0,u.__)("ID: %d","wc-ajax-product-filter"),a))),(0,e.createElement)("td",null,D("__label",n,"label",o)))}})(t,n),I(t,n),(0,e.createElement)("td",null,(0,e.createElement)("div",{className:"__remove_row_button_wrapper"},(0,e.createElement)("button",{className:"button-link button-link-delete",onClick:()=>(e=>{const t=[...y];t.splice(e,1),C(t)})(n)},(0,e.createElement)(d.Icon,{icon:Sl,size:20})))))))))))})(),(0,e.createElement)("div",{className:"__action_buttons"},(()=>{const t=(0,u.__)("Browse Options","wc-ajax-product-filter");return(0,e.createElement)("div",null,["taxonomy-options","post-author-options"].includes(g)?(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},t):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(d.Button,{variant:"secondary",onClick:S},(0,u.__)("Add Option","wc-ajax-product-filter")),"text-options"===g&&(0,e.createElement)(d.Button,{variant:"secondary",onClick:r},t)))})(),!(0,c.isEmpty)(y)&&(0,e.createElement)(d.Button,{variant:"tertiary",isDestructive:!0,onClick:()=>{C([])}},(0,u.__)("Remove All","wc-ajax-product-filter"))))},Pl=t=>{const{state:n,dispatch:r}=i(),{handleGetOptionsChange:a,handleRadioChange:o,handleSelectChange:l}=Zn(n,r),{formFilters:s}=n,d=s[t],{get_options:p}=d;return{getOptionsField:n=>(0,e.createElement)(hl,{id:n,index:t,label:(0,u.__)("Get Options","wc-ajax-product-filter"),description:(0,u.__)("Determines whether you want the options to be obtained automatically or if you prefer to add them manually."),options:[{label:(0,u.__)("Automatically","wc-ajax-product-filter"),value:"automatically"},{label:(0,u.__)("Manual Entry","wc-ajax-product-filter"),value:"manual_entry",isPro:!0}],value:d[n],onChange:a}),orderByField:n=>{const r="manual_entry"===p;let a,o,i;return"order_terms_by"===n?(a=function(e){const t=[{label:(0,u.__)("Default","wc-ajax-product-filter"),value:"default"},{label:(0,u.__)("ID","wc-ajax-product-filter"),value:"id"},{label:(0,u.__)("Name","wc-ajax-product-filter"),value:"name"}];let n;return n=e?(0,u.__)("Entry","wc-ajax-product-filter"):(0,u.__)("Include","wc-ajax-product-filter"),O(t,[{label:(0,u.__)("Slug","wc-ajax-product-filter"),value:"slug"},{label:(0,u.__)("Count","wc-ajax-product-filter"),value:"count"},{label:n,value:"include"}],!0)}(r),o=["slug","count","include"]):"options_order_by"===n?(a=function(e){const t=[{label:(0,u.__)("None","wc-ajax-product-filter"),value:"none"}],n=[{label:(0,u.__)("Value","wc-ajax-product-filter"),value:"value"},{label:(0,u.__)("Label","wc-ajax-product-filter"),value:"label"},{label:(0,u.__)("Count","wc-ajax-product-filter"),value:"count"}];return e&&n.push({label:(0,u.__)("Entry","wc-ajax-product-filter"),value:"include"}),O(t,n,!0)}(r),o=["value","label","count","include"]):"post_author_order_by"===n&&(a=function(e){const t=[{label:(0,u.__)("Default","wc-ajax-product-filter"),value:"default"},{label:(0,u.__)("ID","wc-ajax-product-filter"),value:"id"},{label:(0,u.__)("Name","wc-ajax-product-filter"),value:"name"}];let n;return n=e?(0,u.__)("Entry","wc-ajax-product-filter"):(0,u.__)("Include","wc-ajax-product-filter"),O(t,[{label:(0,u.__)("Count","wc-ajax-product-filter"),value:"count"},{label:n,value:"include"}],!0)}(r),o=["count","include"]),i=a.find((e=>e.value===d[n])),o.includes(d[n])&&(i=(0,c.find)(a,{proGroup:!0}).options.find((e=>e.value===d[n]))),(0,e.createElement)(pl,{id:n,index:t,label:(0,u.__)("Order By","wc-ajax-product-filter"),description:(0,u.__)("Select the criteria by which you want the items to be ordered.","wc-ajax-product-filter"),options:a,value:i,onChange:l,renderAsFormField:!0})},orderDirectionField:n=>(0,e.createElement)(hl,{id:n,index:t,label:(0,u.__)("Order Direction","wc-ajax-product-filter"),description:(0,u.__)("Whether to order options in ascending or descending order.","wc-ajax-product-filter"),options:Dn(),value:d[n],onChange:o}),orderTypeField:n=>(0,e.createElement)(hl,{id:n,index:t,label:(0,u.__)("Order Type","wc-ajax-product-filter"),description:(0,u.__)("Whether to arrange the options in alphabetical or numerical order.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Alphabetical","wc-ajax-product-filter"),value:"alphabetical"},{label:(0,u.__)("Numerical","wc-ajax-product-filter"),value:"numerical"}],value:d[n],onChange:o})}},Ll=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleCheckboxChange:o,handleTextFieldChange:l}=Zn(r,a),{getOptionsField:s}=Pl(n),{formFilters:c}=r,d=c[n],{number_display_type:p,number_range_slider_display_values_as:f,number_get_options:m,auto_detect_min_max:h,min_value:_,max_value:v,step:g,gap:b,value_prefix:y,value_postfix:w,values_separator:E,text_before_min_value:x,text_before_max_value:C,format_numbers:O,decimal_places:S,thousand_separator:j,decimal_separator:T}=d;return(0,e.createElement)(e.Fragment,null,(()=>{let e=!1;if(["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(p)&&(e=!0),e)return s("number_get_options")})(),(()=>{let t=!1;const r=["range_slider","range_number"];if((r.includes(p)||"automatically"===m)&&(t=!0),t)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"auto_detect_min_max",index:n,label:(0,u.__)("Auto-detect min and max","wc-ajax-product-filter"),description:(0,u.__)("Whether to detect the min and max values from the database.","wc-ajax-product-filter"),isChecked:h,onChange:o}),"1"!==h&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ml,{id:"min_value",index:n,label:(0,u.__)("Min Value","wc-ajax-product-filter"),description:(0,u.__)("The minimum value that a user can select.","wc-ajax-product-filter"),value:_,onChange:l}),(0,e.createElement)(ml,{id:"max_value",index:n,label:(0,u.__)("Max Value","wc-ajax-product-filter"),description:(0,u.__)("The maximum value that a user can select.","wc-ajax-product-filter"),value:v,onChange:l})),(0,e.createElement)(ml,{id:"step",index:n,label:(0,u.__)("Step","wc-ajax-product-filter"),description:(0,u.__)("Determines the size of the increment amount.","wc-ajax-product-filter"),value:g,onChange:l,min:"1"}),!r.includes(p)&&(0,e.createElement)(ml,{id:"gap",index:n,label:(0,u.__)("Gap","wc-ajax-product-filter"),description:(0,u.__)("Determines the gap between the ranges.","wc-ajax-product-filter"),value:b,onChange:l,min:"0"}),(0,e.createElement)(bn,{id:"value_prefix",index:n,label:(0,u.__)("Value Prefix","wc-ajax-product-filter"),description:(0,u.__)("This should be used for the unit, space(s) allowed. Example: $","wc-ajax-product-filter"),value:y,onChange:l,customClass:"input-small"}),(0,e.createElement)(bn,{id:"value_postfix",index:n,label:(0,u.__)("Value Postfix","wc-ajax-product-filter"),description:(0,u.__)("This should be used for the unit, space(s) allowed. Example: €","wc-ajax-product-filter"),value:w,onChange:l,customClass:"input-small"}),(0,e.createElement)(bn,{id:"values_separator",index:n,label:(0,u.__)("Values Separator","wc-ajax-product-filter"),description:(0,u.__)("Text to appear between the min and max values, space(s) allowed. Example: –","wc-ajax-product-filter"),value:E,onChange:l}),"range_slider"===p&&"plain_text"===f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"text_before_min_value",index:n,label:(0,u.__)("Text before min value","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the min value.","wc-ajax-product-filter"),value:x,onChange:l}),(0,e.createElement)(bn,{id:"text_before_max_value",index:n,label:(0,u.__)("Text before max value","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the max value.","wc-ajax-product-filter"),value:C,onChange:l})),(0,e.createElement)(fl,{id:"format_numbers",index:n,label:(0,u.__)("Format Numbers","wc-ajax-product-filter"),description:(0,u.__)("Enable this if you want to format the numbers.","wc-ajax-product-filter"),isChecked:O,onChange:o}),"1"===O&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ml,{id:"decimal_places",index:n,label:(0,u.__)("Decimal Places","wc-ajax-product-filter"),value:S,onChange:l,min:"1",max:"6"}),(0,e.createElement)(bn,{id:"thousand_separator",index:n,label:(0,u.__)("Thousand Separator","wc-ajax-product-filter"),value:j,onChange:l,customClass:"input-small"}),(0,e.createElement)(bn,{id:"decimal_separator",index:n,label:(0,u.__)("Decimal Separator","wc-ajax-product-filter"),value:T,onChange:l,customClass:"input-small"})))})(),(()=>{let t=!1;if(["range_checkbox","range_radio","range_select","range_multiselect","range_label"].includes(p)&&"manual_entry"===m&&(t=!0),t)return(0,e.createElement)(Rl,{index:n})})())};const Vl="__manual_options_modal",Hl=wcapf_admin_params.author_roles;var Bl=t=>{let{index:n,open:r,closeModal:a}=t;const[o,l]=(0,e.useState)(!0),[p,f]=(0,e.useState)([]),[m,h]=(0,e.useState)(""),[_,v]=(0,e.useState)(Vl),[g,y]=(0,e.useState)(!1),[w,E]=(0,e.useState)(""),{state:x,dispatch:C}=i(),{handleManualOptionsChange:O}=Zn(x,C),{formFilters:S}=x,j=S[n],{type:T,taxonomy:k,meta_key:D,manual_options:N}=j;(0,e.useEffect)((()=>{if(!r)return;let e;if("taxonomy"===T){if(!k)return l(!1),void h((0,u.__)("Please select a taxonomy.","wc-ajax-product-filter"));e={action:"wcapf_get_terms_for_modal",taxonomy:k}}else if("post-author"===T){if((0,c.isEmpty)(Hl))return l(!1),void h((0,u.__)("Please select the author roles from <strong>Settings > Others</strong> tab.","wc-ajax-product-filter"));e={action:"wcapf_get_post_authors_for_modal",roles:Hl}}else{if(!D)return l(!1),void h((0,u.__)("Please select a meta key.","wc-ajax-product-filter"));e={action:"wcapf_get_meta_values_for_modal",meta_key:D}}e.nonce=b(),s().get(wcapf_admin_params.ajaxurl,{params:e}).then((e=>{l(!1);const t=e.data.data;if(!(0,c.isEmpty)(t)){const e=`${Vl} ajax-done`;if("taxonomy"===T||"post-author"===T){const e=I(t);f(e)}else f(t);v(e)}})).catch((e=>{console.log(e),l(!1),h((0,u.__)("There was an error fetching the options.","wc-ajax-product-filter"))}))}),[r]),(0,e.useEffect)((()=>{r||(l(!0),f([]),h(""),v(Vl),y(!1),E(""))}),[r]),(0,e.useEffect)((()=>{let e;e=w?p.map((e=>{const{label:t,value:n}=e;return t.toLowerCase().includes(w.toLowerCase())||n.toString().toLowerCase().includes(w.toLowerCase())?{...e,matched:"1"}:{...e,matched:"0"}})):p.map((e=>({...e,matched:"1"}))),f(e)}),[w]);const I=e=>{const t=N||[];return e.map((e=>t.find((t=>t.value==e.value))?{...e,status:"added"}:{...e,status:""}))},F=()=>{const e=p.map((e=>(e.status="added",e)));f(e)},M=()=>{const e=p.map((e=>(e.status="",e)));f(e)},A=()=>{const e=N||[],t=[];if(p.forEach((n=>{if("added"===n.status){if(("taxonomy"===T||"post-author"===T)&&e.find((e=>e.value==n.value)))return;const r={value:n.value,label:"",tooltip:"",color:"",secondary_color_enabled:"",secondary_color:"",image_id:"",image_url:""};("taxonomy"===T||"post-author"===T)&&(r.name=n.label),t.push(r)}})),!(0,c.isEmpty)(t)){let r=[];r=g?t:[...e,...t],O(r,"manual_options",n)}a()},R=Kn()(_,{__meta_values_modal:"post-meta"===T});return(0,e.createElement)(e.Fragment,null,r&&(0,e.createElement)(d.Modal,{title:(0,u.__)("Available Options","wc-ajax-product-filter"),onRequestClose:a,className:R},(()=>{if(o)return(0,e.createElement)("div",{className:"__loader"},(0,e.createElement)(d.Spinner,null));if(m)return(0,e.createElement)("p",{className:"__description",dangerouslySetInnerHTML:{__html:m}});if((0,c.isEmpty)(p)){let t;return"taxonomy"===T?t=(0,u.sprintf)((0,u.__)("No terms found for <strong>%s</strong>.","wc-ajax-product-filter"),k):"post-meta"===T?t=(0,u.sprintf)((0,u.__)("No meta values found for <strong>%s</strong>.","wc-ajax-product-filter"),D):"post-author"===T&&(t=(0,u.sprintf)((0,u.__)("No authors found in user roles <strong>%s</strong>.","wc-ajax-product-filter"),Hl.join(", "))),(0,e.createElement)("p",{className:"__description",dangerouslySetInnerHTML:{__html:t}})}return(0,e.createElement)(e.Fragment,null,(()=>{const t=p.length;let n;return"taxonomy"===T?n=(0,u.sprintf)((0,u._n)("Found %d term for <strong>%s</strong>.","Found %d terms for <strong>%s</strong>.",t,"wc-ajax-product-filter"),t,k):"post-meta"===T?n=(0,u.sprintf)((0,u._n)("Found %d meta value for <strong>%s</strong>.","Found %d meta values for <strong>%s</strong>.",t,"wc-ajax-product-filter"),t,D):"post-author"===T&&(n=(0,u.sprintf)((0,u._n)("Found %d author for roles of <strong>%s</strong>.","Found %d authors for roles of <strong>%s</strong>.",t,"wc-ajax-product-filter"),t,Hl.join(", "))),(0,e.createElement)("div",{className:"__header"},(0,e.createElement)("div",{className:"__results_info"},(0,e.createElement)("p",{className:"__description",dangerouslySetInnerHTML:{__html:n}})),(0,e.createElement)("div",{className:"__search_box"},(0,e.createElement)(d.SearchControl,{value:w,onChange:E})))})(),(0,e.createElement)("div",{className:"__options"},p.map(((t,n)=>(0,e.createElement)("div",{key:`modal-option-${n}`,className:Kn()("__option",{__hide_option:"0"===t.matched})},(0,e.createElement)("label",null,(0,e.createElement)(d.CheckboxControl,{checked:"added"===t.status,onChange:e=>((e,t)=>{const n=p[t],r=p.map((t=>t.value===n.value?e?{...t,status:"added"}:{...t,status:""}:t));f(r)})(e,n)}),(0,e.createElement)("span",{className:"__label"},t.label),"post-meta"!==T&&(0,e.createElement)("span",{className:"__info"},(0,u.sprintf)((0,u.__)("ID: %d","wc-ajax-product-filter"),t.value))))))),(0,e.createElement)("div",{className:"__modal_footer"},(0,e.createElement)("div",null,(0,e.createElement)(d.Button,{variant:"secondary",onClick:F},(0,u.__)("Select All","wc-ajax-product-filter")),(0,e.createElement)(d.Button,{variant:"secondary",onClick:M},(0,u.__)("Clear Selection","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__add_options_btn_group"},"post-meta"===T&&(0,e.createElement)(d.CheckboxControl,{label:(0,u.__)("Replace current options?","wc-ajax-product-filter"),checked:g,onChange:e=>y(e)}),(0,e.createElement)(d.Button,{variant:"primary",onClick:A},(0,u.__)("Add Options","wc-ajax-product-filter")))))})()))},Ul=Symbol("useLazyRef empty value"),$l=function(e){var t=Qt.useRef(e);return ao((function(){t.current=e})),t};function zl(e){return{isOk:()=>!0,isOkAnd:t=>t(e),isErr:()=>!1,isErrAnd:()=>!1,ok:()=>Gl(e),err:()=>ql(),map:t=>zl(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),mapErr:()=>zl(e),expect:()=>e,expectErr:e=>{throw new Error(e)},unwrap:()=>e,unwrapErr:()=>{throw new Error(`${e}`)},unwrapOr:()=>e,unwrapOrElse:()=>e,and:e=>e,andThen:t=>t(e),or:()=>zl(e),orElse:()=>zl(e)}}function Wl(e){return{isOk:()=>!1,isOkAnd:()=>!1,isErr:()=>!0,isErrAnd:t=>t(e),ok:()=>ql(),err:()=>Gl(e),map:()=>Wl(e),mapOr:e=>e,mapOrElse:t=>t(e),mapErr:t=>Wl(t(e)),expect:e=>{throw new Error(e)},expectErr:()=>e,unwrap:()=>{throw new Error(`${e}`)},unwrapErr:()=>e,unwrapOr:e=>e,unwrapOrElse:t=>t(e),and:()=>Wl(e),andThen:()=>Wl(e),or:e=>e,orElse:t=>t(e)}}function ql(){const e={and:()=>ql(),andThen:()=>ql(),expect:e=>{throw new Error(e)},filter:()=>e,isSome:()=>!1,isSomeAnd:()=>!1,isNone:()=>!0,map:()=>ql(),mapOr:e=>e,mapOrElse:e=>e(),okOr:e=>Wl(e),okOrElse:e=>Wl(e()),or:e=>e,orElse:e=>e(),unwrap:()=>{throw new Error("panic! call `unwrap` on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),xor:t=>t.isSome()?t:e};return e}function Gl(e){const t={and:e=>e,andThen:t=>t(e),expect:()=>e,filter:n=>n(e)?t:ql(),isSome:()=>!0,isSomeAnd:t=>t(e),isNone:()=>!1,map:t=>Gl(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),okOr:()=>zl(e),okOrElse:()=>zl(e),or:()=>t,orElse:()=>t,unwrap:()=>e,unwrapOr:()=>e,unwrapOrElse:()=>e,xor:e=>e.isNone()?t:ql()};return t}var Yl=setTimeout;function Xl(e,t){var n=t.useCachedSetTimeout?Yl:setTimeout;return new Promise((function(t){n(t,e)}))}var Kl,Zl,Jl=n(601),Ql=n(893),es=(e,t)=>[...e,...t],ts=(e,t,n)=>e-t-10<n,ns=e=>({isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,additional:e.additional}),rs='[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.',as=async(e,t,n,r,a,o)=>{const i=t.current.inputValue,l=!n.current[i],s=l?ns(t.current):n.current[i];if(s.isLoading||!s.hasMore)return;if(a((e=>({...e,[i]:{...s,isLoading:!0}}))),r>0&&"input-change"===e){await function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useCachedSetTimeout,n=Xl(e,{useCachedSetTimeout:t});function r(e){return n.then((function(){return e}))}return r.then=function(){return n.then.apply(n,arguments)},r.catch=Promise.resolve().catch,r}(r);const e=t.current.inputValue;if(i!==e)return void a((e=>{if(l){const{[i]:t,...n}=e;return n}return{...e,[i]:{...s,isLoading:!1}}}))}const{loadOptions:c}=t.current,u=await(d=Promise.resolve().then((()=>c(i,s.options,s.additional))),d.then((e=>zl(e)),(e=>Wl(e))));var d;if(u.isErr())return void a((e=>({...e,[i]:{...s,isLoading:!1}})));const p=u.unwrap();if((e=>{if(!(e=>{if(!e)return!1;const{options:t,hasMore:n}=e;return!!Array.isArray(t)&&("boolean"==typeof n||void 0===n)})(e))throw console.error(rs,"Received:",e),new Error(rs);return!0})(p)){const{options:e,hasMore:t}=p,n=Object.hasOwn(p,"additional")?p.additional:s.additional;a((r=>({...r,[i]:{...s,options:o(s.options,e,n),hasMore:!!t,isLoading:!1,isFirstLoad:!1,additional:n}})))}},os=e=>e+1,is=(e,t=[])=>{const{defaultOptions:n,loadOptionsOnMenuOpen:r=!0,debounceTimeout:a=0,inputValue:o,menuIsOpen:i,filterOption:l=null,reduceOptions:s=es,shouldLoadMore:c=ts}=e,u=function(){var e=(0,Qt.useRef)(!1);return(0,Qt.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),d=$l(s),p=$l(r),f=(0,Qt.useRef)(!0),m=(0,Qt.useRef)(e);m.current=e;const[h,_]=(0,Qt.useState)(0),v=(t=>{const n=(0,Qt.useRef)(Ul);return n.current===Ul&&(n.current=(({options:e,defaultOptions:t,additional:n,defaultAdditional:r})=>{const a=!0===t?null:Array.isArray(t)?t:e;return a?{"":{isFirstLoad:!1,isLoading:!1,options:a,hasMore:!0,additional:r||n}}:{}})(e)),n})(),g=$l((e=>{as(e,m,v,a,(e=>{v.current=e(v.current),u.current&&_(os)}),d.current)})),b=(0,Qt.useCallback)((()=>{const e=m.current.inputValue;v.current[e]&&g.current("menu-scroll")}),[g,v]);(0,Qt.useEffect)((()=>{f.current?f.current=!1:(v.current={},_(os)),!0===n&&g.current("autoload")}),t),(0,Qt.useEffect)((()=>{i&&!v.current[o]&&g.current("input-change")}),[g,o,i,v]),(0,Qt.useEffect)((()=>{i&&!v.current[""]&&p.current&&g.current("menu-toggle")}),[g,p,i,v]);const y=v.current[o]||ns(e);return{handleScrolledToBottom:b,shouldLoadMore:c,filterOption:l,isLoading:y.isLoading,isFirstLoad:y.isFirstLoad,options:y.options}},ls=(Kl=ei.MenuList,function(e){const{selectProps:t,innerRef:n}=e,{handleScrolledToBottom:r,shouldLoadMore:a}=t,o=(0,Qt.useRef)(),i=(0,Qt.useRef)(null),l=(0,Qt.useCallback)((()=>{const e=i.current;if(!e)return!1;const{scrollTop:t,scrollHeight:n,clientHeight:r}=e;return a(n,r,t)}),[a]),s=(0,Qt.useCallback)((()=>{l()&&r&&r()}),[l,r]),c=(0,Qt.useMemo)((()=>{const e=()=>{s(),o.current=setTimeout(e,300)};return e}),[s]);return(0,Qt.useEffect)((()=>(c(),()=>{o.current&&clearTimeout(o.current)})),[]),(0,Ql.jsx)(Kl,{...e,innerRef:(0,Jl.Z)(n,i)})}),ss=[],cs={},us=(Zl=Qi,function(e){const{components:t=cs,selectRef:n,isLoading:r,cacheUniqs:a=ss,...o}=e,i=((e,t=[])=>{const{inputValue:n,menuIsOpen:r,defaultInputValue:a,defaultMenuIsOpen:o,onInputChange:i,onMenuClose:l,onMenuOpen:s}=e,[c,u]=(0,Qt.useState)(a||""),[d,p]=(0,Qt.useState)(!!o),f="string"==typeof n?n:c,m="boolean"==typeof r?r:d,h=(0,Qt.useCallback)(((e,t)=>{i&&i(e,t),u(e)}),[i]),_=(0,Qt.useCallback)((()=>{l&&l(),p(!1)}),[l]),v=(0,Qt.useCallback)((()=>{s&&s(),p(!0)}),[s]);return{...is({...e,inputValue:f,menuIsOpen:m},t),inputValue:f,menuIsOpen:m,onInputChange:h,onMenuClose:_,onMenuOpen:v}})(o,a),l=(e=>(0,Qt.useMemo)((()=>({MenuList:ls,...e})),[e]))(t),s="boolean"==typeof r?r:i.isLoading;return(0,Ql.jsx)(Zl,{...e,...i,isLoading:s,components:l,ref:n})}),ds=t=>{let{label:n,id:r,index:a="",description:o,value:i,onChange:l,taxonomy:c,onlyParent:p=!1,isMultiple:f=!1,type:m="taxonomy",isUserRoles:h=!1,options:_,showIncludeChildren:v=!1,checkboxId:g,checkIsChecked:y,onCheckChange:w,renderAsFormField:x=!0,inputKey:C,inputPlaceholder:O,inputNoOptionsMessage:S,maxMenuHeight:j}=t;const T=async(e,t,n)=>{let r,{page:a}=n;r="author"===m?{action:"wcapf_get_authors_for_dropdown",keyword:e,page:a}:"page"===m?{action:"wcapf_get_pages_for_dropdown",keyword:e,page:a}:"product"===m?{action:"wcapf_get_products_for_dropdown",keyword:e,page:a}:{action:"wcapf_get_terms_for_dropdown",taxonomy:c,only_parent:p,keyword:e,page:a},r.nonce=b();try{const e=(await s().get(wcapf_admin_params.ajaxurl,{params:r})).data.data;return{options:e,hasMore:e.length>=1,additional:{page:a+1}}}catch(e){console.log(e)}};let k,D,N;k=f?`__custom_react_select full-width ${r}`:`__custom_react_select fixed-width ${r}`,"author"===m?h?(D=(0,u.__)("Start typing to find the role","wc-ajax-product-filter"),N=(0,u.__)("No roles found","wc-ajax-product-filter")):(D=(0,u.__)("Start typing to find the author","wc-ajax-product-filter"),N=(0,u.__)("No authors found","wc-ajax-product-filter")):(D=(0,u.__)("Start typing to find the term","wc-ajax-product-filter"),N=(0,u.__)("No terms found","wc-ajax-product-filter")),O&&(D=O),S&&(N=S);const I=(0,u.__)("Loading...","wc-ajax-product-filter"),F=E(r,a),M=()=>h?(0,e.createElement)(Qi,{inputId:F,value:i,options:_,placeholder:D,noOptionsMessage:()=>N,loadingMessage:()=>I,formatOptionLabel:cl,isMulti:f,maxMenuHeight:j,closeMenuOnSelect:!f,onChange:e=>l(e,r,a),isClearable:!0,className:k,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})}):(0,e.createElement)(us,{key:C,inputId:F,value:i,loadOptions:T,additional:{page:1},placeholder:D,noOptionsMessage:()=>N,loadingMessage:()=>I,formatOptionLabel:cl,isMulti:f,maxMenuHeight:j,closeMenuOnSelect:!f,onChange:e=>l(e,r,a),isClearable:!0,className:k,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})});return x?(0,e.createElement)("div",{className:"__form_control react_select"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:F},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},M(),v&&(()=>{let t;return t="direct_child_only"===g?(0,u.__)("Direct child only","wc-ajax-product-filter"):(0,u.__)("Include children","wc-ajax-product-filter"),(0,e.createElement)(d.CheckboxControl,{label:t,className:"__include_child_terms",checked:y,onChange:e=>w(e,g,a)})})()))),o&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:o}})):M()},ps=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleCheckboxChange:o,handleToggleGroupChange:l,handleSelectChange:s,handleSelectTermChange:d}=Zn(r,a),{getOptionsField:p,orderByField:f,orderDirectionField:m}=Pl(n),[h,_]=(0,e.useState)(!1),v=()=>_(!0),g=()=>_(!1),{formFilters:b}=r,y=b[n],{taxHierarchical:w,taxonomy:E,get_options:x,limit_options:C,include_terms:O,include_child:S,exclude_terms:j,exclude_child:T,parent_term:k,direct_child_only:D}=y;return(0,e.createElement)(e.Fragment,null,p("get_options"),f("order_terms_by"),m("order_terms_dir"),(()=>{if("automatically"===x){if(w){const t=kn(w,!0),r=["child","parent_only"];let a;return a=t.find((e=>e.value===C)),r.includes(C)&&(a=(0,c.find)(t,{proGroup:!0}).options.find((e=>e.value===C))),(0,e.createElement)(pl,{id:"limit_options",index:n,label:(0,u.__)("Limit Options","wc-ajax-product-filter"),description:(0,u.__)("Limit the filter options.","wc-ajax-product-filter"),options:t,value:a,onChange:s,renderAsFormField:!0})}{const t=kn();return(0,e.createElement)(gl,{id:"limit_options",index:n,label:(0,u.__)("Limit Options","wc-ajax-product-filter"),description:(0,u.__)("Limit the filter options.","wc-ajax-product-filter"),options:t,onChange:l,value:C})}}})(),(()=>{if("automatically"===x&&"include"===C)return(0,e.createElement)(ds,{id:"include_terms",index:n,label:(0,u.__)("Terms to include","wc-ajax-product-filter"),description:(0,u.__)("Select the terms that will be available to filter by.","wc-ajax-product-filter"),taxonomy:E,isMultiple:!0,value:O,onChange:d,showIncludeChildren:w,checkboxId:"include_child",checkIsChecked:S,onCheckChange:o})})(),(()=>{if("automatically"===x&&"exclude"===C)return(0,e.createElement)(ds,{id:"exclude_terms",index:n,label:(0,u.__)("Terms to exclude","wc-ajax-product-filter"),description:(0,u.__)("Select the terms that will be excluded from the filter by options.","wc-ajax-product-filter"),taxonomy:E,isMultiple:!0,value:j,onChange:d,showIncludeChildren:w,checkboxId:"exclude_child",checkIsChecked:T,onCheckChange:o})})(),(()=>{if("automatically"===x&&"child"===C&&w)return(0,e.createElement)(ds,{id:"parent_term",index:n,label:(0,u.__)("Parent Term","wc-ajax-product-filter"),description:(0,u.__)("Select the parent term for which child terms will be available as filter options.","wc-ajax-product-filter"),taxonomy:E,onlyParent:!0,value:k,onChange:d,showIncludeChildren:w,checkboxId:"direct_child_only",checkIsChecked:D,onCheckChange:o})})(),(()=>{if("manual_entry"===x)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Rl,{index:n,openModal:v}),(0,e.createElement)(Bl,{index:n,open:h,closeModal:g}))})())},fs=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{}=Zn(r,a),{formFilters:o}=r,l=o[n],{getOptionsField:s}=Pl(n),{number_get_options:c}=l;return(0,e.createElement)(e.Fragment,null,s("number_get_options"),(()=>{if("manual_entry"===c)return(0,e.createElement)(Rl,{index:n})})())},ms=t=>{let{index:n}=t;const{state:r}=i(),{getOptionsField:a,orderByField:o,orderDirectionField:l,orderTypeField:s}=Pl(n),[c,u]=(0,e.useState)(!1),d=()=>u(!0),p=()=>u(!1),{formFilters:f}=r,m=f[n],{get_options:h,options_order_by:_}=m;return(0,e.createElement)(e.Fragment,null,a("get_options"),o("options_order_by"),(()=>{if("none"!==_)return l("options_order_dir")})(),(()=>{if(["label","value"].includes(_))return s("options_order_type")})(),(()=>{if("manual_entry"===h)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Rl,{index:n,openModal:d}),(0,e.createElement)(Bl,{index:n,open:c,closeModal:p}))})())},hs=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleTextFieldChange:o}=Zn(r,a),{formFilters:l}=r,s=l[n],{date_display_type:c,date_from_prefix:d,date_from_postfix:p,date_from_placeholder:f,date_to_prefix:m,date_to_postfix:h,date_to_placeholder:_}=s;return(0,e.createElement)(e.Fragment,null,(()=>{if("input_date"===c||"input_date_range"===c)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"date_from_prefix",index:n,label:(0,u.__)("From Prefix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the From field.","wc-ajax-product-filter"),value:d,onChange:o}),(0,e.createElement)(bn,{id:"date_from_postfix",index:n,label:(0,u.__)("From Postfix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear after the From field.","wc-ajax-product-filter"),value:p,onChange:o}),(0,e.createElement)(bn,{id:"date_from_placeholder",index:n,label:(0,u.__)("From Placeholder","wc-ajax-product-filter"),description:(0,u.__)("The placeholder text to appear for the From field.","wc-ajax-product-filter"),value:f,onChange:o}),"input_date_range"===c&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"date_to_prefix",index:n,label:(0,u.__)("To Prefix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear before the To field.","wc-ajax-product-filter"),value:m,onChange:o}),(0,e.createElement)(bn,{id:"date_to_postfix",index:n,label:(0,u.__)("To Postfix","wc-ajax-product-filter"),description:(0,u.__)("Text to appear after the To field.","wc-ajax-product-filter"),value:h,onChange:o}),(0,e.createElement)(bn,{id:"date_to_placeholder",index:n,label:(0,u.__)("To Placeholder","wc-ajax-product-filter"),description:(0,u.__)("The placeholder text to appear for the To field.","wc-ajax-product-filter"),value:_,onChange:o})))})(),(()=>{if(["time_period_checkbox","time_period_radio","time_period_select","time_period_multiselect","time_period_label"].includes(c))return(0,e.createElement)(Rl,{index:n})})())};const _s=wcapf_admin_params.user_roles;var vs=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleToggleGroupChange:o,handleSelectTermChange:l}=Zn(r,a),{getOptionsField:s,orderByField:c,orderDirectionField:d}=Pl(n),[p,f]=(0,e.useState)(!1),m=()=>f(!0),h=()=>f(!1),{formFilters:_}=r,v=_[n],{get_options:g,limit_options:b,include_authors:y,exclude_authors:w,include_user_roles:E}=v;return(0,e.createElement)(e.Fragment,null,s("get_options"),c("post_author_order_by"),d("post_author_order_dir"),(()=>{if("automatically"===g){const t=[{label:(0,u.__)("Off","wc-ajax-product-filter"),value:"off"},{label:(0,u.__)("Include","wc-ajax-product-filter"),value:"include"},{label:(0,u.__)("Exclude","wc-ajax-product-filter"),value:"exclude"},{label:(0,u.__)("Role","wc-ajax-product-filter"),value:"user_roles"}];return(0,e.createElement)(gl,{id:"limit_options",index:n,label:(0,u.__)("Limit Options","wc-ajax-product-filter"),description:(0,u.__)("Limit the filter options.","wc-ajax-product-filter"),options:t,onChange:o,value:b})}})(),(()=>{if("automatically"===g&&"include"===b)return(0,e.createElement)(ds,{id:"include_authors",index:n,label:(0,u.__)("Authors to include","wc-ajax-product-filter"),description:(0,u.__)("Select the authors that will be available to filter by.","wc-ajax-product-filter"),isMultiple:!0,value:y,onChange:l,type:"author"})})(),(()=>{if("automatically"===g&&"exclude"===b)return(0,e.createElement)(ds,{id:"exclude_authors",index:n,label:(0,u.__)("Authors to exclude","wc-ajax-product-filter"),description:(0,u.__)("Select the authors that will be excluded from the filter by options.","wc-ajax-product-filter"),isMultiple:!0,value:w,onChange:l,type:"author"})})(),(()=>{if("automatically"===g&&"user_roles"===b)return(0,e.createElement)(ds,{id:"include_user_roles",index:n,label:(0,u.__)("Author Roles","wc-ajax-product-filter"),description:(0,u.__)("Select the roles; matched authors must have at least one of these roles.","wc-ajax-product-filter"),isMultiple:!0,value:E,onChange:l,type:"author",isUserRoles:!0,options:_s})})(),(()=>{if("manual_entry"===g)return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Rl,{index:n,openModal:m}),(0,e.createElement)(Bl,{index:n,open:p,closeModal:h}))})())},gs=t=>{let{index:n}=t;const{state:r}=i(),{formFilters:a}=r,o=a[n],{type:l,value_type:s}=o;return(0,e.createElement)(d.SlotFillProvider,null,(()=>{let t;return"taxonomy"===l?t="number"===s?(0,e.createElement)(Ll,{index:n}):(0,e.createElement)(ps,{index:n}):"price"===l?t=(0,e.createElement)(Ll,{index:n}):"rating"===l?t=(0,e.createElement)(fs,{index:n}):"product-status"===l||"sort-by"===l||"per-page"===l?t=(0,e.createElement)(Rl,{index:n}):"post-meta"===l?"text"===s?t=(0,e.createElement)(ms,{index:n}):"number"===s?t=(0,e.createElement)(Ll,{index:n}):"date"===s&&(t=(0,e.createElement)(hs,{index:n})):"post-author"===l&&(t=(0,e.createElement)(vs,{index:n})),t})(),(0,e.createElement)(d.Popover.Slot,{name:"popover-slot-for-options-table"}))},bs=t=>{let{label:n,id:r,index:a="",value:o,onChange:i,description:l,...s}=t;const c=E(r,a);return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:c},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)("textarea",Z({className:"components-textarea-control__input",id:c,value:o,onChange:e=>i(e.target.value,r,a)},s))))),l&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:l}}))};(0,u.__)("Archive","wc-ajax-product-filter"),(0,u.__)("Page","wc-ajax-product-filter"),(0,u.__)("User","wc-ajax-product-filter"),(0,u.__)("Equal","wc-ajax-product-filter"),(0,u.__)("Not equal","wc-ajax-product-filter"),(0,u.__)("Active","wc-ajax-product-filter"),(0,u.__)("Not active","wc-ajax-product-filter"),(0,u.__)("Logged in","wc-ajax-product-filter"),(0,u.__)("Logged out","wc-ajax-product-filter"),wcapf_admin_params.user_roles,wcapf_admin_params.taxonomies_with_archive;var ys=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{handleRadioChange:o,handleCheckboxChange:l,handleTextFieldChange:s}=Zn(r,a),{formFilters:c}=r,d=c[n],{type:p,component:f,taxHierarchical:m,display_type:h,native_display_type_layout:_,number_display_type:v,date_display_type:g,hierarchical:b,value_type:y,show_title:w,enable_accordion:E,accordion_default_state:x,help_text:C,enable_search_field:O,search_field_placeholder:S,enable_reduce_height:j,soft_limit:T,max_height:k,show_in_active_filters:D,enable_visibility_rules:N}=d,I="active-filters"===f,F=()=>{let e;return"taxonomy"===p?e=h:"price"===p?e=v:"post-author"===p?e=h:"post-meta"===p?"text"===y?e=h:"number"===y?e=v:"date"===y&&(e=g):e=h,e},M=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"reduce-height";if(I||"keyword"===p)return!1;if("taxonomy"===p&&m&&["checkbox","radio","select","multi-select"].includes(h)&&"1"===b&&"list"===_&&"search"===t)return!1;if("taxonomy"===p&&m&&"hierarchy-select"===h)return!1;const n=F();let r;return r="reduce-height"===t?["select","multi-select","range_slider","range_number","range_select","range_multiselect","input_date","input_date_range","time_period_select","time_period_multiselect"]:["multi-select","range_multiselect","time_period_multiselect","range_slider","range_number","input_date","input_date_range"],e=!r.includes(n),e};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fl,{id:"show_title",index:n,label:(0,u.__)("Show title","wc-ajax-product-filter"),description:(0,u.__)("Whether to show the filter title before the filter options.","wc-ajax-product-filter"),isChecked:w,onChange:l}),(()=>{if("1"===w)return(0,e.createElement)(fl,{id:"enable_accordion",index:n,label:(0,u.__)("Enable accordion","wc-ajax-product-filter"),description:(0,u.__)("Place more filters by collapsing the filter options.","wc-ajax-product-filter"),isChecked:E,onChange:l})})(),(()=>{if("1"===w&&"1"===E)return(0,e.createElement)(hl,{id:"accordion_default_state",index:n,label:(0,u.__)("Accordion state","wc-ajax-product-filter"),description:(0,u.__)("Determines how the accordion should appear initially.","wc-ajax-product-filter"),options:[{label:(0,u.__)("Expanded","wc-ajax-product-filter"),value:"expanded"},{label:(0,u.__)("Collapsed","wc-ajax-product-filter"),value:"collapsed"}],value:x,onChange:o})})(),(()=>{if("1"===w)return(0,e.createElement)(bs,{id:"help_text",index:n,label:(0,u.__)("Help Text","wc-ajax-product-filter"),description:(0,u.__)("Show additional information in a tooltip. Supports basic markup.","wc-ajax-product-filter\t"),value:C,onChange:s,rows:2})})(),(()=>{if(M("search"))return(0,e.createElement)(fl,{id:"enable_search_field",index:n,label:(0,u.__)("Search Field","wc-ajax-product-filter"),description:(0,u.__)("Adds a search field to narrow down the filter options.","wc-ajax-product-filter"),isChecked:O,onChange:l})})(),(()=>{if(M("search")&&"1"===O&&!["select","range_select","time_period_select"].includes(F()))return(0,e.createElement)(bn,{id:"search_field_placeholder",index:n,label:(0,u.__)("Placeholder","wc-ajax-product-filter"),description:(0,u.__)("Change the default placeholder for the search input field.","wc-ajax-product-filter"),value:S,onChange:s,isPro:!0})})(),(()=>{if(M()){let t;return t="taxonomy"===p&&m&&["checkbox","radio","select","multi-select"].includes(h)&&"1"===b&&"list"===_?[{label:(0,u.__)("No","wc-ajax-product-filter"),value:"no"},{label:(0,u.__)("Set max height","wc-ajax-product-filter"),value:"max_height"}]:[{label:(0,u.__)("No","wc-ajax-product-filter"),value:"no"},{label:(0,u.__)("Set max height","wc-ajax-product-filter"),value:"max_height"},{label:(0,u.__)("Soft Limit","wc-ajax-product-filter"),value:"soft_limit"}],(0,e.createElement)(hl,{id:"enable_reduce_height",index:n,label:(0,u.__)("Reduce height","wc-ajax-product-filter"),description:(0,u.__)("Enable this if you want to reduce the filter height.","wc-ajax-product-filter"),options:t,onChange:o,value:j})}})(),(()=>{if("max_height"===j&&M())return(0,e.createElement)(ml,{id:"max_height",index:n,label:(0,u.__)("Filter max-height","wc-ajax-product-filter\t"),description:(0,u.__)("Set the filter container max height in px.","wc-ajax-product-filter\t"),value:k,onChange:s,min:1})})(),(()=>{if("soft_limit"===j&&M())return(0,e.createElement)(ml,{id:"soft_limit",index:n,label:(0,u.__)("Number of visible options","wc-ajax-product-filter\t"),description:(0,u.__)("Show a <b>Show More/Show Less</b> toggle after this many options.","wc-ajax-product-filter\t"),value:T,onChange:s,min:1})})(),(()=>{if(!I)return(0,e.createElement)(fl,{id:"show_in_active_filters",index:n,label:(0,u.__)("Show in Active Filters","wc-ajax-product-filter"),description:(0,u.__)("Determines if we show the selected options in active filters.","wc-ajax-product-filter"),isChecked:D,onChange:l})})(),(0,e.createElement)(fl,{id:"enable_visibility_rules",index:n,label:(0,u.__)("Visibility Rules","wc-ajax-product-filter"),description:(0,u.__)("Enable this to control filter display based on page, archive and user role.","wc-ajax-product-filter"),isChecked:!1,onChange:l,isDisabled:!0,isPro:!0}),void 0)},ws=window.wp.compose;const Es=t=>{let{tabId:n,onClick:r,children:a,selected:o,...i}=t;return(0,e.createElement)(d.Button,Z({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:n,onClick:r},i),a)};function xs(t){var n;let{className:r,children:a,tabs:o,initialTabName:i,orientation:l="horizontal",activeClass:s="is-active",onSelect:u=c.noop,currentTab:p,onChangeTab:f}=t;const m=(0,ws.useInstanceId)(xs,"tab-panel"),h=e=>{f(e),u(e)},_=(0,c.find)(o,{name:p}),v=`${m}-${null!==(n=null==_?void 0:_.name)&&void 0!==n?n:"none"}`;return(0,e.useEffect)((()=>{if(!(0,c.find)(o,{name:p})){const e=i||(o.length>0?o[0].name:null);f(e)}}),[o]),(0,e.createElement)("div",{className:r},(0,e.createElement)(d.NavigableMenu,{role:"tablist",orientation:l,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},o.map((t=>(0,e.createElement)(Es,{className:Kn()("components-tab-panel__tabs-item",t.className,{[s]:t.name===p}),tabId:`${m}-${t.name}`,"aria-controls":`${m}-${t.name}-view`,selected:t.name===p,key:t.name,onClick:(0,c.partial)(h,t.name)},t.title)))),_&&(0,e.createElement)("div",{key:v,"aria-labelledby":v,role:"tabpanel",id:`${v}-view`,className:"components-tab-panel__tab-content"},a(_)))}const Cs=["reset-button","results-count","apply-mode","submit-mode"];var Os=t=>{let{index:n}=t;const{state:r,dispatch:a}=i(),{setDirty:o}=L(r,a),[l,p]=(0,e.useState)(!1),{filterKeys:f,filterStates:m,formFilters:h}=r,_=h[n],{id:v,uniqueIndex:g,type:y,meta_key:E,component:x}=_;let C;C=_.isNew?g:v;const S=m[C]||{},j=(null==S?void 0:S.accordionStatus)||!1,T=(null==S?void 0:S.currentTab)||"general",k=(0,e.useRef)(""),D=(0,e.useRef)(""),N=(e,t)=>{const n={...m,[C]:{...m[C],[e]:t}};a({type:"SET_FILTER_STATES",payload:n})},I=e=>{X(),k.current.contains(e.target)||N("accordionStatus",!j)},F=()=>{const e=[...h];e.splice(n,1),a({type:"SET_FORM_FILTERS",payload:e});const t=(0,c.omit)(m,C);if(a({type:"SET_FILTER_STATES",payload:t}),v){const e=f.filter((e=>e.id!==v));a({type:"SET_FILTER_KEYS",payload:e})}o()},M=function(e,t){if(!e)return!1;const n=[];let r;const a=["component"];for(let o=0;o<e.length;o++){const i=e[o];o===t?r=On(i):a.includes(i.type)||n.push(On(i))}return n.includes(r)}(h,n),A=(0,u.__)("There are multiple filters found in the form for the same entity. Please remove the other ones then save the form.","wc-ajax-product-filter"),R=j?Wn:qn,P=Kn()("__top",{open:j},{multiple_filter_instance_found:M}),V=En(_),H=xn(_,V),B=Sn(f,_)||Cn(_,V),U=function(e){const{type:t,value_type:n,display_type:r,number_display_type:a,date_display_type:o}=e;let i,l;return"number"===n||"price"===t?(i=Fn(),l=a):"date"===n?(i=Mn(),l=o):(i=O(Nn,[]),l=r),i.find((e=>e.value===l))}(_),$="component"===y&&Cs.includes(x),z="active-filters"===x,W=function(e){const t=[{name:"general",title:(0,u.__)("General","wc-ajax-product-filter")},{name:"appearance",title:(0,u.__)("Appearance","wc-ajax-product-filter")},{name:"options",title:(0,u.__)("Options","wc-ajax-product-filter")},{name:"advanced",title:(0,u.__)("Advanced","wc-ajax-product-filter")}],{type:n}=e;return"component"===n?t.filter((e=>{let{name:t}=e;return"general"===t})):"keyword"===n?t.filter((e=>{let{name:t}=e;return["general","advanced"].includes(t)})):t}(_);let q;return q=6.2<=w()?{popoverProps:{noArrow:!1,position:"top center"}}:{popoverProps:{noArrow:!1},position:"top center"},(0,e.createElement)("div",{className:"__item"},(0,e.createElement)("div",{className:P,onClick:I},(0,e.createElement)("div",{className:"__drag_handle_wrapper",ref:k},(0,e.createElement)(Gn,{className:"__drag_handler",icon:Yn})),(0,e.createElement)("div",{className:"_filter_header"},(0,e.createElement)("div",{className:"__title"},(0,e.createElement)("div",{className:"__truncated"},$?(0,e.createElement)("span",null,"—"):H)),(0,e.createElement)("div",{className:"__type"},(0,e.createElement)("div",{className:"__wrapper"},V&&(0,e.createElement)("div",{className:"__filter_type"},V.label),"post-meta"===y&&(0,e.createElement)("div",{className:"__truncated __meta_key"},E))),(0,e.createElement)("div",{className:"__key"},(0,e.createElement)("div",{className:"__truncated"},$||z?(0,e.createElement)("span",null,"—"):B)),(0,e.createElement)("div",{className:"__display"},(0,e.createElement)("div",{className:"__truncated"},$||z?(0,e.createElement)("span",null,"—"):null==U?void 0:U.label))),(0,e.createElement)("div",{className:"__accordion_toggle_button"},(0,e.createElement)(d.Button,{isSmall:!0,icon:R,ref:D}))),j&&(0,e.createElement)("div",{className:"__accordion_body"},(0,e.createElement)(xs,{className:"__tab_panel",activeClass:"active-tab",tabs:W,currentTab:T,onChangeTab:e=>{N("currentTab",e)}},(t=>{let{name:r}=t;return(0,e.createElement)(e.Fragment,null,M&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1,className:"multiple_filter_instance_notice"},A),(t=>"general"===t?(0,e.createElement)(vl,{index:n}):"appearance"===t?(0,e.createElement)(Cl,{index:n}):"options"===t?(0,e.createElement)(gs,{index:n}):"advanced"===t?(0,e.createElement)(ys,{index:n}):void 0)(r))})),(0,e.createElement)("div",{className:"__action_buttons"},(0,e.createElement)(d.Button,{variant:"link",onClick:e=>{I(e),D.current.focus()}},(0,u.__)("Close","wc-ajax-product-filter"))," | ",(0,e.createElement)(d.Dropdown,Z({},q,{contentClassName:"__remove_popover",focusOnMount:!0,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,isBusy:l,disabled:l,onClick:r,"aria-expanded":n},(0,u.__)("Delete","wc-ajax-product-filter"))},renderContent:t=>{let{onToggle:n}=t;return(0,e.createElement)(e.Fragment,null,(0,u.__)("Are you sure?","wc-ajax-product-filter")," ",(0,e.createElement)(d.Button,{variant:"link",isDestructive:!0,onClick:()=>(e=>{if(v){e(),p(!0);const t={action:"wcapf_delete_filter",nonce:b(),post_id:v};s().get(wcapf_admin_params.ajaxurl,{params:t}).then((e=>{p(!1);const{data:{data:t,success:n}}=e;n?F():Y(t)})).catch((e=>{p(!1),Y(e.message)}))}else F()})(n)},(0,u.__)("Delete","wc-ajax-product-filter"))," ",(0,e.createElement)(d.Button,{variant:"link",onClick:n},(0,u.__)("Cancel","wc-ajax-product-filter")))}})))))},Ss=t=>{let{addFilter:n}=t;return(0,e.createElement)("div",{className:"__empty_form"},(0,e.createElement)(d.Icon,{icon:"filter"}),(0,e.createElement)("h3",null,(0,u.__)("You don't have any filters yet.","wc-ajax-product-filter")),(0,e.createElement)("p",{className:"__description"},(0,u.__)("Click on the button below to add your first filter.","wc-ajax-product-filter")),(0,e.createElement)(d.Button,{variant:"primary",onClick:n,className:"__add_filter_btn"},(0,e.createElement)(d.Icon,{icon:$n}),(0,u.__)("Add Filter","wc-ajax-product-filter")))},js=(0,e.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Un.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const Ts=wcapf_admin_params.show_v4_review_filters_notice;var ks=()=>(0,e.createElement)(e.Fragment,null,Ts&&(0,e.createElement)("div",{className:"components-notice is-info is-dismissible",id:"wcapf-v4-review-filters-notice"},(0,e.createElement)("div",{className:"components-notice__content"},(0,e.createElement)("p",null,"Please review your filters carefully after the migration. None of your previous filters have been removed; only the filter data has been migrated. Take a close look at the filters and consider adjusting their order if necessary."),(0,e.createElement)("p",null,"Additionally, please ensure that there is only one filter per entity in the form. If multiple filters for the same entity are present, indicated by a light-red background, kindly remove the duplicates, as having multiple filters for the same entity in a single form is not allowed.")),(0,e.createElement)(d.Button,{className:"components-notice__dismiss",icon:js,onClick:()=>{"function"==typeof removeWCAPFReviewFiltersNotice&&removeWCAPFReviewFiltersNotice()}}))),Ds=()=>{const{state:t,dispatch:n}=i(),{setDirty:r}=L(t,n),{addFilterIndex:a,filterStates:o,formFilters:l,saveError:s}=t,p=()=>{const e={...o,[a]:{accordionStatus:!0,currentTab:"general"}};n({type:"SET_FILTER_STATES",payload:e});const t=function(e,t){let n={};const r=wcapf_admin_params.filter_types,a=(0,c.find)(r,{value:"taxonomy"}).options;for(let e=0;e<a.length;e++){const r=a[e],{type:o,value:i,taxHierarchical:l}=r;if(!(0,c.find)(t,{type:o,taxonomy:i})){n={type:o,taxonomy:i,taxHierarchical:l?"1":""};break}}if((0,c.isEmpty)(n)){const e=["taxonomy","sort-by","per-page","component"];for(let a=0;a<r.length;a++){const o=r[a];if(!e.includes(o.value)){const{value:e}=o;if(!(0,c.find)(t,{type:e})){n={type:e};break}}}}return(0,c.isEmpty)(n)&&(n={type:"post-meta"}),(0,c.merge)({},Tn(),n,{isNew:!0,uniqueIndex:e})}(a,l),i=[...l,t];n({type:"SET_FORM_FILTERS",payload:i}),r(),n({type:"INCREMENT_ADD_FILTER_INDEX"})};return(0,e.createElement)("div",{className:"__filters_drop_zone",id:"__filters_drop_zone"},(0,c.isEmpty)(l)?(0,e.createElement)(Ss,{addFilter:p}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ks,null),s&&(0,e.createElement)(d.Notice,{status:"error",isDismissible:!1},s),(0,e.createElement)("div",{className:"__filters_list_header"},(0,e.createElement)("div",{className:"__title"},(0,u.__)("Title","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__type"},(0,u.__)("Type","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__key"},(0,u.__)("Key","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__display"},(0,u.__)("Display","wc-ajax-product-filter"))),(0,e.createElement)(zn.ReactSortable,{list:l,setList:(e,t,r)=>{t&&r.dragging&&n({type:"SET_FORM_FILTERS",payload:e})},direction:"vertical",handle:".__drag_handler",onSort:r,className:"__form_filters"},l.map(((t,n)=>{const r=t.isNew?t.uniqueIndex:t.id;return(0,e.createElement)(Os,{key:r,index:n,filter:t})}))),(0,e.createElement)(d.Flex,{justify:"flex-end"},(0,e.createElement)(d.Button,{variant:"secondary",className:"__add_filter_btn",onClick:p},(0,e.createElement)(d.Icon,{icon:$n}),(0,u.__)("Add Filter")))))},Ns=(e,t)=>{const{setDirty:n}=L(e,t),{formSettings:r}=e,a=(e,a)=>{a!==r[e]&&(t({type:"SET_FORM_SETTINGS",payload:{...r,[e]:a}}),U(),n())};return{handleRadioChange:(e,t)=>{const n=e.target.value;a(t,n)},handleCheckboxChange:(e,t)=>{a(t,e?"1":"")},handleTextFieldChange:(e,t)=>{a(t,e)},handleSelectChange:(e,t)=>{a(t,e.value)},handleFormLocations:e=>{a("form_locations",e)}}};(0,u.__)("Standard shop loop","wc-ajax-product-filter"),(0,u.__)("Products + Pagination","wc-ajax-product-filter"),(0,u.__)("Products only","wc-ajax-product-filter"),(0,u.__)("Default","wc-ajax-product-filter"),(0,u.__)("On Sale","wc-ajax-product-filter"),(0,u.__)("Best Selling","wc-ajax-product-filter"),(0,u.__)("Top Rated","wc-ajax-product-filter"),(0,u.__)("Visible","wc-ajax-product-filter"),(0,u.__)("Catalog","wc-ajax-product-filter"),(0,u.__)("Search","wc-ajax-product-filter"),(0,u.__)("Hidden","wc-ajax-product-filter"),(0,u.__)("Featured","wc-ajax-product-filter"),(0,u.__)("Default","wc-ajax-product-filter"),(0,u.__)("Date","wc-ajax-product-filter"),(0,u.__)("ID","wc-ajax-product-filter"),(0,u.__)("Menu Order","wc-ajax-product-filter"),(0,u.__)("Popularity","wc-ajax-product-filter"),(0,u.__)("Price","wc-ajax-product-filter"),(0,u.__)("Rating","wc-ajax-product-filter"),(0,u.__)("Random","wc-ajax-product-filter"),(0,u.__)("Title","wc-ajax-product-filter"),Dn(),wcapf_admin_params.meta_keys,wcapf_admin_params.meta_types;const Is=wcapf_admin_params.filter_types.find((e=>"taxonomy"===e.value));Is&&Is.options,(0,u.__)("IN","wc-ajax-product-filter"),(0,u.__)("NOT IN","wc-ajax-product-filter"),(0,u.__)("AND","wc-ajax-product-filter"),(0,u.__)("= (equals)","wc-ajax-product-filter"),(0,u.__)("!= (not equals)","wc-ajax-product-filter"),(0,u.__)("< (less than)","wc-ajax-product-filter"),(0,u.__)("> (greater than)","wc-ajax-product-filter"),(0,u.__)("<= (less than or equal)","wc-ajax-product-filter"),(0,u.__)(">= (greater than or equal)","wc-ajax-product-filter"),(0,u.__)("like","wc-ajax-product-filter"),(0,u.__)("not like","wc-ajax-product-filter"),(0,u.__)("exists","wc-ajax-product-filter"),(0,u.__)("not exists","wc-ajax-product-filter"),wcapf_admin_params.form_places;const Fs=wcapf_admin_params.multiple_form_locations;var Ms=()=>{const{state:t,dispatch:n}=i(),{handleFormLocations:r}=Ns(t,n),{formSettings:{form_locations:a}}=t;let o=[];return o&&(o=Fs?[...a]:a.slice(0,1)),Fs&&o.length,(0,e.createElement)("div",{className:"__form_control __available_on"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,(0,u.__)("Available on","wc-ajax-product-filter"),x(!0),!1)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(e.Fragment,null,(0,e.createElement)("input",{type:"text",className:"components-text-control__input",disabled:!0,value:(0,u.__)("Product archive pages","wc-ajax-product-filter")}),(0,e.createElement)(hn,{content:(0,u.__)((0,e.createElement)(e.Fragment,null,"For example, you may want to use a different form of filters on"," ",(0,e.createElement)("b",null,"Women's clothing")," or"," ",(0,e.createElement)("b",null,"Men's clothing"),". Or you may want to show the products on singular pages and want to integrate the filters there. In the Pro version, you will be able to do that."))}))))),(0,e.createElement)("p",{className:"description"},(0,u.__)("Determines where you want to show the form to filter the products.","wc-ajax-product-filter")))},As=()=>{const{state:t,dispatch:n}=i(),{handleTextFieldChange:r,handleCheckboxChange:a}=Ns(t,n),{formSettings:{priority:o,show_clear_btn:l}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ms,null),!1,(0,e.createElement)(fl,{id:"show_clear_btn",label:(0,u.__)("Enable clear filter","wc-ajax-product-filter"),isChecked:l,onChange:a,description:(0,u.__)("Whether to show a button in each filter to clear the active options.","wc-ajax-product-filter"),isPro:!0}))},Rs=()=>{const{state:t,dispatch:n}=i(),{isLoading:r,currentTab:a,filterStates:o}=t;return(0,e.useEffect)((()=>{if("settings"===a){const e={};for(const t in o)e[t]={accordionStatus:!1,currentTab:"general"};n({type:"SET_FILTER_STATES",payload:e})}}),[a]),(0,e.createElement)(xs,{currentTab:a,onChangeTab:e=>{n({type:"SET_CURRENT_TAB",payload:e})},className:"__tab_panel __form_tab_panel",activeClass:"active-tab",tabs:[{name:"filters",title:(0,u.__)("Filters","wc-ajax-product-filter")},{name:"settings",title:(0,u.__)("Settings","wc-ajax-product-filter")}]},(t=>{let{name:n}=t;return r?(0,e.createElement)("div",{className:"__loader"},(0,e.createElement)(d.Spinner,null)):"filters"===n?(0,e.createElement)(Ds,null):"settings"===n?(0,e.createElement)("div",{className:"__form_settings"},(0,e.createElement)(As,null)):void 0}))},Ps=window.wp.notices,Ls=()=>{const t=(0,V.useSelect)((e=>e(Ps.store).getNotices()),[]),{removeNotice:n}=(0,V.useDispatch)(Ps.store),r=t.filter((e=>{let{type:t}=e;return"snackbar"===t}));return(0,e.createElement)(d.SnackbarList,{notices:r,className:"components-editor-notices__snackbar",onRemove:n})};const Vs=wcapf_admin_params.show_review_notice_for_time_since;var Hs=()=>{const{state:{showReviewNotice:t}}=i();return t?(0,e.createElement)(I,{noticeType:"milestone-achieved"}):Vs?(0,e.createElement)(I,{noticeType:"time-since",timeSince:Vs}):null},Bs=()=>{const{dispatch:t}=i();return(0,e.useEffect)((()=>{(()=>{const e=new URL(window.location.href).searchParams.get("id"),t={action:"wcapf_get_form_data",nonce:b(),post_id:e};return s().get(wcapf_admin_params.ajaxurl,{params:t})})().then((e=>{const{data:{data:n,success:r}}=e;if(!r)return K(n),void t({type:"SET_LOADING",payload:!1});const a=n.filter_keys,o=[],i=n.form_filters,l=n.form_settings,s=["sort-by","per-page"],u=["results-count","apply-mode","submit-mode"];if(i)for(let e=0;e<i.length;e++){const t=i[e];if(s.includes(t.type)||u.includes(t.component))continue;const n={...Tn(),...t};o.push(n)}t({type:"SET_FILTER_KEYS",payload:a});const d={};for(let e=0;e<o.length;e++){let t=!1,n="general";d[o[e].id]={accordionStatus:t,currentTab:n}}t({type:"SET_FILTER_STATES",payload:d}),t({type:"SET_FORM_FILTERS",payload:o}),t({type:"SET_FORM_SETTINGS",payload:(0,c.merge)({},Pn(),l)}),t({type:"SET_LOADING",payload:!1})})).catch((e=>{K(e.message),console.log(e),t({type:"SET_LOADING",payload:!1})}))}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__wcapf_admin"},(0,e.createElement)(P,{view:"form"}),(0,e.createElement)(Hs,null),(0,e.createElement)("div",{className:"__edit_filter"},(0,e.createElement)("div",{className:"__edit_filter_from"},(0,e.createElement)("div",{className:"__content"},(0,e.createElement)(Bn,null),(0,e.createElement)(Rs,null)))),(0,e.createElement)(Ls,null)))};const Us=()=>(0,e.createElement)(o,null,(0,e.createElement)(Bs,null));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("wcapf-form-admin-ui");t&&(0,e.render)((0,e.createElement)(e.StrictMode,null,(0,e.createElement)(Us,null)),t)}))}()}();
  • wc-ajax-product-filter/trunk/build/settings.asset.php

    r2958786 r3127796  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '96eea04fd50d9a93d6ef');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-media-utils', 'wp-notices', 'wp-primitives'), 'version' => '88def709c9e71319fffa');
  • wc-ajax-product-filter/trunk/build/settings.js

    r2958786 r3127796  
    1 !function(){var e={601:function(e,t){"use strict";t.Z=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return r(e[0],e[1])||null;var n=e.slice(1).reduce((function(e,t){return r(e,t)}),e[0]);return n||null};var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var a=r.get(t)||function(n){o(e,n),o(t,n)};return r.set(t,a),a}return e||t}function o(e,t){"function"==typeof e?e(t):e.current=t}},669:function(e,t,n){e.exports=n(609)},448:function(e,t,n){"use strict";var r=n(867),o=n(26),a=n(372),i=n(327),s=n(97),l=n(109),c=n(985),u=n(874),d=n(648),p=n(644),f=n(205);e.exports=function(e){return new Promise((function(t,n){var m,h=e.data,v=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}r.isFormData(h)&&r.isStandardBrowserEnv()&&delete v["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(_+":"+w)}var E=s(e.baseURL,e.url);function x(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,a={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};o((function(e){t(e),b()}),(function(e){n(e),b()}),a),y=null}}if(y.open(e.method.toUpperCase(),i(E,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(n(new d("Request aborted",d.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,y)),y=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(E))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;C&&(v[e.xsrfHeaderName]=C)}"setRequestHeader"in y&&r.forEach(v,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete v[t]:y.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){y&&(n(!e||e&&e.type?new p:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),h||(h=null);var O=f(E);O&&-1===["http","https","file"].indexOf(O)?n(new d("Unsupported protocol "+O+":",d.ERR_BAD_REQUEST,e)):y.send(h)}))}},609:function(e,t,n){"use strict";var r=n(867),o=n(849),a=n(321),i=n(185),s=function e(t){var n=new a(t),s=o(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(546));s.Axios=a,s.CanceledError=n(644),s.CancelToken=n(972),s.isCancel=n(502),s.VERSION=n(288).version,s.toFormData=n(675),s.AxiosError=n(648),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(713),s.isAxiosError=n(268),e.exports=s,e.exports.default=s},972:function(e,t,n){"use strict";var r=n(644);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},644:function(e,t,n){"use strict";var r=n(648);function o(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(867).inherits(o,r,{__CANCEL__:!0}),e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(867),o=n(327),a=n(782),i=n(572),s=n(185),l=n(97),c=n(875),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new a,response:new a}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var a,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!o){var d=[i,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(l),a=Promise.resolve(t);d.length;)a=a.then(d.shift(),d.shift());return a}for(var p=t;r.length;){var f=r.shift(),m=r.shift();try{p=f(p)}catch(e){m(e);break}}try{a=i(p)}catch(e){return Promise.reject(e)}for(;l.length;)a=a.then(l.shift(),l.shift());return a},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(s(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},648:function(e,t,n){"use strict";var r=n(867);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var a=o.prototype,i={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){i[e]={value:e}})),Object.defineProperties(o,i),Object.defineProperty(a,"isAxiosError",{value:!0}),o.from=function(e,t,n,i,s,l){var c=Object.create(a);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),o.call(c,e.message,t,n,i,s),c.name=e.name,l&&Object.assign(c,l),c},e.exports=o},782:function(e,t,n){"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:function(e,t,n){"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},572:function(e,t,n){"use strict";var r=n(867),o=n(527),a=n(502),i=n(546),s=n(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},185:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||a,o=t(e);r.isUndefined(o)&&t!==l||(n[e]=o)})),n}},26:function(e,t,n){"use strict";var r=n(648);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},527:function(e,t,n){"use strict";var r=n(867),o=n(546);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},546:function(e,t,n){"use strict";var r=n(867),o=n(16),a=n(648),i=n(874),s=n(675),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:i,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(448)),u),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,a=r.isObject(e),i=t&&t["Content-Type"];if((n=r.isFileList(e))||a&&"multipart/form-data"===i){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return a||"application/json"===i?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){d.headers[e]=r.merge(l)})),e.exports=d},874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:function(e){e.exports={version:"0.27.2"}},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},327:function(e,t,n){"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},268:function(e,t,n){"use strict";var r=n(867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},985:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},623:function(e){e.exports=null},109:function(e,t,n){"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},205:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},675:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(a,i){if(r.isPlainObject(a)||r.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+i);n.push(a),r.forEach(a,(function(n,a){if(!r.isUndefined(n)){var s,l=i?i+"."+a:a;if(n&&!i&&"object"==typeof n)if(r.endsWith(a,"{}"))n=JSON.stringify(n);else if(r.endsWith(a,"[]")&&(s=r.toArray(n)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(l,o(e))}));e(n,l)}})),n.pop()}else t.append(i,o(a))}(e),t}},875:function(e,t,n){"use strict";var r=n(288).version,o=n(648),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};a.transitional=function(e,t,n){function a(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new o(a(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!i[r]&&(i[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),a=r.length;a-- >0;){var i=r[a],s=t[i];if(s){var l=e[i],c=void 0===l||s(l,i,e);if(!0!==c)throw new o("option "+i+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+i,o.ERR_BAD_OPTION)}},validators:a}},867:function(e,t,n){"use strict";var r,o=n(849),a=Object.prototype.toString,i=(r=Object.create(null),function(e){var t=a.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var u=s("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=s("Date"),m=s("File"),h=s("Blob"),v=s("FileList");function g(e){return"[object Function]"===a.call(e)}var b=s("URLSearchParams");function y(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var _,w=(_="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return _&&e instanceof _});e.exports={isArray:l,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||a.call(e)===t||g(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:p,isUndefined:c,isDate:f,isFile:m,isBlob:h,isFunction:g,isStream:function(e){return d(e)&&g(e.pipe)},isURLSearchParams:b,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)y(arguments[r],n);return t},extend:function(e,t,n){return y(t,(function(t,r){e[r]=n&&"function"==typeof t?o(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,o,a,i={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)i[a=r[o]]||(t[a]=e[a],i[a]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:v}},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===a)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},679:function(e,t,n){"use strict";var r=n(864),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 c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=f(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),h=l(n),v=0;v<i.length;++v){var g=i[v];if(!(a[g]||r&&r[g]||h&&h[g]||s&&s[g])){var b=p(n,g);try{c(t,g,b)}catch(e){}}}}return t}},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,s,l=o(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var d=0;d<s.length;d++)r.call(i,s[d])&&(l[s[d]]=i[s[d]])}}return l}},921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case h:case l:return e;default:return t}}case o:return t}}}function E(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||w(e)===u},t.isConcurrentMode=E,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===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===_||e.$$typeof===g)},t.typeOf=w},864:function(e,t,n){"use strict";e.exports=n(921)},941:function(e,t,n){var r=n(474),o=n(184),a=n(196),i=n(177);function s(e){return e&&e.__esModule?e.default:e}function l(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const r=e.children[n]||null;e.insertBefore(t,r)}(e.parentElement,e.element,e.oldIndex)}))}function p(e,t){const n=h(e),r={parentElement:e.from};let o=[];switch(n){case"normal":o=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":o=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...r},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...r}];break;case"multidrag":o=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...r})))}const a=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(o,t);return a}function f(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function m(e,t,n,r){const o=[...t];return e.forEach((e=>{const t=r&&n&&r(e.item,n);o.splice(e.newIndex,0,t||e.item)})),o}function h(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}l(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),l(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),l(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),l(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),l(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),l(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),l(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),l(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),l(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),l(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),l(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),l(e.exports,"ReactSortable",(()=>g));const v={dragging:null};class g extends a.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,a.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,v),s(i)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();s(r).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:r}=this.props,o={style:t,className:n,id:r},i=e&&null!==e?e:"div";return(0,a.createElement)(i,{ref:this.ref,...o},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:l="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const f=t||"data-id";return a.Children.map(e,((e,t)=>{if(void 0===e)return;const i=p[t]||{},{className:l}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!i.filtered},u=s(o)(l,{[n]:i.selected,[r]:i.chosen,...c});return(0,a.cloneElement)(e,{[f]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:r,tag:o,style:a,className:i,clone:s,onAdd:l,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:f,onRemove:m,onSort:h,onStart:v,onUnchoose:g,onUpdate:b,onMove:y,onSpill:_,onSelect:w,onDeselect:E,...x}=e;return x}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;const o=n(e,t,this.sortable,v);return void 0!==o&&o}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,v)}onAdd(e){const{list:t,setList:n,clone:r}=this.props,o=p(e,[...v.dragging.props.list]);u(o),n(m(o,t,e,r).map((e=>Object.assign(e,{selected:!1}))),this.sortable,v)}onRemove(e){const{list:t,setList:n}=this.props,r=h(e),o=p(e,t);d(o);let a=[...t];if("clone"!==e.pullMode)a=f(o,a);else{let t=o;switch(r){case"multidrag":t=o.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=o.map((t=>({...t,element:e.clone})));break;default:s(i)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}u(t),o.forEach((t=>{const n=t.oldIndex,r=this.props.clone(t.item,e);a.splice(n,1,r)}))}a=a.map((e=>Object.assign(e,{selected:!1}))),n(a,this.sortable,v)}onUpdate(e){const{list:t,setList:n}=this.props,r=p(e,t);return u(r),d(r),n(function(e,t){return m(e,f(e,t))}(r,t),this.sortable,v)}onStart(){v.dragging=this}onEnd(){v.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r})),this.sortable,v)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r})),this.sortable,v)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);r[n].selected=!0})),n(r,this.sortable,v)}onDeselect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(r[t].selected=!0)})),n(r,this.sortable,v)}}var b,y;b=e.exports,y={},Object.keys(y).forEach((function(e){"default"===e||"__esModule"===e||b.hasOwnProperty(e)||Object.defineProperty(b,e,{enumerable:!0,get:function(){return y[e]}})}))},251:function(e,t,n){"use strict";n(418);var r=n(196),o=60103;if("function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),a("react.fragment")}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:i.current}}},893:function(e,t,n){"use strict";e.exports=n(251)},474:function(e,t,n){"use strict";function r(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return a="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},a(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:function(){return _t},Sortable:function(){return Be},Swap:function(){return ct}});var d=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=u(/Edge/i),f=u(/firefox/i),m=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),h=u(/iP(ad|od|hone)/i),v=u(/chrome/i)&&u(/android/i),g={capture:!1,passive:!1};function b(e,t,n){e.addEventListener(t,n,!d&&g)}function y(e,t,n){e.removeEventListener(t,n,!d&&g)}function _(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&_(e,t):_(e,t))||r&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var x,C=/\s+/g;function O(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(C," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(C," ")}}function S(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function D(e,t){var n="";if("string"==typeof e)n=e;else do{var r=S(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function k(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function A(){return document.scrollingElement||document.documentElement}function T(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var a,i,s,l,c,u,p;if(e!==window&&e.parentNode&&e!==A()?(i=(a=e.getBoundingClientRect()).top,s=a.left,l=a.bottom,c=a.right,u=a.height,p=a.width):(i=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!d))do{if(o&&o.getBoundingClientRect&&("none"!==S(o,"transform")||n&&"static"!==S(o,"position"))){var f=o.getBoundingClientRect();i-=f.top+parseInt(S(o,"border-top-width")),s-=f.left+parseInt(S(o,"border-left-width")),l=i+a.height,c=s+a.width;break}}while(o=o.parentNode);if(r&&e!==window){var m=D(o||e),h=m&&m.a,v=m&&m.d;m&&(l=(i/=v)+(u/=v),c=(s/=h)+(p/=h))}return{top:i,left:s,bottom:l,right:c,width:p,height:u}}}function P(e,t,n){for(var r=R(e,!0),o=T(e)[t];r;){var a=T(r)[n];if(!("top"===n||"left"===n?o>=a:o<=a))return r;if(r===A())break;r=R(r,!1)}return!1}function j(e,t,n,r){for(var o=0,a=0,i=e.children;a<i.length;){if("none"!==i[a].style.display&&i[a]!==Be.ghost&&(r||i[a]!==Be.dragged)&&E(i[a],n.draggable,e,!1)){if(o===t)return i[a];o++}a++}return null}function M(e,t){for(var n=e.lastElementChild;n&&(n===Be.ghost||"none"===S(n,"display")||t&&!_(n,t));)n=n.previousElementSibling;return n||null}function N(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Be.clone||t&&!_(e,t)||n++;return n}function I(e){var t=0,n=0,r=A();if(e)do{var o=D(e),a=o.a,i=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function R(e,t){if(!e||!e.getBoundingClientRect)return A();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=S(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return A();if(r||t)return n;r=!0}}}while(n=n.parentNode);return A()}function L(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function F(e,t){return function(){if(!x){var n=arguments,r=this;1===n.length?e.call(r,n[0]):e.apply(r,n),x=setTimeout((function(){x=void 0}),t)}}}function V(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function H(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function B(e,t){S(e,"position","absolute"),S(e,"top",t.top),S(e,"left",t.left),S(e,"width",t.width),S(e,"height",t.height)}function U(e){S(e,"position",""),S(e,"top",""),S(e,"left",""),S(e,"width",""),S(e,"height","")}var $="Sortable"+(new Date).getTime();var z=[],W={initializeByDefault:!0},Y={mount:function(e){for(var t in W)W.hasOwnProperty(t)&&!(t in e)&&(e[t]=W[t]);z.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),z.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var a=e+"Global";z.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][a]&&t[r.pluginName][a](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in z.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var a=new r(e,t,e.options);a.sortable=e,a.options=e.options,e[o]=a,s(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);void 0!==a&&(e.options[o]=a)}},getEventProperties:function(e,t){var n={};return z.forEach((function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return z.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}};function G(e){var t=e.sortable,n=e.rootEl,r=e.name,a=e.targetEl,i=e.cloneEl,s=e.toEl,l=e.fromEl,c=e.oldIndex,u=e.newIndex,f=e.oldDraggableIndex,m=e.newDraggableIndex,h=e.originalEvent,v=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[$]){var b,y=t.options,_="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||d||p?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=s||n,b.from=l||n,b.item=a||n,b.clone=i,b.oldIndex=c,b.newIndex=u,b.oldDraggableIndex=f,b.newDraggableIndex=m,b.originalEvent=h,b.pullMode=v?v.lastPutMode:void 0;var w=o(o({},g),Y.getEventProperties(r,t));for(var E in w)b[E]=w[E];n&&n.dispatchEvent(b),y[_]&&y[_].call(t,b)}}var X=["evt"],q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,a=l(n,X);Y.pluginEvent.bind(Be)(e,t,o({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:re,cloneHidden:oe,dragStarted:ge,putSortable:ue,activeSortable:Be.active,originalEvent:r,oldIndex:ae,oldDraggableIndex:se,newIndex:ie,newDraggableIndex:le,hideGhostForTarget:Le,unhideGhostForTarget:Fe,cloneNowHidden:function(){oe=!0},cloneNowShown:function(){oe=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:r})}},a))};function K(e){G(o({putSortable:ue,cloneEl:re,targetEl:Z,rootEl:ee,oldIndex:ae,oldDraggableIndex:se,newIndex:ie,newDraggableIndex:le},e))}var Z,J,Q,ee,te,ne,re,oe,ae,ie,se,le,ce,ue,de,pe,fe,me,he,ve,ge,be,ye,_e,we,Ee=!1,xe=!1,Ce=[],Oe=!1,Se=!1,De=[],ke=!1,Ae=[],Te="undefined"!=typeof document,Pe=h,je=p||d?"cssFloat":"float",Me=Te&&!v&&!h&&"draggable"in document.createElement("div"),Ne=function(){if(Te){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ie=function(e,t){var n=S(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=j(e,0,t),a=j(e,1,t),i=o&&S(o),s=a&&S(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+T(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=r&&"none"===n[je]||a&&"none"===n[je]&&l+c>r)?"vertical":"horizontal"},Re=function(e){function t(e,n){return function(r,o,a,i){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,a,i),n)(r,o,a,i);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==a(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Le=function(){!Ne&&Q&&S(Q,"display","none")},Fe=function(){!Ne&&Q&&S(Q,"display","")};Te&&!v&&document.addEventListener("click",(function(e){if(xe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xe=!1,!1}),!0);var Ve=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,a=e.clientY,Ce.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!M(e)){var n=T(e),r=o>=n.left-t&&o<=n.right+t,s=a>=n.top-t&&a<=n.bottom+t;return r&&s?i=e:void 0}})),i);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var o,a,i},He=function(e){Z&&Z.parentNode[$]._isOutsideThisEl(e.target)};function Be(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[$]=this;var n,r,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ie(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Be.supportPointer&&"PointerEvent"in window&&!m,emptyInsertThreshold:5};for(var i in Y.initializePlugins(this,e,a),a)!(i in t)&&(t[i]=a[i]);for(var l in Re(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&Me,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?b(e,"pointerdown",this._onTapStart):(b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Ce.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==S(e,"display")&&e!==Be.ghost){r.push({target:e,rect:T(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=D(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,a=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,s=T(r),l=r.prevFromRect,c=r.prevToRect,u=e.rect,d=D(r,!0);d&&(s.top-=d.f,s.left-=d.e),r.toRect=s,r.thisAnimationDuration&&L(l,s)&&!L(i,s)&&(u.top-s.top)/(u.left-s.left)==(i.top-s.top)/(i.left-s.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(u,l,c,t.options)),L(s,i)||(r.prevFromRect=i,r.prevToRect=s,n||(n=t.options.animation),t.animate(r,u,s,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),a):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){S(e,"transition",""),S(e,"transform","");var o=D(this.el),a=o&&o.a,i=o&&o.d,s=(t.left-n.left)/(a||1),l=(t.top-n.top)/(i||1);e.animatingX=!!s,e.animatingY=!!l,S(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),S(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),S(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){S(e,"transition",""),S(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function Ue(e,t,n,r,o,a,i,s){var l,c,u=e[$],f=u.options.onMove;return!window.CustomEvent||d||p?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=a||T(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),f&&(c=f.call(u,l,i)),c}function $e(e){e.draggable=!1}function ze(){ke=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ye(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}Be.prototype={constructor:Be,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(i||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(function(e){Ae.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ae.push(r)}}(n),!Z&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!m||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=E(s,r.draggable,n,!1))&&s.animated||ne===s)){if(ae=N(s),se=N(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return K({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),q("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=E(l,r.trim(),n,!1))return K({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),q("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!E(l,r.handle,n,!1)||this._prepareDragStart(e,i,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,a=o.el,i=o.options,s=a.ownerDocument;if(n&&!Z&&n.parentNode===a){var l=T(n);if(ee=a,J=(Z=n).parentNode,te=Z.nextSibling,ne=n,ce=i.group,Be.dragged=Z,de={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},he=de.clientX-l.left,ve=de.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",r=function(){q("delayEnded",o,{evt:e}),Be.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!f&&o.nativeDraggable&&(Z.draggable=!0),o._triggerDragStart(e,t),K({sortable:o,name:"choose",originalEvent:e}),O(Z,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){k(Z,e.trim(),$e)})),b(s,"dragover",Ve),b(s,"mousemove",Ve),b(s,"touchmove",Ve),b(s,"mouseup",o._onDrop),b(s,"touchend",o._onDrop),b(s,"touchcancel",o._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),q("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(p||d))r();else{if(Be.eventCanceled)return void this._onDrop();b(s,"mouseup",o._disableDelayedDrag),b(s,"touchend",o._disableDelayedDrag),b(s,"touchcancel",o._disableDelayedDrag),b(s,"mousemove",o._delayedDragTouchMoveHandler),b(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&b(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&$e(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?b(document,"pointermove",this._onTouchMove):b(document,t?"touchmove":"mousemove",this._onTouchMove):(b(Z,"dragend",this),b(ee,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Ee=!1,ee&&Z){q("dragStarted",this,{evt:t}),this.nativeDraggable&&b(document,"dragover",He);var n=this.options;!e&&O(Z,n.dragClass,!1),O(Z,n.ghostClass,!0),Be.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Le();for(var e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==t;)t=e;if(Z.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Fe()}},_onTouchMove:function(e){if(de){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=Q&&D(Q,!0),i=Q&&a&&a.a,s=Q&&a&&a.d,l=Pe&&we&&I(we),c=(o.clientX-de.clientX+r.x)/(i||1)+(l?l[0]-De[0]:0)/(i||1),u=(o.clientY-de.clientY+r.y)/(s||1)+(l?l[1]-De[1]:0)/(s||1);if(!Be.active&&!Ee){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Q){a?(a.e+=c-(fe||0),a.f+=u-(me||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");S(Q,"webkitTransform",d),S(Q,"mozTransform",d),S(Q,"msTransform",d),S(Q,"transform",d),fe=c,me=u,pe=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,t=T(Z,!0,Pe,!0,e),n=this.options;if(Pe){for(we=e;"static"===S(we,"position")&&"none"===S(we,"transform")&&we!==document;)we=we.parentNode;we!==document.body&&we!==document.documentElement?(we===document&&(we=A()),t.top+=we.scrollTop,t.left+=we.scrollLeft):we=A(),De=I(we)}O(Q=Z.cloneNode(!0),n.ghostClass,!1),O(Q,n.fallbackClass,!0),O(Q,n.dragClass,!0),S(Q,"transition",""),S(Q,"transform",""),S(Q,"box-sizing","border-box"),S(Q,"margin",0),S(Q,"top",t.top),S(Q,"left",t.left),S(Q,"width",t.width),S(Q,"height",t.height),S(Q,"opacity","0.8"),S(Q,"position",Pe?"absolute":"fixed"),S(Q,"zIndex","100000"),S(Q,"pointerEvents","none"),Be.ghost=Q,e.appendChild(Q),S(Q,"transform-origin",he/parseInt(Q.style.width)*100+"% "+ve/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;q("dragStart",this,{evt:e}),Be.eventCanceled?this._onDrop():(q("setupClone",this),Be.eventCanceled||((re=H(Z)).removeAttribute("id"),re.draggable=!1,re.style["will-change"]="",this._hideClone(),O(re,this.options.chosenClass,!1),Be.clone=re),n.cloneId=Ye((function(){q("clone",n),Be.eventCanceled||(n.options.removeCloneOnHide||ee.insertBefore(re,Z),n._hideClone(),K({sortable:n,name:"clone"}))})),!t&&O(Z,o.dragClass,!0),t?(xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,Z)),b(document,"drop",n),S(Z,"transform","translateZ(0)")),Ee=!0,n._dragStartId=Ye(n._dragStarted.bind(n,t,e)),b(document,"selectstart",n),ge=!0,m&&S(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,a,i=this.el,s=e.target,l=this.options,c=l.group,u=Be.active,d=ce===c,p=l.sort,f=ue||u,m=this,h=!1;if(!ke){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=E(s,l.draggable,i,!0),F("dragOver"),Be.eventCanceled)return h;if(Z.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||m._ignoreWhileAnimating===s)return B(!1);if(xe=!1,u&&!l.disabled&&(d?p||(r=J!==ee):ue===this||(this.lastPutMode=ce.checkPull(this,u,Z,e))&&c.checkPut(this,u,Z,e))){if(a="vertical"===this._getDirection(e,s),t=T(Z),F("dragOverValid"),Be.eventCanceled)return h;if(r)return J=ee,H(),this._hideClone(),F("revert"),Be.eventCanceled||(te?ee.insertBefore(Z,te):ee.appendChild(Z)),B(!0);var v=M(i,l.draggable);if(!v||function(e,t,n){var r=T(M(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,a,this)&&!v.animated){if(v===Z)return B(!1);if(v&&i===e.target&&(s=v),s&&(n=T(s)),!1!==Ue(ee,i,Z,t,s,n,e,!!s))return H(),v&&v.nextSibling?i.insertBefore(Z,v.nextSibling):i.appendChild(Z),J=i,U(),B(!0)}else if(v&&function(e,t,n){var r=T(j(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,a,this)){var g=j(i,0,l,!0);if(g===Z)return B(!1);if(n=T(s=g),!1!==Ue(ee,i,Z,t,s,n,e,!1))return H(),i.insertBefore(Z,g),J=i,U(),B(!0)}else if(s.parentNode===i){n=T(s);var b,y,_,w=Z.parentNode!==i,x=!function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,i=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===i||o===s||r+a/2===i+l/2}(Z.animated&&Z.toRect||t,s.animated&&s.toRect||n,a),C=a?"top":"left",D=P(s,"top","top")||P(Z,"top","top"),k=D?D.scrollTop:void 0;if(be!==s&&(y=n[C],Oe=!1,Se=!x&&l.invertSwap||w),b=function(e,t,n,r,o,a,i,s){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!i)if(s&&_e<c*o){if(!Oe&&(1===ye?l>u+c*a/2:l<d-c*a/2)&&(Oe=!0),Oe)p=!0;else if(1===ye?l<u+_e:l>d-_e)return-ye}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return function(e){return N(Z)<N(e)?1:-1}(t);return(p=p||i)&&(l<u+c*a/2||l>d-c*a/2)?l>u+c/2?1:-1:0}(e,s,n,a,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Se,be===s),0!==b){var A=N(Z);do{A-=b,_=J.children[A]}while(_&&("none"===S(_,"display")||_===Q))}if(0===b||_===s)return B(!1);be=s,ye=b;var I=s.nextElementSibling,R=!1,L=Ue(ee,i,Z,t,s,n,e,R=1===b);if(!1!==L)return 1!==L&&-1!==L||(R=1===L),ke=!0,setTimeout(ze,30),H(),R&&!I?i.appendChild(Z):s.parentNode.insertBefore(Z,R?I:s),D&&V(D,0,k-D.scrollTop),J=Z.parentNode,void 0===y||Se||(_e=Math.abs(y-T(s)[C])),U(),B(!0)}if(i.contains(Z))return B(!1)}return!1}function F(l,c){q(l,m,o({evt:e,isOwner:d,axis:a?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:s,completed:B,onMove:function(n,r){return Ue(ee,i,Z,t,n,T(n),e,r)},changed:U},c))}function H(){F("dragOverAnimationCapture"),m.captureAnimationState(),m!==f&&f.captureAnimationState()}function B(t){return F("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(m),m!==f&&(O(Z,ue?ue.options.ghostClass:u.options.ghostClass,!1),O(Z,l.ghostClass,!0)),ue!==m&&m!==Be.active?ue=m:m===Be.active&&ue&&(ue=null),f===m&&(m._ignoreWhileAnimating=s),m.animateAll((function(){F("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===Z&&!Z.animated||s===i&&!s.animated)&&(be=null),l.dragoverBubble||e.rootEl||s===document||(Z.parentNode[$]._isOutsideThisEl(e.target),!t&&Ve(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function U(){ie=N(Z),le=N(Z,l.draggable),K({sortable:m,name:"change",toEl:i,newIndex:ie,newDraggableIndex:le,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Ve),y(document,"mousemove",Ve),y(document,"touchmove",Ve)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ie=N(Z),le=N(Z,n.draggable),q("drop",this,{evt:e}),J=Z&&Z.parentNode,ie=N(Z),le=N(Z,n.draggable),Be.eventCanceled||(Ee=!1,Se=!1,Oe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&S(document.body,"user-select",""),S(Z,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===J||ue&&"clone"!==ue.lastPutMode)&&re&&re.parentNode&&re.parentNode.removeChild(re),Z&&(this.nativeDraggable&&y(Z,"dragend",this),$e(Z),Z.style["will-change"]="",ge&&!Ee&&O(Z,ue?ue.options.ghostClass:this.options.ghostClass,!1),O(Z,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==J?(ie>=0&&(K({rootEl:J,name:"add",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"remove",toEl:J,originalEvent:e}),K({rootEl:J,name:"sort",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),ue&&ue.save()):ie!==ae&&ie>=0&&(K({sortable:this,name:"update",toEl:J,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),Be.active&&(null!=ie&&-1!==ie||(ie=ae,le=se),K({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){q("nulling",this),ee=Z=J=Q=te=re=ne=oe=de=pe=ge=ie=le=ae=se=be=ye=ue=ce=Be.dragged=Be.ghost=Be.clone=Be.active=null,Ae.forEach((function(e){e.checked=!0})),Ae.length=fe=me=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,a=this.options;r<o;r++)E(e=n[r],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||We(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var o=r.children[t];E(o,this.options.draggable,r,!1)&&(n[e]=o)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return E(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=Y.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Re(n)},destroy:function(){q("destroy",this);var e=this.el;e[$]=null,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),y(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ce.splice(Ce.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!oe){if(q("hideClone",this),Be.eventCanceled)return;S(re,"display","none"),this.options.removeCloneOnHide&&re.parentNode&&re.parentNode.removeChild(re),oe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(oe){if(q("showClone",this),Be.eventCanceled)return;Z.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(re,te):ee.appendChild(re):ee.insertBefore(re,Z),this.options.group.revertClone&&this.animate(Z,re),S(re,"display",""),oe=!1}}else this._hideClone()}},Te&&b(document,"touchmove",(function(e){(Be.active||Ee)&&e.cancelable&&e.preventDefault()})),Be.utils={on:b,off:y,css:S,find:k,is:function(e,t){return!!E(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:F,closest:E,toggleClass:O,clone:H,index:N,nextTick:Ye,cancelNextTick:Ge,detectDirection:Ie,getChild:j},Be.get=function(e){return e[$]},Be.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Be.utils=o(o({},Be.utils),e.utils)),Y.mount(e)}))},Be.create=function(e,t){return new Be(e,t)},Be.version="1.15.0";var Xe,qe,Ke,Ze,Je,Qe,et=[],tt=!1;function nt(){et.forEach((function(e){clearInterval(e.pid)})),et=[]}function rt(){clearInterval(Qe)}var ot,at=F((function(e,t,n,r){if(t.scroll){var o,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=A(),u=!1;qe!==n&&(qe=n,nt(),Xe=t.scroll,o=t.scrollFn,!0===Xe&&(Xe=R(n,!0)));var d=0,p=Xe;do{var f=p,m=T(f),h=m.top,v=m.bottom,g=m.left,b=m.right,y=m.width,_=m.height,w=void 0,E=void 0,x=f.scrollWidth,C=f.scrollHeight,O=S(f),D=f.scrollLeft,k=f.scrollTop;f===c?(w=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),E=_<C&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(w=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX),E=_<C&&("auto"===O.overflowY||"scroll"===O.overflowY));var P=w&&(Math.abs(b-a)<=s&&D+y<x)-(Math.abs(g-a)<=s&&!!D),j=E&&(Math.abs(v-i)<=s&&k+_<C)-(Math.abs(h-i)<=s&&!!k);if(!et[d])for(var M=0;M<=d;M++)et[M]||(et[M]={});et[d].vx==P&&et[d].vy==j&&et[d].el===f||(et[d].el=f,et[d].vx=P,et[d].vy=j,clearInterval(et[d].pid),0==P&&0==j||(u=!0,et[d].pid=setInterval(function(){r&&0===this.layer&&Be.active._onTouchMove(Je);var t=et[this.layer].vy?et[this.layer].vy*l:0,n=et[this.layer].vx?et[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Be.dragged.parentNode[$],n,t,e,Je,et[this.layer].el)||V(et[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=R(p,!1)));tt=u}}),30),it=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function st(){}function lt(){}function ct(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;ot=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,o=e.activeSortable,a=e.changed,i=e.cancel;if(o.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=ot;!1!==r(n)?(O(n,l.swapClass,!0),ot=n):ot=null,c&&c!==ot&&O(c,l.swapClass,!1)}a(),t(!0),i()}},drop:function(e){var t,n,r,o,a,i,s=e.activeSortable,l=e.putSortable,c=e.dragEl,u=l||this.sortable,d=this.options;ot&&O(ot,d.swapClass,!1),ot&&(d.swap||l&&l.options.swap)&&c!==ot&&(u.captureAnimationState(),u!==s&&s.captureAnimationState(),n=ot,a=(t=c).parentNode,i=n.parentNode,a&&i&&!a.isEqualNode(n)&&!i.isEqualNode(t)&&(r=N(t),o=N(n),a.isEqualNode(i)&&r<o&&o++,a.insertBefore(n,a.children[r]),i.insertBefore(t,i.children[o])),u.animateAll(),u!==s&&s.animateAll())},nulling:function(){ot=null}},s(e,{pluginName:"swap",eventProperties:function(){return{swapItem:ot}}})}st.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=j(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:it},s(st,{pluginName:"revertOnSpill"}),lt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:it},s(lt,{pluginName:"removeOnSpill"});var ut,dt,pt,ft,mt,ht=[],vt=[],gt=!1,bt=!1,yt=!1;function _t(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?b(document,"pointerup",this._deselectMultiDrag):(b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag))),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var r="";ht.length&&dt===e?ht.forEach((function(e,t){r+=(t?", ":"")+e.textContent})):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;pt=t},delayEnded:function(){this.isMultiDrag=~ht.indexOf(pt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<ht.length;r++)vt.push(H(ht[r])),vt[r].sortableIndex=ht[r].sortableIndex,vt[r].draggable=!1,vt[r].style["will-change"]="",O(vt[r],this.options.selectedClass,!1),ht[r]===pt&&O(vt[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,o=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ht.length&&dt===t&&(wt(!0,n),r("clone"),o()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(wt(!1,n),vt.forEach((function(e){S(e,"display","")})),t(),mt=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(vt.forEach((function(e){S(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),mt=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&dt&&dt.multiDrag._deselectMultiDrag(),ht.forEach((function(e){e.sortableIndex=N(e)})),ht=ht.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),yt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ht.forEach((function(e){e!==pt&&S(e,"position","absolute")}));var r=T(pt,!1,!0,!0);ht.forEach((function(e){e!==pt&&B(e,r)})),bt=!0,gt=!0}n.animateAll((function(){bt=!1,gt=!1,t.options.animation&&ht.forEach((function(e){U(e)})),t.options.sort&&Et()}))}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;bt&&~ht.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,o=e.dragRect;ht.length>1&&(ht.forEach((function(e){r.addAnimationState({target:e,rect:bt?T(e):o}),U(e),e.fromRect=o,t.removeAnimationState(e)})),bt=!1,function(e,t){ht.forEach((function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,o=e.activeSortable,a=e.parentEl,i=e.putSortable,s=this.options;if(r){if(n&&o._hideClone(),gt=!1,s.animation&&ht.length>1&&(bt||!n&&!o.options.sort&&!i)){var l=T(pt,!1,!0,!0);ht.forEach((function(e){e!==pt&&(B(e,l),a.appendChild(e))})),bt=!0}if(!n)if(bt||Et(),ht.length>1){var c=mt;o._showClone(t),o.options.animation&&!mt&&c&&vt.forEach((function(e){o.addAnimationState({target:e,rect:ft}),e.fromRect=ft,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(ht.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ft=s({},t);var o=D(pt,!0);ft.top-=o.f,ft.left-=o.e}},dragOverAnimationComplete:function(){bt&&(bt=!1,Et())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,o=e.sortable,a=e.dispatchSortableEvent,i=e.oldIndex,s=e.putSortable,l=s||this.sortable;if(t){var c=this.options,u=r.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),O(pt,c.selectedClass,!~ht.indexOf(pt)),~ht.indexOf(pt))ht.splice(ht.indexOf(pt),1),ut=null,G({sortable:o,rootEl:n,name:"deselect",targetEl:pt,originalEvent:t});else{if(ht.push(pt),G({sortable:o,rootEl:n,name:"select",targetEl:pt,originalEvent:t}),t.shiftKey&&ut&&o.el.contains(ut)){var d,p,f=N(ut),m=N(pt);if(~f&&~m&&f!==m)for(m>f?(p=f,d=m):(p=m,d=f+1);p<d;p++)~ht.indexOf(u[p])||(O(u[p],c.selectedClass,!0),ht.push(u[p]),G({sortable:o,rootEl:n,name:"select",targetEl:u[p],originalEvent:t}))}else ut=pt;dt=l}if(yt&&this.isMultiDrag){if(bt=!1,(r[$].options.sort||r!==n)&&ht.length>1){var h=T(pt),v=N(pt,":not(."+this.options.selectedClass+")");if(!gt&&c.animation&&(pt.thisAnimationDuration=null),l.captureAnimationState(),!gt&&(c.animation&&(pt.fromRect=h,ht.forEach((function(e){if(e.thisAnimationDuration=null,e!==pt){var t=bt?T(e):h;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),Et(),ht.forEach((function(e){u[v]?r.insertBefore(e,u[v]):r.appendChild(e),v++})),i===N(pt))){var g=!1;ht.forEach((function(e){e.sortableIndex===N(e)||(g=!0)})),g&&a("update")}ht.forEach((function(e){U(e)})),l.animateAll()}dt=l}(n===r||s&&"clone"!==s.lastPutMode)&&vt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,vt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||dt!==this.sortable||e&&E(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;ht.length;){var t=ht[0];O(t,this.options.selectedClass,!1),ht.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},s(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[$];t&&t.options.multiDrag&&!~ht.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),O(e,t.options.selectedClass,!0),ht.push(e))},deselect:function(e){var t=e.parentNode[$],n=ht.indexOf(e);t&&t.options.multiDrag&&~n&&(O(e,t.options.selectedClass,!1),ht.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return ht.forEach((function(e){var o;n.push({multiDragElement:e,index:e.sortableIndex}),o=bt&&e!==pt?-1:bt?N(e,":not(."+t.options.selectedClass+")"):N(e),r.push({multiDragElement:e,index:o})})),{items:(e=ht,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(vt),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function wt(e,t){vt.forEach((function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function Et(){ht.forEach((function(e){e!==pt&&e.parentNode&&e.parentNode.removeChild(e)}))}Be.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):this.options.supportPointer?b(document,"pointermove",this._handleFallbackAutoScroll):t.touches?b(document,"touchmove",this._handleFallbackAutoScroll):b(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),rt(),nt(),clearTimeout(x),x=void 0},nulling:function(){Je=qe=Xe=tt=Qe=Ke=Ze=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,o);if(Je=e,t||this.options.forceAutoScrollFallback||p||d||m){at(e,this.options,a,t);var i=R(a,!0);!tt||Qe&&r===Ke&&o===Ze||(Qe&&rt(),Qe=setInterval((function(){var a=R(document.elementFromPoint(r,o),!0);a!==i&&(i=a,nt()),at(e,n.options,a,t)}),10),Ke=r,Ze=o)}else{if(!this.options.bubbleScroll||R(a,!0)===A())return void nt();at(e,this.options,R(a,!1),!1)}}},s(e,{pluginName:"scroll",initializeByDefault:!0})}),Be.mount(lt,st),t.default=Be},177:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r}});function r(e,t){if(!e)throw new Error("Invariant failed")}},196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=window.wp.element,t=window.lodash;function r(){return wcapf_admin_params.default_settings}const o=(0,t.merge)(r(),wcapf_admin_params.settings),a=o.author_roles;let i=[];if(a)for(let e=0;e<a.length;e++){const t=a[e];t.hasOwnProperty("label")&&t.hasOwnProperty("value")&&i.push(t)}const s={isDirty:!1,currentTab:"general",settings:{...o,author_roles:i},globalFilterKeys:wcapf_admin_params.global_filter_keys,filterKeysChanged:!1,seoSettings:{},saveError:""};var l=(e,t)=>{switch(t.type){case"SET_DIRTY":return{...e,isDirty:t.payload};case"SET_CURRENT_TAB":return{...e,currentTab:t.payload};case"UPDATE_SETTINGS":return{...e,settings:t.payload};case"UPDATE_GLOBAL_FILTER_KEYS":return{...e,globalFilterKeys:t.payload};case"SET_FILTER_KEYS_CHANGED":return{...e,filterKeysChanged:t.payload};case"UPDATE_SEO_SETTINGS":return{...e,seoSettings:t.payload};case"SET_ERROR":return{...e,saveError:t.payload};default:return e}};const c=(0,e.createContext)(s),u=t=>{let{children:n}=t;const[r,o]=(0,e.useReducer)(l,s);return(0,e.createElement)(c.Provider,{value:{state:r,dispatch:o}},n)},d=()=>{const t=(0,e.useContext)(c);if(void 0===t)throw new Error("useSettings must be used within a SettingsProvider");return t};var p=window.wp.i18n,f=window.wp.components;(0,e.createElement)("svg",{viewBox:"0 0 48 48"},(0,e.createElement)("path",{d:"M16.1161 39.6339C15.628 39.1457 15.628 38.3543 16.1161 37.8661L29.9822 24L16.1161 10.1339C15.628 9.64573 15.628 8.85427 16.1161 8.36612C16.6043 7.87796 17.3957 7.87796 17.8839 8.36612L32.6339 23.1161C33.122 23.6043 33.122 24.3957 32.6339 24.8839L17.8839 39.6339C17.3957 40.122 16.6043 40.122 16.1161 39.6339Z"})),(0,e.createElement)("svg",{viewBox:"0 0 256 256"},(0,e.createElement)("path",{d:"M215.99609,52H172V40a20.0226,20.0226,0,0,0-20-20H104A20.0226,20.0226,0,0,0,84,40V52H39.99609a4,4,0,0,0,0,8h12V208a12.01375,12.01375,0,0,0,12,12h128a12.01375,12.01375,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12.01375,12.01375,0,0,1,12-12h48a12.01375,12.01375,0,0,1,12,12V52H92ZM195.99609,208a4.00458,4.00458,0,0,1-4,4h-128a4.00458,4.00458,0,0,1-4-4V60h136ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"})),(0,e.createElement)("svg",{viewBox:"0 0 16 16"},(0,e.createElement)("path",{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"})),(0,e.createElement)("svg",{viewBox:"0 0 255.99316 255.99316"},(0,e.createElement)("path",{d:"M219.99268,39.99414v144.001a4,4,0,0,1-8,0V43.99414H71.98584a4,4,0,0,1,0-8H215.99268A4.0002,4.0002,0,0,1,219.99268,39.99414Zm-32,32.001v144a4.0002,4.0002,0,0,1-4,4H39.98584a4.0002,4.0002,0,0,1-4-4v-144a4.0002,4.0002,0,0,1,4-4H183.99268A4.0002,4.0002,0,0,1,187.99268,71.99512Zm-8,4H43.98584v136H179.99268Z"})),(0,e.createElement)("svg",{viewBox:"0 0 512.006 512.006"},(0,e.createElement)("path",{d:"M388.419,475.59L168.834,256.005L388.418,36.421c8.341-8.341,8.341-21.824,0-30.165s-21.824-8.341-30.165,0    L123.586,240.923c-8.341,8.341-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251    c5.461,0,10.923-2.091,15.083-6.251C396.76,497.414,396.76,483.931,388.419,475.59z"})),(0,e.createElement)("svg",{viewBox:"0 0 21 21"},(0,e.createElement)("g",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(4 3)"},(0,e.createElement)("path",{d:"m6.5 11.5-3-3 3-3"}),(0,e.createElement)("path",{d:"m3.5 8.5h11"}),(0,e.createElement)("path",{d:"m12.5 6.5v-4.00491374c0-.51283735-.3860402-.93550867-.8833789-.99327378l-.1190802-.00672622-1.9975409.00491374m-6 0-1.99754087-.00492752c-.51283429-.00124584-.93645365.38375378-.99544161.88094891l-.00701752.11906329v10.99753792c.00061497.5520447.44795562.9996604 1 1.0006148l10 .0061554c.5128356.0008784.9357441-.3848611.993815-.8821612l.006185-.1172316v-2.5"}),(0,e.createElement)("path",{d:"m4.5.5h4c.55228475 0 1 .44771525 1 1s-.44771525 1-1 1h-4c-.55228475 0-1-.44771525-1-1s.44771525-1 1-1z"})));const m=(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("path",{id:"Diamond",d:"M63.6870499,18.5730648L48.7831497,4.278266c-0.1855011-0.1758003-0.4316025-0.4813001-0.6870003-0.4813001 H15.9037514c-0.2553005,0-0.5014,0.3054998-0.6870003,0.4813001l-14.9038,14.1908998 c-0.374,0.3535004-0.4184,0.9855995-0.1025,1.3917999c0.21,0.2703991,30.8237991,39.7256012,31.0517006,39.9812012 c0.1022987,0.1149979,0.2402992,0.2215996,0.3428001,0.266098c0.2763996,0.1206017,0.5077,0.1296997,0.7900982,0.0065002 c0.1025009-0.0444984,0.2404022-0.1348991,0.3428001-0.2499008c0.0151024-0.0168991,0.0377007-0.0224991,0.0517006-0.0404968 L63.789547,19.9121666C64.1054459,19.5058651,64.0610504,18.9265652,63.6870499,18.5730648z M15.6273508,6.4344659 l4.9945002,11.3625011H3.6061509L15.6273508,6.4344659z M24.0795517,17.7969666l7.9203987-11.2617006l7.9204979,11.2617006 H24.0795517z M40.7191467,19.7969666l-8.7191963,34.8769989l-8.719099-34.8769989H40.7191467z M33.9257507,5.7969656h12.5423012 l-4.8240013,10.9746008L33.9257507,5.7969656z M22.3559513,16.7715664L17.53195,5.7969656h12.5423012L22.3559513,16.7715664z M21.2191505,19.7969666l8.6596012,34.638401L2.975451,19.7969666H21.2191505z M42.7808495,19.7969666h18.2436981 l-26.9032974,34.638401L42.7808495,19.7969666z M43.3781471,17.7969666l4.9944992-11.3625011l12.0212021,11.3625011H43.3781471z"})),h=((0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,e.createElement)("svg",{viewBox:"0 0 492 492"},(0,e.createElement)("path",{d:"M465.064,207.566l0.028,0H284.436V27.25c0-14.84-12.016-27.248-26.856-27.248h-23.116 c-14.836,0-26.904,12.408-26.904,27.248v180.316H26.908c-14.832,0-26.908,12-26.908,26.844v23.248 c0,14.832,12.072,26.78,26.908,26.78h180.656v180.968c0,14.832,12.064,26.592,26.904,26.592h23.116 c14.84,0,26.856-11.764,26.856-26.592V284.438h180.624c14.84,0,26.936-11.952,26.936-26.78V234.41 C492,219.566,479.904,207.566,465.064,207.566z"})),(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M3 5.75C3 4.23122 4.23122 3 5.75 3H15.7145C16.5764 3 17.4031 3.34241 18.0126 3.9519L20.0481 5.98744C20.6576 6.59693 21 7.42358 21 8.28553V18.25C21 19.7688 19.7688 21 18.25 21H5.75C4.23122 21 3 19.7688 3 18.25V5.75ZM5.75 4.5C5.05964 4.5 4.5 5.05964 4.5 5.75V18.25C4.5 18.9404 5.05964 19.5 5.75 19.5H6V14.25C6 13.0074 7.00736 12 8.25 12H15.75C16.9926 12 18 13.0074 18 14.25V19.5H18.25C18.9404 19.5 19.5 18.9404 19.5 18.25V8.28553C19.5 7.8214 19.3156 7.37629 18.9874 7.0481L16.9519 5.01256C16.6918 4.75246 16.3582 4.58269 16 4.52344V7.25C16 8.49264 14.9926 9.5 13.75 9.5H9.25C8.00736 9.5 7 8.49264 7 7.25V4.5H5.75ZM16.5 19.5V14.25C16.5 13.8358 16.1642 13.5 15.75 13.5H8.25C7.83579 13.5 7.5 13.8358 7.5 14.25V19.5H16.5ZM8.5 4.5V7.25C8.5 7.66421 8.83579 8 9.25 8H13.75C14.1642 8 14.5 7.66421 14.5 7.25V4.5H8.5Z"}))),v=((0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M16.4 19.62H6.39999C5.40543 19.62 4.4516 19.2249 3.74834 18.5216C3.04508 17.8184 2.64999 16.8646 2.64999 15.87V13.37C2.64999 13.1711 2.72901 12.9803 2.86966 12.8397C3.01032 12.699 3.20108 12.62 3.39999 12.62C3.59891 12.62 3.78967 12.699 3.93032 12.8397C4.07098 12.9803 4.14999 13.1711 4.14999 13.37V15.87C4.14999 16.4667 4.38705 17.039 4.809 17.461C5.23096 17.8829 5.80326 18.12 6.39999 18.12H16.4C16.9967 18.12 17.569 17.8829 17.991 17.461C18.4129 17.039 18.65 16.4667 18.65 15.87V13.37C18.65 13.1711 18.729 12.9803 18.8697 12.8397C19.0103 12.699 19.2011 12.62 19.4 12.62C19.5989 12.62 19.7897 12.699 19.9303 12.8397C20.071 12.9803 20.15 13.1711 20.15 13.37V15.87C20.15 16.8646 19.7549 17.8184 19.0516 18.5216C18.3484 19.2249 17.3946 19.62 16.4 19.62Z"}),(0,e.createElement)("path",{d:"M11.4 14.88C11.2011 14.88 11.0103 14.801 10.8697 14.6603C10.729 14.5197 10.65 14.3289 10.65 14.13V5.13C10.65 4.93109 10.729 4.74033 10.8697 4.59967C11.0103 4.45902 11.2011 4.38 11.4 4.38C11.5989 4.38 11.7897 4.45902 11.9303 4.59967C12.071 4.74033 12.15 4.93109 12.15 5.13V14.13C12.1474 14.3281 12.0676 14.5174 11.9275 14.6575C11.7874 14.7976 11.5981 14.8774 11.4 14.88Z"}),(0,e.createElement)("path",{d:"M11.4 16.12C11.3014 16.121 11.2036 16.1021 11.1125 16.0643C11.0214 16.0265 10.9389 15.9706 10.87 15.9L6.63 11.66C6.55925 11.5911 6.50301 11.5086 6.46461 11.4176C6.42621 11.3266 6.40643 11.2288 6.40643 11.13C6.40643 11.0312 6.42621 10.9334 6.46461 10.8424C6.50301 10.7514 6.55925 10.669 6.63 10.6C6.77063 10.4596 6.96125 10.3807 7.16 10.3807C7.35875 10.3807 7.54938 10.4596 7.69 10.6L11.4 14.31L15.11 10.6C15.1787 10.5263 15.2615 10.4672 15.3535 10.4262C15.4455 10.3852 15.5448 10.3632 15.6455 10.3614C15.7462 10.3596 15.8462 10.3782 15.9396 10.4159C16.033 10.4536 16.1178 10.5097 16.189 10.581C16.2603 10.6522 16.3164 10.737 16.3541 10.8304C16.3918 10.9238 16.4104 11.0238 16.4086 11.1245C16.4068 11.2252 16.3848 11.3245 16.3438 11.4165C16.3028 11.5085 16.2437 11.5913 16.17 11.66L11.93 15.9C11.8608 15.9701 11.7782 16.0257 11.6872 16.0635C11.5962 16.1013 11.4985 16.1205 11.4 16.12Z"})),(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M0,3.26315v57.4737015h64V3.26315H0z M62,5.2631502V34.480751L47.1523018,20.5346508 c-0.1992035-0.1875-0.4580002-0.2890015-0.7422028-0.2695007c-0.2733994,0.0156002-0.5282974,0.1425991-0.7059975,0.352499 L28.4267006,41.04245L15.4111004,30.3715496c-0.3984003-0.3270988-0.9863005-0.2967987-1.3496008,0.075201L2,42.8066483V5.2631502 H62z M2,58.7368507V45.6702499l12.8525-13.1707001l13.0684004,10.7137985 c0.4228001,0.347702,1.044899,0.2901001,1.3973999-0.1278992l17.2325001-20.3720989L62,37.2237511v21.5130997H2z"}),(0,e.createElement)("path",{d:"M26,26.2631493c3.8593006,0,7-3.1406002,7-7c0-3.8592997-3.1406994-6.999999-7-6.999999 c-3.8593998,0-7,3.1406994-7,6.999999C19,23.1225491,22.1406002,26.2631493,26,26.2631493z M26,14.2631502 c2.7567997,0,5,2.2431993,5,4.999999c0,2.7569008-2.2432003,5-5,5c-2.7569008,0-5-2.2430992-5-5 C21,16.5063496,23.2430992,14.2631502,26,14.2631502z"}))),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 20 20"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z"})))),g=(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",fill:"none"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8c0-1.525.525-2.927 1.404-4.035l1.787 1.787A3.982 3.982 0 004 8c0 .834.255 1.608.691 2.248l-1.787 1.787A6.472 6.472 0 011.5 8zm2.465 5.096l1.787-1.787C6.392 11.745 7.166 12 8 12c.834 0 1.608-.255 2.248-.691l1.787 1.787A6.472 6.472 0 018 14.5a6.473 6.473 0 01-4.035-1.404zm9.131-1.06A6.472 6.472 0 0014.5 8a6.473 6.473 0 00-1.404-4.035l-1.787 1.787C11.745 6.392 12 7.166 12 8c0 .834-.255 1.608-.691 2.248l1.787 1.787zm-1.06-9.132A6.472 6.472 0 008 1.5a6.472 6.472 0 00-4.035 1.404l1.787 1.787A3.982 3.982 0 018 4c.834 0 1.608.255 2.248.691l1.787-1.787zM5.5 8a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z",clipRule:"evenodd"})),b=(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M12.9121 1.59053C12.7508 1.2312 12.3936 1 11.9997 1C11.6059 1 11.2487 1.2312 11.0874 1.59053L8.27041 7.86702L1.43062 8.60661C1.03903 8.64895 0.708778 8.91721 0.587066 9.2918C0.465355 9.66639 0.574861 10.0775 0.866772 10.342L5.96556 14.9606L4.55534 21.6942C4.4746 22.0797 4.62768 22.4767 4.94632 22.7082C5.26497 22.9397 5.68983 22.9626 6.03151 22.7667L11.9997 19.3447L17.968 22.7667C18.3097 22.9626 18.7345 22.9397 19.0532 22.7082C19.3718 22.4767 19.5249 22.0797 19.4441 21.6942L18.0339 14.9606L23.1327 10.342C23.4246 10.0775 23.5341 9.66639 23.4124 9.2918C23.2907 8.91721 22.9605 8.64895 22.5689 8.60661L15.7291 7.86702L12.9121 1.59053Z"})),y=(0,e.createElement)("svg",{viewBox:"0 0 36 36"},(0,e.createElement)("path",{d:"M18,2A16,16,0,1,0,34,18,16,16,0,0,0,18,2Zm-.22,25.85a1.65,1.65,0,1,1,1.65-1.65A1.65,1.65,0,0,1,17.78,27.85Zm1.37-8.06v1.72a1.37,1.37,0,0,1-1.3,1.36h-.11a1.34,1.34,0,0,1-1.39-1.3c0-.44,0-2.76,0-2.76a1.19,1.19,0,0,1,1.12-1.31c1.57-.12,4.18-.7,4.18-3.25,0-1.83-1.41-3.07-3.43-3.07a5.31,5.31,0,0,0-4,1.92,1.36,1.36,0,0,1-2.35-.9,1.43,1.43,0,0,1,.43-1,7.77,7.77,0,0,1,6-2.69c3.7,0,6.28,2.3,6.28,5.6C24.58,17.16,22.61,19.2,19.15,19.79Z"}),(0,e.createElement)("rect",{x:"0",y:"0",width:"36",height:"36",fillOpacity:"0"})),_=((0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M8 6.5H20V8H8V6.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 16.5H20V18H8V16.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 11.5H20V13H8V11.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 6H6V8H4V6Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 11H6V13H4V11Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 16H6V18H4V16Z",fill:"currentColor"})),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 64 64",strokeWidth:"3",stroke:"currentColor",fill:"none"},(0,e.createElement)("path",{d:"M45,14.67l-2.76,2a1,1,0,0,1-1,.11L37.65,15.3a1,1,0,0,1-.61-.76l-.66-3.77a1,1,0,0,0-1-.84H30.52a1,1,0,0,0-1,.77l-.93,3.72a1,1,0,0,1-.53.65l-3.3,1.66a1,1,0,0,1-1-.08l-3-2.13a1,1,0,0,0-1.31.12l-3.65,3.74a1,1,0,0,0-.13,1.26l1.87,2.88a1,1,0,0,1,.1.89L16.34,27a1,1,0,0,1-.68.63l-3.85,1.06a1,1,0,0,0-.74,1v4.74a1,1,0,0,0,.8,1l3.9.8a1,1,0,0,1,.72.57l1.42,3.15a1,1,0,0,1-.05.92l-2.13,3.63a1,1,0,0,0,.17,1.24L19.32,49a1,1,0,0,0,1.29.09L23.49,47a1,1,0,0,1,1-.1l3.74,1.67a1,1,0,0,1,.59.75l.66,3.79a1,1,0,0,0,1,.84h4.89a1,1,0,0,0,1-.86l.58-4a1,1,0,0,1,.58-.77l3.58-1.62a1,1,0,0,1,1,.09l3.14,2.12a1,1,0,0,0,1.3-.15L50,45.06a1,1,0,0,0,.09-1.27l-2.08-3a1,1,0,0,1-.09-1l1.48-3.43a1,1,0,0,1,.71-.59L53.77,35a1,1,0,0,0,.8-1V29.42a1,1,0,0,0-.8-1l-3.72-.78a1,1,0,0,1-.73-.62l-1.45-3.65a1,1,0,0,1,.11-.94l2.15-3.14A1,1,0,0,0,50,18l-3.71-3.25A1,1,0,0,0,45,14.67Z"}),(0,e.createElement)("circle",{cx:"32.82",cy:"31.94",r:"9.94"})));var w=function(t){let{icon:n,size:r=24,...o}=t;return(0,e.cloneElement)(n,{width:r,height:r,...o})};const E=(0,p.__)("Explore the comprehensive documentation and interactive demos.","wc-ajax-product-filter"),x=(0,p.__)("Whether you need technical support, have questions about specific features, or need assistance with custom development, I'm here to help.","wc-ajax-product-filter"),C=(0,p.__)("Your feedback is incredibly valuable to me. If you enjoy using my plugin, I kindly ask for your support by leaving a review.","wc-ajax-product-filter");var O=()=>(0,e.createElement)("div",{className:"__sidebar"},(0,e.createElement)(f.Card,null,(0,e.createElement)(f.CardHeader,null,(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:v,fill:"#00B894"}),(0,p.__)("Need Help Getting Started?","wc-ajax-product-filter"))),(0,e.createElement)(f.CardBody,null,(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:E}}),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wptools.io/docs/wc-ajax-product-filter/?utm_source=WP+Admin&utm_medium=inside+plugin&utm_campaign=WCAPF+Documentation",target:"_blank"},(0,p.__)("Documentation","wc-ajax-product-filter")),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://demos.wptools.io/wc-ajax-product-filter/?utm_source=WP+Admin&utm_medium=inside+plugin&utm_campaign=WCAPF+Demo",target:"_blank"},(0,p.__)("View Demos","wc-ajax-product-filter"))))),(0,e.createElement)(f.Card,null,(0,e.createElement)(f.CardHeader,null,(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:g,fill:"#6C5CE7"}),(0,p.__)("Support & Questions","wc-ajax-product-filter"))),(0,e.createElement)(f.CardBody,null,(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:x}}),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/wc-ajax-product-filter/",target:"_blank"},(0,p.__)("WP Support Forum","wc-ajax-product-filter")),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wptools.io/support/?utm_source=WP+Admin&utm_medium=inside+plugin&utm_campaign=WCAPF+Support",target:"_blank"},(0,p.__)("Contact me","wc-ajax-product-filter")))),(0,e.createElement)(f.Card,null,(0,e.createElement)(f.CardHeader,null,(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:b,fill:"#FD7E14"}),(0,p.__)("Like the Plugin?","wc-ajax-product-filter"))),(0,e.createElement)(f.CardBody,null,(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:C}}),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/wc-ajax-product-filter/reviews/?filter=5",target:"_blank"},(0,p.__)("Write a review","wc-ajax-product-filter")))));const S=(0,p.__)("Please fix the errors below.","wc-ajax-product-filter"),D=(0,p.__)("Filter key is in use by another entity.","wc-ajax-product-filter");function k(){return wcapf_admin_params.nonce||""}function A(){return wcapf_admin_params.pro_update_notice||null}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e;return""!==t&&(r+="-"+t),""!==n&&(r+="-"+n),r}function P(t){return t?(0,e.createElement)("span",{className:"__pro_tag"}):null}const j=wcapf_admin_params.show_v4_migration_notice,M=wcapf_admin_params.v4_migrated_form_url,N=wcapf_admin_params.v4_migration_doc_url,I=A();var R=()=>(0,e.createElement)(e.Fragment,null,j&&(0,e.createElement)("div",{className:"notice notice-info v4-update-notice",id:"wcapf-v4-migration-notice"},(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"WCAPF - WooCommerce Ajax Product Filter (v4 Migration Notice)")),(0,e.createElement)("p",null,"The WC Ajax Product Filter plugin has been updated to v4 and is now named WCAPF - WooCommerce Ajax Product Filter. We have redesigned the admin UI to provide a more intuitive user experience and refactored the codebase for improved performance and easier future enhancements. As part of the migration process, a form has been automatically created with all the existing filters from your shop. We kindly request that you visit the form and review the order of the filters."),(0,e.createElement)("p",null,(0,e.createElement)(f.Button,{variant:"link",href:M},"Review the filters")," ","|"," ",(0,e.createElement)(f.Button,{variant:"link",href:N,target:"_blank"},"Learn more about migration")," ","|"," ",(0,e.createElement)(f.Button,{variant:"link",onClick:()=>{"function"==typeof removeWCAPFMigrationNotice&&removeWCAPFMigrationNotice()}},"I understand, remove the notice"))),I&&(0,e.createElement)("div",{className:"notice notice-error pro-update-notice"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:I}})));const L="https://wordpress.org/support/plugin/wc-ajax-product-filter/reviews/?filter=5";var F=t=>{let{noticeType:n,timeSince:r}=t;const o=e=>{"function"==typeof wcapfDismissNotice&&wcapfDismissNotice(e)};let a,i,s;return"milestone-achieved"===n?(a="notice notice-info is-dismissible review-notice",i="wcapf-review-notice-for-milestone-achieved",s=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,e.createElement)("span",{className:"dashicons dashicons-smiley wcapf-dashicon-smiley"})," Great job! You have updated the filters five times. Your feedback encourages me to improve the plugin. Please consider"," ",(0,e.createElement)("a",{href:L,target:"_blank"},"writing a review on WordPress"),". Thank you in advance :)"),(0,e.createElement)("button",{type:"button",className:"notice-dismiss",onClick:()=>o("milestone-achieved")},(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice")))):(a="notice notice-info review-notice",i="wcapf-review-notice-for-time-since",s=(0,e.createElement)("p",null,"Awesome! You've been using WCAPF - WooCommerce Ajax Product Filter for more than ",r,". Would you mind taking a few seconds to give it a 5-star rating on WordPress? Thank you in advance :)"," ",(0,e.createElement)("a",{href:L,target:"_blank"},"Ok, you deserved it")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>o("permanently-dismiss-time-since")},"I already did")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>o("postpone-time-since")},"No, not good enough"))),(0,e.createElement)("div",{className:a,id:i},s)};const V=wcapf_admin_params.show_review_notice_for_milestone_achieved,H=wcapf_admin_params.show_review_notice_for_time_since;var B=()=>V?(0,e.createElement)(F,{noticeType:"milestone-achieved"}):H?(0,e.createElement)(F,{noticeType:"time-since",timeSince:H}):null;const U=[{label:(0,p.__)("Forms","wc-ajax-product-filter"),id:"forms",href:wcapf_admin_params.forms_page_link},{label:(0,p.__)("Settings","wc-ajax-product-filter"),id:"settings",href:wcapf_admin_params.settings_page_link}];var $=t=>{let{view:n}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__top_bar"},(0,e.createElement)("div",{className:"__navbar"},(0,e.createElement)("h2",null,(0,e.createElement)(f.Icon,{icon:"filter",className:"__icon"}),"WCAPF - WooCommerce Ajax Product Filter"),U.map((t=>{const r=("form"===n?"forms":n)===t.id?"is-active":"";return(0,e.createElement)("a",{className:r,href:t.href,key:t.id},t.label)}))),(0,e.createElement)("div",{className:"__cta"},(0,e.createElement)("a",{target:"_blank",href:"https://wptools.io/wc-ajax-product-filter/?utm_source=WCAPF+Free&utm_medium=inside+plugin&utm_campaign=WCAPF+Pro+Upgrade",className:"__upgrade_btn"},(0,e.createElement)(f.Icon,{icon:m,size:18}),(0,p.__)("Upgrade to Pro","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__plan"},(0,e.createElement)("div",null,(0,p.__)("You are on the","wc-ajax-product-filter")),(0,e.createElement)("div",null,(0,p.__)("Free Plan"))),(0,e.createElement)("div",{className:"__version"},(0,e.createElement)("div",null,(0,p.__)("Version","wc-ajax-product-filter")),(0,e.createElement)("div",null,wcapf_admin_params.free_version)))),(0,e.createElement)(R,null),"form"!==n&&(0,e.createElement)(B,null))},z=window.wp.notices,W=window.wp.data,Y=()=>{const t=(0,W.useSelect)((e=>e(z.store).getNotices()),[]),{removeNotice:n}=(0,W.useDispatch)(z.store),r=t.filter((e=>{let{type:t}=e;return"snackbar"===t}));return(0,e.createElement)(f.SnackbarList,{notices:r,className:"components-editor-notices__snackbar",onRemove:n})},G=n(669),X=n.n(G);function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,W.dispatch)("core/notices").createSuccessNotice(e,{type:"snackbar",id:t,icon:n})}function K(e){(0,W.dispatch)("core/notices").removeNotice(e)}const Z="settings-save-success",J="settings-save-error";function Q(e){q(e,J,"😟")}function ee(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function te(e){return e instanceof ee(e).Element||e instanceof Element}function ne(e){return e instanceof ee(e).HTMLElement||e instanceof HTMLElement}function re(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot)}var oe=Math.max,ae=Math.min,ie=Math.round;function se(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(ne(e)&&t){var a=e.offsetHeight,i=e.offsetWidth;i>0&&(r=ie(n.width)/i||1),a>0&&(o=ie(n.height)/a||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function le(e){var t=ee(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ce(e){return e?(e.nodeName||"").toLowerCase():null}function ue(e){return((te(e)?e.ownerDocument:e.document)||window.document).documentElement}function de(e){return se(ue(e)).left+le(e).scrollLeft}function pe(e){return ee(e).getComputedStyle(e)}function fe(e){var t=pe(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function me(e,t,n){void 0===n&&(n=!1);var r=ne(t),o=ne(t)&&function(e){var t=e.getBoundingClientRect(),n=ie(t.width)/e.offsetWidth||1,r=ie(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=ue(t),i=se(e,o),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==ce(t)||fe(a))&&(s=function(e){return e!==ee(e)&&ne(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:le(e);var t}(t)),ne(t)?((l=se(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=de(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function he(e){var t=se(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ve(e){return"html"===ce(e)?e:e.assignedSlot||e.parentNode||(re(e)?e.host:null)||ue(e)}function ge(e){return["html","body","#document"].indexOf(ce(e))>=0?e.ownerDocument.body:ne(e)&&fe(e)?e:ge(ve(e))}function be(e,t){var n;void 0===t&&(t=[]);var r=ge(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=ee(r),i=o?[a].concat(a.visualViewport||[],fe(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(be(ve(i)))}function ye(e){return["table","td","th"].indexOf(ce(e))>=0}function _e(e){return ne(e)&&"fixed"!==pe(e).position?e.offsetParent:null}function we(e){for(var t=ee(e),n=_e(e);n&&ye(n)&&"static"===pe(n).position;)n=_e(n);return n&&("html"===ce(n)||"body"===ce(n)&&"static"===pe(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ne(e)&&"fixed"===pe(e).position)return null;var n=ve(e);for(re(n)&&(n=n.host);ne(n)&&["html","body"].indexOf(ce(n))<0;){var r=pe(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Ee="top",xe="bottom",Ce="right",Oe="left",Se="auto",De=[Ee,xe,Ce,Oe],ke="start",Ae="end",Te="viewport",Pe="popper",je=De.reduce((function(e,t){return e.concat([t+"-"+ke,t+"-"+Ae])}),[]),Me=[].concat(De,[Se]).reduce((function(e,t){return e.concat([t,t+"-"+ke,t+"-"+Ae])}),[]),Ne=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ie(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Re={placement:"bottom",modifiers:[],strategy:"absolute"};function Le(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Fe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,a=void 0===o?Re:o;return function(e,t,n){void 0===n&&(n=a);var o,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Re,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},a,s.options,o),s.scrollParents={reference:te(e)?be(e):e.contextElement?be(e.contextElement):[],popper:be(t)};var i,c,p=function(e){var t=Ie(e);return Ne.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,s.options.modifiers),c=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return s.orderedModifiers=p.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var a=o({state:s,name:t,instance:u,options:r});l.push(a||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(Le(t,n)){s.rects={reference:me(t,we(n),"fixed"===s.options.strategy),popper:he(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],a=o.fn,i=o.options,l=void 0===i?{}:i,d=o.name;"function"==typeof a&&(s=a({state:s,options:l,name:d,instance:u})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){d(),c=!0}};if(!Le(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Ve={passive:!0},He={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,s=void 0===i||i,l=ee(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ve)})),s&&l.addEventListener("resize",n.update,Ve),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ve)})),s&&l.removeEventListener("resize",n.update,Ve)}},data:{}};function Be(e){return e.split("-")[0]}function Ue(e){return e.split("-")[1]}function $e(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ze(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?Be(o):null,i=o?Ue(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case Ee:t={x:s,y:n.y-r.height};break;case xe:t={x:s,y:n.y+n.height};break;case Ce:t={x:n.x+n.width,y:l};break;case Oe:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?$e(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case ke:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Ae:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var We={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ze({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Ye={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ge(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=i.x,f=void 0===p?0:p,m=i.y,h=void 0===m?0:m,v="function"==typeof u?u({x:f,y:h}):{x:f,y:h};f=v.x,h=v.y;var g=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),y=Oe,_=Ee,w=window;if(c){var E=we(n),x="clientHeight",C="clientWidth";E===ee(n)&&"static"!==pe(E=ue(n)).position&&"absolute"===s&&(x="scrollHeight",C="scrollWidth"),(o===Ee||(o===Oe||o===Ce)&&a===Ae)&&(_=xe,h-=(d&&E===w&&w.visualViewport?w.visualViewport.height:E[x])-r.height,h*=l?1:-1),o!==Oe&&(o!==Ee&&o!==xe||a!==Ae)||(y=Ce,f-=(d&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-r.width,f*=l?1:-1)}var O,S=Object.assign({position:s},c&&Ye),D=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:ie(t*r)/r||0,y:ie(n*r)/r||0}}({x:f,y:h}):{x:f,y:h};return f=D.x,h=D.y,l?Object.assign({},S,((O={})[_]=b?"0":"",O[y]=g?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+h+"px)":"translate3d("+f+"px, "+h+"px, 0)",O)):Object.assign({},S,((t={})[_]=b?h+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var Xe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,i=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:Be(t.placement),variation:Ue(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ge(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ge(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},qe={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];ne(o)&&ce(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});ne(r)&&ce(r)&&(Object.assign(r.style,a),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Ke={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=Me.reduce((function(e,n){return e[n]=function(e,t,n){var r=Be(e),o=[Oe,Ee].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[Oe,Ce].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}(n,t.rects,a),e}),{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},Ze={left:"right",right:"left",bottom:"top",top:"bottom"};function Je(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ze[e]}))}var Qe={start:"end",end:"start"};function et(e){return e.replace(/start|end/g,(function(e){return Qe[e]}))}function tt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&re(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function nt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rt(e,t){return t===Te?nt(function(e){var t=ee(e),n=ue(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,i=0,s=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=r.offsetLeft,s=r.offsetTop)),{width:o,height:a,x:i+de(e),y:s}}(e)):te(t)?function(e){var t=se(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):nt(function(e){var t,n=ue(e),r=le(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=oe(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=oe(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===pe(o||n).direction&&(s+=oe(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(ue(e)))}function ot(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function at(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function it(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.boundary,i=void 0===a?"clippingParents":a,s=n.rootBoundary,l=void 0===s?Te:s,c=n.elementContext,u=void 0===c?Pe:c,d=n.altBoundary,p=void 0!==d&&d,f=n.padding,m=void 0===f?0:f,h=ot("number"!=typeof m?m:at(m,De)),v=u===Pe?"reference":Pe,g=e.rects.popper,b=e.elements[p?v:u],y=function(e,t,n){var r="clippingParents"===t?function(e){var t=be(ve(e)),n=["absolute","fixed"].indexOf(pe(e).position)>=0&&ne(e)?we(e):e;return te(n)?t.filter((function(e){return te(e)&&tt(e,n)&&"body"!==ce(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o[0],i=o.reduce((function(t,n){var r=rt(e,n);return t.top=oe(r.top,t.top),t.right=ae(r.right,t.right),t.bottom=ae(r.bottom,t.bottom),t.left=oe(r.left,t.left),t}),rt(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(te(b)?b:b.contextElement||ue(e.elements.popper),i,l),_=se(e.elements.reference),w=ze({reference:_,element:g,strategy:"absolute",placement:o}),E=nt(Object.assign({},g,w)),x=u===Pe?E:_,C={top:y.top-x.top+h.top,bottom:x.bottom-y.bottom+h.bottom,left:y.left-x.left+h.left,right:x.right-y.right+h.right},O=e.modifiersData.offset;if(u===Pe&&O){var S=O[o];Object.keys(C).forEach((function(e){var t=[Ce,xe].indexOf(e)>=0?1:-1,n=[Ee,xe].indexOf(e)>=0?"y":"x";C[e]+=S[n]*t}))}return C}var st={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,s=void 0===i||i,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=void 0===f||f,h=n.allowedAutoPlacements,v=t.options.placement,g=Be(v),b=l||(g!==v&&m?function(e){if(Be(e)===Se)return[];var t=Je(e);return[et(e),t,et(t)]}(v):[Je(v)]),y=[v].concat(b).reduce((function(e,n){return e.concat(Be(n)===Se?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Me:l,u=Ue(r),d=u?s?je:je.filter((function(e){return Ue(e)===u})):De,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=it(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[Be(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),_=t.rects.reference,w=t.rects.popper,E=new Map,x=!0,C=y[0],O=0;O<y.length;O++){var S=y[O],D=Be(S),k=Ue(S)===ke,A=[Ee,xe].indexOf(D)>=0,T=A?"width":"height",P=it(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),j=A?k?Ce:Oe:k?xe:Ee;_[T]>w[T]&&(j=Je(j));var M=Je(j),N=[];if(a&&N.push(P[D]<=0),s&&N.push(P[j]<=0,P[M]<=0),N.every((function(e){return e}))){C=S,x=!1;break}E.set(S,N)}if(x)for(var I=function(e){var t=y.find((function(t){var n=E.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},R=m?3:1;R>0&&"break"!==I(R);R--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function lt(e,t,n){return oe(e,ae(t,n))}var ct={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,s=void 0!==i&&i,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,m=n.tetherOffset,h=void 0===m?0:m,v=it(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=Be(t.placement),b=Ue(t.placement),y=!b,_=$e(g),w="x"===_?"y":"x",E=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,O="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,S="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(E){if(a){var A,T="y"===_?Ee:Oe,P="y"===_?xe:Ce,j="y"===_?"height":"width",M=E[_],N=M+v[T],I=M-v[P],R=f?-C[j]/2:0,L=b===ke?x[j]:C[j],F=b===ke?-C[j]:-x[j],V=t.elements.arrow,H=f&&V?he(V):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=B[T],$=B[P],z=lt(0,x[j],H[j]),W=y?x[j]/2-R-z-U-S.mainAxis:L-z-U-S.mainAxis,Y=y?-x[j]/2+R+z+$+S.mainAxis:F+z+$+S.mainAxis,G=t.elements.arrow&&we(t.elements.arrow),X=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,q=null!=(A=null==D?void 0:D[_])?A:0,K=M+Y-q,Z=lt(f?ae(N,M+W-q-X):N,M,f?oe(I,K):I);E[_]=Z,k[_]=Z-M}if(s){var J,Q="x"===_?Ee:Oe,ee="x"===_?xe:Ce,te=E[w],ne="y"===w?"height":"width",re=te+v[Q],ie=te-v[ee],se=-1!==[Ee,Oe].indexOf(g),le=null!=(J=null==D?void 0:D[w])?J:0,ce=se?re:te-x[ne]-C[ne]-le+S.altAxis,ue=se?te+x[ne]+C[ne]-le-S.altAxis:ie,de=f&&se?function(e,t,n){var r=lt(e,t,n);return r>n?n:r}(ce,te,ue):lt(f?ce:re,te,f?ue:ie);E[w]=de,k[w]=de-te}t.modifiersData[r]=k}},requiresIfExists:["offset"]},ut={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=Be(n.placement),l=$e(s),c=[Oe,Ce].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return ot("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:at(e,De))}(o.padding,n),d=he(a),p="y"===l?Ee:Oe,f="y"===l?xe:Ce,m=n.rects.reference[c]+n.rects.reference[l]-i[l]-n.rects.popper[c],h=i[l]-n.rects.reference[l],v=we(a),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=m/2-h/2,y=u[p],_=g-d[c]-u[f],w=g/2-d[c]/2+b,E=lt(y,w,_),x=l;n.modifiersData[r]=((t={})[x]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&tt(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dt(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function pt(e){return[Ee,Ce,xe,Oe].some((function(t){return e[t]>=0}))}var ft={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=it(t,{elementContext:"reference"}),s=it(t,{altBoundary:!0}),l=dt(i,r),c=dt(s,o,a),u=pt(l),d=pt(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},mt=Fe({defaultModifiers:[He,We,Xe,qe,Ke,st,ct,ut,ft]}),ht="tippy-content",vt="tippy-arrow",gt="tippy-svg-arrow",bt={passive:!0,capture:!0},yt=function(){return document.body};function _t(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function wt(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Et(e,t){return"function"==typeof e?e.apply(void 0,t):e}function xt(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Ct(e){return[].concat(e)}function Ot(e,t){-1===e.indexOf(t)&&e.push(t)}function St(e){return[].slice.call(e)}function Dt(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function kt(){return document.createElement("div")}function At(e){return["Element","Fragment"].some((function(t){return wt(e,t)}))}function Tt(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Pt(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function jt(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function Mt(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Nt={isTouch:!1},It=0;function Rt(){Nt.isTouch||(Nt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Lt))}function Lt(){var e=performance.now();e-It<20&&(Nt.isTouch=!1,document.removeEventListener("mousemove",Lt)),It=e}function Ft(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Vt=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Ht=Object.assign({appendTo:yt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Bt=Object.keys(Ht);function Ut(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,a=n.defaultValue;return o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Ht[o])?r:a),t}),{});return Object.assign({},e,t)}function $t(e,t){var n=Object.assign({},t,{content:Et(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ut(Object.assign({},Ht,{plugins:t}))):Bt).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Ht.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function zt(e,t){e.innerHTML=t}function Wt(e){var t=kt();return!0===e?t.className=vt:(t.className=gt,At(e)?t.appendChild(e):zt(t,e)),t}function Yt(e,t){At(t.content)?(zt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zt(e,t.content):e.textContent=t.content)}function Gt(e){var t=e.firstElementChild,n=St(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ht)})),arrow:n.find((function(e){return e.classList.contains(vt)||e.classList.contains(gt)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Xt(e){var t=kt(),n=kt();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=kt();function o(n,r){var o=Gt(t),a=o.box,i=o.content,s=o.arrow;r.theme?a.setAttribute("data-theme",r.theme):a.removeAttribute("data-theme"),"string"==typeof r.animation?a.setAttribute("data-animation",r.animation):a.removeAttribute("data-animation"),r.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?a.setAttribute("role",r.role):a.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Yt(i,e.props),r.arrow?s?n.arrow!==r.arrow&&(a.removeChild(s),a.appendChild(Wt(r.arrow))):a.appendChild(Wt(r.arrow)):s&&a.removeChild(s)}return r.className=ht,r.setAttribute("data-state","hidden"),Yt(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}Xt.$$tippy=!0;var qt=1,Kt=[],Zt=[];function Jt(e,t){var n,r,o,a,i,s,l,c,u=$t(e,Object.assign({},Ht,Ut(Dt(t)))),d=!1,p=!1,f=!1,m=!1,h=[],v=xt(G,u.interactiveDebounce),g=qt++,b=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),y={id:g,reference:e,popper:kt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){if(!y.state.isDestroyed){M("onBeforeUpdate",[y,t]),W();var n=y.props,r=$t(e,Object.assign({},n,Dt(t),{ignoreAttributes:!0}));y.props=r,z(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),v=xt(G,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?Ct(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded"),I(),j(),E&&E(n,r),y.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),M("onAfterUpdate",[y,t])}},setContent:function(e){y.setProps({content:e})},show:function(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=Nt.isTouch&&!y.props.touch,o=_t(y.props.duration,0,Ht.duration);if(!(e||t||n||r||k().hasAttribute("disabled")||(M("onShow",[y],!1),!1===y.props.onShow(y)))){if(y.state.isVisible=!0,D()&&(w.style.visibility="visible"),j(),H(),y.state.isMounted||(w.style.transition="none"),D()){var a=T();Tt([a.box,a.content],0)}s=function(){var e;if(y.state.isVisible&&!m){if(m=!0,w.offsetHeight,w.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=T(),n=t.box,r=t.content;Tt([n,r],o),Pt([n,r],"visible")}N(),I(),Ot(Zt,y),null==(e=y.popperInstance)||e.forceUpdate(),M("onMount",[y]),y.props.animation&&D()&&function(e,t){U(e,(function(){y.state.isShown=!0,M("onShown",[y])}))}(o)}},function(){var e,t=y.props.appendTo,n=k();(e=y.props.interactive&&t===yt||"parent"===t?n.parentNode:Et(t,[n])).contains(w)||e.appendChild(w),y.state.isMounted=!0,Z()}()}},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=_t(y.props.duration,1,Ht.duration);if(!(e||t||n)&&(M("onHide",[y],!1),!1!==y.props.onHide(y))){if(y.state.isVisible=!1,y.state.isShown=!1,m=!1,d=!1,D()&&(w.style.visibility="hidden"),R(),B(),j(!0),D()){var o=T(),a=o.box,i=o.content;y.props.animation&&(Tt([a,i],r),Pt([a,i],"hidden"))}N(),I(),y.props.animation?D()&&function(e,t){U(e,(function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,y.unmount):y.unmount()}},hideWithInteractivity:function(e){A().addEventListener("mousemove",v),Ot(Kt,v),v(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide(),y.state.isMounted&&(J(),Q().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w),Zt=Zt.filter((function(e){return e!==y})),y.state.isMounted=!1,M("onHidden",[y]))},destroy:function(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),W(),delete e._tippy,y.state.isDestroyed=!0,M("onDestroy",[y]))}};if(!u.render)return y;var _=u.render(y),w=_.popper,E=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,e._tippy=y,w._tippy=y;var x=b.map((function(e){return e.fn(y)})),C=e.hasAttribute("aria-expanded");return z(),I(),j(),M("onCreate",[y]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",v)})),y;function O(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===O()[0]}function D(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function k(){return l||e}function A(){var e,t,n=k().parentNode;return n?null!=(t=Ct(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function T(){return Gt(w)}function P(e){return y.state.isMounted&&!y.state.isVisible||Nt.isTouch||a&&"focus"===a.type?0:_t(y.props.delay,e?0:1,Ht.delay)}function j(e){void 0===e&&(e=!1),w.style.pointerEvents=y.props.interactive&&!e?"":"none",w.style.zIndex=""+y.props.zIndex}function M(e,t,n){var r;void 0===n&&(n=!0),x.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(r=y.props)[e].apply(r,t)}function N(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;Ct(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function I(){!C&&y.props.aria.expanded&&Ct(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){A().removeEventListener("mousemove",v),Kt=Kt.filter((function(e){return e!==v}))}function L(t){if(!Nt.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!Mt(w,n)){if(Ct(y.props.triggerTarget||e).some((function(e){return Mt(e,n)}))){if(Nt.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout((function(){p=!1})),y.state.isMounted||B())}}}function F(){f=!0}function V(){f=!1}function H(){var e=A();e.addEventListener("mousedown",L,!0),e.addEventListener("touchend",L,bt),e.addEventListener("touchstart",V,bt),e.addEventListener("touchmove",F,bt)}function B(){var e=A();e.removeEventListener("mousedown",L,!0),e.removeEventListener("touchend",L,bt),e.removeEventListener("touchstart",V,bt),e.removeEventListener("touchmove",F,bt)}function U(e,t){var n=T().box;function r(e){e.target===n&&(jt(n,"remove",r),t())}if(0===e)return t();jt(n,"remove",i),jt(n,"add",r),i=r}function $(t,n,r){void 0===r&&(r=!1),Ct(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function z(){var e;S()&&($("touchstart",Y,{passive:!0}),$("touchend",X,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,Y),e){case"mouseenter":$("mouseleave",X);break;case"focus":$(Vt?"focusout":"blur",q);break;case"focusin":$("focusout",q)}}))}function W(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),h=[]}function Y(e){var t,n=!1;if(y.state.isEnabled&&!K(e)&&!p){var r="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,I(),!y.state.isVisible&&wt(e,"MouseEvent")&&Kt.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function G(e){var t=e.target,n=k().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=o.placement.split("-")[0],s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,c="top"===i?s.bottom.y:0,u="right"===i?s.left.x:0,d="left"===i?s.right.x:0,p=t.top-r+l>a,f=r-t.bottom-c>a,m=t.left-n+u>a,h=n-t.right-d>a;return p||f||m||h}))})(r,e)&&(R(),te(e))}}function X(e){K(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function q(e){y.props.trigger.indexOf("focusin")<0&&e.target!==k()||y.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function K(e){return!!Nt.isTouch&&S()!==e.type.indexOf("touch")>=0}function Z(){J();var t=y.props,n=t.popperOptions,r=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,l=D()?Gt(w).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(D()){var n=T().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];D()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=mt(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:d}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return St(w.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&M("onTrigger",[y,e]),H();var t=P(!0),r=O(),o=r[0],a=r[1];Nt.isTouch&&"hold"===o&&a&&(t=a),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),M("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=P(!1);t?r=setTimeout((function(){y.state.isVisible&&y.hide()}),t):o=requestAnimationFrame((function(){y.hide()}))}}else B()}}function Qt(e,t){void 0===t&&(t={});var n=Ht.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Rt,bt),window.addEventListener("blur",Ft);var r,o=Object.assign({},t,{plugins:n}),a=(r=e,At(r)?[r]:function(e){return wt(e,"NodeList")}(r)?St(r):Array.isArray(r)?r:St(document.querySelectorAll(r))).reduce((function(e,t){var n=t&&Jt(t,o);return n&&e.push(n),e}),[]);return At(e)?a[0]:a}Qt.defaultProps=Ht,Qt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ht[t]=e[t]}))},Qt.currentInput=Nt,Object.assign({},qe,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Qt.setDefaultProps({render:Xt});var en=Qt,tn=n(196),nn=n.n(tn),rn=window.ReactDOM;function on(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var an="undefined"!=typeof window&&"undefined"!=typeof document;function sn(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function ln(){return an&&document.createElement("div")}function cn(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!cn(e[n],t[n]))return!1}return!0}return!1}function un(e){var t=[];return e.forEach((function(e){t.find((function(t){return cn(e,t)}))||t.push(e)})),t}var dn=an?tn.useLayoutEffect:tn.useEffect;function pn(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var fn={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||pn(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&pn(t,"remove",e.props.className)},onAfterUpdate:r}}};function mn(e){return function(t){var n,r,o=t.children,a=t.content,i=t.visible,s=t.singleton,l=t.render,c=t.reference,u=t.disabled,d=void 0!==u&&u,p=t.ignoreAttributes,f=void 0===p||p,m=(t.__source,t.__self,on(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),h=void 0!==i,v=void 0!==s,g=(0,tn.useState)(!1),b=g[0],y=g[1],_=(0,tn.useState)({}),w=_[0],E=_[1],x=(0,tn.useState)(),C=x[0],O=x[1],S=(n=function(){return{container:ln(),renders:1}},(r=(0,tn.useRef)()).current||(r.current="function"==typeof n?n():n),r.current),D=Object.assign({ignoreAttributes:f},m,{content:S.container});h&&(D.trigger="manual",D.hideOnClick=!1),v&&(d=!0);var k=D,A=D.plugins||[];l&&(k=Object.assign({},D,{plugins:v&&null!=s.data?[].concat(A,[{fn:function(){return{onTrigger:function(e,t){var n=s.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,O(n.content)}}}}]):A,render:function(){return{popper:S.container}}}));var T=[c].concat(o?[o.type]:[]);return dn((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||S.ref||ln(),Object.assign({},k,{plugins:[fn].concat(D.plugins||[])}));return S.instance=n,d&&n.disable(),i&&n.show(),v&&s.hook({instance:n,content:a,props:k,setSingletonContent:O}),y(!0),function(){n.destroy(),null==s||s.cleanup(n)}}),T),dn((function(){var e,t,n,r,o;if(1!==S.renders){var l=S.instance;l.setProps((t=l.props,n=k,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:un([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(o=n.popperOptions)?void 0:o.modifiers)||[]))})}))),null==(e=l.popperInstance)||e.forceUpdate(),d?l.disable():l.enable(),h&&(i?l.show():l.hide()),v&&s.hook({instance:l,content:a,props:k,setSingletonContent:O})}else S.renders++})),dn((function(){var e;if(l){var t=S.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;w.placement===n.placement&&w.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&w.escaped===(null==r?void 0:r.hasPopperEscaped)||E({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[w.placement,w.referenceHidden,w.escaped].concat(T)),nn().createElement(nn().Fragment,null,o?(0,tn.cloneElement)(o,{ref:function(e){S.ref=e,sn(o.ref,e)}}):null,b&&(0,rn.createPortal)(l?l(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(w),C,S.instance):a,S.container))}}var hn=function(e,t){return(0,tn.forwardRef)((function(n,r){var o=n.children,a=on(n,["children"]);return nn().createElement(e,Object.assign({},t,a),o?(0,tn.cloneElement)(o,{ref:function(e){sn(r,e),sn(o.ref,e)}}):null)}))},vn=hn(mn(en)),gn=t=>{let{content:n}=t;return(0,e.createElement)(vn,{content:n,className:"__tippy_tooltip"},(0,e.createElement)("span",{className:"__help_info"},(0,e.createElement)(f.Icon,{icon:y,size:16})))},bn=t=>{let{id:n,index:r="",label:o,isChecked:a,onChange:i,description:s,tooltip:l,isPro:c,isDisabled:u}=t;const d=T(n,r);return(0,e.createElement)("div",{className:"__form_control __checkbox_toggle"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:d},o,P(c),l&&(0,e.createElement)(gn,{content:l}))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(f.CheckboxControl,{checked:a,id:d,onChange:e=>i(e,n,r),disabled:u})))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))},yn=(e,t)=>{const{isDirty:n,saveError:r,settings:o}=e,a=()=>{n||(t({type:"SET_DIRTY",payload:!0}),wcapf_admin_params.dirty=!0),r&&t({type:"SET_ERROR",payload:""})},i=(e,n)=>{n!==o[e]&&(t({type:"UPDATE_SETTINGS",payload:{...o,[e]:n}}),a())},s=e=>{t({type:"UPDATE_SETTINGS",payload:e}),a()};return{setDirty:a,handleRadioChange:(e,t)=>{const n=e.target.value;i(t,n)},handleCheckboxChange:(e,t)=>{i(t,e?"1":"")},handleTextFieldChange:(e,t)=>{i(t,e)},handleSelectChange:(e,t)=>{i(t,e.value)},handleImageChange:(e,t)=>{const n=e.id,r=e.sizes.full.url;if(n===parseInt(o[t]))return;const a=t,i=`${t}_src`,l={...o,[a]:n,[i]:r};s(l)},handleImageRemove:e=>{const t=e,n=`${e}_src`,r={...o,[t]:"",[n]:""};s(r)},handleAuthorRolesChange:(e,t)=>{i(t,e)}}},wn=n(184),En=n.n(wn),xn=t=>{let{label:n,id:r,index:o="",value:a,options:i,isVertical:s,onChange:l,description:c,tooltip:u,isPro:d}=t;return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,P(d),u&&(0,e.createElement)(gn,{content:u}))),(0,e.createElement)("div",{className:En()("__wrapper","radio-group",r,{"radio-group-vertical":s})},(0,e.createElement)("div",{className:"__input_wrapper"},i.map(((t,n)=>{const i=T(r,o,n);return(0,e.createElement)("div",{key:i,className:"components-radio-control__option"},(0,e.createElement)("input",{id:i,className:"components-radio-control__input",type:"radio",value:t.value,onChange:e=>l(e,r,o),checked:t.value===a}),(0,e.createElement)("label",{htmlFor:i},t.label,P(t.isPro)))}))))),c&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:c}}))};const Cn=[{label:(0,p.__)("AND","wc-ajax-product-filter"),value:"and"},{label:(0,p.__)("OR","wc-ajax-product-filter"),value:"or"}],On=[{label:(0,p.__)("Always show","wc-ajax-product-filter"),value:"show"},{label:(0,p.__)("Never show","wc-ajax-product-filter"),value:"remove"}];var Sn=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r,handleRadioChange:o}=yn(t,n),{settings:{filter_relationships:a,update_count:i,remove_empty:s,remove_empty_filters:l,disable_ajax:c}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(xn,{id:"filter_relationships",label:(0,p.__)("Filter Relationships","wc-ajax-product-filter"),description:(0,p.__)("The relationship between filters. AND - products shown will match all filters, OR - products shown will match any filters.","wc-ajax-product-filter"),value:a,onChange:o,options:Cn}),(0,e.createElement)(bn,{id:"update_count",label:(0,p.__)("Dynamic Product Count","wc-ajax-product-filter"),description:(0,p.__)("Whether to update the product count number according to the applied filters.","wc-ajax-product-filter"),isChecked:i,onChange:r}),(0,e.createElement)(xn,{id:"remove_empty",label:(0,p.__)("Options with zero products","wc-ajax-product-filter"),description:(0,p.__)('Choose "Always show" to gray out filter options or "Never show" to hide filter options that have no associated products.',"wc-ajax-product-filter"),options:On,value:s,onChange:o}),(0,e.createElement)(bn,{id:"remove_empty_filters",label:(0,p.__)("Hide empty filters","wc-ajax-product-filter"),description:(0,p.__)("Whether to hide the filters that don't have any options.","wc-ajax-product-filter"),isChecked:l,onChange:r,isPro:!0}),(0,e.createElement)(bn,{id:"disable_ajax",label:(0,p.__)("Disable Ajax","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want to disable filtering via Ajax.","wc-ajax-product-filter"),isChecked:c,onChange:r}))},Dn=window.wp.primitives,kn=(0,e.createElement)(Dn.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Dn.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})),An=n(941),Tn=t=>{let{message:n}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__pro_settings"},(0,e.createElement)("p",null,n," ",(0,e.createElement)("a",{href:"https://wptools.io/wc-ajax-product-filter/?utm_source=WCAPF+Free&utm_medium=inside+plugin&utm_campaign=WCAPF+Pro+Upgrade"},(0,p.__)("Upgrade","wc-ajax-product-filter")))))};function Pn(){return Pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pn.apply(this,arguments)}const jn=t=>{let{inputId:n,id:r,index:o,initialValue:a,onChange:i,type:s="text",isDisabled:l,customClass:c,...u}=t;const[d,p]=(0,e.useState)(a);(0,e.useLayoutEffect)((()=>{p(a)}),[a]);let f="components-text-control__input";return c&&(f+=` ${c}`),(0,e.createElement)("input",Pn({type:s,id:n,className:f,disabled:l,value:d,onChange:e=>{p(e.target.value)},onBlur:()=>i(d,r,o)},u))},Mn=t=>{let{inputId:n,id:r,index:o,initialValue:a,onChange:i,type:s="text",isDisabled:l,customClass:c,...u}=t,d="components-text-control__input";return c&&(d+=` ${c}`),(0,e.createElement)("input",Pn({type:s,id:n,className:d,disabled:l,value:a,onChange:e=>i(e.target.value,r,o)},u))};var Nn=t=>{let{label:n,id:r,index:o="",value:a,onChange:i,description:s,type:l="text",renderAsFormField:c=!0,isFilterKey:u=!1,isDisabled:d=!1,tooltip:p,customClass:f="",isPro:m,...h}=t;const v=T(r,o);return c?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:v},n,"field_key"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"For example, the URL will be",(0,e.createElement)("br",null),"www.site.com/shop/?color=blue&size=large",(0,e.createElement)("br",null),"where ",(0,e.createElement)("b",null,"color")," and ",(0,e.createElement)("b",null,"size")," ","are the filter keys.")}),"keyword_filter_placeholder"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable for the input field of the keyword filter.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search products"')}),"keyword_filter_prefix"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the keyword.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Keyword:". For a value "shirt", it becomes "Keyword: shirt" in the active filters.')}),"search_field_default_placeholder"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view. This will be overridden by the placeholder value of the filter itself.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search"')}),"no_results_text"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view and combobox enabled in the dropdown view.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No results for:". For a keyword "purple", the text will be "No results for: ',(0,e.createElement)("u",null,"purple"),'"')}),"combobox_no_options_text"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when combobox is enabled in the dropdown(multiselect) view and all options have been chosen.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No options to choose"')}),"empty_filter_text"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when there are no options to filter by or the filter is empty.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "N/A"')}),"results_count_markup"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Default: Found %d product|Found %d products",(0,e.createElement)("br",null),(0,e.createElement)("br",null),"Here two markups are separated by the pipe(|) character. The first markup is for the singular result and the second one is for the plural result. %d will be replaced with product count.")}),"sort_by_prefix"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the sort by value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Sort by:". For a value "Title", it becomes "Sort by: Title" in the active filters.')}),"per_page_prefix"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the per page value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Per page:". For a value of "15", it becomes "Per page: 15" in the active filters.')}),P(m))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},u?(0,e.createElement)(jn,Pn({inputId:v,id:r,index:o,initialValue:a,onChange:i,type:l,isDisabled:d,customClass:f},h)):(0,e.createElement)(Mn,Pn({inputId:v,id:r,index:o,initialValue:a,onChange:i,type:l,isDisabled:d,customClass:f},h)),p&&(0,e.createElement)(gn,{content:p})))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}})):(0,e.createElement)(e.Fragment,null,u?(0,e.createElement)(jn,Pn({inputId:v,id:r,index:o,initialValue:a,onChange:i,type:l,isDisabled:d,customClass:f},h)):(0,e.createElement)(Mn,Pn({inputId:v,id:r,index:o,initialValue:a,onChange:i,type:l,isDisabled:d,customClass:f},h)))};const In=(0,p.__)("Here you can edit the filter keys globally and change the order of those in the URL.","wc-ajax-product-filter"),Rn=t=>{let{data:n,index:r}=t;const{state:o,dispatch:a}=d(),{setDirty:i}=yn(o,a),{globalFilterKeys:s}=o,{secondary_type:l,label:c,field_key:u,_field_key:p,field_key_error:m,field_key_error_:h}=n,v=m||h;let g="components-text-control__input";return v&&(g+=" __has_error"),(0,e.createElement)("div",{className:"__filter_key_wrapper",key:l},v&&(0,e.createElement)(f.Notice,{status:"error",isDismissible:!1},v),(0,e.createElement)("div",{className:"__filter_key"},(0,e.createElement)("span",{className:"__index"},r+1),(0,e.createElement)("label",{className:"__label",htmlFor:l},c),(0,e.createElement)("div",{className:"__value"},(0,e.createElement)(Nn,{id:l,value:u,placeholder:p,onChange:e=>((e,t)=>{const n=wpFeSanitizeTitle(e),r=s[t];if(n===r.field_key)return;const o=s.map(((e,r)=>r===t?{...e,field_key:n,field_key_error:"",field_key_error_:""}:e));a({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:o}),a({type:"SET_FILTER_KEYS_CHANGED",payload:!0}),i()})(e,r),renderAsFormField:!1,customClass:g,isFilterKey:!0})),(0,e.createElement)("div",{className:"__drag_handle_wrapper"},(0,e.createElement)(f.Icon,{className:"__drag_handler",icon:kn}))))};var Ln=()=>{const{state:n,dispatch:r}=d(),{setDirty:o}=yn(n,r),{globalFilterKeys:a,saveError:i}=n;return(0,e.createElement)(e.Fragment,null,!(0,t.isEmpty)(a)&&(0,e.createElement)(Tn,{message:(0,p.__)("Changing the order of filter keys is a Pro feature.","wc-ajax-product-filter")}),i&&(0,e.createElement)(f.Notice,{status:"error",isDismissible:!1},i),(0,e.createElement)("h4",{className:"__section_heading"},(0,p.__)("Global filter keys and order","wc-ajax-product-filter")),(0,t.isEmpty)(a)?(0,e.createElement)("p",{className:"__description"},(0,p.__)("Please create some filters first then come back here.","wc-ajax-product-filter")):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"__description"},In),(0,e.createElement)(An.ReactSortable,{list:a,setList:(e,t,n)=>{},direction:"vertical",handle:".__drag_handler",onSort:()=>{},className:"__global_filter_keys"},a.map(((t,n)=>{const{secondary_type:r}=t;return(0,e.createElement)(Rn,{data:t,index:n,key:r})})))))},Fn=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r}=yn(t,n),{settings:{debug_mode:o,disable_wcapf:a,send_anonymous_data:i,remove_data:s}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"debug_mode",label:(0,p.__)("Debug Mode","wc-ajax-product-filter"),description:(0,p.__)("This will help you to configure the plugin correctly.","wc-ajax-product-filter"),isChecked:o,onChange:r}),(0,e.createElement)(bn,{id:"disable_wcapf",label:(0,p.__)("Disable WCAPF","wc-ajax-product-filter"),description:(0,p.__)("Check this to disable WCAPF - WooCommerce Ajax Product Filter in the front end for testing purposes.","wc-ajax-product-filter"),isChecked:a,onChange:r}),(0,e.createElement)(bn,{id:"send_anonymous_data",label:(0,p.__)("Send anonymous data","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you agree to send anonymous data to the developer to make the plugin better.","wc-ajax-product-filter"),isChecked:i,onChange:r}),(0,e.createElement)(bn,{id:"remove_data",label:(0,p.__)("Remove Data","wc-ajax-product-filter"),description:(0,p.__)("Enable this option to remove all data associated with WCAPF - WooCommerce Ajax Product Filter when you delete the plugin via the <b>Plugins</b> page.","wc-ajax-product-filter"),isChecked:s,onChange:r}))};const Vn=t=>{let n,{value:r,onChange:o,disableAlpha:a,slotName:i}=t;return n=6.2<=parseFloat(wcapf_admin_params.wp_version)?{popoverProps:{noArrow:!1,__unstableSlotName:i,position:"bottom right"}}:{popoverProps:{noArrow:!1,__unstableSlotName:i},position:"bottom right"},(0,e.createElement)(f.Dropdown,Pn({},n,{renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,e.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},(0,e.createElement)(f.Button,{onClick:o,"aria-expanded":n,className:"components-circular-option-picker__option",style:{backgroundColor:r||"#fff",color:r||"#fff"}}))},renderContent:()=>(0,e.createElement)(f.ColorPicker,{color:r,onChange:e=>o(e),defaultValue:"#fff",enableAlpha:!a})}))};var Hn=t=>{let{label:n,value:r,onChange:o,description:a,isPro:i,disableAlpha:s=!0,renderAsFormField:l=!1,slotName:c}=t;return l?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,P(i))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Vn,{value:r,onChange:o,disableAlpha:s,slotName:c})))),a&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:a}})):(0,e.createElement)(Vn,{value:r,onChange:o,slotName:c})},Bn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Un=Math.abs,$n=String.fromCharCode,zn=Object.assign;function Wn(e){return e.trim()}function Yn(e,t,n){return e.replace(t,n)}function Gn(e,t){return e.indexOf(t)}function Xn(e,t){return 0|e.charCodeAt(t)}function qn(e,t,n){return e.slice(t,n)}function Kn(e){return e.length}function Zn(e){return e.length}function Jn(e,t){return t.push(e),e}var Qn=1,er=1,tr=0,nr=0,rr=0,or="";function ar(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Qn,column:er,length:i,return:""}}function ir(e,t){return zn(ar("",null,null,"",null,null,0),e,{length:-e.length},t)}function sr(){return rr=nr>0?Xn(or,--nr):0,er--,10===rr&&(er=1,Qn--),rr}function lr(){return rr=nr<tr?Xn(or,nr++):0,er++,10===rr&&(er=1,Qn++),rr}function cr(){return Xn(or,nr)}function ur(){return nr}function dr(e,t){return qn(or,e,t)}function pr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function fr(e){return Qn=er=1,tr=Kn(or=e),nr=0,[]}function mr(e){return or="",e}function hr(e){return Wn(dr(nr-1,br(91===e?e+2:40===e?e+1:e)))}function vr(e){for(;(rr=cr())&&rr<33;)lr();return pr(e)>2||pr(rr)>3?"":" "}function gr(e,t){for(;--t&&lr()&&!(rr<48||rr>102||rr>57&&rr<65||rr>70&&rr<97););return dr(e,ur()+(t<6&&32==cr()&&32==lr()))}function br(e){for(;lr();)switch(rr){case e:return nr;case 34:case 39:34!==e&&39!==e&&br(rr);break;case 40:41===e&&br(e);break;case 92:lr()}return nr}function yr(e,t){for(;lr()&&e+rr!==57&&(e+rr!==84||47!==cr()););return"/*"+dr(t,nr-1)+"*"+$n(47===e?e:lr())}function _r(e){for(;!pr(cr());)lr();return dr(e,nr)}var wr="-ms-",Er="-moz-",xr="-webkit-",Cr="comm",Or="rule",Sr="decl",Dr="@keyframes";function kr(e,t){for(var n="",r=Zn(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ar(e,t,n,r){switch(e.type){case"@import":case Sr:return e.return=e.return||e.value;case Cr:return"";case Dr:return e.return=e.value+"{"+kr(e.children,r)+"}";case Or:e.value=e.props.join(",")}return Kn(n=kr(e.children,r))?e.return=e.value+"{"+n+"}":""}function Tr(e,t){switch(function(e,t){return(((t<<2^Xn(e,0))<<2^Xn(e,1))<<2^Xn(e,2))<<2^Xn(e,3)}(e,t)){case 5103:return xr+"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 xr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return xr+e+Er+e+wr+e+e;case 6828:case 4268:return xr+e+wr+e+e;case 6165:return xr+e+wr+"flex-"+e+e;case 5187:return xr+e+Yn(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return xr+e+wr+"flex-item-"+Yn(e,/flex-|-self/,"")+e;case 4675:return xr+e+wr+"flex-line-pack"+Yn(e,/align-content|flex-|-self/,"")+e;case 5548:return xr+e+wr+Yn(e,"shrink","negative")+e;case 5292:return xr+e+wr+Yn(e,"basis","preferred-size")+e;case 6060:return xr+"box-"+Yn(e,"-grow","")+xr+e+wr+Yn(e,"grow","positive")+e;case 4554:return xr+Yn(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return Yn(Yn(Yn(e,/(zoom-|grab)/,xr+"$1"),/(image-set)/,xr+"$1"),e,"")+e;case 5495:case 3959:return Yn(e,/(image-set\([^]*)/,xr+"$1$`$1");case 4968:return Yn(Yn(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+xr+e+e;case 4095:case 3583:case 4068:case 2532:return Yn(e,/(.+)-inline(.+)/,xr+"$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(Kn(e)-1-t>6)switch(Xn(e,t+1)){case 109:if(45!==Xn(e,t+4))break;case 102:return Yn(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+Er+(108==Xn(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Gn(e,"stretch")?Tr(Yn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Xn(e,t+1))break;case 6444:switch(Xn(e,Kn(e)-3-(~Gn(e,"!important")&&10))){case 107:return Yn(e,":",":"+xr)+e;case 101:return Yn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+xr+(45===Xn(e,14)?"inline-":"")+"box$3$1"+xr+"$2$3$1"+wr+"$2box$3")+e}break;case 5936:switch(Xn(e,t+11)){case 114:return xr+e+wr+Yn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xr+e+wr+Yn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xr+e+wr+Yn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return xr+e+wr+e+e}return e}function Pr(e){return mr(jr("",null,null,null,[""],e=fr(e),0,[0],e))}function jr(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,p=0,f=0,m=0,h=1,v=1,g=1,b=0,y="",_=o,w=a,E=r,x=y;v;)switch(m=b,b=lr()){case 40:if(108!=m&&58==x.charCodeAt(d-1)){-1!=Gn(x+=Yn(hr(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:x+=hr(b);break;case 9:case 10:case 13:case 32:x+=vr(m);break;case 92:x+=gr(ur()-1,7);continue;case 47:switch(cr()){case 42:case 47:Jn(Nr(yr(lr(),ur()),t,n),l);break;default:x+="/"}break;case 123*h:s[c++]=Kn(x)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:f>0&&Kn(x)-d&&Jn(f>32?Ir(x+";",r,n,d-1):Ir(Yn(x," ","")+";",r,n,d-2),l);break;case 59:x+=";";default:if(Jn(E=Mr(x,t,n,c,u,o,s,y,_=[],w=[],d),a),123===b)if(0===u)jr(x,t,E,E,_,a,d,s,w);else switch(p){case 100:case 109:case 115:jr(e,E,E,r&&Jn(Mr(e,E,E,0,0,o,s,y,o,_=[],d),w),o,w,d,s,r?_:w);break;default:jr(x,E,E,E,[""],w,0,s,w)}}c=u=f=0,h=g=1,y=x="",d=i;break;case 58:d=1+Kn(x),f=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==sr())continue;switch(x+=$n(b),b*h){case 38:g=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(Kn(x)-1)*g,g=1;break;case 64:45===cr()&&(x+=hr(lr())),p=cr(),u=d=Kn(y=x+=_r(ur())),b++;break;case 45:45===m&&2==Kn(x)&&(h=0)}}return a}function Mr(e,t,n,r,o,a,i,s,l,c,u){for(var d=o-1,p=0===o?a:[""],f=Zn(p),m=0,h=0,v=0;m<r;++m)for(var g=0,b=qn(e,d+1,d=Un(h=i[m])),y=e;g<f;++g)(y=Wn(h>0?p[g]+" "+b:Yn(b,/&\f/g,p[g])))&&(l[v++]=y);return ar(e,t,n,0===o?Or:s,l,c,u)}function Nr(e,t,n){return ar(e,t,n,Cr,$n(rr),qn(e,2,-2),0)}function Ir(e,t,n,r){return ar(e,t,n,Sr,qn(e,0,r),qn(e,r+1,-1),r)}var Rr=function(e,t,n){for(var r=0,o=0;r=o,o=cr(),38===r&&12===o&&(t[n]=1),!pr(o);)lr();return dr(e,nr)},Lr=new WeakMap,Fr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Lr.get(n))&&!r){Lr.set(e,!0);for(var o=[],a=function(e,t){return mr(function(e,t){var n=-1,r=44;do{switch(pr(r)){case 0:38===r&&12===cr()&&(t[n]=1),e[n]+=Rr(nr-1,t,n);break;case 2:e[n]+=hr(r);break;case 4:if(44===r){e[++n]=58===cr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=$n(r)}}while(r=lr());return e}(fr(e),t))}(t,o),i=n.props,s=0,l=0;s<a.length;s++)for(var c=0;c<i.length;c++,l++)e.props[l]=o[s]?a[s].replace(/&\f/g,i[c]):i[c]+" "+a[s]}}},Vr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},Hr=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Sr:e.return=Tr(e.value,e.length);break;case Dr:return kr([ir(e,{value:Yn(e.value,"@","@"+xr)})],r);case Or:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return kr([ir(e,{props:[Yn(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return kr([ir(e,{props:[Yn(t,/:(plac\w+)/,":-webkit-input-$1")]}),ir(e,{props:[Yn(t,/:(plac\w+)/,":-moz-$1")]}),ir(e,{props:[Yn(t,/:(plac\w+)/,wr+"input-$1")]})],r)}return""}))}}],Br=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,o,a=e.stylisPlugins||Hr,i={},s=[];r=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<t.length;n++)i[t[n]]=!0;s.push(e)}));var l,c,u,d,p=[Ar,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[Fr,Vr].concat(a,p),u=Zn(c),function(e,t,n,r){for(var o="",a=0;a<u;a++)o+=c[a](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,kr(Pr(e?e+"{"+t.styles+"}":t.styles),f),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new Bn({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return m.sheet.hydrate(s),m};function Ur(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var $r=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},zr=function(e,t,n){$r(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},Wr=function(e){for(var t,n=0,r=0,o=e.length;o>=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)},Yr={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},Gr=/[A-Z]|^ms/g,Xr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qr=function(e){return 45===e.charCodeAt(1)},Kr=function(e){return null!=e&&"boolean"!=typeof e},Zr=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=qr(n=e)?n:n.replace(Gr,"-$&").toLowerCase()),t[e];var n}}(),Jr=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Xr,(function(e,t,n){return eo={name:t,styles:n,next:eo},t}))}return 1===Yr[e]||qr(e)||"number"!=typeof t||0===t?t:t+"px"};function Qr(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 eo={name:n.name,styles:n.styles,next:eo},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)eo={name:r.name,styles:r.styles,next:eo},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Qr(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=a+"{"+t[i]+"}":Kr(i)&&(r+=Zr(a)+":"+Jr(a,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=Qr(e,t,i);switch(a){case"animation":case"animationName":r+=Zr(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var l=0;l<i.length;l++)Kr(i[l])&&(r+=Zr(a)+":"+Jr(a,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=eo,a=n(e);return eo=o,Qr(e,t,a)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var eo,to=/label:\s*([^\s;\n{]+)\s*(;|$)/g,no=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";eo=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=Qr(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=Qr(n,t,e[i]),r&&(o+=a[i]);to.lastIndex=0;for(var s,l="";null!==(s=to.exec(o));)l+="-"+s[1];return{name:Wr(o)+l,styles:o,next:eo}},ro={}.hasOwnProperty,oo=(0,tn.createContext)("undefined"!=typeof HTMLElement?Br({key:"css"}):null);oo.Provider;var ao=function(e){return(0,tn.forwardRef)((function(t,n){var r=(0,tn.useContext)(oo);return e(t,r,n)}))},io=(0,tn.createContext)({}),so=tn.useInsertionEffect?tn.useInsertionEffect:function(e){e()};function lo(e){so(e)}var co="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uo=function(e,t){var n={};for(var r in t)ro.call(t,r)&&(n[r]=t[r]);return n[co]=e,n},po=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return $r(t,n,r),lo((function(){return zr(t,n,r)})),null},fo=ao((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[co],a=[r],i="";"string"==typeof e.className?i=Ur(t.registered,a,e.className):null!=e.className&&(i=e.className+" ");var s=no(a,void 0,(0,tn.useContext)(io));i+=t.key+"-"+s.name;var l={};for(var c in e)ro.call(e,c)&&"css"!==c&&c!==co&&(l[c]=e[c]);return l.ref=n,l.className=i,(0,tn.createElement)(tn.Fragment,null,(0,tn.createElement)(po,{cache:t,serialized:s,isStringTag:"string"==typeof o}),(0,tn.createElement)(o,l))}));n(679);var mo=function(e,t){var n=arguments;if(null==t||!ro.call(t,"css"))return tn.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=fo,o[1]=uo(e,t);for(var a=2;a<r;a++)o[a]=n[a];return tn.createElement.apply(null,o)};function ho(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return no(t)}tn.useInsertionEffect?tn.useInsertionEffect:tn.useLayoutEffect;var vo=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var a=t[r];if(null!=a){var i=void 0;switch(typeof a){case"boolean":break;case"object":if(Array.isArray(a))i=e(a);else for(var s in i="",a)a[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=a}i&&(o&&(o+=" "),o+=i)}}return o};function go(e,t,n){var r=[],o=Ur(e,r,n);return r.length<2?n:o+t(r)}var bo=function(e){var t=e.cache,n=e.serializedArr;return lo((function(){for(var e=0;e<n.length;e++)zr(t,n[e],!1)})),null},yo=ao((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a=no(r,t.registered);return n.push(a),$r(t,a,!1),t.key+"-"+a.name},o={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return go(t.registered,r,vo(n))},theme:(0,tn.useContext)(io)},a=e.children(o);return(0,tn.createElement)(tn.Fragment,null,(0,tn.createElement)(bo,{cache:t,serializedArr:n}),a)}));function _o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eo(e,t){if(e){if("string"==typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}function xo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||Eo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Co(e){return Co="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},Co(e)}function Oo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function So(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Do(e,t,n){return t&&So(e.prototype,t),n&&So(e,n),e}function ko(e,t){return ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ko(e,t)}function Ao(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ko(e,t)}function To(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jo(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 Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(n),!0).forEach((function(t){Po(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},No(e)}function Io(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ro(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(e){return!1}}();return function(){var n,r=No(e);if(t){var o=No(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Io(this,n)}}var Lo=["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Fo=function(){};function Vo(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Ho(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(Vo(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Bo=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===Co(e)&&null!==e?[e]:[];var t},Uo=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Mo({},_o(e,Lo))};function $o(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function zo(e){return $o(e)?window.pageYOffset:e.scrollTop}function Wo(e,t){$o(e)?window.scrollTo(0,t):e.scrollTop=t}function Yo(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Go(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Fo,o=zo(e),a=t-o,i=10,s=0;function l(){var t=Yo(s+=i,o,a,n);Wo(e,t),s<n?window.requestAnimationFrame(l):r(e)}l()}function Xo(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var qo=!1,Ko={get passive(){return qo=!0}},Zo="undefined"!=typeof window?window:{};Zo.addEventListener&&Zo.removeEventListener&&(Zo.addEventListener("p",Fo,Ko),Zo.removeEventListener("p",Fo,!1));var Jo=qo;function Qo(e){return null!=e}function ea(e,t,n){return e?t:n}function ta(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=e.isFixedPosition,s=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,v=n.offsetParent.getBoundingClientRect().top,g=i||$o(u=l)?window.innerHeight:u.clientHeight,b=zo(l),y=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),w=v-_,E=g-h,x=w+b,C=d-b-h,O=f-g+b+y,S=b+h-_,D=160;switch(o){case"auto":case"bottom":if(E>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!i)return a&&Go(l,O,D),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&E>=r)return a&&Go(l,O,D),{placement:"bottom",maxHeight:i?E-y:C-y};if("auto"===o||i){var k=t,A=i?w:x;return A>=r&&(k=Math.min(A-y-s.controlHeight,t)),{placement:"top",maxHeight:k}}if("bottom"===o)return a&&Wo(l,O),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(x>=m&&!i)return a&&Go(l,S,D),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var T=t;return(!i&&x>=r||i&&w>=r)&&(T=i?w-_:x-_),a&&Go(l,S,D),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var na=function(e){return"auto"===e?"bottom":e},ra=(0,tn.createContext)({getPortalPlacement:null}),oa=function(e){Ao(n,e);var t=Ro(n);function n(){var e;Oo(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.context=void 0,e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,a=n.menuPlacement,i=n.menuPosition,s=n.menuShouldScrollIntoView,l=n.theme;if(t){var c="fixed"===i,u=ta({maxHeight:o,menuEl:t,minHeight:r,placement:a,shouldScroll:s&&!c,isFixedPosition:c,theme:l}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||na(t);return Mo(Mo({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return Do(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(tn.Component);oa.contextType=ra;var aa=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},ia=aa,sa=aa,la=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return mo("div",Pn({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};la.defaultProps={children:"No options"};var ca=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return mo("div",Pn({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};ca.defaultProps={children:"Loading..."};var ua,da,pa,fa=function(e){Ao(n,e);var t=Ro(n);function n(){var e;Oo(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==na(e.props.menuPlacement)&&e.setState({placement:n})},e}return Do(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.className,o=e.controlElement,a=e.cx,i=e.innerProps,s=e.menuPlacement,l=e.menuPosition,c=e.getStyles,u="fixed"===l;if(!t&&!u||!o)return null;var d=this.state.placement||na(s),p=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),f=u?0:window.pageYOffset,m=p[d]+f,h=mo("div",Pn({css:c("menuPortal",{offset:m,position:l,rect:p}),className:a({"menu-portal":!0},r)},i),n);return mo(ra.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,rn.createPortal)(h,t):h)}}]),n}(tn.Component),ma=["size"],ha={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},va=function(e){var t=e.size,n=_o(e,ma);return mo("svg",Pn({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ha},n))},ga=function(e){return mo(va,Pn({size:20},e),mo("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ba=function(e){return mo(va,Pn({size:20},e),mo("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ya=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},_a=ya,wa=ya,Ea=function(){var e=ho.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(ua||(da=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],pa||(pa=da.slice(0)),ua=Object.freeze(Object.defineProperties(da,{raw:{value:Object.freeze(pa)}})))),xa=function(e){var t=e.delay,n=e.offset;return mo("span",{css:ho({animation:"".concat(Ea," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Ca=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isRtl;return mo("div",Pn({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},o),mo(xa,{delay:0,offset:a}),mo(xa,{delay:160,offset:!0}),mo(xa,{delay:320,offset:!a}))};Ca.defaultProps={size:4};var Oa=["data"],Sa=["innerRef","isDisabled","isHidden","inputClassName"],Da={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},ka={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Mo({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Da)},Aa=function(e){return Mo({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Da)},Ta=function(e){var t=e.children,n=e.innerProps;return mo("div",n,t)},Pa={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return mo("div",Pn({css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},a),t||mo(ga,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,s=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return mo("div",Pn({ref:s,css:r("control",e),className:n({control:!0,"control--is-disabled":a,"control--is-focused":i,"control--menu-is-open":c},o)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return mo("div",Pn({css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},a),t||mo(ba,null))},DownChevron:ba,CrossIcon:ga,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return mo("div",Pn({css:o("group",e),className:r({group:!0},n)},s),mo(a,Pn({},i,{selectProps:u,theme:c,getStyles:o,cx:r}),l),mo("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,o=Uo(e);o.data;var a=_o(o,Oa);return mo("div",Pn({css:t("groupHeading",e),className:n({"group-heading":!0},r)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,a=e.getStyles;return mo("div",Pn({css:a("indicatorsContainer",e),className:r({indicators:!0},n)},o),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return mo("span",Pn({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.value,a=Uo(e),i=a.innerRef,s=a.isDisabled,l=a.isHidden,c=a.inputClassName,u=_o(a,Sa);return mo("div",{className:n({"input-container":!0},t),css:r("input",e),"data-value":o||""},mo("input",Pn({className:n({input:!0},c),ref:i,style:Aa(l),disabled:s},u)))},LoadingIndicator:Ca,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps;return mo("div",Pn({css:o("menu",e),className:r({menu:!0},n),ref:a},i),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.innerRef,s=e.isMulti;return mo("div",Pn({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":s},n),ref:i},a),t)},MenuPortal:fa,LoadingMessage:ca,NoOptionsMessage:la,MultiValue:function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,s=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,d=r.Container,p=r.Label,f=r.Remove;return mo(yo,null,(function(r){var m=r.css,h=r.cx;return mo(d,{data:a,innerProps:Mo({className:h(m(i("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":l},n))},s),selectProps:u},mo(p,{data:a,innerProps:{className:h(m(i("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:u},t),mo(f,{data:a,innerProps:Mo({className:h(m(i("multiValueRemove",e)),o({"multi-value__remove":!0},n)),"aria-label":"Remove ".concat(t||"option")},c),selectProps:u}))}))},MultiValueContainer:Ta,MultiValueLabel:Ta,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return mo("div",Pn({role:"button"},n),t||mo(ga,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,s=e.isSelected,l=e.innerRef,c=e.innerProps;return mo("div",Pn({css:o("option",e),className:r({option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":s},n),ref:l,"aria-disabled":a},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return mo("div",Pn({css:o("placeholder",e),className:r({placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,s=e.isRtl;return mo("div",Pn({css:o("container",e),className:r({"--is-disabled":i,"--is-rtl":s},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return mo("div",Pn({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,a=e.isMulti,i=e.getStyles,s=e.hasValue;return mo("div",Pn({css:i("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":a,"value-container--has-value":s},n)},o),t)}},ja=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ma(e){return function(e){if(Array.isArray(e))return wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Eo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Na=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Ia(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||Na(r)&&Na(o)))return!1;var r,o;return!0}for(var Ra={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},La=function(e){return mo("span",Pn({css:Ra},e))},Fa={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,s=e.isDisabled,l=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(a," focused, ").concat(c(i,n),".");if("menu"===t){var u=s?" disabled":"",d="".concat(l?"selected":"focused").concat(u);return"option ".concat(a," ").concat(d,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Va=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,s=e.selectProps,l=e.id,c=s.ariaLiveMessages,u=s.getOptionLabel,d=s.inputValue,p=s.isMulti,f=s.isOptionDisabled,m=s.isSearchable,h=s.menuIsOpen,v=s.options,g=s.screenReaderStatus,b=s.tabSelectsValue,y=s["aria-label"],_=s["aria-live"],w=(0,tn.useMemo)((function(){return Mo(Mo({},Fa),c||{})}),[c]),E=(0,tn.useMemo)((function(){var e,n="";if(t&&w.onChange){var r=t.option,o=t.options,a=t.removedValue,s=t.removedValues,l=t.value,c=a||r||(e=l,Array.isArray(e)?null:e),d=c?u(c):"",p=o||s||void 0,m=p?p.map(u):[],h=Mo({isDisabled:c&&f(c,i),label:d,labels:m},t);n=w.onChange(h)}return n}),[t,w,f,i,u]),x=(0,tn.useMemo)((function(){var e="",t=n||r,o=!!(n&&i&&i.includes(n));if(t&&w.onFocus){var a={focused:t,label:u(t),isDisabled:f(t,i),isSelected:o,options:v,context:t===n?"menu":"value",selectValue:i};e=w.onFocus(a)}return e}),[n,r,u,f,w,v,i]),C=(0,tn.useMemo)((function(){var e="";if(h&&v.length&&w.onFilter){var t=g({count:o.length});e=w.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,h,w,v,g]),O=(0,tn.useMemo)((function(){var e="";if(w.guidance){var t=r?"value":h?"menu":"input";e=w.guidance({"aria-label":y,context:t,isDisabled:n&&f(n,i),isMulti:p,isSearchable:m,tabSelectsValue:b})}return e}),[y,n,r,p,f,m,h,w,i,b]),S="".concat(x," ").concat(C," ").concat(O),D=mo(tn.Fragment,null,mo("span",{id:"aria-selection"},E),mo("span",{id:"aria-context"},S)),k="initial-input-focus"===(null==t?void 0:t.action);return mo(tn.Fragment,null,mo(La,{id:l},k&&D),mo(La,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},a&&!k&&D))},Ha=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Ba=new RegExp("["+Ha.map((function(e){return e.letters})).join("")+"]","g"),Ua={},$a=0;$a<Ha.length;$a++)for(var za=Ha[$a],Wa=0;Wa<za.letters.length;Wa++)Ua[za.letters[Wa]]=za.base;var Ya=function(e){return e.replace(Ba,(function(e){return Ua[e]}))},Ga=function(e,t){var n;void 0===t&&(t=Ia);var r,o=[],a=!1;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return a&&n===this&&t(i,o)||(r=e.apply(this,i),a=!0,n=this,o=i),r}}(Ya),Xa=function(e){return e.replace(/^\s+|\s+$/g,"")},qa=function(e){return"".concat(e.label," ").concat(e.value)},Ka=["innerRef"];function Za(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=xo(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=xo(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(_o(e,Ka),"onExited","in","enter","exit","appear");return mo("input",Pn({ref:t},n,{css:ho({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ja=["boxSizing","height","overflow","paddingRight","position"],Qa={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ei(e){e.preventDefault()}function ti(e){e.stopPropagation()}function ni(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function ri(){return"ontouchstart"in window||navigator.maxTouchPoints}var oi=!("undefined"==typeof window||!window.document||!window.document.createElement),ai=0,ii={capture:!1,passive:!1},si=function(){return document.activeElement&&document.activeElement.blur()},li={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function ci(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,i=(0,tn.useRef)(!1),s=(0,tn.useRef)(!1),l=(0,tn.useRef)(0),c=(0,tn.useRef)(null),u=(0,tn.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,f=c.current,m=t>0,h=d-p-u,v=!1;h>t&&i.current&&(r&&r(e),i.current=!1),m&&s.current&&(a&&a(e),s.current=!1),m&&t>h?(n&&!i.current&&n(e),f.scrollTop=d,v=!0,i.current=!0):!m&&-t>u&&(o&&!s.current&&o(e),f.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,a]),d=(0,tn.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,tn.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,tn.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),m=(0,tn.useCallback)((function(e){if(e){var t=!!Jo&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),h=(0,tn.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,tn.useEffect)((function(){if(t){var e=c.current;return m(e),function(){h(e)}}}),[t,m,h]),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=(0,tn.useRef)({}),a=(0,tn.useRef)(null),i=(0,tn.useCallback)((function(e){if(oi){var t=document.body,n=t&&t.style;if(r&&Ja.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&ai<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,s=window.innerWidth-i+a||0;Object.keys(Qa).forEach((function(e){var t=Qa[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&ri()&&(t.addEventListener("touchmove",ei,ii),e&&(e.addEventListener("touchstart",ni,ii),e.addEventListener("touchmove",ti,ii))),ai+=1}}),[r]),s=(0,tn.useCallback)((function(e){if(oi){var t=document.body,n=t&&t.style;ai=Math.max(ai-1,0),r&&ai<1&&Ja.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&ri()&&(t.removeEventListener("touchmove",ei,ii),e&&(e.removeEventListener("touchstart",ni,ii),e.removeEventListener("touchmove",ti,ii)))}}),[r]);return(0,tn.useEffect)((function(){if(t){var e=a.current;return i(e),function(){s(e)}}}),[t,i,s]),function(e){a.current=e}}({isEnabled:n});return mo(tn.Fragment,null,n&&mo("div",{onClick:si,css:li}),t((function(e){o(e),a(e)})))}var ui={clearIndicator:wa,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,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):void 0,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:_a,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.value,r=e.theme,o=r.spacing,a=r.colors;return Mo({margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:a.neutral80,transform:n?"translateZ(0)":""},ka)},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:sa,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return To(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),To(t,"backgroundColor",i.neutral0),To(t,"borderRadius",o),To(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),To(t,"marginBottom",a.menuGutter),To(t,"marginTop",a.menuGutter),To(t,"position","absolute"),To(t,"width","100%"),To(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||void 0===o?"ellipsis":void 0,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:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:ia,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?void 0:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},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,gridArea:"1 / 1 / 2 / 3",marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,r=e.hasValue,o=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&r&&o?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},di={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}},pi={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Xo(),captureMenuScroll:!Xo(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Mo({ignoreCase:!0,ignoreAccents:!0,stringify:qa,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,s=n.matchFrom,l=i?Xa(t):t,c=i?Xa(a(e)):a(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=Ga(l),c=Ya(c)),"start"===s?c.substr(0,l.length)===l:c.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(e){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 fi(e,t,n,r){return{type:"option",data:t,isDisabled:yi(e,t,n),isSelected:_i(e,t,n),label:gi(e,t),value:bi(e,t),index:r}}function mi(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return fi(e,n,t,r)})).filter((function(t){return vi(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=fi(e,n,t,r);return vi(e,a)?a:void 0})).filter(Qo)}function hi(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Ma(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function vi(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,s=t.value;return(!Ei(e)||!a)&&wi(e,{label:i,value:s,data:o},r)}var gi=function(e,t){return e.getOptionLabel(t)},bi=function(e,t){return e.getOptionValue(t)};function yi(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function _i(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=bi(e,t);return n.some((function(t){return bi(e,t)===r}))}function wi(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Ei=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},xi=1,Ci=function(e){Ao(n,e);var t=Ro(n);function n(e){var r;return Oo(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!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,t,n){var o=r.props,a=o.closeMenuOnSelect,i=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),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 c=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:a});o?r.setValue([].concat(Ma(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=ea(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(ea(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=ea(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;n<e;n++)t[n]=arguments[n];return Ho.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return gi(r.props,e)},r.getOptionValue=function(e){return bi(r.props,e)},r.getStyles=function(e,t){var n=ui[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,Mo(Mo({},Pa),e.components);var e},r.buildCategorizedOptions=function(){return mi(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return hi(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:Mo({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&$o(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),a=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||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=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),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){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),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 Ei(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,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof u&&(u(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||!c||!d||!m||p&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(i)return;if(!c){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++xi),r.state.selectValue=Bo(e.value),r}return Do(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,n,r,o,a,i=this.props,s=i.isDisabled,l=i.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?Wo(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a<r.top&&Wo(t,Math.max(n.offsetTop-a,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-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&&o<a&&(i=o+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&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(di):Mo(Mo({},di),this.props.theme):di}},{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,c=i.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,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 yi(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return _i(this.props,e,t)}},{key:"filterOption",value:function(e,t){return wi(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,s=e.menuIsOpen,l=this.getComponents().Input,c=this.state,u=c.inputIsHidden,d=c.ariaSelection,p=this.commonProps,f=r||this.getElementId("input"),m=Mo(Mo(Mo({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},s&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?tn.createElement(l,Pn({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,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},m)):tn.createElement(Za,Pn({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Fo,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:i,value:""},m))}},{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,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,m=c.placeholder,h=this.state,v=h.selectValue,g=h.focusedValue,b=h.isFocused;if(!this.hasValue()||!u)return f?null:tn.createElement(s,Pn({},l,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return v.map((function(t,i){var s=t===g,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return tn.createElement(n,Pn({},l,{components:{Container:r,Label:o,Remove:a},isFocused:s,isDisabled:d,key:c,index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=v[0];return tn.createElement(i,Pn({},l,{data:y,isDisabled:d}),this.formatOptionLabel(y,"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 tn.createElement(e,Pn({},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;return e&&o?tn.createElement(e,Pn({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{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 tn.createElement(n,Pn({},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 tn.createElement(e,Pn({},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,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,m=p.inputValue,h=p.isLoading,v=p.loadingMessage,g=p.minMenuHeight,b=p.maxMenuHeight,y=p.menuIsOpen,_=p.menuPlacement,w=p.menuPosition,E=p.menuPortalTarget,x=p.menuShouldBlockScroll,C=p.menuShouldScrollIntoView,O=p.noOptionsMessage,S=p.onMenuScrollToTop,D=p.onMenuScrollToBottom;if(!y)return null;var k,A=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,s=t.label,l=t.value,p=d===o,f=a?void 0:function(){return e.onOptionHover(o)},m=a?void 0:function(){return e.selectOption(o)},h="".concat(e.getElementId("option"),"-").concat(n),v={id:h,onClick:m,onMouseMove:f,onMouseOver:f,tabIndex:-1};return tn.createElement(c,Pn({},u,{innerProps:v,data:o,isDisabled:a,isSelected:i,key:h,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())k=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,s="".concat(e.getElementId("group"),"-").concat(i),l="".concat(s,"-heading");return tn.createElement(n,Pn({},u,{key:s,data:o,options:a,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return A(e,"".concat(i,"-").concat(e.index))})))}if("option"===t.type)return A(t,"".concat(t.index))}));else if(h){var T=v({inputValue:m});if(null===T)return null;k=tn.createElement(s,u,T)}else{var P=O({inputValue:m});if(null===P)return null;k=tn.createElement(l,u,P)}var j={minMenuHeight:g,maxMenuHeight:b,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:C},M=tn.createElement(oa,Pn({},u,j),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,s=r.maxHeight;return tn.createElement(o,Pn({},u,j,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:h,placement:i}),tn.createElement(ci,{captureEnabled:f,onTopArrive:S,onBottomArrive:D,lockEnabled:x},(function(t){return tn.createElement(a,Pn({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:h,maxHeight:s,focusedOption:d}),k)})))}));return E||"fixed"===w?tn.createElement(i,Pn({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),M):M}},{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 s=i.map((function(t){return e.getOptionValue(t)})).join(n);return tn.createElement("input",{name:a,type:"hidden",value:s})}var l=i.length>0?i.map((function(t,n){return tn.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):tn.createElement("input",{name:a,type:"hidden"});return tn.createElement("div",null,l)}var c=i[0]?this.getOptionValue(i[0]):"";return tn.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,s=this.getFocusableOptions();return tn.createElement(Va,Pn({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:s}))}},{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,s=a.id,l=a.isDisabled,c=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return tn.createElement(r,Pn({},d,{className:i,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),tn.createElement(t,Pn({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),tn.createElement(o,Pn({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),tn.createElement(n,Pn({},d,{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=t.ariaSelection,i=t.isFocused,s=t.prevWasFocused,l=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,f=Bo(c),m={};if(n&&(c!==n.value||l!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var h=u?function(e,t){return hi(mi(e,t))}(e,f):[],v=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<t.length)return t[r]}return null}(t,f):null,g=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,h);m={selectValue:f,focusedOption:g,focusedValue:v,clearFocusValueOnUpdate:!1}}var b=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=a,_=i&&s;return i&&!_&&(y={value:ea(p,f,f[0]||null),options:f,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==a?void 0:a.action)&&(y=null),Mo(Mo(Mo({},m),b),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}]),n}(tn.Component);Ci.defaultProps=pi;var Oi=(0,tn.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,a=e.defaultValue,i=void 0===a?null:a,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,f=e.value,m=_o(e,ja),h=xo((0,tn.useState)(void 0!==s?s:n),2),v=h[0],g=h[1],b=xo((0,tn.useState)(void 0!==l?l:o),2),y=b[0],_=b[1],w=xo((0,tn.useState)(void 0!==f?f:i),2),E=w[0],x=w[1],C=(0,tn.useCallback)((function(e,t){"function"==typeof c&&c(e,t),x(e)}),[c]),O=(0,tn.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),g(void 0!==n?n:e)}),[u]),S=(0,tn.useCallback)((function(){"function"==typeof p&&p(),_(!0)}),[p]),D=(0,tn.useCallback)((function(){"function"==typeof d&&d(),_(!1)}),[d]),k=void 0!==s?s:v,A=void 0!==l?l:y,T=void 0!==f?f:E;return Mo(Mo({},m),{},{inputValue:k,menuIsOpen:A,onChange:C,onInputChange:O,onMenuClose:D,onMenuOpen:S,value:T})}(e);return tn.createElement(Ci,Pn({ref:t},n))})),Si=Oi,Di=(0,e.createElement)(Dn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Dn.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),ki=(0,e.createElement)(Dn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Dn.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const Ai={control:e=>({...e,height:30,minHeight:30}),dropdownIndicator:e=>({...e,padding:"0 4px 0 0"}),clearIndicator:e=>({...e,paddingTop:0,paddingBottom:0}),input:e=>({...e,paddingTop:0,paddingBottom:0}),singleValue:e=>({...e,marginLeft:0,marginRight:0}),menuPortal:e=>({...e,zIndex:300}),menu:e=>({...e,borderRadius:2,boxShadow:"none",border:"1px solid #ddd",marginTop:5,marginBottom:5,zIndex:300}),menuList:e=>({...e,padding:0,borderRadius:2}),option:(e,t)=>{let{isFocused:n}=t;return{...e,padding:"1px 8px",lineHeight:"28px",backgroundColor:n?"#ddd":"transparent",color:"unset"}},group:e=>({...e,paddingBottom:0}),groupHeading:e=>({...e,padding:"0 8px"})},Ti=()=>null,Pi=()=>(0,e.createElement)(f.Icon,{icon:Di,size:18}),ji=t=>(0,e.createElement)(Pa.DropdownIndicator,t,(0,e.createElement)(Pi,null)),Mi=t=>{const{data:n,isSelected:r}=t,{label:o,isPro:a}=n;return(0,e.createElement)(Pa.Option,t,(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__option_label"},o,a&&(0,e.createElement)("span",{className:"__pro_tag"})),r&&(0,e.createElement)(f.Icon,{icon:ki,className:"__icon"})))},Ni=t=>{let{value:n}=t;return(0,e.createElement)("span",{className:"__info"},"[",(0,p.sprintf)((0,p.__)("ID: %s","wc-ajax-product-filter"),n),"]")},Ii=t=>{const{data:n}=t,{label:r,isPro:o}=n;return(0,e.createElement)(Pa.SingleValue,t,r,o&&(0,e.createElement)("span",{className:"__pro_tag"}))},Ri=t=>t.data.proGroup?(0,e.createElement)(Pa.Group,Pn({},t,{className:"__pro_group"})):t.data.components?(0,e.createElement)(Pa.Group,Pn({},t,{className:"__form_components"})):(0,e.createElement)(Pa.Group,t),Li=t=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"__name"},t.label),(0,e.createElement)(Ni,{value:t.value})),Fi=t=>t.proGroup?(0,e.createElement)("span",{className:"__pro_heading_wrapper"},(0,e.createElement)("span",{className:"__pro_heading"},(0,p.__)("Pro","wc-ajax-product-filter"))):t.components?(0,e.createElement)("span",{className:"__form_components_divider"},(0,e.createElement)("span",{className:"__form_components_heading"},(0,p.__)("Components","wc-ajax-product-filter"))):(0,e.createElement)("span",null,t.label),Vi=t=>{let{inputId:n,placeholder:r,options:o,value:a,onChange:i,classes:s,isSearchable:l,portalTarget:c,maxMenuHeight:u,isDisabled:d}=t;return(0,e.createElement)(Si,{inputId:n,components:{IndicatorSeparator:Ti,DropdownIndicator:ji,Option:Mi,SingleValue:Ii,Group:Ri},formatGroupLabel:Fi,isSearchable:l,placeholder:r,noOptionsMessage:()=>(0,p.__)("No option found","wc-ajax-product-filter"),options:o,value:a,onChange:i,styles:Ai,className:s,isDisabled:d,menuPortalTarget:c,maxMenuHeight:u,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})})};var Hi=t=>{let n,{id:r,index:o="",label:a,description:i,placeholder:s,options:l,value:c,onChange:u,isSearchable:d=!1,renderAsFormField:p=!1,inputKey:f,portalTarget:m=!1,maxMenuHeight:h,isPro:v=!1,isDisabled:g=!1,tooltip:b}=t,y="__custom_react_select __single_select";r&&(y+=` ${r}`);const _=T(r,o);return n=p?(0,e.createElement)("div",{className:"__form_control react_select_simple"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:_},a,P(v))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Vi,{key:f,inputId:_,placeholder:s,options:l,value:c,classes:y,isSearchable:d,isDisabled:g,portalTarget:m,maxMenuHeight:h,onChange:e=>u(e,r,o)}),b&&(0,e.createElement)(gn,{content:b})))),i&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:i}})):(0,e.createElement)(Vi,{key:f,inputId:_,placeholder:s,options:l,value:c,classes:y,isDisabled:g,portalTarget:m,maxMenuHeight:h,onChange:e=>u(e),isSearchable:d}),n};const Bi=wcapf_admin_params.enable_primary_text_color,Ui=[];for(let e=1;e<=11;e++)Ui.push({label:(0,p.sprintf)((0,p.__)("Style %d","wc-ajax-product-filter"),e),value:"style-"+e});var $i=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r,handleTextFieldChange:o,handleSelectChange:a}=yn(t,n),{settings:{primary_color:i,primary_text_color:s,stylish_checkbox_radio:l,use_combobox:c,attach_combobox_on_sorting:u,improve_native_select:f,improve_scrollbar:m,improve_input_type_text_number:h,hierarchy_toggle_at_end:v,number_range_slider_style:g,star_icon_color:b,rating_star_use_fontawesome:y,remove_focus_style:_}}=t,w=(e,t)=>{o(e,t)},E=Ui.find((e=>g===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Hn,{label:(0,p.__)("Primary Color","wc-ajax-product-filter"),description:(0,p.__)("Set a primary color according to your theme. Default is #1C5DA1.","wc-ajax-product-filter"),value:i,onChange:e=>w(e,"primary_color"),renderAsFormField:!0}),Bi&&(0,e.createElement)(Hn,{label:(0,p.__)("Primary Text Color","wc-ajax-product-filter"),description:(0,p.__)("This color will be used over the primary color for the font color.","wc-ajax-product-filter"),value:s,onChange:e=>w(e,"primary_text_color"),renderAsFormField:!0}),(0,e.createElement)(bn,{id:"stylish_checkbox_radio",label:(0,p.__)("Stylish checkbox & radio buttons","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want stylish checkbox and radio buttons instead of native design.","wc-ajax-product-filter"),isChecked:l,onChange:r}),(0,e.createElement)(bn,{id:"use_combobox",label:(0,p.__)("Enable ComboBox","wc-ajax-product-filter"),description:(0,p.__)("Turns the native select element into a custom select box with improved design and behavior.","wc-ajax-product-filter"),isChecked:c,onChange:r}),"1"===c&&(0,e.createElement)(bn,{id:"attach_combobox_on_sorting",label:(0,p.__)("ComboBox for sorting dropdown","wc-ajax-product-filter"),description:(0,p.__)("Attach ComboBox for the default sorting dropdown instead of the native select element.","wc-ajax-product-filter"),isChecked:u,onChange:r}),"1"!==c&&(0,e.createElement)(bn,{id:"improve_native_select",label:(0,p.__)("Improve native select element","wc-ajax-product-filter"),description:(0,p.__)("Uncheck this if your theme already implements the design for the native select element.","wc-ajax-product-filter"),isChecked:f,onChange:r}),(0,e.createElement)(bn,{id:"improve_scrollbar",label:(0,p.__)("Improve scrollbar","wc-ajax-product-filter"),description:(0,p.__)("Enable this to improve the scrollbar that appears when max height is applied to a filter.","wc-ajax-product-filter"),isChecked:m,onChange:r}),(0,e.createElement)(bn,{id:"improve_input_type_text_number",label:(0,p.__)("Improve input type text/number","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want to use styles from your theme for input type text/number.","wc-ajax-product-filter"),isChecked:h,onChange:r}),(0,e.createElement)(bn,{id:"hierarchy_toggle_at_end",label:(0,p.__)("Hierarchy toggle at the end","wc-ajax-product-filter"),description:(0,p.__)("Uncheck this to show the hierarchy toggle just after the item label instead of at the end of the item.","wc-ajax-product-filter"),isChecked:v,onChange:r}),(0,e.createElement)(Hi,{id:"number_range_slider_style",label:(0,p.__)("Number range slider style","wc-ajax-product-filter"),description:(0,p.__)("Select the number range slider style from the available ones.","wc-ajax-product-filter"),value:E,onChange:a,options:Ui,maxMenuHeight:180,renderAsFormField:!0}),(0,e.createElement)(Hn,{label:(0,p.__)("Star Icon Color","wc-ajax-product-filter"),description:(0,p.__)("Set the star icon color for the rating filter(not applicable for display type: select, multiselect). Default is #FDA256.","wc-ajax-product-filter"),value:b,onChange:e=>w(e,"star_icon_color"),renderAsFormField:!0}),(0,e.createElement)(bn,{id:"rating_star_use_fontawesome",label:(0,p.__)("FontAwesome for star icons","wc-ajax-product-filter"),description:(0,p.__)("Enable this if your site loads the FontAwesome icons.","wc-ajax-product-filter"),isChecked:y,onChange:r}),(0,e.createElement)(bn,{id:"remove_focus_style",label:(0,p.__)("Remove focus style","wc-ajax-product-filter"),description:(0,p.__)("Enable this to remove the focus style from input(text) and dropdown elements.","wc-ajax-product-filter"),isChecked:_,onChange:r}))},zi=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r}=yn(t,n),{settings:{active_filters_on_top:o,enable_pagination_via_ajax:a,sorting_control:i,sorting_data_in_active_filters:s,use_term_slug:l,child_terms_only:c,vendor_support:u}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"active_filters_on_top",label:(0,p.__)("Active Filters on top of products","wc-ajax-product-filter"),description:(0,p.__)("Enable this to show the active filters on top of the products loop, only works in the standard shop loop.","wc-ajax-product-filter"),isChecked:o,onChange:r}),(0,e.createElement)(bn,{id:"enable_pagination_via_ajax",label:(0,p.__)("Pagination via Ajax","wc-ajax-product-filter"),description:(0,p.__)("Whether to enable Ajax to paginate the products. Only applicable when filtering via Ajax.","wc-ajax-product-filter"),isChecked:a,onChange:r}),(0,e.createElement)(bn,{id:"sorting_control",label:(0,p.__)("Product sorting via Ajax","wc-ajax-product-filter"),description:(0,p.__)("Whether to enable Ajax for the default product sorting dropdown. Only applicable when filtering via Ajax.","wc-ajax-product-filter"),isChecked:i,onChange:r}),(0,e.createElement)(bn,{id:"sorting_data_in_active_filters",label:(0,p.__)("Sorting data in Active Filters","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want to show the sort-by data that comes from the default product sorting dropdown in active filters.","wc-ajax-product-filter"),isChecked:s,onChange:r}),(0,e.createElement)(bn,{id:"use_term_slug",label:(0,p.__)("Use term slug","wc-ajax-product-filter"),description:(0,p.__)("Whether to use term slug instead of id as the option value.","wc-ajax-product-filter"),isChecked:l,onChange:r}),(0,e.createElement)(bn,{id:"child_terms_only",label:(0,p.__)("Child terms only","wc-ajax-product-filter"),description:(0,p.__)("Whether to show only the child terms when viewing a term archive page.","wc-ajax-product-filter"),isChecked:c,onChange:r,isPro:!0}),(0,e.createElement)(bn,{id:"vendor_support",label:(0,p.__)("Vendor support","wc-ajax-product-filter"),description:(0,p.__)("Enable this to show the store name as the option label in the post-author filter.","wc-ajax-product-filter"),isChecked:u,onChange:r,isPro:!0}))},Wi=window.wp.compose;const Yi=t=>{let{tabId:n,onClick:r,children:o,selected:a,...i}=t;return(0,e.createElement)(f.Button,Pn({role:"tab",tabIndex:a?null:-1,"aria-selected":a,id:n,onClick:r},i),o)};function Gi(n){var r;let{className:o,children:a,tabs:i,initialTabName:s,orientation:l="horizontal",activeClass:c="is-active",onSelect:u=t.noop,currentTab:d,onChangeTab:p}=n;const m=(0,Wi.useInstanceId)(Gi,"tab-panel"),h=e=>{p(e),u(e)},v=(0,t.find)(i,{name:d}),g=`${m}-${null!==(r=null==v?void 0:v.name)&&void 0!==r?r:"none"}`;return(0,e.useEffect)((()=>{if(!(0,t.find)(i,{name:d})){const e=s||(i.length>0?i[0].name:null);p(e)}}),[i]),(0,e.createElement)("div",{className:o},(0,e.createElement)(f.NavigableMenu,{role:"tablist",orientation:l,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},i.map((n=>(0,e.createElement)(Yi,{className:En()("components-tab-panel__tabs-item",n.className,{[c]:n.name===d}),tabId:`${m}-${n.name}`,"aria-controls":`${m}-${n.name}-view`,selected:n.name===d,key:n.name,onClick:(0,t.partial)(h,n.name)},n.title)))),v&&(0,e.createElement)("div",{key:g,"aria-labelledby":g,role:"tabpanel",id:`${g}-view`,className:"components-tab-panel__tab-content"},a(v)))}var Xi=t=>{let{label:n,id:r,index:o="",value:a,onChange:i,description:s,isPro:l,...c}=t;return(0,e.createElement)("div",{className:"__form_control number"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:T(r,o)},n,P(l))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Nn,Pn({id:r,index:o,value:a,onChange:i,renderAsFormField:!1,type:"number"},c))))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))};window.wp.mediaUtils;const qi=[{label:(0,p.__)("Results container","wc-ajax-product-filter"),value:"results"},{label:(0,p.__)("Custom element","wc-ajax-product-filter"),value:"custom"},{label:(0,p.__)("None","wc-ajax-product-filter"),value:"none"}],Ki=[{label:(0,p.__)("Desktop only","wc-ajax-product-filter"),value:"desktop"},{label:(0,p.__)("Mobile only","wc-ajax-product-filter"),value:"mobile"},{label:(0,p.__)("Desktop and mobile","wc-ajax-product-filter"),value:"both"}],Zi=[{label:(0,p.__)("After updating the results","wc-ajax-product-filter"),value:"after"},{label:(0,p.__)("Immediately","wc-ajax-product-filter"),value:"immediately"}];var Ji=()=>{const{state:t,dispatch:n}=d(),{handleSelectChange:r}=yn(t,n),{settings:{scroll_window:o,scroll_window_for:a,scroll_window_when:i}}=t,s=qi.find((e=>e.value===o)),l=Ki.find((e=>e.value===a)),c=Zi.find((e=>e.value===i));return(0,e.createElement)("div",{className:"__form_control __scroll_window_to"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:"scroll_window"},(0,p.__)("Scroll window to","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Hi,{id:"scroll_window",value:s,options:qi,onChange:e=>r(e,"scroll_window")}),"none"!==o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Hi,{id:"scroll_window_for",value:l,options:Ki,onChange:e=>r(e,"scroll_window_for")}),(0,e.createElement)(Hi,{id:"scroll_window_when",value:c,options:Zi,onChange:e=>r(e,"scroll_window_when")}))))),(0,e.createElement)("p",{className:"description"},(0,p.__)("Determines the scroll behavior.","wc-ajax-product-filter")))};const Qi=[{label:(0,p.__)("Overlay only","wc-ajax-product-filter"),value:"overlay"},{label:(0,p.__)("Overlay + Loading Icon","wc-ajax-product-filter"),value:"overlay-with-icon"}];let es;es=[{label:"Dual Ring",value:"Dual-Ring"},{label:"Eclipse",value:"Eclipse"},{label:"Gear",value:"Gear"},{label:"Reload",value:"Reload"},{label:"Ripple",value:"Ripple"},{label:"Rolling",value:"Rolling"},{label:"Spin",value:"Spin"},{label:"Spinner",value:"Spinner"}];const ts=[{label:(0,p.__)("All","wc-ajax-product-filter"),value:"all"},{label:(0,p.__)("Filter","wc-ajax-product-filter"),value:"filter"},{label:(0,p.__)("Paginate","wc-ajax-product-filter"),value:"paginate"}];var ns=()=>{const{state:t,dispatch:n}=d(),{handleSelectChange:r,handleCheckboxChange:o,handleTextFieldChange:a,handleImageChange:i,handleImageRemove:s}=yn(t,n),{settings:{disable_ajax:l,loading_animation:c,loading_icon:u,loading_image:m,loading_image_src:h,loading_image_size:v,loading_overlay_color:g,wait_cursor:b,scroll_to_top_offset:y,scroll_window:_,scroll_window_custom_element:w,scroll_on:E,disable_scroll_animation:x}}=t,C=Qi.find((e=>c===e.value));let O;return O=es.find((e=>e.value===u)),ts.find((e=>E===e.value)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tn,{message:(0,p.__)("There are settings available only in the Pro version.","wc-ajax-product-filter")}),"1"===l&&(0,e.createElement)(f.Notice,{status:"info",className:"ajax-disabled-info",isDismissible:!1},(0,p.__)("These settings are applicable when filtering via ajax.","wc-ajax-product-filter")),(0,e.createElement)(Hi,{id:"loading_animation",label:(0,p.__)("Loading Animation","wc-ajax-product-filter"),description:(0,p.__)("Whether to show an animation while the results are fetching.","wc-ajax-product-filter"),value:C,options:Qi,onChange:r,renderAsFormField:!0}),"overlay-with-icon"===c&&(0,e.createElement)(Hi,{id:"loading_icon",label:(0,p.__)("Loading Icon","wc-ajax-product-filter"),description:(0,p.__)("Select the loading icon from the available icons.","wc-ajax-product-filter"),value:O,options:es,onChange:r,renderAsFormField:!0}),!1,"overlay-with-icon"===c&&(0,e.createElement)(Xi,{id:"loading_image_size",label:(0,p.__)("Icon Size","wc-ajax-product-filter"),description:(0,p.__)("Adjust the loading icon size in px. Default is 60.","wc-ajax-product-filter"),value:v,onChange:a,type:"number"}),!1,"none"!==c&&(0,e.createElement)(bn,{id:"wait_cursor",label:(0,p.__)("Wait Cursor","wc-ajax-product-filter"),description:(0,p.__)("Enable this to show a wait cursor while the results are fetching.","wc-ajax-product-filter"),isChecked:b,onChange:o}),(0,e.createElement)(Ji,null),"custom"===_&&(0,e.createElement)(Nn,{id:"scroll_window_custom_element",label:(0,p.__)("Custom element identifier","wc-ajax-product-filter"),description:(0,p.__)("Give a valid id/class of the HTML element you want to scroll to.","wc-ajax-product-filter"),value:w,onChange:a,placeholder:"#id or .class"}),"none"!==_&&(0,e.createElement)(e.Fragment,null,!1,(0,e.createElement)(Xi,{id:"scroll_to_top_offset",label:(0,p.__)("Scroll to top offset","wc-ajax-product-filter"),description:(0,p.__)("If you have a sticky header or some space that you want to include in the viewport then give the height of those in px.","wc-ajax-product-filter"),value:y,onChange:a,type:"number"}),!1))};function rs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function os(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 as(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?os(Object(n),!0).forEach((function(t){rs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):os(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function is(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ls(e,t){if(e){if("string"==typeof e)return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ss(e,t):void 0}}function cs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||ls(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function us(e){return us="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},us(e)}function ds(e){var t=function(e,t){if("object"!==us(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==us(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===us(t)?t:String(t)}function ps(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}var fs=window.regeneratorRuntime,ms=n.n(fs),hs=setTimeout;function vs(e,t){var n=t.useCachedSetTimeout?hs:setTimeout;return new Promise((function(t){n(t,e)}))}var gs=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.useCachedSetTimeout,r=vs(e,{useCachedSetTimeout:n});function o(e){return r.then((function(){return e}))}return o.then=function(){return r.then.apply(r,arguments)},o.catch=Promise.resolve().catch,o};function bs(){var e=(0,tn.useRef)(!1);return(0,tn.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var ys=function(e,t,n){return e-t-10<n};function _s(e){return function(e){if(Array.isArray(e))return ss(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ls(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ws=function(e,t){return[].concat(_s(e),_s(t))},Es='[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.',xs=function(e,t){if(!t)throw e.error(Es,"Received:",t),new Error(Es);if(!Array.isArray(t.options))throw e.error(Es,"Received:",t),new Error(Es)},Cs=function(e){var t=e.options,n=e.defaultOptions,r=e.additional,o=e.defaultAdditional,a=!0===n?null:n instanceof Array?n:t;return a?{"":{isFirstLoad:!1,isLoading:!1,options:a,hasMore:!0,additional:o||r}}:{}},Os=function(e){return{isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,additional:e.additional}},Ss=function(){var e,t=(e=ms().mark((function e(t,n,r,o,a,i,s,l){var c,u,d,p,f,m,h,v,g,b,y;return ms().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=n.current.inputValue,u=!r.current[c],!(d=u?Os(n.current):r.current[c]).isLoading&&d.hasMore){e.next=5;break}return e.abrupt("return");case 5:if(i((function(e){return as(as({},e),{},rs({},c,as(as({},d),{},{isLoading:!0})))})),!(o>0&&"input-change"===t)){e.next=13;break}return e.next=9,a(o);case 9:if(p=n.current.inputValue,c===p){e.next=13;break}return i((function(e){return u?(e[c],is(e,[c].map(ds))):as(as({},e),{},rs({},c,as(as({},d),{},{isLoading:!1})))})),e.abrupt("return");case 13:return e.prev=13,h=n.current.loadOptions,e.next=17,h(c,d.options,d.additional);case 17:f=e.sent,m=!1,e.next=24;break;case 21:e.prev=21,e.t0=e.catch(13),m=!0;case 24:if(!m){e.next=27;break}return i((function(e){return as(as({},e),{},rs({},c,as(as({},d),{},{isLoading:!1})))})),e.abrupt("return");case 27:s(console,f),g=(v=f).options,b=v.hasMore,y=f.hasOwnProperty("additional")?f.additional:d.additional,i((function(e){return as(as({},e),{},rs({},c,as(as({},d),{},{options:l(d.options,g,y),hasMore:!!b,isLoading:!1,isFirstLoad:!1,additional:y})))}));case 31:case"end":return e.stop()}}),e,null,[[13,21]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){ps(a,r,o,i,s,"next",e)}function s(e){ps(a,r,o,i,s,"throw",e)}i(void 0)}))});return function(_x,e,n,r,o,a,i,s){return t.apply(this,arguments)}}(),Ds=function(e){return e+1},ks=function(e,t,n,r,o,a,i,s){var l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],c=s.defaultOptions,u=s.loadOptionsOnMenuOpen,d=void 0===u||u,p=s.debounceTimeout,f=void 0===p?0:p,m=s.inputValue,h=s.menuIsOpen,v=s.filterOption,g=void 0===v?null:v,b=s.reduceOptions,y=void 0===b?ws:b,_=s.shouldLoadMore,w=void 0===_?ys:_,E=bs(),x=e(!0),C=e(s);C.current=s;var O=t(0)[1],S=e(null);null===S.current&&(S.current=a(s));var D=r((function(e){i(e,C,S,f,gs,(function(e){S.current=e(S.current),E.current&&O(Ds)}),o,y)}),[f]),k=r((function(){var e=C.current.inputValue;S.current[e]&&D("menu-scroll")}),[D]);n((function(){x.current?x.current=!1:(S.current={},O(Ds)),!0===c&&D("autoload")}),l),n((function(){h&&!S.current[m]&&D("input-change")}),[m]),n((function(){h&&!S.current[""]&&d&&D("menu-toggle")}),[h]);var A=S.current[m]||Os(s);return{handleScrolledToBottom:k,shouldLoadMore:w,filterOption:g,isLoading:A.isLoading,isFirstLoad:A.isFirstLoad,options:A.options}},As=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return ks(tn.useRef,tn.useState,tn.useEffect,tn.useCallback,xs,Cs,Ss,e,t)},Ts=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=r.inputValue,i=r.menuIsOpen,s=r.defaultInputValue,l=r.defaultMenuIsOpen,c=r.onInputChange,u=r.onMenuClose,d=r.onMenuOpen,p=e(s||""),f=cs(p,2),m=f[0],h=f[1],v=e(!!l),g=cs(v,2),b=g[0],y=g[1],_="string"==typeof a?a:m,w="boolean"==typeof i?i:b,E=t((function(e,t){c&&c(e,t),h(e)}),[c]),x=t((function(){u&&u(),y(!1)}),[u]),C=t((function(){d&&d(),y(!0)}),[d]),O=n(as(as({},r),{},{inputValue:_,menuIsOpen:w}),o);return as(as({},O),{},{inputValue:_,menuIsOpen:w,onInputChange:E,onMenuClose:x,onMenuOpen:C})},Ps=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Ts(tn.useState,tn.useCallback,As,e,t)},js=n(601),Ms=n(893),Ns=function(e){function t(t){var n=t.selectProps,r=n.handleScrolledToBottom,o=n.shouldLoadMore,a=t.innerRef,i=t.useEffect,s=t.useRef,l=t.useCallback,c=t.setTimeout,u=t.clearTimeout,d=s(null),p=s(null),f=l((function(){var e=p.current;if(!e)return!1;var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return o(n,r,t)}),[o]),m=l((function(){f()&&r&&r()}),[f,r]),h=l((function(){m(),d.current=c(h,300)}),[m]);return i((function(){return h(),function(){d.current&&u(d.current)}}),[]),(0,Ms.jsx)(e,as(as({},t),{},{innerRef:(0,js.Z)(a,p)}))}return t.defaultProps={useEffect:tn.useEffect,useRef:tn.useRef,useCallback:tn.useCallback,setTimeout:setTimeout,clearTimeout:clearTimeout},t}(Pa.MenuList),Is=function(e){return function(e,t){return e((function(){return as({MenuList:Ns},t)}),[t])}(tn.useMemo,e)},Rs=["components","selectRef","isLoading","useComponents","useAsyncPaginate","cacheUniqs"],Ls=function(e){function t(t){var n=t.components,r=t.selectRef,o=t.isLoading,a=t.useComponents,i=t.useAsyncPaginate,s=t.cacheUniqs,l=i(is(t,Rs),s),c=a(n),u="boolean"==typeof o?o:l.isLoading;return(0,Ms.jsx)(e,as(as(as({},t),l),{},{isLoading:u,components:c,ref:r}))}return t.defaultProps={selectRef:null,cacheUniqs:[],components:{},useComponents:Is,useAsyncPaginate:Ps},t}(Si),Fs=t=>{let{label:n,id:r,index:o="",description:a,value:i,onChange:s,taxonomy:l,onlyParent:c=!1,isMultiple:u=!1,type:d="taxonomy",isUserRoles:m=!1,options:h,showIncludeChildren:v=!1,checkboxId:g,checkIsChecked:b,onCheckChange:y,renderAsFormField:_=!0,inputKey:w,inputPlaceholder:E,inputNoOptionsMessage:x,maxMenuHeight:C}=t;const O=async(e,t,n)=>{let r,{page:o}=n;r="author"===d?{action:"wcapf_get_authors_for_dropdown",keyword:e,page:o}:"page"===d?{action:"wcapf_get_pages_for_dropdown",keyword:e,page:o}:"product"===d?{action:"wcapf_get_products_for_dropdown",keyword:e,page:o}:{action:"wcapf_get_terms_for_dropdown",taxonomy:l,only_parent:c,keyword:e,page:o},r.nonce=k();try{const e=(await X().get(wcapf_admin_params.ajaxurl,{params:r})).data.data;return{options:e,hasMore:e.length>=1,additional:{page:o+1}}}catch(e){console.log(e)}};let S,D,A;S=u?`__custom_react_select full-width ${r}`:`__custom_react_select fixed-width ${r}`,"author"===d?m?(D=(0,p.__)("Start typing to find the role","wc-ajax-product-filter"),A=(0,p.__)("No roles found","wc-ajax-product-filter")):(D=(0,p.__)("Start typing to find the author","wc-ajax-product-filter"),A=(0,p.__)("No authors found","wc-ajax-product-filter")):(D=(0,p.__)("Start typing to find the term","wc-ajax-product-filter"),A=(0,p.__)("No terms found","wc-ajax-product-filter")),E&&(D=E),x&&(A=x);const P=(0,p.__)("Loading...","wc-ajax-product-filter"),j=T(r,o),M=()=>m?(0,e.createElement)(Si,{inputId:j,value:i,options:h,placeholder:D,noOptionsMessage:()=>A,loadingMessage:()=>P,formatOptionLabel:Li,isMulti:u,maxMenuHeight:C,closeMenuOnSelect:!u,onChange:e=>s(e,r,o),isClearable:!0,className:S,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})}):(0,e.createElement)(Ls,{key:w,inputId:j,value:i,loadOptions:O,additional:{page:1},placeholder:D,noOptionsMessage:()=>A,loadingMessage:()=>P,formatOptionLabel:Li,isMulti:u,maxMenuHeight:C,closeMenuOnSelect:!u,onChange:e=>s(e,r,o),isClearable:!0,className:S,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})});return _?(0,e.createElement)("div",{className:"__form_control react_select"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:j},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},M(),v&&(()=>{let t;return t="direct_child_only"===g?(0,p.__)("Direct child only","wc-ajax-product-filter"):(0,p.__)("Include children","wc-ajax-product-filter"),(0,e.createElement)(f.CheckboxControl,{label:t,className:"__include_child_terms",checked:b,onChange:e=>y(e,g,o)})})()))),a&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:a}})):M()},Vs=t=>{let{label:n,id:r,index:o="",value:a,onChange:i,description:s,...l}=t;const c=T(r,o);return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:c},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)("textarea",Pn({className:"components-textarea-control__input",id:c,value:a,onChange:e=>i(e.target.value,r,o)},l))))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))};const Hs=wcapf_admin_params.user_roles;var Bs=()=>{const{state:t,dispatch:n}=d(),{handleTextFieldChange:r,handleCheckboxChange:o,handleAuthorRolesChange:a}=yn(t,n),{settings:{keyword_filter_placeholder:i,keyword_filter_prefix:s,search_field_default_placeholder:l,no_results_text:c,combobox_no_options_text:u,empty_filter_text:f,show_more_btn_label:m,show_less_btn_label:h,clear_button_label:v,clear_all_button_label:g,reset_button_label:b,results_count_markup:y,sort_by_prefix:_,per_page_prefix:w,input_delay:E,pagination_container:x,more_selectors:C,custom_scripts:O,author_roles:S,multiple_form_locations:D}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tn,{message:(0,p.__)("There are settings available only in the Pro version.","wc-ajax-product-filter")}),(0,e.createElement)("h4",{className:"__section_heading"},(0,p.__)("Phrases","wc-ajax-product-filter")),(0,e.createElement)("p",{className:"__description"},(0,p.__)("Here you can change the phrases shown in the front end. Leave empty to use the default.","wc-ajax-product-filter")),(0,e.createElement)(Nn,{id:"keyword_filter_placeholder",label:(0,p.__)("Keyword filter placeholder","wc-ajax-product-filter"),value:i,onChange:r}),(0,e.createElement)(Nn,{id:"keyword_filter_prefix",label:(0,p.__)("Keyword filter prefix","wc-ajax-product-filter"),value:s,onChange:r}),(0,e.createElement)(Nn,{id:"search_field_default_placeholder",label:(0,p.__)("Search field placeholder","wc-ajax-product-filter"),value:l,onChange:r}),(0,e.createElement)(Nn,{id:"no_results_text",label:(0,p.__)("No results text","wc-ajax-product-filter"),value:c,onChange:r}),(0,e.createElement)(Nn,{id:"combobox_no_options_text",label:(0,p.__)("No options text","wc-ajax-product-filter"),value:u,onChange:r}),(0,e.createElement)(Nn,{id:"empty_filter_text",label:(0,p.__)("Empty filter text","wc-ajax-product-filter"),value:f,onChange:r}),(0,e.createElement)(Nn,{id:"show_more_btn_label",label:(0,p.__)("Show more button label","wc-ajax-product-filter"),value:m,onChange:r}),(0,e.createElement)(Nn,{id:"show_less_btn_label",label:(0,p.__)("Show less button label","wc-ajax-product-filter"),value:h,onChange:r}),!1,(0,e.createElement)(Nn,{id:"clear_all_button_label",label:(0,p.__)("Clear All button label","wc-ajax-product-filter"),value:g,onChange:r}),(0,e.createElement)(Nn,{id:"reset_button_label",label:(0,p.__)("Reset button label","wc-ajax-product-filter"),value:b,onChange:r}),!1,(0,e.createElement)(Nn,{id:"sort_by_prefix",label:(0,p.__)("Sort by prefix","wc-ajax-product-filter"),value:_,onChange:r}),!1,(0,e.createElement)("div",{className:"__form_fields_separator"}),(0,e.createElement)(Xi,{id:"input_delay",label:(0,p.__)("Input Delay","wc-ajax-product-filter"),description:(0,p.__)("Specify the delay (in milliseconds) before triggering the filter action when the user interacts with the input fields. Default is 300.","wc-ajax-product-filter"),value:E,onChange:r,type:"number",min:0}),(0,e.createElement)(Nn,{id:"pagination_container",label:(0,p.__)("Pagination container","wc-ajax-product-filter"),description:(0,p.__)("The css class of the pagination element, supports multiple classes separated by commas. In most cases, you don't need to change this. Applicable when filtering via Ajax.","wc-ajax-product-filter"),value:x,onChange:r}),!1,(0,e.createElement)(Vs,{id:"custom_scripts",label:(0,p.__)("JavaScript after Ajax update","wc-ajax-product-filter"),description:(0,p.__)("You may want to run javascript codes after updating the shop loop via Ajax. Leave it empty if you don't understand.","wc-ajax-product-filter\t"),value:O,onChange:r,rows:3}),(0,e.createElement)(Fs,{id:"author_roles",label:(0,p.__)("Author Roles","wc-ajax-product-filter"),description:(0,p.__)("Users having any of these roles will be available on the <b>Available Options</b> modal of the post-author filter.","wc-ajax-product-filter"),isMultiple:!0,value:S,onChange:a,type:"author",isUserRoles:!0,options:Hs,maxMenuHeight:100}),!1)};const Us=A();var $s=t=>{let{isOpen:n,closeModal:r}=t;return n&&(0,e.createElement)(f.Modal,{onRequestClose:r,__experimentalHideHeader:!0,className:"__pro_update_modal"},(0,e.createElement)("h3",null,"WCAPF - WooCommerce Ajax Product Filter Pro (Update Required)"),(0,e.createElement)("div",{className:"__separator"}),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:Us}}),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(f.Button,{variant:"secondary",onClick:r},(0,p.__)("Cancel","wc-ajax-product-filter"))))};const zs=[{name:"general",title:(0,p.__)("General","wc-ajax-product-filter")},{name:"integration",title:(0,p.__)("Integration","wc-ajax-product-filter")},{name:"appearance",title:(0,p.__)("Appearance","wc-ajax-product-filter")},{name:"loader-scrollTo",title:(0,p.__)("Loader & Scroll To","wc-ajax-product-filter")},{name:"filter-keys",title:(0,p.__)("Filter Keys","wc-ajax-product-filter")},{name:"others",title:(0,p.__)("Others","wc-ajax-product-filter")},{name:"miscellaneous",title:(0,p.__)("Miscellaneous","wc-ajax-product-filter")}];var Ws=()=>{const{state:n,dispatch:o}=d(),{isDirty:a,currentTab:i,settings:s,globalFilterKeys:l,filterKeysChanged:c}=n,[u,m]=(0,e.useState)(!1),[v,g]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{a&&(K(Z),K(J))}),[a]),(0,e.createElement)("div",{className:"__wcapf_admin"},(0,e.createElement)($,{view:"settings"}),(0,e.createElement)($s,{isOpen:v,closeModal:()=>{g(!1)}}),(0,e.createElement)("div",{className:"__wcapf_layout"},(0,e.createElement)("div",{className:"__main"},(0,e.createElement)("div",{className:"__content"},(0,e.createElement)("div",{className:"__settings_wrapper"},(0,e.createElement)("div",{className:"__settings_header"},(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:_}),(0,p.__)("Settings","wc-ajax-product-filter")),(0,e.createElement)(f.Button,{variant:a?"primary":"secondary",disabled:!a||u,isBusy:u,onClick:()=>{if(A())return void g(!0);const{isValid:e,validatedFilterKeys:n}=(()=>{o({type:"SET_ERROR",payload:""});const e=[];let n=!0;return l.forEach(((r,o)=>{const a=l.filter(((e,t)=>o!==t)),i=(0,t.omit)(r,["field_key_error","field_key_error_"]),{field_key:s}=i;s&&(0,t.find)(a,{field_key:s})&&(i.field_key_error=D,n=!1),e.push(i)})),o({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:e}),n||(o({type:"SET_ERROR",payload:S}),"filter-keys"!==i&&o({type:"SET_CURRENT_TAB",payload:"filter-keys"})),{isValid:n,validatedFilterKeys:e}})(),a=c?"1":"";if(!e)return;m(!0);const u=new FormData;u.append("action","wcapf_save_settings"),u.append("nonce",k()),u.append("settings",JSON.stringify((()=>{const e=[];"disable"===s.remove_empty&&e.push("remove_empty"),"none"===s.loading_animation&&e.push("loading_animation"),"custom"===s.loading_icon&&e.push("loading_icon");const n=(0,t.pick)(r(),e),o={...s,...n};return(0,t.omit)(o,["remove_empty_filters","child_terms_only","slide_out_panel_position","loading_image","loading_image_src","loading_overlay_color","scroll_on","disable_scroll_animation","more_selectors","multiple_form_locations","filter_keys_order"])})())),u.append("filter_keys",JSON.stringify(n)),u.append("update_filter_keys",a),X().post(wcapf_admin_params.ajaxurl,u).then((e=>{m(!1);const{data:{data:n,success:r}}=e;if(r)o({type:"UPDATE_SETTINGS",payload:n.settings}),o({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:n.global_filter_keys}),o({type:"SET_DIRTY",payload:!1}),wcapf_admin_params.dirty=!1,o({type:"SET_FILTER_KEYS_CHANGED",payload:!1}),function(e){q(e,Z,"👌")}((0,p.__)("Settings saved successfully","wc-ajax-product-filter"));else if(n.errors){o({type:"SET_ERROR",payload:S});const e=n.errors;console.log(e);const r=l.map(((n,r)=>{const o=(0,t.find)(e,{order:r});if(o){const{key:e,message:t}=o;return{...n,[e]:t,field_key_error:""}}return{...n,field_key_error:""}}));o({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:r}),"filter-keys"!==i&&o({type:"SET_CURRENT_TAB",payload:"filter-keys"})}else Q(n)})).catch((e=>{m(!1),Q(e.message)}))}},(0,e.createElement)(w,{icon:h}),(0,p.__)("Save","wc-ajax-product-filter"))),(0,e.createElement)(Gi,{currentTab:i,onChangeTab:e=>{o({type:"SET_CURRENT_TAB",payload:e})},className:"__tab_panel __settings_tab",activeClass:"active-tab",tabs:zs},(t=>{let{name:n}=t;return"general"===n?(0,e.createElement)(Sn,null):"integration"===n?(0,e.createElement)(zi,null):"appearance"===n?(0,e.createElement)($i,null):"loader-scrollTo"===n?(0,e.createElement)(ns,null):"filter-keys"===n?(0,e.createElement)(Ln,null):"others"===n?(0,e.createElement)(Bs,null):"miscellaneous"===n?(0,e.createElement)(Fn,null):void 0})))),(0,e.createElement)(O,null)),(0,e.createElement)(Y,null)))};const Ys=()=>(0,e.createElement)(u,null,(0,e.createElement)(Ws,null));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("wcapf-settings-admin-ui");t&&(0,e.render)((0,e.createElement)(e.StrictMode,null,(0,e.createElement)(Ys,null)),t)}))}()}();
     1!function(){var e={601:function(e,t){"use strict";t.Z=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return r(e[0],e[1])||null;var n=e.slice(1).reduce((function(e,t){return r(e,t)}),e[0]);return n||null};var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var i=r.get(t)||function(n){o(e,n),o(t,n)};return r.set(t,i),i}return e||t}function o(e,t){"function"==typeof e?e(t):e.current=t}},669:function(e,t,n){e.exports=n(609)},448:function(e,t,n){"use strict";var r=n(867),o=n(26),i=n(372),a=n(327),s=n(97),l=n(109),c=n(985),u=n(874),d=n(648),p=n(644),f=n(205);e.exports=function(e){return new Promise((function(t,n){var h,m=e.data,v=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete v["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(_+":"+w)}var E=s(e.baseURL,e.url);function x(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,i={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};o((function(e){t(e),b()}),(function(e){n(e),b()}),i),y=null}}if(y.open(e.method.toUpperCase(),a(E,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(n(new d("Request aborted",d.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,y)),y=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(E))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;C&&(v[e.xsrfHeaderName]=C)}"setRequestHeader"in y&&r.forEach(v,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete v[t]:y.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(n(!e||e&&e.type?new p:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null);var O=f(E);O&&-1===["http","https","file"].indexOf(O)?n(new d("Unsupported protocol "+O+":",d.ERR_BAD_REQUEST,e)):y.send(m)}))}},609:function(e,t,n){"use strict";var r=n(867),o=n(849),i=n(321),a=n(185),s=function e(t){var n=new i(t),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(546));s.Axios=i,s.CanceledError=n(644),s.CancelToken=n(972),s.isCancel=n(502),s.VERSION=n(288).version,s.toFormData=n(675),s.AxiosError=n(648),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(713),s.isAxiosError=n(268),e.exports=s,e.exports.default=s},972:function(e,t,n){"use strict";var r=n(644);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},644:function(e,t,n){"use strict";var r=n(648);function o(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(867).inherits(o,r,{__CANCEL__:!0}),e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(867),o=n(327),i=n(782),a=n(572),s=n(185),l=n(97),c=n(875),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new i,response:new i}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(l),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var p=t;r.length;){var f=r.shift(),h=r.shift();try{p=f(p)}catch(e){h(e);break}}try{i=a(p)}catch(e){return Promise.reject(e)}for(;l.length;)i=i.then(l.shift(),l.shift());return i},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(s(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},648:function(e,t,n){"use strict";var r=n(867);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,n,a,s,l){var c=Object.create(i);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),o.call(c,e.message,t,n,a,s),c.name=e.name,l&&Object.assign(c,l),c},e.exports=o},782:function(e,t,n){"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:function(e,t,n){"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},572:function(e,t,n){"use strict";var r=n(867),o=n(527),i=n(502),a=n(546),s=n(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},185:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,o=t(e);r.isUndefined(o)&&t!==l||(n[e]=o)})),n}},26:function(e,t,n){"use strict";var r=n(648);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},527:function(e,t,n){"use strict";var r=n(867),o=n(546);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},546:function(e,t,n){"use strict";var r=n(867),o=n(16),i=n(648),a=n(874),s=n(675),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(448)),u),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=r.isObject(e),a=t&&t["Content-Type"];if((n=r.isFileList(e))||i&&"multipart/form-data"===a){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return i||"application/json"===a?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i.from(e,i.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){d.headers[e]=r.merge(l)})),e.exports=d},874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:function(e){e.exports={version:"0.27.2"}},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},327:function(e,t,n){"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},268:function(e,t,n){"use strict";var r=n(867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},985:function(e,t,n){"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},623:function(e){e.exports=null},109:function(e,t,n){"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},205:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},675:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,a){if(r.isPlainObject(i)||r.isArray(i)){if(-1!==n.indexOf(i))throw Error("Circular reference detected in "+a);n.push(i),r.forEach(i,(function(n,i){if(!r.isUndefined(n)){var s,l=a?a+"."+i:i;if(n&&!a&&"object"==typeof n)if(r.endsWith(i,"{}"))n=JSON.stringify(n);else if(r.endsWith(i,"[]")&&(s=r.toArray(n)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(l,o(e))}));e(n,l)}})),n.pop()}else t.append(a,o(i))}(e),t}},875:function(e,t,n){"use strict";var r=n(288).version,o=n(648),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],s=t[a];if(s){var l=e[a],c=void 0===l||s(l,a,e);if(!0!==c)throw new o("option "+a+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:i}},867:function(e,t,n){"use strict";var r,o=n(849),i=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=i.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var u=s("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=s("Date"),h=s("File"),m=s("Blob"),v=s("FileList");function g(e){return"[object Function]"===i.call(e)}var b=s("URLSearchParams");function y(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var _,w=(_="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return _&&e instanceof _});e.exports={isArray:l,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||i.call(e)===t||g(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:p,isUndefined:c,isDate:f,isFile:h,isBlob:m,isFunction:g,isStream:function(e){return d(e)&&g(e.pipe)},isURLSearchParams:b,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)y(arguments[r],n);return t},extend:function(e,t,n){return y(t,(function(t,r){e[r]=n&&"function"==typeof t?o(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,o,i,a={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=r[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:v}},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},679:function(e,t,n){"use strict";var r=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v<a.length;++v){var g=a[v];if(!(i[g]||r&&r[g]||m&&m[g]||s&&s[g])){var b=p(n,g);try{c(t,g,b)}catch(e){}}}}return t}},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,l=o(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(l[u]=a[u]);if(t){s=t(a);for(var d=0;d<s.length;d++)r.call(a,s[d])&&(l[s[d]]=a[s[d]])}}return l}},921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case m:case l:return e;default:return t}}case o:return t}}}function E(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||w(e)===u},t.isConcurrentMode=E,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===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===_||e.$$typeof===g)},t.typeOf=w},864:function(e,t,n){"use strict";e.exports=n(921)},941:function(e,t,n){var r=n(474),o=n(184),i=n(196),a=n(177);function s(e){return e&&e.__esModule?e.default:e}function l(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const r=e.children[n]||null;e.insertBefore(t,r)}(e.parentElement,e.element,e.oldIndex)}))}function p(e,t){const n=m(e),r={parentElement:e.from};let o=[];switch(n){case"normal":o=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":o=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...r},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...r}];break;case"multidrag":o=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...r})))}const i=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(o,t);return i}function f(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function h(e,t,n,r){const o=[...t];return e.forEach((e=>{const t=r&&n&&r(e.item,n);o.splice(e.newIndex,0,t||e.item)})),o}function m(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}l(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),l(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),l(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),l(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),l(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),l(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),l(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),l(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),l(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),l(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),l(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),l(e.exports,"ReactSortable",(()=>g));const v={dragging:null};class g extends i.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,i.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,v),s(a)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();s(r).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:r}=this.props,o={style:t,className:n,id:r},a=e&&null!==e?e:"div";return(0,i.createElement)(a,{ref:this.ref,...o},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:a="sortable-drag",fallbackClass:l="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const f=t||"data-id";return i.Children.map(e,((e,t)=>{if(void 0===e)return;const a=p[t]||{},{className:l}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!a.filtered},u=s(o)(l,{[n]:a.selected,[r]:a.chosen,...c});return(0,i.cloneElement)(e,{[f]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:r,tag:o,style:i,className:a,clone:s,onAdd:l,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:f,onRemove:h,onSort:m,onStart:v,onUnchoose:g,onUpdate:b,onMove:y,onSpill:_,onSelect:w,onDeselect:E,...x}=e;return x}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;const o=n(e,t,this.sortable,v);return void 0!==o&&o}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,v)}onAdd(e){const{list:t,setList:n,clone:r}=this.props,o=p(e,[...v.dragging.props.list]);u(o),n(h(o,t,e,r).map((e=>Object.assign(e,{selected:!1}))),this.sortable,v)}onRemove(e){const{list:t,setList:n}=this.props,r=m(e),o=p(e,t);d(o);let i=[...t];if("clone"!==e.pullMode)i=f(o,i);else{let t=o;switch(r){case"multidrag":t=o.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=o.map((t=>({...t,element:e.clone})));break;default:s(a)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}u(t),o.forEach((t=>{const n=t.oldIndex,r=this.props.clone(t.item,e);i.splice(n,1,r)}))}i=i.map((e=>Object.assign(e,{selected:!1}))),n(i,this.sortable,v)}onUpdate(e){const{list:t,setList:n}=this.props,r=p(e,t);return u(r),d(r),n(function(e,t){return h(e,f(e,t))}(r,t),this.sortable,v)}onStart(){v.dragging=this}onEnd(){v.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r})),this.sortable,v)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r})),this.sortable,v)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);r[n].selected=!0})),n(r,this.sortable,v)}onDeselect(e){const{list:t,setList:n}=this.props,r=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(r[t].selected=!0)})),n(r,this.sortable,v)}}var b,y;b=e.exports,y={},Object.keys(y).forEach((function(e){"default"===e||"__esModule"===e||b.hasOwnProperty(e)||Object.defineProperty(b,e,{enumerable:!0,get:function(){return y[e]}})}))},251:function(e,t,n){"use strict";n(418);var r=n(196),o=60103;if("function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}},893:function(e,t,n){"use strict";e.exports=n(251)},474:function(e,t,n){"use strict";function r(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e){return i="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},i(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:function(){return _t},Sortable:function(){return Be},Swap:function(){return ct}});var d=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=u(/Edge/i),f=u(/firefox/i),h=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),m=u(/iP(ad|od|hone)/i),v=u(/chrome/i)&&u(/android/i),g={capture:!1,passive:!1};function b(e,t,n){e.addEventListener(t,n,!d&&g)}function y(e,t,n){e.removeEventListener(t,n,!d&&g)}function _(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&_(e,t):_(e,t))||r&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var x,C=/\s+/g;function O(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(C," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(C," ")}}function S(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function D(e,t){var n="";if("string"==typeof e)n=e;else do{var r=S(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function k(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function A(){return document.scrollingElement||document.documentElement}function T(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,s,l,c,u,p;if(e!==window&&e.parentNode&&e!==A()?(a=(i=e.getBoundingClientRect()).top,s=i.left,l=i.bottom,c=i.right,u=i.height,p=i.width):(a=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!d))do{if(o&&o.getBoundingClientRect&&("none"!==S(o,"transform")||n&&"static"!==S(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(S(o,"border-top-width")),s-=f.left+parseInt(S(o,"border-left-width")),l=a+i.height,c=s+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var h=D(o||e),m=h&&h.a,v=h&&h.d;h&&(l=(a/=v)+(u/=v),c=(s/=m)+(p/=m))}return{top:a,left:s,bottom:l,right:c,width:p,height:u}}}function I(e,t,n){for(var r=R(e,!0),o=T(e)[t];r;){var i=T(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===A())break;r=R(r,!1)}return!1}function M(e,t,n,r){for(var o=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Be.ghost&&(r||a[i]!==Be.dragged)&&E(a[i],n.draggable,e,!1)){if(o===t)return a[i];o++}i++}return null}function j(e,t){for(var n=e.lastElementChild;n&&(n===Be.ghost||"none"===S(n,"display")||t&&!_(n,t));)n=n.previousElementSibling;return n||null}function P(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Be.clone||t&&!_(e,t)||n++;return n}function N(e){var t=0,n=0,r=A();if(e)do{var o=D(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function R(e,t){if(!e||!e.getBoundingClientRect)return A();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=S(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return A();if(r||t)return n;r=!0}}}while(n=n.parentNode);return A()}function L(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function F(e,t){return function(){if(!x){var n=arguments,r=this;1===n.length?e.call(r,n[0]):e.apply(r,n),x=setTimeout((function(){x=void 0}),t)}}}function V(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function H(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function B(e,t){S(e,"position","absolute"),S(e,"top",t.top),S(e,"left",t.left),S(e,"width",t.width),S(e,"height",t.height)}function U(e){S(e,"position",""),S(e,"top",""),S(e,"left",""),S(e,"width",""),S(e,"height","")}var $="Sortable"+(new Date).getTime();var z=[],W={initializeByDefault:!0},Y={mount:function(e){for(var t in W)W.hasOwnProperty(t)&&!(t in e)&&(e[t]=W[t]);z.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),z.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+"Global";z.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in z.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,s(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return z.forEach((function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return z.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}};function G(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,s=e.toEl,l=e.fromEl,c=e.oldIndex,u=e.newIndex,f=e.oldDraggableIndex,h=e.newDraggableIndex,m=e.originalEvent,v=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[$]){var b,y=t.options,_="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||d||p?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=s||n,b.from=l||n,b.item=i||n,b.clone=a,b.oldIndex=c,b.newIndex=u,b.oldDraggableIndex=f,b.newDraggableIndex=h,b.originalEvent=m,b.pullMode=v?v.lastPutMode:void 0;var w=o(o({},g),Y.getEventProperties(r,t));for(var E in w)b[E]=w[E];n&&n.dispatchEvent(b),y[_]&&y[_].call(t,b)}}var q=["evt"],X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=l(n,q);Y.pluginEvent.bind(Be)(e,t,o({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:re,cloneHidden:oe,dragStarted:ge,putSortable:ue,activeSortable:Be.active,originalEvent:r,oldIndex:ie,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:le,hideGhostForTarget:Le,unhideGhostForTarget:Fe,cloneNowHidden:function(){oe=!0},cloneNowShown:function(){oe=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:r})}},i))};function K(e){G(o({putSortable:ue,cloneEl:re,targetEl:Z,rootEl:ee,oldIndex:ie,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:le},e))}var Z,J,Q,ee,te,ne,re,oe,ie,ae,se,le,ce,ue,de,pe,fe,he,me,ve,ge,be,ye,_e,we,Ee=!1,xe=!1,Ce=[],Oe=!1,Se=!1,De=[],ke=!1,Ae=[],Te="undefined"!=typeof document,Ie=m,Me=p||d?"cssFloat":"float",je=Te&&!v&&!m&&"draggable"in document.createElement("div"),Pe=function(){if(Te){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ne=function(e,t){var n=S(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=M(e,0,t),i=M(e,1,t),a=o&&S(o),s=i&&S(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Me]||i&&"none"===n[Me]&&l+c>r)?"vertical":"horizontal"},Re=function(e){function t(e,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==i(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Le=function(){!Pe&&Q&&S(Q,"display","none")},Fe=function(){!Pe&&Q&&S(Q,"display","")};Te&&!v&&document.addEventListener("click",(function(e){if(xe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xe=!1,!1}),!0);var Ve=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,i=e.clientY,Ce.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!j(e)){var n=T(e),r=o>=n.left-t&&o<=n.right+t,s=i>=n.top-t&&i<=n.bottom+t;return r&&s?a=e:void 0}})),a);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var o,i,a},He=function(e){Z&&Z.parentNode[$]._isOutsideThisEl(e.target)};function Be(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[$]=this;var n,r,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ne(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Be.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var a in Y.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var l in Re(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&je,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?b(e,"pointerdown",this._onTapStart):(b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Ce.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==S(e,"display")&&e!==Be.ghost){r.push({target:e,rect:T(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=D(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,i=0;r.forEach((function(e){var n=0,r=e.target,a=r.fromRect,s=T(r),l=r.prevFromRect,c=r.prevToRect,u=e.rect,d=D(r,!0);d&&(s.top-=d.f,s.left-=d.e),r.toRect=s,r.thisAnimationDuration&&L(l,s)&&!L(a,s)&&(u.top-s.top)/(u.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(u,l,c,t.options)),L(s,a)||(r.prevFromRect=a,r.prevToRect=s,n||(n=t.options.animation),t.animate(r,u,s,n)),n&&(o=!0,i=Math.max(i,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),i):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){S(e,"transition",""),S(e,"transform","");var o=D(this.el),i=o&&o.a,a=o&&o.d,s=(t.left-n.left)/(i||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,S(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),S(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),S(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){S(e,"transition",""),S(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function Ue(e,t,n,r,o,i,a,s){var l,c,u=e[$],f=u.options.onMove;return!window.CustomEvent||d||p?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=i||T(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),f&&(c=f.call(u,l,a)),c}function $e(e){e.draggable=!1}function ze(){ke=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ye(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}Be.prototype={constructor:Be,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(function(e){Ae.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ae.push(r)}}(n),!Z&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!h||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=E(s,r.draggable,n,!1))&&s.animated||ne===s)){if(ie=P(s),se=P(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return K({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),X("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=E(l,r.trim(),n,!1))return K({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),X("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!E(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!Z&&n.parentNode===i){var l=T(n);if(ee=i,J=(Z=n).parentNode,te=Z.nextSibling,ne=n,ce=a.group,Be.dragged=Z,de={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},me=de.clientX-l.left,ve=de.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",r=function(){X("delayEnded",o,{evt:e}),Be.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!f&&o.nativeDraggable&&(Z.draggable=!0),o._triggerDragStart(e,t),K({sortable:o,name:"choose",originalEvent:e}),O(Z,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){k(Z,e.trim(),$e)})),b(s,"dragover",Ve),b(s,"mousemove",Ve),b(s,"touchmove",Ve),b(s,"mouseup",o._onDrop),b(s,"touchend",o._onDrop),b(s,"touchcancel",o._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),X("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(p||d))r();else{if(Be.eventCanceled)return void this._onDrop();b(s,"mouseup",o._disableDelayedDrag),b(s,"touchend",o._disableDelayedDrag),b(s,"touchcancel",o._disableDelayedDrag),b(s,"mousemove",o._delayedDragTouchMoveHandler),b(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&b(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&$e(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?b(document,"pointermove",this._onTouchMove):b(document,t?"touchmove":"mousemove",this._onTouchMove):(b(Z,"dragend",this),b(ee,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Ee=!1,ee&&Z){X("dragStarted",this,{evt:t}),this.nativeDraggable&&b(document,"dragover",He);var n=this.options;!e&&O(Z,n.dragClass,!1),O(Z,n.ghostClass,!0),Be.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Le();for(var e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==t;)t=e;if(Z.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Fe()}},_onTouchMove:function(e){if(de){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=Q&&D(Q,!0),a=Q&&i&&i.a,s=Q&&i&&i.d,l=Ie&&we&&N(we),c=(o.clientX-de.clientX+r.x)/(a||1)+(l?l[0]-De[0]:0)/(a||1),u=(o.clientY-de.clientY+r.y)/(s||1)+(l?l[1]-De[1]:0)/(s||1);if(!Be.active&&!Ee){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Q){i?(i.e+=c-(fe||0),i.f+=u-(he||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");S(Q,"webkitTransform",d),S(Q,"mozTransform",d),S(Q,"msTransform",d),S(Q,"transform",d),fe=c,he=u,pe=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,t=T(Z,!0,Ie,!0,e),n=this.options;if(Ie){for(we=e;"static"===S(we,"position")&&"none"===S(we,"transform")&&we!==document;)we=we.parentNode;we!==document.body&&we!==document.documentElement?(we===document&&(we=A()),t.top+=we.scrollTop,t.left+=we.scrollLeft):we=A(),De=N(we)}O(Q=Z.cloneNode(!0),n.ghostClass,!1),O(Q,n.fallbackClass,!0),O(Q,n.dragClass,!0),S(Q,"transition",""),S(Q,"transform",""),S(Q,"box-sizing","border-box"),S(Q,"margin",0),S(Q,"top",t.top),S(Q,"left",t.left),S(Q,"width",t.width),S(Q,"height",t.height),S(Q,"opacity","0.8"),S(Q,"position",Ie?"absolute":"fixed"),S(Q,"zIndex","100000"),S(Q,"pointerEvents","none"),Be.ghost=Q,e.appendChild(Q),S(Q,"transform-origin",me/parseInt(Q.style.width)*100+"% "+ve/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;X("dragStart",this,{evt:e}),Be.eventCanceled?this._onDrop():(X("setupClone",this),Be.eventCanceled||((re=H(Z)).removeAttribute("id"),re.draggable=!1,re.style["will-change"]="",this._hideClone(),O(re,this.options.chosenClass,!1),Be.clone=re),n.cloneId=Ye((function(){X("clone",n),Be.eventCanceled||(n.options.removeCloneOnHide||ee.insertBefore(re,Z),n._hideClone(),K({sortable:n,name:"clone"}))})),!t&&O(Z,o.dragClass,!0),t?(xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,Z)),b(document,"drop",n),S(Z,"transform","translateZ(0)")),Ee=!0,n._dragStartId=Ye(n._dragStarted.bind(n,t,e)),b(document,"selectstart",n),ge=!0,h&&S(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,i,a=this.el,s=e.target,l=this.options,c=l.group,u=Be.active,d=ce===c,p=l.sort,f=ue||u,h=this,m=!1;if(!ke){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=E(s,l.draggable,a,!0),F("dragOver"),Be.eventCanceled)return m;if(Z.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||h._ignoreWhileAnimating===s)return B(!1);if(xe=!1,u&&!l.disabled&&(d?p||(r=J!==ee):ue===this||(this.lastPutMode=ce.checkPull(this,u,Z,e))&&c.checkPut(this,u,Z,e))){if(i="vertical"===this._getDirection(e,s),t=T(Z),F("dragOverValid"),Be.eventCanceled)return m;if(r)return J=ee,H(),this._hideClone(),F("revert"),Be.eventCanceled||(te?ee.insertBefore(Z,te):ee.appendChild(Z)),B(!0);var v=j(a,l.draggable);if(!v||function(e,t,n){var r=T(j(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,i,this)&&!v.animated){if(v===Z)return B(!1);if(v&&a===e.target&&(s=v),s&&(n=T(s)),!1!==Ue(ee,a,Z,t,s,n,e,!!s))return H(),v&&v.nextSibling?a.insertBefore(Z,v.nextSibling):a.appendChild(Z),J=a,U(),B(!0)}else if(v&&function(e,t,n){var r=T(M(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,i,this)){var g=M(a,0,l,!0);if(g===Z)return B(!1);if(n=T(s=g),!1!==Ue(ee,a,Z,t,s,n,e,!1))return H(),a.insertBefore(Z,g),J=a,U(),B(!0)}else if(s.parentNode===a){n=T(s);var b,y,_,w=Z.parentNode!==a,x=!function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===a||o===s||r+i/2===a+l/2}(Z.animated&&Z.toRect||t,s.animated&&s.toRect||n,i),C=i?"top":"left",D=I(s,"top","top")||I(Z,"top","top"),k=D?D.scrollTop:void 0;if(be!==s&&(y=n[C],Oe=!1,Se=!x&&l.invertSwap||w),b=function(e,t,n,r,o,i,a,s){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!a)if(s&&_e<c*o){if(!Oe&&(1===ye?l>u+c*i/2:l<d-c*i/2)&&(Oe=!0),Oe)p=!0;else if(1===ye?l<u+_e:l>d-_e)return-ye}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return function(e){return P(Z)<P(e)?1:-1}(t);return(p=p||a)&&(l<u+c*i/2||l>d-c*i/2)?l>u+c/2?1:-1:0}(e,s,n,i,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Se,be===s),0!==b){var A=P(Z);do{A-=b,_=J.children[A]}while(_&&("none"===S(_,"display")||_===Q))}if(0===b||_===s)return B(!1);be=s,ye=b;var N=s.nextElementSibling,R=!1,L=Ue(ee,a,Z,t,s,n,e,R=1===b);if(!1!==L)return 1!==L&&-1!==L||(R=1===L),ke=!0,setTimeout(ze,30),H(),R&&!N?a.appendChild(Z):s.parentNode.insertBefore(Z,R?N:s),D&&V(D,0,k-D.scrollTop),J=Z.parentNode,void 0===y||Se||(_e=Math.abs(y-T(s)[C])),U(),B(!0)}if(a.contains(Z))return B(!1)}return!1}function F(l,c){X(l,h,o({evt:e,isOwner:d,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:s,completed:B,onMove:function(n,r){return Ue(ee,a,Z,t,n,T(n),e,r)},changed:U},c))}function H(){F("dragOverAnimationCapture"),h.captureAnimationState(),h!==f&&f.captureAnimationState()}function B(t){return F("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(h),h!==f&&(O(Z,ue?ue.options.ghostClass:u.options.ghostClass,!1),O(Z,l.ghostClass,!0)),ue!==h&&h!==Be.active?ue=h:h===Be.active&&ue&&(ue=null),f===h&&(h._ignoreWhileAnimating=s),h.animateAll((function(){F("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===Z&&!Z.animated||s===a&&!s.animated)&&(be=null),l.dragoverBubble||e.rootEl||s===document||(Z.parentNode[$]._isOutsideThisEl(e.target),!t&&Ve(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function U(){ae=P(Z),le=P(Z,l.draggable),K({sortable:h,name:"change",toEl:a,newIndex:ae,newDraggableIndex:le,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Ve),y(document,"mousemove",Ve),y(document,"touchmove",Ve)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ae=P(Z),le=P(Z,n.draggable),X("drop",this,{evt:e}),J=Z&&Z.parentNode,ae=P(Z),le=P(Z,n.draggable),Be.eventCanceled||(Ee=!1,Se=!1,Oe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&S(document.body,"user-select",""),S(Z,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===J||ue&&"clone"!==ue.lastPutMode)&&re&&re.parentNode&&re.parentNode.removeChild(re),Z&&(this.nativeDraggable&&y(Z,"dragend",this),$e(Z),Z.style["will-change"]="",ge&&!Ee&&O(Z,ue?ue.options.ghostClass:this.options.ghostClass,!1),O(Z,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==J?(ae>=0&&(K({rootEl:J,name:"add",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"remove",toEl:J,originalEvent:e}),K({rootEl:J,name:"sort",toEl:J,fromEl:ee,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),ue&&ue.save()):ae!==ie&&ae>=0&&(K({sortable:this,name:"update",toEl:J,originalEvent:e}),K({sortable:this,name:"sort",toEl:J,originalEvent:e})),Be.active&&(null!=ae&&-1!==ae||(ae=ie,le=se),K({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),ee=Z=J=Q=te=re=ne=oe=de=pe=ge=ae=le=ie=se=be=ye=ue=ce=Be.dragged=Be.ghost=Be.clone=Be.active=null,Ae.forEach((function(e){e.checked=!0})),Ae.length=fe=he=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)E(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||We(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var o=r.children[t];E(o,this.options.draggable,r,!1)&&(n[e]=o)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return E(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=Y.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Re(n)},destroy:function(){X("destroy",this);var e=this.el;e[$]=null,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),y(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ce.splice(Ce.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!oe){if(X("hideClone",this),Be.eventCanceled)return;S(re,"display","none"),this.options.removeCloneOnHide&&re.parentNode&&re.parentNode.removeChild(re),oe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(oe){if(X("showClone",this),Be.eventCanceled)return;Z.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(re,te):ee.appendChild(re):ee.insertBefore(re,Z),this.options.group.revertClone&&this.animate(Z,re),S(re,"display",""),oe=!1}}else this._hideClone()}},Te&&b(document,"touchmove",(function(e){(Be.active||Ee)&&e.cancelable&&e.preventDefault()})),Be.utils={on:b,off:y,css:S,find:k,is:function(e,t){return!!E(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:F,closest:E,toggleClass:O,clone:H,index:P,nextTick:Ye,cancelNextTick:Ge,detectDirection:Ne,getChild:M},Be.get=function(e){return e[$]},Be.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Be.utils=o(o({},Be.utils),e.utils)),Y.mount(e)}))},Be.create=function(e,t){return new Be(e,t)},Be.version="1.15.0";var qe,Xe,Ke,Ze,Je,Qe,et=[],tt=!1;function nt(){et.forEach((function(e){clearInterval(e.pid)})),et=[]}function rt(){clearInterval(Qe)}var ot,it=F((function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=A(),u=!1;Xe!==n&&(Xe=n,nt(),qe=t.scroll,o=t.scrollFn,!0===qe&&(qe=R(n,!0)));var d=0,p=qe;do{var f=p,h=T(f),m=h.top,v=h.bottom,g=h.left,b=h.right,y=h.width,_=h.height,w=void 0,E=void 0,x=f.scrollWidth,C=f.scrollHeight,O=S(f),D=f.scrollLeft,k=f.scrollTop;f===c?(w=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),E=_<C&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(w=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX),E=_<C&&("auto"===O.overflowY||"scroll"===O.overflowY));var I=w&&(Math.abs(b-i)<=s&&D+y<x)-(Math.abs(g-i)<=s&&!!D),M=E&&(Math.abs(v-a)<=s&&k+_<C)-(Math.abs(m-a)<=s&&!!k);if(!et[d])for(var j=0;j<=d;j++)et[j]||(et[j]={});et[d].vx==I&&et[d].vy==M&&et[d].el===f||(et[d].el=f,et[d].vx=I,et[d].vy=M,clearInterval(et[d].pid),0==I&&0==M||(u=!0,et[d].pid=setInterval(function(){r&&0===this.layer&&Be.active._onTouchMove(Je);var t=et[this.layer].vy?et[this.layer].vy*l:0,n=et[this.layer].vx?et[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Be.dragged.parentNode[$],n,t,e,Je,et[this.layer].el)||V(et[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=R(p,!1)));tt=u}}),30),at=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function st(){}function lt(){}function ct(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;ot=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,o=e.activeSortable,i=e.changed,a=e.cancel;if(o.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=ot;!1!==r(n)?(O(n,l.swapClass,!0),ot=n):ot=null,c&&c!==ot&&O(c,l.swapClass,!1)}i(),t(!0),a()}},drop:function(e){var t,n,r,o,i,a,s=e.activeSortable,l=e.putSortable,c=e.dragEl,u=l||this.sortable,d=this.options;ot&&O(ot,d.swapClass,!1),ot&&(d.swap||l&&l.options.swap)&&c!==ot&&(u.captureAnimationState(),u!==s&&s.captureAnimationState(),n=ot,i=(t=c).parentNode,a=n.parentNode,i&&a&&!i.isEqualNode(n)&&!a.isEqualNode(t)&&(r=P(t),o=P(n),i.isEqualNode(a)&&r<o&&o++,i.insertBefore(n,i.children[r]),a.insertBefore(t,a.children[o])),u.animateAll(),u!==s&&s.animateAll())},nulling:function(){ot=null}},s(e,{pluginName:"swap",eventProperties:function(){return{swapItem:ot}}})}st.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=M(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:at},s(st,{pluginName:"revertOnSpill"}),lt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:at},s(lt,{pluginName:"removeOnSpill"});var ut,dt,pt,ft,ht,mt=[],vt=[],gt=!1,bt=!1,yt=!1;function _t(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?b(document,"pointerup",this._deselectMultiDrag):(b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag))),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var r="";mt.length&&dt===e?mt.forEach((function(e,t){r+=(t?", ":"")+e.textContent})):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;pt=t},delayEnded:function(){this.isMultiDrag=~mt.indexOf(pt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<mt.length;r++)vt.push(H(mt[r])),vt[r].sortableIndex=mt[r].sortableIndex,vt[r].draggable=!1,vt[r].style["will-change"]="",O(vt[r],this.options.selectedClass,!1),mt[r]===pt&&O(vt[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,o=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||mt.length&&dt===t&&(wt(!0,n),r("clone"),o()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(wt(!1,n),vt.forEach((function(e){S(e,"display","")})),t(),ht=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(vt.forEach((function(e){S(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),ht=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&dt&&dt.multiDrag._deselectMultiDrag(),mt.forEach((function(e){e.sortableIndex=P(e)})),mt=mt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),yt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){mt.forEach((function(e){e!==pt&&S(e,"position","absolute")}));var r=T(pt,!1,!0,!0);mt.forEach((function(e){e!==pt&&B(e,r)})),bt=!0,gt=!0}n.animateAll((function(){bt=!1,gt=!1,t.options.animation&&mt.forEach((function(e){U(e)})),t.options.sort&&Et()}))}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;bt&&~mt.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,o=e.dragRect;mt.length>1&&(mt.forEach((function(e){r.addAnimationState({target:e,rect:bt?T(e):o}),U(e),e.fromRect=o,t.removeAnimationState(e)})),bt=!1,function(e,t){mt.forEach((function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,o=e.activeSortable,i=e.parentEl,a=e.putSortable,s=this.options;if(r){if(n&&o._hideClone(),gt=!1,s.animation&&mt.length>1&&(bt||!n&&!o.options.sort&&!a)){var l=T(pt,!1,!0,!0);mt.forEach((function(e){e!==pt&&(B(e,l),i.appendChild(e))})),bt=!0}if(!n)if(bt||Et(),mt.length>1){var c=ht;o._showClone(t),o.options.animation&&!ht&&c&&vt.forEach((function(e){o.addAnimationState({target:e,rect:ft}),e.fromRect=ft,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(mt.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ft=s({},t);var o=D(pt,!0);ft.top-=o.f,ft.left-=o.e}},dragOverAnimationComplete:function(){bt&&(bt=!1,Et())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,o=e.sortable,i=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,l=s||this.sortable;if(t){var c=this.options,u=r.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),O(pt,c.selectedClass,!~mt.indexOf(pt)),~mt.indexOf(pt))mt.splice(mt.indexOf(pt),1),ut=null,G({sortable:o,rootEl:n,name:"deselect",targetEl:pt,originalEvent:t});else{if(mt.push(pt),G({sortable:o,rootEl:n,name:"select",targetEl:pt,originalEvent:t}),t.shiftKey&&ut&&o.el.contains(ut)){var d,p,f=P(ut),h=P(pt);if(~f&&~h&&f!==h)for(h>f?(p=f,d=h):(p=h,d=f+1);p<d;p++)~mt.indexOf(u[p])||(O(u[p],c.selectedClass,!0),mt.push(u[p]),G({sortable:o,rootEl:n,name:"select",targetEl:u[p],originalEvent:t}))}else ut=pt;dt=l}if(yt&&this.isMultiDrag){if(bt=!1,(r[$].options.sort||r!==n)&&mt.length>1){var m=T(pt),v=P(pt,":not(."+this.options.selectedClass+")");if(!gt&&c.animation&&(pt.thisAnimationDuration=null),l.captureAnimationState(),!gt&&(c.animation&&(pt.fromRect=m,mt.forEach((function(e){if(e.thisAnimationDuration=null,e!==pt){var t=bt?T(e):m;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),Et(),mt.forEach((function(e){u[v]?r.insertBefore(e,u[v]):r.appendChild(e),v++})),a===P(pt))){var g=!1;mt.forEach((function(e){e.sortableIndex===P(e)||(g=!0)})),g&&i("update")}mt.forEach((function(e){U(e)})),l.animateAll()}dt=l}(n===r||s&&"clone"!==s.lastPutMode)&&vt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,vt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||dt!==this.sortable||e&&E(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;mt.length;){var t=mt[0];O(t,this.options.selectedClass,!1),mt.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},s(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[$];t&&t.options.multiDrag&&!~mt.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),O(e,t.options.selectedClass,!0),mt.push(e))},deselect:function(e){var t=e.parentNode[$],n=mt.indexOf(e);t&&t.options.multiDrag&&~n&&(O(e,t.options.selectedClass,!1),mt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return mt.forEach((function(e){var o;n.push({multiDragElement:e,index:e.sortableIndex}),o=bt&&e!==pt?-1:bt?P(e,":not(."+t.options.selectedClass+")"):P(e),r.push({multiDragElement:e,index:o})})),{items:(e=mt,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(vt),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function wt(e,t){vt.forEach((function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function Et(){mt.forEach((function(e){e!==pt&&e.parentNode&&e.parentNode.removeChild(e)}))}Be.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):this.options.supportPointer?b(document,"pointermove",this._handleFallbackAutoScroll):t.touches?b(document,"touchmove",this._handleFallbackAutoScroll):b(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),rt(),nt(),clearTimeout(x),x=void 0},nulling:function(){Je=Xe=qe=tt=Qe=Ke=Ze=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(Je=e,t||this.options.forceAutoScrollFallback||p||d||h){it(e,this.options,i,t);var a=R(i,!0);!tt||Qe&&r===Ke&&o===Ze||(Qe&&rt(),Qe=setInterval((function(){var i=R(document.elementFromPoint(r,o),!0);i!==a&&(a=i,nt()),it(e,n.options,i,t)}),10),Ke=r,Ze=o)}else{if(!this.options.bubbleScroll||R(i,!0)===A())return void nt();it(e,this.options,R(i,!1),!1)}}},s(e,{pluginName:"scroll",initializeByDefault:!0})}),Be.mount(lt,st),t.default=Be},177:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r}});function r(e,t){if(!e)throw new Error("Invariant failed")}},196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=window.wp.element,t=window.lodash;function r(){return wcapf_admin_params.default_settings}const o=(0,t.merge)(r(),wcapf_admin_params.settings),i=o.author_roles;let a=[];if(i)for(let e=0;e<i.length;e++){const t=i[e];t.hasOwnProperty("label")&&t.hasOwnProperty("value")&&a.push(t)}const s={isDirty:!1,currentTab:"general",settings:{...o,author_roles:a},globalFilterKeys:wcapf_admin_params.global_filter_keys,filterKeysChanged:!1,seoSettings:{},saveError:""};var l=(e,t)=>{switch(t.type){case"SET_DIRTY":return{...e,isDirty:t.payload};case"SET_CURRENT_TAB":return{...e,currentTab:t.payload};case"UPDATE_SETTINGS":return{...e,settings:t.payload};case"UPDATE_GLOBAL_FILTER_KEYS":return{...e,globalFilterKeys:t.payload};case"SET_FILTER_KEYS_CHANGED":return{...e,filterKeysChanged:t.payload};case"UPDATE_SEO_SETTINGS":return{...e,seoSettings:t.payload};case"SET_ERROR":return{...e,saveError:t.payload};default:return e}};const c=(0,e.createContext)(s),u=t=>{let{children:n}=t;const[r,o]=(0,e.useReducer)(l,s);return(0,e.createElement)(c.Provider,{value:{state:r,dispatch:o}},n)},d=()=>{const t=(0,e.useContext)(c);if(void 0===t)throw new Error("useSettings must be used within a SettingsProvider");return t};var p=window.wp.i18n,f=window.wp.components;(0,e.createElement)("svg",{viewBox:"0 0 48 48"},(0,e.createElement)("path",{d:"M16.1161 39.6339C15.628 39.1457 15.628 38.3543 16.1161 37.8661L29.9822 24L16.1161 10.1339C15.628 9.64573 15.628 8.85427 16.1161 8.36612C16.6043 7.87796 17.3957 7.87796 17.8839 8.36612L32.6339 23.1161C33.122 23.6043 33.122 24.3957 32.6339 24.8839L17.8839 39.6339C17.3957 40.122 16.6043 40.122 16.1161 39.6339Z"})),(0,e.createElement)("svg",{viewBox:"0 0 256 256"},(0,e.createElement)("path",{d:"M215.99609,52H172V40a20.0226,20.0226,0,0,0-20-20H104A20.0226,20.0226,0,0,0,84,40V52H39.99609a4,4,0,0,0,0,8h12V208a12.01375,12.01375,0,0,0,12,12h128a12.01375,12.01375,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12.01375,12.01375,0,0,1,12-12h48a12.01375,12.01375,0,0,1,12,12V52H92ZM195.99609,208a4.00458,4.00458,0,0,1-4,4h-128a4.00458,4.00458,0,0,1-4-4V60h136ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"})),(0,e.createElement)("svg",{viewBox:"0 0 16 16"},(0,e.createElement)("path",{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"})),(0,e.createElement)("svg",{viewBox:"0 0 255.99316 255.99316"},(0,e.createElement)("path",{d:"M219.99268,39.99414v144.001a4,4,0,0,1-8,0V43.99414H71.98584a4,4,0,0,1,0-8H215.99268A4.0002,4.0002,0,0,1,219.99268,39.99414Zm-32,32.001v144a4.0002,4.0002,0,0,1-4,4H39.98584a4.0002,4.0002,0,0,1-4-4v-144a4.0002,4.0002,0,0,1,4-4H183.99268A4.0002,4.0002,0,0,1,187.99268,71.99512Zm-8,4H43.98584v136H179.99268Z"})),(0,e.createElement)("svg",{viewBox:"0 0 512.006 512.006"},(0,e.createElement)("path",{d:"M388.419,475.59L168.834,256.005L388.418,36.421c8.341-8.341,8.341-21.824,0-30.165s-21.824-8.341-30.165,0    L123.586,240.923c-8.341,8.341-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251    c5.461,0,10.923-2.091,15.083-6.251C396.76,497.414,396.76,483.931,388.419,475.59z"})),(0,e.createElement)("svg",{viewBox:"0 0 21 21"},(0,e.createElement)("g",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(4 3)"},(0,e.createElement)("path",{d:"m6.5 11.5-3-3 3-3"}),(0,e.createElement)("path",{d:"m3.5 8.5h11"}),(0,e.createElement)("path",{d:"m12.5 6.5v-4.00491374c0-.51283735-.3860402-.93550867-.8833789-.99327378l-.1190802-.00672622-1.9975409.00491374m-6 0-1.99754087-.00492752c-.51283429-.00124584-.93645365.38375378-.99544161.88094891l-.00701752.11906329v10.99753792c.00061497.5520447.44795562.9996604 1 1.0006148l10 .0061554c.5128356.0008784.9357441-.3848611.993815-.8821612l.006185-.1172316v-2.5"}),(0,e.createElement)("path",{d:"m4.5.5h4c.55228475 0 1 .44771525 1 1s-.44771525 1-1 1h-4c-.55228475 0-1-.44771525-1-1s.44771525-1 1-1z"})));const h=(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("path",{id:"Diamond",d:"M63.6870499,18.5730648L48.7831497,4.278266c-0.1855011-0.1758003-0.4316025-0.4813001-0.6870003-0.4813001 H15.9037514c-0.2553005,0-0.5014,0.3054998-0.6870003,0.4813001l-14.9038,14.1908998 c-0.374,0.3535004-0.4184,0.9855995-0.1025,1.3917999c0.21,0.2703991,30.8237991,39.7256012,31.0517006,39.9812012 c0.1022987,0.1149979,0.2402992,0.2215996,0.3428001,0.266098c0.2763996,0.1206017,0.5077,0.1296997,0.7900982,0.0065002 c0.1025009-0.0444984,0.2404022-0.1348991,0.3428001-0.2499008c0.0151024-0.0168991,0.0377007-0.0224991,0.0517006-0.0404968 L63.789547,19.9121666C64.1054459,19.5058651,64.0610504,18.9265652,63.6870499,18.5730648z M15.6273508,6.4344659 l4.9945002,11.3625011H3.6061509L15.6273508,6.4344659z M24.0795517,17.7969666l7.9203987-11.2617006l7.9204979,11.2617006 H24.0795517z M40.7191467,19.7969666l-8.7191963,34.8769989l-8.719099-34.8769989H40.7191467z M33.9257507,5.7969656h12.5423012 l-4.8240013,10.9746008L33.9257507,5.7969656z M22.3559513,16.7715664L17.53195,5.7969656h12.5423012L22.3559513,16.7715664z M21.2191505,19.7969666l8.6596012,34.638401L2.975451,19.7969666H21.2191505z M42.7808495,19.7969666h18.2436981 l-26.9032974,34.638401L42.7808495,19.7969666z M43.3781471,17.7969666l4.9944992-11.3625011l12.0212021,11.3625011H43.3781471z"})),m=((0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,e.createElement)("svg",{viewBox:"0 0 492 492"},(0,e.createElement)("path",{d:"M465.064,207.566l0.028,0H284.436V27.25c0-14.84-12.016-27.248-26.856-27.248h-23.116 c-14.836,0-26.904,12.408-26.904,27.248v180.316H26.908c-14.832,0-26.908,12-26.908,26.844v23.248 c0,14.832,12.072,26.78,26.908,26.78h180.656v180.968c0,14.832,12.064,26.592,26.904,26.592h23.116 c14.84,0,26.856-11.764,26.856-26.592V284.438h180.624c14.84,0,26.936-11.952,26.936-26.78V234.41 C492,219.566,479.904,207.566,465.064,207.566z"})),(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M3 5.75C3 4.23122 4.23122 3 5.75 3H15.7145C16.5764 3 17.4031 3.34241 18.0126 3.9519L20.0481 5.98744C20.6576 6.59693 21 7.42358 21 8.28553V18.25C21 19.7688 19.7688 21 18.25 21H5.75C4.23122 21 3 19.7688 3 18.25V5.75ZM5.75 4.5C5.05964 4.5 4.5 5.05964 4.5 5.75V18.25C4.5 18.9404 5.05964 19.5 5.75 19.5H6V14.25C6 13.0074 7.00736 12 8.25 12H15.75C16.9926 12 18 13.0074 18 14.25V19.5H18.25C18.9404 19.5 19.5 18.9404 19.5 18.25V8.28553C19.5 7.8214 19.3156 7.37629 18.9874 7.0481L16.9519 5.01256C16.6918 4.75246 16.3582 4.58269 16 4.52344V7.25C16 8.49264 14.9926 9.5 13.75 9.5H9.25C8.00736 9.5 7 8.49264 7 7.25V4.5H5.75ZM16.5 19.5V14.25C16.5 13.8358 16.1642 13.5 15.75 13.5H8.25C7.83579 13.5 7.5 13.8358 7.5 14.25V19.5H16.5ZM8.5 4.5V7.25C8.5 7.66421 8.83579 8 9.25 8H13.75C14.1642 8 14.5 7.66421 14.5 7.25V4.5H8.5Z"}))),v=((0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M16.4 19.62H6.39999C5.40543 19.62 4.4516 19.2249 3.74834 18.5216C3.04508 17.8184 2.64999 16.8646 2.64999 15.87V13.37C2.64999 13.1711 2.72901 12.9803 2.86966 12.8397C3.01032 12.699 3.20108 12.62 3.39999 12.62C3.59891 12.62 3.78967 12.699 3.93032 12.8397C4.07098 12.9803 4.14999 13.1711 4.14999 13.37V15.87C4.14999 16.4667 4.38705 17.039 4.809 17.461C5.23096 17.8829 5.80326 18.12 6.39999 18.12H16.4C16.9967 18.12 17.569 17.8829 17.991 17.461C18.4129 17.039 18.65 16.4667 18.65 15.87V13.37C18.65 13.1711 18.729 12.9803 18.8697 12.8397C19.0103 12.699 19.2011 12.62 19.4 12.62C19.5989 12.62 19.7897 12.699 19.9303 12.8397C20.071 12.9803 20.15 13.1711 20.15 13.37V15.87C20.15 16.8646 19.7549 17.8184 19.0516 18.5216C18.3484 19.2249 17.3946 19.62 16.4 19.62Z"}),(0,e.createElement)("path",{d:"M11.4 14.88C11.2011 14.88 11.0103 14.801 10.8697 14.6603C10.729 14.5197 10.65 14.3289 10.65 14.13V5.13C10.65 4.93109 10.729 4.74033 10.8697 4.59967C11.0103 4.45902 11.2011 4.38 11.4 4.38C11.5989 4.38 11.7897 4.45902 11.9303 4.59967C12.071 4.74033 12.15 4.93109 12.15 5.13V14.13C12.1474 14.3281 12.0676 14.5174 11.9275 14.6575C11.7874 14.7976 11.5981 14.8774 11.4 14.88Z"}),(0,e.createElement)("path",{d:"M11.4 16.12C11.3014 16.121 11.2036 16.1021 11.1125 16.0643C11.0214 16.0265 10.9389 15.9706 10.87 15.9L6.63 11.66C6.55925 11.5911 6.50301 11.5086 6.46461 11.4176C6.42621 11.3266 6.40643 11.2288 6.40643 11.13C6.40643 11.0312 6.42621 10.9334 6.46461 10.8424C6.50301 10.7514 6.55925 10.669 6.63 10.6C6.77063 10.4596 6.96125 10.3807 7.16 10.3807C7.35875 10.3807 7.54938 10.4596 7.69 10.6L11.4 14.31L15.11 10.6C15.1787 10.5263 15.2615 10.4672 15.3535 10.4262C15.4455 10.3852 15.5448 10.3632 15.6455 10.3614C15.7462 10.3596 15.8462 10.3782 15.9396 10.4159C16.033 10.4536 16.1178 10.5097 16.189 10.581C16.2603 10.6522 16.3164 10.737 16.3541 10.8304C16.3918 10.9238 16.4104 11.0238 16.4086 11.1245C16.4068 11.2252 16.3848 11.3245 16.3438 11.4165C16.3028 11.5085 16.2437 11.5913 16.17 11.66L11.93 15.9C11.8608 15.9701 11.7782 16.0257 11.6872 16.0635C11.5962 16.1013 11.4985 16.1205 11.4 16.12Z"})),(0,e.createElement)("svg",{viewBox:"0 0 64 64"},(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M0,3.26315v57.4737015h64V3.26315H0z M62,5.2631502V34.480751L47.1523018,20.5346508 c-0.1992035-0.1875-0.4580002-0.2890015-0.7422028-0.2695007c-0.2733994,0.0156002-0.5282974,0.1425991-0.7059975,0.352499 L28.4267006,41.04245L15.4111004,30.3715496c-0.3984003-0.3270988-0.9863005-0.2967987-1.3496008,0.075201L2,42.8066483V5.2631502 H62z M2,58.7368507V45.6702499l12.8525-13.1707001l13.0684004,10.7137985 c0.4228001,0.347702,1.044899,0.2901001,1.3973999-0.1278992l17.2325001-20.3720989L62,37.2237511v21.5130997H2z"}),(0,e.createElement)("path",{d:"M26,26.2631493c3.8593006,0,7-3.1406002,7-7c0-3.8592997-3.1406994-6.999999-7-6.999999 c-3.8593998,0-7,3.1406994-7,6.999999C19,23.1225491,22.1406002,26.2631493,26,26.2631493z M26,14.2631502 c2.7567997,0,5,2.2431993,5,4.999999c0,2.7569008-2.2432003,5-5,5c-2.7569008,0-5-2.2430992-5-5 C21,16.5063496,23.2430992,14.2631502,26,14.2631502z"}))),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 20 20"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z"})))),g=(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",fill:"none"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8c0-1.525.525-2.927 1.404-4.035l1.787 1.787A3.982 3.982 0 004 8c0 .834.255 1.608.691 2.248l-1.787 1.787A6.472 6.472 0 011.5 8zm2.465 5.096l1.787-1.787C6.392 11.745 7.166 12 8 12c.834 0 1.608-.255 2.248-.691l1.787 1.787A6.472 6.472 0 018 14.5a6.473 6.473 0 01-4.035-1.404zm9.131-1.06A6.472 6.472 0 0014.5 8a6.473 6.473 0 00-1.404-4.035l-1.787 1.787C11.745 6.392 12 7.166 12 8c0 .834-.255 1.608-.691 2.248l1.787 1.787zm-1.06-9.132A6.472 6.472 0 008 1.5a6.472 6.472 0 00-4.035 1.404l1.787 1.787A3.982 3.982 0 018 4c.834 0 1.608.255 2.248.691l1.787-1.787zM5.5 8a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z",clipRule:"evenodd"})),b=(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M12.9121 1.59053C12.7508 1.2312 12.3936 1 11.9997 1C11.6059 1 11.2487 1.2312 11.0874 1.59053L8.27041 7.86702L1.43062 8.60661C1.03903 8.64895 0.708778 8.91721 0.587066 9.2918C0.465355 9.66639 0.574861 10.0775 0.866772 10.342L5.96556 14.9606L4.55534 21.6942C4.4746 22.0797 4.62768 22.4767 4.94632 22.7082C5.26497 22.9397 5.68983 22.9626 6.03151 22.7667L11.9997 19.3447L17.968 22.7667C18.3097 22.9626 18.7345 22.9397 19.0532 22.7082C19.3718 22.4767 19.5249 22.0797 19.4441 21.6942L18.0339 14.9606L23.1327 10.342C23.4246 10.0775 23.5341 9.66639 23.4124 9.2918C23.2907 8.91721 22.9605 8.64895 22.5689 8.60661L15.7291 7.86702L12.9121 1.59053Z"})),y=(0,e.createElement)("svg",{viewBox:"0 0 36 36"},(0,e.createElement)("path",{d:"M18,2A16,16,0,1,0,34,18,16,16,0,0,0,18,2Zm-.22,25.85a1.65,1.65,0,1,1,1.65-1.65A1.65,1.65,0,0,1,17.78,27.85Zm1.37-8.06v1.72a1.37,1.37,0,0,1-1.3,1.36h-.11a1.34,1.34,0,0,1-1.39-1.3c0-.44,0-2.76,0-2.76a1.19,1.19,0,0,1,1.12-1.31c1.57-.12,4.18-.7,4.18-3.25,0-1.83-1.41-3.07-3.43-3.07a5.31,5.31,0,0,0-4,1.92,1.36,1.36,0,0,1-2.35-.9,1.43,1.43,0,0,1,.43-1,7.77,7.77,0,0,1,6-2.69c3.7,0,6.28,2.3,6.28,5.6C24.58,17.16,22.61,19.2,19.15,19.79Z"}),(0,e.createElement)("rect",{x:"0",y:"0",width:"36",height:"36",fillOpacity:"0"})),_=((0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M8 6.5H20V8H8V6.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 16.5H20V18H8V16.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M8 11.5H20V13H8V11.5Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 6H6V8H4V6Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 11H6V13H4V11Z",fill:"currentColor"}),(0,e.createElement)("path",{d:"M4 16H6V18H4V16Z",fill:"currentColor"})),(0,e.createElement)("svg",{width:"800px",height:"800px",viewBox:"0 0 64 64",strokeWidth:"3",stroke:"currentColor",fill:"none"},(0,e.createElement)("path",{d:"M45,14.67l-2.76,2a1,1,0,0,1-1,.11L37.65,15.3a1,1,0,0,1-.61-.76l-.66-3.77a1,1,0,0,0-1-.84H30.52a1,1,0,0,0-1,.77l-.93,3.72a1,1,0,0,1-.53.65l-3.3,1.66a1,1,0,0,1-1-.08l-3-2.13a1,1,0,0,0-1.31.12l-3.65,3.74a1,1,0,0,0-.13,1.26l1.87,2.88a1,1,0,0,1,.1.89L16.34,27a1,1,0,0,1-.68.63l-3.85,1.06a1,1,0,0,0-.74,1v4.74a1,1,0,0,0,.8,1l3.9.8a1,1,0,0,1,.72.57l1.42,3.15a1,1,0,0,1-.05.92l-2.13,3.63a1,1,0,0,0,.17,1.24L19.32,49a1,1,0,0,0,1.29.09L23.49,47a1,1,0,0,1,1-.1l3.74,1.67a1,1,0,0,1,.59.75l.66,3.79a1,1,0,0,0,1,.84h4.89a1,1,0,0,0,1-.86l.58-4a1,1,0,0,1,.58-.77l3.58-1.62a1,1,0,0,1,1,.09l3.14,2.12a1,1,0,0,0,1.3-.15L50,45.06a1,1,0,0,0,.09-1.27l-2.08-3a1,1,0,0,1-.09-1l1.48-3.43a1,1,0,0,1,.71-.59L53.77,35a1,1,0,0,0,.8-1V29.42a1,1,0,0,0-.8-1l-3.72-.78a1,1,0,0,1-.73-.62l-1.45-3.65a1,1,0,0,1,.11-.94l2.15-3.14A1,1,0,0,0,50,18l-3.71-3.25A1,1,0,0,0,45,14.67Z"}),(0,e.createElement)("circle",{cx:"32.82",cy:"31.94",r:"9.94"})));var w=function(t){let{icon:n,size:r=24,...o}=t;return(0,e.cloneElement)(n,{width:r,height:r,...o})};const E=(0,p.__)("Explore the comprehensive documentation and interactive demos.","wc-ajax-product-filter"),x=(0,p.__)("Whether you need technical support, have questions about specific features, or need assistance with custom development, I'm here to help.","wc-ajax-product-filter"),C=(0,p.__)("Your feedback is incredibly valuable to me. If you enjoy using my plugin, I kindly ask for your support by leaving a review.","wc-ajax-product-filter");var O=()=>(0,e.createElement)("div",{className:"__sidebar"},(0,e.createElement)(f.Card,null,(0,e.createElement)(f.CardHeader,null,(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:v,fill:"#00B894"}),(0,p.__)("Need Help Getting Started?","wc-ajax-product-filter"))),(0,e.createElement)(f.CardBody,null,(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:E}}),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wptools.io/docs/wc-ajax-product-filter/?utm_source=WP+Admin&utm_medium=inside+plugin&utm_campaign=WCAPF+Documentation",target:"_blank"},(0,p.__)("Documentation","wc-ajax-product-filter")),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://demos.wptools.io/wc-ajax-product-filter/?utm_source=WP+Admin&utm_medium=inside+plugin&utm_campaign=WCAPF+Demo",target:"_blank"},(0,p.__)("View Demos","wc-ajax-product-filter"))))),(0,e.createElement)(f.Card,null,(0,e.createElement)(f.CardHeader,null,(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:g,fill:"#6C5CE7"}),(0,p.__)("Support & Questions","wc-ajax-product-filter"))),(0,e.createElement)(f.CardBody,null,(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:x}}),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/wc-ajax-product-filter/",target:"_blank"},(0,p.__)("WP Support Forum","wc-ajax-product-filter")),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wptools.io/support/?utm_source=WP+Admin&utm_medium=inside+plugin&utm_campaign=WCAPF+Support",target:"_blank"},(0,p.__)("Contact me","wc-ajax-product-filter")))),(0,e.createElement)(f.Card,null,(0,e.createElement)(f.CardHeader,null,(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:b,fill:"#FD7E14"}),(0,p.__)("Like the Plugin?","wc-ajax-product-filter"))),(0,e.createElement)(f.CardBody,null,(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:C}}),(0,e.createElement)(f.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/wc-ajax-product-filter/reviews/?filter=5",target:"_blank"},(0,p.__)("Write a review","wc-ajax-product-filter")))));const S=(0,p.__)("Please fix the errors below.","wc-ajax-product-filter"),D=(0,p.__)("Filter key is in use by another entity.","wc-ajax-product-filter");function k(){return wcapf_admin_params.nonce||""}function A(){return wcapf_admin_params.pro_update_notice||null}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e;return""!==t&&(r+="-"+t),""!==n&&(r+="-"+n),r}function I(t){return t?(0,e.createElement)("span",{className:"__pro_tag"}):null}const M=wcapf_admin_params.show_v4_migration_notice,j=wcapf_admin_params.v4_migrated_form_url,P=wcapf_admin_params.v4_migration_doc_url,N=A();var R=()=>(0,e.createElement)(e.Fragment,null,M&&(0,e.createElement)("div",{className:"notice notice-info v4-update-notice",id:"wcapf-v4-migration-notice"},(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"WCAPF - WooCommerce Ajax Product Filter (v4 Migration Notice)")),(0,e.createElement)("p",null,"The WC Ajax Product Filter plugin has been updated to v4 and is now named WCAPF - WooCommerce Ajax Product Filter. We have redesigned the admin UI to provide a more intuitive user experience and refactored the codebase for improved performance and easier future enhancements. As part of the migration process, a form has been automatically created with all the existing filters from your shop. We kindly request that you visit the form and review the order of the filters."),(0,e.createElement)("p",null,(0,e.createElement)(f.Button,{variant:"link",href:j},"Review the filters")," ","|"," ",(0,e.createElement)(f.Button,{variant:"link",href:P,target:"_blank"},"Learn more about migration")," ","|"," ",(0,e.createElement)(f.Button,{variant:"link",onClick:()=>{"function"==typeof removeWCAPFMigrationNotice&&removeWCAPFMigrationNotice()}},"I understand, remove the notice"))),N&&(0,e.createElement)("div",{className:"notice notice-error pro-update-notice"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:N}})));const L="https://wordpress.org/support/plugin/wc-ajax-product-filter/reviews/?filter=5";var F=t=>{let{noticeType:n,timeSince:r}=t;const o=e=>{"function"==typeof wcapfDismissNotice&&wcapfDismissNotice(e)};let i,a,s;return"milestone-achieved"===n?(i="notice notice-info is-dismissible review-notice",a="wcapf-review-notice-for-milestone-achieved",s=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,e.createElement)("span",{className:"dashicons dashicons-smiley wcapf-dashicon-smiley"})," Great job! You have updated the filters five times. Your feedback encourages me to improve the plugin. Please consider"," ",(0,e.createElement)("a",{href:L,target:"_blank"},"writing a review on WordPress"),". Thank you in advance :)"),(0,e.createElement)("button",{type:"button",className:"notice-dismiss",onClick:()=>o("milestone-achieved")},(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice")))):(i="notice notice-info review-notice",a="wcapf-review-notice-for-time-since",s=(0,e.createElement)("p",null,"Awesome! You've been using WCAPF - WooCommerce Ajax Product Filter for more than ",r,". Would you mind taking a few seconds to give it a 5-star rating on WordPress? Thank you in advance :)"," ",(0,e.createElement)("a",{href:L,target:"_blank"},"Ok, you deserved it")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>o("permanently-dismiss-time-since")},"I already did")," ","|"," ",(0,e.createElement)("a",{href:"#",onClick:()=>o("postpone-time-since")},"No, not good enough"))),(0,e.createElement)("div",{className:i,id:a},s)};const V=wcapf_admin_params.show_review_notice_for_milestone_achieved,H=wcapf_admin_params.show_review_notice_for_time_since;var B=()=>V?(0,e.createElement)(F,{noticeType:"milestone-achieved"}):H?(0,e.createElement)(F,{noticeType:"time-since",timeSince:H}):null;const U=[{label:(0,p.__)("Forms","wc-ajax-product-filter"),id:"forms",href:wcapf_admin_params.forms_page_link},{label:(0,p.__)("Settings","wc-ajax-product-filter"),id:"settings",href:wcapf_admin_params.settings_page_link}];var $=t=>{let{view:n}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__top_bar"},(0,e.createElement)("div",{className:"__navbar"},(0,e.createElement)("h2",null,(0,e.createElement)(f.Icon,{icon:"filter",className:"__icon"}),"WCAPF - WooCommerce Ajax Product Filter"),U.map((t=>{const r=("form"===n?"forms":n)===t.id?"is-active":"";return(0,e.createElement)("a",{className:r,href:t.href,key:t.id},t.label)}))),(0,e.createElement)("div",{className:"__cta"},(0,e.createElement)("a",{target:"_blank",href:"https://wptools.io/wc-ajax-product-filter/?utm_source=WCAPF+Free&utm_medium=inside+plugin&utm_campaign=WCAPF+Pro+Upgrade",className:"__upgrade_btn"},(0,e.createElement)(f.Icon,{icon:h,size:18}),(0,p.__)("Upgrade to Pro","wc-ajax-product-filter")),(0,e.createElement)("div",{className:"__plan"},(0,e.createElement)("div",null,(0,p.__)("You are on the","wc-ajax-product-filter")),(0,e.createElement)("div",null,(0,p.__)("Free Plan"))),(0,e.createElement)("div",{className:"__version"},(0,e.createElement)("div",null,(0,p.__)("Version","wc-ajax-product-filter")),(0,e.createElement)("div",null,wcapf_admin_params.free_version)))),(0,e.createElement)(R,null),"form"!==n&&(0,e.createElement)(B,null))},z=window.wp.notices,W=window.wp.data,Y=()=>{const t=(0,W.useSelect)((e=>e(z.store).getNotices()),[]),{removeNotice:n}=(0,W.useDispatch)(z.store),r=t.filter((e=>{let{type:t}=e;return"snackbar"===t}));return(0,e.createElement)(f.SnackbarList,{notices:r,className:"components-editor-notices__snackbar",onRemove:n})},G=n(669),q=n.n(G);function X(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,W.dispatch)("core/notices").createSuccessNotice(e,{type:"snackbar",id:t,icon:n})}function K(e){(0,W.dispatch)("core/notices").removeNotice(e)}const Z="settings-save-success",J="settings-save-error";function Q(e){X(e,J,"😟")}function ee(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function te(e){return e instanceof ee(e).Element||e instanceof Element}function ne(e){return e instanceof ee(e).HTMLElement||e instanceof HTMLElement}function re(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot)}var oe=Math.max,ie=Math.min,ae=Math.round;function se(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(ne(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=ae(n.width)/a||1),i>0&&(o=ae(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function le(e){var t=ee(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ce(e){return e?(e.nodeName||"").toLowerCase():null}function ue(e){return((te(e)?e.ownerDocument:e.document)||window.document).documentElement}function de(e){return se(ue(e)).left+le(e).scrollLeft}function pe(e){return ee(e).getComputedStyle(e)}function fe(e){var t=pe(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function he(e,t,n){void 0===n&&(n=!1);var r=ne(t),o=ne(t)&&function(e){var t=e.getBoundingClientRect(),n=ae(t.width)/e.offsetWidth||1,r=ae(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=ue(t),a=se(e,o),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==ce(t)||fe(i))&&(s=function(e){return e!==ee(e)&&ne(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:le(e);var t}(t)),ne(t)?((l=se(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=de(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function me(e){var t=se(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ve(e){return"html"===ce(e)?e:e.assignedSlot||e.parentNode||(re(e)?e.host:null)||ue(e)}function ge(e){return["html","body","#document"].indexOf(ce(e))>=0?e.ownerDocument.body:ne(e)&&fe(e)?e:ge(ve(e))}function be(e,t){var n;void 0===t&&(t=[]);var r=ge(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ee(r),a=o?[i].concat(i.visualViewport||[],fe(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(be(ve(a)))}function ye(e){return["table","td","th"].indexOf(ce(e))>=0}function _e(e){return ne(e)&&"fixed"!==pe(e).position?e.offsetParent:null}function we(e){for(var t=ee(e),n=_e(e);n&&ye(n)&&"static"===pe(n).position;)n=_e(n);return n&&("html"===ce(n)||"body"===ce(n)&&"static"===pe(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ne(e)&&"fixed"===pe(e).position)return null;var n=ve(e);for(re(n)&&(n=n.host);ne(n)&&["html","body"].indexOf(ce(n))<0;){var r=pe(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Ee="top",xe="bottom",Ce="right",Oe="left",Se="auto",De=[Ee,xe,Ce,Oe],ke="start",Ae="end",Te="viewport",Ie="popper",Me=De.reduce((function(e,t){return e.concat([t+"-"+ke,t+"-"+Ae])}),[]),je=[].concat(De,[Se]).reduce((function(e,t){return e.concat([t,t+"-"+ke,t+"-"+Ae])}),[]),Pe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ne(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Re={placement:"bottom",modifiers:[],strategy:"absolute"};function Le(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Fe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Re:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Re,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:te(e)?be(e):e.contextElement?be(e.contextElement):[],popper:be(t)};var a,c,p=function(e){var t=Ne(e);return Pe.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((a=[].concat(r,s.options.modifiers),c=a.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return s.orderedModifiers=p.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:u,options:r});l.push(i||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(Le(t,n)){s.rects={reference:he(t,we(n),"fixed"===s.options.strategy),popper:me(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,l=void 0===a?{}:a,d=o.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:u})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){d(),c=!0}};if(!Le(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Ve={passive:!0},He={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=ee(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ve)})),s&&l.addEventListener("resize",n.update,Ve),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ve)})),s&&l.removeEventListener("resize",n.update,Ve)}},data:{}};function Be(e){return e.split("-")[0]}function Ue(e){return e.split("-")[1]}function $e(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ze(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Be(o):null,a=o?Ue(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Ee:t={x:s,y:n.y-r.height};break;case xe:t={x:s,y:n.y+n.height};break;case Ce:t={x:n.x+n.width,y:l};break;case Oe:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?$e(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case ke:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Ae:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var We={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ze({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Ye={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ge(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Oe,_=Ee,w=window;if(c){var E=we(n),x="clientHeight",C="clientWidth";E===ee(n)&&"static"!==pe(E=ue(n)).position&&"absolute"===s&&(x="scrollHeight",C="scrollWidth"),(o===Ee||(o===Oe||o===Ce)&&i===Ae)&&(_=xe,m-=(d&&E===w&&w.visualViewport?w.visualViewport.height:E[x])-r.height,m*=l?1:-1),o!==Oe&&(o!==Ee&&o!==xe||i!==Ae)||(y=Ce,f-=(d&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-r.width,f*=l?1:-1)}var O,S=Object.assign({position:s},c&&Ye),D=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:ae(t*r)/r||0,y:ae(n*r)/r||0}}({x:f,y:m}):{x:f,y:m};return f=D.x,m=D.y,l?Object.assign({},S,((O={})[_]=b?"0":"",O[y]=g?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",O)):Object.assign({},S,((t={})[_]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var qe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:Be(t.placement),variation:Ue(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ge(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ge(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Xe={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];ne(o)&&ce(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});ne(r)&&ce(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Ke={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=je.reduce((function(e,n){return e[n]=function(e,t,n){var r=Be(e),o=[Oe,Ee].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Oe,Ce].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},Ze={left:"right",right:"left",bottom:"top",top:"bottom"};function Je(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ze[e]}))}var Qe={start:"end",end:"start"};function et(e){return e.replace(/start|end/g,(function(e){return Qe[e]}))}function tt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&re(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function nt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rt(e,t){return t===Te?nt(function(e){var t=ee(e),n=ue(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+de(e),y:s}}(e)):te(t)?function(e){var t=se(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):nt(function(e){var t,n=ue(e),r=le(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=oe(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=oe(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===pe(o||n).direction&&(s+=oe(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(ue(e)))}function ot(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function it(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function at(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,s=n.rootBoundary,l=void 0===s?Te:s,c=n.elementContext,u=void 0===c?Ie:c,d=n.altBoundary,p=void 0!==d&&d,f=n.padding,h=void 0===f?0:f,m=ot("number"!=typeof h?h:it(h,De)),v=u===Ie?"reference":Ie,g=e.rects.popper,b=e.elements[p?v:u],y=function(e,t,n){var r="clippingParents"===t?function(e){var t=be(ve(e)),n=["absolute","fixed"].indexOf(pe(e).position)>=0&&ne(e)?we(e):e;return te(n)?t.filter((function(e){return te(e)&&tt(e,n)&&"body"!==ce(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=rt(e,n);return t.top=oe(r.top,t.top),t.right=ie(r.right,t.right),t.bottom=ie(r.bottom,t.bottom),t.left=oe(r.left,t.left),t}),rt(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(te(b)?b:b.contextElement||ue(e.elements.popper),a,l),_=se(e.elements.reference),w=ze({reference:_,element:g,strategy:"absolute",placement:o}),E=nt(Object.assign({},g,w)),x=u===Ie?E:_,C={top:y.top-x.top+m.top,bottom:x.bottom-y.bottom+m.bottom,left:y.left-x.left+m.left,right:x.right-y.right+m.right},O=e.modifiersData.offset;if(u===Ie&&O){var S=O[o];Object.keys(C).forEach((function(e){var t=[Ce,xe].indexOf(e)>=0?1:-1,n=[Ee,xe].indexOf(e)>=0?"y":"x";C[e]+=S[n]*t}))}return C}var st={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=Be(v),b=l||(g!==v&&h?function(e){if(Be(e)===Se)return[];var t=Je(e);return[et(e),t,et(t)]}(v):[Je(v)]),y=[v].concat(b).reduce((function(e,n){return e.concat(Be(n)===Se?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?je:l,u=Ue(r),d=u?s?Me:Me.filter((function(e){return Ue(e)===u})):De,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=at(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Be(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,w=t.rects.popper,E=new Map,x=!0,C=y[0],O=0;O<y.length;O++){var S=y[O],D=Be(S),k=Ue(S)===ke,A=[Ee,xe].indexOf(D)>=0,T=A?"width":"height",I=at(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),M=A?k?Ce:Oe:k?xe:Ee;_[T]>w[T]&&(M=Je(M));var j=Je(M),P=[];if(i&&P.push(I[D]<=0),s&&P.push(I[M]<=0,I[j]<=0),P.every((function(e){return e}))){C=S,x=!1;break}E.set(S,P)}if(x)for(var N=function(e){var t=y.find((function(t){var n=E.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},R=h?3:1;R>0&&"break"!==N(R);R--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function lt(e,t,n){return oe(e,ie(t,n))}var ct={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,v=at(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=Be(t.placement),b=Ue(t.placement),y=!b,_=$e(g),w="x"===_?"y":"x",E=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,O="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,S="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(E){if(i){var A,T="y"===_?Ee:Oe,I="y"===_?xe:Ce,M="y"===_?"height":"width",j=E[_],P=j+v[T],N=j-v[I],R=f?-C[M]/2:0,L=b===ke?x[M]:C[M],F=b===ke?-C[M]:-x[M],V=t.elements.arrow,H=f&&V?me(V):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=B[T],$=B[I],z=lt(0,x[M],H[M]),W=y?x[M]/2-R-z-U-S.mainAxis:L-z-U-S.mainAxis,Y=y?-x[M]/2+R+z+$+S.mainAxis:F+z+$+S.mainAxis,G=t.elements.arrow&&we(t.elements.arrow),q=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,X=null!=(A=null==D?void 0:D[_])?A:0,K=j+Y-X,Z=lt(f?ie(P,j+W-X-q):P,j,f?oe(N,K):N);E[_]=Z,k[_]=Z-j}if(s){var J,Q="x"===_?Ee:Oe,ee="x"===_?xe:Ce,te=E[w],ne="y"===w?"height":"width",re=te+v[Q],ae=te-v[ee],se=-1!==[Ee,Oe].indexOf(g),le=null!=(J=null==D?void 0:D[w])?J:0,ce=se?re:te-x[ne]-C[ne]-le+S.altAxis,ue=se?te+x[ne]+C[ne]-le-S.altAxis:ae,de=f&&se?function(e,t,n){var r=lt(e,t,n);return r>n?n:r}(ce,te,ue):lt(f?ce:re,te,f?ue:ae);E[w]=de,k[w]=de-te}t.modifiersData[r]=k}},requiresIfExists:["offset"]},ut={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Be(n.placement),l=$e(s),c=[Oe,Ce].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return ot("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:it(e,De))}(o.padding,n),d=me(i),p="y"===l?Ee:Oe,f="y"===l?xe:Ce,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],v=we(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,y=u[p],_=g-d[c]-u[f],w=g/2-d[c]/2+b,E=lt(y,w,_),x=l;n.modifiersData[r]=((t={})[x]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&tt(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dt(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function pt(e){return[Ee,Ce,xe,Oe].some((function(t){return e[t]>=0}))}var ft={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=at(t,{elementContext:"reference"}),s=at(t,{altBoundary:!0}),l=dt(a,r),c=dt(s,o,i),u=pt(l),d=pt(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},ht=Fe({defaultModifiers:[He,We,qe,Xe,Ke,st,ct,ut,ft]}),mt="tippy-content",vt="tippy-arrow",gt="tippy-svg-arrow",bt={passive:!0,capture:!0},yt=function(){return document.body};function _t(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function wt(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Et(e,t){return"function"==typeof e?e.apply(void 0,t):e}function xt(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Ct(e){return[].concat(e)}function Ot(e,t){-1===e.indexOf(t)&&e.push(t)}function St(e){return[].slice.call(e)}function Dt(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function kt(){return document.createElement("div")}function At(e){return["Element","Fragment"].some((function(t){return wt(e,t)}))}function Tt(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function It(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Mt(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function jt(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Pt={isTouch:!1},Nt=0;function Rt(){Pt.isTouch||(Pt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Lt))}function Lt(){var e=performance.now();e-Nt<20&&(Pt.isTouch=!1,document.removeEventListener("mousemove",Lt)),Nt=e}function Ft(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Vt=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Ht=Object.assign({appendTo:yt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Bt=Object.keys(Ht);function Ut(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;return o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Ht[o])?r:i),t}),{});return Object.assign({},e,t)}function $t(e,t){var n=Object.assign({},t,{content:Et(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ut(Object.assign({},Ht,{plugins:t}))):Bt).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Ht.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function zt(e,t){e.innerHTML=t}function Wt(e){var t=kt();return!0===e?t.className=vt:(t.className=gt,At(e)?t.appendChild(e):zt(t,e)),t}function Yt(e,t){At(t.content)?(zt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zt(e,t.content):e.textContent=t.content)}function Gt(e){var t=e.firstElementChild,n=St(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(mt)})),arrow:n.find((function(e){return e.classList.contains(vt)||e.classList.contains(gt)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function qt(e){var t=kt(),n=kt();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=kt();function o(n,r){var o=Gt(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Yt(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Wt(r.arrow))):i.appendChild(Wt(r.arrow)):s&&i.removeChild(s)}return r.className=mt,r.setAttribute("data-state","hidden"),Yt(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}qt.$$tippy=!0;var Xt=1,Kt=[],Zt=[];function Jt(e,t){var n,r,o,i,a,s,l,c,u=$t(e,Object.assign({},Ht,Ut(Dt(t)))),d=!1,p=!1,f=!1,h=!1,m=[],v=xt(G,u.interactiveDebounce),g=Xt++,b=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),y={id:g,reference:e,popper:kt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){if(!y.state.isDestroyed){j("onBeforeUpdate",[y,t]),W();var n=y.props,r=$t(e,Object.assign({},n,Dt(t),{ignoreAttributes:!0}));y.props=r,z(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),v=xt(G,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?Ct(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded"),N(),M(),E&&E(n,r),y.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),j("onAfterUpdate",[y,t])}},setContent:function(e){y.setProps({content:e})},show:function(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=Pt.isTouch&&!y.props.touch,o=_t(y.props.duration,0,Ht.duration);if(!(e||t||n||r||k().hasAttribute("disabled")||(j("onShow",[y],!1),!1===y.props.onShow(y)))){if(y.state.isVisible=!0,D()&&(w.style.visibility="visible"),M(),H(),y.state.isMounted||(w.style.transition="none"),D()){var i=T();Tt([i.box,i.content],0)}s=function(){var e;if(y.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=T(),n=t.box,r=t.content;Tt([n,r],o),It([n,r],"visible")}P(),N(),Ot(Zt,y),null==(e=y.popperInstance)||e.forceUpdate(),j("onMount",[y]),y.props.animation&&D()&&function(e,t){U(e,(function(){y.state.isShown=!0,j("onShown",[y])}))}(o)}},function(){var e,t=y.props.appendTo,n=k();(e=y.props.interactive&&t===yt||"parent"===t?n.parentNode:Et(t,[n])).contains(w)||e.appendChild(w),y.state.isMounted=!0,Z()}()}},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=_t(y.props.duration,1,Ht.duration);if(!(e||t||n)&&(j("onHide",[y],!1),!1!==y.props.onHide(y))){if(y.state.isVisible=!1,y.state.isShown=!1,h=!1,d=!1,D()&&(w.style.visibility="hidden"),R(),B(),M(!0),D()){var o=T(),i=o.box,a=o.content;y.props.animation&&(Tt([i,a],r),It([i,a],"hidden"))}P(),N(),y.props.animation?D()&&function(e,t){U(e,(function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,y.unmount):y.unmount()}},hideWithInteractivity:function(e){A().addEventListener("mousemove",v),Ot(Kt,v),v(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide(),y.state.isMounted&&(J(),Q().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w),Zt=Zt.filter((function(e){return e!==y})),y.state.isMounted=!1,j("onHidden",[y]))},destroy:function(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),W(),delete e._tippy,y.state.isDestroyed=!0,j("onDestroy",[y]))}};if(!u.render)return y;var _=u.render(y),w=_.popper,E=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,e._tippy=y,w._tippy=y;var x=b.map((function(e){return e.fn(y)})),C=e.hasAttribute("aria-expanded");return z(),N(),M(),j("onCreate",[y]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",v)})),y;function O(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===O()[0]}function D(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function k(){return l||e}function A(){var e,t,n=k().parentNode;return n?null!=(t=Ct(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function T(){return Gt(w)}function I(e){return y.state.isMounted&&!y.state.isVisible||Pt.isTouch||i&&"focus"===i.type?0:_t(y.props.delay,e?0:1,Ht.delay)}function M(e){void 0===e&&(e=!1),w.style.pointerEvents=y.props.interactive&&!e?"":"none",w.style.zIndex=""+y.props.zIndex}function j(e,t,n){var r;void 0===n&&(n=!0),x.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(r=y.props)[e].apply(r,t)}function P(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;Ct(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function N(){!C&&y.props.aria.expanded&&Ct(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){A().removeEventListener("mousemove",v),Kt=Kt.filter((function(e){return e!==v}))}function L(t){if(!Pt.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!jt(w,n)){if(Ct(y.props.triggerTarget||e).some((function(e){return jt(e,n)}))){if(Pt.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout((function(){p=!1})),y.state.isMounted||B())}}}function F(){f=!0}function V(){f=!1}function H(){var e=A();e.addEventListener("mousedown",L,!0),e.addEventListener("touchend",L,bt),e.addEventListener("touchstart",V,bt),e.addEventListener("touchmove",F,bt)}function B(){var e=A();e.removeEventListener("mousedown",L,!0),e.removeEventListener("touchend",L,bt),e.removeEventListener("touchstart",V,bt),e.removeEventListener("touchmove",F,bt)}function U(e,t){var n=T().box;function r(e){e.target===n&&(Mt(n,"remove",r),t())}if(0===e)return t();Mt(n,"remove",a),Mt(n,"add",r),a=r}function $(t,n,r){void 0===r&&(r=!1),Ct(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function z(){var e;S()&&($("touchstart",Y,{passive:!0}),$("touchend",q,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,Y),e){case"mouseenter":$("mouseleave",q);break;case"focus":$(Vt?"focusout":"blur",X);break;case"focusin":$("focusout",X)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),m=[]}function Y(e){var t,n=!1;if(y.state.isEnabled&&!K(e)&&!p){var r="focus"===(null==(t=i)?void 0:t.type);i=e,l=e.currentTarget,N(),!y.state.isVisible&&wt(e,"MouseEvent")&&Kt.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function G(e){var t=e.target,n=k().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=o.placement.split("-")[0],s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-r+l>i,f=r-t.bottom-c>i,h=t.left-n+u>i,m=n-t.right-d>i;return p||f||h||m}))})(r,e)&&(R(),te(e))}}function q(e){K(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function X(e){y.props.trigger.indexOf("focusin")<0&&e.target!==k()||y.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function K(e){return!!Pt.isTouch&&S()!==e.type.indexOf("touch")>=0}function Z(){J();var t=y.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,l=D()?Gt(w).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(D()){var n=T().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];D()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=ht(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:d}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return St(w.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&j("onTrigger",[y,e]),H();var t=I(!0),r=O(),o=r[0],i=r[1];Pt.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),j("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=I(!1);t?r=setTimeout((function(){y.state.isVisible&&y.hide()}),t):o=requestAnimationFrame((function(){y.hide()}))}}else B()}}function Qt(e,t){void 0===t&&(t={});var n=Ht.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Rt,bt),window.addEventListener("blur",Ft);var r,o=Object.assign({},t,{plugins:n}),i=(r=e,At(r)?[r]:function(e){return wt(e,"NodeList")}(r)?St(r):Array.isArray(r)?r:St(document.querySelectorAll(r))).reduce((function(e,t){var n=t&&Jt(t,o);return n&&e.push(n),e}),[]);return At(e)?i[0]:i}Qt.defaultProps=Ht,Qt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ht[t]=e[t]}))},Qt.currentInput=Pt,Object.assign({},Xe,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Qt.setDefaultProps({render:qt});var en=Qt,tn=n(196),nn=n.n(tn),rn=window.ReactDOM;function on(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var an="undefined"!=typeof window&&"undefined"!=typeof document;function sn(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function ln(){return an&&document.createElement("div")}function cn(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!cn(e[n],t[n]))return!1}return!0}return!1}function un(e){var t=[];return e.forEach((function(e){t.find((function(t){return cn(e,t)}))||t.push(e)})),t}var dn=an?tn.useLayoutEffect:tn.useEffect;function pn(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var fn={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||pn(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&pn(t,"remove",e.props.className)},onAfterUpdate:r}}};function hn(e){return function(t){var n,r,o=t.children,i=t.content,a=t.visible,s=t.singleton,l=t.render,c=t.reference,u=t.disabled,d=void 0!==u&&u,p=t.ignoreAttributes,f=void 0===p||p,h=(t.__source,t.__self,on(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),m=void 0!==a,v=void 0!==s,g=(0,tn.useState)(!1),b=g[0],y=g[1],_=(0,tn.useState)({}),w=_[0],E=_[1],x=(0,tn.useState)(),C=x[0],O=x[1],S=(n=function(){return{container:ln(),renders:1}},(r=(0,tn.useRef)()).current||(r.current="function"==typeof n?n():n),r.current),D=Object.assign({ignoreAttributes:f},h,{content:S.container});m&&(D.trigger="manual",D.hideOnClick=!1),v&&(d=!0);var k=D,A=D.plugins||[];l&&(k=Object.assign({},D,{plugins:v&&null!=s.data?[].concat(A,[{fn:function(){return{onTrigger:function(e,t){var n=s.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,O(n.content)}}}}]):A,render:function(){return{popper:S.container}}}));var T=[c].concat(o?[o.type]:[]);return dn((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||S.ref||ln(),Object.assign({},k,{plugins:[fn].concat(D.plugins||[])}));return S.instance=n,d&&n.disable(),a&&n.show(),v&&s.hook({instance:n,content:i,props:k,setSingletonContent:O}),y(!0),function(){n.destroy(),null==s||s.cleanup(n)}}),T),dn((function(){var e,t,n,r,o;if(1!==S.renders){var l=S.instance;l.setProps((t=l.props,n=k,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:un([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(o=n.popperOptions)?void 0:o.modifiers)||[]))})}))),null==(e=l.popperInstance)||e.forceUpdate(),d?l.disable():l.enable(),m&&(a?l.show():l.hide()),v&&s.hook({instance:l,content:i,props:k,setSingletonContent:O})}else S.renders++})),dn((function(){var e;if(l){var t=S.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;w.placement===n.placement&&w.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&w.escaped===(null==r?void 0:r.hasPopperEscaped)||E({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[w.placement,w.referenceHidden,w.escaped].concat(T)),nn().createElement(nn().Fragment,null,o?(0,tn.cloneElement)(o,{ref:function(e){S.ref=e,sn(o.ref,e)}}):null,b&&(0,rn.createPortal)(l?l(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(w),C,S.instance):i,S.container))}}var mn=function(e,t){return(0,tn.forwardRef)((function(n,r){var o=n.children,i=on(n,["children"]);return nn().createElement(e,Object.assign({},t,i),o?(0,tn.cloneElement)(o,{ref:function(e){sn(r,e),sn(o.ref,e)}}):null)}))},vn=mn(hn(en)),gn=t=>{let{content:n}=t;return(0,e.createElement)(vn,{content:n,className:"__tippy_tooltip"},(0,e.createElement)("span",{className:"__help_info"},(0,e.createElement)(f.Icon,{icon:y,size:16})))},bn=t=>{let{id:n,index:r="",label:o,isChecked:i,onChange:a,description:s,tooltip:l,isPro:c,isDisabled:u}=t;const d=T(n,r);return(0,e.createElement)("div",{className:"__form_control __checkbox_toggle"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:d},o,I(c),l&&(0,e.createElement)(gn,{content:l}))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(f.CheckboxControl,{checked:i,id:d,onChange:e=>a(e,n,r),disabled:u})))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))},yn=(e,t)=>{const{isDirty:n,saveError:r,settings:o}=e,i=()=>{n||(t({type:"SET_DIRTY",payload:!0}),wcapf_admin_params.dirty=!0),r&&t({type:"SET_ERROR",payload:""})},a=(e,n)=>{n!==o[e]&&(t({type:"UPDATE_SETTINGS",payload:{...o,[e]:n}}),i())},s=e=>{t({type:"UPDATE_SETTINGS",payload:e}),i()};return{setDirty:i,handleRadioChange:(e,t)=>{const n=e.target.value;a(t,n)},handleCheckboxChange:(e,t)=>{a(t,e?"1":"")},handleTextFieldChange:(e,t)=>{a(t,e)},handleSelectChange:(e,t)=>{a(t,e.value)},handleImageChange:(e,t)=>{const n=e.id,r=e.sizes.full.url;if(n===parseInt(o[t]))return;const i=t,a=`${t}_src`,l={...o,[i]:n,[a]:r};s(l)},handleImageRemove:e=>{const t=e,n=`${e}_src`,r={...o,[t]:"",[n]:""};s(r)},handleAuthorRolesChange:(e,t)=>{a(t,e)}}},wn=n(184),En=n.n(wn),xn=t=>{let{label:n,id:r,index:o="",value:i,options:a,isVertical:s,onChange:l,description:c,tooltip:u,isPro:d}=t;return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,I(d),u&&(0,e.createElement)(gn,{content:u}))),(0,e.createElement)("div",{className:En()("__wrapper","radio-group",r,{"radio-group-vertical":s})},(0,e.createElement)("div",{className:"__input_wrapper"},a.map(((t,n)=>{const a=T(r,o,n);return(0,e.createElement)("div",{key:a,className:"components-radio-control__option"},(0,e.createElement)("input",{id:a,className:"components-radio-control__input",type:"radio",value:t.value,onChange:e=>l(e,r,o),checked:t.value===i}),(0,e.createElement)("label",{htmlFor:a},t.label,I(t.isPro)))}))))),c&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:c}}))};const Cn=[{label:(0,p.__)("AND","wc-ajax-product-filter"),value:"and"},{label:(0,p.__)("OR","wc-ajax-product-filter"),value:"or"}],On=[{label:(0,p.__)("Always show","wc-ajax-product-filter"),value:"show"},{label:(0,p.__)("Never show","wc-ajax-product-filter"),value:"remove"}];var Sn=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r,handleRadioChange:o}=yn(t,n),{settings:{filter_relationships:i,update_count:a,remove_empty:s,remove_empty_filters:l,disable_ajax:c}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(xn,{id:"filter_relationships",label:(0,p.__)("Filter Relationships","wc-ajax-product-filter"),description:(0,p.__)("The relationship between filters. AND - products shown will match all filters, OR - products shown will match any filters.","wc-ajax-product-filter"),value:i,onChange:o,options:Cn}),(0,e.createElement)(bn,{id:"update_count",label:(0,p.__)("Dynamic Product Count","wc-ajax-product-filter"),description:(0,p.__)("Whether to update the product count number according to the applied filters.","wc-ajax-product-filter"),isChecked:a,onChange:r}),(0,e.createElement)(xn,{id:"remove_empty",label:(0,p.__)("Options with zero products","wc-ajax-product-filter"),description:(0,p.__)('Choose "Always show" to gray out filter options or "Never show" to hide filter options that have no associated products.',"wc-ajax-product-filter"),options:On,value:s,onChange:o}),(0,e.createElement)(bn,{id:"remove_empty_filters",label:(0,p.__)("Hide empty filters","wc-ajax-product-filter"),description:(0,p.__)("Whether to hide the filters that don't have any options.","wc-ajax-product-filter"),isChecked:l,onChange:r,isPro:!0}),(0,e.createElement)(bn,{id:"disable_ajax",label:(0,p.__)("Disable Ajax","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want to disable filtering via Ajax.","wc-ajax-product-filter"),isChecked:c,onChange:r}))},Dn=window.wp.primitives,kn=(0,e.createElement)(Dn.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Dn.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})),An=n(941),Tn=t=>{let{message:n}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"__pro_settings"},(0,e.createElement)("p",null,n," ",(0,e.createElement)("a",{href:"https://wptools.io/wc-ajax-product-filter/?utm_source=WCAPF+Free&utm_medium=inside+plugin&utm_campaign=WCAPF+Pro+Upgrade"},(0,p.__)("Upgrade","wc-ajax-product-filter")))))};function In(){return In=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},In.apply(this,arguments)}const Mn=t=>{let{inputId:n,id:r,index:o,initialValue:i,onChange:a,type:s="text",isDisabled:l,customClass:c,...u}=t;const[d,p]=(0,e.useState)(i);(0,e.useLayoutEffect)((()=>{p(i)}),[i]);let f="components-text-control__input";return c&&(f+=` ${c}`),(0,e.createElement)("input",In({type:s,id:n,className:f,disabled:l,value:d,onChange:e=>{p(e.target.value)},onBlur:()=>a(d,r,o)},u))},jn=t=>{let{inputId:n,id:r,index:o,initialValue:i,onChange:a,type:s="text",isDisabled:l,customClass:c,...u}=t,d="components-text-control__input";return c&&(d+=` ${c}`),(0,e.createElement)("input",In({type:s,id:n,className:d,disabled:l,value:i,onChange:e=>a(e.target.value,r,o)},u))};var Pn=t=>{let{label:n,id:r,index:o="",value:i,onChange:a,description:s,type:l="text",renderAsFormField:c=!0,isFilterKey:u=!1,isDisabled:d=!1,tooltip:p,customClass:f="",isPro:h,...m}=t;const v=T(r,o);return c?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:v},n,"field_key"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"For example, the URL will be",(0,e.createElement)("br",null),"www.site.com/shop/?color=blue&size=large",(0,e.createElement)("br",null),"where ",(0,e.createElement)("b",null,"color")," and ",(0,e.createElement)("b",null,"size")," ","are the filter keys.")}),"keyword_filter_placeholder"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable for the input field of the keyword filter.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search products"')}),"keyword_filter_prefix"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the keyword.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Keyword:". For a value "shirt", it becomes "Keyword: shirt" in the active filters.')}),"search_field_default_placeholder"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view. This will be overridden by the placeholder value of the filter itself.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Search"')}),"no_results_text"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when the search box is enabled in the list view and combobox enabled in the dropdown view.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No results for:". For a keyword "purple", the text will be "No results for: ',(0,e.createElement)("u",null,"purple"),'"')}),"combobox_no_options_text"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when combobox is enabled in the dropdown(multiselect) view and all options have been chosen.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "No options to choose"')}),"empty_filter_text"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Applicable when there are no options to filter by or the filter is empty.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "N/A"')}),"results_count_markup"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"Default: Found %d product|Found %d products",(0,e.createElement)("br",null),(0,e.createElement)("br",null),"Here two markups are separated by the pipe(|) character. The first markup is for the singular result and the second one is for the plural result. %d will be replaced with product count.")}),"sort_by_prefix"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the sort by value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Sort by:". For a value "Title", it becomes "Sort by: Title" in the active filters.')}),"per_page_prefix"===r&&(0,e.createElement)(gn,{content:(0,e.createElement)(e.Fragment,null,"This prefix will be used in the active filters, before the per page value.",(0,e.createElement)("br",null),(0,e.createElement)("br",null),'Default is "Per page:". For a value of "15", it becomes "Per page: 15" in the active filters.')}),I(h))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},u?(0,e.createElement)(Mn,In({inputId:v,id:r,index:o,initialValue:i,onChange:a,type:l,isDisabled:d,customClass:f},m)):(0,e.createElement)(jn,In({inputId:v,id:r,index:o,initialValue:i,onChange:a,type:l,isDisabled:d,customClass:f},m)),p&&(0,e.createElement)(gn,{content:p})))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}})):(0,e.createElement)(e.Fragment,null,u?(0,e.createElement)(Mn,In({inputId:v,id:r,index:o,initialValue:i,onChange:a,type:l,isDisabled:d,customClass:f},m)):(0,e.createElement)(jn,In({inputId:v,id:r,index:o,initialValue:i,onChange:a,type:l,isDisabled:d,customClass:f},m)))};const Nn=(0,p.__)("Here you can edit the filter keys globally and change the order of those in the URL.","wc-ajax-product-filter"),Rn=t=>{let{data:n,index:r}=t;const{state:o,dispatch:i}=d(),{setDirty:a}=yn(o,i),{globalFilterKeys:s}=o,{secondary_type:l,label:c,field_key:u,_field_key:p,field_key_error:h,field_key_error_:m}=n,v=h||m;let g="components-text-control__input";return v&&(g+=" __has_error"),(0,e.createElement)("div",{className:"__filter_key_wrapper",key:l},v&&(0,e.createElement)(f.Notice,{status:"error",isDismissible:!1},v),(0,e.createElement)("div",{className:"__filter_key"},(0,e.createElement)("span",{className:"__index"},r+1),(0,e.createElement)("label",{className:"__label",htmlFor:l},c),(0,e.createElement)("div",{className:"__value"},(0,e.createElement)(Pn,{id:l,value:u,placeholder:p,onChange:e=>((e,t)=>{const n=wpFeSanitizeTitle(e),r=s[t];if(n===r.field_key)return;const o=s.map(((e,r)=>r===t?{...e,field_key:n,field_key_error:"",field_key_error_:""}:e));i({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:o}),i({type:"SET_FILTER_KEYS_CHANGED",payload:!0}),a()})(e,r),renderAsFormField:!1,customClass:g,isFilterKey:!0})),(0,e.createElement)("div",{className:"__drag_handle_wrapper"},(0,e.createElement)(f.Icon,{className:"__drag_handler",icon:kn}))))};var Ln=()=>{const{state:n,dispatch:r}=d(),{setDirty:o}=yn(n,r),{globalFilterKeys:i,saveError:a}=n;return(0,e.createElement)(e.Fragment,null,!(0,t.isEmpty)(i)&&(0,e.createElement)(Tn,{message:(0,p.__)("Changing the order of filter keys is a Pro feature.","wc-ajax-product-filter")}),a&&(0,e.createElement)(f.Notice,{status:"error",isDismissible:!1},a),(0,e.createElement)("h4",{className:"__section_heading"},(0,p.__)("Global filter keys and order","wc-ajax-product-filter")),(0,t.isEmpty)(i)?(0,e.createElement)("p",{className:"__description"},(0,p.__)("Please create some filters first then come back here.","wc-ajax-product-filter")):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"__description"},Nn),(0,e.createElement)(An.ReactSortable,{list:i,setList:(e,t,n)=>{},direction:"vertical",handle:".__drag_handler",onSort:()=>{},className:"__global_filter_keys"},i.map(((t,n)=>{const{secondary_type:r}=t;return(0,e.createElement)(Rn,{data:t,index:n,key:r})})))))},Fn=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r}=yn(t,n),{settings:{debug_mode:o,disable_wcapf:i,send_anonymous_data:a,remove_data:s}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"debug_mode",label:(0,p.__)("Debug Mode","wc-ajax-product-filter"),description:(0,p.__)("This will help you to configure the plugin correctly.","wc-ajax-product-filter"),isChecked:o,onChange:r}),(0,e.createElement)(bn,{id:"disable_wcapf",label:(0,p.__)("Disable WCAPF","wc-ajax-product-filter"),description:(0,p.__)("Check this to disable WCAPF - WooCommerce Ajax Product Filter in the front end for testing purposes.","wc-ajax-product-filter"),isChecked:i,onChange:r}),(0,e.createElement)(bn,{id:"send_anonymous_data",label:(0,p.__)("Send anonymous data","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you agree to send anonymous data to the developer to make the plugin better.","wc-ajax-product-filter"),isChecked:a,onChange:r}),(0,e.createElement)(bn,{id:"remove_data",label:(0,p.__)("Remove Data","wc-ajax-product-filter"),description:(0,p.__)("Enable this option to remove all data associated with WCAPF - WooCommerce Ajax Product Filter when you delete the plugin via the <b>Plugins</b> page.","wc-ajax-product-filter"),isChecked:s,onChange:r}))};const Vn=t=>{let n,{value:r,onChange:o,disableAlpha:i,slotName:a}=t;return n=6.2<=parseFloat(wcapf_admin_params.wp_version)?{popoverProps:{noArrow:!1,__unstableSlotName:a,position:"bottom right"}}:{popoverProps:{noArrow:!1,__unstableSlotName:a},position:"bottom right"},(0,e.createElement)(f.Dropdown,In({},n,{renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,e.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},(0,e.createElement)(f.Button,{onClick:o,"aria-expanded":n,className:"components-circular-option-picker__option",style:{backgroundColor:r||"#fff",color:r||"#fff"}}))},renderContent:()=>(0,e.createElement)(f.ColorPicker,{color:r,onChange:e=>o(e),defaultValue:"#fff",enableAlpha:!i})}))};var Hn=t=>{let{label:n,value:r,onChange:o,description:i,isPro:a,disableAlpha:s=!0,renderAsFormField:l=!1,slotName:c}=t;return l?(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",null,n,I(a))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Vn,{value:r,onChange:o,disableAlpha:s,slotName:c})))),i&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:i}})):(0,e.createElement)(Vn,{value:r,onChange:o,slotName:c})};function Bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(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 $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Un(Object(n),!0).forEach((function(t){Bn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wn(e,t){if(e){if("string"==typeof e)return zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(e,t):void 0}}function Yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){a=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||Wn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qn=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Xn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kn(e,t){return Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kn(e,t)}function Zn(e){return Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zn(e)}function Jn(e){return Jn="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},Jn(e)}function Qn(e,t){if(t&&("object"===Jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function er(e){return function(e){if(Array.isArray(e))return zn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tr=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),nr=Math.abs,rr=String.fromCharCode,or=Object.assign;function ir(e){return e.trim()}function ar(e,t,n){return e.replace(t,n)}function sr(e,t){return e.indexOf(t)}function lr(e,t){return 0|e.charCodeAt(t)}function cr(e,t,n){return e.slice(t,n)}function ur(e){return e.length}function dr(e){return e.length}function pr(e,t){return t.push(e),e}var fr=1,hr=1,mr=0,vr=0,gr=0,br="";function yr(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:fr,column:hr,length:a,return:""}}function _r(e,t){return or(yr("",null,null,"",null,null,0),e,{length:-e.length},t)}function wr(){return gr=vr>0?lr(br,--vr):0,hr--,10===gr&&(hr=1,fr--),gr}function Er(){return gr=vr<mr?lr(br,vr++):0,hr++,10===gr&&(hr=1,fr++),gr}function xr(){return lr(br,vr)}function Cr(){return vr}function Or(e,t){return cr(br,e,t)}function Sr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Dr(e){return fr=hr=1,mr=ur(br=e),vr=0,[]}function kr(e){return br="",e}function Ar(e){return ir(Or(vr-1,Mr(91===e?e+2:40===e?e+1:e)))}function Tr(e){for(;(gr=xr())&&gr<33;)Er();return Sr(e)>2||Sr(gr)>3?"":" "}function Ir(e,t){for(;--t&&Er()&&!(gr<48||gr>102||gr>57&&gr<65||gr>70&&gr<97););return Or(e,Cr()+(t<6&&32==xr()&&32==Er()))}function Mr(e){for(;Er();)switch(gr){case e:return vr;case 34:case 39:34!==e&&39!==e&&Mr(gr);break;case 40:41===e&&Mr(e);break;case 92:Er()}return vr}function jr(e,t){for(;Er()&&e+gr!==57&&(e+gr!==84||47!==xr()););return"/*"+Or(t,vr-1)+"*"+rr(47===e?e:Er())}function Pr(e){for(;!Sr(xr());)Er();return Or(e,vr)}var Nr="-ms-",Rr="-moz-",Lr="-webkit-",Fr="comm",Vr="rule",Hr="decl",Br="@keyframes";function Ur(e,t){for(var n="",r=dr(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function $r(e,t,n,r){switch(e.type){case"@import":case Hr:return e.return=e.return||e.value;case Fr:return"";case Br:return e.return=e.value+"{"+Ur(e.children,r)+"}";case Vr:e.value=e.props.join(",")}return ur(n=Ur(e.children,r))?e.return=e.value+"{"+n+"}":""}function zr(e,t){switch(function(e,t){return(((t<<2^lr(e,0))<<2^lr(e,1))<<2^lr(e,2))<<2^lr(e,3)}(e,t)){case 5103:return Lr+"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 Lr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Lr+e+Rr+e+Nr+e+e;case 6828:case 4268:return Lr+e+Nr+e+e;case 6165:return Lr+e+Nr+"flex-"+e+e;case 5187:return Lr+e+ar(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Lr+e+Nr+"flex-item-"+ar(e,/flex-|-self/,"")+e;case 4675:return Lr+e+Nr+"flex-line-pack"+ar(e,/align-content|flex-|-self/,"")+e;case 5548:return Lr+e+Nr+ar(e,"shrink","negative")+e;case 5292:return Lr+e+Nr+ar(e,"basis","preferred-size")+e;case 6060:return Lr+"box-"+ar(e,"-grow","")+Lr+e+Nr+ar(e,"grow","positive")+e;case 4554:return Lr+ar(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return ar(ar(ar(e,/(zoom-|grab)/,Lr+"$1"),/(image-set)/,Lr+"$1"),e,"")+e;case 5495:case 3959:return ar(e,/(image-set\([^]*)/,Lr+"$1$`$1");case 4968:return ar(ar(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Lr+e+e;case 4095:case 3583:case 4068:case 2532:return ar(e,/(.+)-inline(.+)/,Lr+"$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(ur(e)-1-t>6)switch(lr(e,t+1)){case 109:if(45!==lr(e,t+4))break;case 102:return ar(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+Rr+(108==lr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~sr(e,"stretch")?zr(ar(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==lr(e,t+1))break;case 6444:switch(lr(e,ur(e)-3-(~sr(e,"!important")&&10))){case 107:return ar(e,":",":"+Lr)+e;case 101:return ar(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Lr+(45===lr(e,14)?"inline-":"")+"box$3$1"+Lr+"$2$3$1"+Nr+"$2box$3")+e}break;case 5936:switch(lr(e,t+11)){case 114:return Lr+e+Nr+ar(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Lr+e+Nr+ar(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Lr+e+Nr+ar(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Lr+e+Nr+e+e}return e}function Wr(e){return kr(Yr("",null,null,null,[""],e=Dr(e),0,[0],e))}function Yr(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,v=1,g=1,b=0,y="",_=o,w=i,E=r,x=y;v;)switch(h=b,b=Er()){case 40:if(108!=h&&58==x.charCodeAt(d-1)){-1!=sr(x+=ar(Ar(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:x+=Ar(b);break;case 9:case 10:case 13:case 32:x+=Tr(h);break;case 92:x+=Ir(Cr()-1,7);continue;case 47:switch(xr()){case 42:case 47:pr(qr(jr(Er(),Cr()),t,n),l);break;default:x+="/"}break;case 123*m:s[c++]=ur(x)*g;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:f>0&&ur(x)-d&&pr(f>32?Xr(x+";",r,n,d-1):Xr(ar(x," ","")+";",r,n,d-2),l);break;case 59:x+=";";default:if(pr(E=Gr(x,t,n,c,u,o,s,y,_=[],w=[],d),i),123===b)if(0===u)Yr(x,t,E,E,_,i,d,s,w);else switch(p){case 100:case 109:case 115:Yr(e,E,E,r&&pr(Gr(e,E,E,0,0,o,s,y,o,_=[],d),w),o,w,d,s,r?_:w);break;default:Yr(x,E,E,E,[""],w,0,s,w)}}c=u=f=0,m=g=1,y=x="",d=a;break;case 58:d=1+ur(x),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==wr())continue;switch(x+=rr(b),b*m){case 38:g=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(ur(x)-1)*g,g=1;break;case 64:45===xr()&&(x+=Ar(Er())),p=xr(),u=d=ur(y=x+=Pr(Cr())),b++;break;case 45:45===h&&2==ur(x)&&(m=0)}}return i}function Gr(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=dr(p),h=0,m=0,v=0;h<r;++h)for(var g=0,b=cr(e,d+1,d=nr(m=a[h])),y=e;g<f;++g)(y=ir(m>0?p[g]+" "+b:ar(b,/&\f/g,p[g])))&&(l[v++]=y);return yr(e,t,n,0===o?Vr:s,l,c,u)}function qr(e,t,n){return yr(e,t,n,Fr,rr(gr),cr(e,2,-2),0)}function Xr(e,t,n,r){return yr(e,t,n,Hr,cr(e,0,r),cr(e,r+1,-1),r)}var Kr=function(e,t,n){for(var r=0,o=0;r=o,o=xr(),38===r&&12===o&&(t[n]=1),!Sr(o);)Er();return Or(e,vr)},Zr=new WeakMap,Jr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Zr.get(n))&&!r){Zr.set(e,!0);for(var o=[],i=function(e,t){return kr(function(e,t){var n=-1,r=44;do{switch(Sr(r)){case 0:38===r&&12===xr()&&(t[n]=1),e[n]+=Kr(vr-1,t,n);break;case 2:e[n]+=Ar(r);break;case 4:if(44===r){e[++n]=58===xr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=rr(r)}}while(r=Er());return e}(Dr(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},Qr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},eo=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Hr:e.return=zr(e.value,e.length);break;case Br:return Ur([_r(e,{value:ar(e.value,"@","@"+Lr)})],r);case Vr:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Ur([_r(e,{props:[ar(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ur([_r(e,{props:[ar(t,/:(plac\w+)/,":-webkit-input-$1")]}),_r(e,{props:[ar(t,/:(plac\w+)/,":-moz-$1")]}),_r(e,{props:[ar(t,/:(plac\w+)/,Nr+"input-$1")]})],r)}return""}))}}],to=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,o,i=e.stylisPlugins||eo,a={},s=[];r=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<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,p=[$r,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[Jr,Qr].concat(i,p),u=dr(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,Ur(Wr(e?e+"{"+t.styles+"}":t.styles),f),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new tr({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h},no=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ro=function(e){for(var t,n=0,r=0,o=e.length;o>=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)},oo={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},io=/[A-Z]|^ms/g,ao=/_EMO_([^_]+?)_([^]*?)_EMO_/g,so=function(e){return 45===e.charCodeAt(1)},lo=function(e){return null!=e&&"boolean"!=typeof e},co=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=so(n=e)?n:n.replace(io,"-$&").toLowerCase()),t[e];var n}}(),uo=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ao,(function(e,t,n){return fo={name:t,styles:n,next:fo},t}))}return 1===oo[e]||so(e)||"number"!=typeof t||0===t?t:t+"px"};function po(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 fo={name:n.name,styles:n.styles,next:fo},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)fo={name:r.name,styles:r.styles,next:fo},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=po(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":lo(a)&&(r+=co(i)+":"+uo(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=po(e,t,a);switch(i){case"animation":case"animationName":r+=co(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)lo(a[l])&&(r+=co(i)+":"+uo(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=fo,i=n(e);return fo=o,po(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var fo,ho=/label:\s*([^\s;\n{]+)\s*(;|$)/g,mo=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";fo=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=po(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=po(n,t,e[a]),r&&(o+=i[a]);ho.lastIndex=0;for(var s,l="";null!==(s=ho.exec(o));)l+="-"+s[1];return{name:ro(o)+l,styles:o,next:fo}},vo={}.hasOwnProperty,go=(0,tn.createContext)("undefined"!=typeof HTMLElement?to({key:"css"}):null);go.Provider;var bo=function(e){return(0,tn.forwardRef)((function(t,n){var r=(0,tn.useContext)(go);return e(t,r,n)}))},yo=(0,tn.createContext)({}),_o=tn.useInsertionEffect?tn.useInsertionEffect:function(e){e()},wo="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Eo=function(e,t){var n={};for(var r in t)vo.call(t,r)&&(n[r]=t[r]);return n[wo]=e,n},xo=function(e){var t,n=e.cache,r=e.serialized,o=e.isStringTag;return no(n,r,o),t=function(){return function(e,t,n){no(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(n,r,o)},_o(t),null},Co=bo((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[wo],i=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=mo(i,void 0,(0,tn.useContext)(yo));a+=t.key+"-"+s.name;var l={};for(var c in e)vo.call(e,c)&&"css"!==c&&c!==wo&&(l[c]=e[c]);return l.ref=n,l.className=a,(0,tn.createElement)(tn.Fragment,null,(0,tn.createElement)(xo,{cache:t,serialized:s,isStringTag:"string"==typeof o}),(0,tn.createElement)(o,l))}));n(679);var Oo=function(e,t){var n=arguments;if(null==t||!vo.call(t,"css"))return tn.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Co,o[1]=Eo(e,t);for(var i=2;i<r;i++)o[i]=n[i];return tn.createElement.apply(null,o)};function So(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mo(t)}tn.useInsertionEffect?tn.useInsertionEffect:tn.useLayoutEffect;const Do=Math.min,ko=Math.max,Ao=Math.round,To=Math.floor,Io=e=>({x:e,y:e});function Mo(e){return No(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Po(e){var t;return null==(t=(No(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function No(e){return e instanceof Node||e instanceof jo(e).Node}function Ro(e){return e instanceof Element||e instanceof jo(e).Element}function Lo(e){return e instanceof HTMLElement||e instanceof jo(e).HTMLElement}function Fo(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot)}function Vo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ho(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ho(e){return jo(e).getComputedStyle(e)}function Bo(e){const t=function(e){if("html"===Mo(e))return e;const t=e.assignedSlot||e.parentNode||Fo(e)&&e.host||Po(e);return Fo(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(Mo(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lo(t)&&Vo(t)?t:Bo(t)}function Uo(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Bo(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=jo(o);return i?t.concat(a,a.visualViewport||[],Vo(o)?o:[],a.frameElement&&n?Uo(a.frameElement):[]):t.concat(o,Uo(o,[],n))}function $o(e){return Ro(e)?e:e.contextElement}function zo(e){const t=$o(e);if(!Lo(t))return Io(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=Ho(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Lo(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ao(n)!==i||Ao(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?Ao(n.width):n.width)/r,s=(i?Ao(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Wo=Io(0);function Yo(e){const t=jo(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Wo}function Go(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=$o(e);let a=Io(1);t&&(r?Ro(r)&&(a=zo(r)):a=zo(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==jo(e))&&t}(i,n,r)?Yo(i):Io(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=jo(i),t=r&&Ro(r)?jo(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=zo(o),t=o.getBoundingClientRect(),r=Ho(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=jo(o),o=n.frameElement}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:u,height:d,x:l,y:c})}var qo=tn.useLayoutEffect,Xo=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ko=function(){};function Zo(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Jo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Zo(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Qo=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===Jn(e)&&null!==e?[e]:[];var t},ei=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,$n({},Gn(e,Xo))},ti=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function ni(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ri(e){return ni(e)?window.pageYOffset:e.scrollTop}function oi(e,t){ni(e)?window.scrollTo(0,t):e.scrollTop=t}function ii(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ai(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ko,o=ri(e),i=t-o,a=10,s=0;function l(){var t=ii(s+=a,o,i,n);oi(e,t),s<n?window.requestAnimationFrame(l):r(e)}l()}function si(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?oi(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&oi(e,Math.max(t.offsetTop-o,0))}function li(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var ci=!1,ui={get passive(){return ci=!0}},di="undefined"!=typeof window?window:{};di.addEventListener&&di.removeEventListener&&(di.addEventListener("p",Ko,ui),di.removeEventListener("p",Ko,!1));var pi=ci;function fi(e){return null!=e}function hi(e,t,n){return e?t:n}var mi=["children","innerProps"],vi=["children","innerProps"];var gi,bi,yi,_i=function(e){return"auto"===e?"bottom":e},wi=(0,tn.createContext)(null),Ei=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,tn.useContext)(wi)||{}).setPortalPlacement,c=(0,tn.useRef)(null),u=Yn((0,tn.useState)(r),2),d=u[0],p=u[1],f=Yn((0,tn.useState)(null),2),h=f[0],m=f[1],v=s.spacing.controlHeight;return qo((function(){var e=c.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,h=p.height,m=p.top,v=n.offsetParent.getBoundingClientRect().top,g=a||ni(u=l)?window.innerHeight:u.clientHeight,b=ri(l),y=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),w=v-_,E=g-m,x=w+b,C=d-b-m,O=f-g+b+y,S=b+m-_,D=160;switch(o){case"auto":case"bottom":if(E>=h)return{placement:"bottom",maxHeight:t};if(C>=h&&!a)return i&&ai(l,O,D),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&E>=r)return i&&ai(l,O,D),{placement:"bottom",maxHeight:a?E-y:C-y};if("auto"===o||a){var k=t,A=a?w:x;return A>=r&&(k=Math.min(A-y-s,t)),{placement:"top",maxHeight:k}}if("bottom"===o)return i&&oi(l,O),{placement:"bottom",maxHeight:t};break;case"top":if(w>=h)return{placement:"top",maxHeight:t};if(x>=h&&!a)return i&&ai(l,S,D),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&w>=r){var T=t;return(!a&&x>=r||a&&w>=r)&&(T=a?w-_:x-_),i&&ai(l,S,D),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:v});p(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[r,o,i,a,n,l,v]),t({ref:c,placerProps:$n($n({},e),{},{placement:h||_i(o),maxHeight:d})})},xi=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return $n({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Ci=xi,Oi=xi,Si=["size"],Di=["innerProps","isRtl","size"],ki={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ai=function(e){var t=e.size,n=Gn(e,Si);return Oo("svg",In({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ki},n))},Ti=function(e){return Oo(Ai,In({size:20},e),Oo("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ii=function(e){return Oo(Ai,In({size:20},e),Oo("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Mi=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return $n({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},ji=Mi,Pi=Mi,Ni=function(){var e=So.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(gi||(bi=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],yi||(yi=bi.slice(0)),gi=Object.freeze(Object.defineProperties(bi,{raw:{value:Object.freeze(yi)}})))),Ri=function(e){var t=e.delay,n=e.offset;return Oo("span",{css:So({animation:"".concat(Ni," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Li=["data"],Fi=["innerRef","isDisabled","isHidden","inputClassName"],Vi={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Hi={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":$n({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Vi)},Bi=function(e){return $n({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Vi)},Ui=function(e){var t=e.children,n=e.innerProps;return Oo("div",n,t)},$i={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Oo("div",In({},ti(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Oo(Ti,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Oo("div",In({ref:o},ti(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Oo("div",In({},ti(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Oo(Ii,null))},DownChevron:Ii,CrossIcon:Ti,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Oo("div",In({},ti(e,"group",{group:!0}),s),Oo(i,In({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),Oo("div",null,t))},GroupHeading:function(e){var t=ei(e);t.data;var n=Gn(t,Li);return Oo("div",In({},ti(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Oo("div",In({},ti(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Oo("span",In({},t,ti(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=ei(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=Gn(r,Fi);return Oo("div",In({},ti(e,"input",{"input-container":!0}),{"data-value":n||""}),Oo("input",In({className:t({input:!0},s),ref:o,style:Bi(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=Gn(e,Di);return Oo("div",In({},ti($n($n({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Oo(Ri,{delay:0,offset:n}),Oo(Ri,{delay:160,offset:!0}),Oo(Ri,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Oo("div",In({},ti(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Oo("div",In({},ti(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,tn.useRef)(null),l=(0,tn.useRef)(null),c=Yn((0,tn.useState)(_i(i)),2),u=c[0],d=c[1],p=(0,tn.useMemo)((function(){return{setPortalPlacement:d}}),[]),f=Yn((0,tn.useState)(null),2),h=f[0],m=f[1],v=(0,tn.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[u]+t;n===(null==h?void 0:h.offset)&&e.left===(null==h?void 0:h.rect.left)&&e.width===(null==h?void 0:h.rect.width)||m({offset:n,rect:e})}}),[r,a,u,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);qo((function(){v()}),[v]);var g=(0,tn.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&s.current&&(l.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=$o(e),u=o||i?[...c?Uo(c):[],...Uo(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Po(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-To(u)+"px "+-To(o.clientWidth-(c+d))+"px "+-To(o.clientHeight-(u+p))+"px "+-To(c)+"px",threshold:ko(0,Do(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?Go(e):null;return l&&function t(){const r=Go(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(r,s.current,v,{elementResize:"ResizeObserver"in window}))}),[r,v]);qo((function(){g()}),[g]);var b=(0,tn.useCallback)((function(e){s.current=e,g()}),[g]);if(!t&&"fixed"!==a||!h)return null;var y=Oo("div",In({ref:b},ti($n($n({},e),{},{offset:h.offset,position:a,rect:h.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Oo(wi.Provider,{value:p},t?(0,rn.createPortal)(y,t):y)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=Gn(e,vi);return Oo("div",In({},ti($n($n({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=Gn(e,mi);return Oo("div",In({},ti($n($n({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Oo(l,{data:r,innerProps:$n($n({},ti(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Oo(c,{data:r,innerProps:$n({},ti(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Oo(u,{data:r,innerProps:$n($n({},ti(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:Ui,MultiValueLabel:Ui,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Oo("div",In({role:"button"},n),t||Oo(Ti,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Oo("div",In({},ti(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Oo("div",In({},ti(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Oo("div",In({},ti(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Oo("div",In({},ti(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Oo("div",In({},ti(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},zi=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Wi(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||zi(r)&&zi(o)))return!1;var r,o;return!0}for(var Yi={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Gi=function(e){return Oo("span",In({css:Yi},e))},qi={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Xi=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,f=s.isMulti,h=s.isOptionDisabled,m=s.isSearchable,v=s.menuIsOpen,g=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,_=s.isLoading,w=s["aria-label"],E=s["aria-live"],x=(0,tn.useMemo)((function(){return $n($n({},qi),u||{})}),[u]),C=(0,tn.useMemo)((function(){var e,n="";if(t&&x.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",p=o||s||void 0,f=p?p.map(d):[],m=$n({isDisabled:c&&h(c,a),label:u,labels:f},t);n=x.onChange(m)}return n}),[t,x,h,a,d]),O=(0,tn.useMemo)((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&x.onFocus){var s={focused:t,label:d(t),isDisabled:h(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=x.onFocus(s)}return e}),[n,r,d,h,x,o,a,c]),S=(0,tn.useMemo)((function(){var e="";if(v&&g.length&&!_&&x.onFilter){var t=b({count:o.length});e=x.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,v,x,g,b,_]),D="initial-input-focus"===(null==t?void 0:t.action),k=(0,tn.useMemo)((function(){var e="";if(x.guidance){var t=r?"value":v?"menu":"input";e=x.guidance({"aria-label":w,context:t,isDisabled:n&&h(n,a),isMulti:f,isSearchable:m,tabSelectsValue:y,isInitialFocus:D})}return e}),[w,n,r,f,h,m,v,x,a,y,D]),A=Oo(tn.Fragment,null,Oo("span",{id:"aria-selection"},C),Oo("span",{id:"aria-focused"},O),Oo("span",{id:"aria-results"},S),Oo("span",{id:"aria-guidance"},k));return Oo(tn.Fragment,null,Oo(Gi,{id:l},D&&A),Oo(Gi,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!D&&A))},Ki=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Zi=new RegExp("["+Ki.map((function(e){return e.letters})).join("")+"]","g"),Ji={},Qi=0;Qi<Ki.length;Qi++)for(var ea=Ki[Qi],ta=0;ta<ea.letters.length;ta++)Ji[ea.letters[ta]]=ea.base;var na=function(e){return e.replace(Zi,(function(e){return Ji[e]}))},ra=function(e,t){void 0===t&&(t=Wi);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(na),oa=function(e){return e.replace(/^\s+|\s+$/g,"")},ia=function(e){return"".concat(e.label," ").concat(e.value)},aa=["innerRef"];function sa(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=Yn(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=Yn(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(Gn(e,aa),"onExited","in","enter","exit","appear");return Oo("input",In({ref:t},n,{css:So({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var la=["boxSizing","height","overflow","paddingRight","position"],ca={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ua(e){e.preventDefault()}function da(e){e.stopPropagation()}function pa(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function fa(){return"ontouchstart"in window||navigator.maxTouchPoints}var ha=!("undefined"==typeof window||!window.document||!window.document.createElement),ma=0,va={capture:!1,passive:!1},ga=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},ba={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function ya(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,tn.useRef)(!1),s=(0,tn.useRef)(!1),l=(0,tn.useRef)(0),c=(0,tn.useRef)(null),u=(0,tn.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,f=c.current,h=t>0,m=d-p-u,v=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=d,v=!0,a.current=!0):!h&&-t>u&&(o&&!s.current&&o(e),f.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),d=(0,tn.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,tn.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,tn.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),h=(0,tn.useCallback)((function(e){if(e){var t=!!pi&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),m=(0,tn.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,tn.useEffect)((function(){if(t){var e=c.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,tn.useRef)({}),i=(0,tn.useRef)(null),a=(0,tn.useCallback)((function(e){if(ha){var t=document.body,n=t&&t.style;if(r&&la.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&ma<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(ca).forEach((function(e){var t=ca[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&fa()&&(t.addEventListener("touchmove",ua,va),e&&(e.addEventListener("touchstart",pa,va),e.addEventListener("touchmove",da,va))),ma+=1}}),[r]),s=(0,tn.useCallback)((function(e){if(ha){var t=document.body,n=t&&t.style;ma=Math.max(ma-1,0),r&&ma<1&&la.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&fa()&&(t.removeEventListener("touchmove",ua,va),e&&(e.removeEventListener("touchstart",pa,va),e.removeEventListener("touchmove",da,va)))}}),[r]);return(0,tn.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return Oo(tn.Fragment,null,n&&Oo("div",{onClick:ga,css:ba}),t((function(e){o(e),i(e)})))}var _a={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},wa=function(e){var t=e.name,n=e.onFocus;return Oo("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:_a,value:"",onChange:function(){}})};function Ea(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function xa(){return Ea(/^Mac/i)}var Ca={clearIndicator:Pi,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return $n({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:ji,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return $n({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return $n({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return $n($n({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Hi),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return $n({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Oi,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return $n((Bn(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Bn(n,"position","absolute"),Bn(n,"width","100%"),Bn(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return $n({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},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,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return $n({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return $n({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return $n({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Ci,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return $n({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return $n({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return $n({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return $n({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Oa={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}},Sa={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:li(),captureMenuScroll:!li(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=$n({ignoreCase:!0,ignoreAccents:!0,stringify:ia,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?oa(t):t,c=a?oa(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=ra(l),c=na(c)),"start"===s?c.substr(0,l.length)===l:c.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(e){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,unstyled:!1};function Da(e,t,n,r){return{type:"option",data:t,isDisabled:Na(e,t,n),isSelected:Ra(e,t,n),label:ja(e,t),value:Pa(e,t),index:r}}function ka(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Da(e,n,t,r)})).filter((function(t){return Ia(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Da(e,n,t,r);return Ia(e,i)?i:void 0})).filter(fi)}function Aa(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 Ta(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,er(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function Ia(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!Fa(e)||!i)&&La(e,{label:a,value:s,data:o},r)}var Ma=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},ja=function(e,t){return e.getOptionLabel(t)},Pa=function(e,t){return e.getOptionValue(t)};function Na(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Ra(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Pa(e,t);return n.some((function(t){return Pa(e,t)===r}))}function La(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Fa=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Va=1,Ha=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kn(e,t)}(s,e);var t,n,r,o,i,a=(o=s,i=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(e){return!1}}(),function(){var e,t=Zn(o);if(i){var n=Zn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qn(this,e)});function s(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=xa()||Ea(/^iPhone/i)||Ea(/^iPad/i)||xa()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var c=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(er(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter((function(e){return t.getOptionValue(e)!==o})),a=hi(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(hi(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=hi(e,o,o[0]||null);t.onChange(i,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return Ma(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return Ta(ka(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Jo.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return ja(t.props,e)},t.getOptionValue=function(e){return Pa(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=Ca[e](n,r);o.boxSizing="border-box";var i=t.props.styles[e];return i?i(o,n):o},t.getClassNames=function(e,n){var r,o;return null===(r=(o=t.props.classNames)[e])||void 0===r?void 0:r.call(o,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,$n($n({},$i),e.components);var e},t.buildCategorizedOptions=function(){return ka(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return Aa(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:$n({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ni(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return Fa(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,h=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&t.isOptionSelected(h,v))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++Va),t.state.selectValue=Qo(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),r=t.buildFocusableOptions(),o=r.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=r[o],t.state.focusedOptionId=Ma(n,r[o])}return t}return t=s,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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&si(this.menuListRef,this.focusedOptionRef)}},{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):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(si(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(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 i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Oa):$n($n({},Oa),this.props.theme):Oa}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,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 Na(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Ra(this.props,e,t)}},{key:"filterOption",value:function(e,t){return La(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,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,f=this.commonProps,h=r||this.getElementId("input"),m=$n($n($n({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?tn.createElement(c,In({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},m)):tn.createElement(sa,In({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ko,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,h=c.placeholder,m=this.state,v=m.selectValue,g=m.focusedValue,b=m.isFocused;if(!this.hasValue()||!u)return f?null:tn.createElement(s,In({},l,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),h);if(p)return v.map((function(t,a){var s=t===g,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return tn.createElement(n,In({},l,{components:{Container:r,Label:o,Remove:i},isFocused:s,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=v[0];return tn.createElement(a,In({},l,{data:y,isDisabled:d}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return tn.createElement(e,In({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?tn.createElement(e,In({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i})):null}},{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,i=this.state.isFocused;return tn.createElement(n,In({},r,{isDisabled:o,isFocused:i}))}},{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 tn.createElement(e,In({},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,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,h=p.inputValue,m=p.isLoading,v=p.loadingMessage,g=p.minMenuHeight,b=p.maxMenuHeight,y=p.menuIsOpen,_=p.menuPlacement,w=p.menuPosition,E=p.menuPortalTarget,x=p.menuShouldBlockScroll,C=p.menuShouldScrollIntoView,O=p.noOptionsMessage,S=p.onMenuScrollToTop,D=p.onMenuScrollToBottom;if(!y)return null;var k,A=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===o,f=i?void 0:function(){return e.onOptionHover(o)},h=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:h,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return tn.createElement(c,In({},u,{innerProps:v,data:o,isDisabled:i,isSelected:a,key:m,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())k=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return tn.createElement(n,In({},u,{key:s,data:o,options:i,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return A(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return A(t,"".concat(t.index))}));else if(m){var T=v({inputValue:h});if(null===T)return null;k=tn.createElement(s,u,T)}else{var I=O({inputValue:h});if(null===I)return null;k=tn.createElement(l,u,I)}var M={minMenuHeight:g,maxMenuHeight:b,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:C},j=tn.createElement(Ei,In({},u,M),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return tn.createElement(o,In({},u,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),tn.createElement(ya,{captureEnabled:f,onTopArrive:S,onBottomArrive:D,lockEnabled:x},(function(t){return tn.createElement(i,In({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:s,focusedOption:d}),k)})))}));return E||"fixed"===w?tn.createElement(a,In({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),j):j}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!r)return tn.createElement(wa,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return tn.createElement("input",{name:i,type:"hidden",value:l})}var c=s.length>0?s.map((function(t,n){return tn.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):tn.createElement("input",{name:i,type:"hidden",value:""});return tn.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return tn.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return tn.createElement(Xi,In({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return tn.createElement(r,In({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),tn.createElement(t,In({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),tn.createElement(o,In({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),tn.createElement(n,In({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=Qo(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return Aa(ka(e,t))}(e,h):[],g=d?Ta(ka(e,h),"".concat(l,"-option")):[],b=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<t.length)return t[r]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:h,focusedOption:y,focusedOptionId:Ma(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var _=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,E=a&&s;return a&&!E&&(w={value:hi(f,h,h[0]||null),options:h,action:"initial-input-focus"},E=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),$n($n($n({},m),_),{},{prevProps:e,ariaSelection:w,prevWasFocused:E})}}],n&&Xn(t.prototype,n),r&&Xn(t,r),s}(tn.Component);Ha.defaultProps=Sa;var Ba=(0,tn.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,f=e.value,h=Gn(e,qn),m=Yn((0,tn.useState)(void 0!==s?s:n),2),v=m[0],g=m[1],b=Yn((0,tn.useState)(void 0!==l?l:o),2),y=b[0],_=b[1],w=Yn((0,tn.useState)(void 0!==f?f:a),2),E=w[0],x=w[1],C=(0,tn.useCallback)((function(e,t){"function"==typeof c&&c(e,t),x(e)}),[c]),O=(0,tn.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),g(void 0!==n?n:e)}),[u]),S=(0,tn.useCallback)((function(){"function"==typeof p&&p(),_(!0)}),[p]),D=(0,tn.useCallback)((function(){"function"==typeof d&&d(),_(!1)}),[d]),k=void 0!==s?s:v,A=void 0!==l?l:y,T=void 0!==f?f:E;return $n($n({},h),{},{inputValue:k,menuIsOpen:A,onChange:C,onInputChange:O,onMenuClose:D,onMenuOpen:S,value:T})}(e);return tn.createElement(Ha,In({ref:t},n))})),Ua=Ba,$a=(0,e.createElement)(Dn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Dn.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),za=(0,e.createElement)(Dn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Dn.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const Wa={control:e=>({...e,height:30,minHeight:30}),dropdownIndicator:e=>({...e,padding:"0 4px 0 0"}),clearIndicator:e=>({...e,paddingTop:0,paddingBottom:0}),input:e=>({...e,paddingTop:0,paddingBottom:0}),singleValue:e=>({...e,marginLeft:0,marginRight:0}),menuPortal:e=>({...e,zIndex:300}),menu:e=>({...e,borderRadius:2,boxShadow:"none",border:"1px solid #ddd",marginTop:5,marginBottom:5,zIndex:300}),menuList:e=>({...e,padding:0,borderRadius:2}),option:(e,t)=>{let{isFocused:n}=t;return{...e,padding:"1px 8px",lineHeight:"28px",backgroundColor:n?"#ddd":"transparent",color:"unset"}},group:e=>({...e,paddingBottom:0}),groupHeading:e=>({...e,padding:"0 8px"})},Ya=()=>null,Ga=()=>(0,e.createElement)(f.Icon,{icon:$a,size:18}),qa=t=>(0,e.createElement)($i.DropdownIndicator,t,(0,e.createElement)(Ga,null)),Xa=t=>{const{data:n,isSelected:r}=t,{label:o,isPro:i}=n;return(0,e.createElement)($i.Option,t,(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__option_label"},o,i&&(0,e.createElement)("span",{className:"__pro_tag"})),r&&(0,e.createElement)(f.Icon,{icon:za,className:"__icon"})))},Ka=t=>{let{value:n}=t;return(0,e.createElement)("span",{className:"__info"},"[",(0,p.sprintf)((0,p.__)("ID: %s","wc-ajax-product-filter"),n),"]")},Za=t=>{const{data:n}=t,{label:r,isPro:o}=n;return(0,e.createElement)($i.SingleValue,t,r,o&&(0,e.createElement)("span",{className:"__pro_tag"}))},Ja=t=>t.data.proGroup?(0,e.createElement)($i.Group,In({},t,{className:"__pro_group"})):t.data.components?(0,e.createElement)($i.Group,In({},t,{className:"__form_components"})):(0,e.createElement)($i.Group,t),Qa=t=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"__name"},t.label),(0,e.createElement)(Ka,{value:t.value})),es=t=>t.proGroup?(0,e.createElement)("span",{className:"__pro_heading_wrapper"},(0,e.createElement)("span",{className:"__pro_heading"},(0,p.__)("Pro","wc-ajax-product-filter"))):t.components?(0,e.createElement)("span",{className:"__form_components_divider"},(0,e.createElement)("span",{className:"__form_components_heading"},(0,p.__)("Components","wc-ajax-product-filter"))):(0,e.createElement)("span",null,t.label),ts=t=>{let{inputId:n,placeholder:r,options:o,value:i,onChange:a,classes:s,isSearchable:l,portalTarget:c,maxMenuHeight:u,isDisabled:d}=t;return(0,e.createElement)(Ua,{inputId:n,components:{IndicatorSeparator:Ya,DropdownIndicator:qa,Option:Xa,SingleValue:Za,Group:Ja},formatGroupLabel:es,isSearchable:l,placeholder:r,noOptionsMessage:()=>(0,p.__)("No option found","wc-ajax-product-filter"),options:o,value:i,onChange:a,styles:Wa,className:s,isDisabled:d,menuPortalTarget:c,maxMenuHeight:u,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})})};var ns=t=>{let n,{id:r,index:o="",label:i,description:a,placeholder:s,options:l,value:c,onChange:u,isSearchable:d=!1,renderAsFormField:p=!1,inputKey:f,portalTarget:h=!1,maxMenuHeight:m,isPro:v=!1,isDisabled:g=!1,tooltip:b}=t,y="__custom_react_select __single_select";r&&(y+=` ${r}`);const _=T(r,o);return n=p?(0,e.createElement)("div",{className:"__form_control react_select_simple"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:_},i,I(v))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(ts,{key:f,inputId:_,placeholder:s,options:l,value:c,classes:y,isSearchable:d,isDisabled:g,portalTarget:h,maxMenuHeight:m,onChange:e=>u(e,r,o)}),b&&(0,e.createElement)(gn,{content:b})))),a&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:a}})):(0,e.createElement)(ts,{key:f,inputId:_,placeholder:s,options:l,value:c,classes:y,isDisabled:g,portalTarget:h,maxMenuHeight:m,onChange:e=>u(e),isSearchable:d}),n};const rs=wcapf_admin_params.enable_primary_text_color,os=[];for(let e=1;e<=11;e++)os.push({label:(0,p.sprintf)((0,p.__)("Style %d","wc-ajax-product-filter"),e),value:"style-"+e});var is=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r,handleTextFieldChange:o,handleSelectChange:i}=yn(t,n),{settings:{primary_color:a,primary_text_color:s,stylish_checkbox_radio:l,use_combobox:c,attach_combobox_on_sorting:u,improve_native_select:f,improve_scrollbar:h,improve_input_type_text_number:m,hierarchy_toggle_at_end:v,number_range_slider_style:g,star_icon_color:b,rating_star_use_fontawesome:y,remove_focus_style:_}}=t,w=(e,t)=>{o(e,t)},E=os.find((e=>g===e.value));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Hn,{label:(0,p.__)("Primary Color","wc-ajax-product-filter"),description:(0,p.__)("Set a primary color according to your theme. Default is #1C5DA1.","wc-ajax-product-filter"),value:a,onChange:e=>w(e,"primary_color"),renderAsFormField:!0}),rs&&(0,e.createElement)(Hn,{label:(0,p.__)("Primary Text Color","wc-ajax-product-filter"),description:(0,p.__)("This color will be used over the primary color for the font color.","wc-ajax-product-filter"),value:s,onChange:e=>w(e,"primary_text_color"),renderAsFormField:!0}),(0,e.createElement)(bn,{id:"stylish_checkbox_radio",label:(0,p.__)("Stylish checkbox & radio buttons","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want stylish checkbox and radio buttons instead of native design.","wc-ajax-product-filter"),isChecked:l,onChange:r}),(0,e.createElement)(bn,{id:"use_combobox",label:(0,p.__)("Enable ComboBox","wc-ajax-product-filter"),description:(0,p.__)("Turns the native select element into a custom select box with improved design and behavior.","wc-ajax-product-filter"),isChecked:c,onChange:r}),"1"===c&&(0,e.createElement)(bn,{id:"attach_combobox_on_sorting",label:(0,p.__)("ComboBox for sorting dropdown","wc-ajax-product-filter"),description:(0,p.__)("Attach ComboBox for the default sorting dropdown instead of the native select element.","wc-ajax-product-filter"),isChecked:u,onChange:r}),"1"!==c&&(0,e.createElement)(bn,{id:"improve_native_select",label:(0,p.__)("Improve native select element","wc-ajax-product-filter"),description:(0,p.__)("Uncheck this if your theme already implements the design for the native select element.","wc-ajax-product-filter"),isChecked:f,onChange:r}),(0,e.createElement)(bn,{id:"improve_scrollbar",label:(0,p.__)("Improve scrollbar","wc-ajax-product-filter"),description:(0,p.__)("Enable this to improve the scrollbar that appears when max height is applied to a filter.","wc-ajax-product-filter"),isChecked:h,onChange:r}),(0,e.createElement)(bn,{id:"improve_input_type_text_number",label:(0,p.__)("Improve input type text/number","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want to use styles from your theme for input type text/number.","wc-ajax-product-filter"),isChecked:m,onChange:r}),(0,e.createElement)(bn,{id:"hierarchy_toggle_at_end",label:(0,p.__)("Hierarchy toggle at the end","wc-ajax-product-filter"),description:(0,p.__)("Uncheck this to show the hierarchy toggle just after the item label instead of at the end of the item.","wc-ajax-product-filter"),isChecked:v,onChange:r}),(0,e.createElement)(ns,{id:"number_range_slider_style",label:(0,p.__)("Number range slider style","wc-ajax-product-filter"),description:(0,p.__)("Select the number range slider style from the available ones.","wc-ajax-product-filter"),value:E,onChange:i,options:os,maxMenuHeight:180,renderAsFormField:!0}),(0,e.createElement)(Hn,{label:(0,p.__)("Star Icon Color","wc-ajax-product-filter"),description:(0,p.__)("Set the star icon color for the rating filter(not applicable for display type: select, multiselect). Default is #FDA256.","wc-ajax-product-filter"),value:b,onChange:e=>w(e,"star_icon_color"),renderAsFormField:!0}),(0,e.createElement)(bn,{id:"rating_star_use_fontawesome",label:(0,p.__)("FontAwesome for star icons","wc-ajax-product-filter"),description:(0,p.__)("Enable this if your site loads the FontAwesome icons.","wc-ajax-product-filter"),isChecked:y,onChange:r}),(0,e.createElement)(bn,{id:"remove_focus_style",label:(0,p.__)("Remove focus style","wc-ajax-product-filter"),description:(0,p.__)("Enable this to remove the focus style from input(text) and dropdown elements.","wc-ajax-product-filter"),isChecked:_,onChange:r}))},as=()=>{const{state:t,dispatch:n}=d(),{handleCheckboxChange:r}=yn(t,n),{settings:{active_filters_on_top:o,enable_pagination_via_ajax:i,sorting_control:a,sorting_data_in_active_filters:s,use_term_slug:l,child_terms_only:c,vendor_support:u}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bn,{id:"active_filters_on_top",label:(0,p.__)("Active Filters on top of products","wc-ajax-product-filter"),description:(0,p.__)("Enable this to show the active filters on top of the products loop, only works in the standard shop loop.","wc-ajax-product-filter"),isChecked:o,onChange:r}),(0,e.createElement)(bn,{id:"enable_pagination_via_ajax",label:(0,p.__)("Pagination via Ajax","wc-ajax-product-filter"),description:(0,p.__)("Whether to enable Ajax to paginate the products. Only applicable when filtering via Ajax.","wc-ajax-product-filter"),isChecked:i,onChange:r}),(0,e.createElement)(bn,{id:"sorting_control",label:(0,p.__)("Product sorting via Ajax","wc-ajax-product-filter"),description:(0,p.__)("Whether to enable Ajax for the default product sorting dropdown. Only applicable when filtering via Ajax.","wc-ajax-product-filter"),isChecked:a,onChange:r}),(0,e.createElement)(bn,{id:"sorting_data_in_active_filters",label:(0,p.__)("Sorting data in Active Filters","wc-ajax-product-filter"),description:(0,p.__)("Enable this if you want to show the sort-by data that comes from the default product sorting dropdown in active filters.","wc-ajax-product-filter"),isChecked:s,onChange:r}),(0,e.createElement)(bn,{id:"use_term_slug",label:(0,p.__)("Use term slug","wc-ajax-product-filter"),description:(0,p.__)("Whether to use term slug instead of id as the option value.","wc-ajax-product-filter"),isChecked:l,onChange:r}),(0,e.createElement)(bn,{id:"child_terms_only",label:(0,p.__)("Child terms only","wc-ajax-product-filter"),description:(0,p.__)("Whether to show only the child terms when viewing a term archive page.","wc-ajax-product-filter"),isChecked:c,onChange:r,isPro:!0}),(0,e.createElement)(bn,{id:"vendor_support",label:(0,p.__)("Vendor support","wc-ajax-product-filter"),description:(0,p.__)("Enable this to show the store name as the option label in the post-author filter.","wc-ajax-product-filter"),isChecked:u,onChange:r,isPro:!0}))},ss=window.wp.compose;const ls=t=>{let{tabId:n,onClick:r,children:o,selected:i,...a}=t;return(0,e.createElement)(f.Button,In({role:"tab",tabIndex:i?null:-1,"aria-selected":i,id:n,onClick:r},a),o)};function cs(n){var r;let{className:o,children:i,tabs:a,initialTabName:s,orientation:l="horizontal",activeClass:c="is-active",onSelect:u=t.noop,currentTab:d,onChangeTab:p}=n;const h=(0,ss.useInstanceId)(cs,"tab-panel"),m=e=>{p(e),u(e)},v=(0,t.find)(a,{name:d}),g=`${h}-${null!==(r=null==v?void 0:v.name)&&void 0!==r?r:"none"}`;return(0,e.useEffect)((()=>{if(!(0,t.find)(a,{name:d})){const e=s||(a.length>0?a[0].name:null);p(e)}}),[a]),(0,e.createElement)("div",{className:o},(0,e.createElement)(f.NavigableMenu,{role:"tablist",orientation:l,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},a.map((n=>(0,e.createElement)(ls,{className:En()("components-tab-panel__tabs-item",n.className,{[c]:n.name===d}),tabId:`${h}-${n.name}`,"aria-controls":`${h}-${n.name}-view`,selected:n.name===d,key:n.name,onClick:(0,t.partial)(m,n.name)},n.title)))),v&&(0,e.createElement)("div",{key:g,"aria-labelledby":g,role:"tabpanel",id:`${g}-view`,className:"components-tab-panel__tab-content"},i(v)))}var us=t=>{let{label:n,id:r,index:o="",value:i,onChange:a,description:s,isPro:l,...c}=t;return(0,e.createElement)("div",{className:"__form_control number"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:T(r,o)},n,I(l))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(Pn,In({id:r,index:o,value:i,onChange:a,renderAsFormField:!1,type:"number"},c))))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))};window.wp.mediaUtils;const ds=[{label:(0,p.__)("Results container","wc-ajax-product-filter"),value:"results"},{label:(0,p.__)("Custom element","wc-ajax-product-filter"),value:"custom"},{label:(0,p.__)("None","wc-ajax-product-filter"),value:"none"}],ps=[{label:(0,p.__)("Desktop only","wc-ajax-product-filter"),value:"desktop"},{label:(0,p.__)("Mobile only","wc-ajax-product-filter"),value:"mobile"},{label:(0,p.__)("Desktop and mobile","wc-ajax-product-filter"),value:"both"}],fs=[{label:(0,p.__)("After updating the results","wc-ajax-product-filter"),value:"after"},{label:(0,p.__)("Immediately","wc-ajax-product-filter"),value:"immediately"}];var hs=()=>{const{state:t,dispatch:n}=d(),{handleSelectChange:r}=yn(t,n),{settings:{scroll_window:o,scroll_window_for:i,scroll_window_when:a}}=t,s=ds.find((e=>e.value===o)),l=ps.find((e=>e.value===i)),c=fs.find((e=>e.value===a));return(0,e.createElement)("div",{className:"__form_control __scroll_window_to"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:"scroll_window"},(0,p.__)("Scroll window to","wc-ajax-product-filter"))),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)(ns,{id:"scroll_window",value:s,options:ds,onChange:e=>r(e,"scroll_window")}),"none"!==o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ns,{id:"scroll_window_for",value:l,options:ps,onChange:e=>r(e,"scroll_window_for")}),(0,e.createElement)(ns,{id:"scroll_window_when",value:c,options:fs,onChange:e=>r(e,"scroll_window_when")}))))),(0,e.createElement)("p",{className:"description"},(0,p.__)("Determines the scroll behavior.","wc-ajax-product-filter")))};const ms=[{label:(0,p.__)("Overlay only","wc-ajax-product-filter"),value:"overlay"},{label:(0,p.__)("Overlay + Loading Icon","wc-ajax-product-filter"),value:"overlay-with-icon"}];let vs;vs=[{label:"Dual Ring",value:"Dual-Ring"},{label:"Eclipse",value:"Eclipse"},{label:"Gear",value:"Gear"},{label:"Reload",value:"Reload"},{label:"Ripple",value:"Ripple"},{label:"Rolling",value:"Rolling"},{label:"Spin",value:"Spin"},{label:"Spinner",value:"Spinner"}];const gs=[{label:(0,p.__)("All","wc-ajax-product-filter"),value:"all"},{label:(0,p.__)("Filter","wc-ajax-product-filter"),value:"filter"},{label:(0,p.__)("Paginate","wc-ajax-product-filter"),value:"paginate"}];var bs=()=>{const{state:t,dispatch:n}=d(),{handleSelectChange:r,handleCheckboxChange:o,handleTextFieldChange:i,handleImageChange:a,handleImageRemove:s}=yn(t,n),{settings:{disable_ajax:l,loading_animation:c,loading_icon:u,loading_image:h,loading_image_src:m,loading_image_size:v,loading_overlay_color:g,wait_cursor:b,scroll_to_top_offset:y,scroll_window:_,scroll_window_custom_element:w,scroll_on:E,disable_scroll_animation:x}}=t,C=ms.find((e=>c===e.value));let O;return O=vs.find((e=>e.value===u)),gs.find((e=>E===e.value)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tn,{message:(0,p.__)("There are settings available only in the Pro version.","wc-ajax-product-filter")}),"1"===l&&(0,e.createElement)(f.Notice,{status:"info",className:"ajax-disabled-info",isDismissible:!1},(0,p.__)("These settings are applicable when filtering via ajax.","wc-ajax-product-filter")),(0,e.createElement)(ns,{id:"loading_animation",label:(0,p.__)("Loading Animation","wc-ajax-product-filter"),description:(0,p.__)("Whether to show an animation while the results are fetching.","wc-ajax-product-filter"),value:C,options:ms,onChange:r,renderAsFormField:!0}),"overlay-with-icon"===c&&(0,e.createElement)(ns,{id:"loading_icon",label:(0,p.__)("Loading Icon","wc-ajax-product-filter"),description:(0,p.__)("Select the loading icon from the available icons.","wc-ajax-product-filter"),value:O,options:vs,onChange:r,renderAsFormField:!0}),!1,"overlay-with-icon"===c&&(0,e.createElement)(us,{id:"loading_image_size",label:(0,p.__)("Icon Size","wc-ajax-product-filter"),description:(0,p.__)("Adjust the loading icon size in px. Default is 60.","wc-ajax-product-filter"),value:v,onChange:i,type:"number"}),!1,"none"!==c&&(0,e.createElement)(bn,{id:"wait_cursor",label:(0,p.__)("Wait Cursor","wc-ajax-product-filter"),description:(0,p.__)("Enable this to show a wait cursor while the results are fetching.","wc-ajax-product-filter"),isChecked:b,onChange:o}),(0,e.createElement)(hs,null),"custom"===_&&(0,e.createElement)(Pn,{id:"scroll_window_custom_element",label:(0,p.__)("Custom element identifier","wc-ajax-product-filter"),description:(0,p.__)("Give a valid id/class of the HTML element you want to scroll to.","wc-ajax-product-filter"),value:w,onChange:i,placeholder:"#id or .class"}),"none"!==_&&(0,e.createElement)(e.Fragment,null,!1,(0,e.createElement)(us,{id:"scroll_to_top_offset",label:(0,p.__)("Scroll to top offset","wc-ajax-product-filter"),description:(0,p.__)("If you have a sticky header or some space that you want to include in the viewport then give the height of those in px.","wc-ajax-product-filter"),value:y,onChange:i,type:"number"}),!1))},ys=Symbol("useLazyRef empty value"),_s=function(e){var t=tn.useRef(e);return qo((function(){t.current=e})),t};function ws(e){return{isOk:()=>!0,isOkAnd:t=>t(e),isErr:()=>!1,isErrAnd:()=>!1,ok:()=>Cs(e),err:()=>xs(),map:t=>ws(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),mapErr:()=>ws(e),expect:()=>e,expectErr:e=>{throw new Error(e)},unwrap:()=>e,unwrapErr:()=>{throw new Error(`${e}`)},unwrapOr:()=>e,unwrapOrElse:()=>e,and:e=>e,andThen:t=>t(e),or:()=>ws(e),orElse:()=>ws(e)}}function Es(e){return{isOk:()=>!1,isOkAnd:()=>!1,isErr:()=>!0,isErrAnd:t=>t(e),ok:()=>xs(),err:()=>Cs(e),map:()=>Es(e),mapOr:e=>e,mapOrElse:t=>t(e),mapErr:t=>Es(t(e)),expect:e=>{throw new Error(e)},expectErr:()=>e,unwrap:()=>{throw new Error(`${e}`)},unwrapErr:()=>e,unwrapOr:e=>e,unwrapOrElse:t=>t(e),and:()=>Es(e),andThen:()=>Es(e),or:e=>e,orElse:t=>t(e)}}function xs(){const e={and:()=>xs(),andThen:()=>xs(),expect:e=>{throw new Error(e)},filter:()=>e,isSome:()=>!1,isSomeAnd:()=>!1,isNone:()=>!0,map:()=>xs(),mapOr:e=>e,mapOrElse:e=>e(),okOr:e=>Es(e),okOrElse:e=>Es(e()),or:e=>e,orElse:e=>e(),unwrap:()=>{throw new Error("panic! call `unwrap` on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),xor:t=>t.isSome()?t:e};return e}function Cs(e){const t={and:e=>e,andThen:t=>t(e),expect:()=>e,filter:n=>n(e)?t:xs(),isSome:()=>!0,isSomeAnd:t=>t(e),isNone:()=>!1,map:t=>Cs(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),okOr:()=>ws(e),okOrElse:()=>ws(e),or:()=>t,orElse:()=>t,unwrap:()=>e,unwrapOr:()=>e,unwrapOrElse:()=>e,xor:e=>e.isNone()?t:xs()};return t}var Os=setTimeout;function Ss(e,t){var n=t.useCachedSetTimeout?Os:setTimeout;return new Promise((function(t){n(t,e)}))}var Ds,ks,As=n(601),Ts=n(893),Is=(e,t)=>[...e,...t],Ms=(e,t,n)=>e-t-10<n,js=e=>({isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,additional:e.additional}),Ps='[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.',Ns=async(e,t,n,r,o,i)=>{const a=t.current.inputValue,s=!n.current[a],l=s?js(t.current):n.current[a];if(l.isLoading||!l.hasMore)return;if(o((e=>({...e,[a]:{...l,isLoading:!0}}))),r>0&&"input-change"===e){await function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useCachedSetTimeout,n=Ss(e,{useCachedSetTimeout:t});function r(e){return n.then((function(){return e}))}return r.then=function(){return n.then.apply(n,arguments)},r.catch=Promise.resolve().catch,r}(r);const e=t.current.inputValue;if(a!==e)return void o((e=>{if(s){const{[a]:t,...n}=e;return n}return{...e,[a]:{...l,isLoading:!1}}}))}const{loadOptions:c}=t.current,u=await(d=Promise.resolve().then((()=>c(a,l.options,l.additional))),d.then((e=>ws(e)),(e=>Es(e))));var d;if(u.isErr())return void o((e=>({...e,[a]:{...l,isLoading:!1}})));const p=u.unwrap();if((e=>{if(!(e=>{if(!e)return!1;const{options:t,hasMore:n}=e;return!!Array.isArray(t)&&("boolean"==typeof n||void 0===n)})(e))throw console.error(Ps,"Received:",e),new Error(Ps);return!0})(p)){const{options:e,hasMore:t}=p,n=Object.hasOwn(p,"additional")?p.additional:l.additional;o((r=>({...r,[a]:{...l,options:i(l.options,e,n),hasMore:!!t,isLoading:!1,isFirstLoad:!1,additional:n}})))}},Rs=e=>e+1,Ls=(e,t=[])=>{const{defaultOptions:n,loadOptionsOnMenuOpen:r=!0,debounceTimeout:o=0,inputValue:i,menuIsOpen:a,filterOption:s=null,reduceOptions:l=Is,shouldLoadMore:c=Ms}=e,u=function(){var e=(0,tn.useRef)(!1);return(0,tn.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),d=_s(l),p=_s(r),f=(0,tn.useRef)(!0),h=(0,tn.useRef)(e);h.current=e;const[m,v]=(0,tn.useState)(0),g=(t=>{const n=(0,tn.useRef)(ys);return n.current===ys&&(n.current=(({options:e,defaultOptions:t,additional:n,defaultAdditional:r})=>{const o=!0===t?null:Array.isArray(t)?t:e;return o?{"":{isFirstLoad:!1,isLoading:!1,options:o,hasMore:!0,additional:r||n}}:{}})(e)),n})(),b=_s((e=>{Ns(e,h,g,o,(e=>{g.current=e(g.current),u.current&&v(Rs)}),d.current)})),y=(0,tn.useCallback)((()=>{const e=h.current.inputValue;g.current[e]&&b.current("menu-scroll")}),[b,g]);(0,tn.useEffect)((()=>{f.current?f.current=!1:(g.current={},v(Rs)),!0===n&&b.current("autoload")}),t),(0,tn.useEffect)((()=>{a&&!g.current[i]&&b.current("input-change")}),[b,i,a,g]),(0,tn.useEffect)((()=>{a&&!g.current[""]&&p.current&&b.current("menu-toggle")}),[b,p,a,g]);const _=g.current[i]||js(e);return{handleScrolledToBottom:y,shouldLoadMore:c,filterOption:s,isLoading:_.isLoading,isFirstLoad:_.isFirstLoad,options:_.options}},Fs=(Ds=$i.MenuList,function(e){const{selectProps:t,innerRef:n}=e,{handleScrolledToBottom:r,shouldLoadMore:o}=t,i=(0,tn.useRef)(),a=(0,tn.useRef)(null),s=(0,tn.useCallback)((()=>{const e=a.current;if(!e)return!1;const{scrollTop:t,scrollHeight:n,clientHeight:r}=e;return o(n,r,t)}),[o]),l=(0,tn.useCallback)((()=>{s()&&r&&r()}),[s,r]),c=(0,tn.useMemo)((()=>{const e=()=>{l(),i.current=setTimeout(e,300)};return e}),[l]);return(0,tn.useEffect)((()=>(c(),()=>{i.current&&clearTimeout(i.current)})),[]),(0,Ts.jsx)(Ds,{...e,innerRef:(0,As.Z)(n,a)})}),Vs=[],Hs={},Bs=(ks=Ua,function(e){const{components:t=Hs,selectRef:n,isLoading:r,cacheUniqs:o=Vs,...i}=e,a=((e,t=[])=>{const{inputValue:n,menuIsOpen:r,defaultInputValue:o,defaultMenuIsOpen:i,onInputChange:a,onMenuClose:s,onMenuOpen:l}=e,[c,u]=(0,tn.useState)(o||""),[d,p]=(0,tn.useState)(!!i),f="string"==typeof n?n:c,h="boolean"==typeof r?r:d,m=(0,tn.useCallback)(((e,t)=>{a&&a(e,t),u(e)}),[a]),v=(0,tn.useCallback)((()=>{s&&s(),p(!1)}),[s]),g=(0,tn.useCallback)((()=>{l&&l(),p(!0)}),[l]);return{...Ls({...e,inputValue:f,menuIsOpen:h},t),inputValue:f,menuIsOpen:h,onInputChange:m,onMenuClose:v,onMenuOpen:g}})(i,o),s=(e=>(0,tn.useMemo)((()=>({MenuList:Fs,...e})),[e]))(t),l="boolean"==typeof r?r:a.isLoading;return(0,Ts.jsx)(ks,{...e,...a,isLoading:l,components:s,ref:n})}),Us=t=>{let{label:n,id:r,index:o="",description:i,value:a,onChange:s,taxonomy:l,onlyParent:c=!1,isMultiple:u=!1,type:d="taxonomy",isUserRoles:h=!1,options:m,showIncludeChildren:v=!1,checkboxId:g,checkIsChecked:b,onCheckChange:y,renderAsFormField:_=!0,inputKey:w,inputPlaceholder:E,inputNoOptionsMessage:x,maxMenuHeight:C}=t;const O=async(e,t,n)=>{let r,{page:o}=n;r="author"===d?{action:"wcapf_get_authors_for_dropdown",keyword:e,page:o}:"page"===d?{action:"wcapf_get_pages_for_dropdown",keyword:e,page:o}:"product"===d?{action:"wcapf_get_products_for_dropdown",keyword:e,page:o}:{action:"wcapf_get_terms_for_dropdown",taxonomy:l,only_parent:c,keyword:e,page:o},r.nonce=k();try{const e=(await q().get(wcapf_admin_params.ajaxurl,{params:r})).data.data;return{options:e,hasMore:e.length>=1,additional:{page:o+1}}}catch(e){console.log(e)}};let S,D,A;S=u?`__custom_react_select full-width ${r}`:`__custom_react_select fixed-width ${r}`,"author"===d?h?(D=(0,p.__)("Start typing to find the role","wc-ajax-product-filter"),A=(0,p.__)("No roles found","wc-ajax-product-filter")):(D=(0,p.__)("Start typing to find the author","wc-ajax-product-filter"),A=(0,p.__)("No authors found","wc-ajax-product-filter")):(D=(0,p.__)("Start typing to find the term","wc-ajax-product-filter"),A=(0,p.__)("No terms found","wc-ajax-product-filter")),E&&(D=E),x&&(A=x);const I=(0,p.__)("Loading...","wc-ajax-product-filter"),M=T(r,o),j=()=>h?(0,e.createElement)(Ua,{inputId:M,value:a,options:m,placeholder:D,noOptionsMessage:()=>A,loadingMessage:()=>I,formatOptionLabel:Qa,isMulti:u,maxMenuHeight:C,closeMenuOnSelect:!u,onChange:e=>s(e,r,o),isClearable:!0,className:S,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})}):(0,e.createElement)(Bs,{key:w,inputId:M,value:a,loadOptions:O,additional:{page:1},placeholder:D,noOptionsMessage:()=>A,loadingMessage:()=>I,formatOptionLabel:Qa,isMulti:u,maxMenuHeight:C,closeMenuOnSelect:!u,onChange:e=>s(e,r,o),isClearable:!0,className:S,classNamePrefix:"__react_select",theme:e=>({...e,borderRadius:0,colors:{...e.colors,primary:"#007cba"}})});return _?(0,e.createElement)("div",{className:"__form_control react_select"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:M},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},j(),v&&(()=>{let t;return t="direct_child_only"===g?(0,p.__)("Direct child only","wc-ajax-product-filter"):(0,p.__)("Include children","wc-ajax-product-filter"),(0,e.createElement)(f.CheckboxControl,{label:t,className:"__include_child_terms",checked:b,onChange:e=>y(e,g,o)})})()))),i&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:i}})):j()},$s=t=>{let{label:n,id:r,index:o="",value:i,onChange:a,description:s,...l}=t;const c=T(r,o);return(0,e.createElement)("div",{className:"__form_control"},(0,e.createElement)("div",{className:"__inner"},(0,e.createElement)("div",{className:"__label"},(0,e.createElement)("label",{htmlFor:c},n)),(0,e.createElement)("div",{className:"__wrapper"},(0,e.createElement)("div",{className:"__input_wrapper"},(0,e.createElement)("textarea",In({className:"components-textarea-control__input",id:c,value:i,onChange:e=>a(e.target.value,r,o)},l))))),s&&(0,e.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}}))};const zs=wcapf_admin_params.user_roles;var Ws=()=>{const{state:t,dispatch:n}=d(),{handleTextFieldChange:r,handleCheckboxChange:o,handleAuthorRolesChange:i}=yn(t,n),{settings:{keyword_filter_placeholder:a,keyword_filter_prefix:s,search_field_default_placeholder:l,no_results_text:c,combobox_no_options_text:u,empty_filter_text:f,show_more_btn_label:h,show_less_btn_label:m,clear_button_label:v,clear_all_button_label:g,reset_button_label:b,results_count_markup:y,sort_by_prefix:_,per_page_prefix:w,input_delay:E,pagination_container:x,more_selectors:C,custom_scripts:O,author_roles:S,multiple_form_locations:D}}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tn,{message:(0,p.__)("There are settings available only in the Pro version.","wc-ajax-product-filter")}),(0,e.createElement)("h4",{className:"__section_heading"},(0,p.__)("Phrases","wc-ajax-product-filter")),(0,e.createElement)("p",{className:"__description"},(0,p.__)("Here you can change the phrases shown in the front end. Leave empty to use the default.","wc-ajax-product-filter")),(0,e.createElement)(Pn,{id:"keyword_filter_placeholder",label:(0,p.__)("Keyword filter placeholder","wc-ajax-product-filter"),value:a,onChange:r}),(0,e.createElement)(Pn,{id:"keyword_filter_prefix",label:(0,p.__)("Keyword filter prefix","wc-ajax-product-filter"),value:s,onChange:r}),(0,e.createElement)(Pn,{id:"search_field_default_placeholder",label:(0,p.__)("Search field placeholder","wc-ajax-product-filter"),value:l,onChange:r}),(0,e.createElement)(Pn,{id:"no_results_text",label:(0,p.__)("No results text","wc-ajax-product-filter"),value:c,onChange:r}),(0,e.createElement)(Pn,{id:"combobox_no_options_text",label:(0,p.__)("No options text","wc-ajax-product-filter"),value:u,onChange:r}),(0,e.createElement)(Pn,{id:"empty_filter_text",label:(0,p.__)("Empty filter text","wc-ajax-product-filter"),value:f,onChange:r}),(0,e.createElement)(Pn,{id:"show_more_btn_label",label:(0,p.__)("Show more button label","wc-ajax-product-filter"),value:h,onChange:r}),(0,e.createElement)(Pn,{id:"show_less_btn_label",label:(0,p.__)("Show less button label","wc-ajax-product-filter"),value:m,onChange:r}),!1,(0,e.createElement)(Pn,{id:"clear_all_button_label",label:(0,p.__)("Clear All button label","wc-ajax-product-filter"),value:g,onChange:r}),(0,e.createElement)(Pn,{id:"reset_button_label",label:(0,p.__)("Reset button label","wc-ajax-product-filter"),value:b,onChange:r}),!1,(0,e.createElement)(Pn,{id:"sort_by_prefix",label:(0,p.__)("Sort by prefix","wc-ajax-product-filter"),value:_,onChange:r}),!1,(0,e.createElement)("div",{className:"__form_fields_separator"}),(0,e.createElement)(us,{id:"input_delay",label:(0,p.__)("Input Delay","wc-ajax-product-filter"),description:(0,p.__)("Specify the delay (in milliseconds) before triggering the filter action when the user interacts with the input fields. Default is 300.","wc-ajax-product-filter"),value:E,onChange:r,type:"number",min:0}),(0,e.createElement)(Pn,{id:"pagination_container",label:(0,p.__)("Pagination container","wc-ajax-product-filter"),description:(0,p.__)("The css class of the pagination element, supports multiple classes separated by commas. In most cases, you don't need to change this. Applicable when filtering via Ajax.","wc-ajax-product-filter"),value:x,onChange:r}),!1,(0,e.createElement)($s,{id:"custom_scripts",label:(0,p.__)("JavaScript after Ajax update","wc-ajax-product-filter"),description:(0,p.__)("You may want to run javascript codes after updating the shop loop via Ajax. Leave it empty if you don't understand.","wc-ajax-product-filter\t"),value:O,onChange:r,rows:3}),(0,e.createElement)(Us,{id:"author_roles",label:(0,p.__)("Author Roles","wc-ajax-product-filter"),description:(0,p.__)("Users having any of these roles will be available on the <b>Available Options</b> modal of the post-author filter.","wc-ajax-product-filter"),isMultiple:!0,value:S,onChange:i,type:"author",isUserRoles:!0,options:zs,maxMenuHeight:100}),!1)};const Ys=A();var Gs=t=>{let{isOpen:n,closeModal:r}=t;return n&&(0,e.createElement)(f.Modal,{onRequestClose:r,__experimentalHideHeader:!0,className:"__pro_update_modal"},(0,e.createElement)("h3",null,"WCAPF - WooCommerce Ajax Product Filter Pro (Update Required)"),(0,e.createElement)("div",{className:"__separator"}),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:Ys}}),(0,e.createElement)("div",{className:"__buttons"},(0,e.createElement)(f.Button,{variant:"secondary",onClick:r},(0,p.__)("Cancel","wc-ajax-product-filter"))))};const qs=[{name:"general",title:(0,p.__)("General","wc-ajax-product-filter")},{name:"integration",title:(0,p.__)("Integration","wc-ajax-product-filter")},{name:"appearance",title:(0,p.__)("Appearance","wc-ajax-product-filter")},{name:"loader-scrollTo",title:(0,p.__)("Loader & Scroll To","wc-ajax-product-filter")},{name:"filter-keys",title:(0,p.__)("Filter Keys","wc-ajax-product-filter")},{name:"others",title:(0,p.__)("Others","wc-ajax-product-filter")},{name:"miscellaneous",title:(0,p.__)("Miscellaneous","wc-ajax-product-filter")}];var Xs=()=>{const{state:n,dispatch:o}=d(),{isDirty:i,currentTab:a,settings:s,globalFilterKeys:l,filterKeysChanged:c}=n,[u,h]=(0,e.useState)(!1),[v,g]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{i&&(K(Z),K(J))}),[i]),(0,e.createElement)("div",{className:"__wcapf_admin"},(0,e.createElement)($,{view:"settings"}),(0,e.createElement)(Gs,{isOpen:v,closeModal:()=>{g(!1)}}),(0,e.createElement)("div",{className:"__wcapf_layout"},(0,e.createElement)("div",{className:"__main"},(0,e.createElement)("div",{className:"__content"},(0,e.createElement)("div",{className:"__settings_wrapper"},(0,e.createElement)("div",{className:"__settings_header"},(0,e.createElement)("h2",null,(0,e.createElement)(w,{icon:_}),(0,p.__)("Settings","wc-ajax-product-filter")),(0,e.createElement)(f.Button,{variant:i?"primary":"secondary",disabled:!i||u,isBusy:u,onClick:()=>{if(A())return void g(!0);const{isValid:e,validatedFilterKeys:n}=(()=>{o({type:"SET_ERROR",payload:""});const e=[];let n=!0;return l.forEach(((r,o)=>{const i=l.filter(((e,t)=>o!==t)),a=(0,t.omit)(r,["field_key_error","field_key_error_"]),{field_key:s}=a;s&&(0,t.find)(i,{field_key:s})&&(a.field_key_error=D,n=!1),e.push(a)})),o({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:e}),n||(o({type:"SET_ERROR",payload:S}),"filter-keys"!==a&&o({type:"SET_CURRENT_TAB",payload:"filter-keys"})),{isValid:n,validatedFilterKeys:e}})(),i=c?"1":"";if(!e)return;h(!0);const u=new FormData;u.append("action","wcapf_save_settings"),u.append("nonce",k()),u.append("settings",JSON.stringify((()=>{const e=[];"disable"===s.remove_empty&&e.push("remove_empty"),"none"===s.loading_animation&&e.push("loading_animation"),"custom"===s.loading_icon&&e.push("loading_icon");const n=(0,t.pick)(r(),e),o={...s,...n};return(0,t.omit)(o,["remove_empty_filters","child_terms_only","slide_out_panel_position","loading_image","loading_image_src","loading_overlay_color","scroll_on","disable_scroll_animation","more_selectors","multiple_form_locations","filter_keys_order"])})())),u.append("filter_keys",JSON.stringify(n)),u.append("update_filter_keys",i),q().post(wcapf_admin_params.ajaxurl,u).then((e=>{h(!1);const{data:{data:n,success:r}}=e;if(r)o({type:"UPDATE_SETTINGS",payload:n.settings}),o({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:n.global_filter_keys}),o({type:"SET_DIRTY",payload:!1}),wcapf_admin_params.dirty=!1,o({type:"SET_FILTER_KEYS_CHANGED",payload:!1}),function(e){X(e,Z,"👌")}((0,p.__)("Settings saved successfully","wc-ajax-product-filter"));else if(n.errors){o({type:"SET_ERROR",payload:S});const e=n.errors;console.log(e);const r=l.map(((n,r)=>{const o=(0,t.find)(e,{order:r});if(o){const{key:e,message:t}=o;return{...n,[e]:t,field_key_error:""}}return{...n,field_key_error:""}}));o({type:"UPDATE_GLOBAL_FILTER_KEYS",payload:r}),"filter-keys"!==a&&o({type:"SET_CURRENT_TAB",payload:"filter-keys"})}else Q(n)})).catch((e=>{h(!1),Q(e.message)}))}},(0,e.createElement)(w,{icon:m}),(0,p.__)("Save","wc-ajax-product-filter"))),(0,e.createElement)(cs,{currentTab:a,onChangeTab:e=>{o({type:"SET_CURRENT_TAB",payload:e})},className:"__tab_panel __settings_tab",activeClass:"active-tab",tabs:qs},(t=>{let{name:n}=t;return"general"===n?(0,e.createElement)(Sn,null):"integration"===n?(0,e.createElement)(as,null):"appearance"===n?(0,e.createElement)(is,null):"loader-scrollTo"===n?(0,e.createElement)(bs,null):"filter-keys"===n?(0,e.createElement)(Ln,null):"others"===n?(0,e.createElement)(Ws,null):"miscellaneous"===n?(0,e.createElement)(Fn,null):void 0})))),(0,e.createElement)(O,null)),(0,e.createElement)(Y,null)))};const Ks=()=>(0,e.createElement)(u,null,(0,e.createElement)(Xs,null));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("wcapf-settings-admin-ui");t&&(0,e.render)((0,e.createElement)(e.StrictMode,null,(0,e.createElement)(Ks,null)),t)}))}()}();
  • wc-ajax-product-filter/trunk/languages/wc-ajax-product-filter.pot

    r2958786 r3127796  
    1 # Copyright (C) 2023 wptools.io
     1# Copyright (C) 2024 wptools.io
    22# This file is distributed under the GPL v3 or later.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WCAPF - WooCommerce Ajax Product Filter 4.2.0\n"
     5"Project-Id-Version: WCAPF - WooCommerce Ajax Product Filter 4.2.1\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/wc-ajax-product-filter-dev\n"
    8 "POT-Creation-Date: 2023-08-26 18:38:59+00:00\n"
     8"POT-Creation-Date: 2024-07-30 04:49:30+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "PO-Revision-Date: 2023-MO-DA HO:MI+ZONE\n"
     12"PO-Revision-Date: 2024-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    1414"Language-Team: LANGUAGE <LL@li.org>\n"
  • wc-ajax-product-filter/trunk/readme.txt

    r2995074 r3127796  
    33Tags: product filter, ajax product filter, ajax filter, woocommerce ajax product filter, woocommerce product filter, woocommerce ajax filter, woocommerce filter, products filter, ajax filter, advanced products filter, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, ajax product search, woocommerce product sorting, woocommerce, wc ajax product filter, wc product filter, wc ajax filter, wc filter
    44Requires at least: 6.0
    5 Tested up to: 6.4.1
    6 Stable tag: 4.2.0
     5Tested up to: 6.6
     6Stable tag: 4.2.1
    77Requires PHP: 7.2
    88License: GPLv3
     
    175175== Changelog ==
    176176
     177= 4.2.1 (30 July 2024) =
     178
     179* Compatibility – Ensured plugin compatibility with WordPress 6.6
     180
    177181= 4.2.0 (27 August 2023) =
    178182
  • wc-ajax-product-filter/trunk/wc-ajax-product-filter.php

    r2958786 r3127796  
    44 * Plugin URI:        https://wptools.io/wc-ajax-product-filter/?utm_source=plugins+listing&utm_medium=wcapf+free&utm_campaign=WCAPF+Pro+Details
    55 * Description:       A plugin to filter WooCommerce products with AJAX request.
    6  * Version:           4.2.0
     6 * Version:           4.2.1
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.2
     
    3636// Defines constant WCAPF_VERSION
    3737if ( ! defined( 'WCAPF_VERSION' ) ) {
    38     define( 'WCAPF_VERSION', '4.2.0' );
     38    define( 'WCAPF_VERSION', '4.2.1' );
    3939}
    4040
Note: See TracChangeset for help on using the changeset viewer.