table.js 64.6 KB
(()=>{var e={390:(e,t,n)=>{"use strict";n.r(t),n.d(t,{disableBodyScroll:()=>v,clearAllBodyScrollLocks:()=>g,enableBodyScroll:()=>y});var r=!1;if("undefined"!=typeof window){var o={get passive(){r=!0}};window.addEventListener("testPassive",null,o),window.removeEventListener("testPassive",null,o)}var s="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),i=[],a=!1,c=-1,l=void 0,u=void 0,f=void 0,d=function(e){return i.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},p=function(e){var t=e||window.event;return!!d(t.target)||t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1)},h=function(){void 0!==f&&(document.body.style.paddingRight=f,f=void 0),void 0!==l&&(document.body.style.overflow=l,l=void 0)},m=function(){if(void 0!==u){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=u.position,document.body.style.top=u.top,document.body.style.left=u.left,window.scrollTo(t,e),u=void 0}},v=function(e,t){if(e){if(!i.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};i=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(i),[n]),s?window.requestAnimationFrame((function(){if(void 0===u){u={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,n=e.scrollX,r=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var e=r-window.innerHeight;e&&t>=r&&(document.body.style.top=-(t+e))}))}),300)}})):function(e){if(void 0===f){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(t&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);f=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===l&&(l=document.body.style.overflow,document.body.style.overflow="hidden")}(t),s&&(e.ontouchstart=function(e){1===e.targetTouches.length&&(c=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-c;!d(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?p(e):e.stopPropagation())}(t,e)},a||(document.addEventListener("touchmove",p,r?{passive:!1}:void 0),a=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},g=function(){s&&(i.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),a&&(document.removeEventListener("touchmove",p,r?{passive:!1}:void 0),a=!1),c=-1),s?m():h(),i=[]},y=function(e){e?(i=i.filter((function(t){return t.targetElement!==e})),s&&(e.ontouchstart=null,e.ontouchmove=null,a&&0===i.length&&(document.removeEventListener("touchmove",p,r?{passive:!1}:void 0),a=!1)),s?m():h()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}},114:e=>{function t(e,t){if(!e)throw new Error(t||"AssertionError")}t.notEqual=function(e,n,r){t(e!=n,r)},t.notOk=function(e,n){t(!e,n)},t.equal=function(e,n,r){t(e==n,r)},t.ok=t,e.exports=t},403:(e,t,n)=>{var r=n(415),o=n(511),s=n(114);function i(e){if(!(this instanceof i))return new i(e);this._name=e||"nanobus",this._starListeners=[],this._listeners={}}e.exports=i,i.prototype.emit=function(e){s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.emit: eventName should be type string or symbol");for(var t=[],n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);var i=o(this._name+"('"+e.toString()+"')"),a=this._listeners[e];return a&&a.length>0&&this._emit(this._listeners[e],t),this._starListeners.length>0&&this._emit(this._starListeners,e,t,i.uuid),i(),this},i.prototype.on=i.prototype.addListener=function(e,t){return s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.on: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.on: listener should be type function"),"*"===e?this._starListeners.push(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)),this},i.prototype.prependListener=function(e,t){return s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependListener: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.prependListener: listener should be type function"),"*"===e?this._starListeners.unshift(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(t)),this},i.prototype.once=function(e,t){s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.once: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.once: listener should be type function");var n=this;return this.on(e,(function r(){t.apply(n,arguments),n.removeListener(e,r)})),this},i.prototype.prependOnceListener=function(e,t){s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependOnceListener: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.prependOnceListener: listener should be type function");var n=this;return this.prependListener(e,(function r(){t.apply(n,arguments),n.removeListener(e,r)})),this},i.prototype.removeListener=function(e,t){return s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.removeListener: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.removeListener: listener should be type function"),"*"===e?(this._starListeners=this._starListeners.slice(),n(this._starListeners,t)):(void 0!==this._listeners[e]&&(this._listeners[e]=this._listeners[e].slice()),n(this._listeners[e],t));function n(e,t){if(e){var n=e.indexOf(t);return-1!==n?(r(e,n,1),!0):void 0}}},i.prototype.removeAllListeners=function(e){return e?"*"===e?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this},i.prototype.listeners=function(e){var t="*"!==e?this._listeners[e]:this._starListeners,n=[];if(t)for(var r=t.length,o=0;o<r;o++)n.push(t[o]);return n},i.prototype._emit=function(e,t,n,r){if(void 0!==e&&0!==e.length){void 0===n&&(n=t,t=null),t&&(n=void 0!==r?[t].concat(n,r):[t].concat(n));for(var o=e.length,s=0;s<o;s++){var i=e[s];i.apply(i,n)}}}},792:(e,t,n)=>{var r=n(114),o="undefined"!=typeof window;function s(e){this.hasWindow=e,this.hasIdle=this.hasWindow&&window.requestIdleCallback,this.method=this.hasIdle?window.requestIdleCallback.bind(window):this.setTimeout,this.scheduled=!1,this.queue=[]}s.prototype.push=function(e){r.equal(typeof e,"function","nanoscheduler.push: cb should be type function"),this.queue.push(e),this.schedule()},s.prototype.schedule=function(){if(!this.scheduled){this.scheduled=!0;var e=this;this.method((function(t){for(;e.queue.length&&t.timeRemaining()>0;)e.queue.shift()(t);e.scheduled=!1,e.queue.length&&e.schedule()}))}},s.prototype.setTimeout=function(e){setTimeout(e,0,{timeRemaining:function(){return 1}})},e.exports=function(){var e;return o?(window._nanoScheduler||(window._nanoScheduler=new s(!0)),e=window._nanoScheduler):e=new s,e}},511:(e,t,n)=>{var r,o=n(792)(),s=n(114);i.disabled=!0;try{r=window.performance,i.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!r.mark}catch(e){}function i(e){if(s.equal(typeof e,"string","nanotiming: name should be type string"),i.disabled)return a;var t=(1e4*r.now()).toFixed()%Number.MAX_SAFE_INTEGER,n="start-"+t+"-"+e;function c(s){var i="end-"+t+"-"+e;r.mark(i),o.push((function(){var o=null;try{var a=e+" ["+t+"]";r.measure(a,n,i),r.clearMarks(n),r.clearMarks(i)}catch(e){o=e}s&&s(o,e)}))}return r.mark(n),c.uuid=t,c}function a(e){e&&o.push((function(){e(new Error("nanotiming: performance API unavailable"))}))}e.exports=i},415:e=>{"use strict";e.exports=function(e,t,n){var r,o=e.length;if(!(t>=o||0===n)){var s=o-(n=t+n>o?o-t:n);for(r=t;r<s;++r)e[r]=e[r+n];e.length=s}}},669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),s=n(372),i=n(327),a=n(97),c=n(109),l=n(985),u=n(874),f=n(648),d=n(644),p=n(205);e.exports=function(e){return new Promise((function(t,n){var h,m=e.data,v=e.headers,g=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete v["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(_+":"+w)}var $=a(e.baseURL,e.url);function E(){if(b){var r="getAllResponseHeaders"in b?c(b.getAllResponseHeaders()):null,s={data:g&&"text"!==g&&"json"!==g?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};o((function(e){t(e),y()}),(function(e){n(e),y()}),s),b=null}}if(b.open(e.method.toUpperCase(),i($,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 f("Request aborted",f.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new f("Network Error",f.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 f(t,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var x=(e.withCredentials||l($))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;x&&(v[e.xsrfHeaderName]=x)}"setRequestHeader"in b&&r.forEach(v,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete v[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),g&&"json"!==g&&(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)&&(h=function(e){b&&(n(!e||e&&e.type?new d:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null);var O=p($);O&&-1===["http","https","file"].indexOf(O)?n(new f("Unsupported protocol "+O+":",f.ERR_BAD_REQUEST,e)):b.send(m)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),s=n(321),i=n(185),a=function e(t){var n=new s(t),a=o(s.prototype.request,n);return r.extend(a,s.prototype,n),r.extend(a,n),a.create=function(n){return e(i(t,n))},a}(n(546));a.Axios=s,a.CanceledError=n(644),a.CancelToken=n(972),a.isCancel=n(502),a.VERSION=n(288).version,a.toFormData=n(675),a.AxiosError=n(648),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=n(713),a.isAxiosError=n(268),e.exports=a,e.exports.default=a},972:(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:(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:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),s=n(782),i=n(572),a=n(185),c=n(97),l=n(875),u=l.validators;function f(e){this.defaults=e,this.interceptors={request:new s,response:new s}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(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&&l.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 s,c=[];if(this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)})),!o){var f=[i,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(c),s=Promise.resolve(t);f.length;)s=s.then(f.shift(),f.shift());return s}for(var d=t;r.length;){var p=r.shift(),h=r.shift();try{d=p(d)}catch(e){h(e);break}}try{s=i(d)}catch(e){return Promise.reject(e)}for(;c.length;)s=s.then(c.shift(),c.shift());return s},f.prototype.getUri=function(e){e=a(this.defaults,e);var t=c(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,n){return this.request(a(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(a(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)})),e.exports=f},648:(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 s=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(s,"isAxiosError",{value:!0}),o.from=function(e,t,n,i,a,c){var l=Object.create(s);return r.toFlatObject(e,l,(function(e){return e!==Error.prototype})),o.call(l,e.message,t,n,i,a),l.name=e.name,c&&Object.assign(l,c),l},e.exports=o},782:(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:(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:(e,t,n)=>{"use strict";var r=n(867),o=n(527),s=n(502),i=n(546),a=n(644);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){return c(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 c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},185:(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 s(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 a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||s,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},26:(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:(e,t,n)=>{"use strict";var r=n(867),o=n(546);e.exports=function(e,t,n){var s=this||o;return r.forEach(n,(function(n){e=n.call(s,e,t)})),e}},546:(e,t,n)=>{"use strict";var r=n(867),o=n(16),s=n(648),i=n(874),a=n(675),c={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,f={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 l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,s=r.isObject(e),i=t&&t["Content-Type"];if((n=r.isFileList(e))||s&&"multipart/form-data"===i){var c=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,c&&new c)}return s||"application/json"===i?(l(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||f.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 s.from(e,s.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){f.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){f.headers[e]=r.merge(c)})),e.exports=f},874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:e=>{e.exports={version:"0.27.2"}},849: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:(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 s;if(n)s=n(t);else if(r.isURLSearchParams(t))s=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))})))})),s=i.join("&")}if(s){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),!0===i&&a.push("secure"),document.cookie=a.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:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},268:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},985:(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:(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:e=>{e.exports=null},109:(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,s,i={};return e?(r.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+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:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},675:(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(s,i){if(r.isPlainObject(s)||r.isArray(s)){if(-1!==n.indexOf(s))throw Error("Circular reference detected in "+i);n.push(s),r.forEach(s,(function(n,s){if(!r.isUndefined(n)){var a,c=i?i+"."+s:s;if(n&&!i&&"object"==typeof n)if(r.endsWith(s,"{}"))n=JSON.stringify(n);else if(r.endsWith(s,"[]")&&(a=r.toArray(n)))return void a.forEach((function(e){!r.isUndefined(e)&&t.append(c,o(e))}));e(n,c)}})),n.pop()}else t.append(i,o(s))}(e),t}},875:(e,t,n)=>{"use strict";var r=n(288).version,o=n(648),s={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){s[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};s.transitional=function(e,t,n){function s(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new o(s(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!i[r]&&(i[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},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),s=r.length;s-- >0;){var i=r[s],a=t[i];if(a){var c=e[i],l=void 0===c||a(c,i,e);if(!0!==l)throw new o("option "+i+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+i,o.ERR_BAD_OPTION)}},validators:s}},867:(e,t,n)=>{"use strict";var r,o=n(849),s=Object.prototype.toString,i=(r=Object.create(null),function(e){var t=s.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var u=a("ArrayBuffer");function f(e){return null!==e&&"object"==typeof e}function d(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=a("Date"),h=a("File"),m=a("Blob"),v=a("FileList");function g(e){return"[object Function]"===s.call(e)}var y=a("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(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:c,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(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||s.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:f,isPlainObject:d,isUndefined:l,isDate:p,isFile:h,isBlob:m,isFunction:g,isStream:function(e){return f(e)&&g(e.pipe)},isURLSearchParams:y,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){d(t[r])&&d(n)?t[r]=e(t[r],n):d(n)?t[r]=e({},n):c(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(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,s,i={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)i[s=r[o]]||(t[s]=e[s],i[s]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:a,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(l(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:v}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(403),t=n.n(e);class r{constructor(e){this.element=e}static find(e){let t=document.querySelector(e);return null===t?null:new r(t)}static create(e){return new r(document.createElement(e))}getElement(){return this.element}addId(e){return this.element.id=e,this}toggleClass(e,t=null){return null===t?this.element.classList.contains(e)?this.removeClass(e):this.addClass(e):t?this.addClass(e):this.removeClasses(e)}addClass(e){return this.element.classList.add(e),this}addClasses(...e){return e.forEach((e=>this.addClass(e))),this}removeClasses(...e){return e.forEach((e=>this.removeClass(e))),this}removeClass(e){return this.element.classList.remove(e),this}setAttribute(e,t){return this.element.setAttribute(e,t),this}setAttributes(e){return Object.keys(e).forEach((t=>this.setAttribute(t,e[t]))),this}addHtml(e){return this.element.innerHTML=e,this}append(e){return this.element.appendChild(e),this}appendSelfTo(e){return e.append(this.element),this}prepend(e){return this.element.prepend(e),this}prependSelfTo(e){return e.prepend(this.element),this}css(e,t){return this.element.style[e]=t,this}insertAfter(e){var t;try{null===(t=this.element.parentElement)||void 0===t||t.insertBefore(e,this.element.nextElementSibling)}catch(e){console.error("Not able to insert element after current node",this.element)}}insertSelfBefore(e){var t;try{null===(t=e.parentElement)||void 0===t||t.insertBefore(this.element,e)}catch(e){console.error("Not able to insert element before current node",this.element)}return this}insertBefore(e){var t;try{null===(t=this.element.parentElement)||void 0===t||t.insertBefore(e,this.element)}catch(e){console.error("Not able to insert element before current node",this.element)}return this}addEventListener(e,t){return this.element.addEventListener(e,t),this}addEventListeners(e,t){return e.forEach((e=>this.addEventListener(e,t))),this}}class o{constructor(){this.filters={}}addFilter(e,t,n=10){this.filters.hasOwnProperty(e)||(this.filters[e]={}),this.filters[e].hasOwnProperty(n)||(this.filters[e][n]=[]),this.filters[e][n].push(t)}applyFilters(e,t,n={}){return this.filters.hasOwnProperty(e)?(Object.keys(this.filters[e]).forEach((r=>{this.filters[e][parseInt(r)].forEach((e=>{t=e(t,n)}))})),t):t}}function s(){}function i(e){return e()}function a(){return Object.create(null)}function c(e){e.forEach(i)}function l(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function f(e){return 0===Object.keys(e).length}function d(e,t,n,r){if(e){const o=p(e,t,n,r);return e[0](o)}}function p(e,t,n,r){return e[1]&&r?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](r(t))):n.ctx}function h(e,t,n,r){if(e[2]&&r){const o=e[2](r(n));if(void 0===t.dirty)return o;if("object"==typeof o){const e=[],n=Math.max(t.dirty.length,o.length);for(let r=0;r<n;r+=1)e[r]=t.dirty[r]|o[r];return e}return t.dirty|o}return t.dirty}function m(e,t,n,r,o,s){if(o){const i=p(t,n,r,s);e.p(i,o)}}function v(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}new Set;let g,y=!1;function b(e,t){e.appendChild(t)}function _(e,t,n){const r=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}(e);if(!r.getElementById(t)){const e=x("style");e.id=t,e.textContent=n,function(e,t){b(e.head||e,t),t.sheet}(r,e)}}function w(e,t,n){e.insertBefore(t,n||null)}function $(e){e.parentNode&&e.parentNode.removeChild(e)}function E(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function x(e){return document.createElement(e)}function O(e){return document.createTextNode(e)}function S(){return O(" ")}function k(){return O("")}function A(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function N(e){return function(t){return t.preventDefault(),e.call(this,t)}}function C(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function R(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function L(e){return""===e?null:+e}function T(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function j(e,t){e.value=null==t?"":t}function P(e,t,n,r){null===n?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function B(e,t){for(let n=0;n<e.options.length;n+=1){const r=e.options[n];if(r.__value===t)return void(r.selected=!0)}e.selectedIndex=-1}function D(e,t,n){e.classList[n?"add":"remove"](t)}function q(e,t){return new e(t)}function U(e){g=e}function I(){if(!g)throw new Error("Function called outside component initialization");return g}function M(e){I().$$.on_mount.push(e)}function F(){const e=I();return(t,n,{cancelable:r=!1}={})=>{const o=e.$$.callbacks[t];if(o){const s=function(e,t,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(e,n,r,t),o}(t,n,{cancelable:r});return o.slice().forEach((t=>{t.call(e,s)})),!s.defaultPrevented}return!0}}function H(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}new Map;const J=[],z=[],W=[],V=[],X=Promise.resolve();let G=!1;function K(e){W.push(e)}function Q(e){V.push(e)}const Y=new Set;let Z=0;function ee(){if(0!==Z)return;const e=g;do{try{for(;Z<J.length;){const e=J[Z];Z++,U(e),te(e.$$)}}catch(e){throw J.length=0,Z=0,e}for(U(null),J.length=0,Z=0;z.length;)z.pop()();for(let e=0;e<W.length;e+=1){const t=W[e];Y.has(t)||(Y.add(t),t())}W.length=0}while(J.length);for(;V.length;)V.pop()();G=!1,Y.clear(),U(e)}function te(e){if(null!==e.fragment){e.update(),c(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(K)}}const ne=new Set;let re,oe;function se(){re={r:0,c:[],p:re}}function ie(){re.r||c(re.c),re=re.p}function ae(e,t){e&&e.i&&(ne.delete(e),e.i(t))}function ce(e,t,n,r){if(e&&e.o){if(ne.has(e))return;ne.add(e),re.c.push((()=>{ne.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}function le(e,t){ce(e,1,1,(()=>{t.delete(e.key)}))}function ue(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function fe(e){e&&e.c()}function de(e,t,n,r){const{fragment:o,after_update:s}=e.$$;o&&o.m(t,n),r||K((()=>{const t=e.$$.on_mount.map(i).filter(l);e.$$.on_destroy?e.$$.on_destroy.push(...t):c(t),e.$$.on_mount=[]})),s.forEach(K)}function pe(e,t){const n=e.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function he(e,t,n,r,o,i,l,u=[-1]){const f=g;U(e);const d=e.$$={fragment:null,ctx:[],props:i,update:s,not_equal:o,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:t.target||f.$$.root};l&&l(d.root);let p=!1;if(d.ctx=n?n(e,t.props||{},((t,n,...r)=>{const s=r.length?r[0]:n;return d.ctx&&o(d.ctx[t],d.ctx[t]=s)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](s),p&&function(e,t){-1===e.$$.dirty[0]&&(J.push(e),G||(G=!0,X.then(ee)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],d.update(),p=!0,c(d.before_update),d.fragment=!!r&&r(d.ctx),t.target){if(t.hydrate){y=!0;const e=(h=t.target,Array.from(h.childNodes));d.fragment&&d.fragment.l(e),e.forEach($)}else d.fragment&&d.fragment.c();t.intro&&ae(e.$$.fragment),de(e,t.target,t.anchor,t.customElement),y=!1,ee()}var h;U(f)}"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global,new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(oe=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(i).filter(l);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){c(this.$$.on_disconnect)}$destroy(){pe(this,1),this.$destroy=s}$on(e,t){if(!l(t))return s;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!f(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class me{$destroy(){pe(this,1),this.$destroy=s}$on(e,t){if(!l(t))return s;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!f(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ve=()=>acp_cf_settings_i18n;class ge{static fromApi(e){let t=[];return e.forEach((e=>{let n=class{static toApi(e){return{operator:e.operator,fact:e.fact,format:e.format,column_name:e.column_name}}static fromApi(e){return Object.assign(e,{id:_e()})}}.fromApi(e),r=t.findIndex((t=>t.column===e.column_name));-1===r&&(t.push({column:e.column_name,rules:[]}),r=t.length-1),t[r].rules.push(n)})),t}static toApi(e){let t=[];return e.forEach((e=>{e.rules.forEach((e=>{t.push(e)}))})),t}}const ye=()=>"undefined"!=typeof acp_cf_settings?acp_cf_settings:{rules:[],operators:[],columns:{}},be=()=>ge.fromApi(ye().rules),_e=(e=12)=>{let t="",n="abcdef0123456789";for(let r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*n.length));return t},we=()=>(e=>{let t=[];for(const[n,r]of Object.entries(e))r.forEach((e=>{var r;t.push({value:e.operator,label:e.label,group:"group_"+n,operator:e.operator,type:null!==(r=e.type)&&void 0!==r?r:""})}));return t})(ye().operators);function $e(e){let t,n,r,o;return{c(){t=x("div"),n=x("input"),R(n,"type","text"),R(t,"class","acp-cf-value -text")},m(s,i){w(s,t,i),b(t,n),j(n,e[0]),r||(o=A(n,"input",e[1]),r=!0)},p(e,[t]){1&t&&n.value!==e[0]&&j(n,e[0])},i:s,o:s,d(e){e&&$(t),r=!1,o()}}}function Ee(e,t,n){let{value:r=""}=t;return e.$$set=e=>{"value"in e&&n(0,r=e.value)},[r,function(){r=this.value,n(0,r)}]}const xe=class extends me{constructor(e){super(),he(this,e,Ee,$e,u,{value:0})}};function Oe(e){let t;return{c(){t=x("div"),R(t,"class","acp-cf-value -nonvalue")},m(e,n){w(e,t,n)},p:s,i:s,o:s,d(e){e&&$(t)}}}function Se(e,t,n){let{value:r=""}=t;return M((()=>{null!==r&&n(0,r=null)})),e.$$set=e=>{"value"in e&&n(0,r=e.value)},[r]}const ke=class extends me{constructor(e){super(),he(this,e,Se,Oe,u,{value:0})}};function Ae(e){let t,n,r,o;return{c(){t=x("div"),n=x("input"),R(n,"type","number"),R(t,"class","acp-cf-value -contains -number")},m(s,i){w(s,t,i),b(t,n),j(n,e[0]),r||(o=A(n,"input",e[1]),r=!0)},p(e,[t]){1&t&&L(n.value)!==e[0]&&j(n,e[0])},i:s,o:s,d(e){e&&$(t),r=!1,o()}}}function Ne(e,t,n){let{value:r=""}=t;return e.$$set=e=>{"value"in e&&n(0,r=e.value)},[r,function(){r=L(this.value),n(0,r)}]}const Ce=class extends me{constructor(e){super(),he(this,e,Ne,Ae,u,{value:0})}};function Re(e){let t,n,r,o;return{c(){t=x("div"),n=x("input"),R(n,"type","date"),R(t,"class","acp-cf-value -contains")},m(s,i){w(s,t,i),b(t,n),j(n,e[0]),r||(o=A(n,"input",e[1]),r=!0)},p(e,[t]){1&t&&j(n,e[0])},i:s,o:s,d(e){e&&$(t),r=!1,o()}}}function Le(e,t,n){let{value:r=""}=t;return M((()=>{"string"!=typeof r&&n(0,r="")})),e.$$set=e=>{"value"in e&&n(0,r=e.value)},[r,function(){r=this.value,n(0,r)}]}const Te=class extends me{constructor(e){super(),he(this,e,Le,Re,u,{value:0})}};function je(e){let t,n,r,o,i,a,l,u;return{c(){t=x("div"),n=x("input"),r=S(),o=x("span"),o.textContent=`${e[2].between_and}`,i=S(),a=x("input"),R(n,"type","text"),R(a,"type","text"),R(t,"class","acp-cf-value -between -numeric")},m(s,c){w(s,t,c),b(t,n),j(n,e[0]),b(t,r),b(t,o),b(t,i),b(t,a),j(a,e[1]),l||(u=[A(n,"input",e[5]),A(n,"input",e[3]),A(a,"input",e[6]),A(a,"input",e[3])],l=!0)},p(e,[t]){1&t&&n.value!==e[0]&&j(n,e[0]),2&t&&a.value!==e[1]&&j(a,e[1])},i:s,o:s,d(e){e&&$(t),l=!1,c(u)}}}function Pe(e,t,n){let{value:r=[]}=t;const o=ve();let s=Array.isArray(r)&&r.length?r[0]:"",i=Array.isArray(r)&&2===r.length?r[1]:"";return e.$$set=e=>{"value"in e&&n(4,r=e.value)},[s,i,o,()=>{n(4,r=[s,i])},r,function(){s=this.value,n(0,s)},function(){i=this.value,n(1,i)}]}const Be=class extends me{constructor(e){super(),he(this,e,Pe,je,u,{value:4})}};function De(e,t,n){const r=e.slice();return r[6]=t[n][0],r[7]=t[n][1],r}function qe(e,t,n){const r=e.slice();return r[10]=t[n],r}function Ue(e){let t;return{c(){t=x("option"),t.textContent="──────────",t.disabled=!0,t.__value="──────────",t.value=t.__value},m(e,n){w(e,t,n)},d(e){e&&$(t)}}}function Ie(e){let t,n,r,o=e[10].label+"";return{c(){t=x("option"),n=O(o),t.__value=r=e[10].value,t.value=t.__value},m(e,r){w(e,t,r),b(t,n)},p(e,s){2&s&&o!==(o=e[10].label+"")&&T(n,o),2&s&&r!==(r=e[10].value)&&(t.__value=r,t.value=t.__value)},d(e){e&&$(t)}}}function Me(e){let t,n,r=e[6]!==Object.keys(e[1])[0],o=r&&Ue(),s=e[7],i=[];for(let t=0;t<s.length;t+=1)i[t]=Ie(qe(e,s,t));return{c(){o&&o.c(),t=k();for(let e=0;e<i.length;e+=1)i[e].c();n=k()},m(e,r){o&&o.m(e,r),w(e,t,r);for(let t=0;t<i.length;t+=1)i[t].m(e,r);w(e,n,r)},p(e,a){if(2&a&&(r=e[6]!==Object.keys(e[1])[0]),r?o||(o=Ue(),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null),2&a){let t;for(s=e[7],t=0;t<s.length;t+=1){const r=qe(e,s,t);i[t]?i[t].p(r,a):(i[t]=Ie(r),i[t].c(),i[t].m(n.parentNode,n))}for(;t<i.length;t+=1)i[t].d(1);i.length=s.length}},d(e){o&&o.d(e),e&&$(t),E(i,e),e&&$(n)}}}function Fe(e){let t,n,r,o=Object.entries(e[1]),i=[];for(let t=0;t<o.length;t+=1)i[t]=Me(De(e,o,t));return{c(){t=x("select");for(let e=0;e<i.length;e+=1)i[e].c();void 0===e[0]&&K((()=>e[4].call(t)))},m(o,s){w(o,t,s);for(let e=0;e<i.length;e+=1)i[e].m(t,null);B(t,e[0]),n||(r=[A(t,"input",e[2]),A(t,"change",e[4])],n=!0)},p(e,[n]){if(2&n){let r;for(o=Object.entries(e[1]),r=0;r<o.length;r+=1){const s=De(e,o,r);i[r]?i[r].p(s,n):(i[r]=Me(s),i[r].c(),i[r].m(t,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}3&n&&B(t,e[0])},i:s,o:s,d(e){e&&$(t),E(i,e),n=!1,c(r)}}}function He(e,t,n){let{condition:r="between"}=t,{operator:o="contains"}=t,s={};return M((()=>{n(1,s=(e=>{let t={};return e.forEach((e=>{t.hasOwnProperty(e.group)||(t[e.group]=[]),t[e.group].push(e)})),t})(we()))})),e.$$set=e=>{"condition"in e&&n(3,r=e.condition),"operator"in e&&n(0,o=e.operator)},[o,s,e=>{let t=we().find((t=>t.value===e.target.value));t&&(n(3,r=t.group),n(0,o=t.operator))},r,function(){o=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n(0,o),n(1,s)}]}const Je=class extends me{constructor(e){super(),he(this,e,He,Fe,u,{condition:3,operator:0})}};function ze(e,t,n){const r=e.slice();return r[15]=t[n],r}function We(e){let t,n,r,o,s=e[5],i=[];for(let t=0;t<s.length;t+=1)i[t]=Ve(ze(e,s,t));return{c(){t=x("div"),n=x("h3"),n.textContent=`${e[3].formatting_style}`,r=S(),o=x("div");for(let e=0;e<i.length;e+=1)i[e].c();R(t,"class","acp-cf-style-selector")},m(e,s){w(e,t,s),b(t,n),b(t,r),b(t,o);for(let e=0;e<i.length;e+=1)i[e].m(o,null)},p(e,t){if(96&t){let n;for(s=e[5],n=0;n<s.length;n+=1){const r=ze(e,s,n);i[n]?i[n].p(r,t):(i[n]=Ve(r),i[n].c(),i[n].m(o,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=s.length}},d(e){e&&$(t),E(i,e)}}}function Ve(e){let t,n,r,o,s;function i(){return e[9](e[15])}return{c(){t=x("button"),n=O("Abc\n\t\t\t\t\t"),R(t,"class",r=e[15].className)},m(e,r){w(e,t,r),b(t,n),o||(s=A(t,"click",N(i)),o=!0)},p(t,n){e=t},d(e){e&&$(t),o=!1,s()}}}function Xe(e){let t,n,r,o,i,a,l=e[2]&&We(e);return{c(){t=x("div"),n=x("button"),r=O("Abc"),o=S(),l&&l.c(),R(n,"class",e[0])},m(s,c){w(s,t,c),b(t,n),b(n,r),b(t,o),l&&l.m(t,null),e[10](t),i||(a=[A(n,"click",N(e[4])),A(t,"click",C(e[7])),A(t,"keydown",C(e[8]))],i=!0)},p(e,[r]){1&r&&R(n,"class",e[0]),e[2]?l?l.p(e,r):(l=We(e),l.c(),l.m(t,null)):l&&(l.d(1),l=null)},i:s,o:s,d(n){n&&$(t),l&&l.d(),e[10](null),i=!1,c(a)}}}function Ge(e,t,n){let r,{format:o}=t,s=!1;const i=ve(),a=()=>{var e;n(2,s=!1),null===(e=document.querySelector(".ac-modal__dialog__content"))||void 0===e||e.removeEventListener("click",u),document.removeEventListener("click",u)},c=[{className:"acp-cf-style-success"},{className:"acp-cf-style-warning"},{className:"acp-cf-style-error"},{className:"acp-cf-style-info"},{className:"acp-cf-style-success-invert"},{className:"acp-cf-style-warning-invert"},{className:"acp-cf-style-error-invert"},{className:"acp-cf-style-info-invert"}],l=e=>{n(2,s=!1),n(0,o=e)},u=()=>{a()};var f;return M((()=>{""===o&&n(0,o=c[0].className)})),f=()=>{var e;null===(e=r.closest(".ac-modal__dialog__content"))||void 0===e||e.removeEventListener("click",u)},I().$$.on_destroy.push(f),e.$$set=e=>{"format"in e&&n(0,o=e.format)},[o,r,s,i,()=>{s?a():(n(2,s=!0),r.closest(".ac-modal__dialog__content").addEventListener("click",u))},c,l,function(t){H.call(this,e,t)},function(t){H.call(this,e,t)},e=>l(e.className),function(e){z[e?"unshift":"push"]((()=>{r=e,n(1,r)}))}]}const Ke=class extends me{constructor(e){super(),he(this,e,Ge,Xe,u,{format:0})}};function Qe(e){_(e,"svelte-gtta3n","input[type=date].svelte-gtta3n{width:128px!important}")}function Ye(e){let t,n,r,o,i,a,l,u;return{c(){t=x("div"),n=x("input"),r=S(),o=x("span"),o.textContent=`${e[2].between_and}`,i=S(),a=x("input"),R(n,"type","date"),R(n,"class","svelte-gtta3n"),R(a,"type","date"),R(a,"class","svelte-gtta3n"),R(t,"class","acp-cf-value -between -numeric")},m(s,c){w(s,t,c),b(t,n),j(n,e[0]),b(t,r),b(t,o),b(t,i),b(t,a),j(a,e[1]),l||(u=[A(n,"input",e[5]),A(n,"input",e[3]),A(a,"input",e[6]),A(a,"input",e[3])],l=!0)},p(e,[t]){1&t&&j(n,e[0]),2&t&&j(a,e[1])},i:s,o:s,d(e){e&&$(t),l=!1,c(u)}}}function Ze(e,t,n){let{value:r=[]}=t;const o=ve();let s=Array.isArray(r)&&r.length?r[0]:"",i=Array.isArray(r)&&2===r.length?r[1]:"";return e.$$set=e=>{"value"in e&&n(4,r=e.value)},[s,i,o,()=>{n(4,r=[s,i])},r,function(){s=this.value,n(0,s)},function(){i=this.value,n(1,i)}]}const et=class extends me{constructor(e){super(),he(this,e,Ze,Ye,u,{value:4},Qe)}};function tt(e){_(e,"svelte-1ud8r8j","button.svelte-1ud8r8j{background:none;border:none;padding:0}")}function nt(e){let t,n,r,o,s,i,a,l,u,f,d,p,h,m,v,g,y,_,E,O,k,C;function L(t){e[4](t)}let T={};function j(t){e[5](t)}void 0!==e[0].operator&&(T.operator=e[0].operator),s=new Je({props:T}),z.push((()=>ue(s,"operator",L)));var P=e[1](e[0].operator);function B(e){let t={};return void 0!==e[0].fact&&(t.value=e[0].fact),{props:t}}function D(t){e[6](t)}P&&(u=q(P,B(e)),z.push((()=>ue(u,"value",j))));let U={};return void 0!==e[0].format&&(U.format=e[0].format),h=new Ke({props:U}),z.push((()=>ue(h,"format",D))),{c(){t=x("div"),n=x("div"),n.innerHTML='<span class="cpacicon-move"></span>',r=S(),o=x("div"),fe(s.$$.fragment),a=S(),l=x("div"),u&&fe(u.$$.fragment),d=S(),p=x("div"),fe(h.$$.fragment),v=S(),g=x("div"),y=x("button"),y.innerHTML='<span class="dashicons dashicons-remove acp-cf-delete-btn"></span>',_=S(),E=x("button"),E.innerHTML='<span class="dashicons dashicons-insert acp-cf-insert-btn"></span>',R(n,"class","acp-cf-conditions__row__item -drag"),R(o,"class","acp-cf-conditions__row__item -type"),R(l,"class","acp-cf-conditions__row__item -value"),R(p,"class","acp-cf-conditions__row__item -style"),R(y,"class","svelte-1ud8r8j"),R(E,"class","svelte-1ud8r8j"),R(g,"class","acp-cf-conditions__row__item -actions"),R(t,"class","acp-cf-conditions__row")},m(i,c){w(i,t,c),b(t,n),b(t,r),b(t,o),de(s,o,null),b(t,a),b(t,l),u&&de(u,l,null),b(t,d),b(t,p),de(h,p,null),b(t,v),b(t,g),b(g,y),b(g,_),b(g,E),O=!0,k||(C=[A(y,"click",N(e[2])),A(E,"click",N(e[7]))],k=!0)},p(e,[t]){const n={};!i&&1&t&&(i=!0,n.operator=e[0].operator,Q((()=>i=!1))),s.$set(n);const r={};if(!f&&1&t&&(f=!0,r.value=e[0].fact,Q((()=>f=!1))),P!==(P=e[1](e[0].operator))){if(u){se();const e=u;ce(e.$$.fragment,1,0,(()=>{pe(e,1)})),ie()}P?(u=q(P,B(e)),z.push((()=>ue(u,"value",j))),fe(u.$$.fragment),ae(u.$$.fragment,1),de(u,l,null)):u=null}else P&&u.$set(r);const o={};!m&&1&t&&(m=!0,o.format=e[0].format,Q((()=>m=!1))),h.$set(o)},i(e){O||(ae(s.$$.fragment,e),u&&ae(u.$$.fragment,e),ae(h.$$.fragment,e),O=!0)},o(e){ce(s.$$.fragment,e),u&&ce(u.$$.fragment,e),ce(h.$$.fragment,e),O=!1},d(e){e&&$(t),pe(s),u&&pe(u),pe(h),k=!1,c(C)}}}function rt(e,t,n){let{rule:r=[]}=t;const o=F(),s=we(),i=e=>o("insert",{after:e});return M((()=>{r.hasOwnProperty("id")||(n(0,r.id=_e(),r),n(0,r))})),e.$$set=e=>{"rule"in e&&n(0,r=e.rule)},[r,e=>{let t=s.find((t=>t.operator===e));if(!t)return xe;if("relative"===t.type)return ke;switch(t.value){case"within_days":return Ce;case"date_between":return et;case"date_is":case"date_is_after":case"date_is_before":return Te;case"between":case"not_between":return Be;default:return xe}},()=>o("delete"),i,function(t){e.$$.not_equal(r.operator,t)&&(r.operator=t,n(0,r))},function(t){e.$$.not_equal(r.fact,t)&&(r.fact=t,n(0,r))},function(t){e.$$.not_equal(r.format,t)&&(r.format=t,n(0,r))},()=>i(r.id)]}const ot=class extends me{constructor(e){super(),he(this,e,rt,nt,u,{rule:0},tt)}},st=e=>({id:_e(),format:"",fact:"",operator:we()[0].operator,column_name:e});function it(e,t,n){const r=e.slice();return r[11]=t[n],r[12]=t,r[13]=n,r}function at(e,t){let n,r,o,s,i,a;function c(e){t[6](e,t[11],t[12],t[13])}let l={};return void 0!==t[11]&&(l.rule=t[11]),r=new ot({props:l}),z.push((()=>ue(r,"rule",c))),r.$on("delete",(function(){return t[7](t[11])})),r.$on("insert",t[4]),{key:e,first:null,c(){n=x("div"),fe(r.$$.fragment),s=S(),R(n,"class","acp-cf-conditions__group__sortable"),R(n,"data-id",i=t[11].id),this.first=n},m(e,t){w(e,n,t),de(r,n,null),b(n,s),a=!0},p(e,s){t=e;const c={};!o&&1&s&&(o=!0,c.rule=t[11],Q((()=>o=!1))),r.$set(c),(!a||1&s&&i!==(i=t[11].id))&&R(n,"data-id",i)},i(e){a||(ae(r.$$.fragment,e),a=!0)},o(e){ce(r.$$.fragment,e),a=!1},d(e){e&&$(n),pe(r)}}}function ct(e){let t,n,r,o,s,i,a=[],c=new Map,l=e[0];const u=e=>e[11].id;for(let t=0;t<l.length;t+=1){let n=it(e,l,t),r=u(n);c.set(r,a[t]=at(r,n))}return{c(){t=x("div"),n=x("strong"),r=O(e[1]),o=S(),s=x("div");for(let e=0;e<a.length;e+=1)a[e].c();R(n,"class","acp-cf-conditions__group__title"),D(s,"hide-sort",1===e[0].length),R(t,"class","acp-cf-conditions__group")},m(c,l){w(c,t,l),b(t,n),b(n,r),b(t,o),b(t,s);for(let e=0;e<a.length;e+=1)a[e].m(s,null);e[8](s),i=!0},p(e,[t]){(!i||2&t)&&T(r,e[1]),25&t&&(l=e[0],se(),a=function(e,t,n,r,o,s,i,a,c,l,u,f){let d=e.length,p=s.length,h=d;const m={};for(;h--;)m[e[h].key]=h;const v=[],g=new Map,y=new Map;for(h=p;h--;){const e=f(o,s,h),r=n(e);let a=i.get(r);a?a.p(e,t):(a=l(r,e),a.c()),g.set(r,v[h]=a),r in m&&y.set(r,Math.abs(h-m[r]))}const b=new Set,_=new Set;function w(e){ae(e,1),e.m(a,u),i.set(e.key,e),u=e.first,p--}for(;d&&p;){const t=v[p-1],n=e[d-1],r=t.key,o=n.key;t===n?(u=t.first,d--,p--):g.has(o)?!i.has(r)||b.has(r)?w(t):_.has(o)?d--:y.get(r)>y.get(o)?(_.add(r),w(t)):(b.add(o),d--):(c(n,i),d--)}for(;d--;){const t=e[d];g.has(t.key)||c(t,i)}for(;p;)w(v[p-1]);return v}(a,t,u,0,e,l,c,s,le,at,null,it),ie()),(!i||1&t)&&D(s,"hide-sort",1===e[0].length)},i(e){if(!i){for(let e=0;e<l.length;e+=1)ae(a[e]);i=!0}},o(e){for(let e=0;e<a.length;e+=1)ce(a[e]);i=!1},d(n){n&&$(t);for(let e=0;e<a.length;e+=1)a[e].d();e[8](null)}}}function lt(e,t,n){let r,{title:o=""}=t,{column:s=""}=t,{rules:i=[]}=t;const a=F(),c=(we(),e=>{n(0,i=i.filter((t=>t!==e))),0===i.length&&a("delete")});return M((()=>{jQuery(r).sortable({axis:"y",handle:".-drag",stop:()=>{let e=[],t=[];r.childNodes.forEach((t=>e.push(t.dataset.id))),e.forEach((e=>{t.push(i.find((t=>t.id===e)))})),n(0,i=t)}})})),e.$$set=e=>{"title"in e&&n(1,o=e.title),"column"in e&&n(5,s=e.column),"rules"in e&&n(0,i=e.rules)},[i,o,r,c,e=>{const t=i.findIndex((t=>t.id===e.detail.after))+1;i.splice(t,0,st(s)),n(0,i)},s,function(e,t,r,o){r[o]=e,n(0,i)},e=>c(e),function(e){z[e?"unshift":"push"]((()=>{r=e,n(2,r)}))}]}const ut=class extends me{constructor(e){super(),he(this,e,lt,ct,u,{title:1,column:5,rules:0})}},ft=e=>{var t,n;return null!==(n=null===(t=ye().columns[e])||void 0===t?void 0:t.label)&&void 0!==n?n:e};function dt(e){_(e,"svelte-plr74p",".acp-cf-column-selector.svelte-plr74p.svelte-plr74p{position:fixed;background:#fff;border-radius:2px;max-height:250px;overflow-y:auto;min-width:150px;box-shadow:0 9px 24px 0 rgb(15 15 15 / 20%), 0 3px 6px 0 rgb(15 15 15 / 10%), 0 0 0 1px rgb(15 15 15 / 5%);z-index:1}.acp-cf-column-selector.svelte-plr74p span.svelte-plr74p{display:block;padding:4px 10px}.acp-cf-column-selector.svelte-plr74p span.svelte-plr74p:hover{background:var(--ac-primary-color);color:#fff;cursor:pointer}")}function pt(e,t,n){const r=e.slice();return r[12]=t[n],r}function ht(e){let t,n,r,o,s,i=e[12].label+"";function a(){return e[8](e[12])}return{c(){t=x("span"),n=O(i),R(t,"role","button"),R(t,"data-key",r=e[12].key),R(t,"tabindex","0"),R(t,"class","svelte-plr74p")},m(r,i){w(r,t,i),b(t,n),o||(s=[A(t,"click",a),A(t,"keypress",e[4])],o=!0)},p(t,n){e=t},d(e){e&&$(t),o=!1,c(s)}}}function mt(e){let t,n,r,o=e[2],i=[];for(let t=0;t<o.length;t+=1)i[t]=ht(pt(e,o,t));return{c(){t=x("div");for(let e=0;e<i.length;e+=1)i[e].c();R(t,"class","acp-cf-column-selector svelte-plr74p"),R(t,"style",e[0])},m(o,s){w(o,t,s);for(let e=0;e<i.length;e+=1)i[e].m(t,null);e[9](t),n||(r=[A(t,"click",C(e[6])),A(t,"keydown",e[7])],n=!0)},p(e,[n]){if(28&n){let r;for(o=e[2],r=0;r<o.length;r+=1){const s=pt(e,o,r);i[r]?i[r].p(s,n):(i[r]=ht(s),i[r].c(),i[r].m(t,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}1&n&&R(t,"style",e[0])},i:s,o:s,d(o){o&&$(t),E(i,o),e[9](null),n=!1,c(r)}}}function vt(e,t,n){let{button:r}=t;const o=F();let s,i="",a=(()=>{const e=ye();let t=[];return Object.keys(e.columns).forEach((n=>{t.push({key:n,label:e.columns[n].label})})),t})();const c=e=>{o("select",{column:e}),l()},l=()=>{o("close")};return M((()=>{let e=r.getBoundingClientRect(),t=window.innerHeight-e.y;n(0,i=t<250?`bottom: ${t}px`:`top: ${e.y}px`)})),e.$$set=e=>{"button"in e&&n(5,r=e.button)},[i,s,a,c,e=>{var t;"Enter"===e.key&&c(null===(t=e.target)||void 0===t?void 0:t.dataset.key)},r,function(t){H.call(this,e,t)},function(t){H.call(this,e,t)},e=>c(e.key),function(e){z[e?"unshift":"push"]((()=>{s=e,n(1,s)}))}]}const gt=class extends me{constructor(e){super(),he(this,e,vt,mt,u,{button:5},dt)}};function yt(e,t,n){const r=e.slice();return r[15]=t[n],r[16]=t,r[17]=n,r}function bt(e){let t,n,r;function o(t){e[10](t,e[15])}let s={title:ft(e[15].column),column:e[15].column};return void 0!==e[15].rules&&(s.rules=e[15].rules),t=new ut({props:s}),z.push((()=>ue(t,"rules",o))),t.$on("delete",(function(){return e[11](e[15])})),{c(){fe(t.$$.fragment)},m(e,n){de(t,e,n),r=!0},p(r,o){e=r;const s={};1&o&&(s.title=ft(e[15].column)),1&o&&(s.column=e[15].column),!n&&1&o&&(n=!0,s.rules=e[15].rules,Q((()=>n=!1))),t.$set(s)},i(e){r||(ae(t.$$.fragment,e),r=!0)},o(e){ce(t.$$.fragment,e),r=!1},d(e){pe(t,e)}}}function _t(e){let t,n,r=e[15].rules.length>0&&bt(e);return{c(){r&&r.c(),t=k()},m(e,o){r&&r.m(e,o),w(e,t,o),n=!0},p(e,n){e[15].rules.length>0?r?(r.p(e,n),1&n&&ae(r,1)):(r=bt(e),r.c(),ae(r,1),r.m(t.parentNode,t)):r&&(se(),ce(r,1,1,(()=>{r=null})),ie())},i(e){n||(ae(r),n=!0)},o(e){ce(r),n=!1},d(e){r&&r.d(e),e&&$(t)}}}function wt(e){let t,n;return t=new gt({props:{button:e[1]}}),t.$on("select",e[13]),t.$on("close",e[14]),{c(){fe(t.$$.fragment)},m(e,r){de(t,e,r),n=!0},p(e,n){const r={};2&n&&(r.button=e[1]),t.$set(r)},i(e){n||(ae(t.$$.fragment,e),n=!0)},o(e){ce(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function $t(e){let t,n,r,o,s,i,a,l,u,f,d=e[0],p=[];for(let t=0;t<d.length;t+=1)p[t]=_t(yt(e,d,t));const h=e=>ce(p[e],1,1,(()=>{p[e]=null}));let m=e[2]&&wt(e),v=Et&&function(e){let t,n,r=(e[0]?JSON.stringify(e[0]):"")+"";return{c(){t=x("div"),n=O(r),P(t,"margin-top","10px"),P(t,"background","#eee"),P(t,"font-family","monospace"),P(t,"font-size","12px")},m(e,r){w(e,t,r),b(t,n)},p(e,t){1&t&&r!==(r=(e[0]?JSON.stringify(e[0]):"")+"")&&T(n,r)},d(e){e&&$(t)}}}(e);return{c(){t=x("div");for(let e=0;e<p.length;e+=1)p[e].c();n=S(),r=x("div"),o=x("button"),o.textContent=`${e[3].add_rule}`,s=S(),m&&m.c(),i=S(),v&&v.c(),a=k(),R(o,"class","button"),R(r,"class","acp-cf-conditions__actions"),D(r,"-initial",0===e[0].length),R(t,"class","acp-cf-conditions")},m(c,d){w(c,t,d);for(let e=0;e<p.length;e+=1)p[e].m(t,null);b(t,n),b(t,r),b(r,o),e[12](o),b(r,s),m&&m.m(r,null),w(c,i,d),v&&v.m(c,d),w(c,a,d),l=!0,u||(f=[A(o,"click",C(N(e[4]))),A(o,"keypress",e[8]),A(t,"click",e[7]),A(t,"keypress",e[9])],u=!0)},p(e,[o]){if(33&o){let r;for(d=e[0],r=0;r<d.length;r+=1){const s=yt(e,d,r);p[r]?(p[r].p(s,o),ae(p[r],1)):(p[r]=_t(s),p[r].c(),ae(p[r],1),p[r].m(t,n))}for(se(),r=d.length;r<p.length;r+=1)h(r);ie()}e[2]?m?(m.p(e,o),4&o&&ae(m,1)):(m=wt(e),m.c(),ae(m,1),m.m(r,null)):m&&(se(),ce(m,1,1,(()=>{m=null})),ie()),(!l||1&o)&&D(r,"-initial",0===e[0].length),Et&&v.p(e,o)},i(e){if(!l){for(let e=0;e<d.length;e+=1)ae(p[e]);ae(m),l=!0}},o(e){p=p.filter(Boolean);for(let e=0;e<p.length;e+=1)ce(p[e]);ce(m),l=!1},d(n){n&&$(t),E(p,n),e[12](null),m&&m.d(),n&&$(i),v&&v.d(n),n&&$(a),u=!1,c(f)}}}let Et=!1;function xt(e,t,n){let r,o,{groups:s=[]}=t,i=ve();const a=()=>n(2,o=!0),c=e=>n(0,s=s.filter((t=>t!==e))),l=e=>n(0,s=((e,t)=>{let n=e.findIndex((e=>e.column===t));return-1===n&&(e.push({column:t,rules:[]}),n=e.length-1),e[n].rules.push(st(t)),e})(s,e));return e.$$set=e=>{"groups"in e&&n(0,s=e.groups)},[s,r,o,i,a,c,l,()=>{o&&n(2,o=!1)},e=>{"Enter"===e.key&&a()},function(t){H.call(this,e,t)},function(t,r){e.$$.not_equal(r.rules,t)&&(r.rules=t,n(0,s))},e=>c(e),function(e){z[e?"unshift":"push"]((()=>{r=e,n(1,r)}))},e=>l(e.detail.column),()=>n(2,o=!1)]}const Ot=class extends me{constructor(e){super(),he(this,e,xt,$t,u,{groups:0})}},St=[];var kt=n(669),At=n.n(kt);const Nt=(e,t,n="")=>{if(!t||"object"!=typeof t||t instanceof Date||t instanceof File){const r=null==t?"":t;e.append(n,r)}else Object.keys(t).forEach((r=>{Nt(e,t[r],n?`${n}[${r}]`:r)}))},Ct=function(){const{subscribe:e,set:t,update:n}=function(e,t=s){let n;const r=new Set;function o(t){if(u(e,t)&&(e=t,n)){const t=!St.length;for(const t of r)t[1](),St.push(t,e);if(t){for(let e=0;e<St.length;e+=2)St[e][0](St[e+1]);St.length=0}}}return{set:o,update:function(t){o(t(e))},subscribe:function(i,a=s){const c=[i,a];return r.add(c),1===r.size&&(n=t(o)||s),i(e),()=>{r.delete(c),0===r.size&&(n(),n=null)}}}}([]);return{subscribe:e,set:t,update:n,storePreference:e=>{return t=ge.toApi(e),At().post(ajaxurl,((e,t=null)=>{let n=null!=t?t:new FormData;return Object.keys(e).forEach((t=>{Nt(n,e[t],t)})),n})({action:"acp-user-conditional-formatting",_ajax_nonce:AC.ajax_nonce,list_id:AC.layout,rules:JSON.stringify(t)}));var t}}}(),Rt=e=>({}),Lt=e=>({}),Tt=e=>({}),jt=e=>({}),Pt=e=>({}),Bt=e=>({}),Dt=e=>({}),qt=e=>({}),Ut=e=>({}),It=e=>({});function Mt(e){let t,n,r,o;return{c(){t=x("button"),n=x("span"),R(n,"class","dashicons dashicons-no-alt"),R(t,"class","ac-modal__dialog__close"),t.disabled=e[2]},m(s,i){w(s,t,i),b(t,n),r||(o=A(t,"click",e[6]),r=!0)},p(e,n){4&n&&(t.disabled=e[2])},d(e){e&&$(t),r=!1,o()}}}function Ft(e){let t,n;const r=e[11].content,o=d(r,e,e[10],Bt);return{c(){t=x("div"),o&&o.c(),R(t,"class","ac-modal__dialog__content"),D(t,"-p0",e[0])},m(e,r){w(e,t,r),o&&o.m(t,null),n=!0},p(e,s){o&&o.p&&(!n||1024&s)&&m(o,r,e,e[10],n?h(r,e[10],s,Pt):v(e[10]),Bt),(!n||1&s)&&D(t,"-p0",e[0])},i(e){n||(ae(o,e),n=!0)},o(e){ce(o,e),n=!1},d(e){e&&$(t),o&&o.d(e)}}}function Ht(e){let t,n;const r=e[11].footer,o=d(r,e,e[10],Lt);return{c(){t=x("div"),o&&o.c(),R(t,"class","ac-modal__dialog__footer")},m(e,r){w(e,t,r),o&&o.m(t,null),n=!0},p(e,t){o&&o.p&&(!n||1024&t)&&m(o,r,e,e[10],n?h(r,e[10],t,Rt):v(e[10]),Lt)},i(e){n||(ae(o,e),n=!0)},o(e){ce(o,e),n=!1},d(e){e&&$(t),o&&o.d(e)}}}function Jt(e){let t,n,r,o,s,i,a,l,u,f,p,g;const y=e[11].header,_=d(y,e,e[10],It);let E=!e[2]&&Mt(e);const O=e[11].before_content,k=d(O,e,e[10],qt);let N=e[7].content&&!e[1]&&Ft(e);const L=e[11].after_content,T=d(L,e,e[10],jt);let j=e[7].footer&&Ht(e);return{c(){t=x("div"),n=x("div"),r=x("div"),_&&_.c(),o=S(),E&&E.c(),s=S(),k&&k.c(),i=S(),N&&N.c(),a=S(),T&&T.c(),l=S(),j&&j.c(),R(r,"class","ac-modal__dialog__header"),R(n,"class","ac-modal__dialog"),R(t,"class",u="ac-modal "+e[3]),D(t,"-active",e[4])},m(c,u){w(c,t,u),b(t,n),b(n,r),_&&_.m(r,null),b(r,o),E&&E.m(r,null),b(n,s),k&&k.m(n,null),b(n,i),N&&N.m(n,null),b(n,a),T&&T.m(n,null),b(n,l),j&&j.m(n,null),e[13](t),f=!0,p||(g=[A(n,"click",C(e[12])),A(t,"click",e[6])],p=!0)},p(e,[o]){_&&_.p&&(!f||1024&o)&&m(_,y,e,e[10],f?h(y,e[10],o,Ut):v(e[10]),It),e[2]?E&&(E.d(1),E=null):E?E.p(e,o):(E=Mt(e),E.c(),E.m(r,null)),k&&k.p&&(!f||1024&o)&&m(k,O,e,e[10],f?h(O,e[10],o,Dt):v(e[10]),qt),e[7].content&&!e[1]?N?(N.p(e,o),130&o&&ae(N,1)):(N=Ft(e),N.c(),ae(N,1),N.m(n,a)):N&&(se(),ce(N,1,1,(()=>{N=null})),ie()),T&&T.p&&(!f||1024&o)&&m(T,L,e,e[10],f?h(L,e[10],o,Tt):v(e[10]),jt),e[7].footer?j?(j.p(e,o),128&o&&ae(j,1)):(j=Ht(e),j.c(),ae(j,1),j.m(n,null)):j&&(se(),ce(j,1,1,(()=>{j=null})),ie()),(!f||8&o&&u!==(u="ac-modal "+e[3]))&&R(t,"class",u),(!f||24&o)&&D(t,"-active",e[4])},i(e){f||(ae(_,e),ae(k,e),ae(N),ae(T,e),ae(j),f=!0)},o(e){ce(_,e),ce(k,e),ce(N),ce(T,e),ce(j),f=!1},d(n){n&&$(t),_&&_.d(n),E&&E.d(),k&&k.d(n),N&&N.d(),T&&T.d(n),j&&j.d(),e[13](null),p=!1,c(g)}}}function zt(e,t,r){let{$$slots:o={},$$scope:s}=t;const i=function(e){const t={};for(const n in e)t[n]=!0;return t}(o),a=n(390);let c,{contentNoPadding:l=!1}=t,{hideContent:u=!1}=t,{disableClose:f=!1}=t,{className:d=""}=t,{visible:p=!1}=t,{disableScroll:h=null}=t;const m=F(),v=()=>{h&&c&&a.enableBodyScroll(c)},g=()=>{f||(m("close"),v())};return M((()=>{document.addEventListener("keyup",(e=>{"Escape"===e.key&&g()})),h&&c&&a.disableBodyScroll(c,{})})),e.$$set=e=>{"contentNoPadding"in e&&r(0,l=e.contentNoPadding),"hideContent"in e&&r(1,u=e.hideContent),"disableClose"in e&&r(2,f=e.disableClose),"className"in e&&r(3,d=e.className),"visible"in e&&r(4,p=e.visible),"disableScroll"in e&&r(8,h=e.disableScroll),"$$scope"in e&&r(10,s=e.$$scope)},[l,u,f,d,p,c,g,i,h,v,s,o,function(t){H.call(this,e,t)},function(e){z[e?"unshift":"push"]((()=>{c=e,r(5,c)}))}]}const Wt=class extends me{constructor(e){super(),he(this,e,zt,Jt,u,{contentNoPadding:0,hideContent:1,disableClose:2,className:3,visible:4,disableScroll:8,FreeScrollLock:9})}get FreeScrollLock(){return this.$$.ctx[9]}};function Vt(e){let t;return{c(){t=x("span"),t.textContent=`${e[4].conditional_formatting}`,R(t,"slot","header")},m(e,n){w(e,t,n)},p:s,d(e){e&&$(t)}}}function Xt(e){let t,n,r,o,s;return{c(){t=x("div"),n=x("span"),r=S(),o=x("span"),s=O(e[2]),R(n,"class","dashicons dashicons-info-outline acp-cf-error__icon"),R(o,"class","acp-cf-error__message"),R(t,"class","acp-cf-error")},m(e,i){w(e,t,i),b(t,n),b(t,r),b(t,o),b(o,s)},p(e,t){4&t&&T(s,e[2])},d(e){e&&$(t)}}}function Gt(e){let t,n,r,o,s,i=e[2]&&Xt(e);function a(t){e[9](t)}let c={};return void 0!==e[1]&&(c.groups=e[1]),r=new Ot({props:c}),z.push((()=>ue(r,"groups",a))),{c(){t=x("div"),i&&i.c(),n=S(),fe(r.$$.fragment),R(t,"slot","content")},m(e,o){w(e,t,o),i&&i.m(t,null),b(t,n),de(r,t,null),s=!0},p(e,s){e[2]?i?i.p(e,s):(i=Xt(e),i.c(),i.m(t,n)):i&&(i.d(1),i=null);const a={};!o&&2&s&&(o=!0,a.groups=e[1],Q((()=>o=!1))),r.$set(a)},i(e){s||(ae(r.$$.fragment,e),s=!0)},o(e){ce(r.$$.fragment,e),s=!1},d(e){e&&$(t),i&&i.d(),pe(r)}}}function Kt(e){let t,n,r,o,s,i,a,c,l,u,f,d=e[4].documentation_link+"",p=e[4].save_apply+"";return{c(){t=x("div"),n=x("div"),r=x("div"),o=x("span"),s=S(),i=x("div"),a=x("button"),c=O(p),R(r,"class","ac-modal-footer-actions__info"),R(a,"class","button button-primary"),a.disabled=l=!e[3],R(i,"class","ac-modal-footer-actions__buttons"),R(n,"class","ac-modal-footer-actions"),R(t,"slot","footer")},m(l,p){w(l,t,p),b(t,n),b(n,r),b(r,o),o.innerHTML=d,b(n,s),b(n,i),b(i,a),b(a,c),u||(f=A(a,"click",N(e[6])),u=!0)},p(e,t){8&t&&l!==(l=!e[3])&&(a.disabled=l)},d(e){e&&$(t),u=!1,f()}}}function Qt(e){let t,n;return t=new Wt({props:{visible:e[0],className:"-cf",disableScroll:!0,$$slots:{footer:[Kt],content:[Gt],header:[Vt]},$$scope:{ctx:e}}}),t.$on("close",e[5]),{c(){fe(t.$$.fragment)},m(e,r){de(t,e,r),n=!0},p(e,[n]){const r={};1&n&&(r.visible=e[0]),8206&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(ae(t.$$.fragment,e),n=!0)},o(e){ce(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Yt(e,t,n){let r,o,i,a;var c,l;c=Ct,l=e=>n(1,a=e),e.$$.on_destroy.push(function(e,...t){if(null==e)return s;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(c,l));let{visible:u=!0}=t,f=be(),d="",p=be();const h=ve();return e.$$set=e=>{"visible"in e&&n(0,u=e.visible)},e.$$.update=()=>{2&e.$$.dirty&&n(7,r=JSON.stringify(a)),384&e.$$.dirty&&n(3,i=o!==r)},n(8,o=JSON.stringify(f)),[u,a,d,i,h,()=>{Ct.update((()=>be())),n(0,u=!1),p=[]},()=>{Ct.storePreference(a).then((e=>{!0===e.data.success?window.location.reload():n(2,d=e.data.data)})).catch((e=>{n(2,d=e.message)}))},r,o,function(e){a=e,Ct.set(a)}]}const Zt=class extends me{constructor(e){super(),he(this,e,Yt,Qt,u,{visible:0})}},en=(window.AC_SERVICES||(window.AC_SERVICES=new class{constructor(){this.services={},this.events=new(t()),this.filters=new o,this.$=r}registerService(e,t){return this.services[e]=t,this.events.emit(`Service.Registered.${e}`,t),this}getService(e){return this.hasService(e)?this.services[e]:null}hasService(e){return this.services.hasOwnProperty(e)}addListener(e,t){this.events.addListener(e,t)}emitEvent(e,t){this.events.emit(e,t)}}),window.AC_SERVICES),tn=ve();en.addListener("Table.Ready",(e=>{var t,n,o;if(0===Object.keys(ye().columns).length)return;const s=r.create("a").addClasses("ac-table-button").addHtml(`${tn.formatting} <span class="acp-cf-button-count" data-count>0</span>`),i=r.create("div").addClasses("ac-cf-container");null===(n=null===(t=e.table.Actions)||void 0===t?void 0:t.getElement().querySelector(".ac-table-actions-buttons"))||void 0===n||n.append(s.getElement()),null===(o=e.table.Actions)||void 0===o||o.refresh(),Ct.set(be()),Ct.subscribe((e=>{let t=0;e.forEach((e=>{t+=e.rules.length}));let n=s.getElement().querySelector("[data-count]");n&&(n.innerHTML=t.toString(),n.style.display=t<1?"none":"inline-block")})),document.body.append(i.getElement()),s.addEventListener("click",(()=>{new Zt({target:i.getElement(),props:{visible:!0}})}))}))})()})();