@wavemaker/app-runtime-wm-build 11.4.0-next.24677 → 11.4.0-next.24679

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-runtime-wm-build",
3
- "version": "11.4.0-next.24677",
3
+ "version": "11.4.0-next.24679",
4
4
  "description": "All modules required for a wavemaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -205107,7 +205107,7 @@ window.requestAnimationFrame = function() {
205107
205107
  })(this, (function(CustomDOMParser) {
205108
205108
  "use strict";
205109
205109
  return function X2JS(config) {
205110
- var VERSION = "3.1.1";
205110
+ var VERSION = "3.4.4";
205111
205111
  config = config || {};
205112
205112
  function initConfigDefaults() {
205113
205113
  config.arrayAccessForm = config.arrayAccessForm || "none";
@@ -205117,6 +205117,7 @@ window.requestAnimationFrame = function() {
205117
205117
  config.attributeConverters = config.attributeConverters || [];
205118
205118
  config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || [];
205119
205119
  config.arrayAccessFormPaths = config.arrayAccessFormPaths || [];
205120
+ config.xmldomOptions = config.xmldomOptions || {};
205120
205121
  if (config.enableToStringFunc === undefined) {
205121
205122
  config.enableToStringFunc = true;
205122
205123
  }
@@ -205144,6 +205145,9 @@ window.requestAnimationFrame = function() {
205144
205145
  if (config.keepCData === undefined) {
205145
205146
  config.keepCData = false;
205146
205147
  }
205148
+ if (config.keepText === undefined) {
205149
+ config.keepText = false;
205150
+ }
205147
205151
  if (config.jsDateUTC === undefined) {
205148
205152
  config.jsDateUTC = false;
205149
205153
  }
@@ -205322,7 +205326,7 @@ window.requestAnimationFrame = function() {
205322
205326
  delete result["#cdata-section"];
205323
205327
  if (config.arrayAccessForm === "property") delete result["#cdata-section_asArray"];
205324
205328
  }
205325
- if (result.__cnt === 1 && result.__text) {
205329
+ if (result.__cnt === 1 && result.__text && !config.keepText) {
205326
205330
  result = result.__text;
205327
205331
  } else if (result.__cnt === 0 && config.emptyNodeForm === "text") {
205328
205332
  result = "";
@@ -205488,13 +205492,13 @@ window.requestAnimationFrame = function() {
205488
205492
  var parser = null;
205489
205493
  var domNode = null;
205490
205494
  if (CustomDOMParser) {
205491
- parser = new CustomDOMParser;
205495
+ parser = new CustomDOMParser(config.xmldomOptions);
205492
205496
  domNode = parser.parseFromString(xml, "text/xml");
205493
205497
  } else if (window && window.DOMParser) {
205494
205498
  parser = new window.DOMParser;
205495
205499
  var parsererrorNS = null;
205496
205500
  var isIEParser = window.ActiveXObject || "ActiveXObject" in window;
205497
- if (!isIEParser) {
205501
+ if (!isIEParser && document.all && !document.addEventListener) {
205498
205502
  try {
205499
205503
  parsererrorNS = parser.parseFromString("INVALID", "text/xml").childNodes[0].namespaceURI;
205500
205504
  } catch (err) {
@@ -4395,7 +4395,7 @@ i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
4395
4395
  /*!***********************************!*\
4396
4396
  !*** ./node_modules/x2js/x2js.js ***!
4397
4397
  \***********************************/
4398
- function(e,t){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(e){return function(t){var n="3.1.1";function r(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1)}function i(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}t=t||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function s(e){return e.prefix}function u(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function l(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function c(e,n,r){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<t.arrayAccessFormPaths.length;o++){var a=t.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(e[n]=[e[n]])}}function d(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*t+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function p(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<t.datetimeAccessFormPaths.length;o++){var a=t.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return d(e)}else if(a instanceof RegExp){if(a.test(i))return d(e)}else if("function"==typeof a&&a(i))return d(e)}return e}function h(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);t.ignoreRoot?n=m(s,u):n[u]=m(s,u)}}return n}function f(e,n){for(var r={__cnt:0},i=e.childNodes,u=0;u<i.length;u++){var d=i.item(u),h=a(d);d.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=m(d,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=m(d,n+"."+h)))}for(var f=0;f<e.attributes.length;f++){var v=e.attributes.item(f);r.__cnt++;for(var g=v.value,y=0;y<t.attributeConverters.length;y++){var _=t.attributeConverters[y];_.test.call(null,v.name,v.value)&&(g=_.convert.call(null,v.name,v.value))}r[t.attributePrefix+v.name]=g}var b=s(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=l(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=p(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function m(e,t){return e.nodeType===o.DOCUMENT_NODE?h(e):e.nodeType===o.ELEMENT_NODE?f(e,t):e.nodeType===o.TEXT_NODE||e.nodeType===o.CDATA_SECTION_NODE?e.nodeValue:null}function v(e,n,r,i){var o="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=e[s];t.escapeMode&&(l=u(l)),o+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function b(e){var t=0;if(e instanceof Object)for(var n in e)_(e,n)||t++;return t}function w(e){var n=[];if(e instanceof Object)for(var r in e)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function S(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=u(e.__text):n+=e.__text),n}function x(e){var n="";return e instanceof Object?n+=S(e):null!==e&&(t.escapeMode?n+=u(e):n+=e),n}function E(e,t,n){var r="";if(0===e.length)r+=v(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=k(e[i],t,w(e[i]));return r}function k(e,n,r){var i="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return i;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))i+=E(e,n,r);else if(e instanceof Date)i+=v(e,n,r,!1),i+=t.jsDateUTC?e.toUTCString():e.toISOString(),i+=g(e,n);else{b(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(i+=v(e,n,r,!1),i+=T(e),i+=g(e,n)):t.selfClosingElements?i+=v(e,n,r,!0):(i+=v(e,n,r,!1),i+=g(e,n))}else i+=v(e,n,r,!1),i+=x(e),i+=g(e,n);else i+=v(e,n,r,!0);return i}function T(e){var t="";if(b(e)>0)for(var n in e)if(!_(e,n)){var r=e[n];t+=k(r,n,w(r))}return t+=x(e)}function C(t){if(void 0===t)return null;if("string"!=typeof t)return null;var n=null,r=null;if(e)r=(n=new e).parseFromString(t,"text/xml");else if(window&&window.DOMParser){n=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window))try{i=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){i=null}try{r=n.parseFromString(t,"text/xml"),null!==i&&r.getElementsByTagNameNS(i,"parsererror").length>0&&(r=null)}catch(e){r=null}}else 0===t.indexOf("<?")&&(t=t.substr(t.indexOf("?>")+2)),(r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(t);return r}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2dom=function(e){return C(e)},this.dom2js=function(e){return m(e,null)},this.js2dom=function(e){return C(this.js2xml(e))},this.xml2js=function(e){var t=C(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return T(e)},this.getVersion=function(){return n}}})?n.apply(t,r):n)||(e.exports=i)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";
4398
+ function(e,t){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(e){return function(t){var n="3.4.4";function r(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1)}function i(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}t=t||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function s(e){return e.prefix}function u(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function l(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function c(e,n,r){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<t.arrayAccessFormPaths.length;o++){var a=t.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(e[n]=[e[n]])}}function d(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*t+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function p(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<t.datetimeAccessFormPaths.length;o++){var a=t.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return d(e)}else if(a instanceof RegExp){if(a.test(i))return d(e)}else if("function"==typeof a&&a(i))return d(e)}return e}function h(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);t.ignoreRoot?n=m(s,u):n[u]=m(s,u)}}return n}function f(e,n){for(var r={__cnt:0},i=e.childNodes,u=0;u<i.length;u++){var d=i.item(u),h=a(d);d.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=m(d,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=m(d,n+"."+h)))}for(var f=0;f<e.attributes.length;f++){var v=e.attributes.item(f);r.__cnt++;for(var g=v.value,y=0;y<t.attributeConverters.length;y++){var _=t.attributeConverters[y];_.test.call(null,v.name,v.value)&&(g=_.convert.call(null,v.name,v.value))}r[t.attributePrefix+v.name]=g}var b=s(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=l(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=p(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!t.keepText?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function m(e,t){return e.nodeType===o.DOCUMENT_NODE?h(e):e.nodeType===o.ELEMENT_NODE?f(e,t):e.nodeType===o.TEXT_NODE||e.nodeType===o.CDATA_SECTION_NODE?e.nodeValue:null}function v(e,n,r,i){var o="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=e[s];t.escapeMode&&(l=u(l)),o+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function b(e){var t=0;if(e instanceof Object)for(var n in e)_(e,n)||t++;return t}function w(e){var n=[];if(e instanceof Object)for(var r in e)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function S(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=u(e.__text):n+=e.__text),n}function x(e){var n="";return e instanceof Object?n+=S(e):null!==e&&(t.escapeMode?n+=u(e):n+=e),n}function E(e,t,n){var r="";if(0===e.length)r+=v(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=k(e[i],t,w(e[i]));return r}function k(e,n,r){var i="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return i;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))i+=E(e,n,r);else if(e instanceof Date)i+=v(e,n,r,!1),i+=t.jsDateUTC?e.toUTCString():e.toISOString(),i+=g(e,n);else{b(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(i+=v(e,n,r,!1),i+=T(e),i+=g(e,n)):t.selfClosingElements?i+=v(e,n,r,!0):(i+=v(e,n,r,!1),i+=g(e,n))}else i+=v(e,n,r,!1),i+=x(e),i+=g(e,n);else i+=v(e,n,r,!0);return i}function T(e){var t="";if(b(e)>0)for(var n in e)if(!_(e,n)){var r=e[n];t+=k(r,n,w(r))}return t+=x(e)}function C(n){if(void 0===n)return null;if("string"!=typeof n)return null;var r=null,i=null;if(e)i=(r=new e(t.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var o=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{o=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){o=null}try{i=r.parseFromString(n,"text/xml"),null!==o&&i.getElementsByTagNameNS(o,"parsererror").length>0&&(i=null)}catch(e){i=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(i=new ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(n);return i}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2dom=function(e){return C(e)},this.dom2js=function(e){return m(e,null)},this.js2dom=function(e){return C(this.js2xml(e))},this.xml2js=function(e){var t=C(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return T(e)},this.getVersion=function(){return n}}})?n.apply(t,r):n)||(e.exports=i)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";
4399
4399
  /*!******************!*\
4400
4400
  !*** ./index.ts ***!
4401
4401
  \******************/n.r(r),n.d(r,{$rootScope:()=>e.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>e.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>e.DB_CONSTANTS,LVService:()=>d.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>p.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>e.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>e.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>e.VARIABLE_URLS,WS_CONSTANTS:()=>e.WS_CONSTANTS,appManager:()=>t.appManager,debounceVariableCall:()=>t.debounceVariableCall,decodeData:()=>t.decodeData,dialogService:()=>t.dialogService,formatDate:()=>t.formatDate,formatExportExpression:()=>t.formatExportExpression,generateConnectionParams:()=>d.generateConnectionParams,getBlob:()=>t.getBlob,getErrMessage:()=>t.getErrMessage,getEvaluatedOrderBy:()=>t.getEvaluatedOrderBy,getTarget:()=>t.getTarget,getTargetNodeKey:()=>t.getTargetNodeKey,getTargetObj:()=>t.getTargetObj,httpService:()=>t.httpService,initiateCallback:()=>t.initiateCallback,internalBoundNodeMap:()=>t.internalBoundNodeMap,isFileUploadSupported:()=>t.isFileUploadSupported,metadataService:()=>t.metadataService,navigationService:()=>t.navigationService,oauthService:()=>t.oauthService,parseConfig:()=>d.parseConfig,routerService:()=>t.routerService,securityService:()=>t.securityService,setInput:()=>t.setInput,setValueToNode:()=>t.setValueToNode,toasterService:()=>t.toasterService,updateInternalNodes:()=>t.updateInternalNodes,wmSetDependency:()=>t.wmSetDependency});var e=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),t=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),d=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),p=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h=(n(/*! ./src/types/date-formatter */"./src/types/date-formatter.ts"),"hello from variables")})(),r})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],t):t((e=e||self)["angular-imask"]={},e.ng.core,e.ng.forms,e.ng.platformBrowser,e.IMask,e.ng.common)}(this,(function(e,t,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return l})),multi:!0},u=function(e){return e.nativeElement},l=function(){function e(e,n,i){var o;this._elementRef=e,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new t.EventEmitter,this.complete=new t.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(e){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=e:this.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e:this._renderer.setProperty(this.element,"value",e)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},e.prototype.ngOnChanges=function(e){e.elementRef&&!this.imaskElement&&(this.imaskElement=u),e.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},e.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},e.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},e.prototype.beginWrite=function(e){this._writing=!0,this._writingValue=e},e.prototype.endWrite=function(){return this._writing=!1,this._writingValue},e.prototype.writeValue=function(e){e=null==e?"":e,this.maskRef?(this.beginWrite(e),(this.maskValue!==e||"string"!=typeof e&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=e)):this._renderer.setProperty(this.element,"value",e)},e.prototype._onAccept=function(){var e=this.maskValue;this._writing&&e===this.endWrite()||(this.onChange(e),this.accept.emit(e))},e.prototype._onComplete=function(){this.complete.emit(this.maskValue)},e.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this.element,"disabled",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._handleInput=function(e){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)},e.prototype._compositionStart=function(){this._composing=!0},e.prototype._compositionEnd=function(e){this._composing=!1,this._compositionMode&&this._handleInput(e)},e.decorators=[{type:t.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},e.propDecorators={imask:[{type:t.Input}],unmask:[{type:t.Input}],imaskElement:[{type:t.Input}],accept:[{type:t.Output}],complete:[{type:t.Output}]},e}();var c=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},d=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},p=function(){function e(){}return e.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.pipe.apply(void 0,d(e))},e.decorators=[{type:t.Pipe,args:[{name:"imask"}]}],e}(),h=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[l,p],exports:[l,p]}]}],e}();Object.defineProperty(e,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return i.pipe}}),e.IMaskDirective=l,e.IMaskModule=h,e.IMaskPipe=p,e.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jmespath={})}(this,(function(e){"use strict";const t=e=>null!==e&&"[object Object]"===Object.prototype.toString.call(e),n=(e,r)=>{if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t+=1)if(!n(e[t],r[t]))return!1;return!0}if(t(e)&&t(r)){const t=Object.entries(e),i=new Set(Object.keys(r));if(t.length!==i.size)return!1;for(const[e,o]of t){if(!n(o,r[e]))return!1;i.delete(e)}return 0===i.size}return!1},r=e=>{if(""===e||!1===e||null==e)return!0;if(Array.isArray(e)&&0===e.length)return!0;if(t(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i=e=>e>="0"&&e<="9"||"-"===e;var o;!function(e){e.TOK_EOF="EOF",e.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",e.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",e.TOK_RBRACKET="Rbracket",e.TOK_RPAREN="Rparen",e.TOK_COMMA="Comma",e.TOK_COLON="Colon",e.TOK_RBRACE="Rbrace",e.TOK_NUMBER="Number",e.TOK_CURRENT="Current",e.TOK_ROOT="Root",e.TOK_EXPREF="Expref",e.TOK_PIPE="Pipe",e.TOK_OR="Or",e.TOK_AND="And",e.TOK_EQ="EQ",e.TOK_GT="GT",e.TOK_LT="LT",e.TOK_GTE="GTE",e.TOK_LTE="LTE",e.TOK_NE="NE",e.TOK_FLATTEN="Flatten",e.TOK_STAR="Star",e.TOK_FILTER="Filter",e.TOK_DOT="Dot",e.TOK_NOT="Not",e.TOK_LBRACE="Lbrace",e.TOK_LBRACKET="Lbracket",e.TOK_LPAREN="Lparen",e.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(e){const t=[];let n,r,l;for(this._current=0;this._current<e.length;)if((c=e[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(e),t.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[e[this._current]])t.push({start:this._current,type:a[e[this._current]],value:e[this._current]}),this._current+=1;else if(i(e[this._current]))l=this.consumeNumber(e),t.push(l);else if("["===e[this._current])l=this.consumeLBracket(e),t.push(l);else if('"'===e[this._current])n=this._current,r=this.consumeQuotedIdentifier(e),t.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===e[this._current])n=this._current,r=this.consumeRawStringLiteral(e),t.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===e[this._current]){n=this._current;const r=this.consumeLiteral(e);t.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[e[this._current]])l=this.consumeOperator(e),l&&t.push(l);else if(void 0!==u[e[this._current]])this._current+=1;else if("&"===e[this._current])n=this._current,this._current+=1,"&"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_AND,value:"&&"})):t.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==e[this._current]){const t=new Error(`Unknown character: ${e[this._current]}`);throw t.name="LexerError",t}n=this._current,this._current+=1,"|"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_OR,value:"||"})):t.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return t}consumeUnquotedIdentifier(e){const t=this._current;for(this._current+=1;this._current<e.length&&((n=e[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return e.slice(t,this._current)}consumeQuotedIdentifier(e){const t=this._current;this._current+=1;const n=e.length;for(;'"'!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&'"'!==e[t+1]?t+=1:t+=2,this._current=t}return this._current+=1,JSON.parse(e.slice(t,this._current))}consumeRawStringLiteral(e){const t=this._current;this._current+=1;const n=e.length;for(;"'"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"'"!==e[t+1]?t+=1:t+=2,this._current=t}this._current+=1;return e.slice(t+1,this._current-1).replace("\\'","'")}consumeNumber(e){const t=this._current;this._current+=1;const n=e.length;for(;i(e[this._current])&&this._current<n;)this._current+=1;return{start:t,value:parseInt(e.slice(t,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(e){const t=this._current;return this._current+=1,"?"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FILTER,value:"[?"}):"]"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FLATTEN,value:"[]"}):{start:t,type:o.TOK_LBRACKET,value:"["}}consumeOperator(e){const t=this._current,n=e[t];return this._current+=1,"!"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_NE,value:"!="}):{start:t,type:o.TOK_NOT,value:"!"}:"<"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_LTE,value:"<="}):{start:t,type:o.TOK_LT,value:"<"}:">"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_GTE,value:">="}):{start:t,type:o.TOK_GT,value:">"}:"="===n&&"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(e){this._current+=1;const t=this._current,n=e.length;for(;"`"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"`"!==e[t+1]?t+=1:t+=2,this._current=t}let r=e.slice(t,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(e){if(""===e)return!1;if('[{"'.includes(e[0]))return!0;if(["true","false","null"].includes(e))return!0;if("-0123456789".includes(e[0]))try{return JSON.parse(e),!0}catch(e){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const d=new class{constructor(){this.index=0,this.tokens=[]}parse(e){this.loadTokens(e),this.index=0;const t=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const e=this.lookaheadToken(0);this.errorToken(e,`Unexpected token type: ${e.type}, value: ${e.value}`)}return t}loadTokens(e){this.tokens=[...l.tokenize(e),{type:o.TOK_EOF,value:"",start:e.length}]}expression(e){const t=this.lookaheadToken(0);this.advance();let n=this.nud(t),r=this.lookahead(0);for(;e<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(e){return this.tokens[this.index+e].type}lookaheadToken(e){return this.tokens[this.index+e]}advance(){this.index+=1}nud(e){let t,n,r;switch(e.type){case o.TOK_LITERAL:return{type:"Literal",value:e.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:e.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:e.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return t={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[t,n]};case o.TOK_FILTER:return this.led(e.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return t={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[t,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(e)}}led(e,t){let n;switch(e){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[t,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[t,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[t,n]};case o.TOK_LPAREN:const i=t.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[t,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[t]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(t,e);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(t,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[t,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(e){if(this.lookahead(0)!==e){const t=this.lookaheadToken(0);this.errorToken(t,`Expected ${e}, got: ${t.type}`)}else this.advance()}errorToken(e,t=""){const n=new Error(t||`Invalid token (${e.type}): "${e.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const e={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),e}projectIfSlice(e,t){const n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const e=[null,null,null];let t=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&t<3;){if(n===o.TOK_COLON)t+=1,this.advance();else if(n===o.TOK_NUMBER)e[t]=this.lookaheadToken(0).value,this.advance();else{const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:e,type:"Slice"}}parseComparator(e,t){return{type:"Comparator",name:t,children:[e,this.expression(c[t])]}}parseDotRHS(e){const t=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(t))return this.expression(e);if(t===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(t===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(e){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(e);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(e);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(e);const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}parseMultiselectList(){const e=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const t=this.expression(0);if(e.push(t),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:e}}parseMultiselectHash(){const e=[],t=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!t.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),e.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:e}}};var p;!function(e){e[e.TYPE_NUMBER=0]="TYPE_NUMBER",e[e.TYPE_ANY=1]="TYPE_ANY",e[e.TYPE_STRING=2]="TYPE_STRING",e[e.TYPE_ARRAY=3]="TYPE_ARRAY",e[e.TYPE_OBJECT=4]="TYPE_OBJECT",e[e.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",e[e.TYPE_EXPREF=6]="TYPE_EXPREF",e[e.TYPE_NULL=7]="TYPE_NULL",e[e.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",e[e.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(p||(p={}));class h{constructor(e){this.TYPE_NAME_TABLE={[p.TYPE_NUMBER]:"number",[p.TYPE_ANY]:"any",[p.TYPE_STRING]:"string",[p.TYPE_ARRAY]:"array",[p.TYPE_OBJECT]:"object",[p.TYPE_BOOLEAN]:"boolean",[p.TYPE_EXPREF]:"expression",[p.TYPE_NULL]:"null",[p.TYPE_ARRAY_NUMBER]:"Array<number>",[p.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([e])=>Math.abs(e),this.functionAvg=([e])=>{let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length},this.functionCeil=([e])=>Math.ceil(e),this.functionContains=e=>{const[t,n]=e;return t.includes(n)},this.functionEndsWith=e=>{const[t,n]=e;return t.includes(n,t.length-n.length)},this.functionFloor=([e])=>Math.floor(e),this.functionJoin=e=>{const[t,n]=e;return n.join(t)},this.functionKeys=([e])=>Object.keys(e),this.functionLength=([e])=>t(e)?Object.keys(e).length:e.length,this.functionMap=e=>{if(!this._interpreter)return[];const t=[],n=this._interpreter,r=e[0],i=e[1];for(let e=0;e<i.length;e+=1)t.push(n.visit(r,i[e]));return t},this.functionMax=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.max(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)n.localeCompare(t[e])<0&&(n=t[e]);return n},this.functionMaxBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=-1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o>a&&(a=o,i=n[e]);return i},this.functionMerge=e=>{let t={};for(let n=0;n<e.length;n+=1){const r=e[n];t=Object.assign(t,r)}return t},this.functionMin=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.min(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)t[e].localeCompare(n)<0&&(n=t[e]);return n},this.functionMinBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o<a&&(a=o,i=n[e]);return i},this.functionNotNull=e=>{for(let t=0;t<e.length;t+=1)if(this.getTypeName(e[t])!==p.TYPE_NULL)return e[t];return null},this.functionReverse=([e])=>{if(this.getTypeName(e)===p.TYPE_STRING){const t=e;let n="";for(let e=t.length-1;e>=0;e-=1)n+=t[e];return n}const t=e.slice(0);return t.reverse(),t},this.functionSort=([e])=>[...e].sort(),this.functionSortBy=e=>{if(!this._interpreter)return[];const t=e[0].slice(0);if(0===t.length)return t;const n=this._interpreter,r=e[1],i=this.getTypeName(n.visit(r,t[0]));if(void 0!==i&&![p.TYPE_NUMBER,p.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let e=0;e<t.length;e+=1)o.push([e,t[e]]);o.sort(((e,t)=>{const o=n.visit(r,e[1]),a=n.visit(r,t[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:e[0]-t[0]}));for(let e=0;e<o.length;e+=1)t[e]=o[e][1];return t},this.functionStartsWith=([e,t])=>e.startsWith(t),this.functionSum=([e])=>e.reduce(((e,t)=>e+t),0),this.functionToArray=([e])=>this.getTypeName(e)===p.TYPE_ARRAY?e:[e],this.functionToNumber=([e])=>{const t=this.getTypeName(e);let n;return t===p.TYPE_NUMBER?e:t!==p.TYPE_STRING||(n=+e,isNaN(n))?null:n},this.functionToString=([e])=>this.getTypeName(e)===p.TYPE_STRING?e:JSON.stringify(e),this.functionType=([e])=>{switch(this.getTypeName(e)){case p.TYPE_NUMBER:return"number";case p.TYPE_STRING:return"string";case p.TYPE_ARRAY:return"array";case p.TYPE_OBJECT:return"object";case p.TYPE_BOOLEAN:return"boolean";case p.TYPE_EXPREF:return"expref";case p.TYPE_NULL:return"null";default:return}},this.functionValues=([e])=>Object.values(e),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[p.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[p.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]},{types:[p.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[p.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[p.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY,p.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[p.TYPE_EXPREF]},{types:[p.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[p.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[p.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[p.TYPE_ARRAY_STRING,p.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[p.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[p.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[p.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[p.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[p.TYPE_OBJECT]}]}},this._interpreter=e}registerFunction(e,t,n){if(e in this.functionTable)throw new Error(`Function already defined: ${e}()`);this.functionTable[e]={_func:t.bind(this),_signature:n}}callFunction(e,t){const n=this.functionTable[e];if(void 0===n)throw new Error(`Unknown function: ${e}()`);return this.validateArgs(e,t,n._signature),n._func.call(this,t)}validateInputSignatures(e,t){for(let n=0;n<t.length;n+=1)if("variadic"in t[n]&&n!==t.length-1)throw new Error(`ArgumentError: ${e}() 'variadic' argument ${n+1} must occur last`)}validateArgs(e,t,n){var r,i;let o;this.validateInputSignatures(e,n);const a=n.filter((e=>{var t;return null!==(t=!e.optional)&&void 0!==t&&t})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=t.length<a,l=t.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${e}() takes ${c}${a} argument${o?"s":""} but received ${t.length}`);let d,p,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,d=n[r].types,p=this.getTypeName(t[r]),i=0;i<d.length;i+=1)if(void 0!==p&&this.typeMatches(p,d[i],t[r])){h=!0;break}if(!h&&void 0!==p){const t=d.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ");throw new Error(`TypeError: ${e}() expected argument ${r+1} to be type (${t}) but received type ${this.TYPE_NAME_TABLE[p]} instead.`)}}}typeMatches(e,t,n){if(t===p.TYPE_ANY)return!0;if(t!==p.TYPE_ARRAY_STRING&&t!==p.TYPE_ARRAY_NUMBER&&t!==p.TYPE_ARRAY)return e===t;if(t===p.TYPE_ARRAY)return e===p.TYPE_ARRAY;if(e===p.TYPE_ARRAY){let e;t===p.TYPE_ARRAY_NUMBER?e=p.TYPE_NUMBER:t===p.TYPE_ARRAY_STRING&&(e=p.TYPE_STRING);for(let t=0;t<n.length;t+=1){const r=this.getTypeName(n[t]);if(void 0!==r&&void 0!==e&&!this.typeMatches(r,e,n[t]))return!1}return!0}return!1}getTypeName(e){switch(Object.prototype.toString.call(e)){case"[object String]":return p.TYPE_STRING;case"[object Number]":return p.TYPE_NUMBER;case"[object Array]":return p.TYPE_ARRAY;case"[object Boolean]":return p.TYPE_BOOLEAN;case"[object Null]":return p.TYPE_NULL;case"[object Object]":return e.jmespathType===o.TOK_EXPREF?p.TYPE_EXPREF:p.TYPE_OBJECT;default:return}}createKeyFunction(e,t){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(e,r);if(!t.includes(this.getTypeName(i))){const e=`TypeError: expected one of (${t.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(e)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(e,t){return this._rootValue=t,this.visit(e,t)}visit(e,i){let a,s,u,l,c,d,p,h,f,m,v;switch(e.type){case"Field":return null===i?null:t(i)?(d=i[e.name],void 0===d?null:d):null;case"Subexpression":for(u=this.visit(e.children[0],i),m=1;m<e.children.length;m+=1)if(u=this.visit(e.children[1],u),null===u)return null;return u;case"IndexExpression":return p=this.visit(e.children[0],i),h=this.visit(e.children[1],p),h;case"Index":if(!Array.isArray(i))return null;let g=e.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...e.children],_=this.computeSliceParams(i.length,y),[b,w,S]=_;if(u=[],S>0)for(m=b;m<w;m+=S)u.push(i[m]);else for(m=b;m>w;m+=S)u.push(i[m]);return u;case"Projection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;for(f=[],m=0;m<v.length;m+=1)s=this.visit(e.children[1],v[m]),null!==s&&f.push(s);return f;case"ValueProjection":if(v=this.visit(e.children[0],i),!t(v))return null;f=[];const x=Object.values(v);for(m=0;m<x.length;m+=1)s=this.visit(e.children[1],x[m]),null!==s&&f.push(s);return f;case"FilterProjection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;const E=[],k=[];for(m=0;m<v.length;m+=1)a=this.visit(e.children[2],v[m]),r(a)||E.push(v[m]);for(let t=0;t<E.length;t+=1)s=this.visit(e.children[1],E[t]),null!==s&&k.push(s);return k;case"Comparator":switch(l=this.visit(e.children[0],i),c=this.visit(e.children[1],i),e.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${e.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(e.children[0],i);if(!Array.isArray(T))return null;let C=[];for(m=0;m<T.length;m+=1)s=T[m],Array.isArray(s)?C=[...C,...s]:C.push(s);return C;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],m=0;m<e.children.length;m+=1)f.push(this.visit(e.children[m],i));return f;case"MultiSelectHash":if(null===i)return null;let M;for(f={},m=0;m<e.children.length;m+=1)M=e.children[m],f[M.name]=this.visit(M.value,i);return f;case"OrExpression":return a=this.visit(e.children[0],i),r(a)&&(a=this.visit(e.children[1],i)),a;case"AndExpression":return l=this.visit(e.children[0],i),r(l)?l:this.visit(e.children[1],i);case"NotExpression":return l=this.visit(e.children[0],i),r(l);case"Literal":return e.value;case o.TOK_PIPE:return p=this.visit(e.children[0],i),this.visit(e.children[1],p);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const D=[];for(let t=0;t<e.children.length;t+=1)D.push(this.visit(e.children[t],i));return this.runtime.callFunction(e.name,D);case"ExpressionReference":const A=e.children[0];return A.jmespathType=o.TOK_EXPREF,A;default:throw new Error(`Unknown node type: ${e.type}`)}}computeSliceParams(e,t){let[n,r,i]=t;if(null===i)i=1;else if(0===i){const e=new Error("Invalid slice, step cannot be 0");throw e.name="RuntimeError",e}const o=i<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,i),r=null===r?o?-1:e:this.capSliceRange(e,r,i),[n,r,i]}capSliceRange(e,t,n){let r=t;return r<0?(r+=e,r<0&&(r=n<0?-1:0)):r>=e&&(r=n<0?e-1:e),r}},m=p.TYPE_ANY,v=p.TYPE_ARRAY,g=p.TYPE_ARRAY_NUMBER,y=p.TYPE_ARRAY_STRING,_=p.TYPE_BOOLEAN,b=p.TYPE_EXPREF,w=p.TYPE_NULL,S=p.TYPE_NUMBER,x=p.TYPE_OBJECT,E=p.TYPE_STRING;function k(e){return d.parse(e)}function T(e){return l.tokenize(e)}const C=(e,t,n)=>{f.runtime.registerFunction(e,t,n)};function M(e,t){const n=d.parse(t);return f.search(n,e)}const D=f,A={compile:k,registerFunction:C,search:M,tokenize:T,TreeInterpreter:D,TYPE_ANY:m,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:v,TYPE_BOOLEAN:_,TYPE_EXPREF:b,TYPE_NULL:w,TYPE_NUMBER:S,TYPE_OBJECT:x,TYPE_STRING:E};e.TYPE_ANY=m,e.TYPE_ARRAY=v,e.TYPE_ARRAY_NUMBER=g,e.TYPE_ARRAY_STRING=y,e.TYPE_BOOLEAN=_,e.TYPE_EXPREF=b,e.TYPE_NULL=w,e.TYPE_NUMBER=S,e.TYPE_OBJECT=x,e.TYPE_STRING=E,e.TreeInterpreter=D,e.compile=k,e.default=A,e.jmespath=A,e.registerFunction=C,e.search=M,e.tokenize=T,Object.defineProperty(e,"__esModule",{value:!0})})),function(){!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-bootstrap/collapse",["exports","@angular/animations","@angular/core"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||e,e["ngx-bootstrap"].collapse={}),e.ng.animations,e.ng.core)}(this,(function(e,t,n){"use strict";var r="400ms cubic-bezier(0.4,0.0,0.2,1)",i=[t.style({height:0,visibility:"hidden"}),t.animate(r,t.style({height:"*",visibility:"visible"}))],o=[t.style({height:"*",visibility:"visible"}),t.animate(r,t.style({height:0,visibility:"hidden"}))],a=function(){function e(e,t,r){this._el=e,this._renderer=t,this.collapsed=new n.EventEmitter,this.collapses=new n.EventEmitter,this.expanded=new n.EventEmitter,this.expands=new n.EventEmitter,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(o),this._factoryExpandAnimation=r.build(i)}return Object.defineProperty(e.prototype,"display",{set:function(e){this.isAnimated?(this._display=e,"none"!==e?this.show():this.hide()):this._renderer.setStyle(this._el.nativeElement,"display",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapse",{get:function(){return this.isExpanded},set:function(e){this.collapseNewValue=e,this._player&&!this._isAnimationDone||(this.isExpanded=e,this.toggle())},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewChecked=function(){this._stylesLoaded=!0,this._player&&this._isAnimationDone&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))},e.prototype.toggle=function(){this.isExpanded?this.hide():this.show()},e.prototype.hide=function(){var e=this;this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)((function(){e._isAnimationDone=!0,e.collapseNewValue!==e.isCollapsed&&e.isAnimated?e.show():(e.collapsed.emit(e),e._renderer.setStyle(e._el.nativeElement,"display","none"))}))},e.prototype.show=function(){var e=this;this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)((function(){e._isAnimationDone=!0,e.collapseNewValue!==e.isCollapsed&&e.isAnimated?e.hide():(e.expanded.emit(e),e._renderer.removeStyle(e._el.nativeElement,"overflow"))}))},e.prototype.animationRun=function(e,t){var n=this;if(!e||!this._stylesLoaded)return function(e){return e()};this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");var r=t===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.destroy(),this._player=r.create(this._el.nativeElement),this._player.play(),function(e){return n._player.onDone(e)}},e.decorators=[{type:n.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:t.AnimationBuilder}]},e.propDecorators={collapsed:[{type:n.Output}],collapses:[{type:n.Output}],expanded:[{type:n.Output}],expands:[{type:n.Output}],isExpanded:[{type:n.HostBinding,args:["class.in"]},{type:n.HostBinding,args:["class.show"]},{type:n.HostBinding,args:["attr.aria-expanded"]}],isCollapsed:[{type:n.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:n.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:n.HostBinding,args:["class.collapsing"]}],display:[{type:n.Input}],isAnimated:[{type:n.Input}],collapse:[{type:n.Input}]},e}();var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e.decorators=[{type:n.NgModule,args:[{declarations:[a],exports:[a]}]}],e}();e.CollapseDirective=a,e.CollapseModule=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("ngx-bootstrap/chronos",["exports"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||e,e["ngx-bootstrap"].chronos={}))}(this,(function(e){"use strict";function t(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function n(e){return"string"==typeof e}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e){return e&&e.getTime&&!isNaN(e.getTime())}function o(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e){return void 0===e}function d(e){var n=+e,r=0;return 0!==n&&isFinite(n)&&(r=t(n)),r}var p={},h={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function f(e,t){var n=e.toLowerCase(),r=e;n in h&&(r=h[n]),p[n]=p[n+"s"]=p[t]=r}function m(e){return n(e)?p[e]||p[e.toLowerCase()]:void 0}function v(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var g={},y={},_=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function b(e,t,n,r){e&&(y[e]=r),t&&(y[t[0]]=function(){return v(r.apply(null,arguments),t[1],t[2])}),n&&(y[n]=function(t,n){return n.locale.ordinal(r.apply(null,arguments),e)})}function w(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function S(e,t,n){var r=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(r.getUTCFullYear())&&r.setUTCFullYear(e),r}function x(e,t,n,r,i,o,a){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function E(e,t){return void 0===t&&(t=!1),t?e.getUTCHours():e.getHours()}function k(e,t){return void 0===t&&(t=!1),t?e.getUTCMinutes():e.getMinutes()}function T(e,t){return void 0===t&&(t=!1),t?e.getUTCSeconds():e.getSeconds()}function C(e,t){return void 0===t&&(t=!1),t?e.getUTCMilliseconds():e.getMilliseconds()}function M(e,t){return void 0===t&&(t=!1),t?e.getUTCDay():e.getDay()}function D(e,t){return void 0===t&&(t=!1),t?e.getUTCDate():e.getDate()}function A(e,t){return void 0===t&&(t=!1),t?e.getUTCMonth():e.getMonth()}function L(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear():e.getFullYear()}function O(e,t){return!(!e||!t)&&(N(e,t)&&A(e)===A(t))}function N(e,t){return!(!e||!t)&&L(e)===L(t)}var P=/\d/,I=/\d\d/,R=/\d{3}/,j=/\d{4}/,F=/[+-]?\d{6}/,Y=/\d\d?/,H=/\d\d\d\d?/,B=/\d\d\d\d\d\d?/,V=/\d{1,3}/,U=/\d{1,4}/,q=/[+-]?\d{1,6}/,z=/\d+/,W=/[+-]?\d+/,G=/Z|[+-]\d\d(?::?\d\d)?/gi,K=/[+-]?\d+(\.\d{1,3})?/,$=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Z={};function X(e,t,n){o(t)?Z[e]=t:Z[e]=function(e,r){return e&&n?n:t}}function J(e,t){return u(Z,e)?Z[e](!1,t):new RegExp(Q(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function Q(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ee={};function te(e,t){var r=n(e)?[e]:e,i=t;if(a(t)&&(i=function(e,n,r){return n[t]=d(e),r}),s(r)&&o(i)){var u=void 0;for(u=0;u<r.length;u++)ee[r[u]]=i}}function ne(e,t){te(e,(function(e,n,r,i){return r._w=r._w||{},t(e,r._w,r,i)}))}function re(e,t,n){return null!=t&&u(ee,e)&&ee[e](t,n._a,n,e),n}var ie={};function oe(e,t){ie[e]=t}function ae(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function se(e,t){return t.locale.getFullYear?t.locale.getFullYear(e,t.isUTC).toString():L(e,t.isUTC).toString()}function ue(e){return d(e)+(d(e)>68?1900:2e3)}function le(e){return ce(e)?366:365}function ce(e){return e%4==0&&e%100!=0||e%400==0}function de(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return 1===r?ce(e+(t-r)/12)?29:28:31-r%7%2}var pe={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function he(e,t){return a(t)?t:e}function fe(e,t,n){var r=Math.min(D(e),de(L(e),t));return n?e.setUTCMonth(t,r):e.setMonth(t,r),e}function me(e,t,n){return n?e.setUTCDate(t):e.setDate(t),e}function ve(e){return new Date(e.getTime())}function ge(e,t,r){var i=ve(e);switch(t){case"year":fe(i,0,r);case"quarter":case"month":me(i,1,r);case"week":case"isoWeek":case"day":case"date":!function(e,t,n){n?e.setUTCHours(t):e.setHours(t)}(i,0,r);case"hours":!function(e,t,n){n?e.setUTCMinutes(t):e.setMinutes(t)}(i,0,r);case"minutes":!function(e,t,n){n?e.setUTCSeconds(t):e.setSeconds(t)}(i,0,r);case"seconds":!function(e,t,n){n?e.setUTCMilliseconds(t):e.setMilliseconds(t)}(i,0,r)}return"week"===t&&function(e,t,n){void 0===n&&(n={});var r=Jt(e,n.locale,n.isUTC);Gt(e,t-r,"day")}(i,0,{isUTC:r}),"isoWeek"===t&&function(e,t,r){void 0===r&&(r={});var i=function(e,t){void 0===t&&(t=at());if(n(e))return t.weekdaysParse(e)%7||7;return a(e)&&isNaN(e)?null:e}(t,r.locale);Zt(e,Xt(e)%7?i:i-7)}
