@dcupl/common 1.8.1 → 1.8.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{common.js → browser/common.umd.js} +2 -1
- package/dist/browser/common.umd.js.map +1 -0
- package/dist/{lib-esm → esm}/types/rest-api/rest-api.types.d.ts +5 -4
- package/dist/{lib-esm → esm}/types/workflow/workflow.types.d.ts +16 -11
- package/dist/node/index.cjs.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- /package/dist/{lib-esm → esm}/analytics.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/analytics.controller.js +0 -0
- /package/dist/{lib-esm → esm}/analytics.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/cache.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/cache.controller.js +0 -0
- /package/dist/{lib-esm → esm}/cache.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/changeDetection.d.ts +0 -0
- /package/dist/{lib-esm → esm}/changeDetection.js +0 -0
- /package/dist/{lib-esm → esm}/changeDetection.js.map +0 -0
- /package/dist/{lib-esm → esm}/computeSuggestions.d.ts +0 -0
- /package/dist/{lib-esm → esm}/computeSuggestions.js +0 -0
- /package/dist/{lib-esm → esm}/computeSuggestions.js.map +0 -0
- /package/dist/{lib-esm → esm}/dependency-graph.d.ts +0 -0
- /package/dist/{lib-esm → esm}/dependency-graph.js +0 -0
- /package/dist/{lib-esm → esm}/dependency-graph.js.map +0 -0
- /package/dist/{lib-esm → esm}/getAggregation.d.ts +0 -0
- /package/dist/{lib-esm → esm}/getAggregation.js +0 -0
- /package/dist/{lib-esm → esm}/getAggregation.js.map +0 -0
- /package/dist/{lib-esm → esm}/getFacets.d.ts +0 -0
- /package/dist/{lib-esm → esm}/getFacets.js +0 -0
- /package/dist/{lib-esm → esm}/getFacets.js.map +0 -0
- /package/dist/{lib-esm → esm}/helper.d.ts +0 -0
- /package/dist/{lib-esm → esm}/helper.js +0 -0
- /package/dist/{lib-esm → esm}/helper.js.map +0 -0
- /package/dist/{lib-esm → esm}/index.d.ts +0 -0
- /package/dist/{lib-esm → esm}/index.js +0 -0
- /package/dist/{lib-esm → esm}/index.js.map +0 -0
- /package/dist/{lib-esm → esm}/indices.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/indices.controller.js +0 -0
- /package/dist/{lib-esm → esm}/indices.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/object-hash.d.ts +0 -0
- /package/dist/{lib-esm → esm}/object-hash.js +0 -0
- /package/dist/{lib-esm → esm}/object-hash.js.map +0 -0
- /package/dist/{lib-esm → esm}/performance.d.ts +0 -0
- /package/dist/{lib-esm → esm}/performance.js +0 -0
- /package/dist/{lib-esm → esm}/performance.js.map +0 -0
- /package/dist/{lib-esm → esm}/pivot.d.ts +0 -0
- /package/dist/{lib-esm → esm}/pivot.js +0 -0
- /package/dist/{lib-esm → esm}/pivot.js.map +0 -0
- /package/dist/{lib-esm → esm}/property-parser.d.ts +0 -0
- /package/dist/{lib-esm → esm}/property-parser.js +0 -0
- /package/dist/{lib-esm → esm}/property-parser.js.map +0 -0
- /package/dist/{lib-esm → esm}/query-builder.d.ts +0 -0
- /package/dist/{lib-esm → esm}/query-builder.js +0 -0
- /package/dist/{lib-esm → esm}/query-builder.js.map +0 -0
- /package/dist/{lib-esm → esm}/query.helper.d.ts +0 -0
- /package/dist/{lib-esm → esm}/query.helper.js +0 -0
- /package/dist/{lib-esm → esm}/query.helper.js.map +0 -0
- /package/dist/{lib-esm → esm}/queryData.d.ts +0 -0
- /package/dist/{lib-esm → esm}/queryData.js +0 -0
- /package/dist/{lib-esm → esm}/queryData.js.map +0 -0
- /package/dist/{lib-esm → esm}/script.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/script.controller.js +0 -0
- /package/dist/{lib-esm → esm}/script.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/template-parser.d.ts +0 -0
- /package/dist/{lib-esm → esm}/template-parser.js +0 -0
- /package/dist/{lib-esm → esm}/template-parser.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/aggregation.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/aggregation.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/aggregation.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/api/file.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/api/file.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/api/file.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/app-loader.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/app-loader.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/app-loader.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/data.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/data.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/data.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/dcupl.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/dcupl.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/dcupl.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/facets.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/facets.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/facets.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/filter.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/filter.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/filter.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/group-by.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/group-by.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/group-by.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/index.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/index.js +0 -0
- /package/dist/{lib-esm → esm}/types/index.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/internal.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/internal.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/internal.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/list.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/list.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/list.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/model.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/model.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/model.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/projection.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/projection.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/projection.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/quality.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/quality.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/quality.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/query.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/query.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/query.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/rest-api/rest-api.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/rest-api/rest-api.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/runner/runner.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/runner/runner.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/runner/runner.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/section.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/section.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/section.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/suggestion.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/suggestion.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/suggestion.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/testing.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/testing.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/testing.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/workflow/workflow.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/workflow/workflow.types.js.map +0 -0
|
@@ -1 +1,2 @@
|
|
|
1
|
-
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t=r();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(this,(()=>(()=>{"use strict";var e={d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};function t(e){return function(e){for(var r=0,t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r.toString(16)}(n(e))}function n(e){if("object"!=typeof e||null===e)return String(e);if(Array.isArray(e))return"["+e.map(n).join(",")+"]";for(var r=Object.keys(e).sort(),t="{",o=0;o<r.length;o++){var i=r[o];t+=i+":"+n(e[i]),o<r.length-1&&(t+=",")}return t+"}"}e.r(r),e.d(r,{AnalyticsController:()=>a,CacheController:()=>kr,ChangeDetector:()=>Pr,DatePropertyTypes:()=>zo,DcuplQueryBuilder:()=>pn,DcuplQueryOperatorsAsArray:()=>No,DependencyGraph:()=>Hr,IndicesController:()=>xn,NumberPropertyTypes:()=>Do,PropertyTypesAsArray:()=>Fo,QueryManager:()=>ko,ScriptController:()=>Mo,clone:()=>Rr,computeSuggestions:()=>Vr,escapeRegExp:()=>zr,evaluateTemplate:()=>Co,generateBooleanQuery:()=>In,generateKey:()=>Fr,generateNumberAndDateQuery:()=>Fn,generateReferenceQuery:()=>Dn,generateTextQuery:()=>Cn,getAggregation:()=>et,getDateConstraintUid:()=>Mr,getDcuplPropertyTypeForNativeType:()=>Mn,getDistinct:()=>ot,getFacets:()=>bn,getFilterEntryId:()=>Tr,getNumberConstraintUid:()=>Er,getPropertiesForData:()=>kn,groupBy:()=>Ir,isFloat:()=>En,isInt:()=>Tn,isValidQueryStatement:()=>zn,parseTemplate:()=>Io,perf:()=>o,pivot:()=>qn,removeTrailingSlash:()=>Dr,trigger:()=>Gr,unescapeRegExp:()=>Nr,uniqBy:()=>Cr});var o={now:function(){return"undefined"!=typeof performance?performance.now():(new Date).getTime()},mark:function(e){"undefined"!=typeof performance&&performance.mark(e)},measure:function(e,r,t){"undefined"!=typeof performance&&performance.measure(e,r,t)},getEntriesByName:function(e){if("undefined"!=typeof performance)return performance.getEntriesByName(e)},getEntriesByType:function(e){if("undefined"!=typeof performance)return performance.getEntriesByType(e)}},i=function(){return i=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},i.apply(this,arguments)},a=function(){function e(){this.enabled=!1}return e.prototype.init=function(e){this.data=new Map,this.enabled=e},e.prototype.set=function(e){if(!this.enabled)return e.value;var r=this.getKey(e.value.name,e.context);return this.data.set(r,e.value),this.data.get(r)},e.prototype.mark=function(e){if(this.enabled){var r=this.getKey(e.name,e.context),t={name:e.name,type:"mark",value:o.now(),createdAt:Date.now()};return this.data.set(r,t),t}},e.prototype.measure=function(e){if(this.enabled){var r=this.getKey(e.name,e.context),t=this.data.get(this.getKey(e.start,e.context)),n=this.data.get(this.getKey(e.end,e.context));if(t&&n){var o=n.value-t.value,a=Math.round(100*o)/100,u=this.data.get(r);if(u&&e.sum){var c=u.value+a,l=i(i({},u),{value:c});return this.data.set(r,l),l}var f={name:e.name,type:"measure",value:a,createdAt:Date.now()};return e.detail&&(f.detail=e.detail),this.data.set(r,f),f}}},e.prototype.update=function(e){if(!this.enabled)return e.value;var r=this.getKey(e.value.name,e.context),t=this.data.get(r);if(t){var n=i(i({},t),e.value);this.data.set(r,n)}else this.data.set(r,e.value);return this.data.get(r)},e.prototype.getResourceInfosFromPerformanceAPI=function(){return"undefined"==typeof performance?[]:o.getEntriesByType("resource")},e.prototype.get=function(e){var r=this.getKey(e.name,e.context);return this.data.get(r)},e.prototype.getByType=function(e){return Array.from(this.data.values()).filter((function(r){return r.type===e}))},e.prototype.getByName=function(e){return Array.from(this.data.values()).filter((function(r){return r.name===e}))},e.prototype.clear=function(){this.data.clear()},e.prototype.getKey=function(e,r){return r?e+"_"+t(r):e},e}();const u=function(e,r){return e===r||e!=e&&r!=r},c=function(e,r){for(var t=e.length;t--;)if(u(e[t][0],r))return t;return-1};var l=Array.prototype.splice;function f(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}f.prototype.clear=function(){this.__data__=[],this.size=0},f.prototype.delete=function(e){var r=this.__data__,t=c(r,e);return!(t<0||(t==r.length-1?r.pop():l.call(r,t,1),--this.size,0))},f.prototype.get=function(e){var r=this.__data__,t=c(r,e);return t<0?void 0:r[t][1]},f.prototype.has=function(e){return c(this.__data__,e)>-1},f.prototype.set=function(e,r){var t=this.__data__,n=c(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};const s=f,y="object"==typeof global&&global&&global.Object===Object&&global;var p="object"==typeof self&&self&&self.Object===Object&&self;const v=y||p||Function("return this")(),d=v.Symbol;var h=Object.prototype,g=h.hasOwnProperty,b=h.toString,m=d?d.toStringTag:void 0;var w=Object.prototype.toString;var x=d?d.toStringTag:void 0;const j=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?function(e){var r=g.call(e,m),t=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=b.call(e);return n&&(r?e[m]=t:delete e[m]),o}(e):function(e){return w.call(e)}(e)},_=function(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)},A=function(e){if(!_(e))return!1;var r=j(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},O=v["__core-js_shared__"];var q,S=(q=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"";var K=Function.prototype.toString;const Q=function(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var k=/^\[object .+?Constructor\]$/,T=Function.prototype,E=Object.prototype,M=T.toString,C=E.hasOwnProperty,I=RegExp("^"+M.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const F=function(e){return!(!_(e)||(r=e,S&&S in r))&&(A(e)?I:k).test(Q(e));var r},D=function(e,r){var t=function(e,r){return null==e?void 0:e[r]}(e,r);return F(t)?t:void 0},z=D(v,"Map"),N=D(Object,"create");var P=Object.prototype.hasOwnProperty;var R=Object.prototype.hasOwnProperty;function B(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}B.prototype.clear=function(){this.__data__=N?N(null):{},this.size=0},B.prototype.delete=function(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r},B.prototype.get=function(e){var r=this.__data__;if(N){var t=r[e];return"__lodash_hash_undefined__"===t?void 0:t}return P.call(r,e)?r[e]:void 0},B.prototype.has=function(e){var r=this.__data__;return N?void 0!==r[e]:R.call(r,e)},B.prototype.set=function(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=N&&void 0===r?"__lodash_hash_undefined__":r,this};const G=B,U=function(e,r){var t,n,o=e.__data__;return("string"==(n=typeof(t=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?o["string"==typeof r?"string":"hash"]:o.map};function $(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}$.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(z||s),string:new G}},$.prototype.delete=function(e){var r=U(this,e).delete(e);return this.size-=r?1:0,r},$.prototype.get=function(e){return U(this,e).get(e)},$.prototype.has=function(e){return U(this,e).has(e)},$.prototype.set=function(e,r){var t=U(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this};const V=$;function L(e){var r=this.__data__=new s(e);this.size=r.size}L.prototype.clear=function(){this.__data__=new s,this.size=0},L.prototype.delete=function(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t},L.prototype.get=function(e){return this.__data__.get(e)},L.prototype.has=function(e){return this.__data__.has(e)},L.prototype.set=function(e,r){var t=this.__data__;if(t instanceof s){var n=t.__data__;if(!z||n.length<199)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new V(n)}return t.set(e,r),this.size=t.size,this};const W=L,H=function(){try{var e=D(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Z=function(e,r,t){"__proto__"==r&&H?H(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t};var J=Object.prototype.hasOwnProperty;const X=function(e,r,t){var n=e[r];J.call(e,r)&&u(n,t)&&(void 0!==t||r in e)||Z(e,r,t)},Y=function(e,r,t,n){var o=!t;t||(t={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(t[u],e[u],u,t,e):void 0;void 0===c&&(c=e[u]),o?Z(t,u,c):X(t,u,c)}return t},ee=function(e){return null!=e&&"object"==typeof e},re=function(e){return ee(e)&&"[object Arguments]"==j(e)};var te=Object.prototype,ne=te.hasOwnProperty,oe=te.propertyIsEnumerable;const ie=re(function(){return arguments}())?re:function(e){return ee(e)&&ne.call(e,"callee")&&!oe.call(e,"callee")},ae=Array.isArray;var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,ce=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=ce&&ce.exports===ue?v.Buffer:void 0;const fe=(le?le.isBuffer:void 0)||function(){return!1};var se=/^(?:0|[1-9]\d*)$/;const ye=function(e,r){var t=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==t||"symbol"!=t&&se.test(e))&&e>-1&&e%1==0&&e<r},pe=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ve={};ve["[object Float32Array]"]=ve["[object Float64Array]"]=ve["[object Int8Array]"]=ve["[object Int16Array]"]=ve["[object Int32Array]"]=ve["[object Uint8Array]"]=ve["[object Uint8ClampedArray]"]=ve["[object Uint16Array]"]=ve["[object Uint32Array]"]=!0,ve["[object Arguments]"]=ve["[object Array]"]=ve["[object ArrayBuffer]"]=ve["[object Boolean]"]=ve["[object DataView]"]=ve["[object Date]"]=ve["[object Error]"]=ve["[object Function]"]=ve["[object Map]"]=ve["[object Number]"]=ve["[object Object]"]=ve["[object RegExp]"]=ve["[object Set]"]=ve["[object String]"]=ve["[object WeakMap]"]=!1;const de=function(e){return function(r){return e(r)}};var he="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=he&&"object"==typeof module&&module&&!module.nodeType&&module,be=ge&&ge.exports===he&&y.process;const me=function(){try{return ge&&ge.require&&ge.require("util").types||be&&be.binding&&be.binding("util")}catch(e){}}();var we=me&&me.isTypedArray;const xe=we?de(we):function(e){return ee(e)&&pe(e.length)&&!!ve[j(e)]};var je=Object.prototype.hasOwnProperty;const _e=function(e,r){var t=ae(e),n=!t&&ie(e),o=!t&&!n&&fe(e),i=!t&&!n&&!o&&xe(e),a=t||n||o||i,u=a?function(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}(e.length,String):[],c=u.length;for(var l in e)!r&&!je.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ye(l,c))||u.push(l);return u};var Ae=Object.prototype;const Oe=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||Ae)},qe=function(e,r){return function(t){return e(r(t))}},Se=qe(Object.keys,Object);var Ke=Object.prototype.hasOwnProperty;const Qe=function(e){if(!Oe(e))return Se(e);var r=[];for(var t in Object(e))Ke.call(e,t)&&"constructor"!=t&&r.push(t);return r},ke=function(e){return null!=e&&pe(e.length)&&!A(e)},Te=function(e){return ke(e)?_e(e):Qe(e)};var Ee=Object.prototype.hasOwnProperty;const Me=function(e){if(!_(e))return function(e){var r=[];if(null!=e)for(var t in Object(e))r.push(t);return r}(e);var r=Oe(e),t=[];for(var n in e)("constructor"!=n||!r&&Ee.call(e,n))&&t.push(n);return t},Ce=function(e){return ke(e)?_e(e,!0):Me(e)};var Ie="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fe=Ie&&"object"==typeof module&&module&&!module.nodeType&&module,De=Fe&&Fe.exports===Ie?v.Buffer:void 0,ze=De?De.allocUnsafe:void 0;const Ne=function(){return[]};var Pe=Object.prototype.propertyIsEnumerable,Re=Object.getOwnPropertySymbols;const Be=Re?function(e){return null==e?[]:(e=Object(e),function(e,r){for(var t=-1,n=null==e?0:e.length,o=0,i=[];++t<n;){var a=e[t];r(a,t,e)&&(i[o++]=a)}return i}(Re(e),(function(r){return Pe.call(e,r)})))}:Ne,Ge=function(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e},Ue=qe(Object.getPrototypeOf,Object),$e=Object.getOwnPropertySymbols?function(e){for(var r=[];e;)Ge(r,Be(e)),e=Ue(e);return r}:Ne,Ve=function(e,r,t){var n=r(e);return ae(e)?n:Ge(n,t(e))},Le=function(e){return Ve(e,Te,Be)},We=function(e){return Ve(e,Ce,$e)},He=D(v,"DataView"),Ze=D(v,"Promise"),Je=D(v,"Set"),Xe=D(v,"WeakMap");var Ye="[object Map]",er="[object Promise]",rr="[object Set]",tr="[object WeakMap]",nr="[object DataView]",or=Q(He),ir=Q(z),ar=Q(Ze),ur=Q(Je),cr=Q(Xe),lr=j;(He&&lr(new He(new ArrayBuffer(1)))!=nr||z&&lr(new z)!=Ye||Ze&&lr(Ze.resolve())!=er||Je&&lr(new Je)!=rr||Xe&&lr(new Xe)!=tr)&&(lr=function(e){var r=j(e),t="[object Object]"==r?e.constructor:void 0,n=t?Q(t):"";if(n)switch(n){case or:return nr;case ir:return Ye;case ar:return er;case ur:return rr;case cr:return tr}return r});const fr=lr;var sr=Object.prototype.hasOwnProperty;const yr=v.Uint8Array,pr=function(e){var r=new e.constructor(e.byteLength);return new yr(r).set(new yr(e)),r};var vr=/\w*$/;var dr=d?d.prototype:void 0,hr=dr?dr.valueOf:void 0;const gr=function(e,r,t){var n,o,i,a=e.constructor;switch(r){case"[object ArrayBuffer]":return pr(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,r){var t=r?pr(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}(e,t);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,r){var t=r?pr(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}(e,t);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,vr.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=e,hr?Object(hr.call(n)):{}}};var br=Object.create;const mr=function(){function e(){}return function(r){if(!_(r))return{};if(br)return br(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();var wr=me&&me.isMap;const xr=wr?de(wr):function(e){return ee(e)&&"[object Map]"==fr(e)};var jr=me&&me.isSet;const _r=jr?de(jr):function(e){return ee(e)&&"[object Set]"==fr(e)};var Ar="[object Arguments]",Or="[object Function]",qr="[object Object]",Sr={};Sr[Ar]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object DataView]"]=Sr["[object Boolean]"]=Sr["[object Date]"]=Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr[qr]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object Symbol]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Error]"]=Sr[Or]=Sr["[object WeakMap]"]=!1;const Kr=function e(r,t,n,o,i,a){var u,c=1&t,l=2&t,f=4&t;if(n&&(u=i?n(r,o,i,a):n(r)),void 0!==u)return u;if(!_(r))return r;var s=ae(r);if(s){if(u=function(e){var r=e.length,t=new e.constructor(r);return r&&"string"==typeof e[0]&&sr.call(e,"index")&&(t.index=e.index,t.input=e.input),t}(r),!c)return function(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}(r,u)}else{var y=fr(r),p=y==Or||"[object GeneratorFunction]"==y;if(fe(r))return function(e,r){if(r)return e.slice();var t=e.length,n=ze?ze(t):new e.constructor(t);return e.copy(n),n}(r,c);if(y==qr||y==Ar||p&&!i){if(u=l||p?{}:function(e){return"function"!=typeof e.constructor||Oe(e)?{}:mr(Ue(e))}(r),!c)return l?function(e,r){return Y(e,$e(e),r)}(r,function(e,r){return e&&Y(r,Ce(r),e)}(u,r)):function(e,r){return Y(e,Be(e),r)}(r,function(e,r){return e&&Y(r,Te(r),e)}(u,r))}else{if(!Sr[y])return i?r:{};u=gr(r,y,c)}}a||(a=new W);var v=a.get(r);if(v)return v;a.set(r,u),_r(r)?r.forEach((function(o){u.add(e(o,t,n,o,r,a))})):xr(r)&&r.forEach((function(o,i){u.set(i,e(o,t,n,i,r,a))}));var d=s?void 0:(f?l?We:Le:l?Ce:Te)(r);return function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n&&!1!==r(e[t],t,e););}(d||r,(function(o,i){d&&(o=r[i=o]),X(u,i,e(o,t,n,i,r,a))})),u},Qr=function(e){return Kr(e,5)};var kr=function(){function e(e){this.enabled=e,this.cache=new Map}return e.prototype.get=function(e,r){if(this.enabled)return this.cache.get(this.getCacheName(e,r))},e.prototype.set=function(e,r,t){this.enabled&&this.cache.set(this.getCacheName(e,r),t)},e.prototype.has=function(e,r){return this.cache.has(this.getCacheName(e,r))},e.prototype.clear=function(){this.cache.clear()},e.prototype.generateContext=function(e){try{return Qr(e)}catch(r){return console.log("error in cache generateContext",r),e}},e.prototype.getCacheName=function(e,r){return e+"_"+t(r)},e}(),Tr=function(e,r){return void 0===r&&(r=""),"".concat(e,"#").concat(r)},Er=function(e){return"".concat(e.gt,"_").concat(e.gte,"_").concat(e.lt,"_").concat(e.lte,"_").concat(e.eq,"_").concat(e.ne)},Mr=function(e){return"".concat(e.gt,"_").concat(e.gte,"_").concat(e.lt,"_").concat(e.lte,"_").concat(e.eq,"_").concat(e.ne)},Cr=function(e,r){var t="function"==typeof r?r:function(e){return e[r]};return function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))}([],function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}(e.reduce((function(e,r){var n=null==r?r:t(r);return e.has(n)||e.set(n,r),e}),new Map).values()),!1)},Ir=function(e,r){return e.reduce((function(e,t){var n="function"==typeof r?r(t):t[r];return e.hasOwnProperty(n)||(e[n]=[]),e[n].push(t),e}),{})};function Fr(e){void 0===e&&(e=10);for(var r="",t=0;t<e;t++)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return r}var Dr=function(e){return e.replace(/\/+$/,"")},zr=function(e){return"string"!=typeof e?"":e.replace(/[[\]{}()*+?.,\\^$|#]/g,"\\$&")},Nr=function(e){return"string"!=typeof e?"":e.replace(/\\([[\]{}()*+?.,\\^$|#])/g,"$1")},Pr=function(){function e(){this.updateListener=new Set}return e.prototype._init=function(e){var r=this;this.key=e.cdRefKey,this.analyticsController=e.analyticsController,this.parentCd=e.parentCd,this.dcuplInitOptions=e.dcuplInitOptions,this.parentCd&&(this.off=this.parentCd.on((function(e){var t;"update"===e.action&&e.originCdRefKey===(null===(t=r.parentCd)||void 0===t?void 0:t.key)&&r.trigger(e)})))},e.prototype.destroy=function(){this.off&&this.off()},e.prototype.trigger=function(e){e.originCdRefKey||(e.originCdRefKey=this.key),this.updateListener.forEach((function(r){r(e)}))},e.prototype.on=function(e){var r=this;return this.updateListener.add(e),function(){r.updateListener.delete(e)}},e}(),Rr=function(e,r){return r?"undefined"!=typeof structuredClone?structuredClone(e):Qr(e):e},Br=function(e,r,t,n,i){var a,u;try{var c=!!(null===(u=null===(a=e.dcuplInitOptions.performance)||void 0===a?void 0:a.clone)||void 0===u?void 0:u.enabled)&&!!r.cloneResult,l=Rr(i,c),f=o.now();r.duration=f-t,null==e||e.trigger(r);var s={duration:r.duration};return r.modelKey&&(s.model=r.modelKey),r.args&&(s.args=r.args),e.analyticsController.mark({name:"".concat(r.name,":end"),context:n}),e.analyticsController.measure({name:"".concat(r.name),start:"".concat(r.name,":start"),end:"".concat(r.name,":end"),context:n,detail:s}),l}catch(e){return i}},Gr=function(e){return function(r,t,n){var i=n.value;return n.value=function(){for(var r,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var u=this.cdRef,c=o.now(),l="";e.mergeAnalytics||(l=Fr()),u.analyticsController.mark({name:"".concat(e.name,":start"),context:l});var f=null===(r=this.model)||void 0===r?void 0:r.key;!e.originCdRefKey&&u.key&&(e.originCdRefKey=u.key),f&&(e.modelKey=f);try{var s=i.apply(this,n);return e.method=t,e.args=n,s&&"then"in s?s.then((function(r){return Br(u,e,c,l,r)})):Br(u,e,c,l,s)}catch(e){throw e}},n}},Ur=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},$r=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Vr(e,r,t,n){var o,i;t.max||(t.max=20);var a=[],u=t.transform?n.transformValue(t.value,t.transform):t.value;try{for(var c=Ur(r.entries()),l=c.next();!l.done;l=c.next()){var f=$r(l.value,2),s=f[0],y=f[1],p=y.some((function(r){return e.has(r)})),v=t.transform?n.transformValue(s,t.transform):s;if(!(t.excludeUndefineds&&void 0===s||t.excludeNulls&&null===s)){if(!p||""!==u&&"//"!==u)p&&n.queryFind(v,u,"some")&&(d={value:s,keys:t.calculateResultKeys?y:[]},a.push(d));else{var d={value:s,keys:t.calculateResultKeys?y:[]};a.push(d)}if(a.length===t.max)break}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return a}var Lr=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Wr=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},Hr=function(){function e(){this.nodes=new Set,this.edges=new Map}return e.prototype.addNode=function(e){this.nodes.has(e)||(this.nodes.add(e),this.edges.set(e,new Set))},e.prototype.addDependency=function(e,r){if(!this.nodes.has(e)||!this.nodes.has(r))throw new Error("Both nodes must exist before adding a dependency.");this.edges.get(e).add(r)},e.prototype.removeNode=function(e){var r,t;if(!this.nodes.has(e))throw new Error("Node does not exist.");this.nodes.delete(e),this.edges.delete(e);try{for(var n=Lr(this.edges.values()),o=n.next();!o.done;o=n.next())o.value.delete(e)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}},e.prototype.removeDependency=function(e,r){if(!this.edges.has(e))throw new Error("From node does not exist.");this.edges.get(e).delete(r)},e.prototype.hasNode=function(e){return this.nodes.has(e)},e.prototype.hasDependency=function(e,r){return!!this.edges.has(e)&&this.edges.get(e).has(r)},e.prototype.getDependencies=function(e){if(!this.edges.has(e))throw new Error("Node does not exist.");return Array.from(this.edges.get(e))},e.prototype.getDependents=function(e){var r,t,n=[];try{for(var o=Lr(this.edges),i=o.next();!i.done;i=o.next()){var a=Wr(i.value,2),u=a[0];a[1].has(e)&&n.push(u)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return n},e.prototype.isCyclic=function(){var e,r,t=this,n=new Set,o=new Set,i=function(e){var r,a;if(n.has(e))return!1;if(o.has(e))return!0;o.add(e);var u=t.edges.get(e);if(u)try{for(var c=Lr(u),l=c.next();!l.done;l=c.next()){var f=l.value;if(i(f))return!0}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return o.delete(e),n.add(e),!1};try{for(var a=Lr(this.nodes),u=a.next();!u.done;u=a.next()){var c=u.value;if(i(c))return!0}}catch(r){e={error:r}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return!1},e.prototype.order=function(){var e,r,t=this,n=new Set,o=new Set,i=[],a=function(e){var r,u;if(!n.has(e)){if(o.has(e))throw new Error("Graph has a cycle.");o.add(e);var c=t.edges.get(e);if(c)try{for(var l=Lr(c),f=l.next();!f.done;f=l.next()){var s=f.value;a(s)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(r)throw r.error}}o.delete(e),n.add(e),i.push(e)}};try{for(var u=Lr(this.nodes),c=u.next();!c.done;c=u.next()){var l=c.value;n.has(l)||a(l)}}catch(r){e={error:r}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return i},e.prototype.clear=function(){this.nodes.clear(),this.edges.clear()},e.prototype.getNodes=function(){return Array.from(this.nodes)},e.prototype.getAllEdges=function(){var e,r,t,n,o=[];try{for(var i=Lr(this.edges),a=i.next();!a.done;a=i.next()){var u=Wr(a.value,2),c=u[0],l=u[1];try{for(var f=(t=void 0,Lr(l)),s=f.next();!s.done;s=f.next()){var y=s.value;o.push([c,y])}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}}}catch(r){e={error:r}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o},e}(),Zr=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Jr=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Xr(e){var r,t,n=0;try{for(var o=Zr(e),i=o.next();!i.done;i=o.next()){var a=i.value.toString().split(".")[1];a&&(n=Math.max(n,a.length))}}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return Math.pow(10,n)}function Yr(e,r,t){return(e*t+r*t)/t}var et=function(e,r,t,n){if(!n)throw new Error("Attribute not found");var o,i,a={attribute:n,types:e.types};return(a.types.includes("sum")||a.types.includes("avg")||a.types.includes("count"))&&(o=nt(n,r)),(a.types.includes("min")||a.types.includes("max"))&&(i=rt(e.attribute,r)),e.types.forEach((function(n){"sum"===n?a.sum=null==o?void 0:o.sum:"avg"===n?a.avg=null==o?void 0:o.average:"count"===n?a.count=null==o?void 0:o.count:"min"===n?a.min=i&&i[0]:"max"===n?a.max=i&&i[1]:"distinct"===n?a.distinct=ot(e,r,t):"group"===n&&(a.group=tt(e,r))})),a},rt=function(e,r){var t,n,o=void 0,i=void 0;try{for(var a=Zr(r.values()),u=a.next();!u.done;u=a.next()){var c=u.value;if(c){var l=c[e];(void 0===o||l<o)&&(o=l),(void 0===i||l>i)&&(i=l)}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}if(void 0!==o&&void 0!==i)return[o,i]},tt=function(e,r){var t,n,o,i,a,u,c,l,f=[];null===(u=null===(a=e.groupOptions)||void 0===a?void 0:a.groups)||void 0===u||u.forEach((function(e){f.push({option:e,count:0,keys:[]})}));var s={option:{value:["$dcupl_not_found"]},count:0,keys:[]};try{for(var y=Zr(r.values()),p=y.next();!p.done;p=y.next()){var v=p.value,d=v[e.attribute];try{for(var h=(o=void 0,Zr(f)),g=h.next();!g.done;g=h.next()){var b=g.value;void 0!==b.option.value&&b.option.value.includes(d)||void 0!==b.option.from&&b.option.from<d&&void 0!==b.option.to&&b.option.to>d?(b.count++,b.keys.push(v.key)):(null===(c=null==e?void 0:e.groupOptions)||void 0===c?void 0:c.calculateNotFound)&&(s.count++,s.keys.push(v.key))}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return(null===(l=null==e?void 0:e.groupOptions)||void 0===l?void 0:l.calculateNotFound)&&f.push(s),f},nt=function(e,r){var t,n,o,i,a,u,c,l=0,f=0;try{for(var s=Zr(r.values()),y=s.next();!y.done;y=s.next()){var p=y.value;if(p){var v=p[e];if(Array.isArray(v))try{for(var d=(o=void 0,Zr(v)),h=d.next();!h.done;h=d.next()){var g=h.value;"number"==typeof g&&(l=Yr(l,g,Xr([l,g])),f++)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}else"number"==typeof v&&(l=Yr(l,v,Xr([l,v])),f++)}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}if(0!==f)return{average:(a=l,u=f,c=Xr([l,f]),a*c/(u*c)),count:r.size,sum:l}},ot=function(e,r,t){var n,o,i,a,u=[];try{for(var c=Zr(t),l=c.next();!l.done;l=c.next()){var f=Jr(l.value,2),s=f[0],y=f[1];if((!e.excludeUndefineds||void 0!==s)&&y.find((function(e){return r.has(e)}))){var p={value:s,count:y.length};if((null===(i=e.distinctOptions)||void 0===i?void 0:i.skipKeys)||(p.keys=y),u.push(p),(null===(a=e.distinctOptions)||void 0===a?void 0:a.limit)&&u.length>=e.distinctOptions.limit)break}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}return u};const it=function(e,r,t,n){for(var o=e.length,i=t+(n?1:-1);n?i--:++i<o;)if(r(e[i],i,e))return i;return-1};function at(e){var r=-1,t=null==e?0:e.length;for(this.__data__=new V;++r<t;)this.add(e[r])}at.prototype.add=at.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},at.prototype.has=function(e){return this.__data__.has(e)};const ut=at,ct=function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1},lt=function(e,r){return e.has(r)},ft=function(e,r,t,n,o,i){var a=1&t,u=e.length,c=r.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(e),f=i.get(r);if(l&&f)return l==r&&f==e;var s=-1,y=!0,p=2&t?new ut:void 0;for(i.set(e,r),i.set(r,e);++s<u;){var v=e[s],d=r[s];if(n)var h=a?n(d,v,s,r,e,i):n(v,d,s,e,r,i);if(void 0!==h){if(h)continue;y=!1;break}if(p){if(!ct(r,(function(e,r){if(!lt(p,r)&&(v===e||o(v,e,t,n,i)))return p.push(r)}))){y=!1;break}}else if(v!==d&&!o(v,d,t,n,i)){y=!1;break}}return i.delete(e),i.delete(r),y},st=function(e){var r=-1,t=Array(e.size);return e.forEach((function(e,n){t[++r]=[n,e]})),t},yt=function(e){var r=-1,t=Array(e.size);return e.forEach((function(e){t[++r]=e})),t};var pt=d?d.prototype:void 0,vt=pt?pt.valueOf:void 0;var dt=Object.prototype.hasOwnProperty;var ht="[object Arguments]",gt="[object Array]",bt="[object Object]",mt=Object.prototype.hasOwnProperty;const wt=function(e,r,t,n,o,i){var a=ae(e),c=ae(r),l=a?gt:fr(e),f=c?gt:fr(r),s=(l=l==ht?bt:l)==bt,y=(f=f==ht?bt:f)==bt,p=l==f;if(p&&fe(e)){if(!fe(r))return!1;a=!0,s=!1}if(p&&!s)return i||(i=new W),a||xe(e)?ft(e,r,t,n,o,i):function(e,r,t,n,o,i,a){switch(t){case"[object DataView]":if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=r.byteLength||!i(new yr(e),new yr(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return u(+e,+r);case"[object Error]":return e.name==r.name&&e.message==r.message;case"[object RegExp]":case"[object String]":return e==r+"";case"[object Map]":var c=st;case"[object Set]":var l=1&n;if(c||(c=yt),e.size!=r.size&&!l)return!1;var f=a.get(e);if(f)return f==r;n|=2,a.set(e,r);var s=ft(c(e),c(r),n,o,i,a);return a.delete(e),s;case"[object Symbol]":if(vt)return vt.call(e)==vt.call(r)}return!1}(e,r,l,t,n,o,i);if(!(1&t)){var v=s&&mt.call(e,"__wrapped__"),d=y&&mt.call(r,"__wrapped__");if(v||d){var h=v?e.value():e,g=d?r.value():r;return i||(i=new W),o(h,g,t,n,i)}}return!!p&&(i||(i=new W),function(e,r,t,n,o,i){var a=1&t,u=Le(e),c=u.length;if(c!=Le(r).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in r:dt.call(r,f)))return!1}var s=i.get(e),y=i.get(r);if(s&&y)return s==r&&y==e;var p=!0;i.set(e,r),i.set(r,e);for(var v=a;++l<c;){var d=e[f=u[l]],h=r[f];if(n)var g=a?n(h,d,f,r,e,i):n(d,h,f,e,r,i);if(!(void 0===g?d===h||o(d,h,t,n,i):g)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=e.constructor,m=r.constructor;b==m||!("constructor"in e)||!("constructor"in r)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(e),i.delete(r),p}(e,r,t,n,o,i))},xt=function e(r,t,n,o,i){return r===t||(null==r||null==t||!ee(r)&&!ee(t)?r!=r&&t!=t:wt(r,t,n,o,e,i))},jt=function(e,r,t,n){var o=t.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var u=t[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){var c=(u=t[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(void 0===l&&!(c in e))return!1}else{var s=new W;if(n)var y=n(l,f,c,e,r,s);if(!(void 0===y?xt(f,l,3,n,s):y))return!1}}return!0},_t=function(e){return e==e&&!_(e)},At=function(e){for(var r=Te(e),t=r.length;t--;){var n=r[t],o=e[n];r[t]=[n,o,_t(o)]}return r},Ot=function(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}},qt=function(e){return"symbol"==typeof e||ee(e)&&"[object Symbol]"==j(e)};var St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kt=/^\w*$/;const Qt=function(e,r){if(ae(e))return!1;var t=typeof e;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=e&&!qt(e))||Kt.test(e)||!St.test(e)||null!=r&&e in Object(r)};function kt(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var t=function(){var n=arguments,o=r?r.apply(this,n):n[0],i=t.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return t.cache=i.set(o,a)||i,a};return t.cache=new(kt.Cache||V),t}kt.Cache=V;var Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Et=/\\(\\)?/g;const Mt=(Ct=kt((function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(Tt,(function(e,t,n,o){r.push(n?o.replace(Et,"$1"):t||e)})),r}),(function(e){return 500===It.size&&It.clear(),e})),It=Ct.cache,Ct);var Ct,It;const Ft=function(e,r){for(var t=-1,n=null==e?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o};var Dt=d?d.prototype:void 0,zt=Dt?Dt.toString:void 0;const Nt=function e(r){if("string"==typeof r)return r;if(ae(r))return Ft(r,e)+"";if(qt(r))return zt?zt.call(r):"";var t=r+"";return"0"==t&&1/r==-1/0?"-0":t},Pt=function(e){return null==e?"":Nt(e)},Rt=function(e,r){return ae(e)?e:Qt(e,r)?[e]:Mt(Pt(e))},Bt=function(e){if("string"==typeof e||qt(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},Gt=function(e,r){for(var t=0,n=(r=Rt(r,e)).length;null!=e&&t<n;)e=e[Bt(r[t++])];return t&&t==n?e:void 0},Ut=function(e,r,t){var n=null==e?void 0:Gt(e,r);return void 0===n?t:n},$t=function(e,r){return null!=e&&r in Object(e)},Vt=function(e,r){return null!=e&&function(e,r,t){for(var n=-1,o=(r=Rt(r,e)).length,i=!1;++n<o;){var a=Bt(r[n]);if(!(i=null!=e&&t(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&pe(o)&&ye(a,o)&&(ae(e)||ie(e))}(e,r,$t)},Lt=function(e){return e},Wt=function(e){return function(r){return null==r?void 0:r[e]}},Ht=function(e){return Qt(e)?Wt(Bt(e)):function(e){return function(r){return Gt(r,e)}}(e)},Zt=function(e){return"function"==typeof e?e:null==e?Lt:"object"==typeof e?ae(e)?(n=e[0],o=e[1],Qt(n)&&_t(o)?Ot(Bt(n),o):function(e){var r=Ut(e,n);return void 0===r&&r===o?Vt(e,n):xt(o,r,3)}):1==(t=At(r=e)).length&&t[0][2]?Ot(t[0][0],t[0][1]):function(e){return e===r||jt(e,r,t)}:Ht(e);var r,t,n,o};var Jt=/\s/;var Xt=/^\s+/;const Yt=function(e){return e?e.slice(0,function(e){for(var r=e.length;r--&&Jt.test(e.charAt(r)););return r}(e)+1).replace(Xt,""):e};var en=/^[-+]0x[0-9a-f]+$/i,rn=/^0b[01]+$/i,tn=/^0o[0-7]+$/i,nn=parseInt;var on=1/0;const an=function(e){return e?(e=function(e){if("number"==typeof e)return e;if(qt(e))return NaN;if(_(e)){var r="function"==typeof e.valueOf?e.valueOf():e;e=_(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var t=rn.test(e);return t||tn.test(e)?nn(e.slice(2),t?2:8):en.test(e)?NaN:+e}(e))===on||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},un=function(e){var r=an(e),t=r%1;return r==r?t?r-t:r:0};var cn=Math.max;const ln=function(e,r,t){var n=null==e?0:e.length;if(!n)return-1;var o=null==t?0:un(t);return o<0&&(o=cn(n+o,0)),it(e,Zt(r),o)};var fn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},sn=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},yn=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},pn=function(){function e(){this._defaultQueryOptions={modelKey:"",groupKey:"root",groupType:"and",queries:[]},this.currentQuery=Qr(this._defaultQueryOptions)}return e.prototype.init=function(e){this._initOptions=Qr(e),this.currentQuery=Qr(this._defaultQueryOptions),this.currentQuery.modelKey=e.modelKey},e.prototype.reset=function(){return this.init(this._initOptions),this.getQuery()},e.prototype.isQuery=function(e){return"attribute"in e},e.prototype.isQueryGroup=function(e){return"groupKey"in e},e.prototype.isRootQueryGroup=function(e){return this.isQueryGroup(e)&&"root"===e.groupKey},e.prototype.getQueryGroup=function(e){var r=this;return this.currentQuery.queries.find((function(t){return r.isQueryGroup(t)&&t.groupKey===e}))},e.prototype.getQuery=function(){return Qr(this.currentQuery)},e.prototype.hasQueryGroup=function(e){var r=this;return this.currentQuery.queries.some((function(t){return r.isQueryGroup(t)&&t.groupKey===e}))},e.prototype.has=function(e){var r=this;if(e.groupKey&&e.queryKey){var t=this.getQueryGroup(e.groupKey);if(t)return t.queries.some((function(t){return r.isQuery(t)&&t.queryKey===e.queryKey}))}else if(e.groupKey)return this.hasQueryGroup(e.groupKey);return!1},e.prototype.applyOptions=function(e,r){return void 0===r&&(r="update"),"set"===r?(this.currentQuery.count=e.count,this.currentQuery.start=e.start,this.currentQuery.sort=e.sort,this.currentQuery.projection=e.projection):(void 0!==(null==e?void 0:e.sort)&&(this.currentQuery.sort=e.sort),void 0!==(null==e?void 0:e.count)&&(this.currentQuery.count=e.count),void 0!==(null==e?void 0:e.start)&&(this.currentQuery.start=null==e?void 0:e.start),void 0!==(null==e?void 0:e.projection)&&(this.currentQuery.projection=null==e?void 0:e.projection)),this.getQuery()},e.prototype.applyQuery=function(e,r,t){var n,o,i=this;if(t||(t=this.currentQuery),Array.isArray(e))try{for(var a=fn(e),u=a.next();!u.done;u=a.next()){var c=u.value;this.applyQuery(c,r,t)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}else if(this.isRootQueryGroup(e))e.groupType&&(t.groupType=e.groupType),"set"===(null==r?void 0:r.mode)?t.queries=e.queries:t.queries=yn(yn([],sn(t.queries),!1),sn(e.queries),!1),this.applyOptions(e,"set");else if(this.isQuery(e)){var l=t.queries.findIndex((function(r){return i.isQueryGroup(r)&&r.groupKey===e.attribute}));if(l>-1){var f=t.queries[l];"set"===(null==r?void 0:r.mode)?f.queries=[e]:f.queries.push(e)}else t.queries.push({groupKey:e.attribute,groupType:"or",queries:[e]})}else this.isQueryGroup(e)&&(l=t.queries.findIndex((function(r){return i.isQueryGroup(r)&&r.groupKey===e.groupKey})),l>-1?(f=t.queries[l],e.groupType&&(f.groupType=e.groupType),"set"===(null==r?void 0:r.mode)?t.queries[l]=e:f.queries=yn(yn([],sn(f.queries),!1),sn(e.queries),!1)):t.queries.push({groupKey:e.groupKey,groupType:e.groupType||"or",queries:e.queries}));return t},e.prototype.removeAllQueries=function(){return this.currentQuery.queries=[],this.getQuery()},e.prototype.removeQuery=function(e,r){var t,n,o=this;if(r||(r=this.currentQuery),this.isQuery(e)){if((a=r.queries.findIndex((function(r){return o.isQueryGroup(r)&&r.groupKey===e.attribute})))>-1){var i=r.queries[a];(l=ln(i.queries,e))>-1&&i.queries.splice(l,1),0===i.queries.length&&r.queries.splice(a,1)}}else if(this.isQueryGroup(e)){var a;if((a=r.queries.findIndex((function(r){return o.isQueryGroup(r)&&r.groupKey===e.groupKey})))>-1)if(e.queries){i=r.queries[a];try{for(var u=fn(e.queries),c=u.next();!c.done;c=u.next()){var l,f=c.value;(l=ln(i.queries,f))>-1&&i.queries.splice(l,1)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}0===i.queries.length&&r.queries.splice(a,1)}else r.queries.splice(a,1)}return r},e}(),vn=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},dn=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},hn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},gn=new pn;function bn(e,r,t,n,o,i,a){var u,c,l,f,s,y,p=[],v=gn.removeQuery({groupKey:o},Qr(n)),d=a.queryData(e,v,!1,i),h=r?dn([],vn(null==r?void 0:r.keys()),!1):[],g=new Set(h),b=i.get(o);if(!t.excludeUnresolved)try{for(var m=hn(b.keys()),w=m.next();!w.done;w=m.next()){var x=w.value;g.add(x)}}catch(e){u={error:e}}finally{try{w&&!w.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}t.excludeUndefineds?g.delete(void 0):g.add(void 0);try{for(var j=hn(g.values()),_=j.next();!_.done;_=j.next()){var A=_.value,O=new Map,q=b.get(A)||[];try{for(var S=(s=void 0,hn(q)),K=S.next();!K.done;K=S.next()){x=K.value;var Q=d.get(x);if(Q&&(O.set(x,Q),!(null==t?void 0:t.calculateFacets)))break}}catch(e){s={error:e}}finally{try{K&&!K.done&&(y=S.return)&&y.call(S)}finally{if(s)throw s.error}}var k={key:String(A),value:A,selected:mn(o,A,n),enabled:O.size>0,size:O.size,entry:r.get(A),resultKeys:Array.from(O.keys())};if(!(null==t?void 0:t.excludeZeros)||0!==k.size){if((null==t?void 0:t.count)&&p.length===(null==t?void 0:t.count))return p;p.push(k)}}}catch(e){l={error:e}}finally{try{_&&!_.done&&(f=j.return)&&f.call(j)}finally{if(l)throw l.error}}return p}var mn=function(e,r,t){var n=t.queries.findIndex((function(r){return gn.isQueryGroup(r)&&r.groupKey===e}));return n>-1&&!!t.queries[n].queries.find((function(t){var n;if(gn.isQuery(t)){var o=(null===(n=t.value)||void 0===n?void 0:n.key)||t.value;return t.attribute===e&&o===r}return!1}))},wn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},xn=function(){function e(){this.indexMap=new Map,this.dataMap=new Map}return e.prototype.reset=function(e){e?(this.indexMap.delete(e),this.dataMap.delete(e)):(this.indexMap.clear(),this.dataMap.clear())},e.prototype.fillDataMap=function(e,r){var t,n,o,i,a,u=this.dataMap.get(e);u||(u=new Map,this.dataMap.set(e,u));try{for(var c=wn(r),l=c.next();!l.done;l=c.next()){var f=l.value,s=void 0;if("object"==typeof f&&f&&f.key)s=f.key;else{if(Array.isArray(f)){try{for(var y=(o=void 0,wn(f)),p=y.next();!p.done;p=y.next()){var v=p.value;this.fillDataMap(e,[v])}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}return}s=f}var d=u.get(s);d||(d={key:s},null===(a=this.dataMap.get(e))||void 0===a||a.set(s,d))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}},e.prototype.fillInverseIndex=function(e,r,t){var n,o,i,a;if(e&&r&&t&&Array.isArray(t)){var u=this.indexMap.get(e)||new Map;try{for(var c=wn(t),l=c.next();!l.done;l=c.next()){var f=l.value,s=void 0;if("object"==typeof f&&f&&f.key)s=f.key;else{if(Array.isArray(f)){try{for(var y=(i=void 0,wn(f)),p=y.next();!p.done;p=y.next()){var v=p.value;this.fillInverseIndex(e,r,[v])}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}return}s=f}var d=u.get(s)||[];d.push(r),u.set(s,d)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.indexMap.set(e,u)}},e.prototype.getIndex=function(e,r){var t=this.getIndexName(e,r);return this.indexMap.get(t)},e.prototype.getData=function(e,r){var t=this.getIndexName(e,r);return this.dataMap.get(t)},e.prototype.getOrCreateIndex=function(e,r,t){var n,o,i=this.getIndexName(e,t),a=this.getIndex(i);if(!a){this.reset(i),this.indexMap.set(i,new Map);try{for(var u=wn(r.values()),c=u.next();!c.done;c=u.next()){var l=c.value,f=l[e];this.fillInverseIndex(i,l.key,[f]),this.fillDataMap(i,[f])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}a=this.getIndex(i)||new Map}return a},e.prototype.getIndexName=function(e,r){return r?e+"_"+t(r):e},e}(),jn=function(){return jn=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},jn.apply(this,arguments)},_n=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},An=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},On="__";function qn(e,r,t,n,o){var i,a,u,c,l,f,s,y,p;void 0===t&&(t={key:"root"}),void 0===n&&(n="root"),void 0===o&&(o=new xn);try{for(var v=_n(r.columns),d=v.next();!d.done;d=v.next()){var h=d.value;h.attribute&&o.getOrCreateIndex(h.attribute,e)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}try{for(var g=_n(r.rows),b=g.next();!b.done;b=g.next()){var m=b.value;m.attribute&&o.getOrCreateIndex(m.attribute,e)}}catch(e){u={error:e}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}try{for(var w=_n(r.values),x=w.next();!x.done;x=w.next())(O=x.value).attribute&&o.getOrCreateIndex(O.attribute,e)}catch(e){l={error:e}}finally{try{x&&!x.done&&(f=w.return)&&f.call(w)}finally{if(l)throw l.error}}if(r.rows&&r.rows.length>0){t.rows=t.rows||[];var j=function(e,r,t,n,o){var i,a,u,c,l,f,s,y;void 0===o&&(o="");var p={key:r.attribute},v=n.getIndex(r.attribute);if(!v)return p;try{for(var d=_n(v.entries()),h=d.next();!h.done;h=d.next()){var g=An(h.value,2),b=g[0],m=g[1],w={key:b},x=new Map;try{for(var j=(u=void 0,_n(m)),_=j.next();!_.done;_=j.next()){var A=_.value;e.has(A)&&x.set(A,e.get(A))}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=j.return)&&c.call(j)}finally{if(u)throw u.error}}if(x.size){try{for(var O=(l=void 0,_n(t.values)),q=O.next();!q.done;q=O.next()){var S=q.value;if(w.values=w.values||[],"root"!==o||!1!==(null==r?void 0:r.calculateTotals)){var K=et(S,x,n.getIndex(S.attribute),S.attribute);w.values.push(K)}}}catch(e){l={error:e}}finally{try{q&&!q.done&&(f=O.return)&&f.call(O)}finally{if(l)throw l.error}}if(p.rows=p.rows||[],p.rows.push(w),t.rows.length>1)qn(x,jn(jn({},t),{rows:t.rows.slice(1)}),w,o+On+r.attribute+On+b);else if(t.columns)try{for(var Q=(s=void 0,_n(t.columns)),k=Q.next();!k.done;k=Q.next()){var T=k.value;w.columns=w.columns||[];var E=Sn(x,T,t,n,o+On+r.attribute+On+b);w.columns.push(E)}}catch(e){s={error:e}}finally{try{k&&!k.done&&(y=Q.return)&&y.call(Q)}finally{if(s)throw s.error}}}}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}return p}(e,r.rows[0],r,o,n);t.rows.push(j)}if(r.columns&&r.columns.length>0&&(t.columns=t.columns||[],j=Sn(e,r.columns[0],r,o,n),t.columns.push(j)),"root"===t.key)try{for(var _=_n(r.values),A=_.next();!A.done;A=_.next()){var O=A.value;if(t.values=t.values||[],"root"!==n||!1!==(null===(p=r.options)||void 0===p?void 0:p.calculateTotals)){var q=et(O,e,o.getIndex(O.attribute),O.attribute);t.values.push(q)}}}catch(e){s={error:e}}finally{try{A&&!A.done&&(y=_.return)&&y.call(_)}finally{if(s)throw s.error}}return t}function Sn(e,r,t,n,o){var i,a,u,c,l,f;void 0===o&&(o="");var s={key:r.attribute},y=n.getIndex(r.attribute);if(!y)return s;try{for(var p=_n(y.entries()),v=p.next();!v.done;v=p.next()){var d=An(v.value,2),h=d[0],g=d[1],b={key:h},m=new Map;try{for(var w=(u=void 0,_n(g)),x=w.next();!x.done;x=w.next()){var j=x.value;e.has(j)&&m.set(j,e.get(j))}}catch(e){u={error:e}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}if(m.size){try{for(var _=(l=void 0,_n(t.values)),A=_.next();!A.done;A=_.next()){var O=A.value;if(b.values=b.values||[],"root"!==o||!1!==(null==r?void 0:r.calculateTotals)){var q=et(O,m,n.getIndex(O.attribute),O.attribute);b.values.push(q)}}}catch(e){l={error:e}}finally{try{A&&!A.done&&(f=_.return)&&f.call(_)}finally{if(l)throw l.error}}s.columns=s.columns||[],s.columns.push(b),t.columns.length>1&&qn(m,jn(jn({},t),{columns:t.columns.slice(1)}),b,o+On+r.attribute+On+h)}}}catch(e){i={error:e}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return s}var Kn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Qn=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},kn=function(e,r){var t,n,o,i,a=[];try{for(var u=Kn(e),c=u.next();!c.done;c=u.next()){var l=c.value,f=function(e,r){var t=a.find((function(r){return r.key===e})),n=Mn(r);if(t)t.type!==n&&(t.type="any");else{var o={key:e,type:n};a.push(o)}};try{for(var s=(o=void 0,Kn(Object.entries(l))),y=s.next();!y.done;y=s.next()){var p=Qn(y.value,2);f(p[0],p[1])}}catch(e){o={error:e}}finally{try{y&&!y.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}if(!r)break}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return a},Tn=function(e){return Number(e)===e&&e%1==0},En=function(e){return Number(e)===e&&e%1!=0},Mn=function(e){switch(typeof e){case"string":return"string";case"number":return Tn(e)?"int":En(e)?"float":"any";case"boolean":return"boolean";case"object":return function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)?"date":"json";default:return"any"}},Cn=function(e,r){var t,n=zr(e.text||""),o=(null==r?void 0:r.attributeKey)||e.filterKey,i=(null==r?void 0:r.comparisonType)||"containsIgnoreCase";return"containsIgnoreCase"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:"/".concat(n,"/"),operator:"find",options:{transform:["lowercase"]}}]}:"containsIgnoreCaseAndWhitespace"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:"/".concat(n,"/"),operator:"find",options:{transform:["removeWhitespace","lowercase"]}}]}:"contains"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:"/".concat(n,"/"),operator:"find"}]}:"equal"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:e.text,operator:"eq"}]}:"equalIgnoreCase"===i&&(t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:e.text,operator:"eq",options:{transform:["lowercase"]}}]}),t},In=function(e,r){var t=(null==r?void 0:r.attributeKey)||e.filterKey;return{groupKey:e.filterKey,queries:[{queryKey:e.value,attribute:t,value:e.value,operator:"eq"}]}},Fn=function(e,r){var t=(null==r?void 0:r.attributeKey)||e.filterKey,n={groupKey:e.filterKey,queries:[]};return void 0!==e.eq&&(n.groupType="or",Array.isArray(e.eq)?e.eq.forEach((function(e){n.queries.push({attribute:t,value:e,operator:"eq"})})):n.queries.push({attribute:t,value:e.eq,operator:"eq"})),void 0!==e.ne&&(n.groupType="and",Array.isArray(e.ne)?e.ne.forEach((function(e){n.queries.push({attribute:t,value:e,operator:"eq",options:{invert:!0}})})):n.queries.push({attribute:t,value:e.ne,operator:"eq",options:{invert:!0}})),void 0!==e.gt&&(n.groupType="and",n.queries.push({attribute:t,value:e.gt,operator:"gt"})),void 0!==e.lt&&(n.groupType="and",n.queries.push({attribute:t,value:e.lt,operator:"lt"})),void 0!==e.gte&&(n.groupType="and",n.queries.push({attribute:t,value:e.gte,operator:"gte"})),void 0!==e.lte&&(n.groupType="and",n.queries.push({attribute:t,value:e.lte,operator:"lte"})),n},Dn=function(e,r){var t=(null==r?void 0:r.attributeKey)||e.filterKey,n={groupKey:e.filterKey,queries:[]};return e.itemKeys.forEach((function(e){n.queries.push({queryKey:e,attribute:t,value:{key:e},operator:"eq"})})),n},zn=function(e){return"string"==typeof e.modelKey&&!!Array.isArray(e.queries)};const Nn=function(e,r){return xt(e,r)},Pn=Wt("length");var Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Bn="\\ud800-\\udfff",Gn="["+Bn+"]",Un="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$n="\\ud83c[\\udffb-\\udfff]",Vn="[^"+Bn+"]",Ln="(?:\\ud83c[\\udde6-\\uddff]){2}",Wn="[\\ud800-\\udbff][\\udc00-\\udfff]",Hn="(?:"+Un+"|"+$n+")?",Zn="[\\ufe0e\\ufe0f]?",Jn=Zn+Hn+"(?:\\u200d(?:"+[Vn,Ln,Wn].join("|")+")"+Zn+Hn+")*",Xn="(?:"+[Vn+Un+"?",Un,Ln,Wn,Gn].join("|")+")",Yn=RegExp($n+"(?="+$n+")|"+Xn+Jn,"g");const eo=function(e){return function(e){return Rn.test(e)}(e)?function(e){for(var r=Yn.lastIndex=0;Yn.test(e);)++r;return r}(e):Pn(e)},ro=function(e){if(null==e)return 0;if(ke(e))return"string"==typeof(r=e)||!ae(r)&&ee(r)&&"[object String]"==j(r)?eo(e):e.length;var r,t=fr(e);return"[object Map]"==t||"[object Set]"==t?e.size:Qe(e).length},to=function(e){return e!=e},no=function(e,r){return!(null==e||!e.length)&&function(e,r,t){return r==r?function(e,r,t){for(var n=t-1,o=e.length;++n<o;)if(e[n]===r)return n;return-1}(e,r,t):it(e,to,t)}(e,r,0)>-1},oo=function(e,r,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(r,e[n]))return!0;return!1};var io=d?d.isConcatSpreadable:void 0;const ao=function(e){return ae(e)||ie(e)||!!(io&&e&&e[io])},uo=function e(r,t,n,o,i){var a=-1,u=r.length;for(n||(n=ao),i||(i=[]);++a<u;){var c=r[a];t>0&&n(c)?t>1?e(c,t-1,n,o,i):Ge(i,c):o||(i[i.length]=c)}return i};var co=Math.max;const lo=H?function(e,r){return H(e,"toString",{configurable:!0,enumerable:!1,value:(t=r,function(){return t}),writable:!0});var t}:Lt;var fo=Date.now;const so=(yo=lo,po=0,vo=0,function(){var e=fo(),r=16-(e-vo);if(vo=e,r>0){if(++po>=800)return arguments[0]}else po=0;return yo.apply(void 0,arguments)});var yo,po,vo;const ho=function(e){return ee(e)&&ke(e)},go=function(e){return so(function(e,r,t){return r=co(void 0===r?e.length-1:r,0),function(){for(var n=arguments,o=-1,i=co(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(var u=Array(r+1);++o<r;)u[o]=n[o];return u[r]=t(a),function(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}(e,this,u)}}(e,void 0,Lt),e+"")}((function(e,r){var t=function(e){var r=null==e?0:e.length;return r?e[r-1]:void 0}(r);return ho(t)&&(t=void 0),ho(e)?function(e,r,t,n){var o=-1,i=no,a=!0,u=e.length,c=[],l=r.length;if(!u)return c;t&&(r=Ft(r,de(t))),n?(i=oo,a=!1):r.length>=200&&(i=lt,a=!1,r=new ut(r));e:for(;++o<u;){var f=e[o],s=null==t?f:t(f);if(f=n||0!==f?f:0,a&&s==s){for(var y=l;y--;)if(r[y]===s)continue e;c.push(f)}else i(r,s,n)||c.push(f)}return c}(e,uo(r,1,ho,!0),Zt(t)):[]})),bo=function(e,r,t){return e==e&&(void 0!==t&&(e=e<=t?e:t),void 0!==r&&(e=e>=r?e:r)),e},mo=function(e,r,t){var n=(t="function"==typeof t?t:void 0)?t(e,r):void 0;return void 0===n?xt(e,r,void 0,t):!!n},wo=(xo=ln,function(e,r,t){var n=Object(e);if(!ke(e)){var o=Zt(r);e=Te(e),r=function(e){return o(n[e],e,n)}}var i=xo(e,r,t);return i>-1?n[o?e[i]:i]:void 0});var xo;const jo=function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n;)if(!r(e[t],t,e))return!1;return!0},_o=function(e,r,t){for(var n=-1,o=Object(e),i=t(e),a=i.length;a--;){var u=i[++n];if(!1===r(o[u],u,o))break}return e},Ao=function(e,r){if(null==e)return e;if(!ke(e))return function(e,r){return e&&_o(e,r,Te)}(e,r);for(var t=e.length,n=-1,o=Object(e);++n<t&&!1!==r(o[n],n,o););return e},Oo=function(e,r){var t=!0;return Ao(e,(function(e,n,o){return t=!!r(e,n,o)})),t},qo=function(e,r,t){if(!_(t))return!1;var n=typeof r;return!!("number"==n?ke(t)&&ye(r,t.length):"string"==n&&r in t)&&u(t[r],e)},So=function(e,r){var t;return Ao(e,(function(e,n,o){return!(t=r(e,n,o))})),!!t};var Ko=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Qo=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},ko=function(){function e(e){this.scriptController=e,this.registeredCustomOperator=new Map,this.queryBuilder=new pn}return e.prototype.registerCustomOperator=function(e,r){this.registeredCustomOperator.set(e,r)},e.prototype.transformValue=function(e,r){var t,n,o=this;if(Array.isArray(e))return e.map((function(e){return o.transformValue(e,r)}));if("string"!=typeof e)return e;try{for(var i=Ko(r),a=i.next();!a.done;a=i.next()){var u=a.value;"lowercase"===u?e=e.toLowerCase():"trim"===u?e=e.trim():"removeWhitespace"===u&&(e=e.replace(/\s/g,""))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return e},e.prototype.evaluateQuery=function(e,r){var t,n,o,i,a,u,c,l=e.value,f=(null===(t=e.options)||void 0===t?void 0:t.arrayValueHandling)||"some";if(Array.isArray(null===(n=e.options)||void 0===n?void 0:n.transform)&&e.options.transform.length>0&&(l=this.transformValue(l,e.options.transform)),c=e.attribute.includes(".")||e.attribute.includes("[")?Ut(r,e.attribute):r[e.attribute],Array.isArray(null===(o=e.options)||void 0===o?void 0:o.transform)&&e.options.transform.length>0&&(c=this.transformValue(c,e.options.transform)),null==c&&!["typeof","isTruthy","eq"].includes(e.operator))return!1;switch(e.operator){case"eq":return(null===(i=e.options)||void 0===i?void 0:i.invert)?!Nn(c,l):Nn(c,l);case"find":return(null===(a=e.options)||void 0===a?void 0:a.invert)?!this.queryFind(c,l,f):this.queryFind(c,l,f);case"lt":return Array.isArray(c)?"some"===f?c.some((function(e){return e<l})):c.every((function(e){return e<l})):c<l;case"gt":return Array.isArray(c)?"some"===f?c.some((function(e){return e>l})):c.every((function(e){return e>l})):c>l;case"lte":return Array.isArray(c)?"some"===f?c.some((function(e){return e<=l})):c.every((function(e){return e<=l})):c<=l;case"gte":return Array.isArray(c)?"some"===f?c.some((function(e){return e>=l})):c.every((function(e){return e>=l})):c>=l;case"typeof":return(null===(u=e.options)||void 0===u?void 0:u.invert)?typeof c!==l:Array.isArray(c)?"some"===f?c.some((function(e){return typeof e===l})):c.every((function(e){return typeof e===l})):typeof c===l;case"isTruthy":return!0===l?Array.isArray(c)?"some"===f?c.some((function(e){return typeof!!e})):c.every((function(e){return typeof!!e})):!!c:!c;case"size":return"string"==typeof c?c.length===l:ro(c)===l;default:if(this.scriptController.hasScript(e.operator))return this.scriptController.executeScript(e.operator,"operator",{query:e,item:r});if(this.registeredCustomOperator.has(e.operator)){var s=this.registeredCustomOperator.get(e.operator);if("function"==typeof s)return s(e,r)}}return!1},e.prototype.evaluateEqOperator=function(e,r,t){var n,o,i,a,u=new Map,c=t.get(e.attribute);if(c){var l=void 0;if("string"==typeof e.value?l=e.value:(null===(i=e.value)||void 0===i?void 0:i.key)&&1===Object.keys(e.value).length&&(l=e.value.key),void 0!==l){var f=c.get(l);if(f){if(f.forEach((function(e){r.has(e)&&u.set(e,r.get(e))})),null===(a=e.options)||void 0===a?void 0:a.invert){var s=go(Array.from(r.values()),Array.from(u.values()),"key"),y=new Map;return s.forEach((function(e){y.set(e.key,e)})),y}return u}}}try{for(var p=Ko(r),v=p.next();!v.done;v=p.next()){var d=Qo(v.value,2),h=d[0];l=d[1],this.evaluateQuery(e,l)&&u.set(h,l)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}return u},e.prototype.equalRegexFn=function(e,r){var t,n,o,i,a,u=this;if("string"!=typeof r||(i="/",o=Pt(o=r),a=null==a?0:bo(un(a),0,o.length),i=Nt(i),o.slice(a,a+i.length)!=i)||!function(e,r,t){e=Pt(e),r=Nt(r);var n=e.length,o=t=void 0===t?n:bo(un(t),0,n);return(t-=r.length)>=0&&e.slice(t,o)==r}(r,"/"))return Array.isArray(e)?!!e.find((function(e){return mo(e,r,u.equalRegexFn)})):"object"==typeof r?(t=e)===(n=r)||jt(t,n,At(n)):e===r;try{return new RegExp(r.slice(1,-1)).test(e)}catch(e){return!1}},e.prototype.queryFind=function(e,r,t){var n=this;return Array.isArray(e)?"string"==typeof r||"number"==typeof r||"boolean"==typeof r?"some"===t?e.some((function(e){return mo(e,r,n.equalRegexFn)})):e.every((function(e){return mo(e,r,n.equalRegexFn)})):!!wo(e,r):mo(e,r,this.equalRegexFn)},e.prototype.validateQuery=function(e){var r=this;if(this.queryBuilder.isQuery(e)){if(!e.attribute||!e.operator)throw new Error("invalid query - missing attribute or operator");if("find"===e.operator&&Array.isArray(e.value))throw new Error("invalid query - find operator cannot have array value");return!0}if(this.queryBuilder.isQueryGroup(e))return function(e,r,t){var n=ae(e)?jo:Oo;return t&&qo(e,r,t)&&(r=void 0),n(e,Zt(r))}(e.queries,(function(e){return r.validateQuery(e)}));throw new Error("invalid query - missing query or attribute")},e.prototype.getEvaluatedQueryDataset=function(e,r,t){var n,o,i,a,u=this,c=new Map;if(e.attribute.includes("[*]")){var l=e.attribute.replace("[*]",""),f=function(r,t){var n=t[l];Array.isArray(n)&&(function(e,r,t){var n=ae(e)?ct:So;return t&&qo(e,r,t)&&(r=void 0),n(e,Zt(r))}(n.map((function(r,n){var o=Qr(e);return o.attribute=o.attribute.replace("[*]","[".concat(n,"]")),u.evaluateQuery(o,t)})))&&c.set(r,t))};try{for(var s=Ko(r),y=s.next();!y.done;y=s.next()){var p=Qo(y.value,2);f(g=p[0],b=p[1])}}catch(e){n={error:e}}finally{try{y&&!y.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}else{if("eq"===e.operator)return this.evaluateEqOperator(e,r,t);try{for(var v=Ko(r),d=v.next();!d.done;d=v.next()){var h=Qo(d.value,2),g=h[0],b=h[1];this.evaluateQuery(e,b)&&c.set(g,b)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}return c},e.prototype.evaluateQueryGroup=function(e,r,t,n){var o,i,a,u,c,l=new Map,f=r;if(!e.queries||0===(null===(c=e.queries)||void 0===c?void 0:c.length))return f;try{for(var s=Ko(e.queries),y=s.next();!y.done;y=s.next()){var p=y.value,v=new Map;if(v=this.queryBuilder.isQuery(p)?this.getEvaluatedQueryDataset(p,f,n):this.evaluateQueryGroup(p,f,t,n),0===l.size&&(l=v),"or"===e.groupType)v.forEach((function(e){l.set(e.key,e)}));else{var d=go(Array.from(l.values()),Array.from(v.values()),"key");try{for(var h=(a=void 0,Ko(d)),g=h.next();!g.done;g=h.next()){var b=g.value;l.delete(b.key)}}catch(e){a={error:e}}finally{try{g&&!g.done&&(u=h.return)&&u.call(h)}finally{if(a)throw a.error}}}f="and"===e.groupType?l:r}}catch(e){o={error:e}}finally{try{y&&!y.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return l},e.prototype.queryData=function(e,r,t,n){var o=e;return 0===r.queries.length?e:(r.groupKey||(r.groupKey="root"),r.groupType||(r.groupType="and"),r.queries||(r.queries=[]),this.validateQuery(r),this.evaluateQueryGroup(r,o,t,n))},e}(),To=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},Eo=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},Mo=function(){function e(){this.scripts=new Map,this.scriptFunctions=new Map}return e.prototype.keys=function(){return Array.from(this.scripts.keys())},e.prototype.setScript=function(e,r){this.scripts.set(e,r)},e.prototype.removeScript=function(e){this.scripts.delete(e)},e.prototype.getScript=function(e){return this.scripts.get(e)},e.prototype.hasScript=function(e){return this.scripts.has(e)},e.prototype.getScriptAsFn=function(e,r){if(this.scriptFunctions.has(e))return this.scriptFunctions.get(e);var t=this.getScript(e);if(!t)throw new Error("Script ".concat(e," not found"));var n=this.getWrapperScript(t),o=new(Function.bind.apply(Function,Eo(Eo([void 0,"script_type"],To(r),!1),[n],!1)));return this.scriptFunctions.set(e,o),o},e.prototype.getWrapperScript=function(e){return'\n "use strict";\n '.concat(e,"\n ")},e.prototype.executeScript=function(e,r,t){if(!this.getScript(e))throw new Error("Script ".concat(e," not found"));t.context||(t.context=t.options||{});var n=Object.keys(t),o=Object.values(t);return this.getScriptAsFn(e,n).apply(void 0,Eo([r],To(o),!1))},e}(),Co=function(e,r){return e?(r||(r={}),e.replace(/\$\{(.*?)\}/g,(function(e,t){return void 0!==r[t.trim()]?r[t.trim()]:""}))):""},Io=function(e){var r=new Set;return e.replace(/\$\{(.*?)\}/g,(function(e,t){return r.add(t.trim()),""})),{variables:Array.from(r).map((function(e){return{name:e}}))}},Fo=["any","Array<date>","Array<float>","Array<int>","Array<string>","boolean","date","float","int","json","string"],Do=["int","float","Array<int>","Array<float>"],zo=["date","Array<date>"],No=["eq","find","gt","gte","lt","lte","typeof","isTruthy","size"];return r})()));
|
|
1
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t=r();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(this,(()=>(()=>{"use strict";var e={d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};function t(e){return function(e){for(var r=0,t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r.toString(16)}(n(e))}function n(e){if("object"!=typeof e||null===e)return String(e);if(Array.isArray(e))return"["+e.map(n).join(",")+"]";for(var r=Object.keys(e).sort(),t="{",o=0;o<r.length;o++){var i=r[o];t+=i+":"+n(e[i]),o<r.length-1&&(t+=",")}return t+"}"}e.r(r),e.d(r,{AnalyticsController:()=>a,CacheController:()=>kr,ChangeDetector:()=>Pr,DatePropertyTypes:()=>zo,DcuplQueryBuilder:()=>pn,DcuplQueryOperatorsAsArray:()=>No,DependencyGraph:()=>Hr,IndicesController:()=>xn,NumberPropertyTypes:()=>Do,PropertyTypesAsArray:()=>Fo,QueryManager:()=>ko,ScriptController:()=>Mo,clone:()=>Rr,computeSuggestions:()=>Vr,escapeRegExp:()=>zr,evaluateTemplate:()=>Co,generateBooleanQuery:()=>In,generateKey:()=>Fr,generateNumberAndDateQuery:()=>Fn,generateReferenceQuery:()=>Dn,generateTextQuery:()=>Cn,getAggregation:()=>et,getDateConstraintUid:()=>Mr,getDcuplPropertyTypeForNativeType:()=>Mn,getDistinct:()=>ot,getFacets:()=>bn,getFilterEntryId:()=>Tr,getNumberConstraintUid:()=>Er,getPropertiesForData:()=>kn,groupBy:()=>Ir,isFloat:()=>En,isInt:()=>Tn,isValidQueryStatement:()=>zn,parseTemplate:()=>Io,perf:()=>o,pivot:()=>qn,removeTrailingSlash:()=>Dr,trigger:()=>Gr,unescapeRegExp:()=>Nr,uniqBy:()=>Cr});var o={now:function(){return"undefined"!=typeof performance?performance.now():(new Date).getTime()},mark:function(e){"undefined"!=typeof performance&&performance.mark(e)},measure:function(e,r,t){"undefined"!=typeof performance&&performance.measure(e,r,t)},getEntriesByName:function(e){if("undefined"!=typeof performance)return performance.getEntriesByName(e)},getEntriesByType:function(e){if("undefined"!=typeof performance)return performance.getEntriesByType(e)}},i=function(){return i=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},i.apply(this,arguments)},a=function(){function e(){this.enabled=!1}return e.prototype.init=function(e){this.data=new Map,this.enabled=e},e.prototype.set=function(e){if(!this.enabled)return e.value;var r=this.getKey(e.value.name,e.context);return this.data.set(r,e.value),this.data.get(r)},e.prototype.mark=function(e){if(this.enabled){var r=this.getKey(e.name,e.context),t={name:e.name,type:"mark",value:o.now(),createdAt:Date.now()};return this.data.set(r,t),t}},e.prototype.measure=function(e){if(this.enabled){var r=this.getKey(e.name,e.context),t=this.data.get(this.getKey(e.start,e.context)),n=this.data.get(this.getKey(e.end,e.context));if(t&&n){var o=n.value-t.value,a=Math.round(100*o)/100,u=this.data.get(r);if(u&&e.sum){var c=u.value+a,l=i(i({},u),{value:c});return this.data.set(r,l),l}var f={name:e.name,type:"measure",value:a,createdAt:Date.now()};return e.detail&&(f.detail=e.detail),this.data.set(r,f),f}}},e.prototype.update=function(e){if(!this.enabled)return e.value;var r=this.getKey(e.value.name,e.context),t=this.data.get(r);if(t){var n=i(i({},t),e.value);this.data.set(r,n)}else this.data.set(r,e.value);return this.data.get(r)},e.prototype.getResourceInfosFromPerformanceAPI=function(){return"undefined"==typeof performance?[]:o.getEntriesByType("resource")},e.prototype.get=function(e){var r=this.getKey(e.name,e.context);return this.data.get(r)},e.prototype.getByType=function(e){return Array.from(this.data.values()).filter((function(r){return r.type===e}))},e.prototype.getByName=function(e){return Array.from(this.data.values()).filter((function(r){return r.name===e}))},e.prototype.clear=function(){this.data.clear()},e.prototype.getKey=function(e,r){return r?e+"_"+t(r):e},e}();const u=function(e,r){return e===r||e!=e&&r!=r},c=function(e,r){for(var t=e.length;t--;)if(u(e[t][0],r))return t;return-1};var l=Array.prototype.splice;function f(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}f.prototype.clear=function(){this.__data__=[],this.size=0},f.prototype.delete=function(e){var r=this.__data__,t=c(r,e);return!(t<0||(t==r.length-1?r.pop():l.call(r,t,1),--this.size,0))},f.prototype.get=function(e){var r=this.__data__,t=c(r,e);return t<0?void 0:r[t][1]},f.prototype.has=function(e){return c(this.__data__,e)>-1},f.prototype.set=function(e,r){var t=this.__data__,n=c(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};const s=f,y="object"==typeof global&&global&&global.Object===Object&&global;var p="object"==typeof self&&self&&self.Object===Object&&self;const v=y||p||Function("return this")(),d=v.Symbol;var h=Object.prototype,g=h.hasOwnProperty,b=h.toString,m=d?d.toStringTag:void 0;var w=Object.prototype.toString;var x=d?d.toStringTag:void 0;const j=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?function(e){var r=g.call(e,m),t=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=b.call(e);return n&&(r?e[m]=t:delete e[m]),o}(e):function(e){return w.call(e)}(e)},_=function(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)},A=function(e){if(!_(e))return!1;var r=j(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},O=v["__core-js_shared__"];var q,S=(q=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"";var K=Function.prototype.toString;const Q=function(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var k=/^\[object .+?Constructor\]$/,T=Function.prototype,E=Object.prototype,M=T.toString,C=E.hasOwnProperty,I=RegExp("^"+M.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const F=function(e){return!(!_(e)||(r=e,S&&S in r))&&(A(e)?I:k).test(Q(e));var r},D=function(e,r){var t=function(e,r){return null==e?void 0:e[r]}(e,r);return F(t)?t:void 0},z=D(v,"Map"),N=D(Object,"create");var P=Object.prototype.hasOwnProperty;var R=Object.prototype.hasOwnProperty;function B(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}B.prototype.clear=function(){this.__data__=N?N(null):{},this.size=0},B.prototype.delete=function(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r},B.prototype.get=function(e){var r=this.__data__;if(N){var t=r[e];return"__lodash_hash_undefined__"===t?void 0:t}return P.call(r,e)?r[e]:void 0},B.prototype.has=function(e){var r=this.__data__;return N?void 0!==r[e]:R.call(r,e)},B.prototype.set=function(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=N&&void 0===r?"__lodash_hash_undefined__":r,this};const G=B,U=function(e,r){var t,n,o=e.__data__;return("string"==(n=typeof(t=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?o["string"==typeof r?"string":"hash"]:o.map};function $(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}$.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(z||s),string:new G}},$.prototype.delete=function(e){var r=U(this,e).delete(e);return this.size-=r?1:0,r},$.prototype.get=function(e){return U(this,e).get(e)},$.prototype.has=function(e){return U(this,e).has(e)},$.prototype.set=function(e,r){var t=U(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this};const V=$;function L(e){var r=this.__data__=new s(e);this.size=r.size}L.prototype.clear=function(){this.__data__=new s,this.size=0},L.prototype.delete=function(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t},L.prototype.get=function(e){return this.__data__.get(e)},L.prototype.has=function(e){return this.__data__.has(e)},L.prototype.set=function(e,r){var t=this.__data__;if(t instanceof s){var n=t.__data__;if(!z||n.length<199)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new V(n)}return t.set(e,r),this.size=t.size,this};const W=L,H=function(){try{var e=D(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Z=function(e,r,t){"__proto__"==r&&H?H(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t};var J=Object.prototype.hasOwnProperty;const X=function(e,r,t){var n=e[r];J.call(e,r)&&u(n,t)&&(void 0!==t||r in e)||Z(e,r,t)},Y=function(e,r,t,n){var o=!t;t||(t={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(t[u],e[u],u,t,e):void 0;void 0===c&&(c=e[u]),o?Z(t,u,c):X(t,u,c)}return t},ee=function(e){return null!=e&&"object"==typeof e},re=function(e){return ee(e)&&"[object Arguments]"==j(e)};var te=Object.prototype,ne=te.hasOwnProperty,oe=te.propertyIsEnumerable;const ie=re(function(){return arguments}())?re:function(e){return ee(e)&&ne.call(e,"callee")&&!oe.call(e,"callee")},ae=Array.isArray;var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,ce=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=ce&&ce.exports===ue?v.Buffer:void 0;const fe=(le?le.isBuffer:void 0)||function(){return!1};var se=/^(?:0|[1-9]\d*)$/;const ye=function(e,r){var t=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==t||"symbol"!=t&&se.test(e))&&e>-1&&e%1==0&&e<r},pe=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ve={};ve["[object Float32Array]"]=ve["[object Float64Array]"]=ve["[object Int8Array]"]=ve["[object Int16Array]"]=ve["[object Int32Array]"]=ve["[object Uint8Array]"]=ve["[object Uint8ClampedArray]"]=ve["[object Uint16Array]"]=ve["[object Uint32Array]"]=!0,ve["[object Arguments]"]=ve["[object Array]"]=ve["[object ArrayBuffer]"]=ve["[object Boolean]"]=ve["[object DataView]"]=ve["[object Date]"]=ve["[object Error]"]=ve["[object Function]"]=ve["[object Map]"]=ve["[object Number]"]=ve["[object Object]"]=ve["[object RegExp]"]=ve["[object Set]"]=ve["[object String]"]=ve["[object WeakMap]"]=!1;const de=function(e){return function(r){return e(r)}};var he="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=he&&"object"==typeof module&&module&&!module.nodeType&&module,be=ge&&ge.exports===he&&y.process;const me=function(){try{return ge&&ge.require&&ge.require("util").types||be&&be.binding&&be.binding("util")}catch(e){}}();var we=me&&me.isTypedArray;const xe=we?de(we):function(e){return ee(e)&&pe(e.length)&&!!ve[j(e)]};var je=Object.prototype.hasOwnProperty;const _e=function(e,r){var t=ae(e),n=!t&&ie(e),o=!t&&!n&&fe(e),i=!t&&!n&&!o&&xe(e),a=t||n||o||i,u=a?function(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}(e.length,String):[],c=u.length;for(var l in e)!r&&!je.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ye(l,c))||u.push(l);return u};var Ae=Object.prototype;const Oe=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||Ae)},qe=function(e,r){return function(t){return e(r(t))}},Se=qe(Object.keys,Object);var Ke=Object.prototype.hasOwnProperty;const Qe=function(e){if(!Oe(e))return Se(e);var r=[];for(var t in Object(e))Ke.call(e,t)&&"constructor"!=t&&r.push(t);return r},ke=function(e){return null!=e&&pe(e.length)&&!A(e)},Te=function(e){return ke(e)?_e(e):Qe(e)};var Ee=Object.prototype.hasOwnProperty;const Me=function(e){if(!_(e))return function(e){var r=[];if(null!=e)for(var t in Object(e))r.push(t);return r}(e);var r=Oe(e),t=[];for(var n in e)("constructor"!=n||!r&&Ee.call(e,n))&&t.push(n);return t},Ce=function(e){return ke(e)?_e(e,!0):Me(e)};var Ie="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fe=Ie&&"object"==typeof module&&module&&!module.nodeType&&module,De=Fe&&Fe.exports===Ie?v.Buffer:void 0,ze=De?De.allocUnsafe:void 0;const Ne=function(){return[]};var Pe=Object.prototype.propertyIsEnumerable,Re=Object.getOwnPropertySymbols;const Be=Re?function(e){return null==e?[]:(e=Object(e),function(e,r){for(var t=-1,n=null==e?0:e.length,o=0,i=[];++t<n;){var a=e[t];r(a,t,e)&&(i[o++]=a)}return i}(Re(e),(function(r){return Pe.call(e,r)})))}:Ne,Ge=function(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e},Ue=qe(Object.getPrototypeOf,Object),$e=Object.getOwnPropertySymbols?function(e){for(var r=[];e;)Ge(r,Be(e)),e=Ue(e);return r}:Ne,Ve=function(e,r,t){var n=r(e);return ae(e)?n:Ge(n,t(e))},Le=function(e){return Ve(e,Te,Be)},We=function(e){return Ve(e,Ce,$e)},He=D(v,"DataView"),Ze=D(v,"Promise"),Je=D(v,"Set"),Xe=D(v,"WeakMap");var Ye="[object Map]",er="[object Promise]",rr="[object Set]",tr="[object WeakMap]",nr="[object DataView]",or=Q(He),ir=Q(z),ar=Q(Ze),ur=Q(Je),cr=Q(Xe),lr=j;(He&&lr(new He(new ArrayBuffer(1)))!=nr||z&&lr(new z)!=Ye||Ze&&lr(Ze.resolve())!=er||Je&&lr(new Je)!=rr||Xe&&lr(new Xe)!=tr)&&(lr=function(e){var r=j(e),t="[object Object]"==r?e.constructor:void 0,n=t?Q(t):"";if(n)switch(n){case or:return nr;case ir:return Ye;case ar:return er;case ur:return rr;case cr:return tr}return r});const fr=lr;var sr=Object.prototype.hasOwnProperty;const yr=v.Uint8Array,pr=function(e){var r=new e.constructor(e.byteLength);return new yr(r).set(new yr(e)),r};var vr=/\w*$/;var dr=d?d.prototype:void 0,hr=dr?dr.valueOf:void 0;const gr=function(e,r,t){var n,o,i,a=e.constructor;switch(r){case"[object ArrayBuffer]":return pr(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,r){var t=r?pr(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}(e,t);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,r){var t=r?pr(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}(e,t);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,vr.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=e,hr?Object(hr.call(n)):{}}};var br=Object.create;const mr=function(){function e(){}return function(r){if(!_(r))return{};if(br)return br(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();var wr=me&&me.isMap;const xr=wr?de(wr):function(e){return ee(e)&&"[object Map]"==fr(e)};var jr=me&&me.isSet;const _r=jr?de(jr):function(e){return ee(e)&&"[object Set]"==fr(e)};var Ar="[object Arguments]",Or="[object Function]",qr="[object Object]",Sr={};Sr[Ar]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object DataView]"]=Sr["[object Boolean]"]=Sr["[object Date]"]=Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr[qr]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object Symbol]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Error]"]=Sr[Or]=Sr["[object WeakMap]"]=!1;const Kr=function e(r,t,n,o,i,a){var u,c=1&t,l=2&t,f=4&t;if(n&&(u=i?n(r,o,i,a):n(r)),void 0!==u)return u;if(!_(r))return r;var s=ae(r);if(s){if(u=function(e){var r=e.length,t=new e.constructor(r);return r&&"string"==typeof e[0]&&sr.call(e,"index")&&(t.index=e.index,t.input=e.input),t}(r),!c)return function(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}(r,u)}else{var y=fr(r),p=y==Or||"[object GeneratorFunction]"==y;if(fe(r))return function(e,r){if(r)return e.slice();var t=e.length,n=ze?ze(t):new e.constructor(t);return e.copy(n),n}(r,c);if(y==qr||y==Ar||p&&!i){if(u=l||p?{}:function(e){return"function"!=typeof e.constructor||Oe(e)?{}:mr(Ue(e))}(r),!c)return l?function(e,r){return Y(e,$e(e),r)}(r,function(e,r){return e&&Y(r,Ce(r),e)}(u,r)):function(e,r){return Y(e,Be(e),r)}(r,function(e,r){return e&&Y(r,Te(r),e)}(u,r))}else{if(!Sr[y])return i?r:{};u=gr(r,y,c)}}a||(a=new W);var v=a.get(r);if(v)return v;a.set(r,u),_r(r)?r.forEach((function(o){u.add(e(o,t,n,o,r,a))})):xr(r)&&r.forEach((function(o,i){u.set(i,e(o,t,n,i,r,a))}));var d=s?void 0:(f?l?We:Le:l?Ce:Te)(r);return function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n&&!1!==r(e[t],t,e););}(d||r,(function(o,i){d&&(o=r[i=o]),X(u,i,e(o,t,n,i,r,a))})),u},Qr=function(e){return Kr(e,5)};var kr=function(){function e(e){this.enabled=e,this.cache=new Map}return e.prototype.get=function(e,r){if(this.enabled)return this.cache.get(this.getCacheName(e,r))},e.prototype.set=function(e,r,t){this.enabled&&this.cache.set(this.getCacheName(e,r),t)},e.prototype.has=function(e,r){return this.cache.has(this.getCacheName(e,r))},e.prototype.clear=function(){this.cache.clear()},e.prototype.generateContext=function(e){try{return Qr(e)}catch(r){return console.log("error in cache generateContext",r),e}},e.prototype.getCacheName=function(e,r){return e+"_"+t(r)},e}(),Tr=function(e,r){return void 0===r&&(r=""),"".concat(e,"#").concat(r)},Er=function(e){return"".concat(e.gt,"_").concat(e.gte,"_").concat(e.lt,"_").concat(e.lte,"_").concat(e.eq,"_").concat(e.ne)},Mr=function(e){return"".concat(e.gt,"_").concat(e.gte,"_").concat(e.lt,"_").concat(e.lte,"_").concat(e.eq,"_").concat(e.ne)},Cr=function(e,r){var t="function"==typeof r?r:function(e){return e[r]};return function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))}([],function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}(e.reduce((function(e,r){var n=null==r?r:t(r);return e.has(n)||e.set(n,r),e}),new Map).values()),!1)},Ir=function(e,r){return e.reduce((function(e,t){var n="function"==typeof r?r(t):t[r];return e.hasOwnProperty(n)||(e[n]=[]),e[n].push(t),e}),{})};function Fr(e){void 0===e&&(e=10);for(var r="",t=0;t<e;t++)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return r}var Dr=function(e){return e.replace(/\/+$/,"")},zr=function(e){return"string"!=typeof e?"":e.replace(/[[\]{}()*+?.,\\^$|#]/g,"\\$&")},Nr=function(e){return"string"!=typeof e?"":e.replace(/\\([[\]{}()*+?.,\\^$|#])/g,"$1")},Pr=function(){function e(){this.updateListener=new Set}return e.prototype._init=function(e){var r=this;this.key=e.cdRefKey,this.analyticsController=e.analyticsController,this.parentCd=e.parentCd,this.dcuplInitOptions=e.dcuplInitOptions,this.parentCd&&(this.off=this.parentCd.on((function(e){var t;"update"===e.action&&e.originCdRefKey===(null===(t=r.parentCd)||void 0===t?void 0:t.key)&&r.trigger(e)})))},e.prototype.destroy=function(){this.off&&this.off()},e.prototype.trigger=function(e){e.originCdRefKey||(e.originCdRefKey=this.key),this.updateListener.forEach((function(r){r(e)}))},e.prototype.on=function(e){var r=this;return this.updateListener.add(e),function(){r.updateListener.delete(e)}},e}(),Rr=function(e,r){return r?"undefined"!=typeof structuredClone?structuredClone(e):Qr(e):e},Br=function(e,r,t,n,i){var a,u;try{var c=!!(null===(u=null===(a=e.dcuplInitOptions.performance)||void 0===a?void 0:a.clone)||void 0===u?void 0:u.enabled)&&!!r.cloneResult,l=Rr(i,c),f=o.now();r.duration=f-t,null==e||e.trigger(r);var s={duration:r.duration};return r.modelKey&&(s.model=r.modelKey),r.args&&(s.args=r.args),e.analyticsController.mark({name:"".concat(r.name,":end"),context:n}),e.analyticsController.measure({name:"".concat(r.name),start:"".concat(r.name,":start"),end:"".concat(r.name,":end"),context:n,detail:s}),l}catch(e){return i}},Gr=function(e){return function(r,t,n){var i=n.value;return n.value=function(){for(var r,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var u=this.cdRef,c=o.now(),l="";e.mergeAnalytics||(l=Fr()),u.analyticsController.mark({name:"".concat(e.name,":start"),context:l});var f=null===(r=this.model)||void 0===r?void 0:r.key;!e.originCdRefKey&&u.key&&(e.originCdRefKey=u.key),f&&(e.modelKey=f);try{var s=i.apply(this,n);return e.method=t,e.args=n,s&&"then"in s?s.then((function(r){return Br(u,e,c,l,r)})):Br(u,e,c,l,s)}catch(e){throw e}},n}},Ur=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},$r=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Vr(e,r,t,n){var o,i;t.max||(t.max=20);var a=[],u=t.transform?n.transformValue(t.value,t.transform):t.value;try{for(var c=Ur(r.entries()),l=c.next();!l.done;l=c.next()){var f=$r(l.value,2),s=f[0],y=f[1],p=y.some((function(r){return e.has(r)})),v=t.transform?n.transformValue(s,t.transform):s;if(!(t.excludeUndefineds&&void 0===s||t.excludeNulls&&null===s)){if(!p||""!==u&&"//"!==u)p&&n.queryFind(v,u,"some")&&(d={value:s,keys:t.calculateResultKeys?y:[]},a.push(d));else{var d={value:s,keys:t.calculateResultKeys?y:[]};a.push(d)}if(a.length===t.max)break}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return a}var Lr=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Wr=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},Hr=function(){function e(){this.nodes=new Set,this.edges=new Map}return e.prototype.addNode=function(e){this.nodes.has(e)||(this.nodes.add(e),this.edges.set(e,new Set))},e.prototype.addDependency=function(e,r){if(!this.nodes.has(e)||!this.nodes.has(r))throw new Error("Both nodes must exist before adding a dependency.");this.edges.get(e).add(r)},e.prototype.removeNode=function(e){var r,t;if(!this.nodes.has(e))throw new Error("Node does not exist.");this.nodes.delete(e),this.edges.delete(e);try{for(var n=Lr(this.edges.values()),o=n.next();!o.done;o=n.next())o.value.delete(e)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}},e.prototype.removeDependency=function(e,r){if(!this.edges.has(e))throw new Error("From node does not exist.");this.edges.get(e).delete(r)},e.prototype.hasNode=function(e){return this.nodes.has(e)},e.prototype.hasDependency=function(e,r){return!!this.edges.has(e)&&this.edges.get(e).has(r)},e.prototype.getDependencies=function(e){if(!this.edges.has(e))throw new Error("Node does not exist.");return Array.from(this.edges.get(e))},e.prototype.getDependents=function(e){var r,t,n=[];try{for(var o=Lr(this.edges),i=o.next();!i.done;i=o.next()){var a=Wr(i.value,2),u=a[0];a[1].has(e)&&n.push(u)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return n},e.prototype.isCyclic=function(){var e,r,t=this,n=new Set,o=new Set,i=function(e){var r,a;if(n.has(e))return!1;if(o.has(e))return!0;o.add(e);var u=t.edges.get(e);if(u)try{for(var c=Lr(u),l=c.next();!l.done;l=c.next()){var f=l.value;if(i(f))return!0}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return o.delete(e),n.add(e),!1};try{for(var a=Lr(this.nodes),u=a.next();!u.done;u=a.next()){var c=u.value;if(i(c))return!0}}catch(r){e={error:r}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return!1},e.prototype.order=function(){var e,r,t=this,n=new Set,o=new Set,i=[],a=function(e){var r,u;if(!n.has(e)){if(o.has(e))throw new Error("Graph has a cycle.");o.add(e);var c=t.edges.get(e);if(c)try{for(var l=Lr(c),f=l.next();!f.done;f=l.next()){var s=f.value;a(s)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(r)throw r.error}}o.delete(e),n.add(e),i.push(e)}};try{for(var u=Lr(this.nodes),c=u.next();!c.done;c=u.next()){var l=c.value;n.has(l)||a(l)}}catch(r){e={error:r}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return i},e.prototype.clear=function(){this.nodes.clear(),this.edges.clear()},e.prototype.getNodes=function(){return Array.from(this.nodes)},e.prototype.getAllEdges=function(){var e,r,t,n,o=[];try{for(var i=Lr(this.edges),a=i.next();!a.done;a=i.next()){var u=Wr(a.value,2),c=u[0],l=u[1];try{for(var f=(t=void 0,Lr(l)),s=f.next();!s.done;s=f.next()){var y=s.value;o.push([c,y])}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}}}catch(r){e={error:r}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o},e}(),Zr=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Jr=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Xr(e){var r,t,n=0;try{for(var o=Zr(e),i=o.next();!i.done;i=o.next()){var a=i.value.toString().split(".")[1];a&&(n=Math.max(n,a.length))}}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return Math.pow(10,n)}function Yr(e,r,t){return(e*t+r*t)/t}var et=function(e,r,t,n){if(!n)throw new Error("Attribute not found");var o,i,a={attribute:n,types:e.types};return(a.types.includes("sum")||a.types.includes("avg")||a.types.includes("count"))&&(o=nt(n,r)),(a.types.includes("min")||a.types.includes("max"))&&(i=rt(e.attribute,r)),e.types.forEach((function(n){"sum"===n?a.sum=null==o?void 0:o.sum:"avg"===n?a.avg=null==o?void 0:o.average:"count"===n?a.count=null==o?void 0:o.count:"min"===n?a.min=i&&i[0]:"max"===n?a.max=i&&i[1]:"distinct"===n?a.distinct=ot(e,r,t):"group"===n&&(a.group=tt(e,r))})),a},rt=function(e,r){var t,n,o=void 0,i=void 0;try{for(var a=Zr(r.values()),u=a.next();!u.done;u=a.next()){var c=u.value;if(c){var l=c[e];(void 0===o||l<o)&&(o=l),(void 0===i||l>i)&&(i=l)}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}if(void 0!==o&&void 0!==i)return[o,i]},tt=function(e,r){var t,n,o,i,a,u,c,l,f=[];null===(u=null===(a=e.groupOptions)||void 0===a?void 0:a.groups)||void 0===u||u.forEach((function(e){f.push({option:e,count:0,keys:[]})}));var s={option:{value:["$dcupl_not_found"]},count:0,keys:[]};try{for(var y=Zr(r.values()),p=y.next();!p.done;p=y.next()){var v=p.value,d=v[e.attribute];try{for(var h=(o=void 0,Zr(f)),g=h.next();!g.done;g=h.next()){var b=g.value;void 0!==b.option.value&&b.option.value.includes(d)||void 0!==b.option.from&&b.option.from<d&&void 0!==b.option.to&&b.option.to>d?(b.count++,b.keys.push(v.key)):(null===(c=null==e?void 0:e.groupOptions)||void 0===c?void 0:c.calculateNotFound)&&(s.count++,s.keys.push(v.key))}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return(null===(l=null==e?void 0:e.groupOptions)||void 0===l?void 0:l.calculateNotFound)&&f.push(s),f},nt=function(e,r){var t,n,o,i,a,u,c,l=0,f=0;try{for(var s=Zr(r.values()),y=s.next();!y.done;y=s.next()){var p=y.value;if(p){var v=p[e];if(Array.isArray(v))try{for(var d=(o=void 0,Zr(v)),h=d.next();!h.done;h=d.next()){var g=h.value;"number"==typeof g&&(l=Yr(l,g,Xr([l,g])),f++)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}else"number"==typeof v&&(l=Yr(l,v,Xr([l,v])),f++)}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}if(0!==f)return{average:(a=l,u=f,c=Xr([l,f]),a*c/(u*c)),count:r.size,sum:l}},ot=function(e,r,t){var n,o,i,a,u=[];try{for(var c=Zr(t),l=c.next();!l.done;l=c.next()){var f=Jr(l.value,2),s=f[0],y=f[1];if((!e.excludeUndefineds||void 0!==s)&&y.find((function(e){return r.has(e)}))){var p={value:s,count:y.length};if((null===(i=e.distinctOptions)||void 0===i?void 0:i.skipKeys)||(p.keys=y),u.push(p),(null===(a=e.distinctOptions)||void 0===a?void 0:a.limit)&&u.length>=e.distinctOptions.limit)break}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}return u};const it=function(e,r,t,n){for(var o=e.length,i=t+(n?1:-1);n?i--:++i<o;)if(r(e[i],i,e))return i;return-1};function at(e){var r=-1,t=null==e?0:e.length;for(this.__data__=new V;++r<t;)this.add(e[r])}at.prototype.add=at.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},at.prototype.has=function(e){return this.__data__.has(e)};const ut=at,ct=function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1},lt=function(e,r){return e.has(r)},ft=function(e,r,t,n,o,i){var a=1&t,u=e.length,c=r.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(e),f=i.get(r);if(l&&f)return l==r&&f==e;var s=-1,y=!0,p=2&t?new ut:void 0;for(i.set(e,r),i.set(r,e);++s<u;){var v=e[s],d=r[s];if(n)var h=a?n(d,v,s,r,e,i):n(v,d,s,e,r,i);if(void 0!==h){if(h)continue;y=!1;break}if(p){if(!ct(r,(function(e,r){if(!lt(p,r)&&(v===e||o(v,e,t,n,i)))return p.push(r)}))){y=!1;break}}else if(v!==d&&!o(v,d,t,n,i)){y=!1;break}}return i.delete(e),i.delete(r),y},st=function(e){var r=-1,t=Array(e.size);return e.forEach((function(e,n){t[++r]=[n,e]})),t},yt=function(e){var r=-1,t=Array(e.size);return e.forEach((function(e){t[++r]=e})),t};var pt=d?d.prototype:void 0,vt=pt?pt.valueOf:void 0;var dt=Object.prototype.hasOwnProperty;var ht="[object Arguments]",gt="[object Array]",bt="[object Object]",mt=Object.prototype.hasOwnProperty;const wt=function(e,r,t,n,o,i){var a=ae(e),c=ae(r),l=a?gt:fr(e),f=c?gt:fr(r),s=(l=l==ht?bt:l)==bt,y=(f=f==ht?bt:f)==bt,p=l==f;if(p&&fe(e)){if(!fe(r))return!1;a=!0,s=!1}if(p&&!s)return i||(i=new W),a||xe(e)?ft(e,r,t,n,o,i):function(e,r,t,n,o,i,a){switch(t){case"[object DataView]":if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=r.byteLength||!i(new yr(e),new yr(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return u(+e,+r);case"[object Error]":return e.name==r.name&&e.message==r.message;case"[object RegExp]":case"[object String]":return e==r+"";case"[object Map]":var c=st;case"[object Set]":var l=1&n;if(c||(c=yt),e.size!=r.size&&!l)return!1;var f=a.get(e);if(f)return f==r;n|=2,a.set(e,r);var s=ft(c(e),c(r),n,o,i,a);return a.delete(e),s;case"[object Symbol]":if(vt)return vt.call(e)==vt.call(r)}return!1}(e,r,l,t,n,o,i);if(!(1&t)){var v=s&&mt.call(e,"__wrapped__"),d=y&&mt.call(r,"__wrapped__");if(v||d){var h=v?e.value():e,g=d?r.value():r;return i||(i=new W),o(h,g,t,n,i)}}return!!p&&(i||(i=new W),function(e,r,t,n,o,i){var a=1&t,u=Le(e),c=u.length;if(c!=Le(r).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in r:dt.call(r,f)))return!1}var s=i.get(e),y=i.get(r);if(s&&y)return s==r&&y==e;var p=!0;i.set(e,r),i.set(r,e);for(var v=a;++l<c;){var d=e[f=u[l]],h=r[f];if(n)var g=a?n(h,d,f,r,e,i):n(d,h,f,e,r,i);if(!(void 0===g?d===h||o(d,h,t,n,i):g)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=e.constructor,m=r.constructor;b==m||!("constructor"in e)||!("constructor"in r)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(e),i.delete(r),p}(e,r,t,n,o,i))},xt=function e(r,t,n,o,i){return r===t||(null==r||null==t||!ee(r)&&!ee(t)?r!=r&&t!=t:wt(r,t,n,o,e,i))},jt=function(e,r,t,n){var o=t.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var u=t[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){var c=(u=t[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(void 0===l&&!(c in e))return!1}else{var s=new W;if(n)var y=n(l,f,c,e,r,s);if(!(void 0===y?xt(f,l,3,n,s):y))return!1}}return!0},_t=function(e){return e==e&&!_(e)},At=function(e){for(var r=Te(e),t=r.length;t--;){var n=r[t],o=e[n];r[t]=[n,o,_t(o)]}return r},Ot=function(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}},qt=function(e){return"symbol"==typeof e||ee(e)&&"[object Symbol]"==j(e)};var St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kt=/^\w*$/;const Qt=function(e,r){if(ae(e))return!1;var t=typeof e;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=e&&!qt(e))||Kt.test(e)||!St.test(e)||null!=r&&e in Object(r)};function kt(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var t=function(){var n=arguments,o=r?r.apply(this,n):n[0],i=t.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return t.cache=i.set(o,a)||i,a};return t.cache=new(kt.Cache||V),t}kt.Cache=V;var Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Et=/\\(\\)?/g;const Mt=(Ct=kt((function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(Tt,(function(e,t,n,o){r.push(n?o.replace(Et,"$1"):t||e)})),r}),(function(e){return 500===It.size&&It.clear(),e})),It=Ct.cache,Ct);var Ct,It;const Ft=function(e,r){for(var t=-1,n=null==e?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o};var Dt=d?d.prototype:void 0,zt=Dt?Dt.toString:void 0;const Nt=function e(r){if("string"==typeof r)return r;if(ae(r))return Ft(r,e)+"";if(qt(r))return zt?zt.call(r):"";var t=r+"";return"0"==t&&1/r==-1/0?"-0":t},Pt=function(e){return null==e?"":Nt(e)},Rt=function(e,r){return ae(e)?e:Qt(e,r)?[e]:Mt(Pt(e))},Bt=function(e){if("string"==typeof e||qt(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},Gt=function(e,r){for(var t=0,n=(r=Rt(r,e)).length;null!=e&&t<n;)e=e[Bt(r[t++])];return t&&t==n?e:void 0},Ut=function(e,r,t){var n=null==e?void 0:Gt(e,r);return void 0===n?t:n},$t=function(e,r){return null!=e&&r in Object(e)},Vt=function(e,r){return null!=e&&function(e,r,t){for(var n=-1,o=(r=Rt(r,e)).length,i=!1;++n<o;){var a=Bt(r[n]);if(!(i=null!=e&&t(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&pe(o)&&ye(a,o)&&(ae(e)||ie(e))}(e,r,$t)},Lt=function(e){return e},Wt=function(e){return function(r){return null==r?void 0:r[e]}},Ht=function(e){return Qt(e)?Wt(Bt(e)):function(e){return function(r){return Gt(r,e)}}(e)},Zt=function(e){return"function"==typeof e?e:null==e?Lt:"object"==typeof e?ae(e)?(n=e[0],o=e[1],Qt(n)&&_t(o)?Ot(Bt(n),o):function(e){var r=Ut(e,n);return void 0===r&&r===o?Vt(e,n):xt(o,r,3)}):1==(t=At(r=e)).length&&t[0][2]?Ot(t[0][0],t[0][1]):function(e){return e===r||jt(e,r,t)}:Ht(e);var r,t,n,o};var Jt=/\s/;var Xt=/^\s+/;const Yt=function(e){return e?e.slice(0,function(e){for(var r=e.length;r--&&Jt.test(e.charAt(r)););return r}(e)+1).replace(Xt,""):e};var en=/^[-+]0x[0-9a-f]+$/i,rn=/^0b[01]+$/i,tn=/^0o[0-7]+$/i,nn=parseInt;var on=1/0;const an=function(e){return e?(e=function(e){if("number"==typeof e)return e;if(qt(e))return NaN;if(_(e)){var r="function"==typeof e.valueOf?e.valueOf():e;e=_(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var t=rn.test(e);return t||tn.test(e)?nn(e.slice(2),t?2:8):en.test(e)?NaN:+e}(e))===on||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},un=function(e){var r=an(e),t=r%1;return r==r?t?r-t:r:0};var cn=Math.max;const ln=function(e,r,t){var n=null==e?0:e.length;if(!n)return-1;var o=null==t?0:un(t);return o<0&&(o=cn(n+o,0)),it(e,Zt(r),o)};var fn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},sn=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},yn=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},pn=function(){function e(){this._defaultQueryOptions={modelKey:"",groupKey:"root",groupType:"and",queries:[]},this.currentQuery=Qr(this._defaultQueryOptions)}return e.prototype.init=function(e){this._initOptions=Qr(e),this.currentQuery=Qr(this._defaultQueryOptions),this.currentQuery.modelKey=e.modelKey},e.prototype.reset=function(){return this.init(this._initOptions),this.getQuery()},e.prototype.isQuery=function(e){return"attribute"in e},e.prototype.isQueryGroup=function(e){return"groupKey"in e},e.prototype.isRootQueryGroup=function(e){return this.isQueryGroup(e)&&"root"===e.groupKey},e.prototype.getQueryGroup=function(e){var r=this;return this.currentQuery.queries.find((function(t){return r.isQueryGroup(t)&&t.groupKey===e}))},e.prototype.getQuery=function(){return Qr(this.currentQuery)},e.prototype.hasQueryGroup=function(e){var r=this;return this.currentQuery.queries.some((function(t){return r.isQueryGroup(t)&&t.groupKey===e}))},e.prototype.has=function(e){var r=this;if(e.groupKey&&e.queryKey){var t=this.getQueryGroup(e.groupKey);if(t)return t.queries.some((function(t){return r.isQuery(t)&&t.queryKey===e.queryKey}))}else if(e.groupKey)return this.hasQueryGroup(e.groupKey);return!1},e.prototype.applyOptions=function(e,r){return void 0===r&&(r="update"),"set"===r?(this.currentQuery.count=e.count,this.currentQuery.start=e.start,this.currentQuery.sort=e.sort,this.currentQuery.projection=e.projection):(void 0!==(null==e?void 0:e.sort)&&(this.currentQuery.sort=e.sort),void 0!==(null==e?void 0:e.count)&&(this.currentQuery.count=e.count),void 0!==(null==e?void 0:e.start)&&(this.currentQuery.start=null==e?void 0:e.start),void 0!==(null==e?void 0:e.projection)&&(this.currentQuery.projection=null==e?void 0:e.projection)),this.getQuery()},e.prototype.applyQuery=function(e,r,t){var n,o,i=this;if(t||(t=this.currentQuery),Array.isArray(e))try{for(var a=fn(e),u=a.next();!u.done;u=a.next()){var c=u.value;this.applyQuery(c,r,t)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}else if(this.isRootQueryGroup(e))e.groupType&&(t.groupType=e.groupType),"set"===(null==r?void 0:r.mode)?t.queries=e.queries:t.queries=yn(yn([],sn(t.queries),!1),sn(e.queries),!1),this.applyOptions(e,"set");else if(this.isQuery(e)){var l=t.queries.findIndex((function(r){return i.isQueryGroup(r)&&r.groupKey===e.attribute}));if(l>-1){var f=t.queries[l];"set"===(null==r?void 0:r.mode)?f.queries=[e]:f.queries.push(e)}else t.queries.push({groupKey:e.attribute,groupType:"or",queries:[e]})}else this.isQueryGroup(e)&&(l=t.queries.findIndex((function(r){return i.isQueryGroup(r)&&r.groupKey===e.groupKey})),l>-1?(f=t.queries[l],e.groupType&&(f.groupType=e.groupType),"set"===(null==r?void 0:r.mode)?t.queries[l]=e:f.queries=yn(yn([],sn(f.queries),!1),sn(e.queries),!1)):t.queries.push({groupKey:e.groupKey,groupType:e.groupType||"or",queries:e.queries}));return t},e.prototype.removeAllQueries=function(){return this.currentQuery.queries=[],this.getQuery()},e.prototype.removeQuery=function(e,r){var t,n,o=this;if(r||(r=this.currentQuery),this.isQuery(e)){if((a=r.queries.findIndex((function(r){return o.isQueryGroup(r)&&r.groupKey===e.attribute})))>-1){var i=r.queries[a];(l=ln(i.queries,e))>-1&&i.queries.splice(l,1),0===i.queries.length&&r.queries.splice(a,1)}}else if(this.isQueryGroup(e)){var a;if((a=r.queries.findIndex((function(r){return o.isQueryGroup(r)&&r.groupKey===e.groupKey})))>-1)if(e.queries){i=r.queries[a];try{for(var u=fn(e.queries),c=u.next();!c.done;c=u.next()){var l,f=c.value;(l=ln(i.queries,f))>-1&&i.queries.splice(l,1)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}0===i.queries.length&&r.queries.splice(a,1)}else r.queries.splice(a,1)}return r},e}(),vn=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},dn=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},hn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},gn=new pn;function bn(e,r,t,n,o,i,a){var u,c,l,f,s,y,p=[],v=gn.removeQuery({groupKey:o},Qr(n)),d=a.queryData(e,v,!1,i),h=r?dn([],vn(null==r?void 0:r.keys()),!1):[],g=new Set(h),b=i.get(o);if(!t.excludeUnresolved)try{for(var m=hn(b.keys()),w=m.next();!w.done;w=m.next()){var x=w.value;g.add(x)}}catch(e){u={error:e}}finally{try{w&&!w.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}t.excludeUndefineds?g.delete(void 0):g.add(void 0);try{for(var j=hn(g.values()),_=j.next();!_.done;_=j.next()){var A=_.value,O=new Map,q=b.get(A)||[];try{for(var S=(s=void 0,hn(q)),K=S.next();!K.done;K=S.next()){x=K.value;var Q=d.get(x);if(Q&&(O.set(x,Q),!(null==t?void 0:t.calculateFacets)))break}}catch(e){s={error:e}}finally{try{K&&!K.done&&(y=S.return)&&y.call(S)}finally{if(s)throw s.error}}var k={key:String(A),value:A,selected:mn(o,A,n),enabled:O.size>0,size:O.size,entry:r.get(A),resultKeys:Array.from(O.keys())};if(!(null==t?void 0:t.excludeZeros)||0!==k.size){if((null==t?void 0:t.count)&&p.length===(null==t?void 0:t.count))return p;p.push(k)}}}catch(e){l={error:e}}finally{try{_&&!_.done&&(f=j.return)&&f.call(j)}finally{if(l)throw l.error}}return p}var mn=function(e,r,t){var n=t.queries.findIndex((function(r){return gn.isQueryGroup(r)&&r.groupKey===e}));return n>-1&&!!t.queries[n].queries.find((function(t){var n;if(gn.isQuery(t)){var o=(null===(n=t.value)||void 0===n?void 0:n.key)||t.value;return t.attribute===e&&o===r}return!1}))},wn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},xn=function(){function e(){this.indexMap=new Map,this.dataMap=new Map}return e.prototype.reset=function(e){e?(this.indexMap.delete(e),this.dataMap.delete(e)):(this.indexMap.clear(),this.dataMap.clear())},e.prototype.fillDataMap=function(e,r){var t,n,o,i,a,u=this.dataMap.get(e);u||(u=new Map,this.dataMap.set(e,u));try{for(var c=wn(r),l=c.next();!l.done;l=c.next()){var f=l.value,s=void 0;if("object"==typeof f&&f&&f.key)s=f.key;else{if(Array.isArray(f)){try{for(var y=(o=void 0,wn(f)),p=y.next();!p.done;p=y.next()){var v=p.value;this.fillDataMap(e,[v])}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}return}s=f}var d=u.get(s);d||(d={key:s},null===(a=this.dataMap.get(e))||void 0===a||a.set(s,d))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}},e.prototype.fillInverseIndex=function(e,r,t){var n,o,i,a;if(e&&r&&t&&Array.isArray(t)){var u=this.indexMap.get(e)||new Map;try{for(var c=wn(t),l=c.next();!l.done;l=c.next()){var f=l.value,s=void 0;if("object"==typeof f&&f&&f.key)s=f.key;else{if(Array.isArray(f)){try{for(var y=(i=void 0,wn(f)),p=y.next();!p.done;p=y.next()){var v=p.value;this.fillInverseIndex(e,r,[v])}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}return}s=f}var d=u.get(s)||[];d.push(r),u.set(s,d)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.indexMap.set(e,u)}},e.prototype.getIndex=function(e,r){var t=this.getIndexName(e,r);return this.indexMap.get(t)},e.prototype.getData=function(e,r){var t=this.getIndexName(e,r);return this.dataMap.get(t)},e.prototype.getOrCreateIndex=function(e,r,t){var n,o,i=this.getIndexName(e,t),a=this.getIndex(i);if(!a){this.reset(i),this.indexMap.set(i,new Map);try{for(var u=wn(r.values()),c=u.next();!c.done;c=u.next()){var l=c.value,f=l[e];this.fillInverseIndex(i,l.key,[f]),this.fillDataMap(i,[f])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}a=this.getIndex(i)||new Map}return a},e.prototype.getIndexName=function(e,r){return r?e+"_"+t(r):e},e}(),jn=function(){return jn=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},jn.apply(this,arguments)},_n=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},An=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},On="__";function qn(e,r,t,n,o){var i,a,u,c,l,f,s,y,p;void 0===t&&(t={key:"root"}),void 0===n&&(n="root"),void 0===o&&(o=new xn);try{for(var v=_n(r.columns),d=v.next();!d.done;d=v.next()){var h=d.value;h.attribute&&o.getOrCreateIndex(h.attribute,e)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}try{for(var g=_n(r.rows),b=g.next();!b.done;b=g.next()){var m=b.value;m.attribute&&o.getOrCreateIndex(m.attribute,e)}}catch(e){u={error:e}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}try{for(var w=_n(r.values),x=w.next();!x.done;x=w.next())(O=x.value).attribute&&o.getOrCreateIndex(O.attribute,e)}catch(e){l={error:e}}finally{try{x&&!x.done&&(f=w.return)&&f.call(w)}finally{if(l)throw l.error}}if(r.rows&&r.rows.length>0){t.rows=t.rows||[];var j=function(e,r,t,n,o){var i,a,u,c,l,f,s,y;void 0===o&&(o="");var p={key:r.attribute},v=n.getIndex(r.attribute);if(!v)return p;try{for(var d=_n(v.entries()),h=d.next();!h.done;h=d.next()){var g=An(h.value,2),b=g[0],m=g[1],w={key:b},x=new Map;try{for(var j=(u=void 0,_n(m)),_=j.next();!_.done;_=j.next()){var A=_.value;e.has(A)&&x.set(A,e.get(A))}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=j.return)&&c.call(j)}finally{if(u)throw u.error}}if(x.size){try{for(var O=(l=void 0,_n(t.values)),q=O.next();!q.done;q=O.next()){var S=q.value;if(w.values=w.values||[],"root"!==o||!1!==(null==r?void 0:r.calculateTotals)){var K=et(S,x,n.getIndex(S.attribute),S.attribute);w.values.push(K)}}}catch(e){l={error:e}}finally{try{q&&!q.done&&(f=O.return)&&f.call(O)}finally{if(l)throw l.error}}if(p.rows=p.rows||[],p.rows.push(w),t.rows.length>1)qn(x,jn(jn({},t),{rows:t.rows.slice(1)}),w,o+On+r.attribute+On+b);else if(t.columns)try{for(var Q=(s=void 0,_n(t.columns)),k=Q.next();!k.done;k=Q.next()){var T=k.value;w.columns=w.columns||[];var E=Sn(x,T,t,n,o+On+r.attribute+On+b);w.columns.push(E)}}catch(e){s={error:e}}finally{try{k&&!k.done&&(y=Q.return)&&y.call(Q)}finally{if(s)throw s.error}}}}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}return p}(e,r.rows[0],r,o,n);t.rows.push(j)}if(r.columns&&r.columns.length>0&&(t.columns=t.columns||[],j=Sn(e,r.columns[0],r,o,n),t.columns.push(j)),"root"===t.key)try{for(var _=_n(r.values),A=_.next();!A.done;A=_.next()){var O=A.value;if(t.values=t.values||[],"root"!==n||!1!==(null===(p=r.options)||void 0===p?void 0:p.calculateTotals)){var q=et(O,e,o.getIndex(O.attribute),O.attribute);t.values.push(q)}}}catch(e){s={error:e}}finally{try{A&&!A.done&&(y=_.return)&&y.call(_)}finally{if(s)throw s.error}}return t}function Sn(e,r,t,n,o){var i,a,u,c,l,f;void 0===o&&(o="");var s={key:r.attribute},y=n.getIndex(r.attribute);if(!y)return s;try{for(var p=_n(y.entries()),v=p.next();!v.done;v=p.next()){var d=An(v.value,2),h=d[0],g=d[1],b={key:h},m=new Map;try{for(var w=(u=void 0,_n(g)),x=w.next();!x.done;x=w.next()){var j=x.value;e.has(j)&&m.set(j,e.get(j))}}catch(e){u={error:e}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}if(m.size){try{for(var _=(l=void 0,_n(t.values)),A=_.next();!A.done;A=_.next()){var O=A.value;if(b.values=b.values||[],"root"!==o||!1!==(null==r?void 0:r.calculateTotals)){var q=et(O,m,n.getIndex(O.attribute),O.attribute);b.values.push(q)}}}catch(e){l={error:e}}finally{try{A&&!A.done&&(f=_.return)&&f.call(_)}finally{if(l)throw l.error}}s.columns=s.columns||[],s.columns.push(b),t.columns.length>1&&qn(m,jn(jn({},t),{columns:t.columns.slice(1)}),b,o+On+r.attribute+On+h)}}}catch(e){i={error:e}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return s}var Kn=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Qn=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},kn=function(e,r){var t,n,o,i,a=[];try{for(var u=Kn(e),c=u.next();!c.done;c=u.next()){var l=c.value,f=function(e,r){var t=a.find((function(r){return r.key===e})),n=Mn(r);if(t)t.type!==n&&(t.type="any");else{var o={key:e,type:n};a.push(o)}};try{for(var s=(o=void 0,Kn(Object.entries(l))),y=s.next();!y.done;y=s.next()){var p=Qn(y.value,2);f(p[0],p[1])}}catch(e){o={error:e}}finally{try{y&&!y.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}if(!r)break}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return a},Tn=function(e){return Number(e)===e&&e%1==0},En=function(e){return Number(e)===e&&e%1!=0},Mn=function(e){switch(typeof e){case"string":return"string";case"number":return Tn(e)?"int":En(e)?"float":"any";case"boolean":return"boolean";case"object":return function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)?"date":"json";default:return"any"}},Cn=function(e,r){var t,n=zr(e.text||""),o=(null==r?void 0:r.attributeKey)||e.filterKey,i=(null==r?void 0:r.comparisonType)||"containsIgnoreCase";return"containsIgnoreCase"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:"/".concat(n,"/"),operator:"find",options:{transform:["lowercase"]}}]}:"containsIgnoreCaseAndWhitespace"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:"/".concat(n,"/"),operator:"find",options:{transform:["removeWhitespace","lowercase"]}}]}:"contains"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:"/".concat(n,"/"),operator:"find"}]}:"equal"===i?t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:e.text,operator:"eq"}]}:"equalIgnoreCase"===i&&(t={groupKey:e.filterKey,queries:[{queryKey:e.text,attribute:o,value:e.text,operator:"eq",options:{transform:["lowercase"]}}]}),t},In=function(e,r){var t=(null==r?void 0:r.attributeKey)||e.filterKey;return{groupKey:e.filterKey,queries:[{queryKey:e.value,attribute:t,value:e.value,operator:"eq"}]}},Fn=function(e,r){var t=(null==r?void 0:r.attributeKey)||e.filterKey,n={groupKey:e.filterKey,queries:[]};return void 0!==e.eq&&(n.groupType="or",Array.isArray(e.eq)?e.eq.forEach((function(e){n.queries.push({attribute:t,value:e,operator:"eq"})})):n.queries.push({attribute:t,value:e.eq,operator:"eq"})),void 0!==e.ne&&(n.groupType="and",Array.isArray(e.ne)?e.ne.forEach((function(e){n.queries.push({attribute:t,value:e,operator:"eq",options:{invert:!0}})})):n.queries.push({attribute:t,value:e.ne,operator:"eq",options:{invert:!0}})),void 0!==e.gt&&(n.groupType="and",n.queries.push({attribute:t,value:e.gt,operator:"gt"})),void 0!==e.lt&&(n.groupType="and",n.queries.push({attribute:t,value:e.lt,operator:"lt"})),void 0!==e.gte&&(n.groupType="and",n.queries.push({attribute:t,value:e.gte,operator:"gte"})),void 0!==e.lte&&(n.groupType="and",n.queries.push({attribute:t,value:e.lte,operator:"lte"})),n},Dn=function(e,r){var t=(null==r?void 0:r.attributeKey)||e.filterKey,n={groupKey:e.filterKey,queries:[]};return e.itemKeys.forEach((function(e){n.queries.push({queryKey:e,attribute:t,value:{key:e},operator:"eq"})})),n},zn=function(e){return"string"==typeof e.modelKey&&!!Array.isArray(e.queries)};const Nn=function(e,r){return xt(e,r)},Pn=Wt("length");var Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Bn="\\ud800-\\udfff",Gn="["+Bn+"]",Un="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$n="\\ud83c[\\udffb-\\udfff]",Vn="[^"+Bn+"]",Ln="(?:\\ud83c[\\udde6-\\uddff]){2}",Wn="[\\ud800-\\udbff][\\udc00-\\udfff]",Hn="(?:"+Un+"|"+$n+")?",Zn="[\\ufe0e\\ufe0f]?",Jn=Zn+Hn+"(?:\\u200d(?:"+[Vn,Ln,Wn].join("|")+")"+Zn+Hn+")*",Xn="(?:"+[Vn+Un+"?",Un,Ln,Wn,Gn].join("|")+")",Yn=RegExp($n+"(?="+$n+")|"+Xn+Jn,"g");const eo=function(e){return function(e){return Rn.test(e)}(e)?function(e){for(var r=Yn.lastIndex=0;Yn.test(e);)++r;return r}(e):Pn(e)},ro=function(e){if(null==e)return 0;if(ke(e))return"string"==typeof(r=e)||!ae(r)&&ee(r)&&"[object String]"==j(r)?eo(e):e.length;var r,t=fr(e);return"[object Map]"==t||"[object Set]"==t?e.size:Qe(e).length},to=function(e){return e!=e},no=function(e,r){return!(null==e||!e.length)&&function(e,r,t){return r==r?function(e,r,t){for(var n=t-1,o=e.length;++n<o;)if(e[n]===r)return n;return-1}(e,r,t):it(e,to,t)}(e,r,0)>-1},oo=function(e,r,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(r,e[n]))return!0;return!1};var io=d?d.isConcatSpreadable:void 0;const ao=function(e){return ae(e)||ie(e)||!!(io&&e&&e[io])},uo=function e(r,t,n,o,i){var a=-1,u=r.length;for(n||(n=ao),i||(i=[]);++a<u;){var c=r[a];t>0&&n(c)?t>1?e(c,t-1,n,o,i):Ge(i,c):o||(i[i.length]=c)}return i};var co=Math.max;const lo=H?function(e,r){return H(e,"toString",{configurable:!0,enumerable:!1,value:(t=r,function(){return t}),writable:!0});var t}:Lt;var fo=Date.now;const so=(yo=lo,po=0,vo=0,function(){var e=fo(),r=16-(e-vo);if(vo=e,r>0){if(++po>=800)return arguments[0]}else po=0;return yo.apply(void 0,arguments)});var yo,po,vo;const ho=function(e){return ee(e)&&ke(e)},go=function(e){return so(function(e,r,t){return r=co(void 0===r?e.length-1:r,0),function(){for(var n=arguments,o=-1,i=co(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(var u=Array(r+1);++o<r;)u[o]=n[o];return u[r]=t(a),function(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}(e,this,u)}}(e,void 0,Lt),e+"")}((function(e,r){var t=function(e){var r=null==e?0:e.length;return r?e[r-1]:void 0}(r);return ho(t)&&(t=void 0),ho(e)?function(e,r,t,n){var o=-1,i=no,a=!0,u=e.length,c=[],l=r.length;if(!u)return c;t&&(r=Ft(r,de(t))),n?(i=oo,a=!1):r.length>=200&&(i=lt,a=!1,r=new ut(r));e:for(;++o<u;){var f=e[o],s=null==t?f:t(f);if(f=n||0!==f?f:0,a&&s==s){for(var y=l;y--;)if(r[y]===s)continue e;c.push(f)}else i(r,s,n)||c.push(f)}return c}(e,uo(r,1,ho,!0),Zt(t)):[]})),bo=function(e,r,t){return e==e&&(void 0!==t&&(e=e<=t?e:t),void 0!==r&&(e=e>=r?e:r)),e},mo=function(e,r,t){var n=(t="function"==typeof t?t:void 0)?t(e,r):void 0;return void 0===n?xt(e,r,void 0,t):!!n},wo=(xo=ln,function(e,r,t){var n=Object(e);if(!ke(e)){var o=Zt(r);e=Te(e),r=function(e){return o(n[e],e,n)}}var i=xo(e,r,t);return i>-1?n[o?e[i]:i]:void 0});var xo;const jo=function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n;)if(!r(e[t],t,e))return!1;return!0},_o=function(e,r,t){for(var n=-1,o=Object(e),i=t(e),a=i.length;a--;){var u=i[++n];if(!1===r(o[u],u,o))break}return e},Ao=function(e,r){if(null==e)return e;if(!ke(e))return function(e,r){return e&&_o(e,r,Te)}(e,r);for(var t=e.length,n=-1,o=Object(e);++n<t&&!1!==r(o[n],n,o););return e},Oo=function(e,r){var t=!0;return Ao(e,(function(e,n,o){return t=!!r(e,n,o)})),t},qo=function(e,r,t){if(!_(t))return!1;var n=typeof r;return!!("number"==n?ke(t)&&ye(r,t.length):"string"==n&&r in t)&&u(t[r],e)},So=function(e,r){var t;return Ao(e,(function(e,n,o){return!(t=r(e,n,o))})),!!t};var Ko=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Qo=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},ko=function(){function e(e){this.scriptController=e,this.registeredCustomOperator=new Map,this.queryBuilder=new pn}return e.prototype.registerCustomOperator=function(e,r){this.registeredCustomOperator.set(e,r)},e.prototype.transformValue=function(e,r){var t,n,o=this;if(Array.isArray(e))return e.map((function(e){return o.transformValue(e,r)}));if("string"!=typeof e)return e;try{for(var i=Ko(r),a=i.next();!a.done;a=i.next()){var u=a.value;"lowercase"===u?e=e.toLowerCase():"trim"===u?e=e.trim():"removeWhitespace"===u&&(e=e.replace(/\s/g,""))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return e},e.prototype.evaluateQuery=function(e,r){var t,n,o,i,a,u,c,l=e.value,f=(null===(t=e.options)||void 0===t?void 0:t.arrayValueHandling)||"some";if(Array.isArray(null===(n=e.options)||void 0===n?void 0:n.transform)&&e.options.transform.length>0&&(l=this.transformValue(l,e.options.transform)),c=e.attribute.includes(".")||e.attribute.includes("[")?Ut(r,e.attribute):r[e.attribute],Array.isArray(null===(o=e.options)||void 0===o?void 0:o.transform)&&e.options.transform.length>0&&(c=this.transformValue(c,e.options.transform)),null==c&&!["typeof","isTruthy","eq"].includes(e.operator))return!1;switch(e.operator){case"eq":return(null===(i=e.options)||void 0===i?void 0:i.invert)?!Nn(c,l):Nn(c,l);case"find":return(null===(a=e.options)||void 0===a?void 0:a.invert)?!this.queryFind(c,l,f):this.queryFind(c,l,f);case"lt":return Array.isArray(c)?"some"===f?c.some((function(e){return e<l})):c.every((function(e){return e<l})):c<l;case"gt":return Array.isArray(c)?"some"===f?c.some((function(e){return e>l})):c.every((function(e){return e>l})):c>l;case"lte":return Array.isArray(c)?"some"===f?c.some((function(e){return e<=l})):c.every((function(e){return e<=l})):c<=l;case"gte":return Array.isArray(c)?"some"===f?c.some((function(e){return e>=l})):c.every((function(e){return e>=l})):c>=l;case"typeof":return(null===(u=e.options)||void 0===u?void 0:u.invert)?typeof c!==l:Array.isArray(c)?"some"===f?c.some((function(e){return typeof e===l})):c.every((function(e){return typeof e===l})):typeof c===l;case"isTruthy":return!0===l?Array.isArray(c)?"some"===f?c.some((function(e){return typeof!!e})):c.every((function(e){return typeof!!e})):!!c:!c;case"size":return"string"==typeof c?c.length===l:ro(c)===l;default:if(this.scriptController.hasScript(e.operator))return this.scriptController.executeScript(e.operator,"operator",{query:e,item:r});if(this.registeredCustomOperator.has(e.operator)){var s=this.registeredCustomOperator.get(e.operator);if("function"==typeof s)return s(e,r)}}return!1},e.prototype.evaluateEqOperator=function(e,r,t){var n,o,i,a,u=new Map,c=t.get(e.attribute);if(c){var l=void 0;if("string"==typeof e.value?l=e.value:(null===(i=e.value)||void 0===i?void 0:i.key)&&1===Object.keys(e.value).length&&(l=e.value.key),void 0!==l){var f=c.get(l);if(f){if(f.forEach((function(e){r.has(e)&&u.set(e,r.get(e))})),null===(a=e.options)||void 0===a?void 0:a.invert){var s=go(Array.from(r.values()),Array.from(u.values()),"key"),y=new Map;return s.forEach((function(e){y.set(e.key,e)})),y}return u}}}try{for(var p=Ko(r),v=p.next();!v.done;v=p.next()){var d=Qo(v.value,2),h=d[0];l=d[1],this.evaluateQuery(e,l)&&u.set(h,l)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}return u},e.prototype.equalRegexFn=function(e,r){var t,n,o,i,a,u=this;if("string"!=typeof r||(i="/",o=Pt(o=r),a=null==a?0:bo(un(a),0,o.length),i=Nt(i),o.slice(a,a+i.length)!=i)||!function(e,r,t){e=Pt(e),r=Nt(r);var n=e.length,o=t=void 0===t?n:bo(un(t),0,n);return(t-=r.length)>=0&&e.slice(t,o)==r}(r,"/"))return Array.isArray(e)?!!e.find((function(e){return mo(e,r,u.equalRegexFn)})):"object"==typeof r?(t=e)===(n=r)||jt(t,n,At(n)):e===r;try{return new RegExp(r.slice(1,-1)).test(e)}catch(e){return!1}},e.prototype.queryFind=function(e,r,t){var n=this;return Array.isArray(e)?"string"==typeof r||"number"==typeof r||"boolean"==typeof r?"some"===t?e.some((function(e){return mo(e,r,n.equalRegexFn)})):e.every((function(e){return mo(e,r,n.equalRegexFn)})):!!wo(e,r):mo(e,r,this.equalRegexFn)},e.prototype.validateQuery=function(e){var r=this;if(this.queryBuilder.isQuery(e)){if(!e.attribute||!e.operator)throw new Error("invalid query - missing attribute or operator");if("find"===e.operator&&Array.isArray(e.value))throw new Error("invalid query - find operator cannot have array value");return!0}if(this.queryBuilder.isQueryGroup(e))return function(e,r,t){var n=ae(e)?jo:Oo;return t&&qo(e,r,t)&&(r=void 0),n(e,Zt(r))}(e.queries,(function(e){return r.validateQuery(e)}));throw new Error("invalid query - missing query or attribute")},e.prototype.getEvaluatedQueryDataset=function(e,r,t){var n,o,i,a,u=this,c=new Map;if(e.attribute.includes("[*]")){var l=e.attribute.replace("[*]",""),f=function(r,t){var n=t[l];Array.isArray(n)&&(function(e,r,t){var n=ae(e)?ct:So;return t&&qo(e,r,t)&&(r=void 0),n(e,Zt(r))}(n.map((function(r,n){var o=Qr(e);return o.attribute=o.attribute.replace("[*]","[".concat(n,"]")),u.evaluateQuery(o,t)})))&&c.set(r,t))};try{for(var s=Ko(r),y=s.next();!y.done;y=s.next()){var p=Qo(y.value,2);f(g=p[0],b=p[1])}}catch(e){n={error:e}}finally{try{y&&!y.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}else{if("eq"===e.operator)return this.evaluateEqOperator(e,r,t);try{for(var v=Ko(r),d=v.next();!d.done;d=v.next()){var h=Qo(d.value,2),g=h[0],b=h[1];this.evaluateQuery(e,b)&&c.set(g,b)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}return c},e.prototype.evaluateQueryGroup=function(e,r,t,n){var o,i,a,u,c,l=new Map,f=r;if(!e.queries||0===(null===(c=e.queries)||void 0===c?void 0:c.length))return f;try{for(var s=Ko(e.queries),y=s.next();!y.done;y=s.next()){var p=y.value,v=new Map;if(v=this.queryBuilder.isQuery(p)?this.getEvaluatedQueryDataset(p,f,n):this.evaluateQueryGroup(p,f,t,n),0===l.size&&(l=v),"or"===e.groupType)v.forEach((function(e){l.set(e.key,e)}));else{var d=go(Array.from(l.values()),Array.from(v.values()),"key");try{for(var h=(a=void 0,Ko(d)),g=h.next();!g.done;g=h.next()){var b=g.value;l.delete(b.key)}}catch(e){a={error:e}}finally{try{g&&!g.done&&(u=h.return)&&u.call(h)}finally{if(a)throw a.error}}}f="and"===e.groupType?l:r}}catch(e){o={error:e}}finally{try{y&&!y.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return l},e.prototype.queryData=function(e,r,t,n){var o=e;return 0===r.queries.length?e:(r.groupKey||(r.groupKey="root"),r.groupType||(r.groupType="and"),r.queries||(r.queries=[]),this.validateQuery(r),this.evaluateQueryGroup(r,o,t,n))},e}(),To=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},Eo=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},Mo=function(){function e(){this.scripts=new Map,this.scriptFunctions=new Map}return e.prototype.keys=function(){return Array.from(this.scripts.keys())},e.prototype.setScript=function(e,r){this.scripts.set(e,r)},e.prototype.removeScript=function(e){this.scripts.delete(e)},e.prototype.getScript=function(e){return this.scripts.get(e)},e.prototype.hasScript=function(e){return this.scripts.has(e)},e.prototype.getScriptAsFn=function(e,r){if(this.scriptFunctions.has(e))return this.scriptFunctions.get(e);var t=this.getScript(e);if(!t)throw new Error("Script ".concat(e," not found"));var n=this.getWrapperScript(t),o=new(Function.bind.apply(Function,Eo(Eo([void 0,"script_type"],To(r),!1),[n],!1)));return this.scriptFunctions.set(e,o),o},e.prototype.getWrapperScript=function(e){return'\n "use strict";\n '.concat(e,"\n ")},e.prototype.executeScript=function(e,r,t){if(!this.getScript(e))throw new Error("Script ".concat(e," not found"));t.context||(t.context=t.options||{});var n=Object.keys(t),o=Object.values(t);return this.getScriptAsFn(e,n).apply(void 0,Eo([r],To(o),!1))},e}(),Co=function(e,r){return e?(r||(r={}),e.replace(/\$\{(.*?)\}/g,(function(e,t){return void 0!==r[t.trim()]?r[t.trim()]:""}))):""},Io=function(e){var r=new Set;return e.replace(/\$\{(.*?)\}/g,(function(e,t){return r.add(t.trim()),""})),{variables:Array.from(r).map((function(e){return{name:e}}))}},Fo=["any","Array<date>","Array<float>","Array<int>","Array<string>","boolean","date","float","int","json","string"],Do=["int","float","Array<int>","Array<float>"],zo=["date","Array<date>"],No=["eq","find","gt","gte","lt","lte","typeof","isTruthy","size"];return r})()));
|
|
2
|
+
//# sourceMappingURL=common.umd.js.map
|