@@ -233148,7 +233148,7 @@ window.requestAnimationFrame = function() {
233148
233148
  })(this, (function(CustomDOMParser) {
233149
233149
  "use strict";
233150
233150
  return function X2JS(config) {
233151
- var VERSION = "3.1.1";
233151
+ var VERSION = "3.4.4";
233152
233152
  config = config || {};
233153
233153
  function initConfigDefaults() {
233154
233154
  config.arrayAccessForm = config.arrayAccessForm || "none";
@@ -233158,6 +233158,7 @@ window.requestAnimationFrame = function() {
233158
233158
  config.attributeConverters = config.attributeConverters || [];
233159
233159
  config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || [];
233160
233160
  config.arrayAccessFormPaths = config.arrayAccessFormPaths || [];
233161
+ config.xmldomOptions = config.xmldomOptions || {};
233161
233162
  if (config.enableToStringFunc === undefined) {
233162
233163
  config.enableToStringFunc = true;
233163
233164
  }
@@ -233185,6 +233186,9 @@ window.requestAnimationFrame = function() {
233185
233186
  if (config.keepCData === undefined) {
233186
233187
  config.keepCData = false;
233187
233188
  }
233189
+ if (config.keepText === undefined) {
233190
+ config.keepText = false;
233191
+ }
233188
233192
  if (config.jsDateUTC === undefined) {
233189
233193
  config.jsDateUTC = false;
233190
233194
  }
@@ -233363,7 +233367,7 @@ window.requestAnimationFrame = function() {
233363
233367
  delete result["#cdata-section"];
233364
233368
  if (config.arrayAccessForm === "property") delete result["#cdata-section_asArray"];
233365
233369
  }
233366
- if (result.__cnt === 1 && result.__text) {
233370
+ if (result.__cnt === 1 && result.__text && !config.keepText) {
233367
233371
  result = result.__text;
233368
233372
  } else if (result.__cnt === 0 && config.emptyNodeForm === "text") {
233369
233373
  result = "";
@@ -233529,13 +233533,13 @@ window.requestAnimationFrame = function() {
233529
233533
  var parser = null;
233530
233534
  var domNode = null;
233531
233535
  if (CustomDOMParser) {
233532
- parser = new CustomDOMParser;
233536
+ parser = new CustomDOMParser(config.xmldomOptions);
233533
233537
  domNode = parser.parseFromString(xml, "text/xml");
233534
233538
  } else if (window && window.DOMParser) {
233535
233539
  parser = new window.DOMParser;
233536
233540
  var parsererrorNS = null;
233537
233541
  var isIEParser = window.ActiveXObject || "ActiveXObject" in window;
233538
- if (!isIEParser) {
233542
+ if (!isIEParser && document.all && !document.addEventListener) {
233539
233543
  try {
233540
233544
  parsererrorNS = parser.parseFromString("INVALID", "text/xml").childNodes[0].namespaceURI;
233541
233545
  } catch (err) {
@@ -4611,7 +4611,7 @@ i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
4611
4611
  /*!***********************************!*\
4612
4612
  !*** ./node_modules/x2js/x2js.js ***!
4613
4613
  \***********************************/
4614
- function(e,t){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(e){return function(t){var n="3.1.1";function r(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1)}function i(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}t=t||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function s(e){return e.prefix}function u(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function l(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function c(e,n,r){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<t.arrayAccessFormPaths.length;o++){var a=t.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(e[n]=[e[n]])}}function d(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*t+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function p(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<t.datetimeAccessFormPaths.length;o++){var a=t.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return d(e)}else if(a instanceof RegExp){if(a.test(i))return d(e)}else if("function"==typeof a&&a(i))return d(e)}return e}function h(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);t.ignoreRoot?n=m(s,u):n[u]=m(s,u)}}return n}function f(e,n){for(var r={__cnt:0},i=e.childNodes,u=0;u<i.length;u++){var d=i.item(u),h=a(d);d.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=m(d,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=m(d,n+"."+h)))}for(var f=0;f<e.attributes.length;f++){var v=e.attributes.item(f);r.__cnt++;for(var g=v.value,y=0;y<t.attributeConverters.length;y++){var _=t.attributeConverters[y];_.test.call(null,v.name,v.value)&&(g=_.convert.call(null,v.name,v.value))}r[t.attributePrefix+v.name]=g}var b=s(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=l(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=p(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function m(e,t){return e.nodeType===o.DOCUMENT_NODE?h(e):e.nodeType===o.ELEMENT_NODE?f(e,t):e.nodeType===o.TEXT_NODE||e.nodeType===o.CDATA_SECTION_NODE?e.nodeValue:null}function v(e,n,r,i){var o="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=e[s];t.escapeMode&&(l=u(l)),o+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function b(e){var t=0;if(e instanceof Object)for(var n in e)_(e,n)||t++;return t}function w(e){var n=[];if(e instanceof Object)for(var r in e)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function S(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=u(e.__text):n+=e.__text),n}function E(e){var n="";return e instanceof Object?n+=S(e):null!==e&&(t.escapeMode?n+=u(e):n+=e),n}function x(e,t,n){var r="";if(0===e.length)r+=v(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=k(e[i],t,w(e[i]));return r}function k(e,n,r){var i="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return i;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))i+=x(e,n,r);else if(e instanceof Date)i+=v(e,n,r,!1),i+=t.jsDateUTC?e.toUTCString():e.toISOString(),i+=g(e,n);else{b(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(i+=v(e,n,r,!1),i+=T(e),i+=g(e,n)):t.selfClosingElements?i+=v(e,n,r,!0):(i+=v(e,n,r,!1),i+=g(e,n))}else i+=v(e,n,r,!1),i+=E(e),i+=g(e,n);else i+=v(e,n,r,!0);return i}function T(e){var t="";if(b(e)>0)for(var n in e)if(!_(e,n)){var r=e[n];t+=k(r,n,w(r))}return t+=E(e)}function C(t){if(void 0===t)return null;if("string"!=typeof t)return null;var n=null,r=null;if(e)r=(n=new e).parseFromString(t,"text/xml");else if(window&&window.DOMParser){n=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window))try{i=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){i=null}try{r=n.parseFromString(t,"text/xml"),null!==i&&r.getElementsByTagNameNS(i,"parsererror").length>0&&(r=null)}catch(e){r=null}}else 0===t.indexOf("<?")&&(t=t.substr(t.indexOf("?>")+2)),(r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(t);return r}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2dom=function(e){return C(e)},this.dom2js=function(e){return m(e,null)},this.js2dom=function(e){return C(this.js2xml(e))},this.xml2js=function(e){var t=C(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return T(e)},this.getVersion=function(){return n}}})?n.apply(t,r):n)||(e.exports=i)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";
4614
+ function(e,t){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(e){return function(t){var n="3.4.4";function r(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1)}function i(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}t=t||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function s(e){return e.prefix}function u(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function l(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function c(e,n,r){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<t.arrayAccessFormPaths.length;o++){var a=t.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(e[n]=[e[n]])}}function d(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*t+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function p(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<t.datetimeAccessFormPaths.length;o++){var a=t.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return d(e)}else if(a instanceof RegExp){if(a.test(i))return d(e)}else if("function"==typeof a&&a(i))return d(e)}return e}function h(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);t.ignoreRoot?n=m(s,u):n[u]=m(s,u)}}return n}function f(e,n){for(var r={__cnt:0},i=e.childNodes,u=0;u<i.length;u++){var d=i.item(u),h=a(d);d.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=m(d,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=m(d,n+"."+h)))}for(var f=0;f<e.attributes.length;f++){var v=e.attributes.item(f);r.__cnt++;for(var g=v.value,y=0;y<t.attributeConverters.length;y++){var _=t.attributeConverters[y];_.test.call(null,v.name,v.value)&&(g=_.convert.call(null,v.name,v.value))}r[t.attributePrefix+v.name]=g}var b=s(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=l(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=p(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!t.keepText?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function m(e,t){return e.nodeType===o.DOCUMENT_NODE?h(e):e.nodeType===o.ELEMENT_NODE?f(e,t):e.nodeType===o.TEXT_NODE||e.nodeType===o.CDATA_SECTION_NODE?e.nodeValue:null}function v(e,n,r,i){var o="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=e[s];t.escapeMode&&(l=u(l)),o+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function b(e){var t=0;if(e instanceof Object)for(var n in e)_(e,n)||t++;return t}function w(e){var n=[];if(e instanceof Object)for(var r in e)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function S(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=u(e.__text):n+=e.__text),n}function E(e){var n="";return e instanceof Object?n+=S(e):null!==e&&(t.escapeMode?n+=u(e):n+=e),n}function x(e,t,n){var r="";if(0===e.length)r+=v(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=k(e[i],t,w(e[i]));return r}function k(e,n,r){var i="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return i;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))i+=x(e,n,r);else if(e instanceof Date)i+=v(e,n,r,!1),i+=t.jsDateUTC?e.toUTCString():e.toISOString(),i+=g(e,n);else{b(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(i+=v(e,n,r,!1),i+=T(e),i+=g(e,n)):t.selfClosingElements?i+=v(e,n,r,!0):(i+=v(e,n,r,!1),i+=g(e,n))}else i+=v(e,n,r,!1),i+=E(e),i+=g(e,n);else i+=v(e,n,r,!0);return i}function T(e){var t="";if(b(e)>0)for(var n in e)if(!_(e,n)){var r=e[n];t+=k(r,n,w(r))}return t+=E(e)}function C(n){if(void 0===n)return null;if("string"!=typeof n)return null;var r=null,i=null;if(e)i=(r=new e(t.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var o=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{o=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){o=null}try{i=r.parseFromString(n,"text/xml"),null!==o&&i.getElementsByTagNameNS(o,"parsererror").length>0&&(i=null)}catch(e){i=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(i=new ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(n);return i}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2dom=function(e){return C(e)},this.dom2js=function(e){return m(e,null)},this.js2dom=function(e){return C(this.js2xml(e))},this.xml2js=function(e){var t=C(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return T(e)},this.getVersion=function(){return n}}})?n.apply(t,r):n)||(e.exports=i)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";
4615
4615
  /*!******************!*\
4616
4616
  !*** ./index.ts ***!
4617
4617
  \******************/n.r(r),n.d(r,{$rootScope:()=>e.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>e.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>e.DB_CONSTANTS,LVService:()=>d.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>p.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>e.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>e.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>e.VARIABLE_URLS,WS_CONSTANTS:()=>e.WS_CONSTANTS,appManager:()=>t.appManager,debounceVariableCall:()=>t.debounceVariableCall,decodeData:()=>t.decodeData,dialogService:()=>t.dialogService,formatDate:()=>t.formatDate,formatExportExpression:()=>t.formatExportExpression,generateConnectionParams:()=>d.generateConnectionParams,getBlob:()=>t.getBlob,getErrMessage:()=>t.getErrMessage,getEvaluatedOrderBy:()=>t.getEvaluatedOrderBy,getTarget:()=>t.getTarget,getTargetNodeKey:()=>t.getTargetNodeKey,getTargetObj:()=>t.getTargetObj,httpService:()=>t.httpService,initiateCallback:()=>t.initiateCallback,internalBoundNodeMap:()=>t.internalBoundNodeMap,isFileUploadSupported:()=>t.isFileUploadSupported,metadataService:()=>t.metadataService,navigationService:()=>t.navigationService,oauthService:()=>t.oauthService,parseConfig:()=>d.parseConfig,routerService:()=>t.routerService,securityService:()=>t.securityService,setInput:()=>t.setInput,setValueToNode:()=>t.setValueToNode,toasterService:()=>t.toasterService,updateInternalNodes:()=>t.updateInternalNodes,wmSetDependency:()=>t.wmSetDependency});var e=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),t=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),d=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),p=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h=(n(/*! ./src/types/date-formatter */"./src/types/date-formatter.ts"),"hello from variables")})(),r})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jmespath={})}(this,(function(e){"use strict";const t=e=>null!==e&&"[object Object]"===Object.prototype.toString.call(e),n=(e,r)=>{if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t+=1)if(!n(e[t],r[t]))return!1;return!0}if(t(e)&&t(r)){const t=Object.entries(e),i=new Set(Object.keys(r));if(t.length!==i.size)return!1;for(const[e,o]of t){if(!n(o,r[e]))return!1;i.delete(e)}return 0===i.size}return!1},r=e=>{if(""===e||!1===e||null==e)return!0;if(Array.isArray(e)&&0===e.length)return!0;if(t(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i=e=>e>="0"&&e<="9"||"-"===e;var o;!function(e){e.TOK_EOF="EOF",e.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",e.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",e.TOK_RBRACKET="Rbracket",e.TOK_RPAREN="Rparen",e.TOK_COMMA="Comma",e.TOK_COLON="Colon",e.TOK_RBRACE="Rbrace",e.TOK_NUMBER="Number",e.TOK_CURRENT="Current",e.TOK_ROOT="Root",e.TOK_EXPREF="Expref",e.TOK_PIPE="Pipe",e.TOK_OR="Or",e.TOK_AND="And",e.TOK_EQ="EQ",e.TOK_GT="GT",e.TOK_LT="LT",e.TOK_GTE="GTE",e.TOK_LTE="LTE",e.TOK_NE="NE",e.TOK_FLATTEN="Flatten",e.TOK_STAR="Star",e.TOK_FILTER="Filter",e.TOK_DOT="Dot",e.TOK_NOT="Not",e.TOK_LBRACE="Lbrace",e.TOK_LBRACKET="Lbracket",e.TOK_LPAREN="Lparen",e.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(e){const t=[];let n,r,l;for(this._current=0;this._current<e.length;)if((c=e[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(e),t.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[e[this._current]])t.push({start:this._current,type:a[e[this._current]],value:e[this._current]}),this._current+=1;else if(i(e[this._current]))l=this.consumeNumber(e),t.push(l);else if("["===e[this._current])l=this.consumeLBracket(e),t.push(l);else if('"'===e[this._current])n=this._current,r=this.consumeQuotedIdentifier(e),t.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===e[this._current])n=this._current,r=this.consumeRawStringLiteral(e),t.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===e[this._current]){n=this._current;const r=this.consumeLiteral(e);t.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[e[this._current]])l=this.consumeOperator(e),l&&t.push(l);else if(void 0!==u[e[this._current]])this._current+=1;else if("&"===e[this._current])n=this._current,this._current+=1,"&"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_AND,value:"&&"})):t.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==e[this._current]){const t=new Error(`Unknown character: ${e[this._current]}`);throw t.name="LexerError",t}n=this._current,this._current+=1,"|"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_OR,value:"||"})):t.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return t}consumeUnquotedIdentifier(e){const t=this._current;for(this._current+=1;this._current<e.length&&((n=e[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return e.slice(t,this._current)}consumeQuotedIdentifier(e){const t=this._current;this._current+=1;const n=e.length;for(;'"'!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&'"'!==e[t+1]?t+=1:t+=2,this._current=t}return this._current+=1,JSON.parse(e.slice(t,this._current))}consumeRawStringLiteral(e){const t=this._current;this._current+=1;const n=e.length;for(;"'"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"'"!==e[t+1]?t+=1:t+=2,this._current=t}this._current+=1;return e.slice(t+1,this._current-1).replace("\\'","'")}consumeNumber(e){const t=this._current;this._current+=1;const n=e.length;for(;i(e[this._current])&&this._current<n;)this._current+=1;return{start:t,value:parseInt(e.slice(t,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(e){const t=this._current;return this._current+=1,"?"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FILTER,value:"[?"}):"]"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FLATTEN,value:"[]"}):{start:t,type:o.TOK_LBRACKET,value:"["}}consumeOperator(e){const t=this._current,n=e[t];return this._current+=1,"!"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_NE,value:"!="}):{start:t,type:o.TOK_NOT,value:"!"}:"<"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_LTE,value:"<="}):{start:t,type:o.TOK_LT,value:"<"}:">"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_GTE,value:">="}):{start:t,type:o.TOK_GT,value:">"}:"="===n&&"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(e){this._current+=1;const t=this._current,n=e.length;for(;"`"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"`"!==e[t+1]?t+=1:t+=2,this._current=t}let r=e.slice(t,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(e){if(""===e)return!1;if('[{"'.includes(e[0]))return!0;if(["true","false","null"].includes(e))return!0;if("-0123456789".includes(e[0]))try{return JSON.parse(e),!0}catch(e){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const d=new class{constructor(){this.index=0,this.tokens=[]}parse(e){this.loadTokens(e),this.index=0;const t=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const e=this.lookaheadToken(0);this.errorToken(e,`Unexpected token type: ${e.type}, value: ${e.value}`)}return t}loadTokens(e){this.tokens=[...l.tokenize(e),{type:o.TOK_EOF,value:"",start:e.length}]}expression(e){const t=this.lookaheadToken(0);this.advance();let n=this.nud(t),r=this.lookahead(0);for(;e<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(e){return this.tokens[this.index+e].type}lookaheadToken(e){return this.tokens[this.index+e]}advance(){this.index+=1}nud(e){let t,n,r;switch(e.type){case o.TOK_LITERAL:return{type:"Literal",value:e.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:e.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:e.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return t={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[t,n]};case o.TOK_FILTER:return this.led(e.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return t={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[t,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(e)}}led(e,t){let n;switch(e){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[t,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[t,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[t,n]};case o.TOK_LPAREN:const i=t.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[t,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[t]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(t,e);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(t,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[t,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(e){if(this.lookahead(0)!==e){const t=this.lookaheadToken(0);this.errorToken(t,`Expected ${e}, got: ${t.type}`)}else this.advance()}errorToken(e,t=""){const n=new Error(t||`Invalid token (${e.type}): "${e.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const e={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),e}projectIfSlice(e,t){const n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const e=[null,null,null];let t=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&t<3;){if(n===o.TOK_COLON)t+=1,this.advance();else if(n===o.TOK_NUMBER)e[t]=this.lookaheadToken(0).value,this.advance();else{const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:e,type:"Slice"}}parseComparator(e,t){return{type:"Comparator",name:t,children:[e,this.expression(c[t])]}}parseDotRHS(e){const t=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(t))return this.expression(e);if(t===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(t===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(e){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(e);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(e);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(e);const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}parseMultiselectList(){const e=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const t=this.expression(0);if(e.push(t),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:e}}parseMultiselectHash(){const e=[],t=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!t.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),e.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:e}}};var p;!function(e){e[e.TYPE_NUMBER=0]="TYPE_NUMBER",e[e.TYPE_ANY=1]="TYPE_ANY",e[e.TYPE_STRING=2]="TYPE_STRING",e[e.TYPE_ARRAY=3]="TYPE_ARRAY",e[e.TYPE_OBJECT=4]="TYPE_OBJECT",e[e.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",e[e.TYPE_EXPREF=6]="TYPE_EXPREF",e[e.TYPE_NULL=7]="TYPE_NULL",e[e.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",e[e.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(p||(p={}));class h{constructor(e){this.TYPE_NAME_TABLE={[p.TYPE_NUMBER]:"number",[p.TYPE_ANY]:"any",[p.TYPE_STRING]:"string",[p.TYPE_ARRAY]:"array",[p.TYPE_OBJECT]:"object",[p.TYPE_BOOLEAN]:"boolean",[p.TYPE_EXPREF]:"expression",[p.TYPE_NULL]:"null",[p.TYPE_ARRAY_NUMBER]:"Array<number>",[p.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([e])=>Math.abs(e),this.functionAvg=([e])=>{let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length},this.functionCeil=([e])=>Math.ceil(e),this.functionContains=e=>{const[t,n]=e;return t.includes(n)},this.functionEndsWith=e=>{const[t,n]=e;return t.includes(n,t.length-n.length)},this.functionFloor=([e])=>Math.floor(e),this.functionJoin=e=>{const[t,n]=e;return n.join(t)},this.functionKeys=([e])=>Object.keys(e),this.functionLength=([e])=>t(e)?Object.keys(e).length:e.length,this.functionMap=e=>{if(!this._interpreter)return[];const t=[],n=this._interpreter,r=e[0],i=e[1];for(let e=0;e<i.length;e+=1)t.push(n.visit(r,i[e]));return t},this.functionMax=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.max(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)n.localeCompare(t[e])<0&&(n=t[e]);return n},this.functionMaxBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=-1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o>a&&(a=o,i=n[e]);return i},this.functionMerge=e=>{let t={};for(let n=0;n<e.length;n+=1){const r=e[n];t=Object.assign(t,r)}return t},this.functionMin=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.min(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)t[e].localeCompare(n)<0&&(n=t[e]);return n},this.functionMinBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o<a&&(a=o,i=n[e]);return i},this.functionNotNull=e=>{for(let t=0;t<e.length;t+=1)if(this.getTypeName(e[t])!==p.TYPE_NULL)return e[t];return null},this.functionReverse=([e])=>{if(this.getTypeName(e)===p.TYPE_STRING){const t=e;let n="";for(let e=t.length-1;e>=0;e-=1)n+=t[e];return n}const t=e.slice(0);return t.reverse(),t},this.functionSort=([e])=>[...e].sort(),this.functionSortBy=e=>{if(!this._interpreter)return[];const t=e[0].slice(0);if(0===t.length)return t;const n=this._interpreter,r=e[1],i=this.getTypeName(n.visit(r,t[0]));if(void 0!==i&&![p.TYPE_NUMBER,p.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let e=0;e<t.length;e+=1)o.push([e,t[e]]);o.sort(((e,t)=>{const o=n.visit(r,e[1]),a=n.visit(r,t[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:e[0]-t[0]}));for(let e=0;e<o.length;e+=1)t[e]=o[e][1];return t},this.functionStartsWith=([e,t])=>e.startsWith(t),this.functionSum=([e])=>e.reduce(((e,t)=>e+t),0),this.functionToArray=([e])=>this.getTypeName(e)===p.TYPE_ARRAY?e:[e],this.functionToNumber=([e])=>{const t=this.getTypeName(e);let n;return t===p.TYPE_NUMBER?e:t!==p.TYPE_STRING||(n=+e,isNaN(n))?null:n},this.functionToString=([e])=>this.getTypeName(e)===p.TYPE_STRING?e:JSON.stringify(e),this.functionType=([e])=>{switch(this.getTypeName(e)){case p.TYPE_NUMBER:return"number";case p.TYPE_STRING:return"string";case p.TYPE_ARRAY:return"array";case p.TYPE_OBJECT:return"object";case p.TYPE_BOOLEAN:return"boolean";case p.TYPE_EXPREF:return"expref";case p.TYPE_NULL:return"null";default:return}},this.functionValues=([e])=>Object.values(e),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[p.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[p.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]},{types:[p.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[p.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[p.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY,p.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[p.TYPE_EXPREF]},{types:[p.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[p.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[p.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[p.TYPE_ARRAY_STRING,p.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[p.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[p.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[p.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[p.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[p.TYPE_OBJECT]}]}},this._interpreter=e}registerFunction(e,t,n){if(e in this.functionTable)throw new Error(`Function already defined: ${e}()`);this.functionTable[e]={_func:t.bind(this),_signature:n}}callFunction(e,t){const n=this.functionTable[e];if(void 0===n)throw new Error(`Unknown function: ${e}()`);return this.validateArgs(e,t,n._signature),n._func.call(this,t)}validateInputSignatures(e,t){for(let n=0;n<t.length;n+=1)if("variadic"in t[n]&&n!==t.length-1)throw new Error(`ArgumentError: ${e}() 'variadic' argument ${n+1} must occur last`)}validateArgs(e,t,n){var r,i;let o;this.validateInputSignatures(e,n);const a=n.filter((e=>{var t;return null!==(t=!e.optional)&&void 0!==t&&t})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=t.length<a,l=t.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${e}() takes ${c}${a} argument${o?"s":""} but received ${t.length}`);let d,p,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,d=n[r].types,p=this.getTypeName(t[r]),i=0;i<d.length;i+=1)if(void 0!==p&&this.typeMatches(p,d[i],t[r])){h=!0;break}if(!h&&void 0!==p){const t=d.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ");throw new Error(`TypeError: ${e}() expected argument ${r+1} to be type (${t}) but received type ${this.TYPE_NAME_TABLE[p]} instead.`)}}}typeMatches(e,t,n){if(t===p.TYPE_ANY)return!0;if(t!==p.TYPE_ARRAY_STRING&&t!==p.TYPE_ARRAY_NUMBER&&t!==p.TYPE_ARRAY)return e===t;if(t===p.TYPE_ARRAY)return e===p.TYPE_ARRAY;if(e===p.TYPE_ARRAY){let e;t===p.TYPE_ARRAY_NUMBER?e=p.TYPE_NUMBER:t===p.TYPE_ARRAY_STRING&&(e=p.TYPE_STRING);for(let t=0;t<n.length;t+=1){const r=this.getTypeName(n[t]);if(void 0!==r&&void 0!==e&&!this.typeMatches(r,e,n[t]))return!1}return!0}return!1}getTypeName(e){switch(Object.prototype.toString.call(e)){case"[object String]":return p.TYPE_STRING;case"[object Number]":return p.TYPE_NUMBER;case"[object Array]":return p.TYPE_ARRAY;case"[object Boolean]":return p.TYPE_BOOLEAN;case"[object Null]":return p.TYPE_NULL;case"[object Object]":return e.jmespathType===o.TOK_EXPREF?p.TYPE_EXPREF:p.TYPE_OBJECT;default:return}}createKeyFunction(e,t){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(e,r);if(!t.includes(this.getTypeName(i))){const e=`TypeError: expected one of (${t.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(e)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(e,t){return this._rootValue=t,this.visit(e,t)}visit(e,i){let a,s,u,l,c,d,p,h,f,m,v;switch(e.type){case"Field":return null===i?null:t(i)?(d=i[e.name],void 0===d?null:d):null;case"Subexpression":for(u=this.visit(e.children[0],i),m=1;m<e.children.length;m+=1)if(u=this.visit(e.children[1],u),null===u)return null;return u;case"IndexExpression":return p=this.visit(e.children[0],i),h=this.visit(e.children[1],p),h;case"Index":if(!Array.isArray(i))return null;let g=e.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...e.children],_=this.computeSliceParams(i.length,y),[b,w,S]=_;if(u=[],S>0)for(m=b;m<w;m+=S)u.push(i[m]);else for(m=b;m>w;m+=S)u.push(i[m]);return u;case"Projection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;for(f=[],m=0;m<v.length;m+=1)s=this.visit(e.children[1],v[m]),null!==s&&f.push(s);return f;case"ValueProjection":if(v=this.visit(e.children[0],i),!t(v))return null;f=[];const E=Object.values(v);for(m=0;m<E.length;m+=1)s=this.visit(e.children[1],E[m]),null!==s&&f.push(s);return f;case"FilterProjection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;const x=[],k=[];for(m=0;m<v.length;m+=1)a=this.visit(e.children[2],v[m]),r(a)||x.push(v[m]);for(let t=0;t<x.length;t+=1)s=this.visit(e.children[1],x[t]),null!==s&&k.push(s);return k;case"Comparator":switch(l=this.visit(e.children[0],i),c=this.visit(e.children[1],i),e.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${e.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(e.children[0],i);if(!Array.isArray(T))return null;let C=[];for(m=0;m<T.length;m+=1)s=T[m],Array.isArray(s)?C=[...C,...s]:C.push(s);return C;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],m=0;m<e.children.length;m+=1)f.push(this.visit(e.children[m],i));return f;case"MultiSelectHash":if(null===i)return null;let D;for(f={},m=0;m<e.children.length;m+=1)D=e.children[m],f[D.name]=this.visit(D.value,i);return f;case"OrExpression":return a=this.visit(e.children[0],i),r(a)&&(a=this.visit(e.children[1],i)),a;case"AndExpression":return l=this.visit(e.children[0],i),r(l)?l:this.visit(e.children[1],i);case"NotExpression":return l=this.visit(e.children[0],i),r(l);case"Literal":return e.value;case o.TOK_PIPE:return p=this.visit(e.children[0],i),this.visit(e.children[1],p);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const M=[];for(let t=0;t<e.children.length;t+=1)M.push(this.visit(e.children[t],i));return this.runtime.callFunction(e.name,M);case"ExpressionReference":const A=e.children[0];return A.jmespathType=o.TOK_EXPREF,A;default:throw new Error(`Unknown node type: ${e.type}`)}}computeSliceParams(e,t){let[n,r,i]=t;if(null===i)i=1;else if(0===i){const e=new Error("Invalid slice, step cannot be 0");throw e.name="RuntimeError",e}const o=i<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,i),r=null===r?o?-1:e:this.capSliceRange(e,r,i),[n,r,i]}capSliceRange(e,t,n){let r=t;return r<0?(r+=e,r<0&&(r=n<0?-1:0)):r>=e&&(r=n<0?e-1:e),r}},m=p.TYPE_ANY,v=p.TYPE_ARRAY,g=p.TYPE_ARRAY_NUMBER,y=p.TYPE_ARRAY_STRING,_=p.TYPE_BOOLEAN,b=p.TYPE_EXPREF,w=p.TYPE_NULL,S=p.TYPE_NUMBER,E=p.TYPE_OBJECT,x=p.TYPE_STRING;function k(e){return d.parse(e)}function T(e){return l.tokenize(e)}const C=(e,t,n)=>{f.runtime.registerFunction(e,t,n)};function D(e,t){const n=d.parse(t);return f.search(n,e)}const M=f,A={compile:k,registerFunction:C,search:D,tokenize:T,TreeInterpreter:M,TYPE_ANY:m,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:v,TYPE_BOOLEAN:_,TYPE_EXPREF:b,TYPE_NULL:w,TYPE_NUMBER:S,TYPE_OBJECT:E,TYPE_STRING:x};e.TYPE_ANY=m,e.TYPE_ARRAY=v,e.TYPE_ARRAY_NUMBER=g,e.TYPE_ARRAY_STRING=y,e.TYPE_BOOLEAN=_,e.TYPE_EXPREF=b,e.TYPE_NULL=w,e.TYPE_NUMBER=S,e.TYPE_OBJECT=E,e.TYPE_STRING=x,e.TreeInterpreter=M,e.compile=k,e.default=A,e.jmespath=A,e.registerFunction=C,e.search=D,e.tokenize=T,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],t):t((e=e||self)["angular-imask"]={},e.ng.core,e.ng.forms,e.ng.platformBrowser,e.IMask,e.ng.common)}(this,(function(e,t,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return l})),multi:!0},u=function(e){return e.nativeElement},l=function(){function e(e,n,i){var o;this._elementRef=e,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new t.EventEmitter,this.complete=new t.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(e){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=e:this.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e:this._renderer.setProperty(this.element,"value",e)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},e.prototype.ngOnChanges=function(e){e.elementRef&&!this.imaskElement&&(this.imaskElement=u),e.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},e.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},e.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},e.prototype.beginWrite=function(e){this._writing=!0,this._writingValue=e},e.prototype.endWrite=function(){return this._writing=!1,this._writingValue},e.prototype.writeValue=function(e){e=null==e?"":e,this.maskRef?(this.beginWrite(e),(this.maskValue!==e||"string"!=typeof e&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=e)):this._renderer.setProperty(this.element,"value",e)},e.prototype._onAccept=function(){var e=this.maskValue;this._writing&&e===this.endWrite()||(this.onChange(e),this.accept.emit(e))},e.prototype._onComplete=function(){this.complete.emit(this.maskValue)},e.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this.element,"disabled",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._handleInput=function(e){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)},e.prototype._compositionStart=function(){this._composing=!0},e.prototype._compositionEnd=function(e){this._composing=!1,this._compositionMode&&this._handleInput(e)},e.decorators=[{type:t.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},e.propDecorators={imask:[{type:t.Input}],unmask:[{type:t.Input}],imaskElement:[{type:t.Input}],accept:[{type:t.Output}],complete:[{type:t.Output}]},e}();var c=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},d=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},p=function(){function e(){}return e.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.pipe.apply(void 0,d(e))},e.decorators=[{type:t.Pipe,args:[{name:"imask"}]}],e}(),h=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[l,p],exports:[l,p]}]}],e}();Object.defineProperty(e,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return i.pipe}}),e.IMaskDirective=l,e.IMaskModule=h,e.IMaskPipe=p,e.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(e,"__esModule",{value:!0})})),