@pega/constellationjs 25.1.2-1 → 25.1.2-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constellation-core-react-native.js +1 -1
- package/dist/constellation-core-react-native.js.br +0 -0
- package/dist/constellation-core-react-native.js.gz +0 -0
- package/dist/constellation-core-react-native.js.map +1 -1
- package/dist/constellation-core-web.js +1 -1
- package/dist/constellation-core-web.js.br +0 -0
- package/dist/constellation-core-web.js.gz +0 -0
- package/dist/constellation-core-web.js.map +1 -1
- package/dist/constellation-core.c7de2464.js +2 -0
- package/dist/constellation-core.c7de2464.js.br +0 -0
- package/dist/constellation-core.c7de2464.js.gz +0 -0
- package/dist/constellation-core.c7de2464.js.map +1 -0
- package/dist/constellation-core.json +1 -1
- package/dist/lib_asset.json +1 -1
- package/package.json +1 -1
- package/dist/constellation-core.acedd73b.js +0 -2
- package/dist/constellation-core.acedd73b.js.br +0 -0
- package/dist/constellation-core.acedd73b.js.gz +0 -0
- package/dist/constellation-core.acedd73b.js.map +0 -1
- /package/dist/{constellation-core.acedd73b.js.LICENSE.txt → constellation-core.c7de2464.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var e={631:(e,t,n)=>{var r="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=l||d||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var a=e.length,o=n+(r?1:-1);for(;r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}(e,g,n);var r=n-1,a=e.length;for(;++r<a;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,a=e?e.length:0;++r<a;)if(n(t,e[r]))return!0;return!1}function f(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function g(e){return e!=e}function m(e,t){return e.has(t)}var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=u["__core-js_shared__"],S=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",_=E.toString,b=A.hasOwnProperty,N=A.toString,T=RegExp("^"+_.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=u.Symbol,O=A.propertyIsEnumerable,v=I.splice,D=P?P.isConcatSpreadable:void 0,R=Math.max,$=G(u,"Map"),x=G(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new L;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function U(e,t,n,r){var a,o=-1,s=p,i=!0,c=e.length,l=[],d=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,(a=n,function(e){return a(e)}))),r?(s=h,i=!1):t.length>=200&&(s=m,i=!1,t=new F(t));e:for(;++o<c;){var u=e[o],f=n?n(u):u;if(u=r||0!==u?u:0,i&&f==f){for(var g=d;g--;)if(t[g]===f)continue e;l.push(u)}else s(t,f,r)||l.push(u)}return l}function k(e,t,n,r,a){var o=-1,s=e.length;for(n||(n=W),a||(a=[]);++o<s;){var i=e[o];t>0&&n(i)?t>1?k(i,t-1,n,r,a):f(a,i):r||(a[a.length]=i)}return a}function V(e){if(!Q(e)||(t=e,S&&S in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:c;return n.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return V(n)?n:void 0}function W(e){return Y(e)||function(e){return J(e)&&b.call(e,"callee")&&(!O.call(e,"callee")||N.call(e)==o)}(e)||!!(D&&e&&e[D])}w.prototype.clear=function(){this.__data__=x?x(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:b.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():v.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return j(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new($||M),string:new w}},L.prototype.delete=function(e){return B(this,e).delete(e)},L.prototype.get=function(e){return B(this,e).get(e)},L.prototype.has=function(e){return B(this,e).has(e)},L.prototype.set=function(e,t){return B(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return J(e)?U(e,k(t,1,J,!0)):[]},q=R(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=R(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var a=Array(q+1);++t<q;)a[t]=e[t];return a[q]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(H,this,a)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}(e.length)&&!X(e)}function J(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function X(e){var t=Q(e)?N.call(e):"";return t==s||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},188:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",s="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,d=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=f||g||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",_=E.toString,b=A.hasOwnProperty,N=A.toString,T=RegExp("^"+_.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,O=I.splice,v=k(m,"Map"),D=k(Object,"create"),R=P?P.prototype:void 0,$=R?R.toString:void 0;function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:V(n);for(var r=0,a=t.length;null!=e&&r<a;)e=e[B(t[r++])];return r&&r==a?e:void 0}function j(e){if(!H(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==o||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:h;return n.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function U(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}x.prototype.clear=function(){this.__data__=D?D(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:b.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},w.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return L(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(v||w),string:new x}},M.prototype.delete=function(e){return U(this,e).delete(e)},M.prototype.get=function(e){return U(this,e).get(e)},M.prototype.has=function(e){return U(this,e).has(e)},M.prototype.set=function(e,t){return U(this,e).set(e,t),this};var V=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(G.Cache||M),n}G.Cache=M;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},928:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o=9007199254740991,s="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=y||I||Function("return this")();var A,C=Array.prototype,S=Function.prototype,_=Object.prototype,b=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",T=S.toString,P=_.hasOwnProperty,O=_.toString,v=RegExp("^"+T.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=E.Symbol,R=_.propertyIsEnumerable,$=C.splice,x=W(E,"Map"),w=W(Object,"create"),M=D?D.prototype:void 0,L=M?M.toString:void 0;function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function V(e,t){return null!=e&&P.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:g;return n.test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return u.test(e)||!d.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var a,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(a=null!=e&&n(e,l)))break;e=e[l]}return a||!!(c=e?e.length:0)&&X(c)&&function(e,t){return t=null==t?o:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&X(e.length)&&!J(e)}(e)}(e)&&P.call(e,"callee")&&(!R.call(e,"callee")||O.call(e)==s)}(e))}F.prototype.clear=function(){this.__data__=w?w(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:P.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():$.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new F,map:new(x||j),string:new F}},U.prototype.delete=function(e){return G(this,e).delete(e)},U.prototype.get=function(e){return G(this,e).get(e)},U.prototype.has=function(e){return G(this,e).has(e)},U.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,a){n.push(r?a.replace(f,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(Y.Cache||U),n}Y.Cache=U;var K=Array.isArray;function J(e){var t=Q(e)?O.call(e):"";return t==i||t==c}function X(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&O.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,V)}},529:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",d="[object WeakMap]",u="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,g=h||f||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,I=y&&y.exports===m;var E,A,C,S=Function.prototype,_=Object.prototype,b=g["__core-js_shared__"],N=(E=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",T=S.toString,P=_.hasOwnProperty,O=_.toString,v=RegExp("^"+T.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=I?g.Buffer:void 0,R=_.propertyIsEnumerable,$=D?D.isBuffer:void 0,x=(A=Object.keys,C=Object,function(e){return A(C(e))}),w=q(g,"DataView"),M=q(g,"Map"),L=q(g,"Promise"),F=q(g,"Set"),j=q(g,"WeakMap"),U=!R.call({valueOf:1},"valueOf"),k=Y(w),V=Y(M),B=Y(L),G=Y(F),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return O.call(e)};function Y(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&X(e)}(e)&&P.call(e,"callee")&&(!R.call(e,"callee")||O.call(e)==a)}(w&&z(new w(new ArrayBuffer(1)))!=u||M&&z(new M)!=i||L&&z(L.resolve())!=c||F&&z(new F)!=l||j&&z(new j)!=d)&&(z=function(e){var t=O.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return u;case V:return i;case B:return c;case G:return l;case W:return d}return t});var J=Array.isArray;function X(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=$||function(){return!1};function Z(e){var t=ee(e)?O.call(e):"";return t==o||t==s}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(X(e)&&(J(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(U||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_)}(e))return!x(e).length;for(var n in e)if(P.call(e,n))return!1;return!0}},216:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",d="[object Boolean]",u="[object Date]",p="[object Error]",h="[object Function]",f="[object GeneratorFunction]",g="[object Map]",m="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",C="[object RegExp]",S="[object Set]",_="[object String]",b="[object Symbol]",N="[object Undefined]",T="[object WeakMap]",P="[object ArrayBuffer]",O="[object DataView]",v=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[i]=R[c]=R[P]=R[d]=R[O]=R[u]=R[p]=R[h]=R[g]=R[m]=R[I]=R[C]=R[S]=R[_]=R[T]=!1;var $="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,x="object"==typeof self&&self&&self.Object===Object&&self,w=$||x||Function("return this")(),M=t&&!t.nodeType&&t,L=M&&e&&!e.nodeType&&e,F=L&&L.exports===M,j=F&&$.process,U=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=U&&U.isTypedArray;function V(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,J=w["__core-js_shared__"],X=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?w.Buffer:void 0,re=w.Symbol,ae=w.Uint8Array,oe=K.propertyIsEnumerable,se=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,de=(H=Object.keys,q=Object,function(e){return H(q(e))}),ue=Ue(w,"DataView"),pe=Ue(w,"Map"),he=Ue(w,"Promise"),fe=Ue(w,"Set"),ge=Ue(w,"WeakMap"),me=Ue(Object,"create"),ye=Ge(ue),Ie=Ge(pe),Ee=Ge(he),Ae=Ge(fe),Ce=Ge(ge),Se=re?re.prototype:void 0,_e=Se?Se.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function Oe(e){var t=this.__data__=new Ne(e);this.size=t.size}function ve(e,t){var n=qe(e),r=!n&&He(e),a=!n&&!r&&ze(e),o=!n&&!r&&!a&&Qe(e),s=n||r||a||o,i=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||s&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function De(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Re(e){return null==e?void 0===e?N:y:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var a=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return a}(e):function(e){return ee.call(e)}(e)}function $e(e){return Xe(e)&&Re(e)==i}function xe(e,t,n,r,s){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,r,s,l){var h=qe(e),f=qe(t),y=h?c:Ve(e),E=f?c:Ve(t),A=(y=y==i?I:y)==I,N=(E=E==i?I:E)==I,T=y==E;if(T&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(T&&!A)return l||(l=new Oe),h||Qe(e)?Le(e,t,n,r,s,l):function(e,t,n,r,s,i,c){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new ae(e),new ae(t)));case d:case u:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case C:case _:return e==t+"";case g:var l=B;case S:var h=r&a;if(l||(l=G),e.size!=t.size&&!h)return!1;var f=c.get(e);if(f)return f==t;r|=o,c.set(e,t);var y=Le(l(e),l(t),r,s,i,c);return c.delete(e),y;case b:if(_e)return _e.call(e)==_e.call(t)}return!1}(e,t,y,n,r,s,l);if(!(n&a)){var v=A&&Q.call(e,"__wrapped__"),D=N&&Q.call(t,"__wrapped__");if(v||D){var R=v?e.value():e,$=D?t.value():t;return l||(l=new Oe),s(R,$,n,r,l)}}if(!T)return!1;return l||(l=new Oe),function(e,t,n,r,o,s){var i=n&a,c=Fe(e),l=c.length,d=Fe(t),u=d.length;if(l!=u&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var f=s.get(e);if(f&&s.get(t))return f==t;var g=!0;s.set(e,t),s.set(t,e);var m=i;for(;++p<l;){var y=e[h=c[p]],I=t[h];if(r)var E=i?r(I,y,h,t,e,s):r(y,I,h,e,t,s);if(!(void 0===E?y===I||o(y,I,n,r,s):E)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var A=e.constructor,C=t.constructor;A==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,s,l)}(e,t,n,r,xe,s))}function we(e){return!(!Je(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:v).test(Ge(e))}function Me(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return de(e);var t,n,r,a=[];for(var o in Object(e))Q.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Le(e,t,n,r,s,i){var c=n&a,l=e.length,d=t.length;if(l!=d&&!(c&&d>l))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,h=!0,f=n&o?new Pe:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var g=e[p],m=t[p];if(r)var y=c?r(m,g,p,t,e,i):r(g,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(f){if(!V(t,(function(e,t){if(a=t,!f.has(a)&&(g===e||s(g,e,n,r,i)))return f.push(t);var a}))){h=!1;break}}else if(g!==m&&!s(g,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ze,ke)}function je(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return we(n)?n:void 0}be.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return De(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(pe||Ne),string:new be}},Te.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return je(this,e).get(e)},Te.prototype.has=function(e){return je(this,e).has(e)},Te.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,r),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Ne,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[a++]=s)}return o}(ce(e),(function(t){return oe.call(e,t)})))}:function(){return[]},Ve=Re;function Be(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||D.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(ue&&Ve(new ue(new ArrayBuffer(1)))!=O||pe&&Ve(new pe)!=g||he&&Ve(he.resolve())!=E||fe&&Ve(new fe)!=S||ge&&Ve(new ge)!=T)&&(Ve=function(e){var t=Re(e),n=t==I?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case ye:return O;case Ie:return g;case Ee:return E;case Ae:return S;case Ce:return T}return t});var He=$e(function(){return arguments}())?$e:function(e){return Xe(e)&&Q.call(e,"callee")&&!oe.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Je(e))return!1;var t=Re(e);return t==h||t==f||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function Je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Xe(e)&&Ke(e.length)&&!!R[Re(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?ve(e):Me(e);var t}e.exports=function(e,t){return xe(e,t)}},692:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",d="[object Object]",u="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[i]=g["[object Map]"]=g["[object Number]"]=g[d]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,C=A&&A.exports===E,S=C&&m.process,_=function(){try{var e=A&&A.require&&A.require("util").types;return e||S&&S.binding&&S.binding("util")}catch(e){}}(),b=_&&_.isTypedArray;var N,T,P,O=Array.prototype,v=Function.prototype,D=Object.prototype,R=I["__core-js_shared__"],$=v.toString,x=D.hasOwnProperty,w=(N=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",M=D.toString,L=$.call(Object),F=RegExp("^"+$.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=C?I.Buffer:void 0,U=I.Symbol,k=I.Uint8Array,V=j?j.allocUnsafe:void 0,B=(T=Object.getPrototypeOf,P=Object,function(e){return T(P(e))}),G=Object.create,W=D.propertyIsEnumerable,H=O.splice,q=U?U.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,J=Date.now,X=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!Re(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function ae(e,t){var n=Te(e),r=!n&&Ne(e),a=!n&&!r&&Oe(e),o=!n&&!r&&!a&&xe(e),s=n||r||a||o,i=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!x.call(e,l)||s&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function oe(e,t,n){(void 0!==n&&!be(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function se(e,t,n){var r=e[t];x.call(e,t)&&be(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return x.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:x.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(X||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,de=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),s=o.length;s--;){var i=o[le?s:++r];if(!1===t(a[i],i,a))break}return e};function ue(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=x.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var a=M.call(e);r&&(t?e[q]=n:delete e[q]);return a}(e):function(e){return M.call(e)}(e)}function pe(e){return $e(e)&&ue(e)==o}function he(e){return!(!Re(e)||function(e){return!!w&&w in e}(e))&&(ve(e)?F:h).test(function(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function fe(e){if(!Re(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ce(e),n=[];for(var r in e)("constructor"!=r||!t&&x.call(e,r))&&n.push(r);return n}function ge(e,t,n,r,a){e!==t&&de(t,(function(o,s){if(a||(a=new re),Re(o))!function(e,t,n,r,a,o,s){var i=Se(e,n),c=Se(t,n),l=s.get(c);if(l)return void oe(e,n,l);var u=o?o(i,c,n+"",e,t,s):void 0,p=void 0===u;if(p){var h=Te(c),f=!h&&Oe(c),g=!h&&!f&&xe(c);u=c,h||f||g?Te(i)?u=i:$e(A=i)&&Pe(A)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):f?(p=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=V?V(n):new e.constructor(n);return e.copy(r),r}(c,!0)):g?(p=!1,m=c,y=!0?(I=m.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):m.buffer,u=new m.constructor(y,m.byteOffset,m.length)):u=[]:function(e){if(!$e(e)||ue(e)!=d)return!1;var t=B(e);if(null===t)return!0;var n=x.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$.call(n)==L}(c)||Ne(c)?(u=i,Ne(i)?u=function(e){return function(e,t,n,r){var a=!n;n||(n={});var o=-1,s=t.length;for(;++o<s;){var i=t[o],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),a?ce(n,i,c):se(n,i,c)}return n}(e,we(e))}(i):Re(i)&&!ve(i)||(u=function(e){return"function"!=typeof e.constructor||Ce(e)?{}:Z(B(e))}(c))):p=!1}var m,y,I,E;var A;p&&(s.set(c,u),a(u,c,r,o,s),s.delete(c));oe(e,n,u)}(e,t,s,n,ge,r,a);else{var i=r?r(Se(e,s),o,s+"",e,t,a):void 0;void 0===i&&(i=o),oe(e,s,i)}}),we)}function me(e,t){return _e(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=K(r.length-t,0),s=Array(o);++a<o;)s[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,t,Fe),e+"")}var ye=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&f.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||D)}function Se(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _e=function(e){var t=0,n=0;return function(){var r=J(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ye);function be(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return $e(e)&&x.call(e,"callee")&&!W.call(e,"callee")},Te=Array.isArray;function Pe(e){return null!=e&&De(e.length)&&!ve(e)}var Oe=Y||function(){return!1};function ve(e){if(!Re(e))return!1;var t=ue(e);return t==i||t==c||t==s||t==u}function De(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $e(e){return null!=e&&"object"==typeof e}var xe=b?function(e){return function(t){return e(t)}}(b):function(e){return $e(e)&&De(e.length)&&!!g[ue(e)]};function we(e){return Pe(e)?ae(e,!0):fe(e)}var Me,Le=(Me=function(e,t,n,r){ge(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(a=Me.length>3&&"function"==typeof a?(r--,a):void 0,o&&function(e,t,n){if(!Re(n))return!1;var r=typeof t;return!!("number"==r?Pe(n)&&Ae(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],o)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var s=t[n];s&&Me(e,s,n,a)}return e})));function Fe(e){return e}e.exports=Le},835:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o=9007199254740991,s="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,u=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")();var E,A=Array.prototype,C=Function.prototype,S=Object.prototype,_=I["__core-js_shared__"],b=(E=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=C.toString,T=S.hasOwnProperty,P=S.toString,O=RegExp("^"+N.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=I.Symbol,D=A.splice,R=G(I,"Map"),$=G(Object,"create"),x=v?v.prototype:void 0,w=x?x.toString:void 0;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];T.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function U(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!J(e)||(t=e,b&&b in t))return!1;var t,n=function(e){var t=J(e)?P.call(e):"";return t==s||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:f;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t,n,r){if(!J(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||X(e))return!0;return d.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var a=-1,o=t.length,s=o-1,i=e;null!=i&&++a<o;){var c=q(t[a]),u=n;if(a!=s){var p=i[c];void 0===(u=r?r(p,c,i):void 0)&&(u=J(p)?p:W(t[a+1])?[]:{})}j(i,c,u),i=i[c]}return e}function B(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||g.test(e))&&e>-1&&e%1==0&&e<t}M.prototype.clear=function(){this.__data__=$?$(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return U(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new(R||L),string:new M}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(X(e))return w?w.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(p,(function(e,t,r,a){n.push(r?a.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||X(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(z.Cache||F),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=F;var K=Array.isArray;function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function X(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&P.call(e)==c}e.exports=function(e,t,n){return null==e?e:V(e,t,n)}},521:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",s="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,d=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=f||g||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",_=E.toString,b=A.hasOwnProperty,N=A.toString,T=RegExp("^"+_.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,O=I.splice,v=V(m,"Map"),D=V(Object,"create"),R=P?P.prototype:void 0,$=R?R.toString:void 0;function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function F(e){if(!z(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==o||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:h;return n.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:U(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o}(t,0,-1))}(e,t=B(t,e)?[t]:U(t));var n,r,a=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&b.call(e,a))||delete e[a]}function U(e){return q(e)?e:G(e)}function k(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}x.prototype.clear=function(){this.__data__=D?D(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:b.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},w.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return L(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(v||w),string:new x}},M.prototype.delete=function(e){return k(this,e).delete(e)},M.prototype.get=function(e){return k(this,e).get(e)},M.prototype.has=function(e){return k(this,e).has(e)},M.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(H.Cache||M),n}H.Cache=M;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},953:e=>{class t{constructor(e,t,n,r,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let o=this.gen_table();this.table=o,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=o[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:o}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&o}}else{t=this.shifted_xor_in;for(let s=0;s<e.length;s++)t=n[255&(t>>r-8+a^e[s])]<<a^t<<8-a&o<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,a=1<<n,o="";for(let s=0;s<r;s++){let r="";for(let o=0;o<a;o++){let a=e[s<<n|o];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}o+=" "+r+"\n"}return o="[\n"+o.slice(0,-3)+"\n]",o}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class o{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class s extends o{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends o{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new s;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const d={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function u(e){}e.exports={CRC:t,crc:function(e,n,r,a,o){let s=new t(e,n,r,a,o);return s.calculate.bind(s)},makeBufferConverter:c,models:d,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in d){let n=d[t];e.exports[t]=n.calculate.bind(n)}},754:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=754,e.exports=t},57:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AsYouType:()=>Ra,AsYouTypeCustom:()=>Da,DIGITS:()=>ee,DIGIT_PLACEHOLDER:()=>Fr,Metadata:()=>Fa,ParseError:()=>A,PhoneNumber:()=>Ba,PhoneNumberMatcher:()=>Dr,PhoneNumberSearch:()=>ho,PhoneNumberSearchCustom:()=>io,default:()=>xt,findNumbers:()=>hr,findPhoneNumbers:()=>uo,findPhoneNumbersCustom:()=>co,findPhoneNumbersInText:()=>_r,format:()=>qa,formatCustom:()=>Ha,formatIncompletePhoneNumber:()=>Va,formatNumber:()=>qa,formatRFC3966:()=>ke,getCountries:()=>wa,getCountryCallingCode:()=>Ma,getCountryCallingCodeCustom:()=>k,getExampleNumber:()=>Ua,getExtPrefix:()=>La,getNumberType:()=>Ka,getNumberTypeCustom:()=>za,getPhoneCode:()=>Ma,getPhoneCodeCustom:()=>k,isPossibleNumber:()=>Xa,isPossiblePhoneNumber:()=>Ht,isSupportedCountry:()=>$a,isValidNumber:()=>Za,isValidNumberCustom:()=>Qa,isValidNumberForRegion:()=>to,isValidPhoneNumber:()=>Ut,parse:()=>Wa,parseCustom:()=>Ga,parseDigits:()=>ne,parseIncompletePhoneNumber:()=>oe,parseNumber:()=>Wa,parsePhoneNumber:()=>Tt,parsePhoneNumberCharacter:()=>se,parsePhoneNumberFromString:()=>xt,parsePhoneNumberWithError:()=>Tt,parseRFC3966:()=>Ue,searchNumbers:()=>yr,searchPhoneNumbers:()=>po,searchPhoneNumbersCustom:()=>lo,searchPhoneNumbersInText:()=>vr,validatePhoneNumberLength:()=>Xt});const r={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function a(e,t){var n=Array.prototype.slice.call(t);return n.push(r),e.apply(this,n)}var o=2,s=17,i=3,c="0-90-9٠-٩۰-۹",l=" ",d="".concat("-‐-―−ー-").concat("//").concat("..").concat(l).concat("()()[]\\[\\]").concat("~⁓∼~"),u="++";function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function f(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}function g(e,t,n){return t=E(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&I(a,n.prototype),a}(e,arguments,E(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),I(n,e)},m(e)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var A=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=g(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,r&&h(n.prototype,r),a&&h(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a}(m(Error));function C(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var o=Number(n[a]),s=Number(r[a]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var S={}.constructor;function _(e){return null!=e&&e.constructor===S}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function P(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}var v=" ext. ",D=/^\d+$/,R=function(){return P((function e(t){N(this,e),F(t),this.metadata=t,B.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&D.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new $(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new $(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),$=function(){return P((function e(t,n){N(this,e),this.globalMetadataObject=n,this.metadata=t,B.call(this,n.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new x(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&L(this.types(),e))return new M(L(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?v:this.metadata[13]||v}}])}(),x=function(){return P((function e(t,n){N(this,e),this._format=t,this.metadata=n}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||w.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),w=/^\(?\$1\)?$/,M=function(){return P((function e(t,n){N(this,e),this.type=t,this.metadata=n}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function L(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function F(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!_(e)||!_(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(_(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+j(e)+": "+e,"."))}var j=function(e){return b(e)};function U(e,t){return(t=new R(t)).hasCountry(e)?t.selectNumberingPlan(e).ext():v}function k(e,t){if((t=new R(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function V(e,t){return t.countries.hasOwnProperty(e)}function B(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===C(t,"1.2.0")?this.v2=!0:-1===C(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var G=function(e){return"([".concat(c,"]{1,").concat(e,"})")};function W(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",a="[ \\t]*";return";ext="+G("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+G("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+G("9")+r)+"|"+("[- ]+"+G("6")+"#")+"|"+(a+"(?:,{2}|;)"+n+G("15")+r)+"|"+(a+"(?:,)+"+n+G("9")+r)}var H="["+c+"]{"+o+"}",q="[++]{0,1}(?:["+d+"]*["+c+"]){3,}["+d+c+"]*",z=new RegExp("^[++]{0,1}(?:["+d+"]*["+c+"]){1,2}$","i"),Y=q+"(?:"+W()+")?",K=new RegExp("^"+H+"$|^"+Y+"$","i");function J(e){return e.length>=o&&K.test(e)}var X=new RegExp("(?:"+W()+")$","i");function Q(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ee={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function te(e){return ee[e]}function ne(e){for(var t,n="",r=Q(e.split(""));!(t=r()).done;){var a=te(t.value);a&&(n+=a)}return n}function re(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ae(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e){for(var t,n="",r=re(e.split(""));!(t=r()).done;){n+=se(t.value,n)||""}return n}function se(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":te(e)}function ie(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function le(e,t,n){return de(e,t,void 0,n)}function de(e,t,n,r){t&&(r=new R(r.metadata)).selectNumberingPlan(t);var a=r.type(n),o=a&&a.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===n){if(!r.type("FIXED_LINE"))return de(e,t,"MOBILE",r);var s=r.type("MOBILE");s&&(o=function(e,t){for(var n,r=e.slice(),a=ie(t);!(n=a()).done;){var o=n.value;e.indexOf(o)<0&&r.push(o)}return r.sort((function(e,t){return e-t}))}(o,s.possibleLengths()))}else if(n&&!a)return"INVALID_LENGTH";var i=e.length,c=o[0];return c===i?"IS_POSSIBLE":c>i?"TOO_SHORT":o[o.length-1]<i?"TOO_LONG":o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function ue(e,t,n){if(void 0===t&&(t={}),n=new R(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return pe(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function pe(e,t,n){return"IS_POSSIBLE"===le(e,t,n)}function he(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function fe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ge(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var me=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function ye(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new R(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(he(r,n.nationalNumberPattern())){if(Ie(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Ie(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,o=fe(me);!(a=o()).done;){var s=a.value;if(Ie(r,s,n))return s}}}}function Ie(e,t,n){var r=n.type(t);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&he(e,r.pattern()))}function Ee(e,t,n){return t=t||{},(n=new R(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==ye(e,t,n.metadata):he(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}function Ae(e,t,n){var r=new R(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new R(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)})):[]}var Ce=new RegExp("(["+c+"])");function Se(e,t,n,r){if(t){var a=new R(r);a.selectNumberingPlan(t,n);var o=new RegExp(a.IDDPrefix());if(0===e.search(o)){var s=(e=e.slice(e.match(o)[0].length)).match(Ce);if(!(s&&null!=s[1]&&s[1].length>0&&"0"===s[1]))return e}}}function _e(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,o,s,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(o=r[1]);else{var l=r[0];a=e.slice(l.length),c&&(o=r[1])}if(c){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(s=t.numberingPlan.nationalPrefix())}else s=r[0];return{nationalNumber:a,nationalPrefix:s,carrierCode:o}}}return{nationalNumber:e}}function be(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t){var n=t.countries,r=t.metadata;r=new R(r);for(var a,o=be(n);!(a=o()).done;){var s=a.value;if(r.selectNumberingPlan(s),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return s}else if(ye({phone:e,country:s},void 0,r.metadata))return s}}var Pe=!1;function Oe(e,t){var n=t.nationalNumber,r=t.metadata;if(Pe&&r.isNonGeographicCallingCode(e))return"001";var a=r.getCountryCodesForCallingCode(e);return a?1===a.length?a[0]:Te(n,{countries:a,metadata:r.metadata}):void 0}function ve(e,t,n){var r=_e(e,n),a=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(he(e,n.nationalNumberPattern())&&!he(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Oe(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(le(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:a}}function De(e,t,n,r,a){var o=t||n?k(t||n,a):r;if(0===e.indexOf(o)){(a=new R(a)).selectNumberingPlan(t||n,o);var s=e.slice(o.length),i=ve(s,t,a).nationalNumber,c=ve(e,t,a).nationalNumber;if(!he(c,a.nationalNumberPattern())&&he(i,a.nationalNumberPattern())||"TOO_LONG"===le(c,t,a))return{countryCallingCode:o,number:s}}return{number:e}}function Re(e,t,n,r,a){if(!e)return{};var o;if("+"!==e[0]){var s=Se(e,t||n,r,a);if(!s||s===e){if(t||n||r){var c=De(e,t,n,r,a),l=c.countryCallingCode,d=c.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:d}}return{number:e}}o=!0,e="+"+s}if("0"===e[1])return{};a=new R(a);for(var u=2;u-1<=i&&u<=e.length;){var p=e.slice(1,u);if(a.hasCallingCode(p))return a.selectNumberingPlan(p),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:p,number:e.slice(u)};u++}return{}}function $e(e){return e.replace(new RegExp("[".concat(d,"]+"),"g")," ").trim()}var xe=/(\$\d)/;function we(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,o=(n.carrierCode,n.metadata,e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(xe,t.nationalPrefixFormattingRule()):t.format()));return r?$e(o):o}var Me=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||Fe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){if(e){if("string"==typeof e)return je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ue(e){for(var t,n,r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Fe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}((e=e.replace(/^tel:/,"tel=")).split(";"));!(r=a()).done;){var o=Le(r.value.split("="),2),s=o[0],i=o[1];switch(s){case"tel":t=i;break;case"ext":n=i;break;case"phone-context":"+"===i[0]&&(t=i+t)}}if(!J(t))return{};var c={number:t};return n&&(c.ext=n),c}function ke(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}var Ve={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Be(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var a in n[e])n[0][a]=n[e][a];e++}return n[0]}({},Ve,n):Ve,r=new R(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,o=r.countryCallingCode(),s=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return s?He(a=Ge(s,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return s?(a=Ge(s,null,"INTERNATIONAL",r,n),He(a="+".concat(o," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(s);case"RFC3966":return ke({number:"+".concat(o).concat(s),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){var o=k(r,a.metadata);if(o===n){var s=Ge(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var i=function(e,t,n){var r=new R(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Me.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,a.metadata);if(i)return"".concat(i," ").concat(n," ").concat(Ge(e,null,"INTERNATIONAL",a))}(s,e.carrierCode,o,n.fromCountry,r);if(!i)return;return He(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Ge(e,t,n,r,a){var o=We(r.formats(),e);return o?we(e,o,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function We(e,t){return function(e,t){var n=0;for(;n<e.length;){if(t(e[n]))return e[n];n++}}(e,(function(e){if(e.leadingDigitsPatterns().length>0){var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(n))return!1}return he(t,e.pattern())}))}function He(e,t,n,r){return t?r(e,t,n):e}function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return(t=Xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xe(r.key),r)}}function Xe(e){var t=function(e,t){if("object"!=qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qe(t)?t:t+""}var Qe=function(){return e=function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(_(n)&&_(n.countries)){r=n;var a=t;if(!et.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Re(a,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");F(r);var s=function(e,t){var n,r,a=new R(t);return Ze(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),i=s.country,c=s.countryCallingCode;this.country=i,this.countryCallingCode=c,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},(t=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Ae(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return ue(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Ee(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new R(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return ye(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Be(this,e,t?Ye(Ye({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&Je(e.prototype,t),n&&Je(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),Ze=function(e){return/^[A-Z]{2}$/.test(e)};var et=/^\+\d+$/,tt="+",nt="(["+c+"]|[\\-\\.\\(\\)]?)",rt=new RegExp("^\\"+tt+nt+"*["+c+"]"+nt+"*$","g"),at=new RegExp("^("+("["+c+"]+((\\-)*["+c+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+c+"])*")+"\\.?$","g"),ot="tel:",st=";phone-context=",it=";isub=";function ct(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(st);if(t<0)return null;var n=t+st.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(rt.test(e)||at.test(e))}(a))throw new A("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="",a.charAt(0)===tt&&(n+=a);var o,s=e.indexOf(ot);o=s>=0?s+ot.length:0;var i=e.indexOf(st);n+=e.substring(o,i)}var c=n.indexOf(it);if(c>0&&(n=n.substring(0,c)),""!==n)return n}var lt=250,dt=new RegExp("[++"+c+"]"),ut=new RegExp("[^"+c+"#]+$"),pt=!1;function ht(e,t,n){if(t=t||{},n=new R(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new A("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=ct(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>lt){if(n)throw new A("TOO_LONG");return}if(!1===t)return e;var r=e.search(dt);if(r<0)return;return e.slice(r).replace(ut,"")}(e,n,t)}});if(!r)return{};if(!J(r))return function(e){return z.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(X);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(X),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);if(a.ext)return a;return{number:r}}(e,t.v2,t.extract),a=r.number,i=r.ext,c=r.error;if(!a){if(t.v2){if("TOO_SHORT"===c)throw new A("TOO_SHORT");throw new A("NOT_A_NUMBER")}return{}}var l=function(e,t,n,r){var a,o=Re(oe(e),void 0,t,n,r.metadata),s=o.countryCallingCodeSource,i=o.countryCallingCode,c=o.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),t?a=t:pt&&r.isNonGeographicCallingCode(n)&&(a="001"),i=n||k(t,r.metadata)}if(!c)return{countryCallingCodeSource:s,countryCallingCode:i};var l=ve(oe(c),a,r),d=l.nationalNumber,u=l.carrierCode,p=Oe(i,{nationalNumber:d,metadata:r});p&&(a=p,"001"===p||r.selectNumberingPlan(a));return{country:a,countryCallingCode:i,countryCallingCodeSource:s,nationalNumber:d,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),d=l.country,u=l.nationalNumber,p=l.countryCallingCode,h=l.countryCallingCodeSource,f=l.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new A("INVALID_COUNTRY");return{}}if(!u||u.length<o){if(t.v2)throw new A("TOO_SHORT");return{}}if(u.length>s){if(t.v2)throw new A("TOO_LONG");return{}}if(t.v2){var g=new Qe(p,u,n.metadata);return d&&(g.country=d),f&&(g.carrierCode=f),i&&(g.ext=i),g.__countryCallingCodeSource=h,g}var m=!!(t.extended?n.hasSelectedNumberingPlan():d)&&he(u,n.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:p,carrierCode:f,valid:m,possible:!!m||!(!0!==t.extended||!n.possibleLengths()||!pe(u,d,n)),phone:u,ext:i}:m?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(d,u,i):{}}function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ft(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function It(e,t,n){return ht(e,mt(mt({},t),{},{v2:!0}),n)}function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ct(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Et(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _t(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bt(e){var t,n,r,a=St(Array.prototype.slice.call(e),4),o=a[0],s=a[1],i=a[2],c=a[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,s&&"string"!=typeof s){if(!_(s))throw new Error("Invalid second argument: ".concat(s));i?(n=s,r=i):r=s}else c?(n=i,r=c):(n=void 0,r=i),s&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach((function(t){Ct(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:s},n));return{text:t,options:n,metadata:r}}function Nt(){var e=bt(arguments);return It(e.text,e.options,e.metadata)}function Tt(){return a(Nt,arguments)}function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){Dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e,t,n){t&&t.defaultCountry&&!V(t.defaultCountry,n)&&(t=vt(vt({},t),{},{defaultCountry:void 0}));try{return It(e,t,n)}catch(e){if(!(e instanceof A))throw e}}function $t(){var e=bt(arguments);return Rt(e.text,e.options,e.metadata)}function xt(){return a($t,arguments)}function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=Rt(t,n=Lt(Lt({},n),{},{extract:!1}),r);return a&&a.isValid()||!1}function Ut(){return a(jt,arguments)}function kt(e){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(e)}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){Gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=Rt(t,n=Bt(Bt({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}function Ht(){return a(Wt,arguments)}function qt(e){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(e)}function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata;n=Yt(Yt({},n),{},{extract:!1});try{var a=It(t,n,r);(r=new R(r)).selectNumberingPlan(a.countryCallingCode);var o=le(a.nationalNumber,a.country,r);if("IS_POSSIBLE"!==o)return o}catch(e){if(e instanceof A)return e.message;throw e}}function Xt(){return a(Jt,arguments)}function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function Zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tn(r.key),r)}}function en(e,t,n){return t&&Zt(e.prototype,t),n&&Zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tn(e){var t=function(e,t){if("object"!=Qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qt(t)?t:t+""}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var rn=en((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;nn(this,e),this.key=t,this.value=n,this.next=r,this.prev=a})),an=function(){return en((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;nn(this,e),this.size=0,this.limit=t,this.head=null,this.tail=null,this.cache={}}),[{key:"put",value:function(e,t){if(this.ensureLimit(),this.head){var n=new rn(e,t,this.head);this.head.prev=n,this.head=n}else this.head=this.tail=new rn(e,t);this.cache[e]=this.head,this.size++}},{key:"get",value:function(e){if(this.cache[e]){var t=this.cache[e].value;return this.remove(e),this.put(e,t),t}console.log("Item not available in cache for key ".concat(e))}},{key:"ensureLimit",value:function(){this.size===this.limit&&this.remove(this.tail.key)}},{key:"remove",value:function(e){var t=this.cache[e];null!==t.prev?t.prev.next=t.next:this.head=t.next,null!==t.next?t.next.prev=t.prev:this.tail=t.prev,delete this.cache[e],this.size--}},{key:"clear",value:function(){this.head=null,this.tail=null,this.size=0,this.cache={}}}])}();function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}function sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cn(r.key),r)}}function cn(e){var t=function(e,t){if("object"!=on(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=on(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==on(t)?t:t+""}var ln=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cache=new an(t)},(t=[{key:"getPatternForRegExp",value:function(e){var t=this.cache.get(e);return t||(t=new RegExp("^"+e),this.cache.put(e,t)),t}}])&&sn(e.prototype,t),n&&sn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function dn(e,t){if(e<0||t<=0||t<e)throw new TypeError;return"{".concat(e,",").concat(t,"}")}function un(e,t){var n=t.search(e);return n>=0?t.slice(0,n):t}var pn=" - \u2028\u2029 ",hn="[".concat(pn,"]"),fn="[^".concat(pn,"]"),gn="[".concat("0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9","]"),mn="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",yn="[".concat(mn,"]"),In=new RegExp(yn),En="[".concat("$¢-¥֏؋৲৳৻૱௹฿៛₠-₹꠸﷼﹩$¢£¥₩","]"),An=new RegExp(En),Cn="[".concat("̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ࣾऀ-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣଁ଼ିୁ-ୄ୍ୖୢୣஂீ்ా-ీె-ైొ-్ౕౖౢౣ಼ಿೆೌ್ೢೣു-ൄ്ൢൣ්ි-ුූัิ-ฺ็-๎ັິ-ູົຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᯦᮫ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᷀-ᷦ᷼-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꨩ-ꨮꨱꨲꨵꨶꩃꩌꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︦","]"),Sn=new RegExp(Cn),_n=new RegExp("[\0--ÿĀ-ſḀ-ỿƀ-ɏ̀-ͯ]");function bn(e){return!(!In.test(e)&&!Sn.test(e))&&_n.test(e)}function Nn(e){return"%"===e||An.test(e)}function Tn(e,t,n){var r=!0,a=$t(e,n);if(a||(r=!1,a=$t(e,{defaultCallingCode:t.countryCallingCode},n)),!a)return"INVALID_NUMBER";if(t.ext){if(a.ext!==t.ext)return"NO_MATCH"}else if(a.ext)return"NO_MATCH";return r&&t.countryCallingCode!==a.countryCallingCode?"NO_MATCH":t.number===a.number?r?"EXACT_MATCH":"NSN_MATCH":0===t.nationalNumber.indexOf(a.nationalNumber)||0===a.nationalNumber.indexOf(t.nationalNumber)?"SHORT_NSN_MATCH":"NO_MATCH"}const Pn={POSSIBLE:function(e,t){t.candidate,t.metadata;return!0},VALID:function(e,t){var n=t.candidate,r=(t.defaultCountry,t.metadata);return!(!e.isValid()||!On(e,n,r))},STRICT_GROUPING:function(e,t){var n=t.candidate,r=t.defaultCountry,a=t.metadata,o=t.regExpCache;return!(!e.isValid()||!On(e,n,a)||Dn(e,n)||!vn(e,{defaultCountry:r,metadata:a}))&&Rn(e,n,a,xn,o)},EXACT_GROUPING:function(e,t){var n=t.candidate,r=t.defaultCountry,a=t.metadata,o=t.regExpCache;return!(!e.isValid()||!On(e,n,a)||Dn(e,n)||!vn(e,{defaultCountry:r,metadata:a}))&&Rn(e,n,a,$n,o)}};function On(e,t,n){for(var r=0;r<t.length-1;r++){var a=t.charAt(r);if("x"===a||"X"===a){var o=t.charAt(r+1);if("x"===o||"X"===o){if(r++,"NSN_MATCH"!==Tn(t.substring(r),e,n))return!1}else{var s=ne(t.substring(r));if(s){if(e.ext!==s)return!1}else if(e.ext)return!1}}}return!0}function vn(e,t){t.defaultCountry;var n=t.metadata;if("FROM_DEFAULT_COUNTRY"!==e.__countryCallingCodeSource)return!0;var r=new R(n);r.selectNumberingPlan(e.countryCallingCode);e.country||Oe(e.countryCallingCode,{nationalNumber:e.nationalNumber,metadata:r});var a=e.nationalNumber,o=We(r.numberingPlan.formats(),a);return!o.nationalPrefixFormattingRule()||(!!r.numberingPlan.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||(!o.usesNationalPrefix()||Boolean(e.nationalPrefix)))}function Dn(e,t){var n=t.indexOf("/");if(n<0)return!1;var r=t.indexOf("/",n+1);return!(r<0)&&(!("FROM_NUMBER_WITH_PLUS_SIGN"===e.__countryCallingCodeSource||"FROM_NUMBER_WITHOUT_PLUS_SIGN"===e.__countryCallingCodeSource)||ne(t.substring(0,n))!==e.countryCallingCode||t.slice(r+1).indexOf("/")>=0)}function Rn(e,t,n,r,a){throw new Error("This part of code hasn't been ported")}function $n(e,t,n,r){throw new Error("This part of code hasn't been ported")}function xn(e,t,n,r){throw new Error("This part of code hasn't been ported")}var wn=/[\\/] *x/;function Mn(e){return un(wn,e)}var Ln=/(?:(?:[0-3]?\d\/[01]?\d)|(?:[01]?\d\/[0-3]?\d))\/(?:[12]\d)?\d{2}/,Fn=/[12]\d{3}[-/]?[01]\d[-/]?[0-3]\d +[0-2]\d$/,jn=/^:[0-5]\d/;function Un(e,t,n){if(Ln.test(e))return!1;if(Fn.test(e)){var r=n.slice(t+e.length);if(jn.test(r))return!1}return!0}var kn="(\\[([",Vn=")\\])]",Bn="[^".concat(kn).concat(Vn,"]"),Gn="[".concat(kn).concat(u,"]"),Wn=new RegExp("^"+Gn),Hn=dn(0,3),qn=new RegExp("^(?:[(\\[([])?(?:"+Bn+"+["+Vn+"])?"+Bn+"+(?:["+kn+"]"+Bn+"+["+Vn+"])"+Hn+Bn+"*$"),zn=/\d{1,5}-+\d{1,5}\s{0,4}\(\d{1,4}/;function Yn(e,t,n,r){if(qn.test(e)&&!zn.test(e)){if("POSSIBLE"!==r){if(t>0&&!Wn.test(e)){var a=n[t-1];if(Nn(a)||bn(a))return!1}var o=t+e.length;if(o<n.length){var s=n[o];if(Nn(s)||bn(s))return!1}}return!0}}function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function Jn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zn(r.key),r)}}function Zn(e){var t=function(e,t){if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kn(t)?t:t+""}var er=W(),tr=["/+(.*)","(\\([^(]*)","(?:".concat(hn,"-|-").concat(hn,")").concat(hn,"*(.+)"),"[‒-―-]".concat(hn,"*(.+)"),"\\.+".concat(hn,"*([^.]+)"),"".concat(hn,"+(").concat(fn,"+)")],nr=dn(0,2),rr=dn(0,4),ar=s+i,or=dn(0,ar),sr="[".concat(d,"]")+rr,ir=gn+dn(1,ar),cr="(?:"+Gn+sr+")"+nr+ir+"(?:"+sr+ir+")"+or+"(?:"+er+")?",lr=new RegExp("[^".concat("0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൦-൵๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9").concat(mn,"#]+$")),dr=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ur=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n={v2:n.v2,defaultCallingCode:n.defaultCallingCode,defaultCountry:n.defaultCountry&&V(n.defaultCountry,r)?n.defaultCountry:void 0,leniency:n.leniency||(n.extended?"POSSIBLE":"VALID"),maxTries:n.maxTries||dr},!Pn[n.leniency])throw new TypeError('Unknown leniency: "'.concat(n.leniency,'"'));if("POSSIBLE"!==n.leniency&&"VALID"!==n.leniency)throw new TypeError('Invalid `leniency`: "'.concat(n.leniency,'". Supported values: "POSSIBLE", "VALID".'));if(n.maxTries<0)throw new TypeError("`maxTries` must be `>= 0`");this.text=t,this.options=n,this.metadata=r,this.leniency=Pn[n.leniency],this.maxTries=n.maxTries,this.PATTERN=new RegExp(cr,"ig"),this.INNER_MATCHES=tr.map((function(e){return new RegExp(e,"g")})),this.state="NOT_READY",this.searchIndex=0,this.regExpCache=new ln(32)},t=[{key:"find",value:function(e){var t;for(this.PATTERN.lastIndex=e;this.maxTries>0&&null!==(t=this.PATTERN.exec(this.text));){var n=t[0],r=t.index;if(Un(n=Mn(n),r,this.text)){var a=this.parseAndVerify(n,r,this.text)||this.extractInnerMatch(n,r,this.text);if(a){if(this.options.v2)return{startsAt:a.startsAt,endsAt:a.endsAt,number:a.phoneNumber};var o=a.phoneNumber,s={startsAt:a.startsAt,endsAt:a.endsAt,phone:o.nationalNumber};return o.country?s.country=o.country:s.countryCallingCode=o.countryCallingCode,o.ext&&(s.ext=o.ext),s}}this.maxTries--}}},{key:"extractInnerMatch",value:function(e,t,n){for(var r,a=Jn(this.INNER_MATCHES);!(r=a()).done;){var o=r.value;o.lastIndex=0;for(var s=!0,i=void 0;this.maxTries>0&&null!==(i=o.exec(e));){if(s){var c=un(lr,e.slice(0,i.index)),l=this.parseAndVerify(c,t,n);if(l)return l;this.maxTries--,s=!1}var d=un(lr,i[1]),u=e.indexOf(d,i.index),p=this.parseAndVerify(d,t+u,n);if(p)return p;this.maxTries--}}}},{key:"parseAndVerify",value:function(e,t,n){if(Yn(e,t,n,this.options.leniency)){var r=$t(e,{extended:!0,defaultCountry:this.options.defaultCountry,defaultCallingCode:this.options.defaultCallingCode},this.metadata);if(r&&r.isPossible())return this.leniency(r,{candidate:e,defaultCountry:this.options.defaultCountry,metadata:this.metadata,regExpCache:this.regExpCache})?{startsAt:t,endsAt:t+e.length,phoneNumber:r}:void 0}}},{key:"hasNext",value:function(){return"NOT_READY"===this.state&&(this.lastMatch=this.find(this.searchIndex),this.lastMatch?(this.searchIndex=this.lastMatch.endsAt,this.state="READY"):this.state="DONE"),"READY"===this.state}},{key:"next",value:function(){if(!this.hasNext())throw new Error("No next element");var e=this.lastMatch;return this.lastMatch=null,this.state="NOT_READY",e}}],t&&Qn(e.prototype,t),n&&Qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function pr(){for(var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,n,r),o=[];a.hasNext();)o.push(a.next());return o}function hr(){return a(pr,arguments)}function fr(e){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(e)}function gr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=fr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mr(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,n,r);return gr({},Symbol.iterator,(function(){return{next:function(){return a.hasNext()?{done:!1,value:a.next()}:{done:!0}}}}))}function yr(){return a(mr,arguments)}function Ir(e){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(e)}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){Cr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Ir(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ir(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sr(){for(var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,Ar(Ar({},n),{},{v2:!0}),r),o=[];a.hasNext();)o.push(a.next());return o}function _r(){return a(Sr,arguments)}function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nr(Object(n),!0).forEach((function(t){Pr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=br(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==br(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,Tr(Tr({},n),{},{v2:!0}),r);return Pr({},Symbol.iterator,(function(){return{next:function(){return a.hasNext()?{done:!1,value:a.next()}:{done:!0}}}}))}function vr(){return a(Or,arguments)}function Dr(e,t){return ur.call(this,e,t,r)}function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function $r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xr(r.key),r)}}function xr(e){var t=function(e,t){if("object"!=Rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rr(t)?t:t+""}Dr.prototype=Object.create(ur.prototype,{}),Dr.prototype.constructor=Dr;var wr=function(){return e=function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onCountryChange=n,this.onCallingCodeChange=r},(t=[{key:"reset",value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:"startInternationalNumber",value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])&&$r(e.prototype,t),n&&$r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Mr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Lr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Fr="x",jr=new RegExp(Fr);function Ur(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function kr(e,t){return")"===e[t]&&t++,function(e){var t=[],n=0;for(;n<e.length;)"("===e[n]?t.push(n):")"===e[n]&&t.pop(),n++;var r=0,a="";t.push(e.length);for(var o=0,s=t;o<s.length;o++){var i=s[o];a+=e.slice(r,i),r=i+1}return a}(e.slice(0,t))}function Vr(e,t,n){var r=n.metadata,a=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,n){var r=n.metadata,a=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode;if(a(t)){var s=Br(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:r});if(s)return s}return Br(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:r})}(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:o})}function Br(e,t,n){var r=n.metadata,a=n.useNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix,s=we(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:a,metadata:r});if(a||(e.nationalPrefix?s=e.nationalPrefix+o(t)+s:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(s=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+s)),function(e,t){return ne(e)===t.getNationalDigits()}(s,e))return s}function Gr(e){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gr(e)}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hr(r.key),r)}}function Hr(e){var t=function(e,t){if("object"!=Gr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gr(t)?t:t+""}var qr=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:"|",args:n.concat([Jr(r)])};if(0===r.length)throw new Error("Pattern is required");return 1===r.length?r[0]:r}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(Kr);if(t){var n=t[1],r=e.slice(0,t.index),a=e.slice(t.index+n.length);switch(n){case"(?:":r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(r&&this.parsePattern(r),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var o=this.getContext().branches;o.push(Jr(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:o});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(r&&this.parsePattern(r),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(Jr(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:zr(r)});break;default:throw new Error("Unknown operator: ".concat(n))}a&&this.parsePattern(a)}else{if(Yr.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}])&&Wr(e.prototype,t),n&&Wr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function zr(e){for(var t=[],n=0;n<e.length;){if("-"===e[n]){if(0===n||n===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,a=e[n+1].charCodeAt(0)-1,o=r;o<=a;)t.push(String.fromCharCode(o)),o++}else t.push(e[n]);n++}return t}var Yr=/[\(\)\[\]\?\:\|]/,Kr=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function Jr(e){return 1===e.length?e[0]:e}function Xr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function ea(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ta(r.key),r)}}function ta(e){var t=function(e,t){if("object"!=Zr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zr(t)?t:t+""}var na=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matchTree=(new qr).parse(t)},t=[{key:"match",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!e)throw new Error("String is required");var n=ra(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||t)return n}}],t&&ea(e.prototype,t),n&&ea(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function ra(e,t,n){if("string"==typeof t){var r=e.join("");return 0===t.indexOf(r)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===r.indexOf(t)?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var a=e.slice(),o=0;o<t.length;){var s=ra(a,t[o],n&&o===t.length-1);if(!s)return;if(s.overflow)return s;if(!s.match){if(s.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(s,null,2)))}if(0===(a=a.slice(s.matchedChars.length)).length)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};o++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-a.length)}}switch(t.op){case"|":for(var i,c,l=Xr(t.args);!(c=l()).done;){var d=ra(e,c.value,n);if(d){if(d.overflow)return d;if(d.match)return{match:!0,matchedChars:d.matchedChars};if(!d.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(d,null,2)));i=!0}}return i?{partialMatch:!0}:void 0;case"[]":for(var u,p=Xr(t.args);!(u=p()).done;){var h=u.value;if(e[0]===h)return 1===e.length?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[h]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function aa(e){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(e)}function oa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ca(r.key),r)}}function ca(e){var t=function(e,t){if("object"!=aa(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=aa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==aa(t)?t:t+""}var la=Ur("9",15),da=/[- ]/,ua=function(){return/\[([^\[\]])*\]/g},pa=function(){return/\d(?=[^,}][^,}])/g},ha=new RegExp("["+d+"]*\\$1["+d+"]*(\\$\\d["+d+"]*)*$"),fa=function(){return e=function e(t){t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=n,this.resetFormat()},t=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var n=this;if(function(e,t,n){return"IS_POSSIBLE"===le(e,t,n)}(t.nationalSignificantNumber,t.country,this.metadata))for(var r,a=oa(this.matchingFormats);!(r=a()).done;){var o=r.value,s=Vr(t,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return n.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return n.getSeparatorAfterNationalPrefix(e)}});if(s)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(s.replace(/\d/g,Fr),t),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(Fr),s}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)return r===n?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,a=e.international,o=n,s=o.length-3;s<0&&(s=0),this.matchingFormats=this.matchingFormats.filter((function(e){return t.formatSuits(e,a,r)&&t.formatMatches(e,o,s)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(0===r)return!0;n=Math.min(n,r-1);var a=e.leadingDigitsPatterns()[n];if(t.length<3)try{return void 0!==new na(a).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(a,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){for(var t,n=this,r=function(){var r=t.value;return n.chosenFormat===r?0:ha.test(n.getFormatFormat(r,e.international))?n.createTemplateForFormat(r,e)?(n.chosenFormat=r,0):(n.matchingFormats=n.matchingFormats.filter((function(e){return e!==r})),1):1},a=oa(this.matchingFormats.slice());!(t=a()).done&&0!==r(););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var n=this.getTemplateForFormat(e,t);return n?(this.setNationalNumberTemplate(n,t),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&da.test(e.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&!1===t.spacing?n:n+" ":r?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf(Fr,t+1),n++;return kr(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,Fr)+Ur(Fr,t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var n=t.nationalSignificantNumber,r=t.international,a=t.nationalPrefix,o=t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,s=e.pattern();s=s.replace(ua(),"\\d").replace(pa(),"\\d");var i=la.match(s)[0];if(!(n.length>i.length)){var c=new RegExp("^"+s+"$"),l=n.replace(/\d/g,"9");c.test(l)&&(i=l);var d,u=this.getFormatFormat(e,r);if(this.shouldTryNationalPrefixFormattingRule(e,{international:r,nationalPrefix:a})){var p=u.replace(xe,e.nationalPrefixFormattingRule());if(ne(e.nationalPrefixFormattingRule())===(a||"")+ne("$1")&&(u=p,d=!0,a))for(var h=a.length;h>0;)u=u.replace(/\d/,Fr),h--}var f=i.replace(new RegExp(s),u).replace(new RegExp("9","g"),Fr);return d||(o?f=Ur(Fr,o.length)+" "+f:a&&(f=Ur(Fr,a.length)+this.getSeparatorAfterNationalPrefix(e)+f)),r&&(f=$e(f)),f}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,n){for(var r,a=Mr(n.split(""));!(r=a()).done;){var o=r.value;if(e.slice(t+1).search(jr)<0)return;t=e.search(jr),e=e.replace(jr,o)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],kr(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var a=e.usesNationalPrefix();if(a&&r||!a&&!n)return!0}}}],t&&ia(e.prototype,t),n&&ia(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function ga(e){return ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ga(e)}function ma(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ya(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ya(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ea(r.key),r)}}function Ea(e){var t=function(e,t){if("object"!=ga(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ga(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ga(t)?t:t+""}var Aa=new RegExp("^"+("["+d+c+"]+")+"$","i"),Ca="(?:[++]["+d+c+"]*|["+d+c+"]+)",Sa=new RegExp("[^"+d+c+"]+.*$"),_a=/[^\d\[\]]/,ba=function(){return e=function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,a=t.metadata,o=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=a,this.onNationalSignificantNumberChange=o},(t=[{key:"input",value:function(e,t){var n,r=function(e){var t=function(e){var t=function(e){var t,n=e.search(Ca);if(!(n<0))return"+"===(e=e.slice(n))[0]&&(t=!0,e=e.slice(1)),e=e.replace(Sa,""),t&&(e="+"+e),e}(e)||"";return"+"===t[0]?[t.slice(1),!0]:[t]}(e),n=ma(t,2),r=n[0],a=n[1];return Aa.test(r)||(r=""),[r,a]}(e),a=ma(r,2),o=a[0],s=a[1],i=ne(o);return s&&(t.digits||(t.startInternationalNumber(void 0,void 0),i||(n=!0))),i&&this.inputDigits(i,t),{digits:i,justLeadingPlus:n}}},{key:"inputDigits",value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),(function(e){return t.update(e)}))}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:"extractCountryCallingCode",value:function(e){var t=Re("+"+e.getDigitsWithoutInternationalPrefix(),e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&_a.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var n=_e(e,this.metadata),r=n.nationalPrefix,a=n.nationalNumber,o=n.carrierCode;if(a!==e)return this.onExtractedNationalNumber(r,o,a,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=_e(e,this.metadata),a=r.nationalPrefix,o=r.nationalNumber,s=r.carrierCode;if(o!==t)return this.onExtractedNationalNumber(a,s,o,e,n),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,n,r,a){var o,s=!1,i=r.lastIndexOf(n);if(i<0||i!==r.length-n.length)s=!0;else{var c=r.slice(0,i);c&&c!==e&&(o=c)}a({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberIsModified:s,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,(function(t){return e.update(t)}))||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!t&&!n){var a=Se(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==a&&a!==r?(e.update({IDDPrefix:r.slice(0,r.length-a.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=De(e.digits,e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(t)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:t}),!0}}},{key:"startInternationalNumber",value:function(e,t){var n=t.country,r=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),(function(t){return e.update(t)}))}}])&&Ia(e.prototype,t),n&&Ia(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Na(e){return Na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Na(e)}function Ta(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pa(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,va(r.key),r)}}function va(e){var t=function(e,t){if("object"!=Na(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Na(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Na(t)?t:t+""}var Da=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new R(n);var r=Ta(this.getCountryAndCallingCode(t),2),a=r[0],o=r[1];this.defaultCountry=a,this.defaultCallingCode=o,this.reset()},(t=[{key:"getCountryAndCallingCode",value:function(e){var t,n;return e&&(_(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,n]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(n){var r;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),void 0===r&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var a=this.state.getNationalDigits();a&&(r=this.formatter.format(a,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new wr({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new fa({state:this.state,metadata:this.metadata}),this.parser=new ba({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){var e=this.state.country;return e}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?"".concat(r," ").concat(e):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,r=e.nationalPrefix,a=t,o=n||r;return o&&(a=o+a),a}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(e?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,Fr)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(Oe(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,a=e.nationalSignificantNumber;if(t)return this.isInternational()?n?"+"+n+a:"+"+t:r||n?"+"+(r?this.metadata.countryCallingCode():n)+a:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,a=this._getCountry();if(t&&(a||r)){if(a&&a===this.defaultCountry){var o=new R(this.metadata.metadata);o.selectNumberingPlan(a);var s=o.numberingPlan.callingCode(),i=this.metadata.getCountryCodesForCallingCode(s);if(i.length>1){var c=Te(t,{countries:i,metadata:this.metadata.metadata});c&&(a=c)}}var l=new Qe(a||r,t,this.metadata.metadata);return n&&(l.carrierCode=n),l}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])&&Oa(e.prototype,t),n&&Oa(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Ra(e){return Da.call(this,e,r)}function $a(){return a(V,arguments)}function xa(e){return new R(e).getCountries()}function wa(){return a(xa,arguments)}function Ma(){return a(k,arguments)}function La(){return a(U,arguments)}function Fa(){return R.call(this,r)}function ja(e,t,n){if(t[e])return new Qe(e,t[e],n)}function Ua(){return a(ja,arguments)}function ka(e,t,n){return n||(n=t,t=void 0),new Da(t,n).input(e)}function Va(){return a(ka,arguments)}function Ba(e){return Qe.call(this,e,r)}function Ga(){var e=bt(arguments);return ht(e.text,e.options,e.metadata)}function Wa(){return a(Ga,arguments)}function Ha(){var e=function(e){var t,n,r,a,o=e[0],s=e[1],i=e[2],c=e[3],l=e[4];if("string"==typeof o)if("string"==typeof i)n=i,l?(r=c,a=l):a=c,t=ht(o,{defaultCountry:s,extended:!0},a);else{if("string"!=typeof s)throw new Error("`format` argument not passed to `formatNumber(number, format)`");n=s,c?(r=i,a=c):a=i,t=ht(o,{extended:!0},a)}else{if(!_(o))throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");t=o,n=s,c?(r=i,a=c):a=i}"International"===n?n="INTERNATIONAL":"National"===n&&(n="NATIONAL");return{input:t,format:n,options:r,metadata:a}}(arguments);return Be(e.input,e.format,e.options,e.metadata)}function qa(){return a(Ha,arguments)}function za(){var e=Ya(arguments),t=e.input,n=e.options,r=e.metadata;if(t.phone)return ye(t,n,r)}function Ya(e){var t,n,r=e[0],a=e[1],o=e[2],s=e[3],i={};if("string"==typeof r)_(a)?(o?(i=a,n=o):n=a,t=J(r)?ht(r,void 0,n):{}):(s?(i=o,n=s):n=o,t=J(r)?ht(r,{defaultCountry:a},n):{});else{if(!_(r))throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");t=r,o?(i=a,n=o):n=a}return{input:t,options:i,metadata:n}}function Ka(){return a(za,arguments)}function Ja(){var e=Ya(arguments),t=e.input,n=e.options,r=e.metadata;return!!(t.phone||n&&n.v2)&&ue(t,n,r)}function Xa(){return a(Ja,arguments)}function Qa(){var e=Ya(arguments),t=e.input,n=e.options,r=e.metadata;return!!t.phone&&Ee(t,n,r)}function Za(){return a(Qa,arguments)}function eo(e,t,n){if("string"!=typeof e)throw new TypeError("number must be a string");if("string"!=typeof t)throw new TypeError("country must be a string");return function(e,t,n,r){return n=n||{},e.country===t&&Ee(e,n,r)}(J(e)?ht(e,{defaultCountry:t},n):{},t,void 0,n)}function to(){return a(eo,arguments)}function no(e){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},no(e)}function ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ao(r.key),r)}}function ao(e){var t=function(e,t){if("object"!=no(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=no(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==no(t)?t:t+""}Ra.prototype=Object.create(Da.prototype,{}),Ra.prototype.constructor=Ra,Fa.prototype=Object.create(R.prototype,{}),Fa.prototype.constructor=Fa,Ba.prototype=Qe.prototype,Ba.prototype.constructor=Ba;var oo=new RegExp("^["+l+"]+"),so=new RegExp("["+d+"]+$"),io=function(){return e=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.text=t,this.options=n||{},this.metadata=r,this.state="NOT_READY",this.regexp=new RegExp(Y,"ig")},t=[{key:"find",value:function(){var e=this.regexp.exec(this.text);if(e){var t=e[0],n=e.index;t=t.replace(oo,""),n+=e[0].length-t.length,t=Mn(t=t.replace(so,""));var r=this.parseCandidate(t,n);return r||this.find()}}},{key:"parseCandidate",value:function(e,t){if(Un(e,t,this.text)&&Yn(e,t,this.text,this.options.extended?"POSSIBLE":"VALID")){var n=ht(e,this.options,this.metadata);if(n.phone)return n.startsAt=t,n.endsAt=t+e.length,n}}},{key:"hasNext",value:function(){return"NOT_READY"===this.state&&(this.last_match=this.find(),this.last_match?this.state="READY":this.state="DONE"),"READY"===this.state}},{key:"next",value:function(){if(!this.hasNext())throw new Error("No next element");var e=this.last_match;return this.last_match=null,this.state="NOT_READY",e}}],t&&ro(e.prototype,t),n&&ro(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();W();function co(){var e=bt(arguments);return function(e,t,n){void 0===t&&(t={});for(var r=new io(e,t,n),a=[];r.hasNext();)a.push(r.next());return a}(e.text,e.options,e.metadata)}function lo(){var e=bt(arguments);return function(e,t,n){void 0===t&&(t={});var r=new io(e,t,n),a={};return a[Symbol.iterator]=function(){return{next:function(){return r.hasNext()?{done:!1,value:r.next()}:{done:!0}}}},a}(e.text,e.options,e.metadata)}function uo(){return a(co,arguments)}function po(){return a(lo,arguments)}function ho(e,t){io.call(this,e,t,r)}ho.prototype=Object.create(io.prototype,{}),ho.prototype.constructor=ho}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r](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),(()=>{"use strict";var e={};n.r(e),n.d(e,{buildContextName:()=>H,buildModalContext:()=>K,buildTransientContextName:()=>q,getContainerIdFromContext:()=>X,getParentContext:()=>J,getParentContextName:()=>W,getTargetFromContext:()=>Y,getTransientContext:()=>z});var t={};n.r(t),n.d(t,{getResolvedTargetName:()=>Pt,getRoutingInfo:()=>Ot,getSemanticURLFromRoutingInfo:()=>vt});var r={};n.r(r),n.d(r,{evaluate:()=>sn,handleChange:()=>an,hasDeclareExpression:()=>rn,updateDeclareExpressions:()=>on});var a={};n.r(a),n.d(a,{hasBrowserEnv:()=>Cr,hasStandardBrowserEnv:()=>_r,hasStandardBrowserWebWorkerEnv:()=>br,navigator:()=>Sr,origin:()=>Nr});var o={};n.r(o),n.d(o,{publishExpressions:()=>Li,publishResponse:()=>Fi});var s={};n.r(s),n.d(s,{doesRestApiExist:()=>Gi,getCancelTokenSource:()=>Wi,getCaseApi:()=>zi,getHeaderProcessor:()=>ki,invokeCustomRestApi:()=>Bi,invokeRestApi:()=>Vi,isRequestCanceled:()=>Hi,registerInterceptor:()=>qi});var i={};n.r(i),n.d(i,{fetchViewResources:()=>Eu,updateViewResources:()=>Iu});var c={};n.r(c),n.d(c,{CONTAINER_NAMES:()=>hp,CONTAINER_TYPES:()=>pp,addRootContainerItem:()=>zp,areContainerItemsPresent:()=>Ap,clearTransientData:()=>Zp,closeContainerItem:()=>qp,getActiveContainerItemContext:()=>Rp,getActiveContainerItemIDFromRoutingInfo:()=>uh,getActiveContainerItemName:()=>Pp,getActiveContext:()=>ih,getChildContainerItems:()=>$p,getChildContainers:()=>xp,getChildContainersContexts:()=>wp,getContainerAPI:()=>nh,getContainerAccessOrder:()=>Ep,getContainerData:()=>mp,getContainerItemByKey:()=>bp,getContainerItemData:()=>yp,getContainerItemName:()=>Sp,getContainerItems:()=>Ip,getContainerLimit:()=>Up,getContainerParentContext:()=>dh,getContainerType:()=>Tp,getContextByTargetAndKey:()=>lh,getDataContextName:()=>Dp,getFlowContainer:()=>hh,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Wp,getParentContainerItem:()=>ph,getRootContainerName:()=>sh,getSuggestionContexts:()=>Mp,getTargetFromContainerItemID:()=>Hp,getTransientItems:()=>Jp,hasContainerItems:()=>jp,isContainerDirty:()=>Gp,isContainerInitialized:()=>Np,isContainerItemActive:()=>Op,isContainerItemContextBeingUsedInOtherContainers:()=>Kp,isContainerItemExists:()=>Cp,isContainerLimitReached:()=>Vp,isContainerMultipleMode:()=>Fp,isContainerSingleMode:()=>Lp,purgeTransientData:()=>eh,removeContainer:()=>rh,replaceTransientData:()=>Qp,resetContainersPayload:()=>Bp,setContainerLimit:()=>kp,updateCaseContextEtag:()=>oh,updateParentLastUpdateTime:()=>ch,updateRelatedContextEtag:()=>ah,updateTransientData:()=>Xp});var l={};n.r(l),n.d(l,{getAIAgent:()=>pf,getAdditionalInfo:()=>yf,getDataPageKeys:()=>ff,getDataPageMetadata:()=>af,getEmbeddedPropertyMetadata:()=>Xh,getFieldParameters:()=>lf,getFieldsByClassName:()=>cf,getGenAICoach:()=>uf,getInsight:()=>sf,getLocaleUtilsForLanguage:()=>Kh,getLocalizationServiceFromStore:()=>Jh,getLookUpDataPage:()=>gf,getLookUpDataPageInfo:()=>mf,getParagraph:()=>df,getPersonalizationMetadata:()=>of,getPropertyMetadata:()=>Yh,getResolvedFieldMetadata:()=>If,getSavableDataPage:()=>hf,isViewExists:()=>nf,mergeStore:()=>zh,resolveNavigation:()=>rf,resolveView:()=>tf,updateNavigationStore:()=>Zh,updateStores:()=>ef,updateViewStore:()=>Qh});var d={};n.r(d),n.d(d,{dispatch:()=>Nf,doesContextExist:()=>kf,getActionType:()=>$f,getContextValue:()=>Df,getDataObject:()=>Tf,getReferenceTokens:()=>Sf,getSharedDataObject:()=>Pf,getStore:()=>bf,getValue:()=>vf,isMergeable:()=>wf,lookupContextValue:()=>Rf,mergeDeep:()=>Lf,performReplaceAndRearrange:()=>Mf,removeItem:()=>xf,replaceValue:()=>jf,resetStore:()=>Uf,setStore:()=>_f,updateValue:()=>Ff});var u={};n.r(u),n.d(u,{activateContainerItem:()=>mg,addContainerItem:()=>sg,addMessages:()=>yg,addSharedData:()=>Pg,addTransientItem:()=>ig,addWork:()=>ng,clearTransientData:()=>lg,createWork:()=>Jf,error:()=>Tg,finishAssignment:()=>Sg,initContainers:()=>ag,listAction:()=>vg,loadView:()=>eg,mergeData:()=>Qf,openAssignment:()=>_g,openWorkByHandle:()=>rg,postProcess:()=>Ng,purgeTransientData:()=>ug,removeAllTransientItems:()=>Eg,removeContainerItem:()=>Ig,removeSharedData:()=>Og,removeTransientItem:()=>Ag,replaceContainerItem:()=>Cg,replaceTransientData:()=>dg,resetContainers:()=>og,resetLoading:()=>fg,setLoading:()=>hg,setSharedProperty:()=>Rg,setStateProperty:()=>$g,showCasePreview:()=>Dg,showHarness:()=>Zf,showHistory:()=>bg,showPage:()=>tg,upMergeAndRemoveContainerItem:()=>gg,updateContainerItem:()=>pg,updateTransientData:()=>cg});var p=n(216),h=n.n(p);let f,g,m;const y=e=>{e&&(f=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},f.BASEURL=e.server,f.ACTIONURL=e["action-end-point"],f.DATAURL=e["data-end-point"],m=e.reAuthUrl)},I=()=>m,E=()=>f.BASEURL,A=e=>fetch(`${f.BASEURL}${f.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),C=e=>{g=e},S=()=>g;var _=n(953),b=n(521),N=n.n(b),T=n(928),P=n.n(T),O=n(188),v=n.n(O),D=n(835),R=n.n(D),$=n(692),x=n.n($),w=n(529),M=n.n(w);const L=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},F={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails",OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:"SubscriptView"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_INFO_CLASSNAME:"caseInfo.className",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"}},j={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_DYNAMIC_WHENS:"summary_of_dynamic_whens__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",CUSTOM_ERROR:"custom error",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_ERROR:"onRefreshError",ON_REFRESH_COMPLETE:"onRefreshComplete",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",PARAGRAPH_ANNOTATION:"@PARAGRAPH",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",PY_CONFIRM:"pyConfirm",LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...F,getProperty:e=>L.map(e)},U="pyRemoteCaseDetails";class k{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>qf.getProperty(".RemoteSystemID",j.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=Oh.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const V=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let a=`${t}${j.FORWARD_SLASH_STRING}${e}`;const o=mp(a);if(o||t!==j.APP.APP&&t!==j.APP.ROOT)if(o){if(n&&B[a])return r=`${a}${j.UNDERSCORE_STRING}${B[a]}`,r;B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}else r=H(e,W(t));else a=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},z=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},Y=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},K=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},J=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},X=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",ae="SHOW_INSIGHT",oe="SHOW_DASHBOARD",se="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",le="CREATE_WORK",de="OPEN_WORK_BY_HANDLE",ue="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",fe="OPEN_ASSIGNMENT",ge="MERGE_DATA",me="REMOVE_ITEM",ye="GET_DATAOBJECT_ACTIONS",Ie="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",Ce="RESET_CONTAINERS",Se="ADD_CONTAINER_ITEM",_e="REMOVE_CONTAINER_ITEM",be="ADD_TRANSIENT_ITEM",Ne="UPDATE_TRANSIENT_DATA",Te="REMOVE_TRANSIENT_ITEM",Pe="REMOVE_ALL_TRANSIENT_ITEMS",Oe="CLEAR_TRANSIENT_DATA",ve="PURGE_TRANSIENT_DATA",De="REPLACE_TRANSIENT_DATA",Re="ACTIVATE_CONTAINER_ITEM",$e="UPDATE_CONTAINER_ITEM",xe="UPMERGE_AND_REMOVE_CONTAINER_ITEM",we="REPLACE_CONTAINER_ITEM",Me="ACTIVATE_MODAL_CONTAINER_ITEM",Le="REMOVE_CONTAINER",Fe="ADD_SUGGESTION_CONTEXT",je="showView",Ue="showData",ke="showInsight",Ve="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="deleteCaseInCreateStage",ze="openLocalAction",Ye="openProcessAction",Ke="caseWideActions",Je="openBulkAction",Xe="performBulkAction",Qe="launchAssignment",Ze="ADD_MESSAGES",et="CLEAR_MESSAGES",tt="RESET_STORE",nt="FETCH_DATAPAGE",rt="ADD_SHARED_DATA",at="REMOVE_SHARED_DATA",ot="LIST_ACTION",st="DELETE_CASE_SUMMARY",it="ALTER_BLOCKING_ACTION_COUNT",ct="CREATE_DATA_OBJECT",lt="DELETE_DATA_OBJECT",dt="VIEW_DATA_OBJECT",ut="UPDATE_DATA_OBJECT",pt="OPEN_DATA_OBJECT_ACTION",ht="SUBMIT_DATA_OBJECT_ACTION",ft="OPEN_EMBEDDED_DATA_MODAL",gt="SUBMIT_EMBEDDED_DATA_MODAL",mt="SUBMIT_SUBSCRIPT",yt="FILL_FORM_WITH_AI",It="createWork",Et="openAssignment",At="openCase",Ct="OPEN_OBJECT_ACTION",St="EXECUTE_OBJECT_WIDE_ACTION",_t="createObject",bt="getObject",Nt="getObjectWideAction",Tt="createExternalObject",Pt=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=mp(r),n||t.includes("/")?n||(r=Pt(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},Ot=(e,t)=>{const n=Pt(e,t);return n&&mp(n)?mp(n):{}},vt=(e,t)=>Th.getSemanticURL(je,{page:e},t);class Dt{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Ut[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser?._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes?.[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=jt[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=Ut[this._state];this._subParser=new Dt(this._grammar,e,t)}_endSubExpression(){Ut[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,Dt._setParent(e,this._position)):this._tree=e,this._position=e}}const Rt=Dt,$t="identifier",xt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},wt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Mt=(e,t,n)=>{const r=""===e,a=""===t||null==t;if(r&&a)return n;if("boolean"==typeof t){const a=!!(!r&&"false"!==e&&"0"!==e)&&Boolean(e);return n?a===t:a!==t}return r!==a?!n:n?e===t:e!==t},Lt={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>Mt(e,t,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>Mt(e,t,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":xt,AND:xt,and:xt,"||":wt,OR:wt,or:wt,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Ft={BinaryExpression:function(e){const t=[];let n="";const r=e.right,a=e.operator,o=e.left;if(t[0]=this.evaluateAST(o),o.operationType===$t&&this._context){const e=o.value;n=this._context.getFieldMetadata(e.substring(1))?.type??""}t[1]=r?this.evaluateAST(r,n):"";return(0,this._grammar[a].evaluate)(t[0],t[1])},identifier:function(e){return this._localDataObject?Bf.getIn(this._localDataObject,e.value?e.value.substring(1).split("."):[])??"":this._contextTreeNodeContext?qf.getLitePropertyValue(this._contextTreeNodeContext,e.value)??"":this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;return(0,this._grammar[t].evaluate)(n)}},jt={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;const r=n?n.operator:null,a=r?this._grammar[r]:null,o=a?a.precedence:null;if(o&&t)for(;n?.operator&&o>=t;)this._position=n,n=n._parent;const s={operationType:"BinaryExpression",operator:e.value,left:this._position};Rt._setParent(this._position,s),this._position=n,this.setPositionInAST(s)},identifier:function(e){const t={operationType:$t,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Ut={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:$t},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:jt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},kt=["binaryOperator","unaryOperator","openParenthesis"],Vt=/^\s*$/,Bt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Gt=/\\\\/,Wt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Ht=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],qt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class zt{constructor(e){this._grammar=e}static _isNegative(e){return kt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Vt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(Bt)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(Gt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>zt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[Wt.join("|"),e.join("|"),Ht.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=zt._unquote(e):e.match(qt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(Bt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)zt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&zt._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const Yt=zt;const Kt=class{constructor(e,t){this._grammar={...Lt},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new Yt(this._grammar).tokenize(this._expression),t=new Rt(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return en(e.operationType,Ft)&&Ft[e.operationType].call(this,e,t)}},Jt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new Kt(n,t)},Xt=e=>!e||e.buildAST(),Qt=(e,t,n)=>!e||e.evaluate(t,n),Zt=(e,t,n)=>{const r=Jt(e,t),a=Xt(r);return Qt(a,n)},en=(e,t)=>e in t;const tn=class{static handleExpression(e,t,n,r){const a=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:a}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:qf.getPropertyValue(`${n}.pxObjClass`,null,t)||qf.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>Nf({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},nn={},rn=(e,t)=>nn[t]&&Object.hasOwn(nn[t],e),an=e=>{const{context:t}=e;rn(e.reference,t)&&tn.handleExpression(e.reference,e.value,nn[t][e.reference],t)},on=(e={})=>{Bf.copy(e,nn)},sn=(e,t,n)=>Zt(e,t,n?.pConnect.getPConnect());const cn=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const ln=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){Bf.copy(e,this.componentMap)}mergeOverrideMap(e={}){Bf.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const dn=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const un=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),a=-1===r?e:e.substring(0,r),o=dn.getHandler(a);return o?o(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return dn.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=ln.getComponent(t.type);if(!r?.mapping)return;const a=r.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:r}=t;if(!r)return;const o=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,o);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];o.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let a=n[r];a&&0===a.indexOf(".")?(a=a.substring(1),t[r]=e[a]):t[r]=a})),r.push(t)}))}}}static getPropertyName(e=""){if(e&&Bf.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(Bf.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return Bf.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}};function pn(e,t){return function(){return e.apply(t,arguments)}}const{toString:hn}=Object.prototype,{getPrototypeOf:fn}=Object,{iterator:gn,toStringTag:mn}=Symbol,yn=(In=Object.create(null),e=>{const t=hn.call(e);return In[t]||(In[t]=t.slice(8,-1).toLowerCase())});var In;const En=e=>(e=e.toLowerCase(),t=>yn(t)===e),An=e=>t=>typeof t===e,{isArray:Cn}=Array,Sn=An("undefined");function _n(e){return null!==e&&!Sn(e)&&null!==e.constructor&&!Sn(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bn=En("ArrayBuffer");const Nn=An("string"),Tn=An("function"),Pn=An("number"),On=e=>null!==e&&"object"==typeof e,vn=e=>{if("object"!==yn(e))return!1;const t=fn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||mn in e||gn in e)},Dn=En("Date"),Rn=En("File"),$n=En("Blob"),xn=En("FileList");const wn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Mn=void 0!==wn.FormData?wn.FormData:void 0,Ln=En("URLSearchParams"),[Fn,jn,Un,kn]=["ReadableStream","Request","Response","Headers"].map(En);function Vn(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),Cn(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(_n(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function Bn(e,t){if(_n(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const Gn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Wn=e=>!Sn(e)&&e!==Gn;const Hn=(qn="undefined"!=typeof Uint8Array&&fn(Uint8Array),e=>qn&&e instanceof qn);var qn;const zn=En("HTMLFormElement"),Yn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kn=En("RegExp"),Jn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vn(n,((n,a)=>{let o;!1!==(o=t(n,a,e))&&(r[a]=o||n)})),Object.defineProperties(e,r)};const Xn=En("AsyncFunction"),Qn=(Zn="function"==typeof setImmediate,er=Tn(Gn.postMessage),Zn?setImmediate:er?(tr=`axios@${Math.random()}`,nr=[],Gn.addEventListener("message",(({source:e,data:t})=>{e===Gn&&t===tr&&nr.length&&nr.shift()()}),!1),e=>{nr.push(e),Gn.postMessage(tr,"*")}):e=>setTimeout(e));var Zn,er,tr,nr;const rr="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Gn):"undefined"!=typeof process&&process.nextTick||Qn,ar={isArray:Cn,isArrayBuffer:bn,isBuffer:_n,isFormData:e=>{let t;return e&&(Mn&&e instanceof Mn||Tn(e.append)&&("formdata"===(t=yn(e))||"object"===t&&Tn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&bn(e.buffer),t},isString:Nn,isNumber:Pn,isBoolean:e=>!0===e||!1===e,isObject:On,isPlainObject:vn,isEmptyObject:e=>{if(!On(e)||_n(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Fn,isRequest:jn,isResponse:Un,isHeaders:kn,isUndefined:Sn,isDate:Dn,isFile:Rn,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:$n,isRegExp:Kn,isFunction:Tn,isStream:e=>On(e)&&Tn(e.pipe),isURLSearchParams:Ln,isTypedArray:Hn,isFileList:xn,forEach:Vn,merge:function e(){const{caseless:t,skipUndefined:n}=Wn(this)&&this||{},r={},a=(a,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&Bn(r,o)||o;vn(r[s])&&vn(a)?r[s]=e(r[s],a):vn(a)?r[s]=e({},a):Cn(a)?r[s]=a.slice():n&&Sn(a)||(r[s]=a)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Vn(arguments[e],a);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Vn(t,((t,r)=>{n&&Tn(t)?Object.defineProperty(e,r,{value:pn(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,o,s;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==n&&fn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:yn,kindOfTest:En,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Cn(e))return e;let t=e.length;if(!Pn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[gn]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:zn,hasOwnProperty:Yn,hasOwnProp:Yn,reduceDescriptors:Jn,freezeMethods:e=>{Jn(e,((t,n)=>{if(Tn(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Tn(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Cn(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Bn,global:Gn,isContextDefined:Wn,isSpecCompliantForm:function(e){return!!(e&&Tn(e.append)&&"FormData"===e[mn]&&e[gn])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(On(e)){if(t.indexOf(e)>=0)return;if(_n(e))return e;if(!("toJSON"in e)){t[r]=e;const a=Cn(e)?[]:{};return Vn(e,((e,t)=>{const o=n(e,r+1);!Sn(o)&&(a[t]=o)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:Xn,isThenable:e=>e&&(On(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),setImmediate:Qn,asap:rr,isIterable:e=>null!=e&&Tn(e[gn])};class or extends Error{static from(e,t,n,r,a,o){const s=new or(e.message,t||e.code,n,r,a);return s.cause=e,s.name=e.name,null!=e.status&&null==s.status&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,a){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ar.toJSONObject(this.config),code:this.code,status:this.status}}}or.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",or.ERR_BAD_OPTION="ERR_BAD_OPTION",or.ECONNABORTED="ECONNABORTED",or.ETIMEDOUT="ETIMEDOUT",or.ERR_NETWORK="ERR_NETWORK",or.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",or.ERR_DEPRECATED="ERR_DEPRECATED",or.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",or.ERR_BAD_REQUEST="ERR_BAD_REQUEST",or.ERR_CANCELED="ERR_CANCELED",or.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",or.ERR_INVALID_URL="ERR_INVALID_URL";const sr=or;function ir(e){return ar.isPlainObject(e)||ar.isArray(e)}function cr(e){return ar.endsWith(e,"[]")?e.slice(0,-2):e}function lr(e,t,n){return e?e.concat(t).map((function(e,t){return e=cr(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const dr=ar.toFlatObject(ar,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ur=function(e,t,n){if(!ar.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ar.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ar.isUndefined(t[e])}))).metaTokens,a=n.visitor||l,o=n.dots,s=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ar.isSpecCompliantForm(t);if(!ar.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ar.isDate(e))return e.toISOString();if(ar.isBoolean(e))return e.toString();if(!i&&ar.isBlob(e))throw new sr("Blob is not supported. Use a Buffer instead.");return ar.isArrayBuffer(e)||ar.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,a){let i=e;if(ar.isReactNative(t)&&ar.isReactNativeBlob(e))return t.append(lr(a,n,o),c(e)),!1;if(e&&!a&&"object"==typeof e)if(ar.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ar.isArray(e)&&function(e){return ar.isArray(e)&&!e.some(ir)}(e)||(ar.isFileList(e)||ar.endsWith(n,"[]"))&&(i=ar.toArray(e)))return n=cr(n),i.forEach((function(e,r){!ar.isUndefined(e)&&null!==e&&t.append(!0===s?lr([n],r,o):null===s?n:n+"[]",c(e))})),!1;return!!ir(e)||(t.append(lr(a,n,o),c(e)),!1)}const d=[],u=Object.assign(dr,{defaultVisitor:l,convertValue:c,isVisitable:ir});if(!ar.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ar.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),ar.forEach(n,(function(n,o){!0===(!(ar.isUndefined(n)||null===n)&&a.call(t,n,ar.isString(o)?o.trim():o,r,u))&&e(n,r?r.concat(o):[o])})),d.pop()}}(e),t};function pr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function hr(e,t){this._pairs=[],e&&ur(e,this,t)}const fr=hr.prototype;fr.append=function(e,t){this._pairs.push([e,t])},fr.toString=function(e){const t=e?function(t){return e.call(this,t,pr)}:pr;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const gr=hr;function mr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function yr(e,t,n){if(!t)return e;const r=n&&n.encode||mr,a=ar.isFunction(n)?{serialize:n}:n,o=a&&a.serialize;let s;if(s=o?o(t,a):ar.isURLSearchParams(t)?t.toString():new gr(t,a).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const Ir=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ar.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Er={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Ar={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:gr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Cr="undefined"!=typeof window&&"undefined"!=typeof document,Sr="object"==typeof navigator&&navigator||void 0,_r=Cr&&(!Sr||["ReactNative","NativeScript","NS"].indexOf(Sr.product)<0),br="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Nr=Cr&&window.location.href||"http://localhost",Tr={...a,...Ar};const Pr=function(e){function t(e,n,r,a){let o=e[a++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),i=a>=e.length;if(o=!o&&ar.isArray(r)?r.length:o,i)return ar.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&ar.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],a)&&ar.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}(r[o])),!s}if(ar.isFormData(e)&&ar.isFunction(e.entries)){const n={};return ar.forEachEntry(e,((e,r)=>{t(function(e){return ar.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Or={transitional:Er,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=ar.isObject(e);a&&ar.isHTMLForm(e)&&(e=new FormData(e));if(ar.isFormData(e))return r?JSON.stringify(Pr(e)):e;if(ar.isArrayBuffer(e)||ar.isBuffer(e)||ar.isStream(e)||ar.isFile(e)||ar.isBlob(e)||ar.isReadableStream(e))return e;if(ar.isArrayBufferView(e))return e.buffer;if(ar.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ur(e,new Tr.classes.URLSearchParams,{visitor:function(e,t,n,r){return Tr.isNode&&ar.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=ar.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ur(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(ar.isString(e))try{return(t||JSON.parse)(e),ar.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Or.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(ar.isResponse(e)||ar.isReadableStream(e))return e;if(e&&ar.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw sr.from(e,sr.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ar.forEach(["delete","get","head","post","put","patch"],(e=>{Or.headers[e]={}}));const vr=Or,Dr=ar.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rr=Symbol("internals");function $r(e){return e&&String(e).trim().toLowerCase()}function xr(e){return!1===e||null==e?e:ar.isArray(e)?e.map(xr):String(e)}function wr(e,t,n,r,a){return ar.isFunction(r)?r.call(this,t,n):(a&&(t=n),ar.isString(t)?ar.isString(r)?-1!==t.indexOf(r):ar.isRegExp(r)?r.test(t):void 0:void 0)}class Mr{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=$r(t);if(!a)throw new Error("header name must be a non-empty string");const o=ar.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=xr(e))}const o=(e,t)=>ar.forEach(e,((e,n)=>a(e,n,t)));if(ar.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ar.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&Dr[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(ar.isObject(e)&&ar.isIterable(e)){let n,r,a={};for(const t of e){if(!ar.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(n=a[r])?ar.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=$r(e)){const n=ar.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ar.isFunction(t))return t.call(this,e,n);if(ar.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$r(e)){const n=ar.findKey(this,e);return!(!n||void 0===this[n]||t&&!wr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=$r(e)){const a=ar.findKey(n,e);!a||t&&!wr(0,n[a],a,t)||(delete n[a],r=!0)}}return ar.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!wr(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return ar.forEach(this,((r,a)=>{const o=ar.findKey(n,a);if(o)return t[o]=xr(r),void delete t[a];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();s!==a&&delete t[a],t[s]=xr(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ar.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ar.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Rr]=this[Rr]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=$r(e);t[r]||(!function(e,t){const n=ar.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[r]=!0)}return ar.isArray(e)?e.forEach(r):r(e),this}}Mr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ar.reduceDescriptors(Mr.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ar.freezeMethods(Mr);const Lr=Mr;function Fr(e,t){const n=this||vr,r=t||n,a=Lr.from(r.headers);let o=r.data;return ar.forEach(e,(function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)})),a.normalize(),o}function jr(e){return!(!e||!e.__CANCEL__)}const Ur=class extends sr{constructor(e,t,n){super(null==e?"canceled":e,sr.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function kr(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new sr("Request failed with status code "+n.status,[sr.ERR_BAD_REQUEST,sr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Vr=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,o=0,s=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[s];a||(a=c),n[o]=i,r[o]=c;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=l&&c-l;return p?Math.round(1e3*u/p):void 0}};const Br=function(e,t){let n,r,a=0,o=1e3/t;const s=(t,o=Date.now())=>{a=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=o?s(e,t):(n=e,r||(r=setTimeout((()=>{r=null,s(n)}),o-i)))},()=>n&&s(n)]},Gr=(e,t,n=3)=>{let r=0;const a=Vr(50,250);return Br((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,i=o-r,c=a(i);r=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:i,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},Wr=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Hr=e=>(...t)=>ar.asap((()=>e(...t))),qr=Tr.hasStandardBrowserEnv?(zr=new URL(Tr.origin),Yr=Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent),e=>(e=new URL(e,Tr.origin),zr.protocol===e.protocol&&zr.host===e.host&&(Yr||zr.port===e.port))):()=>!0;var zr,Yr;const Kr=Tr.hasStandardBrowserEnv?{write(e,t,n,r,a,o,s){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];ar.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),ar.isString(r)&&i.push(`path=${r}`),ar.isString(a)&&i.push(`domain=${a}`),!0===o&&i.push("secure"),ar.isString(s)&&i.push(`SameSite=${s}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Jr(e,t,n){let r=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Xr=e=>e instanceof Lr?{...e}:e;function Qr(e,t){t=t||{};const n={};function r(e,t,n,r){return ar.isPlainObject(e)&&ar.isPlainObject(t)?ar.merge.call({caseless:r},e,t):ar.isPlainObject(t)?ar.merge({},t):ar.isArray(t)?t.slice():t}function a(e,t,n,a){return ar.isUndefined(t)?ar.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function o(e,t){if(!ar.isUndefined(t))return r(void 0,t)}function s(e,t){return ar.isUndefined(t)?ar.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,a,o){return o in t?r(n,a):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t,n)=>a(Xr(e),Xr(t),0,!0)};return ar.forEach(Object.keys({...e,...t}),(function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=ar.hasOwnProp(c,r)?c[r]:a,s=o(e[r],t[r],r);ar.isUndefined(s)&&o!==i||(n[r]=s)})),n}const Zr=e=>{const t=Qr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;if(t.headers=s=Lr.from(s),t.url=yr(Jr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),ar.isFormData(n))if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(ar.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)}))}if(Tr.hasStandardBrowserEnv&&(r&&ar.isFunction(r)&&(r=r(t)),r||!1!==r&&qr(t.url))){const e=a&&o&&Kr.read(o);e&&s.set(a,e)}return t},ea="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Zr(e);let a=r.data;const o=Lr.from(r.headers).normalize();let s,i,c,l,d,{responseType:u,onUploadProgress:p,onDownloadProgress:h}=r;function f(){l&&l(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=Lr.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());kr((function(e){t(e),f()}),(function(e){n(e),f()}),{data:u&&"text"!==u&&"json"!==u?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new sr("Request aborted",sr.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=t&&t.message?t.message:"Network Error",a=new sr(r,sr.ERR_NETWORK,e,g);a.event=t||null,n(a),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Er;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new sr(t,a.clarifyTimeoutError?sr.ETIMEDOUT:sr.ECONNABORTED,e,g)),g=null},void 0===a&&o.setContentType(null),"setRequestHeader"in g&&ar.forEach(o.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),ar.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),u&&"json"!==u&&(g.responseType=r.responseType),h&&([c,d]=Gr(h,!0),g.addEventListener("progress",c)),p&&g.upload&&([i,l]=Gr(p),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{g&&(n(!t||t.type?new Ur(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Tr.protocols.indexOf(y)?n(new sr("Unsupported protocol "+y+":",sr.ERR_BAD_REQUEST,e)):g.send(a||null)}))},ta=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const a=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof sr?t:new Ur(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,a(new sr(`timeout of ${t}ms exceeded`,sr.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>ar.asap(s),i}},na=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,a=0;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},ra=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},aa=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of ra(e))yield*na(n,t)}(e,t);let o,s=0,i=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let o=r.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},{isFunction:oa}=ar,sa=(({Request:e,Response:t})=>({Request:e,Response:t}))(ar.global),{ReadableStream:ia,TextEncoder:ca}=ar.global,la=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},da=e=>{e=ar.merge.call({skipUndefined:!0},sa,e);const{fetch:t,Request:n,Response:r}=e,a=t?oa(t):"function"==typeof fetch,o=oa(n),s=oa(r);if(!a)return!1;const i=a&&oa(ia),c=a&&("function"==typeof ca?(l=new ca,e=>l.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var l;const d=o&&i&&la((()=>{let e=!1;const t=new n(Tr.origin,{body:new ia,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),u=s&&i&&la((()=>ar.isReadableStream(new r("").body))),p={stream:u&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!p[e]&&(p[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new sr(`Response type '${e}' is not supported`,sr.ERR_NOT_SUPPORT,n)})}));const h=async(e,t)=>{const r=ar.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(ar.isBlob(e))return e.size;if(ar.isSpecCompliantForm(e)){const t=new n(Tr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ar.isArrayBufferView(e)||ar.isArrayBuffer(e)?e.byteLength:(ar.isURLSearchParams(e)&&(e+=""),ar.isString(e)?(await c(e)).byteLength:void 0)})(t):r};return async e=>{let{url:a,method:s,data:i,signal:c,cancelToken:l,timeout:f,onDownloadProgress:g,onUploadProgress:m,responseType:y,headers:I,withCredentials:E="same-origin",fetchOptions:A}=Zr(e),C=t||fetch;y=y?(y+"").toLowerCase():"text";let S=ta([c,l&&l.toAbortSignal()],f),_=null;const b=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let N;try{if(m&&d&&"get"!==s&&"head"!==s&&0!==(N=await h(I,i))){let e,t=new n(a,{method:"POST",body:i,duplex:"half"});if(ar.isFormData(i)&&(e=t.headers.get("content-type"))&&I.setContentType(e),t.body){const[e,n]=Wr(N,Gr(Hr(m)));i=aa(t.body,65536,e,n)}}ar.isString(E)||(E=E?"include":"omit");const t=o&&"credentials"in n.prototype,c={...A,signal:S,method:s.toUpperCase(),headers:I.normalize().toJSON(),body:i,duplex:"half",credentials:t?E:void 0};_=o&&new n(a,c);let l=await(o?C(_,A):C(a,c));const f=u&&("stream"===y||"response"===y);if(u&&(g||f&&b)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=l[t]}));const t=ar.toFiniteNumber(l.headers.get("content-length")),[n,a]=g&&Wr(t,Gr(Hr(g),!0))||[];l=new r(aa(l.body,65536,n,(()=>{a&&a(),b&&b()})),e)}y=y||"text";let T=await p[ar.findKey(p,y)||"text"](l,e);return!f&&b&&b(),await new Promise(((t,n)=>{kr(t,n,{data:T,headers:Lr.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:_})}))}catch(t){if(b&&b(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new sr("Network Error",sr.ERR_NETWORK,e,_,t&&t.response),{cause:t.cause||t});throw sr.from(t,t&&t.code,e,_,t&&t.response)}}},ua=new Map,pa=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,o=[r,a,n];let s,i,c=o.length,l=ua;for(;c--;)s=o[c],i=l.get(s),void 0===i&&l.set(s,i=c?new Map:da(t)),l=i;return i},ha=(pa(),{http:null,xhr:ea,fetch:{get:pa}});ar.forEach(ha,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const fa=e=>`- ${e}`,ga=e=>ar.isFunction(e)||null===e||!1===e;const ma={getAdapter:function(e,t){e=ar.isArray(e)?e:[e];const{length:n}=e;let r,a;const o={};for(let s=0;s<n;s++){let n;if(r=e[s],a=r,!ga(r)&&(a=ha[(n=String(r)).toLowerCase()],void 0===a))throw new sr(`Unknown adapter '${n}'`);if(a&&(ar.isFunction(a)||(a=a.get(t))))break;o[n||"#"+s]=a}if(!a){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(fa).join("\n"):" "+fa(e[0]):"as no adapter specified";throw new sr("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:ha};function ya(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ur(null,e)}function Ia(e){ya(e),e.headers=Lr.from(e.headers),e.data=Fr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ma.getAdapter(e.adapter||vr.adapter,e)(e).then((function(t){return ya(e),t.data=Fr.call(e,e.transformResponse,t),t.headers=Lr.from(t.headers),t}),(function(t){return jr(t)||(ya(e),t&&t.response&&(t.response.data=Fr.call(e,e.transformResponse,t.response),t.response.headers=Lr.from(t.response.headers))),Promise.reject(t)}))}const Ea="1.13.6",Aa={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Aa[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ca={};Aa.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ea+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,o)=>{if(!1===e)throw new sr(r(a," has been removed"+(t?" in "+t:"")),sr.ERR_DEPRECATED);return t&&!Ca[a]&&(Ca[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,o)}},Aa.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Sa={assertOptions:function(e,t,n){if("object"!=typeof e)throw new sr("options must be an object",sr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new sr("option "+o+" must be "+n,sr.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new sr("Unknown option "+o,sr.ERR_BAD_OPTION)}},validators:Aa},_a=Sa.validators;class ba{constructor(e){this.defaults=e||{},this.interceptors={request:new Ir,response:new Ir}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Qr(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Sa.assertOptions(n,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean),legacyInterceptorReqResOrdering:_a.transitional(_a.boolean)},!1),null!=r&&(ar.isFunction(r)?t.paramsSerializer={serialize:r}:Sa.assertOptions(r,{encode:_a.function,serialize:_a.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Sa.assertOptions(t,{baseUrl:_a.spelling("baseURL"),withXsrfToken:_a.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&ar.merge(a.common,a[t.method]);a&&ar.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Lr.concat(o,a);const s=[];let i=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const n=t.transitional||Er;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!i){const e=[Ia.bind(this),void 0];for(e.unshift(...s),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=s.length;let p=t;for(;u<d;){const e=s[u++],t=s[u++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ia.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return yr(Jr((e=Qr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ar.forEach(["delete","get","head","options"],(function(e){ba.prototype[e]=function(t,n){return this.request(Qr(n||{},{method:e,url:t,data:(n||{}).data}))}})),ar.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Qr(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ba.prototype[e]=t(),ba.prototype[e+"Form"]=t(!0)}));const Na=ba;class Ta{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,a){n.reason||(n.reason=new Ur(e,r,a),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ta((function(t){e=t})),cancel:e}}}const Pa=Ta;const Oa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oa).forEach((([e,t])=>{Oa[t]=e}));const va=Oa;const Da=function e(t){const n=new Na(t),r=pn(Na.prototype.request,n);return ar.extend(r,Na.prototype,n,{allOwnKeys:!0}),ar.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Qr(t,n))},r}(vr);Da.Axios=Na,Da.CanceledError=Ur,Da.CancelToken=Pa,Da.isCancel=jr,Da.VERSION=Ea,Da.toFormData=ur,Da.AxiosError=sr,Da.Cancel=Da.CanceledError,Da.all=function(e){return Promise.all(e)},Da.spread=function(e){return function(t){return e.apply(null,t)}},Da.isAxiosError=function(e){return ar.isObject(e)&&!0===e.isAxiosError},Da.mergeConfig=Qr,Da.AxiosHeaders=Lr,Da.formToJSON=e=>Pr(ar.isHTMLForm(e)?new FormData(e):e),Da.getAdapter=ma.getAdapter,Da.HttpStatusCode=va,Da.default=Da;const Ra=Da;function $a(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var xa=$a((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var wa=function(e,t){return wa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},wa(e,t)};function Ma(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}wa(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function La(e,t,n,r){return new(n||(n=Promise))((function(a,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((r=r.apply(e,t||[])).next())}))}function Fa(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=i(0),s.throw=i(1),s.return=i(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function ja(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ua(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return s}function ka(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function Va(e){return this instanceof Va?(this.v=e,this):new Va(e)}function Ba(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||i(e,t)}))},t&&(r[e]=t(r[e])))}function i(e,t){try{(n=a[e](t)).value instanceof Va?Promise.resolve(n.value.v).then(c,l):d(o[0][2],n)}catch(e){d(o[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function d(e,t){e(t),o.shift(),o.length&&i(o[0][0],o[0][1])}}function Ga(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ja(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,a){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,a,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Wa=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Ha(e){return"function"==typeof e}function qa(e){return Ha(null==e?void 0:e.then)}var za=$a((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function Ya(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ka=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=ja(o),i=s.next();!i.done;i=s.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(Ha(c))try{c()}catch(e){a=e instanceof za?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=ja(l),u=d.next();!u.done;u=d.next()){var p=u.value;try{Qa(p)}catch(e){a=null!=a?a:[],e instanceof za?a=ka(ka([],Ua(a)),Ua(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}if(a)throw new za(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Qa(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Ya(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ya(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),Ja=Ka.EMPTY;function Xa(e){return e instanceof Ka||e&&"closed"in e&&Ha(e.remove)&&Ha(e.add)&&Ha(e.unsubscribe)}function Qa(e){Ha(e)?e():e.unsubscribe()}var Za={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},eo={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=eo.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,ka([e,t],Ua(n))):setTimeout.apply(void 0,ka([e,t],Ua(n)))},clearTimeout:function(e){var t=eo.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function to(e){eo.setTimeout((function(){var t=Za.onUnhandledError;if(!t)throw e;t(e)}))}function no(){}var ro=ao("C",void 0,void 0);function ao(e,t,n){return{kind:e,value:t,error:n}}var oo=null;function so(e){if(Za.useDeprecatedSynchronousErrorHandling){var t=!oo;if(t&&(oo={errorThrown:!1,error:null}),e(),t){var n=oo,r=n.errorThrown,a=n.error;if(oo=null,r)throw a}}else e()}var io=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Xa(t)&&t.add(n)):n.destination=go,n}return Ma(t,e),t.create=function(e,t,n){return new po(e,t,n)},t.prototype.next=function(e){this.isStopped?fo(function(e){return ao("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?fo(ao("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?fo(ro,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ka),co=Function.prototype.bind;function lo(e,t){return co.call(e,t)}var uo=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ho(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ho(e)}else ho(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ho(e)}},e}(),po=function(e){function t(t,n,r){var a,o,s=e.call(this)||this;Ha(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&Za.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},a={next:t.next&&lo(t.next,o),error:t.error&&lo(t.error,o),complete:t.complete&&lo(t.complete,o)}):a=t;return s.destination=new uo(a),s}return Ma(t,e),t}(io);function ho(e){var t;Za.useDeprecatedSynchronousErrorHandling?(t=e,Za.useDeprecatedSynchronousErrorHandling&&oo&&(oo.errorThrown=!0,oo.error=t)):to(e)}function fo(e,t){var n=Za.onStoppedNotification;n&&eo.setTimeout((function(){return n(e,t)}))}var go={closed:!0,next:no,error:function(e){throw e},complete:no},mo="function"==typeof Symbol&&Symbol.observable||"@@observable";function yo(e){return e}function Io(e){return 0===e.length?yo:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Eo=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,a=this,o=(r=e)&&r instanceof io||function(e){return e&&Ha(e.next)&&Ha(e.error)&&Ha(e.complete)}(r)&&Xa(r)?e:new po(e,t,n);return so((function(){var e=a,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?a._subscribe(o):a._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Ao(t))((function(t,r){var a=new po({next:function(t){try{e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[mo]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Io(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ao(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Ao(e){var t;return null!==(t=null!=e?e:Za.Promise)&&void 0!==t?t:Promise}function Co(e){return Ha(e[mo])}function So(e){return Symbol.asyncIterator&&Ha(null==e?void 0:e[Symbol.asyncIterator])}function _o(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var bo="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function No(e){return Ha(null==e?void 0:e[bo])}function To(e){return Ba(this,arguments,(function(){var t,n,r;return Fa(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Va(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,Va(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Va(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Po(e){return Ha(null==e?void 0:e.getReader)}function Oo(e){if(e instanceof Eo)return e;if(null!=e){if(Co(e))return a=e,new Eo((function(e){var t=a[mo]();if(Ha(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Wa(e))return r=e,new Eo((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(qa(e))return n=e,new Eo((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,to)}));if(So(e))return vo(e);if(No(e))return t=e,new Eo((function(e){var n,r;try{for(var a=ja(t),o=a.next();!o.done;o=a.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if(Po(e))return vo(To(e))}var t,n,r,a;throw _o(e)}function vo(e){return new Eo((function(t){(function(e,t){var n,r,a,o;return La(this,void 0,void 0,(function(){var s,i;return Fa(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Ga(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Do(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var o=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(o),!a)return o}function Ro(e){return function(t){if(function(e){return Ha(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function $o(e,t,n,r,a){return new xo(e,t,n,r,a)}var xo=function(e){function t(t,n,r,a,o,s){var i=e.call(this,t)||this;return i.onFinalize=o,i.shouldUnsubscribe=s,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Ma(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(io);function wo(e,t){return void 0===t&&(t=0),Ro((function(n,r){n.subscribe($o(r,(function(n){return Do(r,e,(function(){return r.next(n)}),t)}),(function(){return Do(r,e,(function(){return r.complete()}),t)}),(function(n){return Do(r,e,(function(){return r.error(n)}),t)})))}))}function Mo(e,t){return void 0===t&&(t=0),Ro((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Lo(e,t){if(!e)throw new Error("Iterable cannot be null");return new Eo((function(n){Do(n,t,(function(){var r=e[Symbol.asyncIterator]();Do(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Fo(e,t){if(null!=e){if(Co(e))return function(e,t){return Oo(e).pipe(Mo(t),wo(t))}(e,t);if(Wa(e))return function(e,t){return new Eo((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(qa(e))return function(e,t){return Oo(e).pipe(Mo(t),wo(t))}(e,t);if(So(e))return Lo(e,t);if(No(e))return function(e,t){return new Eo((function(n){var r;return Do(n,t,(function(){r=e[bo](),Do(n,t,(function(){var e,t,a;try{t=(e=r.next()).value,a=e.done}catch(e){return void n.error(e)}a?n.complete():n.next(t)}),0,!0)})),function(){return Ha(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Po(e))return function(e,t){return Lo(To(e),t)}(e,t)}throw _o(e)}function jo(e,t){return t?Fo(e,t):Oo(e)}function Uo(e,t,n){var r=Ha(e)||t||n?{next:e,error:t,complete:n}:e;return r?Ro((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe($o(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;a=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;a=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;a&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):yo}function ko(e){return Ro((function(t,n){var r,a=null,o=!1;a=t.subscribe($o(n,void 0,void 0,(function(s){r=Oo(e(s,ko(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):o=!0}))),o&&(a.unsubscribe(),a=null,r.subscribe(n))}))}class Vo{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Vo(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const Bo=Vo;const Go=class{constructor(e,t,n,r={}){this.type=F.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},Wo=/(([^.]+)\[\d+\])/g,Ho=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(Wo);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},qo=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:zo,WHEN:Yo,DECLARATIVE_TARGET:Ko,PAGELIST:Jo}=j.CONTEXT_TREE_NODE_TYPES;const Xo=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[zo,new Map],[Yo,new Map],[Ko,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===Jo){const n=this.references.get(zo);n.set(e,t),this.references.set(zo,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=qo(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(zo),a=this.references.get(Ko);[...r.keys(),...a.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=Ho(e);return+n>=t})).forEach((e=>{const t=r.get(e),n=t?.parent;n?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Bo(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),a=r?.get(e);a?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,a){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const o=`${e}.${n}.${r}`,s=new Go(t,n,r,a),i=this.references.get("WHEN");i?.set(o,s)}},{VIEW:Qo,FIELD:Zo,CONTEXT:es,DECLARATIVE_TARGET:ts,WHEN:ns}=F.CONTEXT_TREE_NODE_TYPES;const rs=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new Xo(es,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const r=this.addContextNode(e).addNode("PAGE",t);let a=r.getReference(n);return a||(a=r.addNode("VIEW",n),r.addReference(n,a)),a}pushChildPageNodeToParentView(e,t,n){const r=e.children;let a=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){a=!0;break}a||r.push(t),t.parent=e}addViewNode(e,t,n,r){const a=this.addContextNode(e).addNode("PAGE",t);let o=null;if(r&&n!==r){o=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else o=a.addNode("VIEW",n);a.addReference(n,o);const s=t.split(".");for(;s.length>0;){s.pop();const n=s.join("."),o=this.getContextNode(e)?.getNode("PAGE",n),i=o?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,a,t);break}}return o}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,a){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const o=this.addContextNode(e),s=o.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,a);return s&&o.addReference(`${t}.${r}`,s),s}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,a){const o=this.getContextNode(e);o?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,a),o?.removeReference(`${t}${r}`,Zo,a),o?.removeReference(`${t}${r}`,ts,a)}removeViewNode(e,t,n,r){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),s=o?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=s?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&s?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),s=o?.getReference(n);s?.children.forEach((o=>{"PAGE"===o.type?this.removeViewNode(e,o.name,n,r):o.type===Qo?this.removeChildViewNodes(e,t,o.name,r):(a.removeReference(o.name,Zo,o.props.index),a.removeReference(o.name,ts,o.props.index),"PAGELIST"!==o.type&&"Address"!==o.props?.componentName||this.deleteAllListNodes(e,o.name))})),o?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const r=r=>{const a=this.getContextNode(e),o=a?.references?.get(r);if(o)for(const[e]of o)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&a?.references?.get(r)?.delete(e)};r(Zo),r(ts)}deleteListNode(e,t,n){const r=r=>{const a=this.getContextNode(e),o=a?.references?.get(r);if(o)for(const[e]of o)e.includes(`${t.join(".")}[${n}]`)&&a?.references?.get(r)?.delete(e)};r(Zo),r(ts)}getPageListNode(e,t,n,r){const a=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return a?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(Zo,r)}_findViewNode(e,t,n,r){let a=r.addNode("PAGE",t)?.getReference(n);if(a)return a;const o=t.split(".");for(;o.length>0;){o.pop();const e=o.join(".");if(a=r.addNode("PAGE",e)?.getReference(n),a)return a}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,a,o={}){const s=this.addContextNode(e),i=this._findViewNode(e,t,n,s),c=this.createFieldNode(i,t,r,o);return c&&this.updateFieldNode(s,i,c,e,t,r,a),c}createFieldNode(e,t,n,r){const{isDeclarativeTarget:a}=r;return a?e.addNode(ts,`${t}${n}`,r):e.addNode(Zo,`${t}${n}`,r)}updateFieldNode(e,t,n,r,a,o,s){const i=`${a}${o}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(r,n.name),e.addReference(i,n),n.value=s,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,r,a,o)}handleFieldInsideList(e,t,n,r,a){const o=Hp(n),s=yp(o,n)||{},i=`${r}${a}`;let c=null;if(s?.subscriptFieldName||s?.isPageGroup)c=r.substring(0,r.lastIndexOf(`.${s?.index??""}`))||i.substring(0,i.lastIndexOf(`.${s?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=r.substring(0,r.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let r=e.getReference(n,Zo);r||(r=t.addNode(Zo,n,{}),e.addReference(n,r))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const a=this.getContextNode(e),[o,s,i]=Ho(t);n.startsWith(".")&&(n=n.substring(1)),s&&this.mutatePageList(e,o,s,{...r,rowIndex:i});const c=a?.getReference(`${t}.${n}`,Zo);c&&c instanceof Bo&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,a){this.getPageListNode(e,t,n,r)?.addEventListener(a)}mutatePageList(e,t,n,r,a=!1){const o=this.getContextNode(e),s=o?.getReference(`${t}.${n}`,Zo);s&&s instanceof Bo&&s.triggerEvent(r,a)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(Zo)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(Zo)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(ts)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(Zo)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(ts)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(Zo)?.get(t);r instanceof Bo&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,Zo),n=this.getContextReferencesByType(e,ts);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,Zo)?.get(t)||!!this.getContextReferencesByType(e,ts)?.get(t)}addWhenNode(e,t,n,r,a,o){const s=this.getContextNode(e);s?.addWhen(t,n,r,a,o)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(ts)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,a=t.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:a,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(ns)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,a=e.name,o=e?.props?.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({name:a,pageReference:o,referenceName:n,type:t})})),r}},as={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},os=(e="",t="",n,r)=>{let a=[],o=[];null!==e&&(o=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const s=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){a=[j.CONTEXT_DATA,...s.split(".")];for(let e=0;e<o.length-1;e+=1)a.push(o[e]);a.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,o[o.length-1])}else n===F.PAGE?a=[...as.PAGE_MESSAGES_PATH]:n===j.HTTP?a=[...as.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?a=[...as.CASE_MESSAGE_PATH]:r&&(a=[j.CONTEXT_DATA,...s.split(".")]);return a.filter(Boolean)},ss=(e,t,n)=>{const r={content:{}},a=`${t.split(".").slice(2).join(".")}[${n}]`,o=Bf.getIn(e?.content,a.split("."));return o&&Bf.setIn(r.content,a.split("."),{...o}),r},is=(e,t,n,r,a,o,s={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,r,a),c=r>a?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),a=`${o}[${r}]`;s[`${o}[${r+("up"===c?1:-1)}]`]=Bf.getIn(e[t],[j.CONTEXT_DATA,...a.split(".")]),Bf.deleteIn(e[t],[j.CONTEXT_DATA,...a.split(".")])}));const l=Object.keys(s);l.length>0&&l.forEach((n=>{Bf.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],s[n])}))},cs=(e,t,n,r,a)=>{const o=Bf.deepClone(Bf.getIn(e,[`${t}`])),s=Bf.getIn(o,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!s)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),l=((e,t,n)=>{const r=Bf.getIn(e,[j.CONTEXT_DATA,...n.split(".")],{});return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(o,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const d=ss(s,i,r).content;if(d&&Object.keys(d).length>0){const n={},s=`${i}[${r}]`,c=Bf.getIn(o,[j.CONTEXT_DATA,...s.split(".")]);n[`${i}[${a}]`]=c,Bf.deleteIn(e[t],[j.CONTEXT_DATA,...s.split(".")]),is(e,t,l,r,a,i,n)}else is(e,t,l,r,a,i)},ls=e=>{const{type:t,property:n,category:r,context:a,pageReference:o}=e;let s;n&&(s=n.slice(1));const i=Tf(a);let c=[];const l=Bf.getIn(i,os(s,o,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===F.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&rs.mutateField(a,o,n,{messages:[...c],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},ds=e=>{const{property:t,pageReference:n,category:r,context:a,type:o,isListEntry:s,clearContextMessages:i,deletingIndex:c}=e,l={context:a,type:o};t&&!s?(rs.mutateField(a,n,t,{type:et,fieldName:t}),l.property=t,l.pageReference=n):s?(l.pageReference=n,l.isListEntry=s,l.deletingIndex=c):l.category=r,Nf(i?{type:et,payload:{stateObj:e.stateObj,context:a}}:{type:et,payload:l})},us=e=>{const{messages:t,property:n,pageReference:r,category:a,context:o}=e,s={messages:t,context:o};n?(s.property=n,s.pageReference=r):s.category=a,Nf({type:Ze,payload:s})},ps=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&ps(e[r],t,n)}t.pop()}return n},hs=(e,t)=>{let n=ls({context:j.APP.ROOT,category:"HTTP"});if(Oh.getRenderingMode()===j.EMBED){const e=ls({context:j.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=ls({context:t,category:"HTTP"});n?e&&(n=n.concat(ls({context:t,category:"HTTP"}))):n=ls({context:t,category:"HTTP"})}return n},fs=e=>{let t=null;t=xp(e)[0]?Pp(xp(e)[0]):e,t&&ds({context:t,stateObj:Tf(t),clearContextMessages:!0})},gs=e=>(Bf.getIn(Tf(e),as.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===j.CUSTOM_ERROR)),ms={addMessages:us,getValidationErrorMessages:(e,t)=>{const n=Tf(e),r=(e=>{let t=as.CONTENT_FIELDS_PATH;e?.objectInfo?t=$l.isObjectCaseType(e?.objectInfo?.objectTypeID)?as.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=as.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),a=Bf.getIn(n,[...r])||{},o=[];return ps(a,[],[]).forEach((e=>{const n=Bf.getIn(a,[...e,j.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===j.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?o.push({label:`${e.fieldLabel}:`,description:n}):o.push(n)}}))}))})),o},getMessages:ls,clearMessages:ds,getRootContainerHttpMessages:hs,clearContextMessagesInActiveWorkArea:fs,clearContextMessages:e=>{const{context:t}=e;Nf({type:et,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:gs};const ys=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const Is=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let a=0,o=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(o=a),a+=1})),-1!==o&&r.splice(o,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let o=!1;if(a&&this.subscribers[e].forEach((e=>{o=e.id===t&&e.contextName===r})),!o){const a=new ys(e,t,n,r);this.subscribers[e].push(a)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const Es=class{static subscribe(e,t,n,r=!1,a="app"){Is.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Is.publish(e,t)}static unsubscribe(e,t,n="app"){Is.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Is.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Is.clearContext(e)}};const As=new class{#e;#t;constructor(){this.#e="true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="true"===localStorage.getItem("inspectorFlag");this.#e=!e,localStorage.setItem("inspectorFlag",this.#e.toString()),Es.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,Es.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class Cs{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Cs(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Ys(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Ks()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,o=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,s=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:Th.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let l="";t?l=`&session_index=${t}`:`${c}`?l=`&UserIdentifier=${c}`:n&&(l=`&Password=${window.atob(n)}`);const d=new Uint8Array(64);window.crypto?.getRandomValues(d),this.config.codeVerifier=this.base64UrlSafeEncode(d),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${o}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${s}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";const t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,o=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:s}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),d=new URLSearchParams;return n&&d.append("client_id",n),r&&d.append("client_secret",r),d.append("grant_type","authorization_code"),d.append("code",l),a&&d.append("redirect_uri",a),s&&d.append("code_verifier",s),this.config?.secureCookie&&d.append("send_token_as_cookie","true"),Vs(o,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:d.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?qs({pzCTkn:e?.csrf}):(zs({tokenInfo:e}),qs({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const Ss=Cs,_s=async()=>new Promise((async(e,t)=>{const n=Js();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:o}=n.endPoints,{client_id:s,client_secret:i,secureCookie:c,serverType:l}=n,d="launchpad"===l,u={"content-type":"application/x-www-form-urlencoded"};i&&!d&&(u.authorization=`Basic ${window.btoa(`${s}:${i}`)}`);const p=new URLSearchParams;i?d&&(p.append("client_id",s),p.append("client_secret",i)):p.append("client_id",s),c&&p.append("send_token_as_cookie","true");const h=a?"refresh_token":"access_token",f="access_token"===h?r:a;!c&&f&&p.append("token",f),p.append("token_type_hint",h),o&&await Vs(o,{method:"POST",headers:new Headers(u),credentials:c?"include":"omit",body:p.toString(),withoutDefaultHeaders:!0}),qs({Authorization:null}),zs({tokenInfo:null}),e()})),bs=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Ss(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},Ns=(e,t)=>{bs(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Es.publish(F.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},Ts=e=>{let t="",n={},r={},a=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const o=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(a=!1),o.append("client_id",e.client_id),o.append("grant_type","refresh_token"),e.clientSecret&&o.append("client_secret",e.clientSecret),e.secureCookie&&o.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&o.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};zs({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?qs({pzCTkn:n?.csrf}):qs({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:a}=e;a&&"function"==typeof a&&a(n)},failure:t=>{if(e.popupReauth)return Ns(t,e);Es.publish(F.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:Ns};return{url:t,config:n,callback:r,isRefreshTokenPresent:a}},Ps=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Os=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},vs=(e,t,n)=>{const{config:r}=e,{url:a,config:o,callback:s,isRefreshTokenPresent:i}=Ts(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=Bs(r.url,r,c,t);return i?Vs(a,o).then((e=>new Promise(((n,a)=>{setTimeout((()=>{t.setUpdateSessionStatus(!1),t.latestUpdateSessionTimeStamp=Date.now(),s?.success?.(e,r),Es.publish("updateSession",{updateStatus:"success"}),Es.publish("OnUpdateSession",{}),l.then((e=>{n(e)})).catch((e=>{a(e)}))}),0)})))).catch((e=>e&&e.config&&Ps(e.config.url,n)?(s?.failure?.(r.url,n),l):Promise.reject(e))):(s?.failure?.(r.url,n),l)},Ds=(e,t,n,r)=>{if(e.config&&Ps(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&!t.getUpdateSessionStatus()&&e.config.fetchTimeStamp>t.latestUpdateSessionTimeStamp){if(Es.unsubscribeAllWithEventType(xs),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Es.publish(F.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=Os(e);return Bs(n,r,a,t)}return vs(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Os(e);return Vs(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&(400!==e.response.status||"Invalid inputs"!==e.response.data.errorClassification)&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[F.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[F.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=(e=>{if(e&&e.includes("/workarea")&&!e.includes("/modal")){const t=e.lastIndexOf("/workarea");if(-1!==t)return e.slice(0,t)}return e})(e.config.headers.context);return us({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Rs=class{constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const $s=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:As.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=qf.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:As.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:As.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(j.SKIPCOREHEADERS))return void delete e[j.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&V.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}};const xs="updateSession",ws={},Ms=new Rs,Ls=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(Es.unsubscribe(F.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{Es.publish(F.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),Es.subscribe(F.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let Fs={},js={},Us={},ks="";const Vs=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:o=n,includeRemoteSystemIdIfPresent:s=!0}=r;ks=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,responseType:l,adapter:d,withoutDefaultHeaders:u=!1,...p}=t,{Authorization:h,pzCTkn:f,...g}=t.headers||{};u||$s.injectCoreAdditionalHeaders(g,t.body,n,{includeRemoteSystemIdIfPresent:s}),o&&ws[o]>=0?ws[o]+=1:o&&void 0===ws[o]&&(ws[o]=1);let m=u?{...g}:{...$s.getDefaultHeaders(),...$s.getRegisteredHeaders(),...g,context:n};if(p.isExternalUrl=(e=>!e?.startsWith(E()||""))(e||""),p.fetchTimeStamp=Date.now(),e&&Ps(e,js)&&Ms.getUpdateSessionStatus()||!Ms.getUpdateSessionStatus()||p.isExternalUrl){Ps(e,js)&&"OAuth2.0"===js?.authType&&(m={...g});const{restApi:t}=Th.doesRestApiExist("Logout")&&Th.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Ls.setTimerID(Ls.resetInactiveTimeout(Ls.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,a){var o,s=!1;e.subscribe({next:function(e){o=e,s=!0},error:a,complete:function(){s?r(o):n?r(t.defaultValue):a(new xa)}})}))}(jo(Ra({context:n,...p,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},responseType:l,adapter:d,headers:m,withCredentials:(y=js,!("OAuth2.0"!==y?.authType||!y.secureCookie)||!("custom"!==y?.authType||!y.customCookies)||void 0)})).pipe(Uo((()=>{const e=$s.getCoreHeadersFromContext(m.context);var t;e&&(t={...e},Es.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,t))})),ko((e=>{const t=m,n=!!t?.[j.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:t?.[j.COREHEADER_APP_DEBUG_ID],[j.COREHEADER_APP_DEBUG_LEVELS]:As.getDebugLevels()}}:$s.getCoreHeadersFromContext(m.context);var r;throw n&&(r={...n,error:e},Es.publish(j.PUB_SUB_EVENTS.FETCH_FAILURE,r)),e}))))}var y;return Bs(e,t,n,Ms)},Bs=(e,t,n,r)=>new Promise(((a,o)=>{Es.subscribe(xs,(s=>{r.setUpdateSessionStatus(!s.updateStatus),"success"===s.updateStatus?Vs(e,t,n).then((e=>a(e))).catch((e=>o(e))):o(s.updateStatus.error)}),xs)})),Gs=e=>{ws[e]>0&&(ws[e]-=1,0===ws[e]&&delete ws[e])};Ra.interceptors.request.use((e=>(Fs.request&&(e=Fs.request(e)),e)),(e=>Promise.reject(e))),Ra.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),us({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(ls({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&ds({type:"error",category:"HTTP",context:e.config.headers.context}),ls({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&ds({type:"error",category:"PAGE",context:e.config.headers.context})),Gs(e.config.headers.context)),Fs.response&&(e=Fs.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Gs(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config.isExternalUrl||e.config&&Ps(e.config.url,js)||Es.subscribe(xs,(e=>{Ms.setUpdateSessionStatus(!e.updateStatus)}),xs),Ds(e,Ms,js,e.response&&e.response.status&&e.response.status===Number(ks)?ks:null))));const Ws=()=>Ra.CancelToken.source(),Hs=e=>Ra.isCancel(e),qs=e=>{$s.setDefaultHeaders(e)},zs=e=>{js={...js,...e}},Ys=e=>{Us={...Us,...e}},Ks=()=>({...Us}),Js=()=>({...js});const Xs=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),a=Number(r)+1;return`${e.substring(0,t)}(${a})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),r=e.substring(t+1,n),a=Number(r);if(!Number.isNaN(a)){const r=a-1;return`${e.substring(0,t)}[${r}]${e.substring(n+1)}`}}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}};const Qs=class{static execute(e,t,n,r){const a={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const o={instruction:"string"==typeof t?"ADD":"INSERT",content:{...Bf.unflatten(n)}},s=JSON.parse(JSON.stringify(o));delete s.content.classID;return{instruction:{target:Bf.buildInstructionPageReference(r,e),content:{...s.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:o,displayPropertPayload:a}}};const Zs=class{static execute(e,t,n,r,a,o,s,i){const c={instruction:"UPDATE",content:{...Bf.unflatten(r)},isDefault:i},l={content:{...c.content},target:Bf.buildInstructionPageReference(a,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return o||Nf(vg({...c,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${a}${t}`,skipDirtyValidation:s})),l}};const ei=class{static execute(e,t,n){return{target:Bf.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const ti=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:Bf.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||Nf(vg({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const ni=class{static execute(e,t,n,r){return{target:Bf.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const ri=class{static execute(e,t,n){const r={instruction:"REPLACE",content:{...Bf.unflatten(t)}};return{instruction:{target:Bf.buildInstructionPageReference(n,e),content:{...r.content},instruction:"REPLACE"},actionPayload:r}}};const ai=class{static execute(e,t){return{target:Bf.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const oi=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const si=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new oi(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const r=e.getValue(this.target)||[];if(Array.isArray(r)){if(t)return void r.forEach(((e,r)=>{t.forEach((t=>{const a=Al(t),o={};let s=!0;n&&(o[Al(n)]=crypto.randomUUID(),s=!1);const i={[a]:Bf.getIn(e,a),...o};this.update(i,r+1,s,{isDefault:!0,skipDirtyValidation:!0})}))}));r.forEach(((e,t)=>{if(n&&!e[Al(n)]){const e={};e[Al(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&r&&"object"==typeof r&&!Array.isArray(r)&&Object.keys(r).length>0&&this.processObjectRows(r,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((r=>{const a=e[r];t.forEach((e=>{const t=Al(e),o={};let s=!0;n&&(o[Al(n)]=crypto.randomUUID(),s=!1);const i={[`${t}`]:Bf.getIn(a,t),...o};this.update(i,r,s,{isDefault:!0})}))}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,r){const{isDefault:a=!1,skipPageinstruction:o,skipDirtyValidation:s=!1}=r,i=Zs.execute(this.contextName,this.target,t,e,this.pageReference,n,s,a);if(!o){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=Lf(Bf.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.groupIndex!==t&&this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(i),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=Lf(Bf.deepClone(t),Bf.unflatten(e),r)}}}delete(e,t){const n=ei.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||Nf(vg({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:a,actionPayload:o={content:{}},displayPropertPayload:s={}}=Qs.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=Lf(Bf.deepClone(n),e,r)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=a:this.insertNode(a),n||(o.content={...o.content,...s},Nf(vg({...o,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:r.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e,t){const{instruction:n,actionPayload:r}=ri.execute(this.target,e,this.pageReference);this.insertNode(n),t||Nf(vg({...r,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}deletePage(e){const t=ai.execute(this.target,this.pageReference);this.insertNode(t),e||Nf(vg({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=ni.execute(this.target,e,t,this.pageReference);this.insertNode(r),Nf(vg({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=ti.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),ti.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=Lf(Bf.deepClone(t),e)}},ii={},ci={},li={},di=(e,t,n)=>{ii[e]||(ii[e]={}),ii[e][t]||(ii[e][t]={content:[]}),ci[e]||(ci[e]=[],li[e]=[]),Il.isStateMachineExist(e,n,t)||Il.setStateMachine(e,t,n,new si(t,n,e))},ui=e=>Xs.formatPageReference(e),pi=(e,t)=>{const n=ci[e],r=li[e],a=Al(t),o=a?.substring(0,a.indexOf("["));r?.indexOf(o)<0&&li[e].push(o),n?.indexOf(a)<0&&ci[e].push(a)},hi=e=>{delete ci[e]},fi=e=>Il.buildPageInstructionsByContext(e),gi=e=>{Il.clearStateMachines(e),delete ii[e]},mi=(e,t,n,r)=>{let[,a]=t.split(`${e}[${r}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(n).forEach((e=>{n[`${a}.${e}`]=n[e],delete n[e]})))},yi=(e,t,n,r,a)=>{const{skipStateUpdate:o=!1,insertIfEmpty:s=!1}=a||{},i=n.getContextName(),c=n.getReferenceList(),l=r||n.getPageReference(),d=ui(c);di(i,d,l),pi(i,`${c}[${t}]`),mi(c,l,e,t);const u={instruction:j.LIST_ACTIONS.INSERT,content:{...Bf.unflatten(e)}};delete JSON.parse(JSON.stringify(u)).content.classID;const p=Il.getStateMachine(i,l,d);s&&p?.root||p.insert(e,t+1,o,{c11nEnv:n})},Ii=(e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:o}=r,s=t.getContextName();let i=t.getReferenceList();const c=o||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(F.CONTENT)+F.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=ui(i);di(s,l,c),pi(s,`${i}[${n}]`),mi(i,c,e,n);Il.getStateMachine(s,c,l).update(e,n+1,a,r)},Ei=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Ai=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(Ei(e,n)){const n=Bf.getPropertyName(e),a=n.substr(n.indexOf(".")+1).split(".");if(a.length>1){let e=Bf.getIn(t,a)??"";if(!e){const n=`!P!${a.join(":")}`;e=Bf.getIn(t,n)??""}Bf.setIn(r,a,e)}else{const e=Bf.getIn(t,a)??"";r[a[a.length-1]]=e}}})),r},Ci=(e,t,n,r,a)=>{const o=e.getValue(t)||{};n&&Object.keys(o).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},Si=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:o,selectionList:s,required:i}=t.getConfigProps(),c=o===j.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let d=t.getPageReference(),u=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,d,s);const p=t.getRawMetadata();let h=null;const f=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);f&&(u=p?.config?.dataRelationshipContext,h=d.concat(".").concat(u),d=h);const g=((e,t,n)=>e?`${t}${n}`:t)(c,d,s),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,u,h),{datasource:{parameters:y={}}}=m,I={...y};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=Bf.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,m,c),c){let n=s;n=ui(n);const r=t.getValue(g)||[];di(t.getContextName(),n,d);const o=[];let i=r.length;e.forEach((e=>{const t=Ai(y,e,u),s={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;s[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!a){const r=Il.getStateMachine(l,d,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}o.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...s}})})),Nf(vg({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${d}.${u}`,actions:o}))}else{const n=Ai(I,e[0],u);Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],f?{contextPageReference:d}:{}),t.getActionsApi().triggerFieldChange(`.${u}.${e}`,n[e])}))}Ci(t,g,i,c,u),r()})),_i=e=>{if(!e)return!1;const t=(n=e,Il.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const bi=(e,t,n={})=>{const{skipStateUpdate:r=!1}=n,a=e.getPageReference(),o=ui(t);di(e.getContextName(),t,a);Il.getStateMachine(e.getContextName(),a,o).deleteAll(r)},Ni=e=>({insert:(t,n,r,a)=>yi(t,n,e,r,a),update:(t,n,r)=>Ii(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r={})=>{const a=n.getPageReference(),{stateMachineTarget:o}=Il.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),`${a}${e}`.endsWith("]"));if(!o){let e=a.substring(0,a.lastIndexOf("["));e||(e=a.substring(0,a.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&di(n.getContextName(),t,e)}Il.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:a=!1}=r||{},o=t.getContextName(),s=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+s}[${e}]`,l=ui(s);ds({type:F.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:o,isListEntry:!0,deletingIndex:e}),di(o,l,i),pi(o,`${s}[${e}]`);const d=Il.getStateMachine(o,i,l);"string"==typeof e?d.delete(e,a):d.delete(e+1,a);const u=Il.getUnConnectedStateMachines(o)||{};Object.keys(u).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(u[e]=null)}))})(t,e,n,r),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),o=n.getPageReference(),s=ui(a);di(r,s,o),rs.deleteAllListNodes(r,`${o}${s}`,!1),pi(r,`${a}[${t}]`),Il.getStateMachine(r,o,s).move(e+1,t+1);const i=Il.getUnConnectedStateMachines(r)||{};Object.keys(i)?.forEach((e=>{e.includes(`${o}${s}`)&&e!==`${o}${s}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Si(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let o=t.getPageReference();const s=n===j.LIST_SELECTION_MODE.MULTI;let i=s?r.substring(1):o.substring(o.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=o.concat(".").concat(i),o=l);const d=s?`${o}${r}`:o;let u=t.getValue(d)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=s?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return Ei(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),a=e.getPageReference(),o=t,s=`${a}${t}`;return new Promise((t=>{let i=o;i=ui(i),di(r,i,a),Il.getStateMachine(r,a,i).deleteAll(),Ci(e,s,n,!0,o),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:o,referenceList:s}=e.getComponentConfig();let i;if(r===j.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===o&&s&&(i=e.getStateProps().referenceList),i){i=ui(i);const r=Il.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const a=e.getContextName(),o=e.getPageReference(),s=ui(t);di(a,s,o),Il.getStateMachine(a,o,s).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n)=>bi(e,t,n),replacePage:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:a=!1}=r||{},o=e.getPageReference(),s=e.getContextName();di(s,t,o),pi(s,Bf.buildInstructionPageReference(o,t)),Il.getStateMachine(s,o,t).replacePage(n,a)})(e,t,n,r),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:r=!1}=n||{},a=e.getPageReference(),o=e.getContextName();di(o,t,a),pi(o,Bf.buildInstructionPageReference(a,t)),Il.getStateMachine(o,a,t).deletePage(r)})(e,t,n)});const Ti=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?Bf.mergeDeep(e,this.fieldDefaults):Bf.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},Pi="downloadAttachment",Oi={},vi=e=>{const t=Ws();return Oi[e]=t,t},Di=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},Ri=e=>{let t,n,r,a;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,a=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:Di(e.pyMimeFileExtension||e.MimeType),error:e.error||null,thumbnail:e.thumbnail||null},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:a,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null),localAttachment:!!e.localAttachment}}},$i=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,"pyCount"))n=!0,t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>Ri(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(Ri)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},xi={uploadAttachment:(e,t,n,r,a)=>{const o=new FormData;o.append("appendUniqueIdToFileName","true"),o.append("file",e),a&&o.append("contextID",a);const{restApi:s,reqType:i}=Wg("uploadAttachment",{});return Vs(s,{method:i,headers:{"Content-Type":"multipart/form-data"},body:o,onUploadProgress:t,signal:vi(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(Hs,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete Oi[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(a.signal=vi(n).token)}const{restApi:o,reqType:s}=Wg("linkCaseAttachment",{caseID:e});return Vs(o,{...a,body:{attachments:t},method:s},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=Wg("getCaseAttachments",{caseID:e,includeThumbnail:n});return Vs(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=Wg("getAttachmentCategories",{caseID:e,type:t});return Vs(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Wg(Pi,{attachmentID:e});return Vs(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Wg("editAttachment",{attachmentID:e});return Vs(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Wg("deleteAttachment",{attachmentID:e});return Vs(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Wg("downloadDocument",{documentID:e});return Vs(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=Wg("deleteDocument",{caseID:e,documentID:t});return Vs(r,{method:a},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{Oi[e]&&(Oi[e].cancel(),delete Oi[e])},buildFilePropsFromResponse:Ri,getAttachmentURL:e=>{const{restApi:t}=Wg(Pi,{attachmentID:e});return t},prepareAttachmentData:$i,validateAttachments:(e,t)=>{let n=e;if("object"==typeof t&&"attachments"in t){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=$i(t);0===e.length&&(n="")}return n}};class wi{constructor(){this.validators={}}static messageDispatcher(e,t,n,r,a){if(r){const o=[];o.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),us({messages:o,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,a,o){const{required:s,value:i}=o;let c=null;if(!("true"!==s&&!0!==s)){let s=r;switch(e){case"radiobuttons":s=i;break;case"attachment":s=xi.validateAttachments(r,i);break;case"checkbox":s&&"false"!==s||(s="");break;default:"string"==typeof s&&(s=s.trim())}c=this.getValidator("required")(s),wi.messageDispatcher(t,n,a,c,Xs.getFieldLabel(o))}return c}validateType(e,t,n,r,a,o){let s=null;const i={pageReference:n,context:a,property:t,target:o?.target,required:o?.required};let c=Ti.getDefaultsforType(o?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(s=this.getValidator(e)(r,i),(""!==r||Ti.getDefaultsforType(o?.componentName||"")?.showErrorWhenEmpty)&&wi.messageDispatcher(t,n,a,s,o?.label));const l=o?.validationType;return c=l&&Ti.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(s=this.getValidator(l)(r,i),wi.messageDispatcher(t,n,a,s,o?.label)),s}validate(e,t,n,r={}){const{context:a,disabled:o,readOnly:s,pageReference:i,skipRequiredValidation:c}=r;let l=null;return o||s||(c||(l=this.validateRequired(e,t,i,n,a,r)),l||(l=this.validateType(e,t,i,n,a,r))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const Mi=new wi,Li=(e,t)=>{e.DeclareExpressions&&t.context&&on({[t.context]:e.DeclareExpressions})},Fi=(e,t,n=!1)=>{const r=Bf.getIn(e,j.RESOURCES);r&&((e=>{e&&ef(e)})(r),Li(r,t)),n||Xg({...e,options:t})};class ji{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:o=Hc.PAGE,pageName:s,context:i=j.APP.APP,debugInfo:c,headers:l,retrieveActionViewForNewObject:d=!1}=t;let u={};n&&n.content&&(u=n.content);const{content:p,pageInstructions:h}=ji.getExternalObjectContent(e,d,i);let f={[ji.getKeyBasedOnWorkType(e)]:e,content:{...u,...r,...$l.isExternalObject(e)&&!d&&{...p}}};f={...f,...$l.isExternalObject(e)&&!d&&{pageInstructions:h},...!$l.isObjectCaseType(e)&&{processID:a}};const g=ji.getObjectTypeViewPayload(d,e);return Vi($l.getRouteKeyForCreateWork(e,d),{body:f,queryPayload:{...g,caseClassName:e,viewType:o,params:{pageName:s}},headers:{...l,...c&&{...$s.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:f,headers:zc(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?{objectTypeID:t,actionID:"Create"}:{};static getExternalObjectContent=(e,t,n)=>{if($l.isExternalObject(e)&&!t){const e=Yc(n,{isExternalObject:!0}),{content:t,pageInstructions:r}=e.content;return{content:t,pageInstructions:r}}return{}};static getKeyBasedOnWorkType=e=>$l.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const Ui=ji,ki=()=>({registerHeader:(...e)=>$s.registerHeader(...e),unRegisterHeader:(...e)=>$s.unRegisterHeader(...e),getRegisteredHeaders:()=>$s.getRegisteredHeaders()}),Vi=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:o,adapter:s},i,c)=>{const{restApi:l,reqType:d}=Wg(e,n),u={method:d,headers:a,body:t,...o&&{responseType:o},...s&&{adapter:s}};return r&&(u.signal=r.token),Vs(l,u,i,c??{})},Bi=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},o)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return Vs(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},o)},Gi=e=>Th.doesRestApiExist(e),Wi=()=>Ws(),Hi=e=>Hs(e),qi=e=>{Fs=e},zi=()=>Ui,Yi="getCustomComponent",Ki="text/javascript";const Ji=new class{getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=Oh.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r);let o=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(o=this.loadAndCustomerComponentsConfig(t,e));const s=[],i=Oh.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([a,o]),[n,r]=t,i=[];for(const t of r)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);s.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([a,o,e]).then((e=>{const t=this.mergeComponentList(e);s.push(...t)}))}if(n.alternateDesignSystemURL&&1===s.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s[0].alternateDesignSystemConfig=r}return{data:{components:s}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,o=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(o).length>0?{...e,alternateDesignSystemConfig:{...o}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let a=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(a=!1):r[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const r=Oh.environmentInfoObject?.pyInfinityStaticService;if(r){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync("D_pzGetComponentsConfig","",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(e)))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&a?.data?.components?.length>0&&(a.data.components=a.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===a?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);a.data.components[0].alternateDesignSystemConfig=r}return a}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){const t=Oh.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:r,callUrl:a}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[a]||(this.imageBlobUrlCache[a]=this.fetchImage(n,r,a,t)),this.imageBlobUrlCache[a]}buildImageRequest(e,t){let n,r="getBinaryFile",a=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^\s!]+)!.*\/OPERATORIMAGES\//i,o=e.match(t);o&&o[1]?(r="getOperatorImage",n={user_ID:o[1].toLowerCase()}):n={fileID:e},a=Wg(r,n)?.restApi||a}return{callUrlKey:r,queryPayload:n,callUrl:a}}fetchImage(e,t,n,r){return r?Vi(e,{queryPayload:t}).then((e=>{const n=this.decodeBase64ToByteArray(e.data),r=this.getMimeTypeFromKey(t?.fileID||t?.user_ID||""),a=new Blob([n],{type:r});return window.URL.createObjectURL(a)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}getMimeTypeFromKey(e){const t={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"},n=e.toLowerCase().split("!").pop()||"";return t[n]?t[n]:"application/octet-stream"}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e+=1)r[e]=t.charCodeAt(e);return r}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=Oh.environmentInfoObject?.pyInfinityStaticService;if(t){const t=Oh.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?Bf.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`;return(await Vi(Yi,{queryPayload:{componentName:r}})).data}const n=Oh.environmentInfoObject?.pyC11nDXCBDevURL,r=n?`${n}/index.js`:`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,a=await fetch(r,n?{}:{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!a.ok)throw new Error(a.statusText);return await a.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e){try{const t=Oh.environmentInfoObject?.pyInfinityStaticService,n=Oh.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(n){r=`${n.replace(/\/+$/,"")}/index.js`}if(t&&!n){const t=Oh.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?Bf.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`,a=await Vi(Yi,{queryPayload:{componentName:r}});return void this.appendCustomScriptToHead(a.data)}if(t||n){const e=document.createElement("script");return e.src=r,e.type="text/javascript",e.onerror=()=>console.error("Error while appending custom component map"),void document.head.appendChild(e)}const a=n?{}:{headers:{Authorization:`Bearer ${this.b2sJWT}`}},o=await fetch(r,a);o.ok||console.error("Error while fetching custom component map");const s=await o.text();this.setCCV2LibId(e),this.appendCustomScriptToHead(s)}catch(e){console.error("Exception while appending custom component map:",e)}}async appendCustomScriptToHead(e){try{const t=document.createElement("script");t.src=window.URL.createObjectURL(new Blob([e],{type:Ki})),t.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(t)}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([r],{type:Ki})),a.onload=()=>t(e),a.onerror=()=>n(e),document.head.appendChild(a)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);if("script"===t){const t=a;t.onload=()=>{n(e)},t.onerror=()=>{r(e)},t.type=Ki,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=a;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(a)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=n?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",r=decodeURIComponent(n.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),a=JSON.parse(r),o=a?.tenant_id,{restApi:s,reqType:i}=Gg("getAssetsFromIsolations",{isolationID:o,assetPath:e})||{},c=`${this.appStaticUrl}${s}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},Xi="component-loader",Qi={},Zi=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=Ji.getLoader(),r=t||Ji.staticServerURL;if(Ji.getLoader(Xi))return Ji.getLoader(Xi)(e,r);const a=new Set(Object.keys(Qi)),o=e.flatMap((e=>{if(a.has(e))return[];const t=ln.getComponent(e);if(!t){const t=`${Ji.getConstellationServiceUrl()}/v860/${Ji.getAppAlias()}/component/${e}.js`;return a.add(e),[n(t,Ji.getTypes.SCRIPT)]}const o=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${r}${e}`,Ji.getTypes.SCRIPT))),s=(t.styles||[]).map((e=>n(`${r}${e}`,Ji.getTypes.STYLE)));return a.add(e),[...o,...s]}));return Promise.all(o.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))};const ec=new class{#n;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#n=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?Bf.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Gi("getUserSettings")){const{restApi:e,reqType:t}=Wg("getUserSettings");Vs(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{Oh.getUserSettings()?this.userSettings=Oh.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return Bf.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let n;if(!Gi("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=Wg("updateUserSettings");const{restApi:r,reqType:a}=n;return Vs(r,{method:a,body:Bf.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#n){this.#n=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};Es.subscribe(j.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}getURLParam(e,t){let n=new URL(window.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!Oh.shouldUseURLParams())return;const r=new URL(window.location.href);if(t=n?btoa(t):t,r.searchParams.get(e)===t)return;r.searchParams.set(e,t);window.history.pushState({type:"ui-navigation"},"",r)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const tc=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&Nf({type:se,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>{setTimeout((()=>t(e)),this.pauseDuration)}));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&Nf({type:ie,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}};const nc=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",o,s=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:o};return this.actionMgrActions[e]=i,s&&tc.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,r;""===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,a,n,r,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let a=e;return r?(setTimeout((()=>{r.resolve(t)}),0),tc.disableLoadingIndicator(r.actionPayload,n)):a=null,a}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let a=e;return r?(r.reject(n),tc.disableLoadingIndicator(r.actionPayload,t)):a=null,a}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=V.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=U,e.gadgetId=t.gadgetId??$l.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}};class rc{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const ac=rc,oc=(e,t,n)=>Th.getResolvedSemanticURL(e,t,n),sc={getResolvedSemanticURL:oc,getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ue,ACTION_SHOWVIEW:je,ACTION_GETOBJECT:bt,ACTION_SHOWINSIGHT:ke,ACTION_SHOWDASHBOARD:Ve}),updateSemanticURLAndDocumentTitle:e=>Th.updateSemanticURLAndDocumentTitle(e),getSemanticURLForToaster:(e,t,n=!1)=>oc(n?bt:Be,{caseClassName:e},{[n?"objectID":"workID"]:t})},ic={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${j.DATA}.${j.CASE_INFO.BUSINESS_ID}`},cc=e=>Bf.getIn(e,j.getProperty(ic.CASE_CLASS_NAME),j.EMPTY_STRING),lc=e=>Bf.getIn(e,j.getProperty(ic.CASE_INFO_ID),j.EMPTY_STRING),dc=(e,t)=>{const n=lc(t);Bf.setIn(e,"key",n)},uc=e=>Bf.getIn(e,j.getProperty(ic.CASE_INFO),{}),pc=e=>{const t=bf();if(!e)return!1;const n=W(e),r=Hp(n),a=Hp(e);if(!r||!a)return!1;const o=yp(r,n),s=yp(a,e);if(!o||!s)return!1;const{key:i}=o;let{key:c}=s;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},hc=e=>{const t=lc(e),n=Bf.getIn(e,j.getProperty(ic.BUSINESS_ID),j.EMPTY_STRING),r=t.toLowerCase().includes(n.toLowerCase())?n:t,a=cc(e);return{businessID:n,caseType:a,resolvedURL:sc.getSemanticURLForToaster(a,r,$l.isObjectCaseType(a))}},fc=e=>{Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},gc=e=>{Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},mc=e=>{Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},yc={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Ic=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||ac.getTargetViewContainerName(e)},Ec=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},Ac=e=>e===hp.WORKAREA,Cc=e=>e===hp.MODAL,Sc=e=>e===Re,_c=e=>e===Ee,bc=e=>e&&e.find((e=>e.type===Ee)),Nc=e=>Bf.getIn(e,yc.CASE_INFO,{}),Tc=e=>e?e.split(" ").pop():void 0,Pc=e=>Bf.getIn(e,yc.CASE_CLASS_NAME,j.EMPTY_STRING),Oc=(e,t=!1)=>{const n=t?uc(e):Nc(e);return wl(n)&&Ml(Oh.getOperatorIdentifier(),n)},vc=e=>Bf.getIn(e,yc.CASE_INFO_ID,j.EMPTY_STRING),Dc=e=>Bf.getIn(e,yc.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),Rc=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(Ng(Ig,{containerItemID:t,context:a||Dp(t),target:r}))}},$c=e=>{const t=bf();if(!e)return!1;const n=W(e),r=Hp(n),a=Hp(e);if(!r||!a)return!1;const o=yp(r,n),s=yp(a,e);if(!o||!s)return!1;const{key:i}=o||{};let{key:c}=s||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},xc=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=vc(t);Bf.setIn(e,"key",a);const o=wl(Nc(t));if(!r&&(e=>{const t=Bf.getIn(e,yc.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=Dc(t),[,r]=n.split("!");s={assignmentID:n,isInCreateStage:o},Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,s),Bf.setIn(e,"flowName",r)}var s},wc=(e,t)=>{const{attachmentsExist:n}=t;n&&Bf.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),Bf.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Mc=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return bc(e)?(r=j.PROMISE_VALUE.REJECT,n?nc.rejectActionByID(t,!0,n):nc.rejectActionByID(t)):nc.resolveActionByID(t),r},Lc=e=>{const t=Oh.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},Fc=()=>"true"===Oh?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,jc=(e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r){const{caseClassName:o,skipAssignmentsUpdate:s}=n,i=W(r),c=Hp(i),l=c&&mp(c),d=c&&Pp(c),u=Y(i);d&&l?.items?.[d]?.key===t?.caseID&&e.push(Ng(eg,{containerItemID:i,context:i,container:u,containerName:u,caseId:a,viewName:F.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:i},caseClassName:o,...void 0!==s&&{skipAssignmentsUpdate:s}}))}},Uc=(e,t)=>{const n=Pc(e?.response),r=Nc(e?.response),{caseTypeID:a}=r,o=Oh.getFeatureMap();(o?.deferUpdateCaseSummaryView??!Object.hasOwn(o,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&nf(j.CASESUMMARY_VIEW_NAME,a)&&jc(t,e?.actionInPayload,{caseClassName:n,skipAssignmentsUpdate:!e?.actionInPayload?.context?.includes(j.PREVIEW)})},kc=e=>Tf(e)?.context_data?.caseViewMode;class Vc{constructor(e){Vc._instance=this,this.context=`${e}/${j.SUGGESTION}`,bf()?.getState().data?.[this.context]||Nf({type:Fe,payload:{context:this.context,data:{}}})}getField(e){return vf(e,"",this.context)}setField(e,t){Nf({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){Nf({type:me,payload:{reference:e,context:this.context,...t}}),Es.publish(j.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){Nf(Qf({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Bc=Vc;const Gc=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=Pf();return n?Bf.getIn(n,t):null}static setSharedState(e,t){e&&Nf(Rg({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:o,removePropertyFromChangedList:s=!1,skipDirtyValidation:i=!1}=r;if(!e||!t)return;Nf($g({context:e,reference:o?`${o}.${t}`:t,value:n,isArrayDeepMerge:a,removePropertyFromChangedList:s,skipDirtyValidation:i}))}static getSuggestionsContext(e){return new Bc(e)}static triggerRefresh(e,t){Bu({context:e,pageReference:t})}},{RESOURCE_TYPES:Wc}=F,Hc={PAGE:"page",FORM:"form"},qc={[Wc.CASE]:[We,Be,Ge],[Wc.OBJECT]:[_t,bt,Tt],[Wc.PAGE]:[je,ke],[Wc.DATA]:[Ue],ASSIGNMENT:[Qe]},zc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a:t&&V.isRemoteCase(t)&&(r.RemoteSystemID=V.getRemoteHeader(t)),r},Yc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:a=!0,isTransientContext:o=!1,includeDisabledFields:s=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=Pl(e,{isTransientContext:o,includeDisabledFields:s,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,o&&(l={}));const d=Zu(e,!1);!o&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const a=Tf(t),o=v()(a,F.CASE_INFO.CASE_INFO_CLASSID),s=Yh(n,o);("True-False"===s?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(l,e);const u=x()(d,l);let p={};({content:p}=((e,t,n=!1,r=!1)=>{let a={};const o=n||r?t?.objectInfo:t?.caseInfo;return(e||o)&&(a=e?{...t}:{...o}),{content:a}})(o,u,i,c));const h=[...fi(e)];a&&h.forEach((e=>{delete e.content?.EmbedListUUID__})),p.pageInstructions=h;if((ci[e]||[]).forEach((e=>{if(p?.content){const t=e?.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");Bf.deleteIn(p.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!o&&u?.dataInfo)return p={...u.dataInfo,pageInstructions:p.pageInstructions},{content:p};const f=vf(".pzAdditionalPayload",j.CASE_INFO.CASE_INFO_CONTENT,e);return p.content&&f&&(p.content.pzAdditionalPayload=f),{content:p}},Kc=(e,t)=>{let n,r,a={};const o=Bf.getIn(e,j.UI_RESOURCES),s=Bf.getIn(e,"confirmationNote");o?(n=Bf.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=Bf.getIn(e,j.ROOT),a=Bf.getIn(e,j.ACTION_BUTTONS)):s&&(r={});const{data:i={},Errors:c,flowName:l}=e;let{semanticURL:d,key:u}=e;const p=i?.objectInfo?.ID;p&&(u=u||p,d=d||`objects/${p}`);const h=Bf.getIn(e,"nextAssignmentInfo",null),f=Bf.getIn(e,"nextAssignmentInfo.context",""),g=Bf.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:y,debugInfo:I,isExternalObjectCreationFlow:E}=t;return{data:{...i,key:u,flowName:l,coreHeaders:I&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:I.debugId}},[j.getProperty(j.CASE_INFO.CASE_INFO)]:{...i[j.getProperty(j.CASE_INFO.CASE_INFO)],actionButtons:a,headers:t.headers},[j.CONTEXT_DATA]:m?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:y,errors:c,isExternalObjectCreationFlow:E}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:d,nextAssignmentInfo:h,assignmentContext:f,confirmationLinks:g,key:u,root:r,...t}},Jc=async(e,t,n,r=!1,a=!1)=>{const o=Bf.getIn(e,j.COMPONENTS);if(o)try{await Zi(o)}catch(e){console.error(e)}const s={actionConfig:t,...n};r?Xg({...e,options:s,directUrlUpdation:!0}):Fi(e,s,a)},Xc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},Qc=e=>{if(e){const[,t]=e.split("!");return{key:Xc(e),flowName:t}}return{}},Zc=(e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const a=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),o=`${a}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,s=Bf.deepClone(e);s[j.ERROR_FIELD_IN_PAGE]=a,t.includes(o.slice(1))||t.includes(o.substring(o.indexOf(".")+1,o.indexOf("[")))||t.includes(o.substring(o.indexOf(".")+1,o.indexOf("(")))?r.push(s):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const a=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):n.push(e);break}default:n.push(e)}},el=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,o=n&&n.response?n.response.data:"",s=vl(r);return a&&nc.rejectActionByID(a,!0,n),Ng(Tg,"Error action triggered",o,r,s)},tl=(e,t)=>Lp(e)&&jp(e)?Ng(Cg,t):Ng(sg,t),nl=(e,t,n=j.APP.APP,r={})=>{let a=null;const{buildNew:o=!0}=r;return Lp(e)?a=jp(e)?Pp(e):H(t,n):Fp(e)&&(jp(e)&&!o?a=Rp(e):jp(e)&&!o||(a=H(t,n))),a},rl=e=>e&&e.type===Se,al=e=>{let t=!1;const n=wp(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&op(r)){t=!0;break}}return t},ol=(e,t={})=>{let n=!1,r=!1,a={},o=!0,s=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:d=!1}=t,u=xh();if(Lp(e)){const t=Pp(e);if(!t)return{continueExecution:o,removeActionPayload:a};const r=Dp(t);op(r)&&(n=!0),d||n||(n=al(t))}else if(Fp(e)&&Vp(e)){let t=Wp(e);t||(t=Pp(e),r=!0),a.containerItemID=t,a.context=Dp(t)}if(n){const e=l||Xu;s=window.confirm(u.getLocaleValue(e,"Messages"))}if(!s&&n&&(a={},o=!1),r){const e=u.getLocaleValue(Qu,"Messages");c?i=window.confirm(e):(window.alert(e),o=!1)}return!i&&r&&(a={},o=!1),{continueExecution:o,removeActionPayload:a}},sl=(e,t)=>{let n=!1;const r=Oh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:a,isParallelCall:o,skipFlowNameCheck:s}=t;if(!a)return{};const[,i]=a.split("!")||"",c=s?a:Xc(a),l=Sp(e,c);let d={},u=!1;if(l&&!r&&((e,t)=>{const n=yp(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,d=yp(e,l),!s)){let e=d?.flowName;const t=Ec(l),r=$p(l);if(r.length){const n=Pt(t,r[0]);e=yp(n,r[0])?.flowName}else n=e===i;(e!==i||o)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:l,semanticURL:d.semanticURL,insKey:a}}},il=(e,t,n)=>e===Wc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=Sp(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===Wc.ASSIGNMENT?sl(t,{...n,type:e}):e===Wc.CASE||e===Wc.OBJECT?sl(t,{...n,skipFlowNameCheck:!0,type:e}):{},cl=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),ll=(e=[])=>{jp(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(Ng(og,Bp({context:F.APP.APP,name:j.PREVIEW})))},dl=e=>{let t;for(const n of Object.keys(qc))if(qc[n].includes(e)){t=n;break}return t},ul=(e,t,n="")=>{const{data:r={},context:a,caseViewMode:o}=e,s={data:{...r},caseViewMode:o,context:W(a)};Bf.deleteIn(s.data,"shared"),Bf.setIn(s.data,["context_data","caseViewMode"],o),t.push({type:st,payload:{context:s.context}});const i=n&&![F.CASE_INFO.CASE_INFO_CONTENT,F.DATA_INFO.DATA_INFO_CONTENT].includes(n);t.push(Ng(Qf,{...s,...i&&{uiRootReference:n}}))},pl=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=Bf.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=Bf.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:Bf.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:Bf.getIn(t,["payload","context"]),context:Bf.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),Nf(e),e=e.filter((e=>e.type!==he))}const a=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:Bf.getIn(t,["payload","target"]),context:Bf.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);Lp(a.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(a.isMultiDoc=!0,e=[]);const o={type:fe,payload:{...a}};e.push(o),Nf(e)}else Nf(e)}},hl=(e,t)=>x()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),fl=e=>{let t={},n=dh(e);for(;n;){const e=Yc(n);t=hl(e.content,t),n=dh(n)}return t},gl=e=>{e?.containerItemID&&Gc.updateState(e.containerItemID,"traditionalGadgetId",$l.getUniqueGadgetId(),{skipDirtyValidation:!0})};class ml{static getChanges(e){return{...Zu(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t||{},{content:a}=Yc(e,{isTransientContext:n,includeDisabledFields:r});return a}static isStateModified(e){return op(e)}static isFormValid(e,t){return Ol(e,t)}static clearChangedProperties(e){return gi(e),hi(e),ip(e)}static getEditableFields(e){return Dl(e)}static setCustomValidator(e,t){Mi.register(e,t)}static isPropertyEditable(e,t){return ml.getEditableFields(e).some((e=>e.name===t))}}const yl=ml;const Il=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const a=`${n}${t}`,{stateMachine:o}=this.getStateMachineObjByPath(a,e,!0,!0),s=(t,n,r=!1)=>{const a=r?this.states:this.unConnectedStates;a[e]||(a[e]={}),a[e][t]||(a[e][t]={}),a[e][t]=n};if(o&&o.targetPageReference!==r.targetPageReference)return o.addChild(r),void s(a,r);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(a)){const t=e.substring(0,a.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],r.addChild(n),s(t,n)})),this.states[e][a]=r):s(a,r,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((a=>{const o=rs.getContextReferences(e)?.get(a),s=o&&qf.resolveContextTreeNodeProps(o.props)||{},i=n[a];if(o&&!0!==s.readOnly){const e=i.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),Bf.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,""),r=rs.getFieldReferenceForProperty(e,t);if("Multiselect"===r?.props?.componentName&&n?.current?.instruction?.instruction===j.LIST_ACTIONS.DELETE_ALL)return;n.root=null,n.current=null;const a=this.getUnConnectedStateMachines(e)||{};Object.keys(a).forEach((e=>{e.includes(t)&&delete a[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const r=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&r&&di(t,r,n)}getStateMachineObjByPath(e,t,n,r=!1){const a=/\[\d+\]$/gm,o=e;let s;for(;e&&!this.isStateMachineExist(t,"",e);){const i=Hp(t),c=yp(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(s=null,n&&e.endsWith("]")){if(s=e.match(a),s=s?.[s.length-1]?.substring(1,s[s.length-1].length-1),[e]=e.split(a),!r&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(o,t);break}}else{if(c?.index&&e.includes(c.index)&&l){const t=e.split(".");s=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:s}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:o,index:s}=this.getStateMachineObjByPath(t,e,r);if(!o)return!1;const i=Hp(e),c=yp(i,e)||{};let[,l]=t.split(o);if(!l)return!1;const d=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==s&&([,l]=d?l.split(/(?=\.\w+)/):l.split(/^\[\d+\]/gm));const u={[Al(l)]:n},p=this.getStateMachine(e,"",o);if(null!==s)if(d){const t=fi(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},s,a.skipStateUpdate??!0,a)})),p?.update(u,s,a.skipStateUpdate??!0,a)}else p?.update(u,Number(s)+1,a.skipStateUpdate??!0,a);else p?.updatePage(Bf.unflatten(u));return!0}registerForServerChanges(){Af.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){Af.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const r="].";if(!t.includes(".classID")&&yl.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(r)){const a=t.substring(0,t.lastIndexOf("[")),o=yl.getEditableFields(e);if(["multiselect","checkbox"].includes(o.find((e=>e.name===a))?.type)){const o=rs.getContextReferences(e),s=o?.get(a),i=t.substring(t.lastIndexOf(r)+2);s?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){Af.unRegisterForListChanges()}},El={},Al=e=>e.startsWith(".")?e.substring(1):e,Cl=e=>{delete El[e]},Sl=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=qf.resolveContextTreeNodeProps(e),a=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),o="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),s=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||s)&&!o&&a},_l=(e,t,n,r,a)=>(Il.executeStateMachine(e,r,qf.getLitePropertyValue(n,t))||a.push(r),a),bl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:a=!0}=n;return(!r||r&&!a)&&!Array.isArray(qf.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},Nl=(e,t={})=>{let n=[];const r=[],a=rs.getContextReferences(e);return a?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let a=[];for(const[o,s]of e){const e=qf.resolveContextTreeNodeProps(s.props),i=e.propertyName;Sl(s.props,{includeDisabledFields:r})&&bl(o,e,n)&&(a=_l(t,i,e,o,a))}return{editableFormFieldsReferenceList:a}})(a,e,t)),El[e]&&r.push(...Object.keys(El[e].fieldOrder??{})),{formInputs:n,formPageFields:r}):{formInputs:n,formPageFields:r}},Tl=e=>{let t=[];const n=rs.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Sl(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},Pl=(e,t={})=>{const n={},r=Tf(e),{ignoreFieldsInsideList:a=!0,isTransientContext:o=!1,includeDisabledFields:s=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>e||t?n?.objectInfo:n?.caseInfo)(i,c,r);if(o||l){const{formInputs:t,formPageFields:i}=Nl(e,{ignoreFieldsInsideList:a,includeDisabledFields:s});((e,t,n)=>{e.forEach((e=>{let r=Bf.getIn(t,e);"object"==typeof r&&(r=Bf.deepClone(r),delete r?.classID),Bf.buildObject(e,n,r)}))})(i,r,n),t&&t.length>0?t.forEach((e=>{Bf.buildObject(e,n,Bf.getIn(r,e))})):o||Bf.buildObject(F.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!o&&r?.dataInfo?.content){const{formInputs:t}=Nl(e,{ignoreFieldsInsideList:a});t.forEach((e=>{Bf.buildObject(e,n,Bf.getIn(r,e))}))}return n},Ol=(e,t)=>{const n=rs.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,a]of n){const n=qf.resolveContextTreeNodeProps(a.props);if(Sl(a.props)&&(!t||e.includes(t))){const e=Mi.validate(n.componentName?.toLowerCase(),n.propertyName,qf.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},vl=(e,t=!1)=>{const n=rs.getContextReferences(e),r=[];if(n)for(const[e,a]of n){if(!1!==qf.resolveContextTreeNodeProps(a.props).visibility){const n=8,a=t?e:e.substring(e.indexOf("content")+n);r.push(a)}}return r},Dl=e=>{const t=[],n=rs.getContextReferences(e);if(n)for(const[e,r]of n){const n=qf.resolveContextTreeNodeProps(r.props);Sl(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class Rl{static isCaseActive(e,t){if(!e||!t)return!1;const n=mp(t);if(n){const r=Pp(t),{items:a={}}=n;return!(!r||!a[r]||a[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=Wg("loadView",n);return Vs(r,{method:a},t)};static isExternalCaseType=e=>{const t=Oh.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e));return!!t};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=Wg(Ke,n);return Vs(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:o}=Wg(Ke,a),s=t[e];return Vs(`${o}?viewType=form`,{method:"PATCH",body:{content:{...s}},headers:{"if-match":n}},r)};static getCaseMessages=e=>Tf(e)?.caseMessages;static getPropertiesToReplace=e=>(Tl(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(Tl(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>Bf.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>V.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>V.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=Oh.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=Oh.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&t[0].DisplayMandatoryInputsForObject};static getRouteKeyForCreateWork=(e,t=!1)=>Rl.isExternalObject(e)&&t?"retrieveActionViewForNewObject":Rl.isObjectCaseType(e)?_t:It;static setTraditionalGadgetId=e=>{e.traditionalGadgetId=Rl.getUniqueGadgetId()}}const $l=Rl,xl=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},wl=e=>{if($l.isObjectCaseType(String(e?.objectTypeID))&&!xl(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},Ml=(e,t)=>{if(e&&t){const n=Bf.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},Ll=(e,t)=>{const n=qf.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=qf.getPropertyValue(F.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===F.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=Tf(e);a=t?.context_data?.actionType===j.CASE}return a},Fl=e=>Df(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),jl=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Ul=(e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,o=a?.filter((e=>e.ID===j.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&o?.length>0?o[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r},kl=(e,t,n)=>{let r,a,o,s,i,c,l,d,u;const p=Tf(e),h=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID;return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,a=p.caseInfo.ID,o=p.caseInfo.assignments,s=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,d=p.caseInfo.caseTypeID,u=p.caseInfo.caseTypeName):p?.objectInfo&&$l.isObjectCaseType(h)?(a=p.objectInfo.ID,s=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,l=p.objectInfo.businessID,d=p.objectInfo.objectTypeID,u=p.objectInfo.objectTypeName):(r=t.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID)),a=t.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),o=t.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENTS)),s=t.getValue(j.getProperty(F.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(j.getProperty(F.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(j.getProperty(F.CASE_INFO.CASE_INFO)),l=t.getValue(j.getProperty(F.CASE_INFO.BUSINESS_ID)),d=t.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),u=t.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:r,caseID:a,assignments:o,localActionID:s,caseActions:i,caseInfo:c,businessID:l,caseTypeID:d,caseTypeName:u}},Vl=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),r=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{r.append(t,String(e[t]))})),n.search=r.toString(),n.toString()}return t},Bl=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],r=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===r){n.forEach((e=>{e.isErrorButton=!0}));const r=e.payload.context,a=Tf(r),o=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,a?.caseInfo?.actionButtons?.secondary||[]),s={data:{["dataObject"===t?F.DATA_INFO.DATA_INFO:F.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:o}}},target:Hp(r),context:r};Nf({type:ge,payload:s})}};const Gl=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,a=rs.getContextReferences(e)?.get(`${t}${r}`)?.props;return a?qf.resolveContextTreeNodeProps(a):a})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:a}=Mi.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return a?{status:!1,message:a}:{status:!0}}},Wl="OPEN_PROCESS_ACTION",Hl="OPEN_ASSIGNMENT",ql="DELETE_CASE_IN_CREATE_STAGE",zl="SAVE_AND_CLOSE",Yl=e=>({type:zl,payload:e}),Kl="DELETE_WORK";const Jl=class{static getSavableDataPage(e){return hf(e)}static getLookUpDataPage(e){return gf(e)}static getLookUpDataPageInfo(e){return mf(e)}static getDataPageKeys(e){return ff(e)}};const Xl=class{static getPropertyName(e){return un.getPropertyName(e)}static isProperty(e){return un.isProperty(e)}static getLeafPropertyName(e){return un.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class Ql{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:a,items:o}=e;if(a&&o){const e=a[a.length-1];if(o[e]?.view&&Object.keys(o[e].view).length>0){const a=o[e],s=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=a,{viewName:l,viewContext:d}=this.processRootViewDetails(i,a,t);if(!l)return null;return vu({meta:i,options:{context:c,pageReference:d||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===hp.WORKAREA||n===hp.MODAL||l===j.CREATE_DETAILS_VIEW_NAME,target:s}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:a}={}}=e,{context:o}=t;let s=a,i=r;const c=Xl.isProperty(a),l=Xl.isProperty(r);if(l){const e=Xl.getPropertyName(r);i=vf(`.${e}`,e.startsWith(".")?n:"",o)}if(i||(i=n),c){const e=Xl.getPropertyName(a);s=vf(`.${e}`,i,o)}return c&&l&&""!==s&&(s=a,i=r),{viewName:s,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,a;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=Pp(e),o=yp(e,t);o&&({key:r,flowName:a}=o)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(j.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),r=t.find((e=>e.ID===n));return r?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(j.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:r})=>{const a=e.map((e=>({...e,caseName:t,caseTypeID:r})));n=n.concat(a)})),n};static hasAssignments=e=>{const t=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=Ql.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||Ql.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return Ql.hasNotificationMessages(t)||!Ql.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:r}=t;return r&&(!Ql.isCaseWideLocalAction(n)||Ql.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],a=Ql.getChildCaseAssignments(e)||[];let o=JSON.parse(JSON.stringify(a));o=o.map((e=>(e.isChild=!0,e)));const s=[...r,...o];let i=JSON.parse(JSON.stringify(s));return t&&!Ql.showTodo(e)&&(i=i.map((t=>(t.name=Ql.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const Zl=Ql;const ed=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=nc.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return nc.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:o}=this.containerManagerPromise(t),s={...r,...e,actionMgrID:a};return Nf(ag(s)),o}addContainerItem(e){const t=Se,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r||{};let o;Array.isArray(a)&&a.length>0&&([o]=a);const s=n.getContextName(),i=n.getContainerName(),c=H(i,s,e?.containerType===j.CONTAINER_TYPE.SINGLE),l=Pt(i,s),d={root:{...o,config:{...o?.config,context:o?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...d,...e,actionMgrID:u};return Nf(sg(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=$e,n={context:Dp(e.containerItemID),target:Hp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return Nf(pg(o)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Re,n={target:Hp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return Nf(mg(o)),a}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=_e,n={context:Dp(e.containerItemID),target:Hp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return Nf(Ig(o)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Ce,n=Bp(e),{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return Nf(og(o)),a}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=z(t,r),o=Jp(r);return a&&o.includes(a)||Nf(ig({transientItemID:a,contextName:r,target:Hp(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Jp(r).includes(t))return;Nf(cg({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:a}=e;if(a&&r){if(!Jp(t).includes(a))return;Nf(Ag({target:n,containerItemID:r,transientItemID:a}))}}createContainerPConnect(e,t,n,r=!1){Zl.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return jp(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Np(e,t)}};var td=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function nd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,a=e.length;return n=1===a?function(t){return td(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(td(t.type,e[n]))return!0;return!1},Ro((function(e,t){var a=0;e.subscribe($o(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function rd(e,t){return Ro((function(n,r){var a=null,o=0,s=!1,i=function(){return s&&!a&&r.complete()};n.subscribe($o(r,(function(n){null==a||a.unsubscribe();var s=0,c=o++;Oo(e(n,c)).subscribe(a=$o(r,(function(e){return r.next(t?t(n,e,c,s++):e)}),(function(){a=null,i()})))}),(function(){s=!0,i()})))}))}function ad(e,t){return Ro((function(n,r){var a=0;n.subscribe($o(r,(function(n){r.next(e.call(t,n,a++))})))}))}function od(e,t,n){return void 0===n&&(n=1/0),Ha(t)?od((function(n,r){return ad((function(e,a){return t(n,e,r,a)}))(Oo(e(n,r)))}),n):("number"==typeof t&&(n=t),Ro((function(t,r){return function(e,t,n,r,a,o,s,i){var c=[],l=0,d=0,u=!1,p=function(){!u||c.length||l||t.complete()},h=function(e){return l<r?f(e):c.push(e)},f=function(e){o&&t.next(e),l++;var i=!1;Oo(n(e,d++)).subscribe($o(t,(function(e){null==a||a(e),o?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();s?Do(t,s,(function(){return f(e)})):f(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe($o(t,h,(function(){u=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function sd(e){return e&&Ha(e.schedule)}function id(e){return e[e.length-1]}function cd(e){return sd(id(e))?e.pop():void 0}function ld(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jo(e,cd(e))}var dd=new Eo((function(e){return e.complete()}));function ud(e){return e?function(e){return new Eo((function(t){return e.schedule((function(){return t.complete()}))}))}(e):dd}const pd=(e,t,n)=>ko((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),ld(Tg(e,r,t,null,n))))),hd=(e,t)=>n=>new Eo((r=>{let a={},o=0;return n.pipe(od((n=>{const r=Date.now();let s;return s=t||h(),s&&s(n,a)&&r-o<e?ud():(a=n,o=r,ld(n))}))).subscribe(r)})),fd=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,o={data_view_ID:t},{restApi:s,reqType:i}=Wg("createDataObject",o),{content:c}=Yc(a);return jo(Vs(s,{method:i,headers:r,body:{data:c.content,pageInstructions:c?.pageInstructions}},a)).pipe(ad((t=>({response:t.data,actionInPayload:e}))),pd("Error occurred during ajax call at createDataObject Epic",n))},gd=e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:o}=e,s={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=Wg("readDataObject",s);return jo(Vs(i,{method:c,headers:r,body:{dataViewParameters:o}},n)).pipe(ad((t=>({response:t.data,headers:zc(t.headers),actionInPayload:e}))),pd("Error occurred during ajax call at getDataObjectView Epic",n))},md=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:o}=e,s={data_view_ID:t},{restApi:i,reqType:c}=Wg("updateDataObject",s),{content:l}=Yc(a);return jo(Vs(i,{method:c,headers:{...r,"if-match":e?.etag},body:{data:{...l.content,...o},pageInstructions:l.pageInstructions||[]}},a)).pipe(ad((t=>({response:t.data,actionInPayload:e}))),pd("Error occurred during ajax call at updateDataObject Epic",n))},yd=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:a,dataViewParameters:o}=e,s={data_view_ID:t,action_ID:a},{restApi:i,reqType:c}=Wg("openDataObjectAction",s);return jo(Vs(i,{method:c,headers:r,body:{dataViewParameters:o}},n)).pipe(ad((t=>({response:t.data,headers:zc(t.headers),actionInPayload:e}))),pd("Error occurred during ajax call at getDataObjectView Epic",n))},Id=e=>{const{savableDatapage:t,context:n,headers:r,actionID:a,keys:o,containerItemID:s,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:a};let{restApi:l}=Wg("submitDataObjectAction",c);const{reqType:d}=Wg("submitDataObjectAction",c),{content:u}=Yc(s);return l=Vl(i,l),jo(Vs(l,{method:d,headers:{...r,"if-match":e?.etag},body:{data:{...u?.content,...o},pageInstructions:u?.pageInstructions||[]}},n)).pipe(ad((t=>({response:t.data,actionInPayload:e}))),pd("Error occurred during ajax call at getDataObjectView Epic",n))};const Ed=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const o={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=o}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:a}=n;wu(e,r,t,a,{})}}},Ad="postDataViewMetadata",Cd={getData:(e,t,n,r)=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:o,signal:s,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=Wg("getListData",a);return Vs(c,{method:l,body:t,...s&&{signal:s},...o&&{skipClearErrorMessages:o}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:o}=Wg("getListDataCount",r);return Vs(a,{method:o,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const a=!!n,o=!!r,s=Th.doesRestApiExist(Ad),i=(a||o)&&s?Ad:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:d}=Wg(i,c);if(s){if(a)return Vs(l,{method:d,body:{associationFilter:n}},t);if(o)return Vs(l,{method:d,body:{propertyFilter:r}},t)}return Vs(l,{method:d},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:o,signal:s,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:d,reqType:u}=Wg("readDataObject",c);return Vs(d,{method:u,body:l,...s&&{signal:s},...o&&{skipClearErrorMessages:o}},r,i)},getCaseEditMetadata:(e,t)=>$l.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>$l.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>$l.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:o,viewName:s,viewClassName:i}=e,c={viewName:s,viewClassName:i},{restApi:l,reqType:d}=Wg("moveListRecords",c);return Vs(l,{method:d,body:{content:{sourceID:n,destinationID:r,context:a,listClass:o}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==xp("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${Ji.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=Oh.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const Sd=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const _d=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),a=this.users[e];if(a)return a.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const o={matcher:"PRESENCE",criteria:{userId:e}};return Dd.subscribe(o,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],Dd.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};var bd=n(631),Nd=n.n(bd);const Td=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),a=Object.keys(e);0===Nd()(r,a).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};Dd.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}};const Pd=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Td("CASE",t)}return this.subscriptions[e]}};const Od=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static publishCaseValuesUpdate(e,t){const n=`${t.actionInContext}/workarea`;Object.entries(e.message).forEach((([e,t])=>{const r=Rp(n)||"",a=this.transformReference(e),{pageReference:o,propertyName:s}=this.extractReferenceParts(a);e.match(/\.\w+\[\d+\]\.\w+/)&&Il.executeStateMachine(r,a,t,!0,{skipStateUpdate:!0});Nf([{type:Q,payload:{reference:a,value:t,context:r}},{type:ee,payload:{reference:a,value:t,context:r,pageReference:o,propertyName:s}}])}))}};class vd{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new _d;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=Ji.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?`${t}ws`:`${t}/ws`;try{const e=new WebSocket(`${r}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=Ji.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){const t=vd.agentSubscribeIdMap.get(e.assignmentID);vd.unsubscribe(t??""),vd.agentSubscribeIdMap.delete(e.assignmentID)}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=vd.subscribe(t,(t=>{Od.publishCaseValuesUpdate(t,e)}));vd.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket?.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const a=this.subscribers[r];a?.filter&&a.filter.matcher===e&&Bf.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){Es.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,vd.subscribeAgentMessageCaseValues),Es.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,vd.unsubscribeAgentMessageCaseValues),this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const a=r||`${Date.now()}_${this.connectionsCount}`,o=new Sd(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(o,a),a):(this.inProgressSubscriptions.push({messageSubscriber:o,id:a}),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>Pd.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:Ji.b2sJWT}};Vi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(Ji.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const Dd=vd;const Rd=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){const t=[],{pageNumber:n,pageSize:r}=e,a=n*r;let o=a-r;for(;o<a;o+=1){if(!this.records[o])return this.maxRecords===o?t:[];t.push(this.records[o])}return t}return this.records}mergeRecords(e,t){if(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:r}=t,a=n*r;let o=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[o],o+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=Lf(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const $d=new class{SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t,n,r){const a=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][a]){const t=this.dataStore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},r,a,o={}){if(this.subscribeToMessageService(e),o.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,a)||o.invalidateCache){const s=await this.fetchData(e,n,r,a,t,o),i=s?.data?.data??[];return{...s.data,data:i,pageNumber:s?.data?.pageNumber,pageSize:s?.data?.pageSize,queryStats:s?.data?.queryStats,status:s?.status}}const s=this.getData(e,n,r,a);if(s.length>0)return Promise.resolve({data:s});const i=await this.fetchData(e,n,r,a,t,o);return{...i.data,data:this.mergeDataStore(e,n,r,a,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){this.subscribeToMessageService(e);const a=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][a]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][a]);delete this.dataStore[e][a],this._removeDataStoreMetaEntry(e,n,a)}const{restApi:o,reqType:s}=Wg(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:s};if(r.enableStreaming){const e=r.streamOptions||{};Object.assign(i,{responseType:"stream",adapter:"fetch",headers:{Accept:"text/event-stream"},...e})}const c=o&&n&&0===Object.keys(n).length?o.split("?")[0]:o;return Vs(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[a]:t.data},this._addDataStoreMetaEntry(e,n,a)),r.enableStreaming?t:t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const a=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const o=this.dataPageSubscribers[n];o[a]??={};const s=o[a];return!s[e]&&(s[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&Bf.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new Rd;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const a=this.dataStoreMeta[e];a[r]??=[];const o=a[r];o.includes(n)||o.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,a){const o=this.generateHash(e,t,r),s=a?.data?.data;if(!s||0===s.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][o]||(this.dataStore[e][o]=new Rd);const i=this.dataStore[e][o];return i.mergeRecords(s,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,o),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}subscribeToUpdate(e,t,n,r,a,o){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},o&&!this.subscribers[e].callback?.[o]&&(this.subscribers[e].callback[o]=a),this.subscribeToCascadeUpdates(e,t,n,r,o)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback?.[a],t&&t.length>0&&Af.unRegisterFields(n,r,t,a)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:a=""}=n,o=this.subscribers[r];this.markDataInstanceDirty(r,""===a?null:JSON.parse(a)),t&&this._executeDataPageSubscriptions(e),!t&&o?.callback&&Object.keys(o.callback).forEach((t=>{o.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r?.push(this.generateHash(e,null)),r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,a=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(a){const t=[];t.push(this.generateHash(n,a,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=af(e);return!t||"reloadOncePerInteraction"===t.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const r=af(e);let a=[];r||(a=Object.keys(t||{}).map((e=>({name:e}))));let o="",s=e;const i=[];return(r?.parameters||a).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(o=Bf.getHashedString(i.join(j.HASH_DELIMITER)),s=e+j.UNDERSCORE_STRING+o),s}async fetchData(e,t,n,r,a,o){const{additionalApiParams:{useExtendedTimeout:s=!1,includeTotalCount:i=!1}={},...c}=o,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),s&&(l.useExtendedTimeout=!0),n&&(l.paging=n),r&&(l.query=r),Cd.getData(e,l,a,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&Af.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};Dd.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const xd=class{constructor(e,t,n,r,a=100,o=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=a,this.maxsize=o,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,a=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),a&&!a.dataViewCallMap[t]?(this.combiner(a,e),a.dataViewCallMap[t]={promise:n,resolve:r}):a?n=a.dataViewCallMap[t].promise:(a={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(a.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(a):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const wd=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,a,o,s){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new xd(t,n,a,r,o,s)),this.bufferedDataQueues[e]}},Md=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,Ld=e=>e.map((e=>e.field)),Fd=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let a=(t.query?.filter).logic;const o=Object.keys(n).length;Md(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const s=`F${o+t}`;n[s]=r[e],a=a.replace(e,s)})),(e.query?.filter).logic+=` OR ${a}`);const s=Ld(e.query?.select);Ld(t.query?.select).forEach((t=>{s.includes(t)||(e.query?.select).push({field:t})}))},jd=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!Bf.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Ud=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:a}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:a(e,n)})}))},kd=e=>({combiner:Fd,comparator:jd,separator:Ud,...e}),Vd=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Bd{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const a=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),o=Bf.getHashedString(a),s=`${e.dataSource}_${o}`,i=Cd.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(`${window.sessionStorage.getItem(i)}`);if(t&&Bd.searchResultsCache?.[t]?.[s])n(Bd.searchResultsCache[t][s]);else if("form"!==e.cacheLifeSpan&&Bd.searchResultsCache?.persisted?.[s])n(Bd.searchResultsCache.persisted[s]);else{const o=new Bd(e,t);JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(o.dataSourceMetaData=a.dataSourceMetaData,o.isQueryable=a.isQueryable,o.isInitialised=a.isInitialised,o.associationFilter=a.associationFilter,Bd.initializeCache(t,e,s,o),n(o)):(o.associationFilter=e.associationFilter,o.propertyFilter=e.propertyFilter,o.fetchMetaData(t).then((r=>{Vd(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),o.isQueryable=r.data.isQueryable,o.dataSourceMetaData=r.data,o.isInitialised=!0,Bd.initializeCache(t,e,s,o),n(o)})).catch((e=>{o.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&af(e.dataSource)){const r=new Bd(e,t),a=af(e.dataSource);r.isQueryable=!!a?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,Vd(i,JSON.stringify({isQueryable:a?.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,Bd.initializeCache(t,e,s,r),n(r)}else{const a=new Bd(e,t);a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{Vd(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Bd.initializeCache(t,e,s,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new wd;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(kd(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Bd.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Bd.searchResultsCache[e]&&(Bd.searchResultsCache[e]={}),Bd.searchResultsCache[e][n]=r):(void 0===Bd.searchResultsCache.persisted&&(Bd.searchResultsCache.persisted={}),Bd.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return Cd.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Bd.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>$d.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Bd.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return $d.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return $d.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!kf(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=$d.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,a)=>(Object.keys(a).every((o=>!(r?.includes(o)&&a[o]&&this.positionMatches(`${a[o]}`,e,n))||(t.push({...a}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,a=r?e.toLowerCase():e,o=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return a.startsWith(o);case"contains":return a.includes(o);case"equals":return a===o;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,a={};let o=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const s=`F${o}`;o+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const d={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};a[s]=d}}));const s=Object.keys(a).join(" OR ");return{filterConditions:a,logic:s}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...Cd.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...Cd.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const Gd=Bd;class Wd{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,a){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:a}]}registerForRefresh(e,t,n,r,a){n=Bf.convertClipboardPageToPageRefNotation(n);const o=r.split("/").join(j.HASH_DELIMITER),s=Bf.getHashedString(o);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[a]?.[n]){this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===s))||this.propChangeRefreshMap[a][n].push({uniqueHash:s,callback:t})}else Wd.initializeRefreshCache(this.propChangeRefreshMap,a,n,s,t);else if(this.refreshMap?.[a]?.[`${e}-${n}`]){this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===s))||this.refreshMap[a][`${e}-${n}`].push({uniqueHash:s,callback:t})}else Wd.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,s,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const Hd=new Wd;const qd=class{static cleanCaches(e){Af.purgeCascadeFields(e),Ed.removeContext(e),Gd.clearContextedCache(e),Es.cleanContextSubscribers(e),Cl(e),rs.removeContextTreeNode(e),Dd.clearContext(e),Hd.deRegisterForRefresh(e)}},zd="GET_DESCENDANTS",Yd={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData"};const Kd=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};const Jd=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let o=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(o)n.push({type:ge,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();o=!o,n.push({type:ge,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:o}}}}),t&&n.push(t)}}Nf(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=Tf(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let o=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!o&&(r<=0?(n.push(e),o=!o):a.push(e),n.unshift({type:ge,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:o}}}}),Nf(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Tf(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(Nf({type:ge,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return Tf(e)?(Nf({type:it,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...Tf(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(Nf({type:it,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=Tf(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&Bf.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),Nf({type:ge,payload:{context:e,data:{...n}}}),tc.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Tf(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},Xd=(e,t)=>{const n={},r=Jl.getLookUpDataPage(e),a=Jl.getDataPageKeys(r);if(a)for(const e of a)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:a}},Qd=(e,t)=>{const n=Jl.getSavableDataPage(e),r=Jl.getDataPageKeys(n);return r?.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:r}},Zd=e=>{Es.publish(F.PUB_SUB_EVENTS.EVENT_CANCEL,e)},eu=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const tu=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),a=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),l=t?void 0:Ol(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Yf.buildActionObject({context:n,containerItemID:e,assignmentID:o,actionID:s,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:d,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,a,o="";o=t&&null!==t.actionMgrID?t.actionMgrID||"":nc.getNextActionMgrId();const s=new Promise(((e,t)=>{r=e,a=t}));if(!r||!a)throw new Error("resolveFn or rejectFn is not defined.");return nc.register(o,s,r,a,e,t,n),{actionMgrID:o,promise:s}};showDataObjectCreateView(e,t=F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Yf.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:a}=this.actionsApiPromise(r,n);return Nf({type:r,payload:{...n,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!op(t)){return new ed(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=Yf.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(j.MODAL);Nf({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:o}=this.actionsApiPromise(n,r);return o.then((()=>{Zd({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=bf()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));if(tf(F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const r=Jl.getSavableDataPage(n),a=ct,o=!!e&&e.includes(j.MODAL),s=Yf.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(a,s);return Nf({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:o,isFormValid:Ol(e)}}),i}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=lt,r=Jl.getSavableDataPage(e),a=Jl.getDataPageKeys(r),o={};if(a)for(const e of a)o[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Yf.buildActionObject({dataViewName:r,dataViewParameters:o},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,s);return Nf({type:"DELETE_DATA_OBJECT",payload:{...s}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=dt,{dataPageID:a,dataViewParameters:o}=Xd(e,t),s=Yf.buildActionObject({dataLookUp:a,keyProperties:t,requestPayload:o,viewName:n.viewName||F.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,s);return Nf({type:"VIEW_DATA_OBJECT",payload:{...s}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=bf()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:a,keys:o}=Qd(r,t),s=ut,i=e&&e.includes(j.MODAL),c=Yf.buildActionObject({containerItemID:e,dataPageID:a,key:o},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:d}=this.actionsApiPromise(s,c);return Nf({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:Ol(e),etag:l}}),d}openDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const a=pt,{dataViewParameters:o,dataPageID:s,dataPageKeys:i}=Xd(e,t),c=Yf.buildActionObject({actionID:n,actionName:r,dataViewParameters:o,lookupDatapage:s,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return Nf({type:a,payload:{...c}}),l}submitDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:a}=bf()?.getState()||{},o=a[e]?.dataInfo?.content?.classID;if(!o)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const s=r?.jsActionQueryParams,i=ph(e),c=Hp(i),l=yp(c,i)||{},{resourceType:d="",key:u=""}=l,p=ht,{dataPageID:h,keys:f}=Qd(o,t),g=Yf.buildActionObject({containerItemID:e,actionID:n,resourceType:d,key:u,keys:f,savableDatapage:h,containerName:j.MODAL,context:e,jsActionQueryParams:s},this.c11nEnv);g.context=e;const m=a[e]?.caseInfo?.headers?.etag,{promise:y}=this.actionsApiPromise(p,g);return Nf({type:p,payload:{...g,isFormValid:Ol(e),etag:m}}),y}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase",t);const{dockable:n=!1}=t?.modalOptions||{};let r=((e,t)=>$l.isExternalObject(e)&&!t?"CREATE_EXTERNAL_OBJECT":$l.isObjectCaseType(e)?"CREATE_OBJECT":le)(e,vf(".isExternalObjectCreationFlow","context_data",this.c11nEnv.getContextName()));const a=Yf.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,a);if(a.headers={...a.headers},t.channelName?a.headers[j.X_ORIGIN_CHANNEL]=t.channelName:Oh.isWSSPortal()&&(a.headers[j.X_ORIGIN_CHANNEL]="WSS"),V.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:o}=V.getRemoteCase(e);if(a.className=e,a.class=t,nc.setRemoteCaseHeaderByContext(a,n),V.isTraditionalRemoteCase(e)){const n={className:e,name:o,action:It,remoteClassName:t};r=nc.setTraditionalRemoteCaseParams(a,n)}}if(As.getPreviewMode()){a.debugInfo={debugId:Bf.generateUniqueID()};const e=$s.getCoreHeadersFromContext(a?.context||""),t=String(e?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]||"");t&&r!==le&&(a.debugInfo={debugId:t})}return Nf({type:r,payload:{...a}}),o}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=ye,r=Yf.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return Nf({type:n,payload:{...r}}),a}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=Yf.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("GET_DESCENDANTS",r),o=(s={...r,context:n},{type:zd,payload:s});var s;return Nf(o),a}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let a=$l.isObjectCaseType(t)?"GET_OBJECT":de;const o=Yf.buildActionObject(r,this.c11nEnv),{promise:s}=this.actionsApiPromise(a,o);return o.headers={...o.headers},n.channelName?o.headers[j.X_ORIGIN_CHANNEL]=n.channelName:Oh.isWSSPortal()&&(o.headers[j.X_ORIGIN_CHANNEL]="WSS"),o.className=t,V.isRemoteCase(t)&&(a=this.setRemoteCaseParamsForOpenCase(o,t,n.remoteCaseMeta)??a),As.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(o.debugInfo={debugId:Bf.generateUniqueID()}),Nf({type:a,payload:{...n,...o}}),s}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:a,name:o}=V.getRemoteCase(t);if(nc.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,V.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:o,action:At,remoteClassName:a};return nc.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=j.PRIMARY,r.isChild=n.isChild);let a=Hl;const o=Yf.buildActionObject(r,this.c11nEnv),{promise:s}=this.actionsApiPromise(a,o);if(o.headers=o.headers||{},n.channelName?o.headers[j.X_ORIGIN_CHANNEL]=n.channelName:Oh.isWSSPortal()&&(o.headers[j.X_ORIGIN_CHANNEL]="WSS"),V.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:s}=V.getRemoteCase(t);if(nc.setRemoteCaseHeaderByContext(o,r),V.isTraditionalRemoteCase(t)){o.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:s,action:Et,remoteClassName:e};a=nc.setTraditionalRemoteCaseParams(o,r)}}o.className=t,o.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),As.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(o.debugInfo={debugId:Bf.generateUniqueID()});const i={context:o.context||n.context,containerName:o.containerName||n.containerName,targetContainerName:o.containerName||n.containerName,viewType:o.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return Nf({type:a,payload:{...o,...i}}),s}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=Dp(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=rs.getContextReferences(e);if(t)for(const[,e]of t)if(qf.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return us({messages:e,context:r,category:F.PAGE}),Promise.reject({type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:s,localActionID:i,caseActions:c,caseInfo:l,businessID:d,caseTypeID:u,caseTypeName:p}=kl(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),h=wl(l);let f,g=!1;if(c){const e=c.find((e=>e.ID===i));g="Case"===e?.type}else f=Tf(n);let{assignmentID:m}=kl(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});f?.context_data?.actionType&&(g=f.context_data.actionType===j.CASE,m=m||f.context_data.assignmentID);const y=((e,t,n,r)=>{let a;return a=e?Ul(e,t,n):r||"Create",a})(s,m,i,l?.activeActionID),[I,E]=o.split(" "),A={class:I,actionID:y,assignmentID:m,caseID:o,workID:E,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:g,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:d,caseTypeID:u,caseTypeName:p};e?.includes(j.MODAL)&&(A.containerName=j.MODAL,A.isModalAction=!0),A.outcome=t.outcomeID,A.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(A.viewType=Hc.FORM);const C=((e,t)=>$l.isObjectCaseType(e)||t?St:pe)(u,l?.isObjectWideAction),S=Yf.buildActionObject(A,this.c11nEnv),{promise:_}=this.actionsApiPromise(C,S);return S.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||Tf(n).context_data.isProcessAction,S.headers??={},Oh.isWSSPortal()&&(S.headers[j.X_ORIGIN_CHANNEL]="WSS"),Jd.executeOrQueueDeferredAction({type:C,payload:{...S,context:n}}),_}getNextWork(){if("HYBRID"===Oh.getRenderingMode())return Es.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:Oh.getOperatorIdentifier()}),Promise.resolve();const e=Hl,t=Yf.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return Nf({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Hl,n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Yf.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),s={type:t,payload:{...a,caseID:n,headers:r}};return Nf(s),o}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(a.containerName=j.MODAL,a.isModalAction=!0);const o=Yf.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o),i=Dp(e);return Nf({type:t,payload:{...o,context:i,cases:n,actionID:r,isFormValid:Ol(i),classID:this.c11nEnv.getCurrentClassID()}}),s}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},o=Yf.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o),i=Dp(e);return Nf({type:t,payload:{...o,context:i,cases:n,actionID:r,isFormValid:Ol(i),classID:this.c11nEnv.getCurrentClassID()}}),s}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:r}=t,a=t.type,o={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:a,runningMode:r,...t},s="OPEN_BULK_ACTION",i=Yf.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i);return Nf({type:s,payload:{...i}}),c}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));return new ed(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Nf({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Nf({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(F.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return Nf([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return Nf([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,eu(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=t.type,o={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},s=(e=>"Object"===e.type||$l.isObjectCaseType(e?.caseClassName||"")||window.location.href.includes("/objects/")?Ct:"OPEN_LOCAL_ACTION")(t),i=Yf.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i);if(s===Ct)return Nf({type:s,payload:{...i}}),c;const l=this.c11nEnv.getContextName(),d=xp(l)[0];let u=!1;const p=Pp(d),h=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),f=n!==h&&p&&V.getRemoteHeaderByContext(p)||V.getRemoteHeaderByContext(l);let g;if(nc.setRemoteCaseHeaderByContext(i,f),!d)return g=l,Nf({type:s,payload:{...i,contextName:l,continueExecution:u}}),c;g=Pp(d);const m=mp(d);if(m?.accessedOrder.forEach((e=>{n===m.items[e].key&&(u=!0,g=m.items[e].context)})),!u||g&&"review"===bf()?.getState()?.data[g]?.context_data?.caseViewMode)return Nf({type:s,payload:{...i,contextName:l,continueExecution:u}}),c;const y=g,I=y&&y.includes(j.MODAL),E=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),A=Tf(g),C=A?.caseInfo?.assignments?A.caseInfo.assignments[0]?.actions[0]?.ID:void 0,S=this.c11nEnv.getContainerName(),_=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),b=this.c11nEnv.getValue("isProcessAction","isProcessAction"),N=Yf.buildActionObject({context:y,containerItemID:g,assignmentID:E,actionID:C,caseID:n,containerName:S,caseType:_,isModalAction:I,isFormValid:!0,isProcessAction:b},this.c11nEnv);N.context=g;const T=Dp(g),P=this.c11nEnv.getCaseSummary(),O=wl(P),v=Yf.buildActionObject({caseID:n,containerItemID:g,cancelContext:T},this.c11nEnv);let D={};return I?(v.acTargetName=j.MODAL,v.isInCreateStage=O,v.isModalAction=I,D={...v}):D={...v,acName:Pt(this.c11nEnv.getContainerName(),v.context)},Nf({type:s,payload:{...i,contextName:l,saveActionPayload:N,cancelActionPayload:D,continueExecution:u}}),c}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,eu(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,a=t.type,o={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},s=Wl,i=Yf.buildActionObject(o,this.c11nEnv),c=this.c11nEnv.getContextName(),l=xp(c)[0];let d=V.getRemoteHeaderByContext(c);if(!d&&l){const e=mp(l);e?.accessedOrder.forEach((r=>{(t.caseID||n)===e.items[r].key&&(d=V.getRemoteHeaderByContext(e.items[r].context))}))}nc.setRemoteCaseHeaderByContext(i,d);const{promise:u}=this.actionsApiPromise(s,i);return Nf({type:s,payload:{...i}}),u}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=wl(this.c11nEnv.getCaseSummary()),o=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),s={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a,caseID:o};t&&t.includes(j.MODAL)&&(s.acTargetName=j.MODAL);const i=Yf.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=Dp(t);return Nf({type:n,payload:{...i,containerItemID:t,context:l}}),c}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:n}=F,r=he,a=Dp(e),o=e&&e.includes(j.MODAL),s=this.c11nEnv.getCaseSummary(),i=wl(s),c=this.c11nEnv.getValue(j.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),d=Yf.buildActionObject({caseID:c,containerItemID:e,context:a},this.c11nEnv);let u={};o?(d.acTargetName=j.MODAL,d.isInCreateStage=i,d.isModalAction=o,u={...d}):u={...d,acName:Pt(this.c11nEnv.getContainerName(),d.context)};const{promise:p}=this.actionsApiPromise(r,d);return Nf({type:r,payload:u}),p.then((()=>{t||Zd({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=F,n=e,r=He,a=e&&e.includes(j.MODAL),o=this.c11nEnv.getValue(t.CASE_INFO_ID),s=Yf.buildActionObject({caseID:o,containerItemID:e,context:n},this.c11nEnv);if(!op(n)){return new ed(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{Zd({caseID:o,context:this.c11nEnv.getContextName()})}))}Nf({type:r,payload:{...s,isModalAction:a}});const{promise:i}=this.actionsApiPromise(r,s);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=F,n=He,r=e,a=r&&r.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),s=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID)),i=wl(o),c=this.c11nEnv.getValue(j.getProperty(t.CASE_INFO_ID)),l=Yf.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv),d=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=Oh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(l.isProcessAction=d,i&&(a||u)&&!xl(o)){const t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=op(r);if(this.shouldDeleteCaseInCreateStage(c,t,u)){const t=!0===Boolean($l.isExternalObject(s));return this.deleteCaseInCreateStage(e,t)}Nf({type:n,payload:{...l,isModalAction:a,isChildCase:jl(o),isInCreateStage:i}})}const{promise:p}=this.actionsApiPromise(n,l);return p.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=zl,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return Jd.executeOrQueueDeferredAction(Yl(n)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=zl,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return Nf(Yl(n)),r}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=ql,r=e,a=r&&r.includes(j.MODAL),o=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),s=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),i=Yf.buildActionObject({caseID:o,caseType:s,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const d=`${j.APP.APP}/${hp.PRIMARY}`,u=nl(d,hp.PRIMARY);i.parentContext=u,a&&(i.targetName=j.MODAL,i.containerName=hp.MODAL,i.isModalAction=a),Nf((e=>({type:ql,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{Zd({caseID:o,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=Th.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return Vs(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:a}=Th.getRestEndPoint("updateRecents")||{},o=`${E()}${a}`;return Vs(o,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=Th.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return Vs(t,{method:"GET",headers:{}}).then((e=>(Object.keys(rs.rootNodes).forEach((e=>{qd.cleanCaches(e)})),rs.rootNodes={},sessionStorage.clear(),Uf(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Vs(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:hp.PREVIEW,containerName:hp.PREVIEW,context:F.APP.APP,...t})}showDataPreview(e,t,n){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:hp.PREVIEW,containerName:hp.PREVIEW,context:F.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=Yf.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const a=te,{promise:o}=this.actionsApiPromise(a,r,!1);return Nf({type:a,payload:{...r}}),o}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=Yf.buildActionObject({viewName:e,className:t},this.c11nEnv),a=ne,{promise:o}=this.actionsApiPromise(a,r);return As.getPreviewMode()&&(r.debugInfo={debugId:Bf.generateUniqueID()}),Nf({type:a,payload:{...r,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),o}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Yf.buildActionObject({},this.c11nEnv),r=ae,{promise:a}=this.actionsApiPromise(r,n);return Nf({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Yf.buildActionObject({},this.c11nEnv),r=oe,{promise:a}=this.actionsApiPromise(r,n);return Nf({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,n,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=Yf.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),o=re;r?.containerName||(r.containerName="HYBRID"===Oh.getRenderingMode()?Kd.getRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME):ac.getTargetViewContainerName(o));const{promise:s}=this.actionsApiPromise(o,a);return Nf({type:o,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),s}changeHandler(e,t){Yf.changeHandler(e,t)}eventHandler(e,t){Yf.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,r={skipDirtyValidation:!1}){const a=this.c11nEnv.getContextName(),o=this.c11nEnv.getPageReference(),s=qf.getContextPath(o,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,r);let i=this.c11nEnv.getValue(j.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=vf(`.${c.join(".")}.classID`,o,a)),e=Bf.trimDotForProperty(e),Nf({type:ee,payload:{reference:s,value:t,context:a,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:o="",isListEntry:s=!1,skipDirtyValidation:i=!1,associatedProperty:c}=n,l=this.c11nEnv.getContextName();let d=this.c11nEnv.getPageReference();const u=o?.startsWith(d)?o.replace(d,""):o;d=o||d;const p=qf.getContextPath(d,e);let h=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(u?`${u}${e}`:e,t,{isArrayDeepMerge:a,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),ds({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:l,isListEntry:s}),Nf({type:Q,payload:{reference:p,value:t,context:l,isArrayDeepMerge:a,skipDirtyValidation:i,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...c&&{associatedProperty:`${d}${c}`}}})}activateModalContainerItem(e){const t=Me,{context:n}=e,r=n&&n.includes(j.MODAL),a=Yf.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=j.MODAL,a.isModalAction=r),Nf({type:t,payload:a});const{promise:o}=this.actionsApiPromise(t,a);return o}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:o}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:s,propertyName:i,preserveClientChanges:c,classID:l,context:d,optionalPayload:u,isArrayDeepMerge:p}=r,h={actionMgrID:o,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:u};r.refreshFor&&(h.refreshFor=r?.refreshFor),r.resetForm&&(h.resetForm=r?.resetForm);const f=d||this.c11nEnv.getContextName(),g=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&s&&(((e,t)=>Fl(e)&&!Ll(e,t))(f,g)||Ll(f,g))?Vu(f,n,h):wu(e,t,f,n,h),a}refreshEmbeddedDataWithAction(e,t,n,r,a,o,s,i,c={}){const{promise:l}=this.actionsApiPromise(Yd.REFRESH_DATA),d=this.c11nEnv.getContextName();return Mu(e,t,n,d,r||this.c11nEnv.getPageReference(),a,o,s,i,c),l}openEmbeddedDataModal(e,t,n,r,a,o,s,i){const c=ft;let l=t.getCaseInfo().getKey();const d=t.getValue(F.CASE_INFO.IS_LOCAL_ACTION),u=t.getValue(F.CASE_INFO.ASSIGNMENT_ID),p=((e,t,n)=>n||t!==j.ACTION?e.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID))(t,s,d),h=t.getPageReference();let f="string"==typeof r?`${t.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${r}`:`${t.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${r}]`;h.startsWith(F.OBJECT_INFO.OBJECT_INFO)&&!l&&(l=t.getCaseInfo().getObjectKey(),f=`${t.getPageReference().replace(F.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${r}]`);const g={targetProperty:n,index:r,viewID:e,ID:l,actionType:a,interestPage:Bf.convertPageRefToClipboardPageNotation(f),heading:o,editType:s,interestPageActionID:s===j.ACTION?i:void 0,actionID:p,isLocalAction:d,operationFlag:j.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof r,assignmentID:d||s!==j.ACTION?void 0:u},m=Yf.buildActionObject(g,this.c11nEnv);if(s===j.ACTION){const e=Bf.getETag(m.context);m.headers={"If-Match":e}}const{promise:y}=this.actionsApiPromise(c,m);if(Oh.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=un.trimAnnotation(e.config.value),r=Yh(n.startsWith(".")?n.replace(".",""):n,e.config.classID);r?.isDeclarativeTarget&&rs.addFieldNode(t.getContextName(),h+f,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:h+f})}))}return Nf({type:c,payload:{...m,containerName:F.MODAL,skipSemanticUrl:!0}}),y}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=gt;let n=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID));const r=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID));let a=this.c11nEnv.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"");const o=Dp(e),s=this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:d,viewName:u,parentContext:p}=s;a.startsWith(F.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(F.OBJECT_INFO.OBJECT_INFO_ID),a=this.c11nEnv.getPageReference().replace(F.OBJECT_INFO.OBJECT_INFO_CONTENT,""));const h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:u,isFormValid:Ol(o),interestPage:Bf.convertPageRefToClipboardPageNotation(a),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:d,operationFlag:j.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:r};e&&e.includes(j.MODAL)&&(h.containerName=j.MODAL,h.isModalAction=!0);const f=Yf.buildActionObject(h,this.c11nEnv);if(c===j.ACTION){const e=Bf.getETag(f.context);f.headers={"If-Match":e}}const{promise:g}=this.actionsApiPromise(t,f);if(op(o)){const[e,t,n]=Ho(this.c11nEnv.getPageReference());rs.mutatePageList(p,e,t,{type:et,rowIndex:n}),Nf({type:et,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return Jd.executeOrQueueDeferredAction({type:t,payload:{...f,context:o}}),g}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Dp(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(yt);return Vu(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,t){if(!tf(F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=mt,r=Yf.buildActionObject({containerItemID:e},t);Nf({type:n,payload:{...r,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Ol(e),context:e}});const{promise:a}=this.actionsApiPromise(n,r);return a}showSubscriptCreateView(e,t,n,r=F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const a=Yf.buildActionObject({viewName:r,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),o=ne,{promise:s}=this.actionsApiPromise(o,a);return Nf({type:o,payload:{...a,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}deleteWork(e,t){if(!e)return Promise.reject(new Error("workId is required parameter"));const n=$l.isExternalCaseType(t),r=Yf.buildActionObject({workId:e,caseTypeID:t,isExternalCase:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("DELETE_WORK",r);var o;return Nf((o={...r},{type:Kl,payload:o})),a}};const nu=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=Wg("getCaseStages",n);return(await Vs(r,{method:a},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return wl(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return xl(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=yp(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===j.VIEW?a?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.VIEW_NAME)))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes("pyViewContext")){const t=e.caseInfo?.content??{},r=t.pyViewContext;if(""===r)return n.caseInfo.content;if("string"==typeof r&&r.includes("(")&&r.includes(")")){const e=r.substring(1,r.indexOf("(")),n=parseInt(r.substring(r.indexOf("(")+1,r.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n]}}const r=t.split(/[.[\]]/).filter((e=>e));for(const e of r)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=yp(e,t),{config:r}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),a=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO)),o=r?.type===j.VIEW?r.context:null;if(o){const e=this.getValueByPath({caseInfo:a},o);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(j.getProperty(j.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=W(this.c11nEnv.getContextName());let n;t&&(n=Tf(t));const r=n?.caseInfo?.availableActions,a=Tf(this.c11nEnv.getContextName()),o=a?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:o}return o}return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],r=this.getChildAssignments()||[];let a=JSON.parse(JSON.stringify(r));a=a.map((e=>(e.isChild=!0,e)));const o=[...n,...a];let s=JSON.parse(JSON.stringify(o));return e&&!this.isPerform()&&(s=s.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),s}getActiveCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO);return xl(e)}},{RESOURCE_TYPES:ru}=F;const au=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:nc.getNextActionMgrId(),context:t,...r},o=de;r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:Oh.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:s}=nc.actionManagerPromise(o,a.actionMgrID);return Nf({type:o,payload:a}),s}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:nc.getNextActionMgrId(),context:t,...r},o=fe;r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:Oh.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:s}=nc.actionManagerPromise(o,a.actionMgrID);return Nf({type:o,payload:{...a}}),s}static createCase(e,t,n,r={}){const a=le,o={class:e,acTargetName:n,actionMgrID:nc.getNextActionMgrId(),context:t,...r};r&&r.channelName?o.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:Oh.isWSSPortal()&&(o.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:s}=nc.actionManagerPromise(a,o.actionMgrID);return Nf({type:a,payload:{...o}}),s}static getNextWork(e,t,n={}){const r=fe,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:nc.getNextActionMgrId(),context:e,...n},{promise:o}=nc.actionManagerPromise(r,a.actionMgrID);return Nf({type:r,payload:{...a}}),o}static getOpenedCaseItems(e){const t=[],n=mp(e);if(n){const{items:r={}}=n,a=Object.keys(r),o=Pp(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===ru.CASE||r[n].resourceType===ru.ASSIGNMENT||r[n].resourceType===ru.OBJECT)){const{key:a="",context:s}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),l=vf(".caseTypeID",j.CASE_INFO.CASE_INFO,s),d=o===n;t.push({...i,key:a,workID:a,caseID:c,className:l,context:s,containerItemID:n,target:e,active:d})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:r,reqType:a}=Wg(Be,n),o={},s=V.getRemoteHeaderFromSourceClass(t??"");return s&&(o.RemoteSystemID=s),Vs(r,{method:a,headers:o})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=Wg("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,o=a/5,s={},i=[];for(let e=0;e<a;e+=o)s.cases=r.slice(e,e+o),s.cases.length&&i.push(Vs(t,{method:n,body:s}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0===e?l=c[e].data.availableActions:l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=Wg("getCaseBulkActions",t),a=await Vs(n,{method:r});let o=[];return a.data?.availableActions?.length&&(o=a.data.availableActions),o}};class ou{static getParagraphStream(e,t,n){return((e,t,n)=>{if(!e)return e;const r=(new DOMParser).parseFromString(e,"text/html"),a=r.querySelectorAll("pega-reference");for(const e of a){const n=e.getAttribute("data-rule-id");if(n){const a=t.getValue(n),o=r.createTextNode(a??"");e.replaceWith(o),t.registerAdditionalProps({[n]:`@P ${n}`})}else e.replaceWith("")}let o;return o="simple"===n?r?.body?.textContent||"":r?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(o)?null:o})(e,t,n)}static isDecisionParagraph(e,t){const n=df(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),r=df(e,n);let a;if(r?.useDecision){const n=r.dynamicContents.length;for(let o=0;o<n-1;o+=1)if(qf.resolveWhen(r.dynamicContents[o].when,t)){a=r.dynamicContents[o],e=`${e}#${a.when}`;break}a||(a=r.dynamicContents.pop())}else a=r;const o=r?.definedOnClassID,s=xh().getParagraphLocaleValue(o||n,e);return s?ou.getParagraphStream(s.content,t,s?.category):a?.content?ou.getParagraphStream(a.content,t,a?.category):null}}const su=ou;class iu{constructor(e){this.fieldType=e}applyFallback(e){const t=Ti.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class cu{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new iu(e);default:return}}}const lu="DATAPAGE",du="VIEW",uu="FIELD",pu="PARAGRAPH",hu=(e,t,n,r)=>{const a=[du,uu,pu],o=[lu,pu];(!t||a.includes(e)&&!n)&&console.warn(`Invalid parameters for locale reference: type=${e}, id=${t}, ruleClass=${n}, path=${r}`);const s=o.includes(e)&&r?`#${r}`:"",i=e===lu?"@BASECLASS":n;return e===lu||a.includes(e)?`${i}!${e}!${t}${s}`.toUpperCase():`${e}!${t}${s}`.toUpperCase()};class fu{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=Kh(this.locale),r=this.#r(e,this.localeReference?n.localeStore[`${this.localeReference.toUpperCase()}`]:{})||this.#r(e,n.localeStore[fu.COMMON_LABELS])||this.#r(e,n.localeStore[fu.COMPONENT_FIELDS])||this.#a(e)||e;return(t?this.#o(r,t):r)||e}getLocalizedMessage(e,t){const n=Kh(this.locale).localeStore[fu.MESSAGES]??{},r=this.#r(e,n)??e;return(t?this.#o(r,t):r)||e}getLocalizedDataPage(e,t,n,r){if(!t||!n||!e)return e;const a=hu(lu,t,void 0,n),o=Kh(this.locale),s=this.#r(e,o.localeStore[a])??this.#r(e,o.localeStore[fu.COMMON_LABELS])??this.#a(e)??e;return(r?this.#o(s,r):s)||e}#o(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#a(e){if(0===this.lookupList.length)return;const t=Kh(this.locale);for(const n of this.lookupList){const r=this.#r(e,t.localeStore[n]);if(r)return r}}#r(e,t){if(null==e||!t)return;const n=t[e]??t[e];return"string"==typeof n?n:void 0}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const gu=e=>L.getNeedsMapping()||e?.info===F.OBJECT_INFO.OBJECT_INFO?F.OBJECT_INFO.OBJECT_INFO:F.CASE_INFO.CASE_INFO,mu=(e,t)=>{const n=gu(t);e.data=e.data??{};const{assignments:r,availableActions:a=[]}=e.data[n]??{};if(r&&Array.isArray(r)&&r.length>0&&r[0].actions&&Array.isArray(r[0].actions)&&!t?.stopMergeActions){r[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||a.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=a}},yu=(e,t)=>{const n=gu(t);if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return mu(t),t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const r=e,{uiResources:{actionButtons:a,navigation:o},nextAssignmentInfo:s}=r;if(r.data&&r.data[n]&&(a&&(r.data[n].actionButtons=a),o&&(r.data[n].navigation=o),t&&t[F.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,mu(r,t),e.confirmationNote)){const{confirmationNote:e}=r,t=[e];r.data.caseMessages=t}return t&&t.isCreateDataObject&&(r.data=r.data??{},r.data.dataInfo={},r.data.dataInfo.content=r.data.pyPortal,r.uiResources.root.config.context="dataInfo.content",r.uiResources.context_data.dataInfo=r.uiResources.context_data.dataInfo??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data.dataInfo.content??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data?.pyPortal,delete r.data.pyPortal,delete r.key),s&&(r.data=r.data??{},r.data.nextAssignmentInfo=s),r},Iu=async e=>{const t=yu(e),n=Bf.getIn(t,j.COMPONENTS);Fi(t,{},!0),await Zi(n)},Eu=(e,t,n)=>qf.resolveView(e,t,n);const Au=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=qf.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=qf.getContextPath(this.datasource,this.index);return this.index+=1,vu({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Cu{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,vu({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Su=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new Au(e,e.context||"",t);if(n){const n=Rf(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new Au(e.children[0],n||e.context,t)}return e?.children?new Cu(e.children,t):void 0};class _u{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>Xl.isProperty(e))).map((e=>Xl.getPropertyName(e)))}}const bu=new _u;let Nu;Object.freeze(bu);const Tu=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],o=un.trimAnnotation(a);if("string"!=typeof o&&"string"!=typeof a||!(Bf.isValidAnnotation(a)&&Bf.isPropertyRef(o)||a.startsWith("@W ")||a.startsWith("@DW ")||a.startsWith("@E ")||a.startsWith("@ATTACHMENT "))){if(Array.isArray(o))o.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),Tu(e,t[r][n],a)}));else if(o&&"object"==typeof o&&"exp"!==o.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},Tu(o,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=o}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Pu=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...Bf.deepClone(t.inheritedProps)]};class Ou{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:a}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=a,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=Bf.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Pu(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=Xs.formatePageReferenceToArrayIndex(this.meta.config.value)),Tu(this._rawConfig,this._stateProps),this._isState=!Bf.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=Bf.isExpressionExist(this._rawConfig.config),this._isWhenExist=Bf.isWhenExist(this._rawConfig.config),this._isValidatorExist=Mi.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=F.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let o=this.options.pageReference;this.options.pageReference&&(o=un.handleAnnotation(this.options.pageReference,this)),this._pageReference=qf.getContextPath(o||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const s="reference"===this._type&&Bf.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=qf.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=un.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=Bf.isExpressionExist(e),this._isWhenExist=Bf.isWhenExist(e),this._isValidatorExist=Mi.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=un.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Uu(this)}(s||i||c)&&Lu(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(j.PARAGRAPH_ANNOTATION)){const r=un.trimAnnotation(t);n=su.isDecisionParagraph(r,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=un.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=un.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:a,disabled:o,visibility:s,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const d="Address"===this._type&&this._rawConfig?.config?.associatedView?un.trimAnnotation(this._rawConfig.config.associatedView):"",u=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:un.trimAnnotation(t),label:u?.startsWith("@")?un.handleAnnotation(u,this,void 0):u,required:r,readOnly:a,disabled:o,visibility:s||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};rs.addFieldNode(this._contextName,this._pageReference,(d||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)rs.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",un.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)rs.removeViewNode(this._contextName,this._pageReference,un.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;rs.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&rs.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&rs.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&rs.addViewNode(this._contextName,this._pageReference,un.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&rs.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=Bf.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=un.isProperty(n)?un.trimAnnotation(n):""}e&&n.forEach((n=>{rs.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,readOnly:r,disabled:a,visibility:o,validationType:s,selectionMode:i,selectionList:c,selectionKey:l,referenceList:d,renderMode:u,caption:p}=this.getRawConfigProps(),h=t||p;let f=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(f=this.getSelfReferencingDatapageKeys()),rs.addPageListNode(this._contextName,this._pageReference,this.viewName??"",un.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:un.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?un.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:a,visibility:o||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:s,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:u,referenceList:d,selectionKey:l,index:this.index,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?f:void 0});const g=this.getValue(un.trimAnnotation(this.getPropertyName()),this._pageReference)||[];rs.updatePageListNode(this._contextName,this._pageReference,un.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){Bf.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=Eu(t,this,e);if(!n)return;const r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let a={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(a=n.config.parameters);const o=Bf.generateDataPageHashWithParameters(a,r,this),s=Pf(),i=s?s[r]?.[o]:{};return Array.isArray(i?.pxResults)?i.pxResults:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new nu(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID));return xh().getCaseLocaleReference(e)}getListActions(){return Ni(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return qf.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=hp.PRIMARY,name:r,routingInfo:a}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===a)&&r?r:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=d?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=qf.getContextPath(this.getPageReference(),n),a=t?Gc.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Ti.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=cu.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),Bf.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),r=Oh.getLocale()??"en-US",a=new fu(r,n),o=this.getCaseLocaleReference();return o&&a.setLookupList([o]),a}getRawConfigProps(){const e={...Ti.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(qf.resolveProps(e,t,this),un.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Tu(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),r=this.getComponentConfig(),a=n===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE){const n=Pp(`${j.APP.APP}/${this.getContainerName()}`),r=ls({context:n,category:F.PAGE});e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||un.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=ls({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_ERROR}),r=ls({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_INFO});n&&n[0]&&(e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status),r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===j.ROOT_CONTAINER){const n=hs(a,Pp(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const r=Gc.getSharedState("isLoggedOut");e.isLoggedOut=r,this._stateProps.isLoggedOut=r;const o=ls({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=t(o),this._stateProps.pageMessages=e.pageMessages}if(n===j.HYBRID_VIEW_CONTAINER){const n=ls({context:j.APP.APP,category:j.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=au.getOpenedCaseItems(`${F.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===j.APP_SHELL){const n=j.APP.APP,r=Pp(`${n}/${this.getContainerName()}`),a=[...ls({context:n,category:"PAGE"})||[],...ls({context:r,category:"PAGE"})||[]],o=a.length>0?a:void 0;e.pageMessages=o&&t(o),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===j.SCALARLIST&&(this._stateProps.value=e.value),n===j.APP_SHELL||n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE||r.template===j.CASE_PREVIEW){let t=ls({context:j.APP.APP,category:"HTTP"});const n=ls({context:Pp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(ls({context:Pp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=ls({context:Pp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(e.message))):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(n===j.VIEW_CONTAINER||n===j.FLOW_CONTAINER||n===j.MODAL_VIEW_CONTAINER||n===j.PREVIEW_VIEW_CONTAINER||n===j.ROOT_CONTAINER){if(e.routingInfo=Ot(this.getContainerName(),this._contextName),n===j.ROOT_CONTAINER&&(e.rootConfig=_u.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===j.FLOW_CONTAINER){const n=ls({context:this.getContextName(),category:j.CASEMESSAGES}),r=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const a=xp(r)[0];if(a){const n=Pp(a),r=d?.getStore()?.getState()?.data;r&&n&&(e.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime);const o=ls({context:n,category:F.PAGE}),s=ls({context:n,category:"HTTP"});e.httpMessages=t(s),e.pageMessages=t(o),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,s?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===j.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else r.template===j.CASE_VIEW||r.template===j.SELF_SERVICE_CASE_VIEW||r.template===j.CASE_PREVIEW||r.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const o=this.getInheritedProps()?.shouldAutoRefresh;o&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:a,propertyAnnotation:o}=this.getPropertyDetails(r,n,t);if(a&&"string"==typeof a&&(a.includes(o)||a.includes(j.ATTACHMENT_ANNOTATION))){const t=un.getPropertyName(a),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=yf(`${this._pageReference}.${t}`,this._contextName);return e?.additionalInformation&&this.setStateProps({additionalInformation:n}),Array.isArray(e)||(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(Yh(e,t),e)}const n=t.pop(),r=t.join(".")?".":"";let a=this.getValue(`${r}${t.join(".")}${j.CLASS_ID}`);return a||(a=Bf.resolvePageClass(e,this.getValue(j.CASE_INFO.CASE_INFO_CLASSID))),this.resolvePropertyMetadata(Yh(n,a),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(Yh(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[j.getProperty(F.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Ll(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new Gl(this)}isEditable(){return!(!this._rawConfig||!this._rawConfig.config||this._inheritedConfig&&this._inheritedConfig.readOnly||!(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)||"string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST")||Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly)||Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?un.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||un.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||un.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const r=n.getConfigProps(),a={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let o=n._type&&a.includeTypes.includes(n._type)&&!a.excludeTemplates.includes(r.template);if(!!r.highlightedData&&r.highlightedData.length&&r.showHighlightedData&&(o=!1),!o)return!0;const s=n.getChildren();return!!s&&s.some((t=>t.getPConnect().getComputedVisibility(e)))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return Tf(e||this.getContextName())}getImagePath(e){return`${Ji.getConstellationServiceUrl()}/v860/${Ji.getAppAlias()}/image/${e}?org=${Th.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=Su(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#s(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),a=r&&t?`${r}#${t}`:r,o=this.getLocalizationService(a).getLocalizedText(e);return o===e?this.getLocalizationService().getLocalizedText(e):o}getLocalizedValueForFieldLabel(e){e.startsWith(".")&&(e=e.substring(1));const t=this.getFieldMetadata(e)?.label,n=this.getLocaleRuleName(),r=this?.getMetadata();let a=null;if(r){const n=r?.type,o=["View","Region"];let s=r?.config?.label||r?.config?.caption?`@FL ${e}`:null;const i=Array.isArray(r?.config?.inheritedProps)?r.config.inheritedProps.find((e=>"label"===e.prop)):null;if(!s&&i&&(s=i.value),s?.startsWith(j.FIELD_LABEL_ANNOTATION)){const e=this.#i(s);return xh().getLocaleValue(t,void 0,e,a)}n&&!o.includes(n)&&(a=n)}return this.getLocalizationService(n).getLocalizedText(t)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?qf.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):qf.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),Pu(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),qf.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,a={}){let o,s;const{isArrayDeepMerge:i}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(o=!0,t||(s=!0)),Nf({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...o&&{isStrictTracking:o},...s&&{removePropertyFromChangedList:s}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};ap(n)}getContextDataValue(e,t){return Df(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),Nf(Qf({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;Nf({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){Nf(Tg(e,t||{},n,t?.formFields))}getComponent(){return Nu({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=Rf(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);a=qf.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=un.handleAnnotation(e,this),a=qf.getContextPath(this._pageReference,e)||""}return Nu(vu({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:a,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName},useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return qf.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,vu({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new ed(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new tu(this)),this._actionsApi}getActionManager(){return nc}doesContextExist(e){return kf(e??this.getContextName())}getGoogleMapsAPIKey(){return S()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=Tf(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?ds({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?ds({type:"error",...e}):(ds({type:"error",...e,context:j.APP.APP}),ds({type:"error",...e,context:Pp(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Rf(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Al(t);El[e]?El[e].fieldOrder[r]=n:El[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,a])=>{if(Array.isArray(a)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();bi(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e+=1)yi(a[e],e,r,void 0,{})}else"object"==typeof a&&r(a,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=Gc.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=qf.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=qf.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,Gc.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const r=cn.getDependencies(this._contextName,n);r?.forEach((e=>{Gc.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:r={}}={}}=n||{};return Object.values(r).forEach((n=>{const[,r]=n.split("."),a=t?.split(".").pop();r===a&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(e,t){const n=Xl.isPropertyInternal(t),r=e.datasource,a=this.getComponentConfig().isSearchField,{isClassKey:o,isSpecial:s,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!a&&(i||n||!r&&(o||s)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#s(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===_u.allowedComponetsForBulkProcessing[t]||!0===_u.allowedComponetsForBulkProcessing[t]?.[n])}#i(e){const t=e.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),r=n?.pop();let a=`${r}`;const o=this.getFieldMetadata(a),s=o?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),i=o?.definedOnClassID;return a=`${i||s}!FIELD!${a}`,a}}function vu(e){const t=new Ou(e);return{getPConnect:()=>t}}function Du(e){Nu=e}const Ru=e=>({type:Yd.REFRESH_DATA,payload:e}),$u={},xu=(e,t,n,r,a,o,s,i)=>{if(!(e&&r&&t))return;const c=i.actionMgrID||nc.getNextActionMgrId(),l={ID:e,actionID:t,objectTypeID:n,context:r,caseWideAction:a,isObjectType:o,isExternalObject:s,options:{...i,actionMgrID:c}};i.isFillFormWithAI?Nf((e=>({type:yt,payload:e}))(l)):Nf(Ru(l))},wu=(e,t,n,r,a)=>{if(!(e&&n&&t))return;r&&(r=Bf.convertPageRefToClipboardPageNotation(r));Nf(Ru({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r}))},Mu=(e,t,n,r,a,o,s,i,c,l={})=>{if(!((e||t)&&r&&n&&a))return;a&&(a=Bf.convertPageRefToClipboardPageNotation(a));const d={ID:s||c!==j.ACTION?e:t,actionID:n,context:r,options:l,interestPage:a,interestPageActionID:o,isLocalAction:s,isMultiRecordData:i,editType:c};Nf(Ru(d))},Lu=(e,t,n)=>{$u[t]||($u[t]={}),e&&!$u[t][e]&&($u[t][e]={pageReference:n})},Fu=(e,t,n)=>{const r={pageName:(a=t.substring(t.lastIndexOf(" ")+1)).substring(0,a.lastIndexOf(".")),propertyName:a.substring(a.lastIndexOf(".")+1)};var a;const o=Yh(r.propertyName,n||e.getValue(j.CLASS_ID,r.pageName));return!!o?.isDeclarativeTarget},ju=(e,t)=>{const n=e.getRawMetadata()?.config?.value;let r=!1;if(n){const a=Yh(un.getLeafPropertyName(n),t||qf.resolveClassID(n,e.getPageReference(),e.getContextName()));if(r=!!a?.isDeclarativeTarget,!r&&a?.additionalInformation){const e=un.trimAnnotation(a?.additionalInformation);r=su.isDecisionParagraph(e,a.classID)}!r&&a?.datasource?.parameters&&(r=((e,t,n)=>{let r=!1;if(Array.isArray(t)){const a=t=>{const a=t.value;return a.startsWith("@P")&&(r=Fu(e,a,n)),r};t.some(a)}else if("object"==typeof t)for(const a of Object.keys(t))if(t[a].startsWith("@P")&&(r=Fu(e,t[a],n),r))break;return r})(e,a?.datasource?.parameters,t)),r||(r=a?.datasource?.tableType===j.DECISION)}return r},Uu=e=>{(e.isWhenExist()||ju(e))&&Lu(e.getCurrentView(),e.getContextName(),e.getPageReference())},ku=e=>{if(!e)return!1;const t=bf()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return $l.isObjectCaseType(n)},Vu=(e,t,n)=>{const r=Ll(e,t),a=$l.isObjectCaseType(n?.classID)||t.startsWith(j.OBJECT_INFO.OBJECT_INFO);let o,s,i="",c=!1;const l=n=>qf.getPropertyValue(n,t,e)||"";if(a&&ku(e))i=l(F.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),c=$l.isExternalObject(i),n.isObjectWideAction=!0,o=l(F.OBJECT_INFO.ACTIVE_ACTION_ID)||j.VIEW_NAMES.OBJECT_CREATE_VIEW,s=l(j.getProperty(F.CASE_INFO.CASE_INFO_ID))||i;else if(o=l(F.CASE_INFO.ACTIVE_ACTION_ID)||l(F.CASE_INFO.ASSIGNMENTACTION_ID),r)s=l(j.getProperty(F.CASE_INFO.CASE_INFO_ID));else{s=l(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID))||l(j.getProperty(F.CONTEXT_DATA_ASSIGNMENTID))}xu(s,o,i,e,r,a,c,n)},Bu=e=>{const{context:t,pageReference:n}=e,r=(e=>$u[e]&&Object.keys($u[e]).length>0&&Fl(e))(t);if(!r)return;const a=qf.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:o,editType:s}=a||{};if(o){const e=qf.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,n,t),r=qf.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:d,viewName:u}=a;s===j.ACTION?Mu(e,r,l,t,i,c,d,o,s):wu(e,u,t,i,{})}else Vu(t,n,{})},Gu=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},Wu=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),r=t.url?.includes("/refresh?refreshFor="),a=e.url?.endsWith("/refresh")&&!n,o=t.url?.endsWith("/refresh")&&!r;if(a&&o)return((e,t)=>{const n=e.url===t.url,r=e.interestPage===t.interestPage;return n&&r})(e,t);if(a&&r)return!0;if(n){if(o)return"CANCEL_REFRESH";if(r)return!1}return!1},Hu=e=>{const t=(e=>{const t=[];return rs.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let a=r.join(".");e&&a&&(a=Bf.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a}))})),t})(e),n=(e=>{const t=[];return rs.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const a=r.split(".");a.shift();let o=a.join(".");e&&o&&(o=Bf.convertPageRefToClipboardPageNotation(o),t.push({name:e,context:o,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const qu=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:zu}=j;let Yu={},Ku={},Ju={};const Xu="You will lose unsaved changes. Do you want to continue?",Qu="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Zu=(e=zu.APP,t,n)=>{let r=[],a=[];t||(r=vl(e,!0)),n||(a=(e=>{const t=rs.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===qf.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const o={};((e,t,n)=>{const r=Ku[t]||{};Object.keys(r).forEach((t=>{const a=r[t].associatedProperty;Object.hasOwn(r,t)&&(void 0===a||n.includes(a))&&Bf.buildObject(t,e,r[t].value)}))})(o,e,r);const s=Yu[e]||{};return Object.keys(s).forEach((e=>{const n=!t&&r.includes(e)||t;Object.hasOwn(s,e)&&n&&!a.includes(e)&&Bf.buildObject(e,o,s[e].value)})),o},ep=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete Yu[t]?.[n],delete Ku[t]?.[n]},tp=e=>e&&Ju[e],np=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:a,associatedProperty:o}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[s]?e[s].previousValue=vf(t.reference,null,n):(e[s]={initialValue:r||vf(t.reference,null,n)},e[s].previousValue=e[s].initialValue),e[s].value=t.value,o&&(e[s].associatedProperty=o),a&&e[s].value===e[s].initialValue&&ep(t)},rp=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;rs.isFieldExists(n,r)||(Ku[n]=Ku[n]||{},np(Ku[n],t)),Yu[n]=Yu[n]||{},np(Yu[n],t)},ap=({value:e,context:t,reference:n})=>{const r=Hp(t),a=yp(r,t)||{};if(qu.isPageInstruction(n)||a?.subscriptFieldName)return;const o=n?.startsWith(".")?n?.substr(1):n;Yu[t]=Yu[t]||{};Yu[t][o]||(Yu[t][o]={initialValue:vf(o,null,t)}),Yu[t][o].value=e},op=e=>e&&Yu[e]&&Object.keys(Yu[e]).some((t=>Yu[e][t].initialValue!==Yu[e][t].value))||!!tp(e),sp=(e,t)=>{if(!e||!t)return!1;const n=Yu[e]&&Yu[e][t];return!!n&&n.previousValue!==n.value},ip=e=>{e&&Yu[e]?(Yu[e]={},Ku[e]={}):"all"===e&&(Yu={},Ku={},Ju={}),Ju[e]&&(Ju[e]=!1)},cp=(e,t,n=new Set)=>{if(n.has(t))return;n.add(t);[...cn.getDependencies(e,t),...Af.getResetDependencies(e,t)].forEach((t=>{const r=Bf.getPropertyNameFromDependency(t);if("object"==typeof t&&"multiRecord"===t.mode){const t=r.split("."),n=`.${t.pop()}`,a=t.join(".");if(Il.isStateMachineExist(e,a,n)){Il.getStateMachine(e,a,n).deleteAll()}}else qu.isPageInstruction(r)&&Il.executeStateMachine(e,r,""),Nf({type:Q,payload:{reference:r,value:"",context:e,isArrayDeepMerge:!0,isImplicit:!0}});cp(e,r,n)}))},lp={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(an(r),(e=>{const{context:t,pageReference:n,value:r,reference:a}=e;Af.triggerCascade(t,a,r);const o=cn.getDependencies(t,a),s={context:t,datapages:{}};cp(t,a),o.forEach((r=>{let a=n;r.startsWith(n)||(a="");const o=r.replace(`${a}`,"").split(".").filter((e=>!!e));o.pop();const i=o.join("."),c=vf(`.${i}`,a,t)?.classID||e.classID,l=Yh(r.split(".").pop(),c),{datasource:d}=l,u={},p=[];d.parameters.forEach((e=>{e?.value?(u[e.name]=Xl.isProperty(e.value)?vf(`.${Bf.getFullPropertyReference([i,Bf.getPropertyName(e.value)])}`,a,t):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(j.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(j.NULL_STRING))}));const h=d.name.concat(j.UNDERSCORE_STRING,Bf.getHashedString(p.join(j.HASH_DELIMITER))),{name:f}=d,g=af(f);s.datapages[h]={mode:d.mode,propertyName:r,name:d.name,dataViewParameters:u,refreshStrategy:g?.refreshStrategy}})),o.length&&Nf({type:nt,payload:s})})(r),setTimeout((()=>{(sp(r.context,r.reference)||_i(r.context))&&Bu(r),Hd.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)}),0)),n===ot&&!r?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:a,instruction:o,skipDirtyValidation:s=!1}=r;0===a&&"INSERT"===o&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const r of n){const n=vu({meta:r}).getPConnect();if(n.isWhenExist()||ju(n,t))return!0;if(r.children&&e(t,r.children))return!0}return!1}(n.contextClass,n.children??[])),t&&Lu(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),Bu({context:e,pageReference:t}),s||(Ju[`${e}`]=!0)}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:o=!1}=r;rs.updateFieldNodeValue(a,e,r.value),qu.isPageInstruction(e)||o?o||(Ju[`${a}`]=!0):rp(t),(r.removePropertyFromChangedList||n)&&ep(r)}if(n===Oe||n===ve){const{transientItemID:e,data:t}=r;Bf.iterateLeafNodes(t,(t=>{ep({context:e,value:"",reference:t.join(".")})}))}if(n&&[$e,_e,we,Pe].includes(n)){ip(r.context),Af.purgeResetDependencies(r.context),(a=r.context)&&$u[a]&&delete $u[a];(r.childContainersContexts||[]).forEach((e=>{ip(e)}));(r.transientItems||[]).forEach((e=>{ip(e)}))}var a;e(t)},getChanges:Zu,recordChange:rp,isDirty:()=>Object.keys(Yu).some((e=>op(e))),isPropertyDirty:sp,isContextDirty:op,resetChangedProperties:ip,deleteRecordedChange:ep,isComplexObjectMerged:tp};const dp=new class{getCoreheaders(e){const t=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=Pp(t),r=Dp(n),a=qf.getProperty(j.COREHEADERS,"",r);if(a&&e in a)return a[e]}},up={defaultLimit:16},pp={SINGLE:"single",MULTIPLE:"multiple"},hp={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},fp=()=>bf()?.getState()?.containers;function gp(e){return"string"==typeof e&&""!==e.trim()}const mp=e=>gp(e)?bf()?.getState().containers[e]:null,yp=(e,t)=>{if(!gp(e)||!gp(t))return null;const n=fp(),r=n?.[e];return r&&r.items&&r.items[t]||null},Ip=e=>gp(e)?bf()?.getState().containers[e]?.items:null,Ep=e=>gp(e)&&bf()?.getState().containers[e]?.accessedOrder||[],Ap=e=>gp(e)&&Ep(e)?.length>0||!1,Cp=(e,t,n)=>{if(!gp(e)||!gp(t))return!1;const r=fp(),a=r?.[e],o=a&&a.items||null,s=n||((e,t)=>e===t);if(t&&o)for(const e of Object.keys(o))if(s(t,o[e].key))return!0;return!1},Sp=(e,t,n)=>{if(!gp(e)||!gp(t))return null;const r=fp(),a=r?.[e],o=a&&a.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&o)for(const e of Object.keys(o))if(s(t,o[e].key))return e;return null},_p=(e,t)=>{if(e&&t)for(const a of Object.keys(t))if(n=e,r=t[a].key,n?.toLowerCase()===r?.toLowerCase())return t[a];var n,r;return null},bp=e=>{if(!gp(e))return null;const t=fp()??{};for(const n of Object.keys(t))if(t[n]){const r=t[n].items??null,a=_p(e,r);if(a)return a}return null},Np=(e,t)=>{if(!gp(e)||!gp(t))return!1;const n=fp();return n&&Object.hasOwn(n,`${e}/${t}`)},Tp=(e,t)=>{if(!gp(e)||!gp(t))return null;const n=fp(),r=n?.[`${e}/${t}`];return r&&r.type},Pp=e=>{if(!gp(e))return null;let t=null;const n=fp();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},Op=(e,t,n)=>{if(!gp(e)||!gp(t))return!1;const r=Sp(e,t,n);return!!r&&r===Pp(e)},vp=(e,t)=>{let n=null;const r=fp();if(!r)return null;for(const a of Object.keys(r))if(r[a].items){const o=r[a].items[e];if(n=o?o[t]:null,n)break}return n},Dp=e=>gp(e)?vp(e,"context"):null,Rp=e=>{if(!gp(e))return null;let t=null;const n=fp();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,o=a&&a.length>0?a[a.length-1]:null;t=Dp(o)}return t},$p=e=>{if(!gp(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=fp();if(!a)return[];const o=n=>{const a=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&a.push(n),n===e&&(r=!0)})),a};for(const e of Object.keys(a))if(a[e].items){const t=o(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},xp=e=>{if(!gp(e))return[];const t=[],n=fp();if(!n)return[];for(const r of Object.keys(n))r.startsWith(e)&&r!==e&&t.push(r);return t},wp=e=>{if(!gp(e))return[];const t=[],n=fp();if(!n)return[];for(const r of Object.keys(n))if(r.startsWith(e)&&r!==e){(Ep(r)||[]).forEach((n=>{Dp(n)!==e&&t.push(Dp(n))}))}return t},Mp=e=>{const t=[...wp(e),e],n=[],r=bf()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},Lp=e=>gp(e)?e&&mp(e)&&mp(e).type===pp.SINGLE:null,Fp=e=>gp(e)?e&&mp(e)&&mp(e).type===pp.MULTIPLE:null,jp=e=>gp(e)&&mp(e)&&mp(e).items&&Object.keys(mp(e)?.items).length>0||!1,Up=e=>e&&up[e]?up[e]:up.defaultLimit,kp=(e,t=up.defaultLimit)=>{gp(e)&&(up[e]=t)},Vp=e=>{if(!gp(e))return!1;let t=!1;const n=mp(e),{items:r={}}=n,a=Object.keys(r),o=Up(e);return a&&a.length>0&&a.length>=o&&(t=!0),t},Bp=e=>{if(!e||!gp(e.name)||!gp(e.context))return null;const t=e?.name,n=mp(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=xp(`${j.APP.APP}/${j.PREVIEW}`),o=wp(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...o],childContainers:a}},Gp=e=>{if(!gp(e))return!1;const t=Dp(e);return op(t)||al(e)},Wp=e=>{if(!gp(e))return null;let t;const n=mp(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Gp(n)){t=n;break}}return t},Hp=e=>{if(!gp(e))return null;const{containers:t}=bf()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.slice(0,n)},qp=(e,t={})=>{if(!gp(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Hp(e),r=Dp(e),{skipDirtyCheck:a}=t;let o=!0,s=[];if(Gp(e)&&!a&&(o=window.confirm(xh().getLocaleValue(Xu,"Messages"))),o){const{accessedOrder:t=[],items:a={},type:o}=mp(n);s=t.filter((t=>t!==e));const i=s[s.length-1],c=a[i]||{},{semanticURL:l=j.FORWARD_SLASH_STRING,context:d}=c;s.length>0&&l&&l!==j.FORWARD_SLASH_STRING?Xg({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:d}}):Xg({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});Nf(Ig({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:s,containerType:o}}))}return Promise.resolve({newAccessedOrder:s,removeItem:o})},zp=(e,t,n,r)=>{const a="root",o=H(t,a,!0),s=Pt(t,a),i={data:n,context:r?"app":o},c=[sg({root:e,containerItemID:o,context:r?"app":o,target:s,containerName:t})];c.push(Qf(i)),Nf(c)},Yp=(e,t,n)=>{let r=Ep(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1){if(Dp(r[e])===n){a=!0;break}}return a},Kp=e=>{if(!gp(e))return!1;const t=fp(),n=Dp(e),r=t?Object.keys(t):[];let a=!1;for(let t=0;t<r.length&&(a=Yp(r[t],e,n),!a);t+=1);return a},Jp=e=>{Array.isArray(e)||(e=[e]);const t=fp()||{};return e.map((e=>{const n=Hp(e);return Bf.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},Xp=e=>{const{transientItemID:t,data:n,options:r}=e,a=Bf.deepClone(bf()?.getState().data[t]);r?.reset&&Bf.iterateLeafNodes(a,(e=>{"classID"!==e[e.length-1]&&Bf.setIn(a,e,"")})),Nf(cg({transientItemID:t,data:Bf.mergeDeep(n,a)}))},Qp=e=>{const{transientItemID:t,data:n}=e;Nf(dg({transientItemID:t,data:n}))},Zp=e=>{const t=Bf.deepClone(bf()?.getState().data[e]);Bf.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&Bf.setIn(t,e,"")})),Nf(lg({transientItemID:e,data:t}))},eh=e=>{const t=Bf.deepClone(bf()?.getState().data[e]);Bf.iterateLeafNodes(t,(e=>Bf.setIn(t,e,""))),Nf(ug({transientItemID:e,data:t}))};class th{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const nh=()=>th,rh=e=>{const t={containerName:e};t.childContainers=xp(e),Nf({type:Le,payload:t})},ah=(e,t)=>{const n=$p(e),{key:r}=yp(Hp(e),e),a=[];n.forEach((e=>{const{key:n}=yp(Hp(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Hp(e),context:e};a.push({type:ge,payload:n})}})),a.length&&Nf(a)},oh=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Hp(e),context:e};n.push({type:ge,payload:r}),n.length&&Nf(n)},sh=()=>Oh.isPortalLoaded?"app":"root",ih=()=>dp,ch=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Hp(e),context:e};Nf({type:ge,payload:n})},lh=(e,t)=>{const n=Sp(e,t),r=Sp(`${n}/workarea`,t);return Dp(r)},dh=e=>gp(e)?vp(e,"parentContext"):null,uh=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},ph=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},hh=()=>Zl,fh=/{(.*?)}/i,gh=/{(.*?)}/g,mh=e=>null!==e.match(fh),yh=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),Ih=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},Eh=()=>yh(window.location.pathname),Ah=()=>yh(window.location.pathname+window.location.search),Ch=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}},Sh=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),a=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&"activeTab"!==e&&a.set(e,t);const o=new URLSearchParams(a).toString();return o?`${t}?${o}`:t}return e},_h=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),r=n.indexOf("assignments"),a=n.slice(r-2).join("/"),o=n[n.length-1],s=Gg(Ge,{assignmentID:o});return{routeEndpoint:s?.restApi,requestType:s?.reqType,payload:{assignmentID:o},options:t,routeKey:Qe,urlPath:a}})(e,t):Th.getEndPointInfo(e),bh=()=>{const e=Oh.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const Nh=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{mh(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>yh(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>yh(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return(e=e.replace(n,"")).startsWith("/")&&bh()&&"PREVIEW"!==Oh.getRenderingMode()&&this.setDefaultClassName(""),yh(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails(e,t){if(!t)return this.appRoutes[e];let n="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.values(this.appRoutes).forEach((t=>{t.payload?.page===e?(n=t.routeKey,r={...t.payload}):this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload})})),{routeKey:n,payload:r}}transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!V.isRemoteCase(t))return e;const{RemoteClassGroup:r,RemoteSystemID:a}=V.getRemoteCase(t);return{...e,caseID:n?.replace(t,r?.toUpperCase()),RemoteSystemID:a}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=bh();let n=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);r||(n=this.processUrl(this.defaultViewUrlPath,!t),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:a,payload:o}=this.getRouteDetails(r,t);if(!this.appRoutesMeta?.[a]?.restApi)return null;const{reqType:s,endPoint:i,params:c}=this.appRoutesMeta[a].restApi,l={routeKey:a,requestType:s,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(o)}};return this._resolveRoute(l,this.processUrl(e,!1),r)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;if(mh(r)){const e=r.match(gh);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}))}const o=Jg(a),s=new URL(o);return this.isDefaultPortal()||this.getPortalName()&&!s.searchParams.toString().includes("portal=")&&s.searchParams.append("portal",this.getPortalName()),s.toString()}buildDocumentTitle(e,t,n){const r=n??"";return e&&t?`${e} (${t}) - ${r}`:r}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:a,name:o}=e;if(a&&!r)return;const s=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Tc(t))),i=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,c={semanticURL:s,directUrlUpdation:!0,options:{acName:i,context:Rp(i)}},l=Eh();s&&!l.includes(s)&&Kg(c);const d=t.substring(t.lastIndexOf(" ")+1),u=Oh.environmentInfoObject?.pxApplication?.pyLabel,p=this.buildDocumentTitle(o,d,u);am(p)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},a=r?.split("/").length,o=r?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const s=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return o?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===s.length)return this._getQueryParamsResolvedURL(s[0],n);if(0===Object.keys(t).length)return"";const i=s.find((e=>{const r=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const o=r.dataViewKeys||r.dataContextParameters||{},s=Object.keys(t).every((e=>t[e]===r[e]));return!!s&&(Bf.isEmpty(o)||Bf.isEmpty(a)?s:Object.keys(a).every((e=>Object.hasOwn(o,e))))}));return i?this._getQueryParamsResolvedURL(i,n):s.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,a]=e.includes("?")?e.split("?"):[e];if(a){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const o=new URLSearchParams(a),s={};for(const[r,a]of o.entries())if("string"==typeof a&&mh(a)){const o=this._getDynamicKeyName(a);s[r]=n?t[o]||e[o.toLowerCase()]:t[o]}else"string"==typeof a&&(s[r]=a);return`${r}?${new URLSearchParams(s).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:a}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const o=a.match(gh);if(o)for(let e=0;e<o.length;e+=1){const n=o[e].replace("{","").replace("}",""),r=new RegExp(o[e],"g");a=a.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:a,reqType:n,body:e}}return{restApi:a,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[a,o]=t.includes("?")?t.split("?"):[t],[s,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),l=s.split("/"),d={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],mh(l[e])){d[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(o),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e of Object.keys(u))mh(u[e])?d[e]=p[e]||h[e.toLowerCase()]:d[e]=u[e];let f;o&&(f=this._getQueryParamsResolvedURL(n,p,!0));const g=this._resolvePayload(e,d,n);return{...this._resolveRouteEndPoint(g,n),urlPath:f||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!mh(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(gh);for(let a=0;a<t.length;a+=1){const o=t[a],s=this._getDynamicKeyName(o);if(void 0!==e.payload[s]){const t=e.payload[s];n=n.replace(o,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in routeEndpoint- ${s} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r of Object.keys(e)){let a=e[r];if("string"==typeof a&&mh(a)){const e=a.match(gh);for(let n=0;n<e.length;n+=1){const r=e[n],o=this._getDynamicKeyName(r);if(void 0!==t[o]){const e=t[o];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in payload- {${o}} is missing in semantic url construct`)}n[r]=a}else"object"==typeof a&&(n[r]=this._resolvePayloadRecursive(a,t))}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let r=this._findMatchedRouteInStaticList(n,t);return void 0!==r?r:(r=this._findMatchedRouteInDynamicList(e),void 0!==r?r:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),r=t?.toLowerCase();if(bh()){const e=this._findMatchingRouteByClass(n,r);if(!e)return;const t=Object.values(e)[0],a=t?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,r])=>{if(!r)return!1;const a=r.payload?.page?.toLowerCase(),o=r.payload?.pageClass?.toLowerCase(),s=a===e||n.toLowerCase()===e;return t?s&&o===t:s}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],o=t.split("/");if(o.length!==r.length)return!1;let s=0;for(s=0;s<o.length;s+=1){const e=o[s].toLowerCase();if(!mh(e)&&e!==r[s]&&Ih(e)!==r[s])return!1}if(a){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(a.toLowerCase()),r=new Set,o=new Set,s=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())o.add(e);if(o.size!==r.size)return!1;for(const n of r){if(!o.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!s.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{Ch(e,t,"warning"),Ch("Error in Generated Routing Table",null,"error"),Ch("Back | Forward for this page may NOT work as intended",null,"warning"),Ch("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},Th=Nh;const Ph=new class{constructor(){this.languagePacks=[]}getLocalizationBundles(e=Oh.getLocale()){return(this.languagePacks.find((t=>t.pyLangCode===e))?.pyBundles??this.languagePacks.find((e=>e.pyLangCode===j.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}async loadLocaleBundle(e){const t=[];e.forEach((e=>{t.push($d.getPageDataAsync("D_pzBundlesForLocalization","",{locale:e,onlyApp:"false"},{invalidateCache:!0}))}));const n=(await Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value.pyLanguagePacks));this.setLanguagePack(n)}setLanguagePack(e){e.forEach((e=>{const t=this.languagePacks.findIndex((t=>t.pyLangCode===e.pyLangCode));-1!==t?this.languagePacks[t]=e:this.languagePacks.push(e)}))}};const Oh=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||Bf.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1},Ph.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return Th.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===j.PORTAL_TYPE.WSS}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(j.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){As.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return Ph.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}},vh=e=>"fulfilled"===e.status,Dh=async(e=Oh.getLocale())=>{try{await(async e=>{const t=Oh.getAvailableLocalePacks(),n=Oh.getLocalizationBundles(e);let r;if(e&&t&&t.includes(e)?r=[Vi("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(r=n.map((e=>Vi("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!r||0===r.length)return;const a=200,o=201;(await Promise.allSettled(r)).filter(vh).forEach((({value:t})=>{if([a,o].includes(t.status)&&t.data){const n=t.data,r=Kh(e??"en-US");Object.keys(n).forEach((e=>{r.setLocaleForRule(n[e],e)}))}}))})(e)}catch(e){console.warn(e)}};const Rh=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const a=e.indexOf("}",t),o=e.substring(r,a+1),[s,i]=this.getKeyAndValue(o);this.addKeyToMap(s,i),n+=`${o.split(":")[0]}}`,t=a+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const a=e.indexOf("}",t),o=e.substring(r,a+1);n+=this.keyMap[o],t=a+1}return n}};class $h{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent,r=t.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${r}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===r?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,r)};updateLocaleStore=(e,t)=>{const n=e.fields||e,r=this.localeStore[t];r?Bf.mergeDeep(n,r):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){const a=this.#c(n,t),o=this.#l(e);o&&(e=Rh.formatLocaleKey(e));const s=a?this.localeStore[a.toUpperCase()]??{}:{},i=r?this.localeStore[r.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(s,e)||e:o?Rh.replaceWithValue(s[e]||i[e]||e):s[e]||i[e]||e}#c(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${j.PARAGRAPH}!${t}`,r=this.localeStore[n.toUpperCase()];return r?{category:r.category,content:decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}:null}getPortalLocaleReference(e){return 2!==Oh.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${Oh.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=Oh.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:Ji.getSvcLocale(t,`${e}.json`)}))),a=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(a.map((async(e,t)=>{if("fulfilled"===e.status){const a=r[t];let o;try{o=await e.value.json()}catch{o=null}o&&n.push({localeRuleKey:a.localeRuleKey,jsonData:o})}})))}return n}async loadLocaleResources(e){await Ph.loadLocaleBundle(e),e.forEach((async e=>{await Dh(e)}))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const r=[];for(let t=0;t<e.length;){const a=e[t];if(0!==a.length){const e=n.indexOf(a);if(-1===e)return null;if(t>0){const t=n.slice(0,e);r.push(t)}n=n.slice(e+a.length)}t+=1}return n&&r.push(n),r}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const r of Object.keys(e)){const a=r.split(/\{\d+\}/),o=this.matchPatternWithText(a,t);if(o){const t=e[r];if(n=this.replacePlaceHolders(o,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=Oh.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Ji.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#l(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const xh=e=>{const t=e??Oh.getLocale()??"en-US";return Kh(t)};dn.registerHandler("@L",((e,t)=>t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e))),dn.registerHandler("@P",((e,t,n)=>t?t.getValue(e):qf.getLitePropertyValue(n))),dn.registerHandler("@E",((e,t,n)=>{try{const r=Jt(e),a=Xt(r);return Qt(a,t,n)}catch(e){}return!0})),dn.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:a}=n??{};r=Df(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,a)}return!0===r||"true"===r})),dn.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",o="";const s=t.getPageReference();if(e.startsWith(".")){a=`${s}.${e.substring(1)}`;const r=e.split(".").filter((e=>!!e));r.length>1&&(r.pop(),o=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===j.READONLY,l=n?.datasource?.name||"",d=t.getComponentConfig();if(d&&d.deferDatasource&&(d.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:d.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=un.getPropertyName(e?.propertyForDisplayText??""),r=un.getPropertyName(e?.propertyForValue??""),a=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return a?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const u=un.getPropertyName(n?.datasource?.propertyForDisplayText),p=un.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],f=t.getContextName(),g=[];if(h.forEach((e=>{if(un.isProperty(e?.value)){let t=vf(`.${Bf.getFullPropertyReference([o,un.getPropertyName(e.value)])}`,s,f);g.push(Bf.getFullPropertyReference([s,o,un.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),f){const e=cn.getContextObjectByName(f)||{};g.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),cn.addContextName(f,e)}const m=function(e,t,n,r){let a="",o=n;if(t.join(j.HASH_DELIMITER)&&(a=Bf.getHashedString(t.join(j.HASH_DELIMITER)),o=n+j.UNDERSCORE_STRING+a),r){const e=Pf(),t=e?e[n]?.[o]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const s=e.getDataObject(),i=(s?.[n]||{})[o]||{};return Array.isArray(i?.pxResults)?i.pxResults:[]}(t,r,l,c),y=t.getLocalizationService();return m.map((e=>{let t=e[u]||e[`.${u}`];var n;return"string"==typeof t&&(n=t,t=y.getLocalizedDataPage(n,l,u)),{key:e[p]||e[`.${p}`],value:t}}))})),dn.registerHandler("@ROUTING_INFO",((e,t)=>Ot(t.getContainerName(),t.getContextName()))),dn.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return Oh.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return Oh.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return Oh.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return Oh.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService("APP!APPLICATION").getLocalizedText(Oh.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return Oh.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return Oh.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return Oh.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return Oh.getOperatorWorkGroup();default:return e}})),dn.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t,filterDownloadedFields:o}=r[a],s=[];return n.forEach((n=>{const r={};t||o?Object.keys(n).forEach((e=>{const t=un.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=un.getPropertyName(e[t]);r[t]=n[a]})),s.push(r)})),s}return[]})),dn.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let a="";const o=e.split(".").filter((e=>!!e));if(o.length>1&&(o.pop(),a=`.${o.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:o,value:s}=n;r.name=o,"string"==typeof s&&s.startsWith("@P")?r.value=`@P ${a}${s.substring(3)}`:r.value=s,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),dn.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||qf.getLitePropertyValue(n,e),a=t?.getReferencedUser(r)||qf.getReferencedUser(r,n);return{userId:r,userName:a?a.UserName:null}})),dn.registerHandler("@ACTIVE_CASES",((e,t)=>au.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),dn.registerHandler("@LR",(e=>e)),dn.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),dn.registerHandler("@SHARED",(e=>Gc.getSharedState(e))),dn.registerHandler("@PARAGRAPH",((e,t)=>su.processParagraph(e,t))),dn.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),a=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:o}=t;let s;return Bf.isEmpty(o)?s=t.getValue(`.${n}`):(s=o,s=Bf.getIn(s,n)),s&&r.length>0?(a&&(s=s.filter((e=>Zt(a,e)))),s.map((e=>Bf.getIn(e,r)))):null})),dn.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),dn.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),dn.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):qf.getLitePropertyValue(n),xi.prepareAttachmentData(r)})),dn.registerHandler("@FL",((e,t)=>t.getLocalizedValueForFieldLabel(e))),dn.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),dn.registerHandler("@GENAICOACH",((e,t)=>uf(e,t.getCurrentClassID()))),dn.registerHandler("@AIAGENT",((e,t)=>{const n=pf(e,t.getCurrentClassID());if(n)return n;const r=t.getComponentConfig();if(r){const n=r?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const r={label:n.label};t.resolveConfigProps({label:n.label},r);const a=r.label;return{insName:`${n.ruleNamespace}__${e}`,label:t.getLocalizedValue(a),type:"agent"}}}return null})),dn.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),a=t.getPageReference();Hd.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",a,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${a.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${a}${e}`,`${r}/${a}`,r)})),dn.registerHandler("@DW",((e,t,n)=>{let r;const a=`${j.CONTEXT_DATA}.${j.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(t)r=t.getValue(a);else{const{context:e}=n??{};r=vf(a,null,e)}return!0===r||"true"===r}));const wh={},Mh={},Lh={},Fh={},jh={},Uh={},kh={},Vh={},Bh={},Gh={},Wh={},Hh={},qh={},zh=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];a?((e,t,n,r)=>{const a=Array.isArray(n)?n:[n];(Array.isArray(r)?r:[r]).forEach((e=>{const t=a.findIndex((t=>t.classID===e.classID));if(-1===t)a.push(e);else{const n={isDeclarativeTarget:!1},r={...a[t],...n,...e};a[t]=r}})),t[e]=1===a.length?a[0]:a})(n,t,a,r):t[n]=r})):Bf.copy(e,t)},Yh=(e,t="")=>{if(!e)return null;const n=Fh[e];if(!n)return null;if(!t)return Bf.deepClone(n);let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r?Bf.deepClone(r):null},Kh=e=>(Hh[e]||(Hh[e]=new $h),Hh[e]),Jh=(e,t)=>(qh[e]||(qh[e]=t()),qh[e]),Xh=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const o=Yh(e,t);return r.length&&(a=r.join(".")),{...o,embeddedType:n,category:a}}const[a,...o]=e.split("."),s=Yh(a,t);return s&&r.push(s.label),Xh(o.join("."),s?.pageClass,s?.type,r)},Qh=e=>{zh(e,Mh)},Zh=e=>{zh(e,Lh)},ef=e=>{(e=>{e.views&&zh(e.views,Mh),e.navigations&&zh(e.navigations,Lh),e.personalizations&&zh(e.personalizations,Uh),e.insights&&zh(e.insights,kh),e.paragraphs&&zh(e.paragraphs,wh),e.dataTypes&&zh(e.dataTypes,Vh),e.datapages&&zh(e.datapages,Bh),e.genAICoaches&&zh(e.genAICoaches,Gh),e.AIAgents&&zh(e.AIAgents,Wh)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const r=t[n];if(Array.isArray(r)){if(r.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const r=hu(uu,n,t.definedOnClassID??t.classID);t.localeReference=r})),1===r.length){const[e]=r;t[n]=e}}else e.datapages&&r?.datasource&&"DataPage"===r.datasource.tableType&&(r.datasource.mode=e.datapages[r.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{jh[e]=t[e]})),zh(e.fields,Fh)},tf=e=>Mh[e],nf=(e,t)=>{const n=Mh[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},rf=e=>Lh[e],af=e=>e in jh?jh[e]:null,of=e=>e in Uh?Uh[e]:null,sf=e=>e in kh?kh[e]:null,cf=e=>{const t={};return Object.keys(Fh).forEach((n=>{const r=Fh[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=Bf.deepClone(a))})),t},lf=(e,t)=>{const n=Yh(e,t),r=n?.datasource?.parameters;return r?Bf.deepClone(r):null},df=(e,t)=>{let n=null;const r=wh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Bf.deepClone(n):null},uf=(e,t)=>{let n=null;const r=Gh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Bf.deepClone(n):null},pf=(e,t)=>{let n=null;const r=Wh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Bf.deepClone(n):null},hf=e=>{if(e in Vh){const{savableDataPage:t}=Vh[e];return t}return null},ff=e=>{const t=Bh[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:a}=t;if(r)return a.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const o=Vh[n];return o?o.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},gf=e=>{if(e in Vh){const{lookupDataPage:t}=Vh[e];return t}return null},mf=e=>{if(Object.hasOwn(Vh,e)){const{lookupDataPageInfo:t}=Vh[e];return t}return null},yf=(e,t)=>{const n=e.split("."),r=n.pop(),a=new Ou({options:{pageReference:`${n.join(".")}`,context:t}}),o=Yh(r,a.getCurrentClassID())?.additionalInformation;if(!o?.includes("@PARAGRAPH"))return o;const s=un.trimAnnotation(o);return su.processParagraph(s,a)},If=(e,t)=>{const n=e.split("."),r=n.pop(),a=new Ou({options:{pageReference:`${n.join(".")}`,context:t}}),o=Yh(r,a.getCurrentClassID()),s={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(o,s),s};class Ef{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,o="singleRecord"){if(!e||!n||!r?.length)return;const s=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,a);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=Bf.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===s))||e.push({propertyName:s,mode:o})}else i[t]=[{propertyName:s,mode:o}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,s=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=Bf.getFullPropertyReference([i,t]),t in s){const e=s[t];Bf.removeExistingDependentProperty(e,o)}}})),Object.keys(s).length>0&&(this.cascadeResetSubscribers[e]=s)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,r,a){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const o=this.cascadeSubscribers[e][`${t}${n}`];if(!o[a]){o[a]=r;const s=vf(n,t,e);o.previousValue="object"==typeof s?null:s}}))}registerListField(e,t,n,r,a){const o=Ef._getFieldsForList(e,t,n);o.length>0&&(this.registerFields(e,t,o,r,a),Ed.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Ef._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=Yh(n,vf("classID",t,e));return a&&!Array.isArray(a)&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(un.isProperty(e)){const t=un.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const a=this.cascadeSubscribers[e][`${t}${n}`];a[r]&&delete a[r]}))}triggerCascade(e,t,n,r){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((o=>{const s=this.cascadeSubscribers[e][t];"previousValue"!==o&&s.previousValue!==n&&(a=!0,r?r.add(s[o]):s[o](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=vf(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=vf(t,"",e);n(e,t,r)}))}))}_updateChangedProperties(e,t,n,r,a,o,s,i){const c=n&&i.some((e=>r.startsWith(e)));if(e!==t||c){const e=r.lastIndexOf("."),t=r.substring(0,e),i=r.substring(e),c=ms.getMessages({type:"error",property:i,context:a,pageReference:t});if(c?.length>0&&s.push(r),!n)return;o.push(r)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&Bf.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,r,a,o,s){if("object"!=typeof e){a.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=vf(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,r,o,s)}const i=Object.keys(e??{});for(let c=0,l=i.length;c<l;c+=1){const l=i[c],d=`${n}.${l}`;if(Array.isArray(e[l])){const n=vf(d,"",t);n&&n?.length===e[l].length||s.push(d.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[l],t,d,r,a,o,s)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],a=[],o=[],s=Bf.getIn(e,n);return s&&t?(this._getServerProperties(s,t,n,r,o,a,[]),{changedListProperty:r,leafProperty:o,changedPropertyWithError:a}):{changedListProperty:r,leafProperty:o,changedPropertyWithError:a}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Af=new Ef;let Cf=null;const Sf=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),_f=e=>{Cf=e},bf=()=>Cf,Nf=e=>{if(!e)return;let t=[],n=[],r=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:r}=Af.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),Cf?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(r.length&&!e.payload.skipValidation){r.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{ms.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const r=rs.getFieldReferenceForProperty(e.payload.context,`${n}${t}`);if(r){const e=qf.resolveContextTreeNodeProps(r.props);Mi.validate(e.componentName?.toLowerCase(),e.propertyName,qf.getLitePropertyValue(e,e.propertyName),e)}}))}Af.handleServerChanges(e.payload.context,t,n)}},Tf=e=>bf()?.getState().data?.[e],Pf=()=>bf()?.getState().data?.[j.SHARED],Of=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const a=e?.startsWith(".")?t+e:e,o=Sf(a);return Bf.getIn(n,o)},vf=(e,t,n)=>Of(e,t,Tf(n)),Df=(e,t,n)=>Of(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,Tf(n)),Rf=(e,t,n)=>((e,t,n)=>{const r=Sf(`${t}.${n}`);return Bf.getIn(e,r)})(Tf(n),`${j.CONTEXT_DATA}.${e}`,t),$f=e=>{const{context:t}=e,n=bf()?.getState().data[t];if(n)return ue;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?Se:ue},xf=(e,t)=>{const n=Sf(t);return Bf.deleteIn(e,n)},wf=e=>!Array.isArray(e)&&"object"==typeof e,Mf=(e,t=[],n=[])=>{Array.isArray(t)&&t.length>0&&t.forEach((t=>{t.allowMultiple?t.allowMultiple&&!n.includes(t.path)&&Bf.setIn(e,t.path,[]):Bf.setIn(e,t.path,{})})),n.length>0&&Bf.rearrangeProperties(n,e)},Lf=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:a=[],propertiesToReArrange:o=[]}=n;Array.isArray(e)&&!t&&(t=[]),Mf(e,a,o);const s=(e,t)=>{if(wf(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return x()(e,t,s);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return x()(e,t,s);{const n=t.length;if(void 0===r&&n===e.length)return x()(e,t,s)}}return""===t&&e&&"object"==typeof e?e:t};return s(e,t)},Ff=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:a}=r,o=Sf(t);if("object"==typeof n){const t=Lf(Bf.getIn(e,o),n,{isArrayDeepMerge:a});return Bf.setIn(e,o,t)}return Bf.setIn(e,o,n)},jf=(e,t,n)=>{const r=Sf(t);return Bf.setIn(e,r,n)},Uf=()=>{const e=tt,{promise:t,actionMgrID:n}=nc.actionManagerPromise(e);return Nf({type:e,payload:{actionMgrID:n}}),t},kf=e=>{const t=bf()?.getState();return!!t?.data?.[e]};class Vf{static mergeDeep(e,t){return x()(t,e)}static hasIn(e,t){return P()(e,t)}static getIn(e,t,n){return v()(e,t,n)}static setIn(e,t,n){return R()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return M()(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let t=0;t<e.length;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r of Object.keys(e)){const a=e[r];a&&"object"==typeof a&&!Array.isArray(a)?n=Vf.isWhenExist(a):t.includes(r)&&"string"==typeof a&&a?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;if(e&&Object.keys(e).forEach((a=>{const o=e[a];t.includes(a)&&"string"==typeof o&&o.startsWith("@W ")&&(n=un.trimAnnotation(o),r.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=un.trimAnnotation(t[e]),r.add(n))}))}return[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r of Object.keys(e))t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let a=0;for(;a<r.length-1;a+=1){const e=r[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[a]]||(t[r[a]]=Array.isArray(n)?[]:{}),Lf(t[r[a]],n,{isArrayDeepMerge:!0})):t[r[a]]=n};static getHashedString(e){return(0,_.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Vf.isEqual(e[n[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):""}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,o])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(o)?o.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof o?n(o,r):t(r.slice(),o),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,o)=>(a=e[t]?e[t]:Number.isNaN(Number(r[o+1]))?r.length-1===o?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Vf.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;Vf.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(j.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(j.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return Xs.formatPageReference(n)}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&nc.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];"string"==typeof r?n="true"===r||"false"!==r&&r:"object"==typeof r?(n=r,Vf.convertObjectWithStringToBoolean(r)):n=r,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=Vf.getIn(t,e);if(!n)return;const r=Object.hasOwn(n,"pyCount");if(r&&(n=n.pxResults),!n)return;const a=n.filter((e=>!e.error)),o=n.filter((e=>e.error));Vf.setIn(t,r?`${e}.pxResults`:e,[...a,...o])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],r=n.findIndex((e=>e.startsWith("workarea"))),a=n.findIndex((e=>e.startsWith("modal")));return-1!==r?t=n.slice(0,r+1).join("/"):-1!==a&&(t=n.slice(0,a+1).join("/")),bf()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return Vf.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const r=[];let a="";const o=n.getPageReference(),s=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let a=un.isProperty(n)?vf(`.${un.getPropertyName(n)}`,o,s):n;null!=a&&""!==a||(a=j.NULL_STRING),r.push(a)}));let i=t;const c=r.join(j.HASH_DELIMITER);return c&&(a=Vf.getHashedString(c),i=t+j.UNDERSCORE_STRING+a),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t)return null;const[,n,r,a,o,s,i,c]=t.map(Number);return new Date(n,r-1,a,o,s,i,c).getTime()}static containsEncodedPattern=e=>/%[0-9A-Fa-f]{2}/.test(e);static normalizePropertyRef(e){const t="caseInfo.content.";let n=e.startsWith(t)?e.substring(17):e;return n=n.replace(/\[\d+\]/g,""),n.startsWith(".")?n.substring(1):n}static resolvePageClass(e,t){if(!t)return;const n=(e=this.normalizePropertyRef(e)).split(".").slice(0,-1);let r=t;for(const e of n){const t=Yh(e,r);if(!t)return;if(Array.isArray(t)&&t[0]?.pageClass?r=t[0].pageClass:!Array.isArray(t)&&t.pageClass&&(r=t.pageClass),!r)return}return r}}const Bf=Vf,Gf=j.SUMMARY_OF_LISTS,Wf=j.SUMMARY_OF_WHEN_CONDITIONS;class Hf{static updateData(e){Object.keys(e).forEach((t=>{Nf(Qf({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{Nf(Qf({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Wf}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return rf("string"==typeof n?n:"")}static resolveView(e,t,n=""){const r=tf(this.resolveName(e,t));let a=[];if(Array.isArray(r)&&r.length>0){if(t&&r.length>1){if(n||(n=t.getValue(j.CLASS_ID)||""),!n)return;a=r.filter((e=>e[j.CLASSID]===n))}return 0===a.length?r[0]:a[0]}return r}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=un.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=un.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let r;if(t)r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName(),e.getValue(j.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){const e=["refer","copy"].includes(t.dataRetrievalType),n="Page List"===t.type;r=e&&n?t.pageClass:t.classID}r||(r=n.ruleClass)}return r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,a=n?.type,{ref:o,name:s,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===a?r=this.resolveNavigation(o||s,t):"view"===a?r=this.resolveView(o||s,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:s,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return vf(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=Rf(`${t}.${Gf}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getPropertyValue(e,t,n){return e=un.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Hf.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:a,pageReference:o,context:s}=e;let i=t||r||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):a&&i===r?Hf.getPropertyValue(i,o,s?`${s}/${j.SUGGESTION}`:void 0):Hf.getPropertyValue(i,o,s||void 0)}static _handlePropString(e,t,n,r,a){n.startsWith("@")?e[t]=un.handleAnnotation(n,r,a):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const a=e[r];"string"==typeof a?this._handlePropString(e,r,a,t,n):Array.isArray(a)?a.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof a&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(Bf.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(Bf.mergeDeep(e,t),this._resolveProps(t,void 0,e),Bf.resolveStringBooleans(t)):t}static resolvePropertyPageClass(e,t,n){const r=Bf.resolvePageClass(e,n),a=t.startsWith(".")?t.slice(1):t,o=Yh(a,r);let s;if(o)return s=Array.isArray(o)?o[0]?.pageClass:o.pageClass,s}static resolveClassID(e,t,n,r){const a=un.trimAnnotation(e);let o=a.startsWith(".")?`${t}${a}`:a;for(;o;){const e=vf(j.CLASS_ID,o,n);if(e)return e;if(r){const e=this.resolvePropertyPageClass(o,a,r);if(e)return e}const t=o.lastIndexOf(".");if(-1===t)break;o=o.substring(0,t)}return null}}const qf=Hf;const zf=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Yf=class{static#d=[];static#u=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=zf.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const a=e[r],o={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#d.push(o)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===Oh.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=nc.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};qf.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#f())};static#f=()=>{if(!this.#u){if(0===this.#d.length)return;const e=this.#d.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#d.length>0&&this.#f()}};static#g=()=>{this.#f()};static#m=(e,t,n)=>{this.#p(e,t,n),this.#g()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return qf.getContextPath(t,n)};static#y(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:o}=n[r];if(o){const n=this.getActionHandlers(o,a,t);n&&n.length>0&&this.#m(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();ds({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===Oh.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let n,{target:a}=t;null===a&&t&&t.auxiliaryTarget&&(a=t.auxiliaryTarget),n=void 0===a?t.value:"value"in a?a.value:a.innerText;const o=this.getFullRef(e);Nf({type:Q,payload:{reference:o,value:n,context:r}}),void 0!==a&&this.isEditable(a)&&!this.isNonKeyInput(a)||Nf({type:ee,payload:{reference:o,pageReference:e.getPageReference(),value:n,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const o=a[e],s=t[e];Nf({type:Q,payload:{reference:qf.getContextPath(n,o),value:s,context:r}}),Nf({type:ee,payload:{reference:qf.getContextPath(n,o),value:s,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,o=this.getFullRef(e),s=e.getContextName();n.clearMessages&&ds({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:s}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),this.isNonKeyInput(n)||Nf({type:ee,payload:{reference:o,pageReference:e.getPageReference(),value:r,context:s,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#y(e,n)};static pause=()=>{this.#u=!0};static resume=()=>{this.#u=!1,this.#f()};static isQueueEmpty=()=>0===this.#d.length;static clearQueue=()=>{this.#d=[]};static getActionsQueue=()=>this.#d;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Kf="CREATE_WORK",Jf=e=>({type:Kf,payload:e});const Xf=(e,t,n,r,a="")=>{const o=[];Object.keys(e).forEach((s=>{"object"==typeof e[s]&&s.includes("[")?function(e,t,n,r,a,o,s){const i=r.substring(0,r.indexOf("[")),c=r.substring(r.indexOf("[")+1,r.indexOf("]"));let l=t[i];const d=`${Bf.trimDotForProperty(a)}.${i}`;s.includes(d)&&Object.hasOwn(l,"pyCount")&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[r]),o.push(i),n.add(`${a}.${r}`))}(e,t,n,s,a,o,r):e[s]&&"object"==typeof e[s]?(t[s]||(t[s]=Array.isArray(e[s])?[]:{}),Xf(e[s],t[s],n,r,`${a}.${s}`)):t[s]=e[s]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,o)},Qf=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[],propertiesToReArrange:a=[]}=t,{context:o,data:s,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=Zu(o,!0),d=Tf(o);let u={};if(d&&s){u=JSON.parse(JSON.stringify(d));const e=JSON.parse(JSON.stringify(s));a.length>0&&Bf.rearrangeProperties(a,u);const t=new Set;Xf(l,u,t,a),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=Bf.trimDotForProperty(e);const[a,o,s]=Ho(e);if(a&&o&&s&&!r.has(`${a}.${o}`)){const e=Bf.getIn(n,`${a}.${o}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+s&&Bf.setIn(t,`${a}.${o}[${n}]`,e)})),r.add(`${a}.${o}`)}}))})(t,u,e)}!function(e,t){const n=Bf.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=Bf.getIn(t,j.REFERENCED_USERS,{}),void Bf.setIn(e,j.REFERENCED_USERS,{...r,...n});r=Bf.getIn(t,j.REFERENCED_USERS,[]);const a=new Map;for(const e of[...r,...n])if(a.has(e.UserID)){const t=a.get(e.UserID);a.set(e.UserID,{...t,...e})}else a.set(e.UserID,e);n.length=0;for(const e of a.values())n.push(e)}}(s,d);const p=Bf.getIn(e?.data,j.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),h=$l.isExternalObject(p),f=h?{[j.OBJECT_INFO.OBJECT_INFO]:{[j.CONTENT]:{...u[j.OBJECT_INFO.OBJECT_INFO]?.[j.CONTENT]}}}:{[j.CASE_INFO.CASE_INFO]:{[j.CONTENT]:{...u[j.CASE_INFO.CASE_INFO]?.[j.CONTENT]}}},g=h?j.OBJECT_INFO.OBJECT_INFO_CONTENT:j.CASE_INFO.CASE_INFO_CONTENT;let m=s;return c?(n.forEach((e=>{const t=`${g}.${e}`;Bf.deleteIn(f,t)})),m=Lf(s,f,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=Yu[e]||{};Object.keys(n).forEach((e=>{Bf.hasIn(t,e)&&(n[e].value=Bf.getIn(t,e))}));let r=Il.getStateMachinesByContext(e)||{};r={...r,...Il.getUnConnectedStateMachines(e)||{}},Object.keys(r).forEach((n=>{if(Bf.hasIn(t,n)){const r=Bf.getIn(t,n);r&&Array.isArray(r)&&0===r.length&&Il.setStateMachineEmpty(e,n)}}))})(o,s),{type:ge,payload:{...e,data:m,...r.length>0?{propertiesToReplace:r}:null,...a.length>0?{propertiesToReArrange:a}:null}}},Zf=e=>({type:"SHOW_HARNESS",payload:e}),eg=e=>({type:te,payload:e}),tg=e=>({type:ne,payload:e}),ng=e=>({type:"ADD_WORK",payload:e}),rg=e=>({type:de,payload:e}),ag=e=>({type:Ae,payload:e}),og=e=>({type:Ce,payload:e}),sg=e=>({type:Se,payload:e}),ig=e=>({type:be,payload:e}),cg=e=>({type:Ne,payload:e}),lg=e=>({type:Oe,payload:e}),dg=e=>({type:De,payload:e}),ug=e=>({type:ve,payload:e}),pg=e=>{const{containerItemID:t}=e;e.suggestionContexts=Mp(t);const n=e?.data?.caseInfo?.content,r=Object.keys(n||{}).length>0;return e.propertiesToReplace=r?$l.getPropertiesToReplace(t):[],{type:$e,payload:e}},hg=e=>{const{context:t}=e;return{type:se,payload:{context:t}}},fg=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},gg=e=>({type:xe,payload:e}),mg=e=>({type:Re,payload:e}),yg=e=>({type:Ze,payload:e}),Ig=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Dp(n)),e.context=r,e.deleteContext=!Kp(n),e.childContainers=xp(n),e.childContainersContexts=wp(n),e.transientItems=Jp([...e.childContainersContexts,n]),e.suggestionContexts=Mp(n),n===t&&(e.caseID=vf(j.CASE_INFO.CASE_INFO_ID,"",t)||vf(j.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=vf(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:_e,payload:e}},Eg=e=>{const{containerItemID:t}=e;return e.transientItems=Jp([...wp(t),t]),{type:Pe,payload:e}},Ag=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Te,payload:e}},Cg=e=>{const{context:t,containerItemID:n}=e;let r=t;if(r||(r=Dp(n)),e.context=r,e.childContainers=xp(n),e.childContainersContexts=wp(n),e.transientItems=Jp([...e.childContainersContexts,n]),e.suggestionContexts=Mp(n),n===t){e.caseID=vf(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=vf(j.CASE_INFO.REMOTESYSTEMID,"",t);const n=vf(j.CASE_INFO.CASE_INFO_CLASSNAME,"",t);V.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:we,payload:e}},Sg=e=>({type:pe,payload:e}),_g=e=>({type:fe,payload:e}),bg=e=>({type:Ie,payload:e}),Ng=(e,...t)=>(Yf.resume(),e(...t)),Tg=(e,t,n,r,a)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),Pg=e=>({type:rt,payload:e}),Og=e=>({type:at,payload:e}),vg=e=>({type:ot,payload:e}),Dg=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),Rg=e=>({type:ce,payload:e}),$g=e=>({type:Q,payload:e}),xg="add",wg="replace",Mg=["portal","noPortal","preview","debug","devtool","activeTab"];let Lg="",Fg="Home",jg="",Ug=!0;const kg=e=>(Ug=e,Ug),Vg=()=>Ug,Bg=(e,t,n)=>Th.getSemanticURL(e,t,n),Gg=(e,t)=>Th.getRestEndPoint(e,t),Wg=(e,t)=>{let n=E();const r=Gg(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},Hg=(e,t,n)=>{const{root:r,resources:a}=e,{views:o}=a,{config:s}=r,i=xg;let c="";if(n)c=n;else{const e=o[s.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(gh);if(l){const e=Bf.getIn(t,s.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},qg=(e,t,n)=>{let r,a;r=yh(t)?`${e}/${t}`:e;const o=yh(n?.pxURLPath);o&&(r=`${r}/${o}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const s=r.split("/"),i=s[s.length-1],c=new URLSearchParams(window.location.search);if(bh()?(r=((e,t,n,r,a)=>{const o=Th.getStaticRoutePage(),s=Fg?.toLowerCase(),i=o?.toLowerCase(),c=r?.toLowerCase();return i!==s&&c!==s||a.has("noPortal")?e:`${t}/${n}`})(r,e,t,i,c),Th.setStaticRoutePage("")):i.toLowerCase()!==Fg.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!Th.isDefaultPortal()){const e=Th.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return a=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&Mg.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},zg=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r,queryParam:a},o=!1)=>{let s,i,c;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(o)s=t,i=n,c=r;else{const{uiResources:n,data:r}=e;({options:c}=e),s=t&&t.pxURLPath&&mh(t.pxURLPath)?Hg(n,r,t.pxURLPath):t||Hg(n,r),i=Th.getEndPointInfo(s.pxURLPath),s.pxURLPath=i.urlPath}let l=qg(Lg,Th.getApplicationPath(),s);const{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:Th.getApplicationName()),n===`${Lg}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),a=r.split("/");return/\d/.test(r)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(jg,Th.getApplicationPath(),l),u=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(i,{...c,title:d});s?.historyAction===xg?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(u,d,l):s?.historyAction===wg&&(a&&(l+=`?${a}`),((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(u,d,l))},Yg=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:xg,pxURLPath:""},t.pxURLPath=e.semanticURL),zg(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},Kg=e=>{Yg(e)},Jg=e=>{const t={pxURLPath:e};return qg(Lg,Th.getApplicationPath(),t)},Xg=e=>{const{uiResources:t}=e;Vg()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,o=a.type,s=a.name;if("VIEW"===o.toUpperCase()){const e=r[s];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&Yg(e)},Qg=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},Zg=(e,t,n)=>{const{caseClassName:r,workID:a}=e.payload,{containerName:o,context:s}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=V.getRemoteCase(r),d={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:At,viewName:U,gadgetId:$l.getUniqueGadgetId(),context:n??s,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${a}`,containerName:o,name:l};Nf(u.showPage(d))},em=e=>{const t=(e=>"ui-navigation"===e.state?.type?(Es.publish(F.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);t&&(V.isTraditionalRemoteCase(t.payload?.caseClassName)?Zg({...t},t.options):Nf(u.showHistory(Qg(t))))},tm=()=>Th.getApplicationPath()!==Eh(),nm=e=>{const{acName:t,context:n,defaultViewLabel:r,ruleName:a,className:o}=e,s=((e,t)=>{const n=Th.getRoutingInfo();if(bh()&&Object.values(n?.routes).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const r=e.split(" ").join(""),a=e.split(" ").join("-").toLowerCase(),o=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes[r]?r:n?.routes[a]?a:n?.routes[o]?o:e})(a||r,o);(e=>{Fg=e})(s),Th.setDefaultRoute(s),Th.setDefaultClassName(o);const i=H(t,n),c=Pt(t,n),l="true"===Oh.getIsExtraCallRequiredForDefaultHome(),d={historyAction:wg,pxURLPath:""};let p,h=null;const f={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&tm()){const t=Sh(Ah());Oh.shouldUseURLParams()&&(h=t.includes("?")?t.split("?")[1]:null),p=_h(t,f),d.pxURLPath=p.urlPath,void 0!==p.payload?.pageClass&&(p.payload.pageClass=bf()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:f,routeKey:p.routeKey};V.isTraditionalRemoteCase(p?.payload?.caseClassName)?Zg(r,e,f.context):Nf(u[n](Qg(r)))}else p=Th.getEndPointInfo(Fg),d.pxURLPath="";zg(null,{urlPathObjParam:d,infoParam:p,optionsParam:f,queryParam:h},!0)},rm=(e,t=!1)=>{var n;Lg=e.domain,!1===t&&Vg()&&(n=em,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),Th.init(e,Fg)},am=e=>{(e=>{window.document.title=e})(e)};var om=Symbol.for("immer-nothing"),sm=Symbol.for("immer-draftable"),im=Symbol.for("immer-state");function cm(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lm=Object,dm=lm.getPrototypeOf,um="constructor",pm="prototype",hm="configurable",fm="enumerable",gm="writable",mm="value",ym=e=>!!e&&!!e[im];function Im(e){return!!e&&(Cm(e)||Pm(e)||!!e[sm]||!!e[um]?.[sm]||Om(e)||vm(e))}var Em=lm[pm][um].toString(),Am=new WeakMap;function Cm(e){if(!e||!Dm(e))return!1;const t=dm(e);if(null===t||t===lm[pm])return!0;const n=lm.hasOwnProperty.call(t,um)&&t[um];if(n===Object)return!0;if(!Rm(n))return!1;let r=Am.get(n);return void 0===r&&(r=Function.toString.call(n),Am.set(n,r)),r===Em}function Sm(e,t,n=!0){if(0===_m(e)){(n?Reflect.ownKeys(e):lm.keys(e)).forEach((n=>{t(n,e[n],e)}))}else e.forEach(((n,r)=>t(r,n,e)))}function _m(e){const t=e[im];return t?t.type_:Pm(e)?1:Om(e)?2:vm(e)?3:0}var bm=(e,t,n=_m(e))=>2===n?e.has(t):lm[pm].hasOwnProperty.call(e,t),Nm=(e,t,n=_m(e))=>2===n?e.get(t):e[t],Tm=(e,t,n,r=_m(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var Pm=Array.isArray,Om=e=>e instanceof Map,vm=e=>e instanceof Set,Dm=e=>"object"==typeof e,Rm=e=>"function"==typeof e,$m=e=>"boolean"==typeof e;var xm=e=>e.copy_||e.base_,wm=e=>e.modified_?e.copy_:e.base_;function Mm(e,t){if(Om(e))return new Map(e);if(vm(e))return new Set(e);if(Pm(e))return Array[pm].slice.call(e);const n=Cm(e);if(!0===t||"class_only"===t&&!n){const t=lm.getOwnPropertyDescriptors(e);delete t[im];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const a=n[r],o=t[a];!1===o[gm]&&(o[gm]=!0,o[hm]=!0),(o.get||o.set)&&(t[a]={[hm]:!0,[gm]:!0,[fm]:o[fm],[mm]:e[a]})}return lm.create(dm(e),t)}{const t=dm(e);if(null!==t&&n)return{...e};const r=lm.create(t);return lm.assign(r,e)}}function Lm(e,t=!1){return jm(e)||ym(e)||!Im(e)||(_m(e)>1&&lm.defineProperties(e,{set:Fm,add:Fm,clear:Fm,delete:Fm}),lm.freeze(e),t&&Sm(e,((e,t)=>{Lm(t,!0)}),!1)),e}var Fm={[mm]:function(){cm(2)}};function jm(e){return null===e||!Dm(e)||lm.isFrozen(e)}var Um="MapSet",km="Patches",Vm="ArrayMethods",Bm={};function Gm(e){const t=Bm[e];return t||cm(0),t}var Wm,Hm=e=>!!Bm[e];var qm=()=>Wm;function zm(e,t){t&&(e.patchPlugin_=Gm(km),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ym(e){Km(e),e.drafts_.forEach(Xm),e.drafts_=null}function Km(e){e===Wm&&(Wm=e.parent_)}var Jm=e=>Wm={drafts_:[],parent_:Wm,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hm(Um)?Gm(Um):void 0,arrayMethodsPlugin_:Hm(Vm)?Gm(Vm):void 0};function Xm(e){const t=e[im];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Qm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[im].modified_&&(Ym(t),cm(4)),Im(e)&&(e=Zm(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[im].base_,e,t)}else e=Zm(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Lm(t,n)}(t,e,!0),Ym(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==om?e:void 0}function Zm(e,t){if(jm(t))return t;const n=t[im];if(!n){return sy(t,e.handledSet_,e)}if(!ty(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}ay(n,e)}return n.copy_}function ey(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ty=(e,t)=>e.scope_===t,ny=[];function ry(e,t,n,r){const a=xm(e),o=e.type_;if(void 0!==r){if(Nm(a,r,o)===t)return void Tm(a,r,n,o)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;Sm(a,((e,n)=>{if(ym(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}}))}const s=e.draftLocations_.get(t)??ny;for(const e of s)Tm(a,e,n,o)}function ay(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}ey(e)}}function oy(e,t,n){const{scope_:r}=e;if(ym(n)){const a=n[im];ty(a,r)&&a.callbacks_.push((function(){py(e);const r=wm(a);ry(e,n,r,t)}))}else Im(n)&&e.callbacks_.push((function(){const a=xm(e);3===e.type_?a.has(n)&&sy(n,r.handledSet_,r):Nm(a,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&sy(Nm(e.copy_,t,e.type_),r.handledSet_,r)}))}function sy(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ym(e)||t.has(e)||!Im(e)||jm(e)||(t.add(e),Sm(e,((r,a)=>{if(ym(a)){const t=a[im];if(ty(t,n)){const n=wm(t);Tm(e,r,n,e.type_),ey(t)}}else Im(a)&&sy(a,t,n)}))),e}var iy={get(e,t){if(t===im)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=xm(e);if(!bm(a,t,e.type_))return function(e,t,n){const r=dy(t,n);return r?mm in r?r[mm]:r.get?.call(e.draft_):void 0}(e,a,t);const o=a[t];if(e.finalized_||!Im(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===ly(e.base_,t)){py(e);const n=1===e.type_?+t:t,r=hy(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in xm(e),ownKeys:e=>Reflect.ownKeys(xm(e)),set(e,t,n){const r=dy(xm(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=ly(xm(e),t),s=r?.[im];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((a=n)===(o=r)?0!==a||1/a==1/o:a!=a&&o!=o)&&(void 0!==n||bm(e.base_,t,e.type_)))return!0;py(e),uy(e)}var a,o;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),oy(e,t,n)),!0},deleteProperty:(e,t)=>(py(e),void 0!==ly(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),uy(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=xm(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[gm]:!0,[hm]:1!==e.type_||"length"!==t,[fm]:r[fm],[mm]:n[t]}:r},defineProperty(){cm(11)},getPrototypeOf:e=>dm(e.base_),setPrototypeOf(){cm(12)}},cy={};for(let e in iy){let t=iy[e];cy[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function ly(e,t){const n=e[im];return(n?xm(n):e)[t]}function dy(e,t){if(!(t in e))return;let n=dm(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=dm(n)}}function uy(e){e.modified_||(e.modified_=!0,e.parent_&&uy(e.parent_))}function py(e){e.copy_||(e.assigned_=new Map,e.copy_=Mm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}cy.deleteProperty=function(e,t){return cy.set.call(this,e,t,void 0)},cy.set=function(e,t,n){return iy.set.call(this,e[0],t,n,e[0])};function hy(e,t,n,r){const[a,o]=Om(t)?Gm(Um).proxyMap_(t,n):vm(t)?Gm(Um).proxySet_(t,n):function(e,t){const n=Pm(e),r={type_:n?1:0,scope_:t?t.scope_:qm(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,o=iy;n&&(a=[r],o=cy);const{revoke:s,proxy:i}=Proxy.revocable(a,o);return r.draft_=i,r.revoke_=s,[i,r]}(t,n);return(n?.scope_??qm()).drafts_.push(a),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push((function(r){const a=t;if(!a||!ty(a,r))return;r.mapSetPlugin_?.fixSetContents(a);const o=wm(a);ry(e,a.draft_??a,o,n),ay(a,r)}))}(n,o,r):o.callbacks_.push((function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)})),a}function fy(e){if(!Im(e)||jm(e))return e;const t=e[im];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Mm(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Mm(e,!0);return Sm(n,((e,t)=>{Tm(n,e,fy(t))}),r),t&&(t.finalized_=!1),n}var gy=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Rm(e)&&!Rm(t)){const n=t;t=e;const r=this;return function(e=n,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let r;if(Rm(t)||cm(6),void 0===n||Rm(n)||cm(7),Im(e)){const a=Jm(this),o=hy(a,e,void 0);let s=!0;try{r=t(o),s=!1}finally{s?Ym(a):Km(a)}return zm(a,n),Qm(r,a)}if(!e||!Dm(e)){if(r=t(e),void 0===r&&(r=e),r===om&&(r=void 0),this.autoFreeze_&&Lm(r,!0),n){const t=[],a=[];Gm(km).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:a}),n(t,a)}return r}cm(1)},this.produceWithPatches=(e,t)=>{if(Rm(e))return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},$m(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),$m(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),$m(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Im(e)||cm(8),ym(e)&&(e=function(e){ym(e)||cm(10);return fy(e)}(e));const t=Jm(this),n=hy(t,e,void 0);return n[im].isManual_=!0,Km(t),n}finishDraft(e,t){const n=e&&e[im];n&&n.isManual_||cm(9);const{scope_:r}=n;return zm(r,t),Qm(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Gm(km).applyPatches_;return ym(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},my=gy.produce;function yy(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Iy=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Ey=()=>Math.random().toString(36).substring(7).split("").join("."),Ay={INIT:`@@redux/INIT${Ey()}`,REPLACE:`@@redux/REPLACE${Ey()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ey()}`};function Cy(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Sy(e,t,n){if("function"!=typeof e)throw new Error(yy(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(yy(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(yy(1));return n(Sy)(e,t)}let r=e,a=t,o=new Map,s=o,i=0,c=!1;function l(){s===o&&(s=new Map,o.forEach(((e,t)=>{s.set(t,e)})))}function d(){if(c)throw new Error(yy(3));return a}function u(e){if("function"!=typeof e)throw new Error(yy(4));if(c)throw new Error(yy(5));let t=!0;l();const n=i++;return s.set(n,e),function(){if(t){if(c)throw new Error(yy(6));t=!1,l(),s.delete(n),o=null}}}function p(e){if(!Cy(e))throw new Error(yy(7));if(void 0===e.type)throw new Error(yy(8));if("string"!=typeof e.type)throw new Error(yy(17));if(c)throw new Error(yy(9));try{c=!0,a=r(a,e)}finally{c=!1}return(o=s).forEach((e=>{e()})),e}p({type:Ay.INIT});return{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(yy(10));r=e,p({type:Ay.REPLACE})},[Iy]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(yy(11));function n(){const e=t;e.next&&e.next(d())}n();return{unsubscribe:e(n)}},[Iy](){return this}}}}}function _y(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];0,"function"==typeof e[a]&&(n[a]=e[a])}const r=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Ay.INIT}))throw new Error(yy(12));if(void 0===n(void 0,{type:Ay.PROBE_UNKNOWN_ACTION()}))throw new Error(yy(13))}))}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const s={};for(let a=0;a<r.length;a++){const i=r[a],c=n[i],l=e[i],d=c(l,t);if(void 0===d){t&&t.type;throw new Error(yy(14))}s[i]=d,o=o||d!==l}return o=o||r.length!==Object.keys(e).length,o?s:e}}function by(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function Ny(e){return({dispatch:t,getState:n})=>r=>a=>"function"==typeof a?a(t,n,e):r(a)}var Ty=Ny(),Py=Ny,Oy="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?by:by.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var vy=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Dy(e){return Im(e)?my(e,(()=>{})):e}var Ry="RTK_autoBatch",$y=e=>t=>{setTimeout(t,e)},xy=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new vy(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,o=!1,s=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:$y(10):"callback"===e.type?e.queueNotification:$y(e.timeout),l=()=>{s=!1,o&&(o=!1,i.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>a&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return a=!e?.meta?.[Ry],o=!a,o&&(s||(s=!0,c(l))),r.dispatch(e)}finally{a=!0}}})})("object"==typeof n?n:void 0)),r};function wy(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let o=new vy;return t&&("boolean"==typeof t?o.push(Ty):o.push(Py(t.extraArgument))),o},{reducer:n,middleware:r,devTools:a=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!Cy(n))throw new Error(jy(1));c=_y(n)}l="function"==typeof r?r(t):t();let d=by;a&&(d=Oy({trace:!1,..."object"==typeof a&&a}));const u=function(...e){return t=>(n,r)=>{const a=t(n,r);let o=()=>{throw new Error(yy(15))};const s={getState:a.getState,dispatch:(e,...t)=>o(e,...t)},i=e.map((e=>e(s)));return o=by(...i)(a.dispatch),{...a,dispatch:o}}}(...l),p=xy(u);return Sy(c,s,d(..."function"==typeof i?i(p):p()))}function My(e){const t={},n=[];let r;const a={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(jy(28));if(r in t)throw new Error(jy(29));return t[r]=n,a},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),a),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(r=e,a)};return e(a),[t,n,r]}function Ly(e,t){let n,[r,a,o]=My(t);if("function"==typeof e)n=()=>Dy(e());else{const t=Dy(e);n=()=>t}function s(e=n(),t){let s=[r[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===s.filter((e=>!!e)).length&&(s=[o]),s.reduce(((e,n)=>{if(n){if(ym(e)){const r=n(e,t);return void 0===r?e:r}if(Im(e))return my(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return s.getInitialState=n,s}var{assign:Fy}=Object;Symbol.for("rtk-state-proxy-original");function jy(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Uy=function(e){function t(t,n){return e.call(this)||this}return Ma(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Ka),ky={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=ky.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,ka([e,t],Ua(n))):setInterval.apply(void 0,ka([e,t],Ua(n)))},clearInterval:function(e){var t=ky.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Vy=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Ma(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,a=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(a,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),ky.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&ky.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ya(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Uy),By=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return Ma(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Vy),Gy={now:function(){return(Gy.delegate||Date).now()},delegate:void 0},Wy=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Gy.now,e}(),Hy=function(e){function t(t,n){void 0===n&&(n=Wy.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Ma(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Wy),qy=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ma(t,e),t}(Hy))(By),zy=$a((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Yy=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Ma(t,e),t.prototype.lift=function(e){var t=new Ky(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new zy},t.prototype.next=function(e){var t=this;so((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=ja(t.currentObservers),o=a.next();!o.done;o=a.next()){o.value.next(e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;so((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;so((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,o=n.observers;return r||a?Ja:(this.currentObservers=null,o.push(e),new Ka((function(){t.currentObservers=null,Ya(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new Eo;return e.source=this,e},t.create=function(e,t){return new Ky(e,t)},t}(Eo),Ky=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Ma(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Ja},t}(Yy),Jy=function(e,t){return Jy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Jy(e,t)};Object.create;Object.create;var Xy=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new Yy,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Jy(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Eo);const Qy=e=>{let t=new Set,n=t;const r=()=>{t===n&&(t=new Set(t))},a=e=>{let n=!0;return r(),t.add(e),()=>{n&&(r(),t.delete(e),n=!1)}},o=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let r=!1,s=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{s?r=!0:o()})),{...n,dispatch:e=>{const t=s;t||(r=!1,s=!0);const n=i(e),a=r&&!t;return t||(r=!1,s=!1),a&&o(),n},subscribe:a}}},Zy=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{$d.updateDataPageStore(t),Object.keys(t).forEach((n=>{Bf.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{Bf.setIn(e,[j.SHARED,n,r],t[n][r])})):Bf.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&Bf.deleteIn(e,[r,"shared"])},eI=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:j.PERFORM_MODE),containerName:o}=t;o!==hp.WORKAREA&&a&&Bf.setIn(e,[r,"context_data","caseViewMode"],a)},tI=(e,t)=>{const{context:n}=t;Bf.setIn(e,[n,"context_data","actionType"],t.actionType),Bf.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},nI=(e,t=[])=>{t.forEach((t=>Bf.deleteIn(e,t)))},rI=(e,t=[])=>{t.forEach((t=>Bf.deleteIn(e,t)))},aI=(e,t=[])=>{t.forEach((t=>{Bf.deleteIn(e,t)}))},oI=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;Bf.deleteIn(e,[t,"nextAssignmentInfo"]),Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),a&&(Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),Bf.deleteIn(e,[t,"caseMessages"])),r&&(Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),Bf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},sI=Ly({},(e=>{e.addCase(Se,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&oI(e,t.payload.context);const{target:n}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,eI(e,t.payload),tI(e,t.payload),Zy(e,t.payload),((e,t)=>{const{context:n}=t;Bf.deleteIn(e,[n,"context_data","blocking_action_counter"]),Bf.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase($e,((e,t)=>{t.payload.doDeleteCaseSummary&&oI(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=Lf(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=Lf(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&tI(e,t.payload),eI(e,t.payload),Zy(e,t.payload),rI(e,t.payload.suggestionContexts)})).addCase(_e,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&Bf.deleteIn(e,[r]),Bf.deleteIn(e,[n])})(e,t.payload),aI(e,n),nI(e,t.payload.transientItems),rI(e,t.payload.suggestionContexts)})).addCase(Ce,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{Bf.deleteIn(e,[t])})):Bf.deleteIn(e,[n])})).addCase(xe,((e,t)=>{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:o}=t.payload;oI(e,t.payload.context),eI(e,t.payload),e[n]=Lf(e[n],e[r]),e[n]=Lf(e[n],a),Bf.deleteIn(e,[r]),aI(e,o),Zy(e,t.payload)})).addCase(we,((e,t)=>{const{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}=t.payload;let{data:o}=t.payload;const s=Bf.getIn(e[n],"pulse");let i=Bf.getIn(e[n],"OperatorID"),c=Bf.getIn(e[n],"pxRequestor");c&&o.pxRequestor&&(c=Bf.mergeDeep(c,o.pxRequestor)),i&&o.OperatorID&&(i=Bf.mergeDeep(i,o.OperatorID)),!r&&s&&(o=Ff(o,"pulse",s),o=Ff(o,"OperatorID",i),o=Ff(o,"pxRequestor",c)),Bf.setIn(e,n,o),eI(e,t.payload),Zy(e,t.payload),aI(e,a),nI(e,t.payload.transientItems),rI(e,t.payload.suggestionContexts)})).addCase(st,((e,t)=>{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;oI(e,n,{doDeleteConfirmationDetails:r})})).addCase(be,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Bf.setIn(e,n,r)})).addCase(Te,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>Bf.deleteIn(e,t)))})).addCase(Pe,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>Bf.deleteIn(e,t)))})).addCase(Ne,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Lf(Bf.getIn(e,n),r)})).addCase(Oe,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Lf(Bf.getIn(e,n),r)})).addCase(ve,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Object.keys(r??{}).forEach((t=>{Bf.deleteIn(e,[n,t])}))})).addCase(De,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Bf.deleteIn(e,n),Bf.setIn(e,n,r)})).addCase(ce,((e,t)=>{const{key:n,value:r}=t.payload;Bf.setIn(e,`${j.SHARED}.${n}`,r)})).addCase(Fe,((e,t)=>{const{context:n,data:r}=t.payload;return Bf.setIn(e,n,r)}))})),iI=Ly({},(e=>{e.addCase(ge,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:r=[],uiRootReference:a="",interestPath:o}=t.payload,s=a&&"string"==typeof t.payload.context?`${t.payload.context}.${a}`:t.payload.context,i="string"==typeof s?Sf(s):[],c={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...r]};if(a&&i.length)Bf.setIn(e,i,Lf(Bf.getIn(e,i),Bf.getIn(t.payload.data,Sf(a)),c));else if(o){const a=Bf.getIn(e[t.payload.context],o),s=Bf.getIn(t.payload.data,o),i=Lf(a,s,{isArrayDeepMerge:!0}),c=Bf.getIn(t.payload.data.context_data,o);Mf(e[t.payload.context],[...n],[...r]),Bf.setIn(e[t.payload.context],o,i),e[t.payload.context]&&c&&Bf.setIn(e[t.payload.context].context_data,o,Lf(Bf.getIn(e[t.payload.context].context_data,o),c,{isArrayDeepMerge:!0}))}else e[t.payload.context]=Lf(e[t.payload.context],t.payload.data,c);eI(e,t.payload,!0),Zy(e,t.payload)})).addCase(Q,((e,t)=>{const{context:n,reference:r,value:a,isArrayDeepMerge:o}=t.payload;Ff(e[n],r,a,{isArrayDeepMerge:o})})).addCase(Z,((e,t)=>{const{context:n,reference:r,value:a}=t.payload;jf(e[n],r,a)})).addCase(me,((e,t)=>{xf(e[t.payload.context],t.payload.reference)})).addCase(se,((e,t)=>{Bf.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(ie,((e,t)=>{Bf.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(rt,((e,t)=>{const{data:n}=t.payload;Zy(e,{data:{shared:n}})})).addCase(at,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;Bf.deleteIn(e.shared,[n,r]);const a=Bf.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&Bf.deleteIn(e.shared,[n])}))})).addCase(it,((e,t)=>{const n=Bf.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?Bf.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):Bf.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)}))})),cI=/\[(\d+)\]$/gi,lI=/(\d+)/gi,dI=/\[.\]$/gi,uI=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const a=Bf.getIn(t,r);if(a){const t=ps(a,[],[]);for(const a of t)Bf.setIn(e[n],[...r,...a],{})}},pI=(e,t,n,r)=>{const{property:a,pageReference:o,category:s,type:i}=r.payload,c=Bf.getIn(e[t],n);if(c&&s===j.CASEMESSAGES)Bf.setIn(e[t],os(a,o,s),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&Bf.setIn(e[t],os(a,o,s),r)}},hI=(e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:o,deletingIndex:s,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return uI(e,i,c),e;const l=os(n,r,a,o);if(Number.isInteger(s)){Bf.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=Bf.getIn(e[c],t)||{};const r=(d=Object.keys(n),[...d].sort(((e,t)=>{const n=e.match(cI),r=t.match(cI);if(!n&&!r)return e.localeCompare(t);if(!n&&r)return-1;if(n?.length&&r?.length){const e=n[0].match(lI),t=r[0].match(lI);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=r.map((e=>n[e])),n.forEach(((n,a)=>{const o=r[a].match(cI);if(o?.length){const i=parseInt(o[0].match(lI)[0],10);i>s&&(Bf.deleteIn(e[c],t.concat(r[a])),Bf.setIn(e[c],t.concat(r[a].replace(dI,`[${i-1}]`)),n))}}))}else Bf.setIn(e[c],l,{});var d;return e};function fI(e,t){const n=Bf.getIn(e,t);return void 0!==n?.dataInfo?.content}const gI=(e,t)=>{const n=Bf.getIn(e,t);return!0===$l.isObjectCaseType(n?.objectInfo?.objectTypeID)};function mI(e,t){let n=as.FIELD_MESSAGES_PATH;return fI(e,t)?n=as.DATA_OBJECT_FIELD_MESSAGES_PATH:gI(e,t)&&(n=as.OBJECT_FIELD_MESSAGES_PATH),n}const yI=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=Bf.getIn(n,j.ERROR_FIELD_IN_PAGE).slice(1),a=Bf.getIn(n,j.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(a){let o="caseInfo.content";fI(e,t)?o="dataInfo.content":gI(e,t)&&(o="objectInfo.content");let s=r?`${o}.${r}`:o;s=s.replace(/\(/g,"[").replace(/\)/g,"]");const i=os(a,s,j.PROPERTY),c=Bf.getIn(e[t],`${s}.classID`),l=Yh(a,c),d=Oh.getLocale()??"en-US",u=new fu(d,l?.localeReference),p={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:u.getLocalizedText(l.label)}},h=Bf.getIn(e[t],i,[]);if(Bf.isContains(h,p))return;Bf.setIn(e[t],i,[...h,p])}})(e,t,n)}))};function II(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:o,pageErrors:s}=((e,t)=>{const n=new Map(t.map(((e,t)=>[e,t]))),r=e=>n.get((e=>{const t=(e.erroneousInputOutputFieldInPage||"").replace(/^\./,""),n=(e.erroneousInputOutputIdentifier||"").replace(/^\./,"");return t?`${t}.${n}`:n})(e))??Number.MAX_SAFE_INTEGER,a=e.slice().sort(((e,t)=>r(e)-r(t))),o=[],s=[];for(const e of a)Zc(e,t,o,s);return{fieldErrors:s,pageErrors:o}})(n.errorDetails,r),i=mI(e,a);if(Bf.setIn(e,[a,...i],{}),Bf.setIn(e,[a,...as.PAGE_MESSAGES_PATH],[]),o.forEach((t=>{const n=Bf.getIn(t,j.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(t);if(!n)return!1;const r=t.substring(t.lastIndexOf(".")+1),o=os(r,n,j.PROPERTY);Bf.setIn(e,[a,...o],[])}}})),o.length>0&&yI(e,a,o),s.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(s);e[a]||(a=j.APP.APP),Bf.setIn(e,[a,...as.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(hp.WORKAREA)&&(a=W(a)),Bf.deleteIn(e,[a,...as.PAGE_MESSAGES_PATH]);return e}const EI=Ly({},(e=>{e.addCase(Ee,((e,t)=>t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||"Invalid inputs"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?II(e,t):e)).addCase($e,((e,t)=>{const{context:n}=t.payload,r=[n,...mI(e,n)],a=[n,...as.PAGE_MESSAGES_PATH];if(Bf.setIn(e,r,{}),Bf.setIn(e,a,[]),n&&n.includes(hp.WORKAREA)){const t=[J(n),...as.PAGE_MESSAGES_PATH];Bf.setIn(e,t,[])}})).addCase(et,((e,t)=>{const{isListEntry:n,clearAll:r,context:a}=t.payload;return r?(Bf.deleteIn(e,[a,j.CONTEXT_DATA]),e):n?hI(e,t):((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:o,stateObj:s}=t.payload,{context:i}=t.payload;let c=i;if(s)return uI(e,s,i),e;const l=os(n,r,a,o);return a===j.PAGE&&i?.includes(hp.WORKAREA)&&(c=W(i)),pI(e,c,l,t),pI(e,i,l,t),e})(e,t)})).addCase(Ze,((e,t)=>{const{messages:n,property:r,pageReference:a,context:o,category:s}=t.payload,i=os(r,a,s);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&Bf.setIn(e[o],os(r,a,s),n)}))})),AI=(e,t,n,r,a)=>{Bf.setIn(e[t],[...n,r],a)},CI=[iI,sI,EI,Ly({},(e=>{e.addCase(ot,((e,t)=>{const{instruction:n,actions:r,context:a,referenceList:o,listIndex:s,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,d=Sf(o);switch(n){case j.LIST_ACTIONS.ADD:AI(e,a,d,i,l);break;case j.LIST_ACTIONS.INSERT:AI(e,a,d,s,l);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const o=Lf(Bf.getIn(e[t],[...n,r],{}),a);Bf.setIn(e[t],[...n,r],o)})(e,a,d,s??i,l);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r,a)=>{const o=Bf.getIn(e[t],n,[]);"string"==typeof r?delete o[r]:o.splice(r,1),Bf.setIn(e[t],n,o),rs.deleteListNode(t,[a],o.length)})(e,a,d,s??i,o);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const o=Bf.getIn(e[t],[...n,r],{}),s=Bf.getIn(e[t],n,[]);s.splice(r,1),s.splice(a,0,o),Bf.setIn(e[t],n,s),cs(e,t,n?.join("."),r,a)})(e,a,d,s,c);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=Bf.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:o,listIndex:s}=e;if(r===j.LIST_ACTIONS.SELECT){a[s]=o;const e=n?.join(".");pi(t,e)}else delete a[s]})),Bf.setIn(e[t],n,a.filter(Boolean))})(e,a,d,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{Bf.setIn(e[t],n,[])})(e,a,d);break;case j.LIST_ACTIONS.REPLACE:((e,t,n,r)=>{Bf.setIn(e[t],n,r)})(e,a,d,l);break;case j.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{Bf.setIn(e[t],n,{})})(e,a,d)}}))}))],SI=(e,t)=>(e||(e=OI().data),t.type===tt?OI().data:(CI.forEach((n=>{e=n(e,t)})),e)),_I={},bI=(e,t=[])=>{t.forEach((t=>{Bf.deleteIn(e,[t])}))},NI=(e,t)=>{const{type:n,payload:r}=t,a=n===$e,{target:o,context:s,semanticURL:i="",root:c,containerItemID:l,childContainers:d,flowName:u,resourceType:p="",key:h="",clearView:f=!1}=r;return c?Bf.setIn(e,[o,"items",l,"view"],c):f&&Bf.deleteIn(e,[o,"items",l,"view"]),s&&Bf.setIn(e,[o,"items",l,"context"],s),u&&Bf.setIn(e,[o,"items",l,"flowName"],u),(!a||a&&h)&&Bf.setIn(e,[o,"items",l,"key"],h.trim()),((e,t,n,r)=>{""===e&&Bf.deleteIn(t,[n,"items",r,"key"])})(h,e,o,l),(!a||a&&i)&&Bf.setIn(e,[o,"items",l,"semanticURL"],i),(!a||a&&p)&&Bf.setIn(e,[o,"items",l,"resourceType"],p),bI(e,d),e},TI=Ly(_I,(e=>{e.addCase(tt,(()=>_I)).addCase(Ae,((e,t)=>{const{context:n,name:r,type:a,actionMgrID:o}=t.payload,s=`${n}/${r}`;if(nc.resolveActionByID(o,null,!1),e[s])return e;Bf.setIn(e,[s],{type:a,accessedOrder:[],items:{}})})).addCase(Le,((e,t)=>{const{containerName:n,childContainers:r=[]}=t.payload;Bf.deleteIn(e,[n]),r.forEach((t=>{Bf.deleteIn(e,[t])}))})).addCase(Ce,((e,t)=>{const{context:n,name:r,actionMgrID:a,childContainers:o}=t.payload,s=`${n}/${r}`;nc.resolveActionByID(a,null,!1),Bf.setIn(e,[s,"accessedOrder"],[]),Bf.setIn(e,[s,"items"],{}),Array.isArray(o)&&o.forEach((t=>{Bf.deleteIn(e,[t])}))})).addCase(Se,((e,t)=>{const{target:n,context:r,isInCreateStage:a,isBulkAction:o,semanticURL:s,root:i,containerItemID:c,actionMgrID:l,key:d,flowName:u,resourceType:p,actionName:h,isMinimizable:f,showProgress:g,progressMessage:m,modalOptions:y,resourceStatus:I,actionID:E,isMultiRecordData:A,acTertiary:C,parentContext:S,heading:_,isTraditionalRemoteCase:b,readOnly:N,referenceList:T,subscriptName:P,subscriptFieldName:O,pageGroupName:v,isPageGroup:D,index:R}=t.payload,$=e[n],w=$&&$.type,M=$&&$.accessedOrder||[],L=$&&$.items||{};if(e[n]&&"single"===w&&M.length>0)return NI(e,t);const F={accessedOrder:[...M,c],items:{...L,[c]:{view:i,semanticURL:s,key:d,flowName:u,readOnly:N,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:f,...o&&{isBulkAction:o},showProgress:g,progressMessage:m,modalOptions:y,isTraditionalRemoteCase:b,resourceStatus:I,referenceList:T,subscriptName:P,subscriptFieldName:O,pageGroupName:v,isPageGroup:D,index:R,...E&&{actionID:E},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},...S&&{parentContext:S},heading:_}}};nc.resolveActionByID(l,null,!1),e[n]=x()(e[n],F)})).addCase($e,((e,t)=>{const{actionMgrID:n,data:r}=t.payload;try{NI(e,t),nc.resolveActionByID(n,r,!1)}catch{nc.rejectActionByID(n,!1)}})).addCase(we,((e,t)=>((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:o}=t.payload;let s=e;try{const i=e&&e[a]?.type;let c=e&&e[a]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,o]:c.includes(o)?c:[...c,o],Bf.setIn(e,[a,"items",o,"transientItems"],[]),Bf.setIn(e,[a,"accessedOrder"],c),s=NI(e,t),nc.resolveActionByID(n,r,!1)}catch{nc.rejectActionByID(n,!1)}return s})(e,t))).addCase(Re,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=Bf.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),Bf.setIn(e,[n,"accessedOrder"],t),nc.resolveActionByID(a,null,!1)}catch{nc.rejectActionByID(a,!1)}})).addCase(xe,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a,childContainers:o}=t.payload;try{const t=Bf.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));Bf.setIn(e,[n,"accessedOrder"],t),Bf.deleteIn(e,[n,"items",r]),bI(e,o),nc.resolveActionByID(a,null,!1)}catch{nc.rejectActionByID(a,!1)}})).addCase(_e,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a,childContainers:o}=t.payload;try{const t=Bf.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));Bf.setIn(e,[n,"accessedOrder"],t),Bf.deleteIn(e,[n,"items",r]),bI(e,o),nc.resolveActionByID(a,null,!1)}catch{nc.rejectActionByID(a,!1)}})).addCase(be,((e,t)=>{const{transientItemID:n,target:r,contextName:a}=t.payload,o=Bf.getIn(e,[r,"items",a,"transientItems"])??[];Bf.setIn(e,[r,"items",a,"transientItems"],[...o,n])})).addCase(Pe,((e,t)=>{const{target:n,containerItemID:r}=t.payload;Bf.deleteIn(e,[n,"items",r,"transientItems"])})).addCase(Te,((e,t)=>{const{target:n,transientItemID:r,containerItemID:a}=t.payload,o=(Bf.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));Bf.setIn(e,[n,"items",a,"transientItems"],o)}))}));let PI={};const OI=()=>PI,vI=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];PI={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),{data:SI,containers:TI});function DI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=cd(e),r=function(e,t){return"number"==typeof id(e)?e.pop():t}(e,1/0),a=e;return a.length?1===a.length?Oo(a[0]):function(e){return void 0===e&&(e=1/0),od(yo,e)}(r)(jo(a,n)):dd}const RI=(e,t=!1)=>e===j.ACTION?t?Yd.REFRESH_CASE_DATA:Yd.REFRESH_ASSIGNMENT_DATA:Yd.REFRESH_CASE_VIEW,$I=e=>{const{context:t}=e;let n={...Yc(t).content,contextData:!1};const r=fl(t);Bf.isEmpty(r)||(n=hl(r,n));const a=RI(e.editType,e.isLocalAction),{restApi:o,reqType:s}=Wg(a,{ID:e.isLocalAction||e.editType!==j.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=o;return e.editType===j.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,jo(Vs(i,{method:s,body:n,headers:e.headers},t)).pipe(ad((t=>({actionInPayload:e,response:t.data,headers:zc(t.headers)}))),pd(": Error occurred during ajax call : ",t))},xI={},{VIEW:wI,FIELD:MI}=j.CONTEXT_TREE_NODE_TYPES,LI=(e,t,n)=>{const r=t.value.data[n]?.objectInfo?.headers,a=t.value.data[n]?.caseInfo?.headers;return e&&r?r:a},FI=e=>ws[e]>0&&xI[e],jI=(e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:a,fieldsWithWhen:o,isViewsWithWhen:s,interestPage:i,options:c,isMultiRecordData:l,editType:d,isLocalAction:u,interestPageActionID:p}=e,{optionalPayload:h}=c;h&&(t.content={...h});let f={},g={...t},m=Yd.REFRESH;if(r||l&&d===j.ACTION){const t=RI(d,u);l&&d===j.ACTION&&(g.interestPageActionID=p),f=Wg(t,e),g={...g,interestPage:i}}else s?f=((e,t)=>{const{isObjectType:n,isExternalObject:r,actionID:a,context:o}=e;if(t||n&&ku(o))return Wg(r&&"Create"===a?Yd.REFRESH_EXTERNAL_OBJECT:Yd.REFRESH_CASE_DATA,e);return Wg(Yd.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(a.length>0||o.length>0)&&({restAPI:f,requestBody:g,requestType:m}=((e,t,n,r,a)=>(a={...a,calculations:{fields:t,whens:n}},{restAPI:Wg(r?Yd.RECALCULATE_CASE_DATA:Yd.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:a,requestType:Yd.RECALCULATE}))(e,a,o,n,g));return{restAPI:f,requestBody:g,requestType:m}},UI=[(e,t)=>e.pipe(nd(Yd.REFRESH_DATA,yt),ad((e=>e.payload)),od((e=>{const{context:n,contextData:r,options:a,isObjectType:o}=e,{propertyName:s="",classID:i="",isObjectWideAction:c}=a,l=Yc(n,{skipUUID:o,isObjectWideAction:c});let d=[],u=[],p=!1;Oh.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:d=[],whens:u=[]}=Hu(n)),p=u.some((e=>e.type===wI))):p=!0;const h=u.filter((e=>e.type===MI)),f=Bf.getPropertyName(s),g=f?f.split("."):[],m=g.pop(),y=g.join("."),I=[];y&&((e,t,n,r,a)=>{const o=Yh(e,t);if(!o||"copy"!==o.dataRetrievalType)return;const s=Bf.getIn(n,`content.content.${e}`);if(!s||"object"!=typeof s)return;const i=r?Object.keys(s).filter((e=>e!==r)):Object.keys(s);i.length>0&&(i.forEach((e=>delete s[e])),a.push(e))})(y,i,l,m,I),e.serverPrecedenceFields=I;let E={...l.content,contextData:r};const A=fl(n);Bf.isEmpty(A)||(E=hl(A,E));const C=jI({...e,fieldsWithDeclarativeTargets:d,fieldsWithWhen:h,isViewsWithWhen:p},E);Jd.registerBlockingAction(n).catch((()=>{}));const{restAPI:S,requestBody:_,requestType:b}=C;(e={...e,requestType:b}).requestType=b;const{reqType:N,restApi:T}=S,P={...LI(o,t,n)};P&&!P.etag&&e.isMultiRecordData&&e.editType===j.ACTION&&(P.etag=Bf.getETag(e.context));return jo(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if(t.interestPage&&(e.interestPage=t.interestPage),FI(r)){const t=[];for(let n=0;n<xI[r].length;){const a=xI[r][n],o=Wu(a,e);if("CANCEL_REFRESH"===o){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===o&&(t.push(n),a.cancelConfig?.cancel()),n+=1}t.forEach((e=>{xI[r].splice(e,1)}))}const a=Ws();return e.signal=a.token,e.cancelConfig=a,xI[r]?xI[r].push(e):xI[r]=[e],Es.publish(j.ON_REFRESH_START,{context:n}),Vs(e.url,e,n,{cancelContext:r}).then((e=>(delete xI[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete xI[r],e}))})({reqHeaders:P,context:n,method:N,body:_,url:Gu(e,T)},e)).pipe(ad((t=>{const r=((e,t,n)=>{if(!$l.isObjectCaseType(t)&&!n)return e;const r=Bf.getIn(e?.data,F.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return $l.isExternalObject(r)?e:L.transformCaseData(e)})(t?.data,a?.classID,o);return a?.resetForm&&rs.removeContextTreeNode(n),{response:{...r},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:zc(t.headers)}})),pd(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),od((async e=>{if(e&&e.type===Ee)return Es.publish(j.ON_REFRESH_ERROR,{context:e.payload?.context}),Jd.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),el(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:a,serverPrecedenceFields:o,requestType:s}=t,i=ac.getTargetViewContainerName(je),c=Pt(i,a),l={acName:c,context:a},d=yu(n,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0});d.directUrlUpdation=!1,s===Yd.REFRESH&&await Jc(d,t,l);const u={target:c,context:a};let p=Il.getStateMachinesByContext(a)||{};const h=Kc(d,u);t.interestPage&&(h.interestPath=`caseInfo.content${Bf.convertClipboardPageToPageRefNotation(t.interestPage)}`),p={...p,...Il.getUnConnectedStateMachines(a)||{}},Object.keys(p).forEach((e=>{if(Bf.hasIn(h.data,e)){const t=Bf.getIn(h.data,e),n=vf(e,void 0,a),r=rs.getContextReferences(a)?.get(e);((e,t,n,r,a)=>Array.isArray(e)&&Array.isArray(t)&&t.length!==e.length&&"Multiselect"!==n&&"Attachment"!==n&&(!r.interestPath||a.startsWith(r.interestPath)))(t,n,r?.props?.componentName,h,e)&&Il.setStateMachineEmpty(a,e)}})),h.isArrayDeepMerge=t.options?.isArrayDeepMerge,h.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const f=$l.getPropertiesToReArrange(a),g=Ng(Qf,h,{serverPrecedenceFields:o,propertiesToReArrange:f});return Il.registerForServerChanges(),Nf(g),nc.resolveActionByID(r,h),Il.unRegisterForServerChanges(),Jd.deRegisterBlockingAction(a).catch((()=>{})),Es.publish(j.ON_REFRESH_COMPLETE,{context:a}),[]})))],kI=[e=>e.pipe(nd(nt),od((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const o=e.payload.datapages[a];if(o.mode===j.READONLY&&o?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=o?.refreshStrategy||{},n=Pf()?.[o.name];if(n&&a in n){const r=n[a],{loadTime:o}=r;if(!Cd.isTimeElapsed(o,e,t))return}}return Cd.getData(o.name,{dataViewParameters:o.dataViewParameters},t).then((e=>{const t=o.mode===j.READONLY?r:n;t[o.name]?t[o.name][a]={pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[o.name]={[a]:{pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const o=[];return Object.keys(n).length&&o.push(Qf({context:t,data:n})),Object.keys(r).length&&o.push(Pg({data:r,context:t})),Nf(o),[]})))];class VI{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>n.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId())switch(e.data.action){case VI.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case VI.LOAD_PREVIEW:this.loadPreview(e);break;case VI.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case VI.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case VI.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case VI.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case VI.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case VI.CANCEL_CASE:this.handleCaseCancel();break;case VI.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Es.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=xp(F.APP.APP),t=e[e.length-1],n=Pp(t),r=Tf(n)?.caseInfo?.ID;if(r&&n&&vu({}).getPConnect().getActionsApi().getDescendants(r,n),$c(n)){const e=ph(n);e&&vu({}).getPConnect().getActionsApi().getDescendants(r,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){vu({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=vu({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",a=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(a,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:a,uniqueId:o}=e.data;if(o!==this.getUniqueId())return;let s=r;r===VI.OPEN_WORK_ITEM&&(s=VI.OPEN_WORK_BY_HANDLE),Th.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:s,name:a});vu({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),a,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){vu({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:F.PRIMARY,context:F.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;vu({meta:{},options:{context:Rp(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;vu({meta:{},options:{context:Rp(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:r,caseInitProperties:a}=e.data;if(n===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,n=vu({meta:{},options:{context:Rp(e)}}),o=new URLSearchParams((a+r).slice(1)),s=this.setStartingFields(o);n.getPConnect().getActionsApi().createWork(t,{startingFields:s})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Es.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Es.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Es.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Es.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:VI.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:VI.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:VI.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const BI=new VI,GI="nextAssignmentInfo",WI="nextAssignmentInfo.context",HI=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||ac.getTargetViewContainerName(We)},qI=e=>Lp(e)?{continueExecution:!0,removeActionPayload:{}}:ol(e),zI=e=>{const t=Bf.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return wl(t)&&Ml(Oh.getOperatorIdentifier(),t)},YI=(e,t)=>{const{class:n,context:r,viewType:a=Hc.PAGE}=e,{removeActionPayload:o}=t;let s=e?.pageName?e?.pageName:Oh.getDefaultCasePage();return e.isTraditionalUICase&&(s="pyDetails"),jo(Ui.createCase(n,{...e,pageName:s,viewType:a,context:r})).pipe(ad((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),pd("Error occurred during ajax call at createWork Epic : ",r))},KI=e=>{Es.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},JI=e=>{Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},XI=e=>{let t=0,n=[],r={},a=!1;return e.pipe(nd(Kf),hd(100),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{context:n}=e,r=HI(e),o=Pt(r,n),{continueExecution:s,removeActionPayload:i}=qI(o);return a=Lc(e.class),s?(e.isTraditionalUICase=a,YI(e,{removeActionPayload:i})):(nc.rejectActionByID(t),ud())})),od((async e=>{if(e&&e.type===Ee)return e.payload.context=sh(),n.push(el(e)),n;const{actionInPayload:o,response:s,headers:i,removeActionPayload:c}=e;let l;l=!(o.renderInline||Oh.getDefaultCasePage()||a)&&zI(s),Bf.setIn(s.data,F.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const d=HI({...o,isInCreateStage:l}),u=Pt(d,o.context),p=nl(u,d,o.context);if(!Cc(d)&&Lp(u)){const{continueExecution:e}=ol(u);if(!e)return nc.rejectActionByID(t),ud()}if(!(o?.openCaseViewAfterCreate??!0)&&!l){const e=Dc(s),{businessID:t,caseType:a,resolvedURL:o}=hc(s);return r={id:t,label:a,href:o},KI(r),JI({caseId:t,assignmentId:e,caseType:a}),n}const h=yu(s),f=String(Tc(vc(h)));let g=Bg("createWork",{caseClassName:Pc(h)});g=g.replace(/{.+?}/,f),h.semanticURL=g,ec.setComponentCache(f,$s.addDebugHeaders(o.debugInfo)),((e,t)=>{const n=zI(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t,o=a&&!Fc();Bf.setIn(e,["directUrlUpdation"],(!n||o)&&!r)})(h,o);const m={acName:u,context:p},y=kc(p);await Jc(h,o,m);const I={target:u,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,currentCaseViewMode:y,assignmentContext:Bf.getIn(h,WI),nextAssignmentInfo:Bf.getIn(h,GI),resourceType:F.CASE,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};xc(I,h);const E=Kc(h,I);a&&(E.data.caseInfo.content.coexistenceAction="openAssignment"),$l.setTraditionalGadgetId(E.data);const A=tl(u,E);return rl(A)&&Rc(n,{removeActionPayload:c,target:u}),n.push(A),ll(n),n})),ad((()=>{const e=Fc(),o=wl(Bf.getIn(n[0]?.payload,"data.caseInfo"));return a&&e&&o?BI.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,pl,n):pl(n),Mc(n,t),r={},n=[],n})))},{RESOURCE_TYPES:QI}=F,ZI=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:o}=e,s=Nc(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(s)&&e?.stageID===s.stageID?Hc.PAGE:n||(!Ac(r)&&!Ac(a)||o?Hc.PAGE:Hc.FORM)},eE=(e,t,n,r,a)=>{if(Rc(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=Pp(t);let r=null;return n&&(r=yp(t,n)),r?.key===e&&Fp(t)})(r.key,n))r.context=Rp(n),r.containerItemID=r.context,e.push(Ng(Cg,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=Hp(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(Ng(Cg,r))}else{const t=Hp(r.context),n=Sp(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(Ng(Cg,r))):e.push(Ng(sg,r))}},tE=(e,t,n,r,a,o,s)=>{Lp(t)&&jp(t)?((e,t,n,r,a)=>{ZI(e,t)===Hc.FORM?(n.caseViewMode=r||j.PERFORM_MODE,a.push(Ng(pg,n))):a.push(Ng(Cg,n))})(r,a,e,o,n):eE(n,s,t,e,r)},nE=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:s})=>Vs(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...$s.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:o?s:""}),rE=(e,t)=>{const n=ZI(e),{headers:r,context:a,assignmentID:o,isGetNextWork:s,debugInfo:i,isOpenStage:c,stageID:l,caseID:d,jsActionQueryParams:u,isLastStepInCreateStage:p}=e;let h,f;({restApi:h,reqType:f}=s?Wg("getNextWork",{viewType:n}):c?Wg("openStage",{caseID:d,stageID:l}):Wg(Ge,{assignmentID:o,viewType:n}));const{removeActionPayload:g}=t,m=Oh.getDefaultCasePage();let y="",I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),y=m?`${h}?viewType=${n}&pageName=${m}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{y+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=zc(t,e.remoteClassName)),t})(e);return jo(nE({restUrl:y,reqType:f,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:"404"})).pipe(ad((e=>{if(Oh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return wl(e.data.data.caseInfo)?e:(y=I?y.replaceAll(I,"pyDetails"):y,Oh.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:y})}return e})),od((e=>e?.isReloadWithDifferentViewTypeRequired?nE({restUrl:y,reqType:f,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:"404"}):ld(e))),ad((t=>{const{key:a,flowName:s}=Qc(o);return L.analyseResponse(t),{response:{...t.data,key:a,flowName:s},actionInPayload:e,viewType:n,removeActionPayload:g,headers:zc({...r,...t.headers})}})),pd("Error occurred during ajax call at openAssignment Epic : ",a))},{RESOURCE_TYPES:aE}=F,oE=e=>{const t="Browser"===Oh.getRuntime();let n=0,r=[];const a=[];let o=!1,s=!1;return e.pipe(nd(Hl),ad((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),od((e=>{o=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Hc.FORM:ZI(e),e.viewType=r;const a=Ic(Ge,e),i=Pt(a,t),{activate:c,activateContainerActionPayload:l}=il(aE.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return ld({type:Re,activateContainerActionPayload:l,actionInPayload:e});const d=Pp(i);let u;u=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:d?ol(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=u;return p?(s=Lc(e.className),e.isTraditionalUICase=s,Oh.isWSSPortal()&&(e.headers={...e.headers,[j.X_ORIGIN_CHANNEL]:"WSS"}),rE(e,{removeActionPayload:h})):(nc.rejectActionByID(n),ud())})),od((async e=>{if(e?.type===Ee){if(o){const{payload:t}=e,{err:n}=t,r=n.response.status;a.push({status:Number(r)})}return r.push(el(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:d,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Hl,a=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const o={type:t,payload:{...n,caseID:a,headers:l}};return r.push(o),r}const{context:p,caseViewMode:h,debugInfo:f}=n,g=i?.data?.caseInfo?.caseTypeID;s=Lc(g),n.isTraditionalUICase=s;let m=((e,t)=>{const n=Nc(e);let r;r=!Oh.getDefaultCasePage()&&wl(n);const{isChild:a,containerName:o,isTraditionalUICase:s}=t,i=a&&r,c=r&&!t.isActionFromToDoList;return!i&&!c||s?o||Ic(Ge,t):j.MODAL})(i,n);s&&(m=n.containerName??m);const y=Pt(m,p);if(t===Re)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:o,insKey:s}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,d=Dp(a);await Jc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:d}),e.push(Ng(mg,{containerItemID:a,target:i,isParallelAssignment:o,insKey:s,resourceType:QI.CASE,context:d,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,u,{actionInPayload:n,target:y}),ll(r),r;const I=i?.data?.caseInfo?.content,E=i?.data?.caseInfo?.ID,A=i?.uiResources?.root?.config?.name,C=i?.uiResources?.root?.config?.context;I&&!I.pyViewName&&A&&"page"!==n.viewType&&(Bf.setIn(I,"pyViewName",A),Bf.setIn(I,"pyViewContext",C));const S=yu(i);((e,t)=>{const n=Nc(e),r=vc(e),a=wl(n),{skipBrowserSemanticUrlUpdate:o=!1,viewType:s,isTraditionalUICase:i}=t,c=i&&!Fc(),l=s===Hc.PAGE&&(!a||c)&&!o,{caseTypeID:d}=n;if(l){const t=Bg(Be,{caseClassName:d}).replace(/{.+?}/,String(Tc(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(S,n);const _=nl(y,m,p),b=n.debugInfo||{};b?.debugId||(b.debugId=$s.getCoreHeadersFromContext(p)?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]),b&&b.debugId&&ec.setComponentCache(E,$s.addDebugHeaders(b));const N={acName:y,target:y,context:_};await Jc(S,n,N);const T={target:y,context:_,containerItemID:_,headers:l,parentContext:W(n?.context),isMinimizable:wl(Bf.getIn(S,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:F.ASSIGNMENT,debugInfo:f};xc(T,S,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const P=Kc(S,T);var O;return n.isProcessAction&&(P.data.isProcessAction=n.isProcessAction),s&&(P.data.caseInfo.content.coexistenceAction="openAssignment"),$l.setTraditionalGadgetId(P.data),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,P),tE(P,y,r,n,i,h,d),((e,t)=>{if(e=V.getRemoteCaseClassBySourceClass(e)??e,V.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:r,name:a}=V.getRemoteCase(e);if(t.headers?.RemoteSystemID||nc.setRemoteCaseHeaderByContext(t,r),V.isTraditionalRemoteCase(e)){t.assignmentID=t.assignments?.[0]?.ID;const r={className:e,name:a,action:Et,remoteClassName:n};nc.setTraditionalRemoteCaseParams(t,r)}}})(g,P.data.caseInfo),c===Hc.FORM&&$c(P.containerItemID)&&ul(P,r,C),ll(r),O={actionInContext:p,assignmentID:n.assignmentID,caseKey:P.key},Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,O),r})),ad((()=>{const e=n,t=Fc(),o=wl(Bf.getIn(r[0]?.payload,"data.caseInfo"));return s&&t&&o?BI.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,Nf,r):Nf(r),Mc(r,e,a),r[0]?.payload?.isParallelAssignment&&Nf({type:Hl,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},sE=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:o,viewType:s}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Oh.getDefaultCasePage(),l=Wg(Be,{caseID:n,params:{pageName:c}});let{restApi:d}=l;const{reqType:u}=l;return"none"===s&&(d=`${d?.split("viewType")[0]}viewType=none`),jo(Vs(d,{method:u,headers:{...r,...o&&{...$s.addDebugHeaders(o)}}},a)).pipe(ad((t=>(L.analyseResponse(t),{response:t.data,actionInPayload:e,headers:zc({...r,...t.headers}),removeActionPayload:i}))),pd("Error occurred during ajax call at openWorkByHandle Epic : ",a))},iE="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:cE}=F,lE=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:o,response:s,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:d,debugInfo:u}=r,p=Ic(Be,r),h=Pt(p,l);if(Sc(o))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:o,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:i}}=t,c=Ic(Be,a),l=Pt(c,o),d=Dp(r);await Jc({directUrlUpdation:!s,semanticURL:n},a,{acName:l,containerName:c,target:l,context:d}),e.push(Ng(mg,{containerItemID:r,target:l,context:d,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const a=nl(h,p,l,{buildNew:!0}),o=yu(s),f=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=vc(e),o=n?r:Pc(e);let s=Bg(Be,{caseClassName:o},{id:t?.insKey});return s=s?.replace("{workID}",String(Tc(a)))?.replace("{id}",t?.insKey),s})(o,r);o.semanticURL=f,o.directUrlUpdation=!d;const g={acName:h,context:a};await Jc(o,r,g);const m=Kc(o,{target:h,context:a,containerItemID:a,semanticURL:f,headers:c,debugInfo:u});m.caseViewMode=j.REVIEW_MODE,m.resourceType=cE.CASE,n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle",m.data.caseID=m.data.caseInfo.ID),$l.setTraditionalGadgetId(m.data),xc(m,o,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=kc(e?.actionInPayload?.context);const y=tl(h,m);i.containerItemID&&rl(y)&&t.push(Ng(Ig,{containerItemID:i.containerItemID,target:h})),t.push(y)}ll(t);const f=r.insKey;mc({caseKey:f,actionInContext:l})},dE=e=>{let t=0,n=[];return e.pipe(nd(iE),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{context:n,isChild:r,viewType:a}=e,o=Ic(Be,e),s=Pt(o,n);let i,c=!0;if("none"!==a){const e=ol(s);c=e.continueExecution,i=e.removeActionPayload}if(!c)return nc.rejectActionByID(t),ud();const{activate:l,activateContainerActionPayload:d}=il(cE.CASE,s,e);return l&&!r&&"none"!==a?(gl(d),ld({type:Re,activateContainerActionPayload:d,actionInPayload:e})):sE(e,{removeActionPayload:i})})),od((async e=>{if(e&&_c(e.type))return n.push(el(e)),n;const t=Tf(e?.actionInPayload?.context),r=Lc(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=yu(e?.response),a={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:st,payload:{context:a.context,doDeleteConfirmationDetails:!1}}),r&&a.data.caseInfo?.content&&(a.data.caseInfo.content.coexistenceAction="openWorkByHandle",a.data.caseID=a.data.caseInfo.ID),$l.setTraditionalGadgetId(a.data),n.push(Ng(Qf,a));const o=Hp(e?.actionInPayload?.context),s=Ec(e?.actionInPayload?.context),i=Object.freeze({target:o,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if($c(e?.actionInPayload?.context)){const t=Kc(e?.response,{...i});ul({...t,isArrayDeepMerge:!0},n)}}}else await lE(e,n,r);return n})),ad((()=>(Nf(n),Mc(n,t),n=[],n))))},uE="FINISH_ASSIGNMENT",{RESOURCE_TYPES:pE}=F,hE=(e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:o,isModalAction:s}=t;if(o&&s){const t=Ec(n),o=Pt(t,r);e.push(Ng(mg,{containerItemID:n,target:o,actionMgrID:a}))}},fE=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:o}=t,s=Dp(n),i=`${s?.includes("root")?j.APP.ROOT:j.APP.APP}/${hp.MODAL}`;e.push(Ng(Ig,{containerItemID:n,context:s,target:i,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:o}))},gE=e=>vf(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,mE=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r,a,o)=>{const{caseID:s}=n,i=(c=t,Bf.getIn(c,yc.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var c;const l=a?cc(t):Pc(t),{caseViewMode:d,headers:u,semanticURL:p,actionMgrID:h,directUrlUpdation:f,key:g,flowName:m,resourceType:y}=r,I=Hp(n?.context),E=yp(I,n?.context)?.acTertiary;Object.assign(o,{caseId:s,assignmentId:i,caseType:l,isSubmitFromBlendedUI:E}),fE(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${hp.PRIMARY}`,C=nl(A,hp.PRIMARY),S=$s.getCoreHeadersFromContext(n.context)||!1,_=Kc(t,{target:A,context:C,containerItemID:C,caseViewMode:d,headers:u,semanticURL:p,key:g,flowName:m,resourceType:y,directUrlUpdation:f,debugInfo:S&&S.debugInfo&&{debugId:S.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(Lp(A)){const t=Tf(C),a=vc({data:t}),[,o]=a?a.split(" "):[],s=`You will lose unsaved changes for ${o}. Do you want to continue?`;if(!gE(n.context))return e;{const{continueExecution:t}=ol(A,{dirtyMessage:s});if(!t)return r.directUrlUpdation=!1,nc.rejectActionByID(h),ud();_.currentCaseViewMode=kc(_?.context),e.push(Ng(Cg,_))}}else e.push(Ng(sg,_));return t.directUrlUpdation=f,t.semanticURL=p,await Jc(t,{..._,acName:A},{acName:A,context:C}),e},yE=(e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===we));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=Eg({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)},IE=e=>/^app\/preview_[0-9]*/g.test(e),EE=(e,t)=>{const n=W(e);return!IE(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},AE=e=>{if(!gE(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}},CE=(e,t,n,r)=>{const{data:a,caseViewMode:o}=t,s={data:a,caseViewMode:o,context:n};if(Bf.setIn(s.data,["context_data","caseViewMode"],o),e.push({type:st,payload:{context:n}}),r){const t={data:L.transformObjectToCase(a),caseViewMode:o,context:n};e.push(Ng(Qf,t))}e.push(Ng(Qf,s))},SE=async(e,t,n,r,a,o,s,i,c,l)=>{const{headers:d}=c,u=l?j.OBJECT_INFO.OBJECT_INFO:j.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=Tf(e),r=c?.response?.data?.caseInfo?.assignments??[],a=n?.caseInfo?.assignments??[],o=kc(e)===j.PERFORM_MODE,s=r[0]?.ID!==a[0]?.ID,i=r.length>0&&a.length>0;o&&s&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(r,a[0]?.ID))}const p=Lp(Hp(e));let h=!1;const f=Hp(n),g=mp(f),m=Pp(f);m&&g?.items?.[m]?.key===c?.actionInPayload?.caseID&&(h=!0),fE(a,{...r,skipReleaseLockRequest:!0});const y=Ec(e),I={target:Hp(e),containerItemID:e,context:e,containerName:y};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const E=J(n),A=Tf(E),C=Tf(r.context),S=A[u]?.ID,_=C[u]?.ID,b=Tf(e)?.caseInfo?.ID;if(p&&S===_||!p&&(""===s||I.containerItemID.includes(j.WORKAREA)&&"review"===t.caseViewMode||!o&&t.root&&0===Object.keys(t.root).length&&b===t.data?.caseInfo?.ID))(void 0===t?.data[u]?.content||void 0!==t.data[u].content&&"object"==typeof t.data[u].content&&0===Object.keys(t.data[u].content).length)&&(t.root=void 0,delete t.data?.caseMessages),e.includes(j.WORKAREA)&&t.caseViewMode===j.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,r=t?.data?.caseInfo?.assignments??[],a=r[0]?.ID;return n!==a})(r,i)&&(t.flowName=" ",t.clearView=!0),a.push(Ng(pg,{...t,key:s,resourceType:"",...I}));else if(o){const o=Hp(e),i=Sp(o,s);if(i)I.target=o,I.context=i,I.containerItemID=i,a.push(Ng(pg,{...t,key:s,resourceType:"",...I}));else{const e=xp(n)[0];if(r.target=e,r.context=nl(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,a.push(Ng(sg,{...r,...t}));const n=r.containerItemID;a.push(Ng(mg,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Hp(e),r.containerName=Ec(e),r.context=e,r.containerItemID=e,Bf.setIn(t,"acName",I.target),await Jc(i,t),h&&(n.includes(j.WORKAREA)&&$c(n)&&(n=J(n)),CE(a,t,n,l)),!o&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=Hp(e);return Sp(n,t)})(e,s),n={data:{[u]:{headers:d}},context:t};a.push(Ng(Qf,n)),a.push(Ru(((e,t=!1,n=!1)=>{const r=nc.getNextActionMgrId();return{ID:qf.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:qf.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{fE(a,r);let e=!1;const s=Hp(n),i=mp(s),d=Pp(s);if(d&&i?.items?.[d]?.key===c?.actionInPayload?.caseID&&(e=!0),o){const e=xp(n)[0];r.target=e,r.context=nl(e,j.WORKAREA,n),r.containerItemID=r.context,a.push(Ng(sg,{...r,...t}));const o=r.containerItemID;a.push(Ng(mg,{parentContainerTarget:e,containerItemID:o}))}e&&CE(a,t,n,l)}},_E=async(e,t,n,r,a,o,s)=>{const i=o?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(fE(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${hp.PRIMARY}`,a=nl(r,hp.PRIMARY),o={insKey:e.ID,className:e.content.classID,context:a,acTargetName:j.PRIMARY,isChild:!0},s={type:de,payload:{...o}};n.push(s)}})(e.data[i].parentCaseInfo,t,a);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=Hp(t?.context),r=yp(n,t?.context)?.parentContext,a=Hp(r);t?.isProcessAction&&Cp(a,c)&&ch(r,e?.data[i]?.lastUpdateTime)}n.resourceType=pE.CASE,n.directUrlUpdation=!0,t.isProcessAction||await mE(a,{translatedDXAPIResponse:r,actionInPayload:t},n,o,s)},bE=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:o}=t,s=$l.getPropertiesToReplace(o);a.push(Ng(pg,{...e,...r,propertiesToReplace:s})),Bf.setIn(e,"acName",r.target),await Jc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,o=Dp(a);if(o&&$c(a)){const t=J(o),s={data:n,caseViewMode:r,context:t};Bf.setIn(s.data,["context_data","caseViewMode"],r),e.push({type:st,payload:{context:t}});const i=$l.getPropertiesToReplace(a);e.push(Ng(Qf,s,{propertiesToReplace:i}))}})(a,t,e)},NE=async(e,t,n,r,a,o,s,i,c,l={})=>{const{isCaseWideAction:d,isInCreateStage:u,containerItemID:p}=e,h=W(e.context),f=Oc(a,c),g=c?cc(a):Pc(a),m=u&&!f&&!d,y=xp(h)[0],I=y?Pp(y):h,E=Ec(p),A=Dp(p),C=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:E});m&&!IE(e.context)?await _E(i,e,t,a,o,c,l):EE(e.context,I)?await SE(I,t,h,e,o,n,r,a,s,c):!d&&!c||EE(e.context,I)?await bE(t,e,a,C,o):(fE(o,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,o=W(r),s=Dp(o);e.push(Ng(eg,{containerItemID:o,context:s,container:hp.PREVIEW,containerName:hp.PREVIEW,caseId:a,viewName:F.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(o,e,{caseClassName:g}))},TE=(e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:o}=t,s=EE(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;fc({caseID:o,isModalAction:r,isModalLaunchedFromPrimaryValue:s,isCaseWideAction:a,stages:i,stageID:c})},PE=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER],a=r.startsWith(".")?r.slice(1):r;if(a){let o=t?`caseInfo.content.${t}`:"caseInfo.content";o=j.getProperty(o.replace(/\(/g,"[").replace(/\)/g,"]"));const s=os(a,o,j.PROPERTY),i={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};rs.mutateField(n,o,s[s.length-1],{messages:[i],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r})}}))},OE=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:o,additionalHeaders:s={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:d}=t,u=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:a}=e;return t&&r&&!a?Hc.PAGE:n||Hc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?"executeCaseWideActions":"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:a,viewType:u};let{restApi:f}=Wg(p,h);const{reqType:g}=Wg(p,h);u&&!f?.includes("viewType=")&&(f=f?.includes("?")?`${f}&viewType=${u}`:`${f}?viewType=${u}`),i&&!f?.includes("outcome")&&(f=f?.includes("?")?`${f}&outcome=${i}`:`${f}?outcome=${i}`),f=Vl(c,f),e.viewType=u;const{content:m}=Yc(o),y=d.value.data[o]?.caseInfo?.headers||{},{etag:I}=y,E={"if-match":I,...l,...s};return jo(Vs(f,{method:g,body:m,headers:E},o)).pipe(ad((t=>{const{data:n,headers:r}=t;return L.analyseResponse(n),{response:n,actionInPayload:e,headers:zc({...E,...r})}})),pd("Error occurred during ajax call at finishAssignment Epic : ",o))},vE=e=>{Es.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},DE=e=>{Es.publish(j.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:RE}=F,$E=(e,t)=>{let n=0,r=[],a={},o="",s={},i=!1,c=!1;return e.pipe(nd(uE),od((e=>{const l=Oh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),o=e.payload.context,ds({context:o,stateObj:Tf(o),clearContextMessages:!0}),!Ol(o)||gs(o)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,t),Jd.handleDeferredActionCompletion(e.payload.context).then((()=>{DE({errorType:F.ERROR_TYPE.CLIENT})})),ld([])}return ld(e.payload).pipe(od((e=>{hE(r,e);const n={...e};return OE(n,{state$:t})})),od((async e=>{if(e&&e.type===Ee){Bl(e);const t=el(e);return r.push(t),r}Gd.clearContextedCache(o);const{headers:t,actionInPayload:d,response:u}=e,{containerItemID:p,context:h=Dp(p),isModalAction:f,isInCreateStage:g}=d;i=d.isCaseWideAction,c=d.isProcessAction;const m=Hp(p);d.target=m;const y=Ec(p),I=Object.freeze({target:d.target,containerItemID:p,context:h,containerName:y});Bf.setIn(u.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),Bf.setIn(u.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),u?.uiResources?.root?.config?.name&&"page"!==d.viewType&&Bf.setIn(u.data,j.CASE_INFO.VIEW_NAME,u?.uiResources?.root?.config?.name),vE({submitResponse:u});let E=yu(u,{[F.STOPMERGEACTIONS]:!u.nextAssignmentInfo});const A=Pc(E),C=W(d.context),S=xp(C)[0]?Pp(xp(C)[0]):C,_=Oc(E),b=g&&!_;!f||g||EE(d.context,S)||(E=cl(E,Tf(p)));const N=Kc(E,{headers:t,actionMgrID:n,directUrlUpdation:!1});let T,P;wc(N.data,d),N.caseClassName=A,N.resourceType=RE.ASSIGNMENT,N.headers=t;const O=E?.data?.caseInfo?.assignments?.some((e=>e.ID===d.assignmentID)),v=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(E,d),D=((e,t,n,r,a)=>{let o;const s=Hp(t);return o=Fp(s)?Sp(s,n.data?.caseInfo?.ID):Pp(s),r&&e&&Df(null,j.CASE_VIEW_MODE_PROP,o)===j.PERFORM_MODE&&a})(O,S,E,f,v),R=d?.actionID===F.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(E?.data?.nextAssignmentInfo&&!R)N.caseViewMode=j.PERFORM_MODE,T=vc(E),P=!0;else if(D&&!R)E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM?N.caseViewMode=j.REVIEW_MODE:N.caseViewMode=j.PERFORM_MODE,T=vc(E),N.flowName=" ",N.deleteAssignmentSpecificResources=!1,P=!1;else{N.caseViewMode=j.REVIEW_MODE;const e=Lp(Hp(S));T=E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM&&!e?vc(E):"",P=!1}const $=vc(E);xc(N,E,{skipFlowNameUpdate:N?.caseViewMode===j.REVIEW_MODE||D});const x=Bg("createWork",{caseClassName:A}).replace(/{.+?}/,String(Tc($)));if(E.semanticURL=x,N.semanticURL=x,f?(await NE(d,N,P,T,E,r,e,u,!1,s),b&&(a=AE(d))):g&&l&&!_?(Oh.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:hp.PRIMARY,targetContainerName:hp.PRIMARY,viewType:Hc.PAGE,isLastStepInCreateStage:!0,context:n},a={type:fe,payload:{...r}};t.push(a)})(u,r,W(h))):await bE(N,d,E,I,r),Uc(e,r),Jd.handleDeferredActionCompletion(o).catch((()=>{})),TE(N,d,S),!E?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:vc(e),assignmentID:n?null:r,actionID:a||null}})(E,d);gc({...e,containerItemID:p})}return yE(r,{transientItemID:p,target:m,isModalAction:f}),r})),ad((()=>{const e=r.find((e=>e.type===Ee));var t;return e?(Jd.handleDeferredActionCompletion(o).then((()=>{DE({errorType:F.ERROR_TYPE.SERVER})})).catch((()=>{})),PE(e),nc.rejectActionByID(n)):nc.resolveActionByID(n,a),s?.caseId&&(t=s,Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)),pl(r),(i||c)&&(e=>{Es.publish(j.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0}),r=[],a={},s={},r})))})))},xE="CANCEL_ASSIGNMENT",wE=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:o,RemoteSystemID:s}=e;s&&(t.RemoteSystemID=s);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=Wg(i,{ID:a,caseID:a,viewType:Hc.PAGE}),d=ec.getComponentCache(a),u=d&&"object"==typeof d?d:{};return jo(Vs(c,{method:l,headers:{...t,...u}},o,{includeRemoteSystemIdIfPresent:!!s})).pipe(ad((t=>(ec.resetComponentCache(a),r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:zc(t.headers)}))),pd(": Error occurred during ajax call at release lock request : ",o))},ME=(e,t)=>{const{isModalAction:n}=t;return wE({routeKey:"cancelAssignment",isModalAction:n,...e})},LE=e=>{let t=0,n=[];return e.pipe(nd(xE),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{isModalAction:n}=e;e.context||(e.context=Dp(e.containerItemID));const{context:r}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?hp.MODAL:Ec(n)})(e),o=Pt(a,r),{continueExecution:s}=ol(o);return s?(e.RemoteSystemID=V.getRemoteHeaderByContext(e.context)??void 0,jo(ME(e,{isModalAction:n}))):(nc.rejectActionByID(t),ud())})),od((e=>{if(e&&e.type===Ee)return n.push(el(e)),jo([n]);const{actionInPayload:r,response:a}=e,{containerItemID:o,isModalAction:s,isInCreateStage:i}=r;a?.data.caseInfo&&(a.data.caseInfo.availableProcesses=a.data.caseInfo.availableProcesses??[]);const c=Hp(o),l=Dp(o),d={target:s?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:o,caseViewMode:s?j.PERFORM_MODE:j.REVIEW_MODE,context:l,actionMgrID:t,key:vc(a),skipReleaseLockRequest:!1};return i&&n.push(Ng(pg,d)),!s&&$c(o)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:a,response:o}=t,s=W(n),i={context:Dp(s),data:{...o.data,referencedUsers:a,context_data:{caseViewMode:r}}};o?.data?.caseInfo&&(o.data.caseInfo.assignments??=[]),e.push(Ng(Qf,i))})(n,{childContainerItemID:o,caseViewMode:j.REVIEW_MODE,referencedUsers:a?.data.referencedUsers,response:a}),d.skipReleaseLockRequest=!0,n.push(Ng(Ig,d)),jo([n])})),ad((()=>(Nf(n),Mc(n,t),n=[],n))))},FE="NAVIGATE_TO_STEP",jE=(e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:o=Dp(a),isInCreateStage:s}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:s?Hc.PAGE:Hc.FORM},{restApi:l,reqType:d}=Wg("navigateToStep",c),{content:u}=Yc(o),p=i.value.data[o].caseInfo.headers;return jo(Vs(`${l}`,{method:d,body:u,headers:{"if-match":p&&p.etag}},o)).pipe(ad((t=>({response:t.data,actionInPayload:e,headers:zc({...p,...t.headers})}))),pd("Error occurred during ajax call at navigateToStep Epic : ",o))},{RESOURCE_TYPES:UE}=F,kE=(e,t)=>{let n=0,r=[];return e.pipe(nd(FE),rd((e=>(({actionMgrID:n}=e.payload),ld(e.payload).pipe(od((e=>(fs(e.context),jE(e,{state$:t})))),od((async e=>{if(e&&_c(e.type))return r.push(el(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:o,context:s=Dp(o),isModalAction:i}=t;Gd.clearContextedCache(t.context);const c=Hp(o),l=Ec(o),d=Object.freeze({target:c,containerItemID:o,context:s,containerName:l}),u=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name,h=n?.uiResources?.root?.config?.context;u&&!u.pyViewName&&p&&"page"!==t.viewType&&(Bf.setIn(u,"pyViewName",p),Bf.setIn(u,"pyViewContext",h));const f=yu(n),g={acName:c,...d};await Jc(f,t,g);const m=Kc(f,{...d,headers:a});n?.nextAssignmentInfo||(m.caseViewMode=j.REVIEW_MODE),Uc(e,r),m.doDeleteCaseSummary=t.doDeleteCaseSummary,m.resourceType=UE.ASSIGNMENT,xc(m,f),wc(m.data,t);const y=f.data?.caseInfo?.stages,I=f.data?.caseInfo?.stageID;return fc({caseID:vc(f),isModalAction:i,stages:y,stageID:I}),$c(o)&&ul(m,r),r.push(Ng(pg,m)),ll(r),r})),ad((()=>(Nf(r),Mc(r,n),r=[],r))))))))},VE=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=Wg(qe,{ID:t});return jo(Vs(r,{method:a},n)).pipe(ad((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:zc(t.headers)}))),pd(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},BE=e=>{Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},GE=(e,t)=>{let n,r=0,a=[];return e.pipe(nd(ql),ad((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),od((e=>e.ignoreCaseDeletion?ld({actionInPayload:e}):VE(e))),od((async e=>{if(e&&_c(e.type)){const{payload:t}=e,n=el({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:o,isModalAction:s}=n,i=s?hp.MODAL:hp.PRIMARY,c=Pt(i,o);if(!s&&c){const e={acName:c,target:c,context:o},r=t.value.containers[c],{semanticURL:a}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await Jc({directUrlUpdation:!0,semanticURL:a},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:j.PRIMARY,isChild:!0},t={type:de,payload:{...e}};a.push(t)}const l={target:c,containerItemID:o,context:o,caseDeleted:!0};return a.push(Ng(Ig,l)),a})),ad((()=>(Nf(a),Mc(a,r)===j.PROMISE_VALUE.RESOLVE&&BE({caseType:n}),a=[],a))))};function WE(e,t){return Ha(t)?od(e,t,1):od(e,1)}const HE=(e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:o,reqType:s}=Wg("save",{assignmentID:n,actionID:r}),{content:i}=Yc(a),c=t.value.data[a]?.caseInfo?.headers;return jo(Vs(o,{method:s,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(ad((t=>({response:t.data,actionInPayload:e,headers:zc(t.headers)}))),pd(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))},qE=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let o=[];return ld(n.payload).pipe(od((e=>HE(e,r))),WE((e=>{if(e&&_c(e.type))return ld(e);const{containerItemID:t}=e&&e.actionInPayload,r=W(t),a=Hp(r),s=mp(a),i=xp(r)[0];let c=i?Pp(xp(r)[0]):r;if(!Lp(Hp(c))){const t=mp(i);t?.accessedOrder.forEach((n=>{e.actionInPayload.caseID===t.items[n].key&&(c=t.items[n].context)}))}const l=Pp(a);n.payload.canUpdateAvailableActions&&mu(e.response);if(c&&o.push(Ng(Qf,{context:c,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}})),s?.items?.[l]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},a=$l.getPropertiesToReplace(t);o.push(Ng(Qf,n,{propertiesToReplace:a}))}return o.push(Ng(pg,{context:t})),Uc(e,o),wE({...e.actionInPayload,RemoteSystemID:V.getRemoteHeaderByContext(e.actionInPayload.context)??void 0})})),od((async n=>{if(n&&_c(n.type)){const{payload:t}=n,r=el({...n,...t,actionMgrID:a});o.push(r);const s=e.action.payload.modalLoadingContainer;if(s){const e=s.context,{context_data:t}=Tf(e)||{};t?.isLoading&&qp(e)}return o}const{actionInPayload:r}=n,{context:s,containerName:i}=r,c={target:Pt(i,s),containerItemID:s,context:s};return t||o.push(Ng(Ig,c)),o})),ad((()=>{var e;return Nf(o),Mc(o,a),e={context:n.payload.context,assignmentID:n.payload.assignmentID},Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e),t||(o=[]),Jd.isDeferredActionInProgress(n.payload.context)&&Jd.handleDeferredActionCompletion(n.payload.context),o})))},zE=(e,t)=>{let n,r=0;return e.pipe(nd(zl),rd((e=>{const{saveOnly:a}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return qE({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},YE=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",Es.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",Es.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:KE}=j,{RESOURCE_TYPES:JE}=F,XE=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:o,openActionType:s,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,d=l?Ye:(e=>{const t=e.localActionType.toLowerCase();return t===KE.CASE_WIDE||t===KE.EXPRESS?Ke:ze})(e),u=Hc.FORM,{reqType:p}=Wg(d,{caseID:a,ID:r,actionID:n,viewType:u});let{restApi:h}=Wg(d,{caseID:a,ID:r,actionID:n,viewType:u});e.actionType=d===Ke?j.CASE:j.ASSIGNMENT,h&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${u}`:`${h}?viewType=${u}`);const f=i?.context??o;return jo(Vs(h,{method:p,headers:c},f)).pipe(ad((t=>({response:t.data,actionInPayload:e,headers:zc(t.headers,"",e.headers)}))),pd(`: Error occurred during ajax call at ${s} Epic : `,f))},QE=(e,t)=>{const{isProcessAction:n}=t,r=n?Ye:ze;e.openActionType=r;let a;if("modal"===Ic(r,e)){a=xp(e.contextName)[0]?xp(e.contextName)[0]:Hp(e.contextName);const n=a?Pp(a):e.contextName,r=Dp(n),o=Ic(e.openActionType,e),s=Pt(o,e.context),i=K(e.context,H(o,e.context));if(Nf(sg({target:s,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),Nf(hg({context:i})),e.modalLoadingContainer={target:s,context:i},!xp(e.contextName)[0])return XE(e,t);if(!e.continueExecution)return XE(e,t);if(!op(r))return XE(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return jo([Yl(e.saveActionPayload)]).pipe(od((e=>(e=>{let t,n=0;const r=[],a={value:bf()?.getState()};return ld(e).pipe(nd(zl),rd((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,e),ld([])}return qE({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),od((n=>{if(1===n.length&&_c(n[0].type)){const{continueExecution:n}=ol(a);if(!n)return nc.rejectActionByID(e.actionMgrID),dd.pipe(Uo((()=>ud()))).toPromise();if(n)return XE(e,t)}return XE(e,t)})),ad((e=>e)))}return XE(e,t)},ZE=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:o,openActionType:s,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=yu(e),d=Ic(s,r),u=c?.target??Pt(d,a);let p,h,f=!1;!jp(u)||Fp(u)&&!Cp(u,e.data.caseInfo.ID)?(h=H(d,a),Cc(d)&&(h=K(a,h)),p=h,f=!0):(p=Fp(u)?Sp(u,e.data.caseInfo.ID):Pp(u),h=Dp(p));const g={acName:u,target:u,containerName:d,context:h};await Jc(l,r,g),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let y;y=m?j.PERFORM_MODE:j.REVIEW_MODE;const I=Kc(l,{target:u,context:h,containerItemID:p,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:o,isMinimizable:!1,isInCreateStage:Cc(d),resourceType:JE.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});let E;if(m&&xc(I,l),Cc(d)&&delete I.doDeleteCaseSummary,r.openActionType===Je&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList),E=f?sg:r.isProcessAction?Cg:pg,I.data.context_data.isProcessAction=r.isProcessAction,t.push(Ng(E,I)),f||t.push(Ng(fg,I)),f){const a=xp(r.contextName),o=Sp(a,e.data.caseInfo.ID);if(o){const e={data:{caseInfo:{headers:n}},context:o};t.push(Ng(Qf,e))}}return p!==Pp(u)&&t.push(Ng(mg,{target:u,containerItemID:p})),$c(p)&&!c?.context&&ul(I,t),I.caseViewMode===j.REVIEW_MODE&&t.push(Ng(Ig,I)),t},eA="OPEN_LOCAL_ACTION",tA=(e,t)=>QE(e,t),nA=e=>{let t=0,n=[];return e.pipe(nd(eA),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>tA(e,{actionMgrID:t}))),od((async e=>{if(!e)return dd;if(_c(e.type)){const t=el(e);n.push(t);const{context_data:r}=Tf(e.payload.context)||{};return r?.isLoading&&n.push(Ng(fg,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return Bf.setIn(a,"data.caseInfo.activeActionID",o),Bf.setIn(a.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&Bf.setIn(a.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await ZE(a,n,{headers:r,actionInPayload:t}),YE(t),n})),ad((()=>(Nf(n),Mc(n,t),n=[],n))))},rA=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:o="",bulkContextType:s=""}=e,i=Je,{reqType:c,restApi:l}=Wg(i,{caseTypeID:a,actionID:t,bulkContextID:o,bulkContextType:s});return jo(Vs(l,{method:c},n)).pipe(ad((t=>({response:t.data,actionInPayload:e,headers:zc(t.headers)}))),pd(`: Error occurred during ajax call at ${r} Epic : `,n))},aA=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",Es.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",Es.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},oA="OPEN_BULK_ACTION",sA=e=>{let t=0,n=[];return e.pipe(nd(oA),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Je;const a=Ic(Je,e),o=Pt(a,n),{continueExecution:s}=ol(o);return s?rA(e):(nc.rejectActionByID(r),ud())})(e,{actionMgrID:t}))),od((async e=>{if(e&&_c(e.type)){const t=el(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return Bf.setIn(a,"data.caseInfo.activeActionID",o),await ZE(a,n,{headers:r,actionInPayload:t}),aA(t),n})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))};var iA=Array.isArray,cA=Object.getPrototypeOf,lA=Object.prototype,dA=Object.keys;function uA(e){if(1===e.length){var t=e[0];if(iA(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&cA(r)===lA){var n=dA(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var pA=Array.isArray;function hA(e){return ad((function(t){return function(e,t){return pA(t)?e.apply(void 0,ka([],Ua(t))):e(t)}(e,t)}))}function fA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return Ha(id(e))?e.pop():void 0}(e),r=uA(e),a=r.args,o=r.keys,s=new Eo((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,s=t,i=function(t){var i=!1;Oo(a[t]).subscribe($o(e,(function(e){i||(i=!0,s--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(s||e.next(o?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(o,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?s.pipe(hA(n)):s}const gA=e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:o}=Yc(n,{nonEmptyAndChangedData:!0});let s=5;try{const e=Gc.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===a))?.pyList.split(",").includes(t)&&(s=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/s,l=Xe,{reqType:d,restApi:u}=Wg(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)o.cases=i.slice(t,t+c),o.cases.length&&p.push(jo(Vs(u,{method:d,body:o},n)).pipe(ad((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:zc({...r})}})),pd("Error occurred during ajax call at submitbulkaction Epic : ",n)));return fA(p)},mA=e=>{Es.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},yA="SUBMIT_BULK_ACTION",IA=e=>{let t,n=0,r=[],a="";return e.pipe(nd(yA),rd((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,e),ld([])}return ld(e.payload).pipe(od((e=>(t=e,gA(t)))),od((e=>{let n=0,o=0;const s=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),o+=Number(t.failureCount),o&&t.results.forEach((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{s.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),a=`${n} record(s) updated`,mA({submitResponse:e}),t.target="HYBRID"===Oh.getRenderingMode()?Hp(i):`${j.APP.APP}/${hp.MODAL}`,r.push(Ng(Ig,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),o&&r.push(Ng(yg,{messages:[{type:"error",message:1===o?"1 record failed to update":`${o} records failed to update`,errorDetails:s,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),ad((()=>(nc.resolveActionByID(n,a),Nf(r),r=[],r))))})))},EA=e=>{const{actionID:t,context:n,cases:r}=e,{content:a}=Yc(n,{nonEmptyAndChangedData:!0});a.cases=r.map((e=>({ID:e})));const o=Xe,{reqType:s,restApi:i}=Wg(o,{actionID:t,runningMode:"async"});return jo(Vs(i,{method:s,body:a},n)).pipe(ad((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:zc({...r})}})),pd("Error occurred during ajax call at submitbulkaction Epic : ",n))},AA=e=>{Es.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},CA="SUBMIT_BULK_ACTION_ASYNC",SA=e=>{let t,n=0,r=[],a="";return e.pipe(nd(CA),rd((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,e),ld([])}return ld(e.payload).pipe(rd((e=>(t=e,EA(t)))),ad((e=>{const n=[],{containerItemID:o,context:s}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),a="Processing bulk actions, please refresh to check completion",AA({submitResponse:i}),t.target=`${j.APP.APP}/${hp.MODAL}`,r.push(Ng(Ig,{containerItemID:o,context:s,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(Ng(yg,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(s)||s,category:"HTTP",showHeader:!1})),r})),ad((()=>(nc.resolveActionByID(n,a),Nf(r),r=[],r))))})))},_A=(e,t)=>QE(e,t),bA=e=>{let t=0,n=[];return e.pipe(nd(Wl),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>(fs(e.context),_A(e,{actionMgrID:t,isProcessAction:!0})))),od((async e=>{if(e&&_c(e.type)){const t=el(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await ZE(a,n,{headers:r,actionInPayload:t}),n})),ad((()=>(pl(n),Mc(n,t),n=[],n))))},NA=e=>{let t=0,n=[];return e.pipe(nd(_e,we),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:o,currentCaseViewMode:s,isProcessAction:i,isInCreateStage:c}=e,l=s===j.PERFORM_MODE,d=n&&l;return i&&c?wE(e):t!==r||a||o||!d?t?.includes(j.MODAL)&&kc(ph(t))===j.REVIEW_MODE?wE(e):ld([]):wE(e)})),od((e=>(e&&_c(e.type)&&n.push(el(e)),n))),ad((()=>(Nf(n),Mc(n,t),n=[],n))))};var TA=new Hy(Vy),PA=TA;function OA(e,t,n){void 0===e&&(e=0),void 0===n&&(n=PA);var r=-1;return null!=t&&(sd(t)?n=t:r=t),new Eo((function(t){var a,o=(a=e)instanceof Date&&!isNaN(a)?+e-n.now():e;o<0&&(o=0);var s=0;return n.schedule((function(){t.closed||(t.next(s++),0<=r?this.schedule(void 0,r):t.complete())}),o)}))}function vA(e,t){return void 0===e&&(e=0),void 0===t&&(t=TA),e<0&&(e=0),OA(e,e,t)}function DA(e){return Ro((function(t,n){var r=!1,a=null,o=null,s=function(){if(null==o||o.unsubscribe(),o=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe($o(n,(function(t){null==o||o.unsubscribe(),r=!0,a=t,o=$o(n,s,no),Oo(e(t)).subscribe(o)}),(function(){s(),n.complete()}),void 0,(function(){a=o=null})))}))}const RA=(e,t,n,r,a)=>{if(a!==j.RESOURCE_STATUS.CREATE)return;Il.isStateMachineExist(e,t,n)||Il.setStateMachine(e,n,t,new si(n,t,e));Il.getStateMachine(e,t,n).insert({},"string"==typeof r?r:r+1,!0,{isDefault:!0})},$A=(e,t,n,r,a)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===r||"UPDATE"===r)&&(e.data.caseInfo.content[a][t][n]=t)},xA=e=>{const t=!e.isLocalAction&&e.editType===j.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},wA=e=>{let t=0,n=[],r="";return e.pipe(nd(ft),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>$I(e))),od((async e=>{if(e&&e.type===Ee)return n.push(el(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a,headers:o}=e,s=t.containerName,i=Pt(s,t.context);let c=nl(i,s,t.context);c=K(t.context,c);const{pageReference:l,targetProperty:d,index:u,subscriptFieldName:p,pageGroupName:h,actionType:f,isPageGroup:g}=t,m=l?.startsWith(F.OBJECT_INFO.OBJECT_INFO);let y=null;m?(y=L.transformCaseData(a),y.uiResources.root.config.context=`${l}${d}[${u}]`):y=a;const I=yu(y);I.key=t.ID,I.data?.caseInfo?(I.data.caseInfo.ID=t.ID,$A(I,u,p,f,h)):I.data?.objectInfo&&(I.data.objectInfo.ID=t.ID);const{interestPageActionID:E,editType:A,isLocalAction:C,actionID:S}=t,_={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:E,editType:A,isLocalAction:C,actionID:S};I.uiResources.context_data.modalView=_;const b=Tf(t.context)?.context_data?.caseInfo,N=`${t.pageReference}${t.targetProperty}`,T=ss(b,N,t.index);I.uiResources.context_data.caseInfo={...I.uiResources.context_data.caseInfo,content:Bf.mergeDeep(I.uiResources.context_data.caseInfo?.content,T?.content)};const P=qf.getProperty(j.CASE_INFO.REMOTESYSTEMID,"",t.context),O={acName:i,context:c};await Jc(I,t,O);const v={target:i,context:c,containerItemID:c,headers:o,index:u,subscriptFieldName:p,pageGroupName:h,isPageGroup:g};P&&(v.headers={...v.headers,RemoteSystemID:P});const D=Bf.deepClone(I.data?.caseInfo?.content);I.data?.caseInfo&&A===j.ACTION&&(R()(I.data,`${l}${d}`,new Array(u+1).fill({})),R()(I.data,`${l}${d}[${u}]`,vf(`${d}[${u}]`,l,t.context)));const $=Kc(I,v);I.data?.caseInfo&&(I.data.caseInfo.content=D);const x=Kc(I,v);$.resourceStatus=t.actionType,$.isMultiRecordData=!0,$.parentContext=t.context,$.heading=t.heading,$.data.caseInfo&&A===j.ACTION&&($.data.caseInfo={...$.data.caseInfo,...xA(t),isLocalAction:t.isLocalAction}),$.clearStateMachine=!1,x.skipValidation=!0;const w=tl(i,$);r=c,n.push(w),ll(n);const M=Ng(Qf,x);return{actionsOut:n,actionInPayload:t,mergeAction:M}})),ad((({actionInPayload:e,mergeAction:a})=>(bc(n)?nc.rejectActionByID(t):nc.resolveActionByID(t),e.skipPageInstructions||RA(r,e.pageReference,e.targetProperty,e.index,e.actionType),Nf(n),n=[],e.editType===j.ACTION&&(Il.registerForServerChanges(),Nf(a),Il.unRegisterForServerChanges()),n))))},MA=e=>{let t,n="",r=[];return e.pipe(nd(gt),rd((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,t),Jd.handleDeferredActionCompletion(e.payload.context),ld([])}return ld(e.payload).pipe(od((e=>(t=e,$I(t)))),od((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Ee){const{context:n,pageReference:r}=t,a={context:n},{response:o}=e,s=r?.startsWith(F.OBJECT_INFO.OBJECT_INFO);let i=null;s?(i=L.transformCaseData(o),i.uiResources.root.config.context=r):i=o;const c=yu(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const l=Kc(c,a);l.skipValidation=!0;const d=Ng(Qf,l);Il.registerForServerChangesSync(),Nf(d),Il.unRegisterForServerChanges()}return e})(e,t))),od((async e=>{if(e&&e.type===Ee){const t=el(e);return r.push(t),r}const{containerItemID:n,context:a,pageReference:o}=t;return((e,t,n,r)=>{fi(e).forEach((e=>{const a=Bf.convertClipboardPageToPageRefNotation(e.target);Il.isStateMachineExist(t,n,a)||Il.setStateMachine(t,a,n,new si(a,n,t));const o=Il.getStateMachine(t,n,a);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,r,{});break;case"update":o.update(e.content,e.listIndex??e.groupIndex,r,{});break;case"delete":e.listIndex?o.delete(e.listIndex,r):e.groupIndex?o.delete(e.groupIndex,r):o.deletePage();break;case"replace":o.replacePage(e.content);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"add":o.insert(e.content,e.groupIndex,r,{});break;case"delete all":o.deleteAll()}}))})(a,t.parentContext,o.startsWith(F.OBJECT_INFO.OBJECT_INFO_CONTENT)?j.getProperty(F.OBJECT_INFO.OBJECT_INFO_CONTENT):j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),!1),r.push(Ng(Ig,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),ad((()=>{if(bc(r))nc.rejectActionByID(n),Jd.handleDeferredActionCompletion(t.context);else{nc.resolveActionByID(n),Jd.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(qf.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=qf.getPropertyValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID),r,t.parentContext),n=qf.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),o=a.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");wu(e,n,t.parentContext,o,{})}else Vu(t.parentContext,j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),{})}return Nf(r),r=[],r})))})))},LA=e=>{const{caseID:t,headers:n,debugInfo:r,context:a}=e,o=Wg("getDescendants",{caseID:t}),{restApi:s}=o,{reqType:i}=o;return jo(Vs(s,{method:i,headers:{...n,...r&&{...$s.addDebugHeaders(r)}}},a)).pipe(ad((t=>({actionInPayload:e,response:t.data,headers:zc({...n,...t.headers})}))),pd("Error ocurred during ajax call at getDescendants Epic : ",a))},FA=e=>{let t=0,n=[];return e.pipe(nd(zd),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>LA(e))),od((async e=>{if(e&&_c(e.type))return n.push(el(e)),n;const{actionInPayload:t,response:r}=e,a={};Bf.setIn(a,"caseInfo.childCases",r?.childCases??[]);const o={data:a,context:t?.context};return n.push(Ng(Qf,o)),n})),ad((()=>(Nf(n),Mc(n,t),n=[],n))))},jA=e=>{let t,n="",r=[],a={};return e.pipe(nd(mt),rd((e=>{t=e.payload;const{isFormValid:o}=e.payload;return({actionMgrID:n}=e.payload),o?ld(e.payload).pipe(od((e=>(t=e,ld({})))),od((async()=>{const{containerItemID:e}=t,o=Tf(e),s=e,i=o?.dataInfo.content;delete i.classID;const c=W(s),l=xp(c).length,d=xp(c)[l-1]?Pp(xp(c)[l-1]):c,u=Hp(e),p=yp(u,e)||{},h=p?.referenceList?.replaceAll(".",""),f=p?.subscriptName,g=Tf(d),m={containerItemID:d,data:{...g,caseInfo:{content:{...i}}}};r.push(Ng(pg,m)),((e,t,n)=>{op(t)&&e.push(Ng(Ig,{containerItemID:n,skipReleaseLockRequest:!0}))})(r,s,e);const y=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:r,activeWorkArea:a,subscriptFieldName:o,actionMgrID:s,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[o],containerName:F.MODAL,pageReference:F.CASE_INFO.CASE_INFO_CONTENT,viewID:F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:F.RESOURCE_STATUS.CREATE,interestPage:`.${r}.${n[o]??""}`,targetProperty:`.${r??""}`,pageGroupName:r,context:a??"",subscriptFieldName:o};return{type:ft,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:g,subscriptData:i,pageGroupName:h,activeWorkArea:d,subscriptFieldName:f,actionMgrID:n,containerItemID:e});return r.push(y),a=i,r})),ad((()=>(nc.resolveActionByID(n,a),Nf(r),r=[],r)))):(((e,t)=>{const n={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};nc.rejectActionByID(e,!0,n),Jd.handleDeferredActionCompletion(t)})(n,e.payload.context),ld([]))})))},UA=[XI,oE,dE,nA,sA,IA,SA,bA,$E,kE,LE,NA,zE,GE,e=>e.pipe(nd(He),DA((()=>vA(100))),ad((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:o,skipReleaseLockRequest:s,isInCreateStage:i}=e.payload;return nc.resolveActionByID(t),Es.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:o,skipReleaseLockRequest:s,isInCreateStage:i}),[]}))),e=>e.pipe(nd(Me),DA((()=>vA(100))),ad((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,o=Pt(r,n);return nc.resolveActionByID(t),Nf(Ng(mg,{containerItemID:a,target:o,doDeleteCaseSummary:!1})),[]}))),wA,MA,FA,jA];function kA(){return Ro((function(e,t){e.subscribe($o(t,no))}))}const{RESOURCE_TYPES:VA}=F,BA=[e=>e.pipe(nd(te),ad((e=>e.payload)),od((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===hp.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=Pt(hp.PREVIEW,e.context),n=nl(t,hp.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);Nf(sg({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(V.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=V.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=Wg("loadView",t);return e.viewContext===VA.PAGE&&({restApi:r,reqType:a}=Wg(je,{page:e.viewName,pageClass:e.pageClass})),jo(Vs(r,{method:a,headers:n},e.context)).pipe(ad((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:zc(t.headers),rootView:Bf.getIn(r,j.ROOT)}})),pd(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),od((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=el(e),e?.payload?.context?.includes(hp.PREVIEW)){const n={...Tf(e.payload.context),caseInfo:{progress:!1,error:!0}},r=Pt(hp.PREVIEW,e.payload.context);t.actionsOut=Ng(pg,{key:n.key,target:r,containerName:hp.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete r?.data?.caseInfo?.assignments,delete r?.data?.caseInfo?.availableActions,delete r?.data?.caseInfo?.availableProcesses);const{containerItemID:o,containerName:s}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,a=t||ac.getTargetViewContainerName(je),o=r?.target??Pt(a,e.context);return{target:o,context:r?.context??(t===hp.PREVIEW&&n?e.context:nl(o,a,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let d={};d=yu(r),d.directUrlUpdation=!1,await Jc(d,n,l);const u={...n,target:i,context:c,containerItemID:o||c,headers:a},p=Kc(d,u);if(p.resourceType=VA.CASE,s&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=Hp(p?.context);((e,t,n,r,a)=>{e&&a===hp.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=Ng(pg,{...n,containerName:a})):e?(r.actionsOut=[],r.actionsOut.push(Ng(mg,{target:t,containerItemID:e}))):r.actionsOut=Ng(sg,{...n,containerName:a})})(Sp(e,p.key),e,p,t,s)}else p.preserveClientChanges=!0,t.actionsOut=[],s===hp.PREVIEW&&t.actionsOut.push({type:st,payload:{context:c}}),((e,t)=>{if(e.key){const n=Hp(e?.context);Sp(n,e.key)&&t.actionsOut.push(Ng(Qf,e))}else t.actionsOut.push(Ng(Qf,e))})(p,t)}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{Es.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),ad((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(nc.resolveActionByID(n,e),L.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(nd(ne),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{Es.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:a,className:o,skipSemanticUrl:s=!1,containerName:i=ac.getTargetViewContainerName(je)}=e,c=n&&{...$s.addDebugHeaders(n)},l=Pt(i,r);let d="",u={},p=!0;if(!s){if(d=Bg(je,{page:a,pageClass:o}),l&&d){const{activate:t,activateContainerActionPayload:n}=il(VA.PAGE,l,{semanticURL:d});if(t)return gl(n),ld({type:Re,activateContainerActionPayload:n,actionConfig:e})}if(Pp(l)&&({continueExecution:p,removeActionPayload:u}=ol(l)),!p)return nc.rejectActionByID(t),ud()}const{restApi:h,reqType:f}=Wg(je,{page:a,pageClass:o});return jo(Vs(h,{method:f,headers:c},r)).pipe(ad((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:d,semanticURL:d},actionConfig:e,headers:zc(t.headers),removeActionPayload:u,skipSemanticUrl:s}})),pd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),od((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Ee)return n.push(el(e)),t;let{type:r}=e;const{actionConfig:a,skipSemanticUrl:o}=e,s=a.containerName||ac.getTargetViewContainerName(ne),i=Pt(s,a.context);Es.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,r)=>{let a={},o=e;if(n.isTraditionalRemoteCase){a={...n};const e=Sp(r,a.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},o=Re)}return{remoteCasePayload:a,updatedType:o}})(r,e,a,i);if(r=l??r,a.isDeferLoaded){const{response:r,headers:s={}}=e,{isCreateDataObject:c,context:l}=a,d=yu(r,{isCreateDataObject:c});d.directUrlUpdation=!o;const u={acName:i,context:l};await Jc(d,a,u);const p=Kc(d,{containerItemID:l,target:i,headers:s,context:l});t.rootView=Bf.getIn(d,j.ROOT),n.push(Ng(Qf,p))}else if(r===Re){const{activateContainerActionPayload:{semanticURL:t,containerItemID:r}}=e,o={acName:i,context:Dp(r)};a.isTraditionalRemoteCase||await Jc({directUrlUpdation:!0,semanticURL:t},a,o,!0),n.push(Ng(mg,{target:i,containerItemID:r}))}else{const t=nl(i,s,a.context),{response:r,headers:l={},removeActionPayload:d}=e,u=yu(r,{isCreateDataObject:a.isCreateDataObject});u.directUrlUpdation=!o;const p={acName:i,context:t},h=kc(t);await Jc(u,a,p);const f={target:i,context:t,containerItemID:t,headers:l,debugInfo:a.debugInfo,currentCaseViewMode:h,referenceList:a?.referenceListStr,subscriptName:a?.subscriptName},g=Kc(u,f);g.resourceType=F.PAGE,a.isCreateDataObject&&(g.resourceType=F.RESOURCE_TYPES.DATA,g.resourceStatus=F.RESOURCE_STATUS.CREATE,delete g.data.caseInfo,g.referenceList=a.referenceListStr,g.subscriptName=a.subscriptName),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=F.CASE,n.key=$l.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:Tc($l.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(a,c,g),g.data??={},g.data.traditionalGadgetId=$l.getUniqueGadgetId();const m=tl(i,g);d.containerItemID&&rl(m)&&n.push(Ng(Ig,{containerItemID:d.containerItemID,target:i})),n.push(m),ll(n)}return Es.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),ad((({actionManagerID:e=0,rootView:t})=>{nc.resolveActionByID(e,t),Nf(n),n=[]})),kA())}],GA=(e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:s,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:l}=t,{restApi:d,reqType:u,body:p}=Wg(Ue,{pageName:r,dataContext:a,dataContextParameters:o}),h={};return h.RemoteSystemID=c,jo(Vs(d,{method:u,headers:h,body:p},n)).pipe(ad((t=>({response:{...t.data,key:s,semanticURL:s},actionConfig:e,headers:zc(t.headers),removeActionPayload:l,skipSemanticUrl:i}))),pd("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:WA}=F,HA=(e,t)=>{const n=Object.getOwnPropertyDescriptor(e,t);return Object.hasOwn(e,t)&&n&&!0===n.writable&&"string"==typeof e[t]},qA=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:o,reqType:s}=Wg("deleteDataObject",a);return jo(Vs(o,{method:s},n)).pipe(ad((t=>({response:t.data,actionInPayload:e}))),pd("Error occurred during ajax call at deleteDataObject Epic",n))},zA=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,a={data_view_ID:t},{restApi:o,reqType:s}=Wg("getDataObjectActions",a);return jo(Vs(o,{method:s,body:{dataViewParameters:n}},r)).pipe(ad((e=>({...e.data}))),pd("Error occurred during ajax call at GET data object actions : ",e.context))},YA=[e=>{let t,n=0,r=[];return e.pipe(nd(re),WE((e=>(({actionMgrID:n}=e.payload),ld(e.payload).pipe(od((e=>((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:o,skipSemanticUrl:s=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:d,RemoteSystemID:u}=e;for(let e=0,t=Object.keys(o);e<t.length;e+=1){const n=t[e];HA(o,n)&&(o[n]=decodeURIComponent(o[n]))}const p=Pt(d,n);let h="",f={},g=!1;for(let e=0,t=Object.keys(o);e<t.length;e+=1){const n=t[e],r=o[n];HA(o,n)&&(o[n]=Bf.containsEncodedPattern(r)?r:encodeURIComponent(r))}if(!s){h=Bg(Ue,{pageName:r,dataViewName:a},o);const{activate:n,activateContainerActionPayload:s}=il(WA.PAGE,p,{semanticURL:h});if(n)return ld({type:Re,activateContainerActionPayload:s,actionConfig:e});if(({continueExecution:g,removeActionPayload:f}=ol(p)),!g)return nc.rejectActionByID(t),ud()}return GA({context:n,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:h,skipSemanticUrl:s,containerName:d,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:u},{removeActionPayload:f})})(e,n))),od((async e=>{if(e&&e.type===Ee)return r.push(el(e)),r;const{type:n,actionConfig:a,headers:o,response:s,skipSemanticUrl:i}=e;t=Bf.getIn(s,j.ROOT);const{containerName:c,parentAction:l,resourceType:d}=a,u=Pt(c,a.context);let p;const h=kc(a?.context);if(a.isDeferLoaded){p=yu(s),p.directUrlUpdation=!i;const t={acName:u,context:a.context};await Jc(p,a,t);const n={target:u,headers:o,context:a.context,containerItemID:e.containerItemID},c=Kc(p,n);return r=Ng(Qf,c),r}if(n===Re){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,o={acName:u,context:Dp(n)};await Jc({directUrlUpdation:!0,semanticURL:t},a,o,!0),r.push(Ng(mg,{target:u,containerItemID:n,resourceType:WA.DATA}))}else if("DATA"===d&&l===ht){const{context:e}=a,t=s?.data,n={context:e,data:t};r.push(Ng(Qf,n))}else{const t=nl(u,c,a.context),{removeActionPayload:n}=e;p=yu(s),p.directUrlUpdation=!i;const l={acName:u,context:t};await Jc(p,a,l);const d=Kc(p,{target:u,context:t,containerItemID:t,headers:o,currentCaseViewMode:h});d.resourceType=WA.DATA;const f=tl(u,d);n.containerItemID&&rl(f)&&r.push(Ng(Ig,{containerItemID:n.containerItemID,target:u})),ll(r),r.push(f)}return r})),ad((()=>(nc.resolveActionByID(n,t),Nf(r),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(nd(ct),hd(100),rd((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(t,!0,e),ld([])}return ld(e.payload).pipe(od((e=>fd(e))),od((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=el({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:o}=r,s=o?hp.MODAL:hp.PRIMARY,i={target:Pt(s,a),containerItemID:a,context:a};return n.push(Ng(Ig,i)),n})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(nd(dt),hd(100),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>gd(e))),od((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=el({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,readOnly:i,actionName:c}=r,l=Pt(s,r.context),d=nl(l,s,r.context),u={acName:l,context:d};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=r.dataLookUp,e.dataContextParameters||=r.requestPayload}await Jc(a,r,u);const p=Kc(a,{target:l,context:d,containerItemID:d,headers:o});return p.resourceType=F.RESOURCE_TYPES.DATA,p.resourceStatus=F.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(r.requestPayload),n.push(Ng(sg,p)),n})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(nd(ut),hd(100),rd((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(t,!0,e),ld([])}return ld(e.payload).pipe(od((e=>md(e))),od((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=el({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:o}=r,s=o?hp.MODAL:hp.PRIMARY,i={target:Pt(s,a),containerItemID:a,context:a};return n.push(Ng(Ig,i)),n})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(nd(lt),hd(100),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>qA(e))),od((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=el({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))},e=>{let t=0,n=[];let r={};return e.pipe(nd(ye),hd(100),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>zA(e))),od((async e=>e&&e.type===Ee?(n.push(el(e)),n):(r=e,[]))),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t,r),Nf(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(nd(pt),hd(100),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>yd(e))),od((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=el({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,actionID:i,context:c,actionName:l}=r,d=Pt(s,r.context);let u=H(s,c);u=K(c,u);const p={target:d,context:u,containerItemID:u,headers:o,resourceType:F.RESOURCE_TYPES.DATA,resourceStatus:F.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=r.lookupDatapage,e.dataContextParameters||=r.dataViewParameters}const h={acName:d,context:c};await Jc(a,r,h);const f=Kc(a,p);return n.push(Ng(sg,f)),n})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(nd(ht),hd(100),rd((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const a=e.payload.context;if(!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(t,!0,e),ld([])}return ds({context:a,stateObj:Tf(a),clearContextMessages:!0}),ld(e.payload).pipe(od((e=>Id(e))),od((async e=>{if(e&&e.type===Ee){Bl(e,"dataObject");const{payload:r}=e,a=el({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,containerItemID:i,resourceType:c,key:l}=r,d=Pt(s,r.context),u={acName:d,context:r.context};await Jc(a,r,u);const p={key:l,target:d,resourceType:c,containerItemID:i,headers:o,context:r.context};return n=((e,t,n,r)=>{const{resourceType:a,key:o,containerItemID:s}=r,i=Kc(n,t);i.resourceType=a||F.RESOURCE_TYPES.DATA;const c=J(s);e.push(Ng(Ig,i));const l=vf(".dataContext","dataInfo",c),d=vf(".dataContextParameters","dataInfo",c),u={context:c,skipSemanticUrl:!0,resourceType:a,parentAction:ht,dataContext:l,dataContextParameters:d},p=l&&d&&Bg(Ue,{pageName:j.PY_DETAILS,dataViewName:l},d)||"";if(s?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...u}};e.push(t)}else if(a!==j.PAGE&&o===p&&s?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...u}};e.push(t)}return e})(n,p,a,{key:l,resourceType:c,containerItemID:i}),n})),ad((()=>(1===n.length&&_c(n[0].type)?nc.rejectActionByID(t):nc.resolveActionByID(t),Nf(n),n=[],n))))})))}];function KA(e,t){return void 0===t&&(t=TA),Ro((function(n,r){var a=null,o=null,s=null,i=function(){if(a){a.unsubscribe(),a=null;var e=o;o=null,r.next(e)}};function c(){var n=s+e,o=t.now();if(o<n)return a=this.schedule(void 0,n-o),void r.add(a);i()}n.subscribe($o(r,(function(n){o=n,s=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){o=a=null})))}))}const{RESOURCE_TYPES:{CASE:JA,DATA:XA,OBJECT:QA}}=F;let ZA=[],eC=!1,tC=!1;const nC={},rC=[e=>e.pipe(nd(Ie),KA(200),ad((e=>e.payload)),od((e=>{tC=!1,Es.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{tC=!0}));const t=As.getPreviewMode()&&$s.addDebugHeaders({debugId:Bf.generateUniqueID()});nC.dataContext=e.payload.dataViewName,nC.dataContextParameters=(e=>{if(!e)return e;const t={};for(let n=0,r=Object.keys(e);n<r.length;n+=1){const a=r[n];if(Object.hasOwn(e,a)){const n=e[a];t[a]=Bf.containsEncodedPattern(n)?decodeURIComponent(n):encodeURIComponent(n)}}return t})(e.payload.dataViewKeys);const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:o}=e;o&&(o.indexOf("viewType={viewType}")>0?o=o.replace("{viewType}","page"):o.indexOf('viewType=""')>0&&(o=o.replace('viewType=""','viewType="page"'))),eC=a===bt,eC&&L.setNeedsMapping(!0);const s=E()+o,i=e.options.context;let c;const l={},d=e?.payload?.caseClassName;if(V.isRemoteCase(d)){const{RemoteSystemID:e}=V.getRemoteCase(d);l.RemoteSystemID=e}if(Oh.isWSSPortal()&&(l[j.X_ORIGIN_CHANNEL]="WSS"),"POST"===r){c=e.payload,o.indexOf("viewType=")<0&&(o=`${o}?viewType=page`);let i;switch(dl(a)){case JA:case QA:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case XA:i=nC;break;default:i=c}return jo(Vs(s,{method:r,body:i,headers:{...l,...t}},n)).pipe(ad((t=>({response:{...t.data},payload:e,headers:zc(t.headers,"",l)}))),pd(": Error occurred during ajax call at historyEpic : ",e))}return jo(Vs(s,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(ad((n=>({response:n.data,payload:e,headers:{...zc(n.headers),...t}}))),ko((r=>{if(a===Qe){const n={messages:[{type:"error",message:r.response.data.errorDetails[0].localizedValue}],category:"PAGE"};ec.setComponentCache("assignments-launchAssignment-Error",n);const a=Sh(Ah()),o=Th.getEndPointInfo(a.split("/assignments")[0]),s=E()+o.routeEndpoint;return e={...e,routeKey:Be,resetSemanticURL:!0},jo(Vs(s,{method:o.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(ad((n=>({response:n.data,payload:e,headers:{...zc(n.headers),...t}}))))}return ld(Tg(": Error occurred during ajax call at historyEpic : ",r,n))})))})),od((async e=>{if(tC)return ZA;if(Es.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{tC=!0})),e&&e.type===Ee)return el(e);const{headers:t={},response:n,payload:r}=e,a=yu(n,{[F.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),o=r.options.acName,s=Lp(o)&&jp(o)?Pp(o):e.payload.options.context,i=s;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:o,context:s,containerItemID:i,headers:t,debugInfo:{debugId:t[j.COREHEADER_APP_DEBUG_ID]}};let l=r?.payload?.pageClass;const d=r?.payload?.page,u=eC?bt:Be,p=eC?r.payload.objectID:r.payload.workID,h=eC?"{objectID}":"{workID}";let f=eC?`objects/${p}`:"";r?.payload?.caseName&&p&&(f=Bg(u,{caseName:e.payload.payload.caseName}),f=f?.replace(h,p)||"",l=r?.payload?.caseClassName),(r?.routeKey===Qe||r?.resetSemanticURL)&&((e,t)=>{const n=vc(t);let r=Bg(Be,{caseClassName:Pc(t)},{id:n});r=r?.replace("{workID}",String(Tc(n))).replace("{id}",String(Tc(n))),Xg({directUrlUpdation:!0,semanticURL:r,options:{}})})(0,a),((e,t)=>{const n=t?.data?.caseInfo;e===Qe&&n?.caseTypeID&&n?.content&&Lc(n.caseTypeID)&&(n.content.coexistenceAction=Ge)})(r?.routeKey,a),Es.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:d,pageClass:l});const g=Bf.getIn(a,j.COMPONENTS);g&&await Zi(g),Fi(a,r.options.actionConfig,!0),Es.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:d,pageClass:l});let m=Kc(a,c);return m=((e,t,n)=>{if(e===Wc.CASE||e===Wc.OBJECT||e===Wc.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=Qc(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===Wc.ASSIGNMENT?(n.caseViewMode=j.PERFORM_MODE,n.resourceType=Wc.CASE):n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(dl(e.payload.routeKey),{...n.data,semanticURL:f,caseViewMode:j.REVIEW_MODE},m),m.data.traditionalGadgetId=$l.getUniqueGadgetId(),ZA.push(tl(o,m)),((e,t)=>{let n=ec.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(Ng(yg,n)),ec.resetComponentCache("assignments-launchAssignment-Error"))})(s,ZA),ll(ZA),ZA})),ad((()=>(tC||Nf(ZA),ZA=[],eC=!1,tC=!1,ZA))),pd("Error occurred"))],aC=[e=>{let t=0;return e.pipe(nd(tt),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),ad((()=>{const e=bf()?.getState(),n=OI();return h()(e,n)&&t>0?nc.resolveActionByID(t,{}):nc.rejectActionByID(t),[]})),kA())}],oC=[e=>{let t=0,n=[];return e.pipe(nd(ae),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a,o="";n||(o=Bg(ke,{insightID:"{insightID}"}),o=o.replace("{insightID}",r),a=Th.getEndPointInfo(o));const{restApi:s,reqType:i}=Wg(ke,{...a?.payload||[],insightID:r});return jo(Vs(s,{method:i},t)).pipe(ad((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:o,semanticURL:o},actionConfig:e,skipSemanticUrl:n}})),pd(": Error occurred during ajax call at showPage Epic : ",e.context))})),od((async e=>{if(e&&e.type===Ee)return n.push(el(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=ac.getTargetViewContainerName(ne),o=Pt(a,t.context),s=nl(o,a,t.context),{response:i}=e,c=yu(i);c.directUrlUpdation=!r;const l={acName:o,context:s},d=!r,u=r;await Jc(c,t,l,d,u);const p=Kc(c,{target:o,context:s,containerItemID:s});p.resourceType=F.PAGE;const h=tl(o,p);return n.push(h),ll(n),n})),ad((()=>{nc.resolveActionByID(t),Nf(n),n=[]})),kA())}],sC=[e=>{let t=0,n=[];return e.pipe(nd(oe),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=Bg(Ve,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:o,reqType:s}=Wg(Ve,{dashboardID:r});return jo(Vs(o,{method:s},t)).pipe(ad((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),pd(": Error occurred during ajax call at showPage Epic : ",e.context))})),od((async e=>{if(e&&e.type===Ee)return n.push(el(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=ac.getTargetViewContainerName(ne),o=Pt(a,t.context),s=nl(o,a,t.context),{response:i}=e,c=yu(i);c.directUrlUpdation=!r;const l={acName:o,context:s},d=!r,u=r;await Jc(c,t,l,d,u);const p=Kc(c,{target:o,context:s,containerItemID:s});p.resourceType=F.PAGE;const h=tl(o,p);return n.push(h)})),ad((()=>{nc.resolveActionByID(t),Nf(n),n=[]})),kA())}],iC=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||ac.getTargetViewContainerName(_t)},cC=e=>"pzCreateDetails"===e?.uiResources?.root?.config?.name||!1,lC=(e,t)=>{const n=cC(e),{skipBrowserSemanticUrlUpdate:r=!1}=t;Bf.setIn(e,["directUrlUpdation"],!n&&!r)},dC=e=>e.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,uC=(e,t)=>{let n;return n=!e.renderInline&&!Oh.getDefaultCasePage()&&cC(t),n},pC=(e,t)=>{const{class:n,context:r,viewType:a=Hc.PAGE}=e,{removeActionPayload:o}=t,s=e?.pageName?e?.pageName:Oh.getDefaultCasePage();return jo(Ui.createCase(n,{...e,pageName:s,viewType:a,context:r})).pipe(ad((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),pd("Error occurred during ajax call at createObject Epic : ",r))},hC="CREATE_OBJECT",fC=e=>{let t,n=0,r=[],a={};return e.pipe(nd(hC),hd(100),rd((e=>{if(({actionMgrID:n}=e.payload),$l.isExternalObject(e.payload.class)&&!Ol(e.payload.context)){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,e),ld([])}return ld(e.payload).pipe(od((e=>{const{context:r}=e;t=e.class;const a=iC(e),o=Pt(a,r),{continueExecution:s,removeActionPayload:i}=qI(o);return s?pC(e,{removeActionPayload:i}):(nc.rejectActionByID(n),ud())})),od((async e=>{if(e&&e.type===Ee)return e.payload.context=((e,t)=>$l.isExternalObject(e)&&t?t:sh())(t,e.payload.context),r.push(el(e)),r;const{actionInPayload:o,response:s,headers:i,removeActionPayload:c}=e,l=uC(o,s);Bf.setIn(s.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const d=iC({...o,isInCreateStage:l}),u=Pt(d,o.context),p=nl(u,d,o.context);if(((e,t)=>{$l.isExternalObject(e.class)&&(e.containerItemID=e.context,fE(t,e))})(o,r),((e,t,n)=>!Cc(e)&&Lp(t)&&!$l.isExternalObject(n))(d,u,t)){const{continueExecution:e}=ol(u);if(!e)return nc.rejectActionByID(n),ud()}if(((e,t)=>!e&&!t)(o?.openCaseViewAfterCreate??!0,l)){const{businessID:e,caseType:t,resolvedURL:n}=hc(s);return a={id:e,label:t,href:n},KI(a),JI({caseId:e,caseType:t}),r}(e=>{$l.isExternalObject(e.class)&&KI({content:xh().getLocaleValue("Successfully submitted!","Assignment")})})(o);const h=yu(s),f=String(Tc(lc(h)));let g=Bg(_t,{caseClassName:cc(h)});g=g.replace(/{.+?}/,f),h.semanticURL=g,ec.setComponentCache(f,$s.addDebugHeaders(o.debugInfo)),lC(h,o);const m={acName:u,context:p};await Jc(h,o,m);const y={target:u,context:p,headers:i,semanticURL:g,caseViewMode:dC(h),containerItemID:p,isInCreateStage:l,isMinimizable:l,assignmentContext:Bf.getIn(h,WI),nextAssignmentInfo:Bf.getIn(h,GI),resourceType:F.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};dc(y,h);const I=Kc(h,y),E=tl(u,I);return((e,t,n)=>{if(rl(e)){const{removeActionPayload:e,target:r}=t;Rc(n,{removeActionPayload:e,target:r})}})(E,{removeActionPayload:c,target:u},r),r.push(E),ll(r),r})),ad((()=>(pl(r),Mc(r,n),(e=>{$l.isExternalObject(e)&&L.setNeedsMapping(!1)})(t),a={},r=[],r))))})))},gC=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:o,additionalHeaders:s={},jsActionQueryParams:i}=e,{state$:c}=t,l=Hc.PAGE,d="executeObjectWideAction",u={assignmentID:n,actionID:r,viewType:l,objectID:a};let{restApi:p}=Wg(d,u);const{reqType:h}=Wg(d,u);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=Vl(i,p),e.viewType=l;const{content:f}=Yc(o,{isObjectWideAction:!0}),g=c.value.data[o]?.objectInfo?.headers||{},{etag:m}=g,y={"if-match":m,...s};return jo(Vs(p,{method:h,body:f,headers:y},o)).pipe(ad((t=>{const{data:n,headers:r}=t;return L.analyseResponse(t.data),{actionInPayload:e,response:n,headers:zc({...y,...r})}})),pd("Error occurred during ajax call at executeObjectWideAction Epic : ",o))},mC=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:lc(e)}},{RESOURCE_TYPES:yC}=F,IC=(e,t)=>{let n=0,r=[],a={},o="";return e.pipe(nd(St),rd((e=>{if(({actionMgrID:n}=e.payload),o=e.payload.context,ds({context:o,stateObj:Tf(o),clearContextMessages:!0}),!Ol(o)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return nc.rejectActionByID(n,!0,t),Jd.handleDeferredActionCompletion(e.payload.context),ld([])}return ld(e.payload).pipe(od((e=>{hE(r,e);const n={...e};return gC(n,{state$:t})})),od((async e=>{if(e?.type===Ee){const t=el(e);return r.push(t),r}Gd.clearContextedCache(o);const{headers:t,actionInPayload:s,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:d}=s,u=Hp(c);s.target=u,Bf.setIn(i.data,j.OBJECT_INFO_IS_LOCAL_ACTION,!1),vE({submitResponse:i});let p=yu(i,{[F.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const h=cc(p),f=W(s.context),g=xp(f)[0]?Pp(xp(f)[0]):f,m=(e=>{const t=uc(e);return wl(t)&&Ml(Oh.getOperatorIdentifier(),t)})(p),y=d&&!m;!l||d||EE(s.context,g)||(p=cl(p,Tf(c)));const I=Kc(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&Bf.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),Bf.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(I.data,s),I.caseClassName=h,I.resourceType=yC.ASSIGNMENT,I.headers=t;const E=lc(p);dc(I,p);const A=Bg(_t,{caseClassName:h}).replace(/{.+?}/,String(Tc(E)));p.semanticURL=A,I.semanticURL=A,await NE(s,I,!1,E,p,r,e,i,!0),y&&(a=AE(s),JI({caseId:s.caseID,caseType:s.caseTypeID,assignmentId:s.assignmentID})),((e,t)=>{const n=cc(e?.response),r=uc(e?.response),{caseTypeID:a}=r,o=Oh.getFeatureMap();(o?.deferUpdateCaseSummaryView??!Object.hasOwn(o,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&nf(j.CASESUMMARY_VIEW_NAME,a)&&jc(t,e?.actionInPayload,{caseClassName:n})})(e,r),Jd.handleDeferredActionCompletion(o),TE(I,s,g);const C=mC(p,s);return gc({...C,containerItemID:c}),yE(r,{transientItemID:c,target:u,isModalAction:l}),r})),ad((()=>{const e=r.find((e=>e.type===Ee));return e?(Jd.handleDeferredActionCompletion(o),PE(e),nc.rejectActionByID(n)):nc.resolveActionByID(n,a),pl(r),L.setNeedsMapping(!1),r=[],a={},r})))})))},EC=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:o,viewType:s}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Oh.getDefaultCasePage(),l=Wg(bt,{objectID:n,params:{pageName:c}});let{restApi:d}=l;const{reqType:u}=l;return"none"===s&&(d=`${d?.split("viewType")[0]}viewType=none`),jo(Vs(d,{method:u,headers:{...r,...o&&{...$s.addDebugHeaders(o)}}},a)).pipe(ad((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:zc({...r,...t.headers}),removeActionPayload:i}))),pd("Error occurred during ajax call at getObject Epic : ",a))},AC="GET_OBJECT",{RESOURCE_TYPES:CC}=F,SC=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:r,type:a,response:o,removeActionPayload:s,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:d}=n,u=Ic(bt,n),p=Pt(u,c);if(Sc(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:o,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:i}}=t,c=Ic(bt,a),l=Pt(c,o),d=Dp(r);await Jc({directUrlUpdation:!s,semanticURL:n},a,{acName:l,containerName:c,target:l,context:d}),e.push(Ng(mg,{containerItemID:r,target:l,context:d,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:n});else{const e=nl(p,u,c,{buildNew:!0}),r=yu(o),a=(e=>{const t=lc(e),n=cc(e);let r=Bg(bt,{objectClassName:n});return r=r?.replace("{objectID}",String(Tc(t))),r})(r);r.semanticURL=a,r.directUrlUpdation=!l;const h={acName:p,context:e};await Jc(r,n,h);const f=Kc(r,{target:p,context:e,containerItemID:e,semanticURL:a,headers:i,debugInfo:d});f.caseViewMode=j.REVIEW_MODE,f.resourceType=CC.OBJECT,dc(f,r);const g=tl(p,f);s.containerItemID&&rl(g)&&t.push(Ng(Ig,{containerItemID:s.containerItemID,target:p})),t.push(g)}ll(t);const h=n.insKey;mc({caseKey:h,actionInContext:c})},_C="OPEN_OBJECT_ACTION",bC=e=>{const{actionID:t,caseID:n,context:r,openActionType:a,modalLoadingContainer:o}=e,s=Hc.FORM,i=Wg(Nt,{objectID:n,actionID:t,viewType:s}),{reqType:c}=i;let{restApi:l}=i;e.actionType=j.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${s}`:`${l}?viewType=${s}`);const d=o?.context??r;return jo(Vs(l,{method:c,headers:{}},d)).pipe(ad((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:zc(t.headers)}))),pd(`: Error occurred during ajax call at ${a} Epic : `,d))},NC=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:o,openActionType:s,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=yu(e,{info:F.OBJECT_INFO.OBJECT_INFO}),d=Ic(s,r),u=c?.target??Pt(d,a),{context:p,containerItemID:h,isNewContainerItem:f}=((e,t,n,r)=>{let a,o,s=!1;const i=Fp(e);return!jp(e)||i&&!Cp(e,r)?(o=H(t,n),Cc(t)&&(o=K(n,o)),a=o,s=!0):(a=i?Sp(e,r):Pp(e),o=Dp(a)),{context:o,containerItemID:a,isNewContainerItem:s}})(u,d,a,e.data.objectInfo.ID),g={acName:u,target:u,containerName:d,context:p};await Jc(l,r,g);const m=l.uiResources?.root,y=(e=>e?j.PERFORM_MODE:j.REVIEW_MODE)(m),I=Kc(l,{target:u,context:p,containerItemID:h,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:o,isMinimizable:!1,isInCreateStage:Cc(d),resourceType:F.RESOURCE_TYPES.OBJECT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,actionType:r.actionType});if(m&&dc(I,l),Cc(d)&&delete I.doDeleteCaseSummary,t.push(Ng((e=>e?sg:pg)(f),I)),f||t.push(Ng(fg,I)),f){const a=xp(r.contextName),o=Sp(a,e.data.objectInfo.ID);if(o){const e={data:{objectInfo:{headers:n}},context:o};t.push(Ng(Qf,e))}}return h!==Pp(u)&&t.push(Ng(mg,{target:u,containerItemID:h})),pc(h)&&!c?.context&&ul(I,t),t},TC=e=>{e.openActionType=Nt;if(Ic(e.openActionType,e)===j.MODAL){const t=Ic(e.openActionType,e),n=Pt(t,e.context),r=K(e.context,H(t,e.context));Nf(sg({target:n,context:r,containerItemID:r,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),Nf(hg({context:r})),e.modalLoadingContainer={target:n,context:r},bC(e)}return bC(e)},PC=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||ac.getTargetViewContainerName(Tt)},OC=(e,t)=>{const{class:n,context:r,viewType:a=Hc.PAGE}=e,{removeActionPayload:o}=t,s=e?.pageName?e?.pageName:Oh.getDefaultCasePage();return jo(Ui.createCase(n,{...e,pageName:s,viewType:a,context:r,retrieveActionViewForNewObject:!0})).pipe(ad((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),pd("Error occurred during ajax call at createObject Epic : ",r))},vC="CREATE_EXTERNAL_OBJECT",DC=e=>{const{workId:t,context:n,isExternalCase:r}=e,a=r?qe:"deleteWork",{restApi:o,reqType:s}=Wg(a,{ID:t});return jo(Vs(o,{method:s},n)).pipe(ad((t=>({response:t.data,actionInPayload:e,headers:zc(t.headers)}))),pd("Error occurred during ajax call at deleteWork Epic : ",n))},RC=e=>{Es.publish(j.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},$C=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return DI.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...UI,...UA,...BA,...rC,...YA,...kI,...aC,...oC,...sC,...[fC,e=>{let t=0,n=[];return e.pipe(nd(AC),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{context:n,isChild:r,viewType:a}=e,o=Ic(bt,e),s=Pt(o,n);let i,c=!0;if("none"!==a){const e=ol(s);c=e.continueExecution,i=e.removeActionPayload}if(!c)return nc.rejectActionByID(t),ud();const{activate:l,activateContainerActionPayload:d}=il(CC.OBJECT,s,e);return l&&!r&&"none"!==a?ld({type:Re,activateContainerActionPayload:d,actionInPayload:e}):EC(e,{removeActionPayload:i})})),od((async e=>{if(e&&_c(e.type))return n.push(el(e)),n;if("none"===e?.actionInPayload?.viewType){const t=Tf(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==j.PERFORM_MODE){const t=yu(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:st,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),n.push(Ng(Qf,r));const a=Hp(e?.actionInPayload?.context),o=Ec(e?.actionInPayload?.context),s=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(pc(e?.actionInPayload?.context)){const t=Kc(e?.response,{...s});ul({...t,isArrayDeepMerge:!0},n)}}}else await SC(e,n);return n})),ad((()=>(Nf(n),Mc(n,t),n=[],n))))},IC,e=>{let t=0,n=[];return e.pipe(nd(_C),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>TC(e))),od((async e=>{if(_c(e.type)){const t=el(e);n.push(t);const r=Tf(e.payload.context);return r?.context_data?.isLoading&&n.push(Ng(fg,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return Bf.setIn(a,"data.objectInfo.activeActionID",o),Bf.setIn(a.data,j.getProperty(j.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&Bf.setIn(a.data,j.getProperty(j.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await NC(a,n,{headers:r,actionInPayload:t}),YE(t),n})),ad((()=>(Nf(n),Mc(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(nd(vC),hd(100),ad((e=>(({actionMgrID:t}=e.payload),e.payload))),od((e=>{const{context:n}=e,r=PC(e),a=Pt(r,n),{continueExecution:o,removeActionPayload:s}=qI(a);return o?OC(e,{removeActionPayload:s}):(nc.rejectActionByID(t),ud())})),od((async e=>{if(e&&e.type===Ee)return e.payload.context=sh(),n.push(el(e)),n;const{actionInPayload:r,response:a,headers:o,removeActionPayload:s}=e,i=uC(r,a);Bf.setIn(a.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const c=PC({...r,isInCreateStage:i}),l=Pt(c,r.context),d=nl(l,c,r.context);if(!Cc(c)&&Lp(l)){const{continueExecution:e}=ol(l);if(!e)return nc.rejectActionByID(t),ud()}const u=yu(a);let p=Bg(Tt,{caseClassName:cc(u)});p=p.replace(/{.+?}/,String(Tc(lc(u)))),u.semanticURL=p,lC(u,r);const h={acName:l,context:d};await Jc(u,r,h);const f={target:l,context:d,headers:o,semanticURL:p,caseViewMode:dC(u),containerItemID:d,isInCreateStage:i,isMinimizable:i,assignmentContext:Bf.getIn(u,WI),nextAssignmentInfo:Bf.getIn(u,GI),resourceType:F.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};dc(f,u);const g=Kc(u,f),m=tl(l,g);return rl(m)&&Rc(n,{removeActionPayload:s,target:l}),n.push(m),ll(n),n})),ad((()=>(pl(n),Mc(n,t),n=[],n))))},e=>{let t,n=0,r=[];return e.pipe(nd(Kl),ad((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),od((e=>e.ignoreWorkDeletion?ld({actionInPayload:e}):DC(e))),od((async e=>{if(e&&_c(e.type)){const{payload:t}=e,a=el({...e,...t,actionMgrID:n});return r.push(a),r}const{actionInPayload:t}=e,{context:a}=t;return KI({content:xh().getLocaleValue("Deleted successfully!","Messages")}),a?.includes(j.PREVIEW)&&r.push(Ng(og,Bp({context:j.APP.APP,name:j.PREVIEW}))),a?.includes(j.PRIMARY)&&window?.history?.back(),r})),ad((()=>(Nf(r),Mc(r,n)===j.PROMISE_VALUE.RESOLVE&&RC({caseTypeID:t}),r=[],r))))}]),xC=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,context:o,transientItemID:s}=r;"HTTP"!==a&&[Se,$e,_e,we,Ne,De].includes(n)&&(Cl(o||s),rs.removeContextTreeNode(o||s)),e(t)},wC={},MC=e=>{const t=Bf.getIn(wC,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=Bf.getIn(wC,[r,t],[]),o=a&&a.length>0&&a.indexOf(e);if(o>-1&&a.splice(o,1),!a||a&&0===a.length){Bf.deleteIn(wC,[r,t]);const e=Bf.getIn(wC,[r]);e&&0===Object.keys(e).length&&Bf.deleteIn(wC,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),Bf.deleteIn(wC,[j.CONTEXT,e]);const r=Bf.getIn(wC,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&Bf.deleteIn(wC,[j.CONTEXT]),n.length>0&&Nf(Og({dataPagesToBeRemoved:n}))},LC=(e={},t)=>{Object.keys(e).forEach((n=>{const r=Bf.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=Bf.getIn(wC,[j.CONTEXT,n]);if(Bf.getIn(wC,[e])){const r=Bf.getIn(wC,[e,t],[]);Bf.setIn(wC,[e,t],[...new Set([...r,n])])}else Bf.setIn(wC,[e,t],[n]);r?Bf.setIn(wC,[j.CONTEXT,n],[...new Set([...r,t])]):Bf.setIn(wC,[j.CONTEXT,n],[t])})(n,e,t)}))}))},FC=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:r=[]}={},type:a}=e;if(((e,t)=>{t&&t.length>0&&(e===we||e===_e)&&t.forEach((e=>{MC(e)}))})(a,r),a===Se||a===ge||a===rt){const e=a===rt?t:t.shared;LC(e,n)}else a===we?(MC(n),LC(t.shared,n)):a===_e&&MC(n)})),e(t)},jC=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:o,context:s,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:d}=F;if(r===_e){const{resourceType:t,key:n,context:r}=Bf.getIn(e.getState(),["containers",a,"items",o])||{},s={resourceType:t,key:n,context:r,containerItemID:o};Es.publish(d.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,s),a===`${F.APP.APP}/${j.PRIMARY}`&&l===j.CONTAINER_TYPE.MULTIPLE&&Es.publish(d.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===we||r===_e)&&i.forEach((e=>{qd.cleanCaches(e)})),r!==we&&r!==_e||qd.cleanCaches(s),t(n)},UC=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null,clearStateMachine:a=!0}={},type:o}=t;n&&(o===Se||o===$e||o===we||o===_e)&&a&&(gi(n),hi(n)),r&&o===Oe&&(gi(r),hi(r)),e(t)},kC=function(e){void 0===e&&(e={});var t,n=new(0,qy.constructor)(qy.schedulerActionCtor),r=new Yy,a=function(a){t=a;var o=new Yy,s=new Yy,i=o.asObservable().pipe(wo(n)),c=new Xy(s.pipe(wo(n)),t.getState());return r.pipe(ad((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),od((function(e){return jo(e).pipe(Mo(n),wo(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return s.next(t.getState()),o.next(n),r}}};return a.run=function(e){r.next(e)},a}(),VC=e=>{if(null!==bf())return void Uf();const t=[lp.propertyChangeMiddleware,xC,FC,UC,kC,jC],n=wy({reducer:vI(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(Qy).concat(Qy)});kC.run($C),_f(n)},BC={publishConstellationLoadedEvent:()=>{Es.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const GC=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Sp(t,e)};vu({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Sp(t,e)};vu({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=vu({meta:{type:"PreviewViewContainer",config:{name:j.PREVIEW}},options:{context:j.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:j.PRIMARY,context:j.APP.APP}),Np(j.APP.APP,j.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:j.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){vu({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=lh(t,e);return yl.isStateModified(n)}getEventUtils(){return BC}getBroadcastUtils(){return BI}isTraditionalUICase(e){return Lc(e)}};const WC=class{static openCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?Oh.setDefaultCasePage(n.pageName):(Oh.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?Oh.disableAssignmentHeader(n.disableAssignmentHeader):Oh.disableAssignmentHeader(!1),au.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?Oh.setDefaultCasePage(n.pageName):(Oh.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?Oh.disableAssignmentHeader(n.disableAssignmentHeader):Oh.disableAssignmentHeader(!1),au.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=F.APP.APP,t={}){return t.renderInline=!0,t.pageName?Oh.setDefaultCasePage(t.pageName):(Oh.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?Oh.disableAssignmentHeader(t.disableAssignmentHeader):Oh.disableAssignmentHeader(!1),au.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?Oh.setDefaultCasePage(n.pageName):(Oh.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?Oh.disableAssignmentHeader(n.disableAssignmentHeader):Oh.disableAssignmentHeader(!1),au.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=F.APP.APP,r={}){const a=ne;r?.defaultCasePage?Oh.setDefaultCasePage(r.defaultCasePage):Oh.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?Oh.disableAssignmentHeader(r.disableAssignmentHeader):Oh.disableAssignmentHeader(!1);const o={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:nc.getNextActionMgrId(),context:n},{promise:s}=nc.actionManagerPromise(a,o.actionMgrID);return Nf({type:a,payload:{...o}}),s}static getCurrentContextAPI(e,t=F.APP.APP){return vu({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const HC=new class{createC11nEnv=e=>vu(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>ln;getStateManager=()=>d;getActionCreators=()=>u;getStreamObservable=()=>o;getActionProcessor=()=>Yf;getActionHandler=()=>zf;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...Bf.getIn(e,j.ROOT),options:n};VC(e),Fi(e,n,!0);const a=this.createC11nEnv({meta:r,isRoot:!0});Es.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:r,uiResources:a={}}=e,{root:o}=a,s=Bf.getIn(a,j.CONTEXT_DATA),i=yu(e);await Jc(i,{},{},!1,!0);const c={...r,[j.CONTEXT_DATA]:s};zp(o,t,c,n)};fetchEndPointResource=(e,t,n)=>{Vs(e,{method:"GET"},j.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await Zi(n);const r=this.createC11nEnv({meta:e,isRoot:!0});bf()||VC({}),Es.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{Ji.initServer(e,t,n)};loadView=async(e,t,n=[])=>{y();const r=yu(e),a=Bf.getIn(r,j.VIEWS),o=Bf.getIn(r,j.NAVIGATIONS),s=Bf.getIn(r,j.COMPONENTS)||[];s.push(...n);const i=Bf.getIn(r,j.STATIC_SERVER_URL),c=Bf.getIn(r,j.APPLICATION_DATA);a&&Qh(a),o&&Zh(o),(e=>{e&&(jg=e.pyLabel)})(c),i&&Ji.initServer(i),await Zi(s,i),this.renderApp(r,t)};initAppShell=(e,t,n)=>{rm(e),ac.buildActionTargetMap(t),y(n)};initRoutingTable=(e,t)=>{rm(e,!0),y(t)};setAppAlias=e=>{Ji.setAppAlias(e)};getHomeRestApi=e=>{const t=E(),{restApi:n}=Gg("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(tm()&&!t){const t=Eh(),r=Th.processUrl(t,!0),a=Th._getMatchedRouteInRoutingTable(r)||"",o=Th.getRoutingInfo(),s=Th.processUrl(t,!1).split("/"),i=s[s.length-1];let{caseID:c}=o&&o.routes[a].payload;c=c.replace("{workID}",i).replace("{id}",i),n=Th.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=Th.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,a,o)=>{const{config:s}=t||{},i=s?.name;if(bf()||VC({}),o){const e=`${j.APP.ROOT}/${i}`;rh(e),nh().deleteContainerItem(e)}(nh().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&Uf(),Nf(Qf({data:{},context:j.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${i}`}}),l=c.getPConnect(),d=`${l.getContextName()}/${l.getContainerName()}`;Pp(d)||"noPortal"===s?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const u=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await Zi(u),Es.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:a})};loadViewByName=(e,t,n,r)=>{let a=this.getViewRestApi(e,n);a===E()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{nm(e)};checkIfSemanticURL=()=>tm();onPCoreReady=e=>{Es.subscribe(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{Es.subscribe(F.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Ti.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{C(e)};setFetchDefaultHeaders=e=>{qs(e)};setFetchAuthInfo=e=>{zs(e)};getCaseApi=()=>au;getMashupApi=()=>WC;enableAppRouting=e=>{kg(e)};initStore=()=>VC({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=vu({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}};const qC=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer||null,this.contextPath=e.contextPath,this.messagingService=e.messagingService||null,this.reAuthUrl=e.reAuthUrl||null}};const zC=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new qC(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1}},YC="@P .viewConfig";let KC=0;const JC=new class{async init(e){const t=new zC(e),n={...t.environmentInfo,renderingMode:t.renderingMode};kg(t.enableRouting),VC({}),Oh.setTheme(t.theme),Oh.setCookieComplianceMethod(t.cookieComplianceMethod),Oh.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Ti.updateFieldDefaults(t.fieldDefaults),Ti.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),$s.setDefaultHeaders(t.additionalHeaders),this.#I(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),Ji.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),C(t.serviceConfig.googleMapKey),Ji.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),Oh.setEnvironmentInfo(n),Oh.setLocale(t.locale||navigator.language||"en-US"),xh().setTimezone(t.timezone),V.setRemoteCaseMapping(t.remoteCaseMapping),Dd.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),ec.init(),t.initBroadcast&&GC.getBroadcastUtils().init(),await Dh()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=vu({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};importReactRoot=async()=>{const e=[];return HC.getComponentsRegistry().getComponent("ReactRoot")?.modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.setAttribute("async",t),a.onload=n(),a.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(a)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,a)=>{const o=new URLSearchParams(t);let s=!1;"true"===n&&(s=!0);let i=null,c=null,l=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1]),t.length>1&&"assignments"===t[2]&&t[3]&&(l=t[3])}else s=!1;let d=r;i&&(d=`${d}/${i}`),c&&(d=`${d}/${c}`),l&&(d=`${d}/assignments/${l}`),s&&(o.has("noPortal")||o.append("noPortal","true"),c&&a&&o.append("view",a));const u=o.toString();return d+=u?`?${u}`:"",d};initCoreConfig=async e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:a,noPortal:o,noHistory:s,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:d=!0,dynamicSemanticUrl:u=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:f}=e,{appAlias:g,contextPath:m}=n;let y=window.location.origin;const I={};if(void 0!==l&&(y=l),m&&(y=`${y}${m}`),g&&"LAUNCHPAD"!==h&&(y=`${y}/${g}`),e.restServerConfig=y,!0===u){const e=this.buildSemanticUrl(r,a,o,y,i);!s&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==d&&(I.dynamicLoadComponents=!1);let E=null;if(g){const e=g.indexOf("/app/");E=e>=0?g.substring(e+1):g}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===Oh.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),f?.cspNonce&&(window.__webpack_nonce__=f.cspNonce),await this.init(e)};launchViewByName=(e,t,n,r,a,o,s,i)=>{KC+=1;const c=i||`mashup${KC}`,l={type:"RootContainer",config:{viewConfig:YC,renderingMode:"view",name:c}};HC.loadRootComponent(e,l,a,o,s).then((()=>HC.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,a,o,s)=>{KC+=1;const i="hybrid"===s?`hybrid_${KC}`:s;KC+=1;const c=i||`mashup${KC}`,l={type:"RootContainer",config:{viewConfig:YC,renderingMode:"portal",name:c}};s===j.HYBRID&&Kd.setRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME,c),Kd.setRuntimeParams(r),HC.loadRootComponent(e,l,n,a,o).then((()=>HC.updateStoreWithUiRoot(t,c,!1)))};launchPortal=async(e,t,n=`portal${KC+=1}`,r=[])=>{const a={type:"RootContainer",config:{viewConfig:YC,renderingMode:"portal",skeleton:"LoadingComponent",name:n}},o=[...r,a.config.skeleton];Oh.isPortalLoaded=!0;try{return await HC.loadRootComponent(e,a,o),HC.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0)=>{const r={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}HC.loadRootComponent(e,r,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&n(754)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:a,ccLibs:o,isAlternateDesignSystemEnabled:s,alternateDesignSystemName:i}=e;await this.initCoreConfig(e);const c=async()=>{await this.importReactRoot();const e=Oh.environmentInfoObject?.pyC11nDXCBDevURL;return e&&await Ji.importCustomComponentMap(""),r&&!e&&await Ji.importCustomComponentMap(r),Oh.environmentInfoObject?.pyInfinityStaticService&&o&&o.length>0&&await Promise.all(o.map((e=>Ji.importCustomComponentMap(e)))),"true"===s&&"other"!==i&&await this.importDesignSystemComponentMap(n,a,i),t&&t(),!0};return new Promise(((e,t)=>{(async()=>{try{const t=HC.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await c()):Es.subscribe("component-map-loaded",(async()=>{e(await c())}))}catch(e){t(e)}})()}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&(PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess"),PCore.getPubSubUtils().subscribe("fetchFailure",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchFailure"))};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")};#I(e,t,n){rm(e),ac.buildActionTargetMap(t),y(n)}},XC={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Wg("createViewRuleByID");return Vs(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Wg("getViewRuleByID",{ID:e});return Vs(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=Wg("updateViewRuleByID",{ID:e});return Vs(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Wg("deleteViewRuleByID",{ID:e});return Vs(n,{method:r},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:r,reqType:a}=Wg("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Vs(r,{method:a,body:{calculations:{fields:n}}}).then((e=>e.data))}},QC={"Content-Type":"application/json"},ZC={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Vi("addCaseFollower",{body:a,queryPayload:r,headers:QC},n)},deleteCaseFollower:(e,t,n)=>Vi("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Vi("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},eS={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Vi("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Vi("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Vi("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},tS="operatorDetails",nS={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Wg(tS,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Vi(tS,{queryPayload:t})}return t?Vi("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Vi(tS,{body:{dataViewParameters:{ID:e}}})}},rS="postCustomFeedMessages",aS={"Content-Type":"application/json"};const oS=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,o,s)=>{const i=o.getLocalizationService();s||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";s&&(l=o.getValue("pulse.pageLastEntry"));const d={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<a.length;e+=1)a[e].cancel();const u=Wi();return a.push(u),Vi("getFeedMessages",{queryPayload:d,cancelTokenSource:u},o.getContextName()).then((async t=>{if(200===t.status&&t.data){a.pop();const n=[],c={};let l=!1,d=[];if(t?.data){if(d=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),l||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(l=!0)}))}if(l&&await Iu({uiResources:t.data.uiResources}),!r&&(r=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)}));const t=r.find((e=>"All"===e.id));t&&(t.on=n)}}}if(s&&o.getValue("pulse.messageIDs")){let r=o.getValue("pulse.messageIDs"),a=o.getValue("pulse.messages");r=[...r,...n],a={...a,...c},Object.values(a).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),o.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:d,pulseContext:e}})}else o.updateState({pulse:{messages:c,messageIDs:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:d,pulseContext:e}});const u=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:u}}return o.reportError(`getFeeds call failed ${t.status}`,t.data),""})).catch((e=>{Hi(e)||o.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n,r=[],a=!1,o=[])=>{const s={message:t,context:e,parentMessageId:a?e:"",attachments:r,pyRecipients:o.length?o:void 0},i=0===o.length?{body:JSON.stringify(s),headers:aS}:{body:JSON.stringify(s),queryPayload:{type:"PegaSocial-Post-Private"},headers:aS};return Vi(o.length?rS:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const o=t?.data;if(a){o.parentMessageID=e;const{pxResults:t,caseMentions:s}=this.buildMessageObject(o,a,n,r.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),s}const{messages:s,messageIDs:i,caseMentions:c}=this.buildMessageObject(o,a,n,r.length>0);return n.updateState({pulse:{messages:s,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>Vi(rS,{body:t,queryPayload:{type:e},headers:aS},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const r=e.data.data,a={ID:r.ID,pzInsKey:r.ID,classID:r.classID,pyPostType:r.pyPostType,postedByUser:r.postedByUser,pyIsDeleteEnabled:r.pyIsDeleteEnabled,pyMessageViewReference:r.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:r.pyCommentContext,pyPostedOn:r.postedTime,pyFeedTitle:r.postedByUser.name,pyIconReference:r.postedByUser.ID},...r.PostMessage};Eu(r.messageViewReference,n,t.context)||await Iu({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[a.ID]:a,...n.getValue("pulse.messages")},messageIDs:[a.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:r,isReply:a=!1,recipients:o=[]})=>{const s=JSON.stringify({message:n,...o.length&&{pyRecipients:o}});return Vi("editFeedMessage",{queryPayload:{messageID:e},body:s,headers:aS},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),o}const{messages:o,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:o}}),s}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},o=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(o)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...a},e=n}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const s=n.getValue("pulse.messageIDs");if(s){const e=s.includes(a.ID)?{...o[a.ID],...a}:a,t={...o,[a.ID]:e};return{messages:t,messageIDs:s.includes(a.ID)?s:[a.ID,...s],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,pConnectObj:a})=>{const o=t?"unlikeFeedMessages":"likeFeedMessages",s=JSON.stringify({ContextClass:e});Vi(o,{body:s,queryPayload:{pulseContext:e},headers:aS},a.getContextName()).then((o=>{if(200===o.status)if(r){const r=a.getValue(`pulse.messages.${n}`),o=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const a=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=a-1,r=!1):(e=a+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));a.updateState({pulse:{messages:{[n]:{pxResults:o}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},o=r.pyLikes?r.pyLikes.pxLikeCount:0;let s=0,i=!1;t?(s=o-1,i=!1):(s=o+1,i=!0),r.pyLikes={pxLikeCount:s,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${o.status}`,o)})).catch((e=>{a.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n);Vi("deleteFeedMessage",{queryPayload:{messageID:a}},r.getContextName()).then((a=>{if(200===a.status)if(t){const t=r.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...r.getValue("pulse.messages")};delete a[e],r.updateState({pulse:{messageIDs:n,messages:a}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Vi("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:o=5}=e,s={pulseContext:n,searchFor:r,mentionsType:a,listSize:o};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Wi();return this.mentionsTagsCancelTokenSource.push(i),Vi("getMentionSuggestions",{queryPayload:s,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Hi(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Vi("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t)=>Vi("getViewRuleByMessageType",{queryPayload:{type:e}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,a={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const o=Wi();return this.mentionsTagsCancelTokenSource.push(o),Vi("getTagSuggestions",{queryPayload:a,cancelTokenSource:o},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Hi(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},sS={getTaggedCases:(e,t)=>Vi("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Vi("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Vi("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Vi("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>$d.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},iS=(e,t)=>{ah(t.getContextName(),e.etag),oh(t.getContextName(),e.etag)},cS={getParticipants:(e,t)=>Vi("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Vi("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Vi("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Vi("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r,a)=>{const o={caseID:e},s={...n,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Vi("createParticipant",{body:s,queryPayload:o,headers:i},r.getContextName()).then((t=>{iS(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=vl(a||r.getContextName());r.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},updateParticipant:async(e,t,n,r,a)=>{const o={caseID:e,participantID:t},s={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Vi("updateParticipant",{body:n,queryPayload:o,headers:s},r.getContextName()).then((t=>{iS(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=vl(a||r.getContextName());r.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Vi("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((t=>{iS(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function lS(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const dS="create",uS="update",pS="delete";function hS(e,t,n,r){const a=of(t);if(a){switch(e){case dS:case uS:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case pS:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const fS={},gS=async e=>{const t=of(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=lS(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Wg("getUIListPersonalizations",{listID:e});return Vs(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:lS(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},mS=async(e,t,n)=>{const{restApi:r,reqType:a}=Wg("createListPersonalization",{listID:e});return hS(dS,e,t,n),Vs(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return fS[t]=n,e}))},yS=async(e,t,n)=>{const r=fS[t]||t;hS(uS,e,t,n);const{restApi:a,reqType:o}=Wg("updateListPersonalization",{listID:e,personalizationID:r})||{};return Vs(a,{method:o,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},IS=async(e,t)=>{const n=fS[t]||t;hS(pS,e,t);const{restApi:r,reqType:a}=Wg("deleteListPersonalization",{listID:e,personalizationID:n});return Vs(r,{method:a,body:{}}).then((e=>(fS[t]&&delete fS[t],e)))};const ES=function(e){return e?{createPersonalization:mS.bind(null,e),updatePersonalization:yS.bind(null,e),deletePersonalization:IS.bind(null,e),fetchPersonalizations:gS.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},AS="getDataObjects",CS="getInsightByID",SS=["LocalList","RemoteList","PromptList","DataPage"];let _S=null;const bS={},NS=e=>Cd.getAppCacheKey(`PrimaryFields-${e}`);function TS(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const PS={getDataObjects:function(){const e=Cd.getAppCacheKey(AS);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(e)}`));const{restApi:t,reqType:n}=Wg(AS,{}),r=Vs(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(_S)return _S;const t=Cd.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Wg("getDataPages",{datapageRequestType:"explorable"});return _S=Vs(n,{method:r,datapageRequestType:"explorable"}),_S.then((e=>{_S=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),_S},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=af(e);if(t&&t.classID){let e=cf(t.classID);const n=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(n&&!Bf.isEmpty(n)){const r=n.reduce(((e,n)=>{const r=Xh(n,t.classID);return e[n]=r,e}),{});e={...e,...r}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&SS.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:TS(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Gd.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=Cd.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Wg("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=Vs(n,{method:r,body:{dataViewParameters:e}});return a.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=af(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=Cd.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(r)}`));const a=Cd.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return a.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),a},getPrimaryFieldsForDataSource:function(e="",t=""){const n=Cd.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(n)}`));const r=Cd.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:a,classesToFetch:o,isTopLevelClassPresent:s,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let a=!1;const o=[],s=[];return e&&s.push(e),t&&t.length>0&&s.push(...t),s.forEach((t=>{const s=NS(t);window.sessionStorage.getItem(s)||(bS[t]?r.push(bS[t]):(n.push(t),t===e?a=!0:o.push(t)))})),{allClasses:s,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:a,joinedClassesToFetch:o}}(e,n);return o.length&&a.push((async(e,t,n,r)=>{const a=Cd.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=NS(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete bS[e]}))}));return e.forEach((e=>{bS[e]=a})),a})(o,s?e:void 0,s?t:void 0,i.length>0?i:void 0)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const n=NS(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(`${window.sessionStorage.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=Wg("getInsightIDs");return Vs(e,{method:t})},getInsightByID:function(e){const t=sf(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=Wg(CS,n);return Vs(r,{method:a})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=Wg(CS,t);return Vs(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=Wg("createInsight");return Vs(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=Wg("updateInsight",n);let o;return"UpdateDateTime"in t&&(o=t.UpdateDateTime),Vs(r,{method:a,body:JSON.stringify(t),headers:{"if-match":o,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Wg("deleteInsight",t);return Vs(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Wg("exportToExcel");return Vs(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=Wg("exportToCSV");return Vs(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=Wg("scheduleInsight",n);return Vs(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:o}=Wg("updateScheduledInsight",r);return Vs(a,{method:o,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=Wg("deleteScheduledInsight",n);return Vs(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=Wg("translateStrings");return Vs(t,{method:n,body:JSON.stringify(e)})}};const OS=new class{addRoutes=e=>{return t=e,void Th.addRoutes(t);var t}};const vS=class{static registerModule(e,t,n){n[e]=()=>t}};const DS=class{static getCaseEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)};const RS=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},$S={setTokens:e=>{zs({tokenInfo:e}),qs(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Es.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>_s(),getAuthInstance:e=>Ss.init(e),setAuthorizationHeader:e=>{qs({Authorization:e}),setTimeout((()=>Es.publish("updateSession",{updateStatus:"success"})),0)}};const xS=new class{getDebouncedSubject(e){return(new Yy).pipe(KA(e))}};Mi.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,a=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${a}(\\x2e${a})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t="Enter a valid email address"),t})),Mi.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),Mi.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),Mi.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";Promise.resolve().then(n.bind(n,57)).then((({parsePhoneNumberFromString:t})=>{Mi.register("phone",(n=>{let r=null;n&&!/^\+?\d+$/.test(n)&&(r=e);const a=n?.startsWith("+");if(n&&a){const a=t(n);a&&a.isPossible()&&n===a.number||(r=e)}return r}))}))}),j.PRIORITY.TRIVIAL);const wS=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};Mi.register("datetime",(e=>wS("DateTime",e))),Mi.register("date",(e=>wS("Date",e))),Mi.register("time",(e=>wS("Time",e)));const MS=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};Mi.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=MS(e.pxResults):Array.isArray(e)?t=MS(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const LS="createConversation",FS="sendMessage",jS="getConversations",US="getMessages",kS=(e,t,n,r,a,o,s)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=Wi();return s.push(i),Vi(e,{queryPayload:jS===e?{assistantID:t,contextID:n,pageSize:r,pageIndex:a}:{agentID:t,contextID:n,pageSize:r,pageIndex:a},cancelTokenSource:i},o).then((e=>(s.pop(),e)))},VS=(e,t,n,r,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const o=Wi();return a.push(o),Vi(e,{queryPayload:US===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},r).then((e=>(a.pop(),e)))},BS=(e,t,n,r,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const o=Wi();return a.push(o),Vi(e,{body:JSON.stringify({contextID:t,executeStarterQuestion:!1}),cancelTokenSource:o,queryPayload:e===LS?{assistantID:n}:{agentID:n}},r).then((e=>(a.pop(),e)))},GS=(e,t,n,r,a,o,s)=>{const i={...r&&{request:r},...o&&o?.length>0&&{attachments:o},...s&&{capabilities:{stream:{isEnabled:!0}}}};return Vi(e,{body:JSON.stringify(i),queryPayload:e===FS?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},...s&&{headers:{Accept:"text/event-stream"},adapter:"fetch",responseType:"stream"}},a)},WS={createConversation:(e,t,n,r=[])=>BS(LS,e,t,n,r),sendMessage:(e,t,n,r,a)=>GS(FS,e,t,n,r,void 0,a?.enableStreaming),createConversationForAgent:(e,t,n,r=[])=>BS("createConversationForAgent",e,t,n,r),sendMessageForAgent:(e,t,n,r,a,o)=>GS("sendMessageForAgent",e,t,n,r,a,o?.enableStreaming),likeAgentMessage:(e,t,n,r)=>Vi("likeAgentMessage",{queryPayload:{agentID:e,conversationID:t,messageID:n}},r),unLikeAgentMessage:(e,t,n,r,a="")=>{const o={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:a})};return Vi("dislikeAgentMessage",o,r)},getConversations:(e,t,n,r,a,o=[])=>kS(jS,e,t,n,r,a,o),getConversationsForAgent:(e,t,n,r,a,o=[])=>kS("getConversationsForAgent",e,t,n,r,a,o),getMessages:(e,t,n,r=[])=>VS(US,e,t,n,r),getMessagesForAgent:(e,t,n,r=[])=>VS("getMessagesForAgent",e,t,n,r)};const HS=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=Oh.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class qS{static behaviorOverrides={};getPersonalizationUtils=ES;constructor(){qS.behaviorOverrides={}}getPCoreVersion=()=>"25.1.1";onPCoreReady=e=>HC.onPCoreReady(e);onPCoreCleanup=e=>HC.onPCoreCleanup(e);getComponentsRegistry=()=>HC.getComponentsRegistry();checkIfSemanticURL=()=>HC.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(tm()){const e=Th.processUrl(Eh(),!0);return!!Th._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>OS;getViewResources=()=>i;configureForBrowserBookmark=e=>HC.configureForBrowserBookmark(e);getStore=()=>bf();resetStore=()=>Uf();getMessageManager=()=>ms;getCoexistenceManager=()=>GC;getStoreValue=(e,t,n)=>vf(e,t,n);getContainerUtils=()=>c;getAnnotationUtils=()=>Xl;getFieldUtils=()=>Xs;getFieldDefaultUtils=()=>Ti;getAssetLoader=()=>Ji;getAttachmentUtils=()=>xi;getViewRuleApi=()=>XC;getFeedUtils=()=>oS;getTagUtils=()=>sS;getGenAIAssistantUtils=()=>WS;getStakeholderUtils=()=>cS;getUserApi=()=>nS;getCaseFollowerApi=()=>ZC;getCaseUtils=()=>$l;getStateUtils=()=>Gc;getRelatedCasesApi=()=>eS;getDataApi=()=>Gd;getDataApiUtils=()=>Cd;getAnalyticsUtils=()=>PS;getLocaleUtils=e=>{const t=e??Oh.getLocale()??"en-US";return Kh(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{qS.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{qS.behaviorOverrides[e]=t};getBehaviorOverrides=()=>qS.behaviorOverrides;getBehaviorOverride=e=>qS.behaviorOverrides[e];getAsynchronousUtils=()=>xS;createPConnect=e=>vu(e);getPubSubUtils=()=>Es;registerComponentCreator=e=>{Du(e)};getConstants=()=>Object.freeze(F);getResolvedConstantValue=e=>j.getProperty(e);getEvents=()=>DS;getRestClient=()=>s;getMashupApi=()=>WC;getEnvironmentInfo=()=>Oh;getRuntimeParamsAPI=()=>Kd;getSemanticUrlUtils=()=>sc;getRemoteCaseUtils=()=>V;getNavigationUtils=()=>ec;registerModule=(e,t)=>vS.registerModule(e,t,this);getErrorHandler=()=>RS;getFormUtils=()=>yl;getMessagingServiceManager=()=>Dd;getMetadataUtils=()=>l;getDataPageUtils=()=>$d;getDataTypeUtils=()=>Jl;getCascadeManager=()=>Af;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>$S;getDebugger=()=>As;getDeferLoadManager=()=>Ed;getExpressionEngine=()=>r;getActionsSequencer=()=>Jd;getRefreshManager=()=>Hd;getInitialiser=()=>JC;getBootstrapUtils=()=>HC;getContextTreeManager=()=>rs;getAccessPrivilege=()=>HS.getInstance();getObjectTransformer=()=>L;getAllStateMachines=(e,t,n)=>t&&n?Il.getAllStateMachines(e,t,n):Il.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>!1;getQualifiedName=(e,t)=>e;getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform")}const zS=new qS;globalThis.PCore=zS})()})();
|
|
1
|
+
(()=>{var e={631:(e,t,n)=>{var r="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=l||d||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var a=e.length,o=n+(r?1:-1);for(;r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}(e,g,n);var r=n-1,a=e.length;for(;++r<a;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,a=e?e.length:0;++r<a;)if(n(t,e[r]))return!0;return!1}function f(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function g(e){return e!=e}function m(e,t){return e.has(t)}var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=u["__core-js_shared__"],_=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",S=E.toString,b=A.hasOwnProperty,N=A.toString,T=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=u.Symbol,O=A.propertyIsEnumerable,v=I.splice,D=P?P.isConcatSpreadable:void 0,R=Math.max,$=G(u,"Map"),x=G(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new L;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function U(e,t,n,r){var a,o=-1,s=p,i=!0,c=e.length,l=[],d=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,(a=n,function(e){return a(e)}))),r?(s=h,i=!1):t.length>=200&&(s=m,i=!1,t=new F(t));e:for(;++o<c;){var u=e[o],f=n?n(u):u;if(u=r||0!==u?u:0,i&&f==f){for(var g=d;g--;)if(t[g]===f)continue e;l.push(u)}else s(t,f,r)||l.push(u)}return l}function k(e,t,n,r,a){var o=-1,s=e.length;for(n||(n=W),a||(a=[]);++o<s;){var i=e[o];t>0&&n(i)?t>1?k(i,t-1,n,r,a):f(a,i):r||(a[a.length]=i)}return a}function V(e){if(!Q(e)||(t=e,_&&_ in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:c;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return V(n)?n:void 0}function W(e){return Y(e)||function(e){return J(e)&&b.call(e,"callee")&&(!O.call(e,"callee")||N.call(e)==o)}(e)||!!(D&&e&&e[D])}w.prototype.clear=function(){this.__data__=x?x(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:b.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():v.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return j(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new($||M),string:new w}},L.prototype.delete=function(e){return B(this,e).delete(e)},L.prototype.get=function(e){return B(this,e).get(e)},L.prototype.has=function(e){return B(this,e).has(e)},L.prototype.set=function(e,t){return B(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return J(e)?U(e,k(t,1,J,!0)):[]},q=R(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=R(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var a=Array(q+1);++t<q;)a[t]=e[t];return a[q]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(H,this,a)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}(e.length)&&!X(e)}function J(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function X(e){var t=Q(e)?N.call(e):"";return t==s||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},188:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",s="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,d=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=f||g||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=m["__core-js_shared__"],_=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",S=E.toString,b=A.hasOwnProperty,N=A.toString,T=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,O=I.splice,v=k(m,"Map"),D=k(Object,"create"),R=P?P.prototype:void 0,$=R?R.toString:void 0;function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:V(n);for(var r=0,a=t.length;null!=e&&r<a;)e=e[B(t[r++])];return r&&r==a?e:void 0}function j(e){if(!H(e)||(t=e,_&&_ in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==o||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function U(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}x.prototype.clear=function(){this.__data__=D?D(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:b.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},w.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return L(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(v||w),string:new x}},M.prototype.delete=function(e){return U(this,e).delete(e)},M.prototype.get=function(e){return U(this,e).get(e)},M.prototype.has=function(e){return U(this,e).has(e)},M.prototype.set=function(e,t){return U(this,e).set(e,t),this};var V=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(G.Cache||M),n}G.Cache=M;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},928:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o=9007199254740991,s="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=y||I||Function("return this")();var A,C=Array.prototype,_=Function.prototype,S=Object.prototype,b=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",T=_.toString,P=S.hasOwnProperty,O=S.toString,v=RegExp("^"+T.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=E.Symbol,R=S.propertyIsEnumerable,$=C.splice,x=W(E,"Map"),w=W(Object,"create"),M=D?D.prototype:void 0,L=M?M.toString:void 0;function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function V(e,t){return null!=e&&P.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:g;return n.test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return u.test(e)||!d.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var a,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(a=null!=e&&n(e,l)))break;e=e[l]}return a||!!(c=e?e.length:0)&&X(c)&&function(e,t){return t=null==t?o:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&X(e.length)&&!J(e)}(e)}(e)&&P.call(e,"callee")&&(!R.call(e,"callee")||O.call(e)==s)}(e))}F.prototype.clear=function(){this.__data__=w?w(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:P.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():$.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new F,map:new(x||j),string:new F}},U.prototype.delete=function(e){return G(this,e).delete(e)},U.prototype.get=function(e){return G(this,e).get(e)},U.prototype.has=function(e){return G(this,e).has(e)},U.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,a){n.push(r?a.replace(f,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(Y.Cache||U),n}Y.Cache=U;var K=Array.isArray;function J(e){var t=Q(e)?O.call(e):"";return t==i||t==c}function X(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&O.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,V)}},529:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",d="[object WeakMap]",u="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,g=h||f||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,I=y&&y.exports===m;var E,A,C,_=Function.prototype,S=Object.prototype,b=g["__core-js_shared__"],N=(E=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",T=_.toString,P=S.hasOwnProperty,O=S.toString,v=RegExp("^"+T.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=I?g.Buffer:void 0,R=S.propertyIsEnumerable,$=D?D.isBuffer:void 0,x=(A=Object.keys,C=Object,function(e){return A(C(e))}),w=q(g,"DataView"),M=q(g,"Map"),L=q(g,"Promise"),F=q(g,"Set"),j=q(g,"WeakMap"),U=!R.call({valueOf:1},"valueOf"),k=Y(w),V=Y(M),B=Y(L),G=Y(F),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return O.call(e)};function Y(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&X(e)}(e)&&P.call(e,"callee")&&(!R.call(e,"callee")||O.call(e)==a)}(w&&z(new w(new ArrayBuffer(1)))!=u||M&&z(new M)!=i||L&&z(L.resolve())!=c||F&&z(new F)!=l||j&&z(new j)!=d)&&(z=function(e){var t=O.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return u;case V:return i;case B:return c;case G:return l;case W:return d}return t});var J=Array.isArray;function X(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=$||function(){return!1};function Z(e){var t=ee(e)?O.call(e):"";return t==o||t==s}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(X(e)&&(J(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(U||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}(e))return!x(e).length;for(var n in e)if(P.call(e,n))return!1;return!0}},216:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",d="[object Boolean]",u="[object Date]",p="[object Error]",h="[object Function]",f="[object GeneratorFunction]",g="[object Map]",m="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",C="[object RegExp]",_="[object Set]",S="[object String]",b="[object Symbol]",N="[object Undefined]",T="[object WeakMap]",P="[object ArrayBuffer]",O="[object DataView]",v=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[i]=R[c]=R[P]=R[d]=R[O]=R[u]=R[p]=R[h]=R[g]=R[m]=R[I]=R[C]=R[_]=R[S]=R[T]=!1;var $="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,x="object"==typeof self&&self&&self.Object===Object&&self,w=$||x||Function("return this")(),M=t&&!t.nodeType&&t,L=M&&e&&!e.nodeType&&e,F=L&&L.exports===M,j=F&&$.process,U=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=U&&U.isTypedArray;function V(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,J=w["__core-js_shared__"],X=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?w.Buffer:void 0,re=w.Symbol,ae=w.Uint8Array,oe=K.propertyIsEnumerable,se=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,de=(H=Object.keys,q=Object,function(e){return H(q(e))}),ue=Ue(w,"DataView"),pe=Ue(w,"Map"),he=Ue(w,"Promise"),fe=Ue(w,"Set"),ge=Ue(w,"WeakMap"),me=Ue(Object,"create"),ye=Ge(ue),Ie=Ge(pe),Ee=Ge(he),Ae=Ge(fe),Ce=Ge(ge),_e=re?re.prototype:void 0,Se=_e?_e.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function Oe(e){var t=this.__data__=new Ne(e);this.size=t.size}function ve(e,t){var n=qe(e),r=!n&&He(e),a=!n&&!r&&ze(e),o=!n&&!r&&!a&&Qe(e),s=n||r||a||o,i=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||s&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function De(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Re(e){return null==e?void 0===e?N:y:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var a=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return a}(e):function(e){return ee.call(e)}(e)}function $e(e){return Xe(e)&&Re(e)==i}function xe(e,t,n,r,s){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,r,s,l){var h=qe(e),f=qe(t),y=h?c:Ve(e),E=f?c:Ve(t),A=(y=y==i?I:y)==I,N=(E=E==i?I:E)==I,T=y==E;if(T&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(T&&!A)return l||(l=new Oe),h||Qe(e)?Le(e,t,n,r,s,l):function(e,t,n,r,s,i,c){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new ae(e),new ae(t)));case d:case u:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case C:case S:return e==t+"";case g:var l=B;case _:var h=r&a;if(l||(l=G),e.size!=t.size&&!h)return!1;var f=c.get(e);if(f)return f==t;r|=o,c.set(e,t);var y=Le(l(e),l(t),r,s,i,c);return c.delete(e),y;case b:if(Se)return Se.call(e)==Se.call(t)}return!1}(e,t,y,n,r,s,l);if(!(n&a)){var v=A&&Q.call(e,"__wrapped__"),D=N&&Q.call(t,"__wrapped__");if(v||D){var R=v?e.value():e,$=D?t.value():t;return l||(l=new Oe),s(R,$,n,r,l)}}if(!T)return!1;return l||(l=new Oe),function(e,t,n,r,o,s){var i=n&a,c=Fe(e),l=c.length,d=Fe(t),u=d.length;if(l!=u&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var f=s.get(e);if(f&&s.get(t))return f==t;var g=!0;s.set(e,t),s.set(t,e);var m=i;for(;++p<l;){var y=e[h=c[p]],I=t[h];if(r)var E=i?r(I,y,h,t,e,s):r(y,I,h,e,t,s);if(!(void 0===E?y===I||o(y,I,n,r,s):E)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var A=e.constructor,C=t.constructor;A==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,s,l)}(e,t,n,r,xe,s))}function we(e){return!(!Je(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:v).test(Ge(e))}function Me(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return de(e);var t,n,r,a=[];for(var o in Object(e))Q.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Le(e,t,n,r,s,i){var c=n&a,l=e.length,d=t.length;if(l!=d&&!(c&&d>l))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,h=!0,f=n&o?new Pe:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var g=e[p],m=t[p];if(r)var y=c?r(m,g,p,t,e,i):r(g,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(f){if(!V(t,(function(e,t){if(a=t,!f.has(a)&&(g===e||s(g,e,n,r,i)))return f.push(t);var a}))){h=!1;break}}else if(g!==m&&!s(g,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ze,ke)}function je(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return we(n)?n:void 0}be.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return De(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(pe||Ne),string:new be}},Te.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return je(this,e).get(e)},Te.prototype.has=function(e){return je(this,e).has(e)},Te.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,r),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Ne,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[a++]=s)}return o}(ce(e),(function(t){return oe.call(e,t)})))}:function(){return[]},Ve=Re;function Be(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||D.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(ue&&Ve(new ue(new ArrayBuffer(1)))!=O||pe&&Ve(new pe)!=g||he&&Ve(he.resolve())!=E||fe&&Ve(new fe)!=_||ge&&Ve(new ge)!=T)&&(Ve=function(e){var t=Re(e),n=t==I?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case ye:return O;case Ie:return g;case Ee:return E;case Ae:return _;case Ce:return T}return t});var He=$e(function(){return arguments}())?$e:function(e){return Xe(e)&&Q.call(e,"callee")&&!oe.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Je(e))return!1;var t=Re(e);return t==h||t==f||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function Je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Xe(e)&&Ke(e.length)&&!!R[Re(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?ve(e):Me(e);var t}e.exports=function(e,t){return xe(e,t)}},692:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",d="[object Object]",u="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[i]=g["[object Map]"]=g["[object Number]"]=g[d]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,C=A&&A.exports===E,_=C&&m.process,S=function(){try{var e=A&&A.require&&A.require("util").types;return e||_&&_.binding&&_.binding("util")}catch(e){}}(),b=S&&S.isTypedArray;var N,T,P,O=Array.prototype,v=Function.prototype,D=Object.prototype,R=I["__core-js_shared__"],$=v.toString,x=D.hasOwnProperty,w=(N=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",M=D.toString,L=$.call(Object),F=RegExp("^"+$.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=C?I.Buffer:void 0,U=I.Symbol,k=I.Uint8Array,V=j?j.allocUnsafe:void 0,B=(T=Object.getPrototypeOf,P=Object,function(e){return T(P(e))}),G=Object.create,W=D.propertyIsEnumerable,H=O.splice,q=U?U.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,J=Date.now,X=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!Re(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function ae(e,t){var n=Te(e),r=!n&&Ne(e),a=!n&&!r&&Oe(e),o=!n&&!r&&!a&&xe(e),s=n||r||a||o,i=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!x.call(e,l)||s&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function oe(e,t,n){(void 0!==n&&!be(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function se(e,t,n){var r=e[t];x.call(e,t)&&be(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return x.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:x.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(X||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,de=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),s=o.length;s--;){var i=o[le?s:++r];if(!1===t(a[i],i,a))break}return e};function ue(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=x.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var a=M.call(e);r&&(t?e[q]=n:delete e[q]);return a}(e):function(e){return M.call(e)}(e)}function pe(e){return $e(e)&&ue(e)==o}function he(e){return!(!Re(e)||function(e){return!!w&&w in e}(e))&&(ve(e)?F:h).test(function(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function fe(e){if(!Re(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ce(e),n=[];for(var r in e)("constructor"!=r||!t&&x.call(e,r))&&n.push(r);return n}function ge(e,t,n,r,a){e!==t&&de(t,(function(o,s){if(a||(a=new re),Re(o))!function(e,t,n,r,a,o,s){var i=_e(e,n),c=_e(t,n),l=s.get(c);if(l)return void oe(e,n,l);var u=o?o(i,c,n+"",e,t,s):void 0,p=void 0===u;if(p){var h=Te(c),f=!h&&Oe(c),g=!h&&!f&&xe(c);u=c,h||f||g?Te(i)?u=i:$e(A=i)&&Pe(A)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):f?(p=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=V?V(n):new e.constructor(n);return e.copy(r),r}(c,!0)):g?(p=!1,m=c,y=!0?(I=m.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):m.buffer,u=new m.constructor(y,m.byteOffset,m.length)):u=[]:function(e){if(!$e(e)||ue(e)!=d)return!1;var t=B(e);if(null===t)return!0;var n=x.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$.call(n)==L}(c)||Ne(c)?(u=i,Ne(i)?u=function(e){return function(e,t,n,r){var a=!n;n||(n={});var o=-1,s=t.length;for(;++o<s;){var i=t[o],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),a?ce(n,i,c):se(n,i,c)}return n}(e,we(e))}(i):Re(i)&&!ve(i)||(u=function(e){return"function"!=typeof e.constructor||Ce(e)?{}:Z(B(e))}(c))):p=!1}var m,y,I,E;var A;p&&(s.set(c,u),a(u,c,r,o,s),s.delete(c));oe(e,n,u)}(e,t,s,n,ge,r,a);else{var i=r?r(_e(e,s),o,s+"",e,t,a):void 0;void 0===i&&(i=o),oe(e,s,i)}}),we)}function me(e,t){return Se(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=K(r.length-t,0),s=Array(o);++a<o;)s[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,t,Fe),e+"")}var ye=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&f.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||D)}function _e(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Se=function(e){var t=0,n=0;return function(){var r=J(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ye);function be(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return $e(e)&&x.call(e,"callee")&&!W.call(e,"callee")},Te=Array.isArray;function Pe(e){return null!=e&&De(e.length)&&!ve(e)}var Oe=Y||function(){return!1};function ve(e){if(!Re(e))return!1;var t=ue(e);return t==i||t==c||t==s||t==u}function De(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $e(e){return null!=e&&"object"==typeof e}var xe=b?function(e){return function(t){return e(t)}}(b):function(e){return $e(e)&&De(e.length)&&!!g[ue(e)]};function we(e){return Pe(e)?ae(e,!0):fe(e)}var Me,Le=(Me=function(e,t,n,r){ge(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(a=Me.length>3&&"function"==typeof a?(r--,a):void 0,o&&function(e,t,n){if(!Re(n))return!1;var r=typeof t;return!!("number"==r?Pe(n)&&Ae(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],o)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var s=t[n];s&&Me(e,s,n,a)}return e})));function Fe(e){return e}e.exports=Le},835:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o=9007199254740991,s="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,u=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")();var E,A=Array.prototype,C=Function.prototype,_=Object.prototype,S=I["__core-js_shared__"],b=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=C.toString,T=_.hasOwnProperty,P=_.toString,O=RegExp("^"+N.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=I.Symbol,D=A.splice,R=G(I,"Map"),$=G(Object,"create"),x=v?v.prototype:void 0,w=x?x.toString:void 0;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];T.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function U(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!J(e)||(t=e,b&&b in t))return!1;var t,n=function(e){var t=J(e)?P.call(e):"";return t==s||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:f;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t,n,r){if(!J(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||X(e))return!0;return d.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var a=-1,o=t.length,s=o-1,i=e;null!=i&&++a<o;){var c=q(t[a]),u=n;if(a!=s){var p=i[c];void 0===(u=r?r(p,c,i):void 0)&&(u=J(p)?p:W(t[a+1])?[]:{})}j(i,c,u),i=i[c]}return e}function B(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||g.test(e))&&e>-1&&e%1==0&&e<t}M.prototype.clear=function(){this.__data__=$?$(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return U(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new(R||L),string:new M}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(X(e))return w?w.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(p,(function(e,t,r,a){n.push(r?a.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||X(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(z.Cache||F),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=F;var K=Array.isArray;function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function X(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&P.call(e)==c}e.exports=function(e,t,n){return null==e?e:V(e,t,n)}},521:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",s="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,d=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=f||g||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=m["__core-js_shared__"],_=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",S=E.toString,b=A.hasOwnProperty,N=A.toString,T=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,O=I.splice,v=V(m,"Map"),D=V(Object,"create"),R=P?P.prototype:void 0,$=R?R.toString:void 0;function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function F(e){if(!z(e)||(t=e,_&&_ in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==o||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:U(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o}(t,0,-1))}(e,t=B(t,e)?[t]:U(t));var n,r,a=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&b.call(e,a))||delete e[a]}function U(e){return q(e)?e:G(e)}function k(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}x.prototype.clear=function(){this.__data__=D?D(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:b.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},w.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return L(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(v||w),string:new x}},M.prototype.delete=function(e){return k(this,e).delete(e)},M.prototype.get=function(e){return k(this,e).get(e)},M.prototype.has=function(e){return k(this,e).has(e)},M.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(H.Cache||M),n}H.Cache=M;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},953:e=>{class t{constructor(e,t,n,r,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let o=this.gen_table();this.table=o,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=o[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:o}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&o}}else{t=this.shifted_xor_in;for(let s=0;s<e.length;s++)t=n[255&(t>>r-8+a^e[s])]<<a^t<<8-a&o<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,a=1<<n,o="";for(let s=0;s<r;s++){let r="";for(let o=0;o<a;o++){let a=e[s<<n|o];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}o+=" "+r+"\n"}return o="[\n"+o.slice(0,-3)+"\n]",o}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class o{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class s extends o{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends o{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new s;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const d={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function u(e){}e.exports={CRC:t,crc:function(e,n,r,a,o){let s=new t(e,n,r,a,o);return s.calculate.bind(s)},makeBufferConverter:c,models:d,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in d){let n=d[t];e.exports[t]=n.calculate.bind(n)}},754:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=754,e.exports=t},57:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AsYouType:()=>Ra,AsYouTypeCustom:()=>Da,DIGITS:()=>ee,DIGIT_PLACEHOLDER:()=>Fr,Metadata:()=>Fa,ParseError:()=>A,PhoneNumber:()=>Ba,PhoneNumberMatcher:()=>Dr,PhoneNumberSearch:()=>ho,PhoneNumberSearchCustom:()=>io,default:()=>xt,findNumbers:()=>hr,findPhoneNumbers:()=>uo,findPhoneNumbersCustom:()=>co,findPhoneNumbersInText:()=>Sr,format:()=>qa,formatCustom:()=>Ha,formatIncompletePhoneNumber:()=>Va,formatNumber:()=>qa,formatRFC3966:()=>ke,getCountries:()=>wa,getCountryCallingCode:()=>Ma,getCountryCallingCodeCustom:()=>k,getExampleNumber:()=>Ua,getExtPrefix:()=>La,getNumberType:()=>Ka,getNumberTypeCustom:()=>za,getPhoneCode:()=>Ma,getPhoneCodeCustom:()=>k,isPossibleNumber:()=>Xa,isPossiblePhoneNumber:()=>Ht,isSupportedCountry:()=>$a,isValidNumber:()=>Za,isValidNumberCustom:()=>Qa,isValidNumberForRegion:()=>to,isValidPhoneNumber:()=>Ut,parse:()=>Wa,parseCustom:()=>Ga,parseDigits:()=>ne,parseIncompletePhoneNumber:()=>oe,parseNumber:()=>Wa,parsePhoneNumber:()=>Tt,parsePhoneNumberCharacter:()=>se,parsePhoneNumberFromString:()=>xt,parsePhoneNumberWithError:()=>Tt,parseRFC3966:()=>Ue,searchNumbers:()=>yr,searchPhoneNumbers:()=>po,searchPhoneNumbersCustom:()=>lo,searchPhoneNumbersInText:()=>vr,validatePhoneNumberLength:()=>Xt});const r={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function a(e,t){var n=Array.prototype.slice.call(t);return n.push(r),e.apply(this,n)}var o=2,s=17,i=3,c="0-90-9٠-٩۰-۹",l=" ",d="".concat("-‐-―−ー-").concat("//").concat("..").concat(l).concat("()()[]\\[\\]").concat("~⁓∼~"),u="++";function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function f(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}function g(e,t,n){return t=E(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&I(a,n.prototype),a}(e,arguments,E(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),I(n,e)},m(e)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var A=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=g(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,r&&h(n.prototype,r),a&&h(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a}(m(Error));function C(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var o=Number(n[a]),s=Number(r[a]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var _={}.constructor;function S(e){return null!=e&&e.constructor===_}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function P(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}var v=" ext. ",D=/^\d+$/,R=function(){return P((function e(t){N(this,e),F(t),this.metadata=t,B.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&D.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new $(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new $(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),$=function(){return P((function e(t,n){N(this,e),this.globalMetadataObject=n,this.metadata=t,B.call(this,n.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new x(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&L(this.types(),e))return new M(L(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?v:this.metadata[13]||v}}])}(),x=function(){return P((function e(t,n){N(this,e),this._format=t,this.metadata=n}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||w.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),w=/^\(?\$1\)?$/,M=function(){return P((function e(t,n){N(this,e),this.type=t,this.metadata=n}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function L(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function F(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!S(e)||!S(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(S(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+j(e)+": "+e,"."))}var j=function(e){return b(e)};function U(e,t){return(t=new R(t)).hasCountry(e)?t.selectNumberingPlan(e).ext():v}function k(e,t){if((t=new R(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function V(e,t){return t.countries.hasOwnProperty(e)}function B(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===C(t,"1.2.0")?this.v2=!0:-1===C(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var G=function(e){return"([".concat(c,"]{1,").concat(e,"})")};function W(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",a="[ \\t]*";return";ext="+G("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+G("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+G("9")+r)+"|"+("[- ]+"+G("6")+"#")+"|"+(a+"(?:,{2}|;)"+n+G("15")+r)+"|"+(a+"(?:,)+"+n+G("9")+r)}var H="["+c+"]{"+o+"}",q="[++]{0,1}(?:["+d+"]*["+c+"]){3,}["+d+c+"]*",z=new RegExp("^[++]{0,1}(?:["+d+"]*["+c+"]){1,2}$","i"),Y=q+"(?:"+W()+")?",K=new RegExp("^"+H+"$|^"+Y+"$","i");function J(e){return e.length>=o&&K.test(e)}var X=new RegExp("(?:"+W()+")$","i");function Q(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ee={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function te(e){return ee[e]}function ne(e){for(var t,n="",r=Q(e.split(""));!(t=r()).done;){var a=te(t.value);a&&(n+=a)}return n}function re(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ae(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e){for(var t,n="",r=re(e.split(""));!(t=r()).done;){n+=se(t.value,n)||""}return n}function se(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":te(e)}function ie(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function le(e,t,n){return de(e,t,void 0,n)}function de(e,t,n,r){t&&(r=new R(r.metadata)).selectNumberingPlan(t);var a=r.type(n),o=a&&a.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===n){if(!r.type("FIXED_LINE"))return de(e,t,"MOBILE",r);var s=r.type("MOBILE");s&&(o=function(e,t){for(var n,r=e.slice(),a=ie(t);!(n=a()).done;){var o=n.value;e.indexOf(o)<0&&r.push(o)}return r.sort((function(e,t){return e-t}))}(o,s.possibleLengths()))}else if(n&&!a)return"INVALID_LENGTH";var i=e.length,c=o[0];return c===i?"IS_POSSIBLE":c>i?"TOO_SHORT":o[o.length-1]<i?"TOO_LONG":o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function ue(e,t,n){if(void 0===t&&(t={}),n=new R(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return pe(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function pe(e,t,n){return"IS_POSSIBLE"===le(e,t,n)}function he(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function fe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ge(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var me=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function ye(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new R(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(he(r,n.nationalNumberPattern())){if(Ie(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Ie(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,o=fe(me);!(a=o()).done;){var s=a.value;if(Ie(r,s,n))return s}}}}function Ie(e,t,n){var r=n.type(t);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&he(e,r.pattern()))}function Ee(e,t,n){return t=t||{},(n=new R(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==ye(e,t,n.metadata):he(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}function Ae(e,t,n){var r=new R(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new R(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)})):[]}var Ce=new RegExp("(["+c+"])");function _e(e,t,n,r){if(t){var a=new R(r);a.selectNumberingPlan(t,n);var o=new RegExp(a.IDDPrefix());if(0===e.search(o)){var s=(e=e.slice(e.match(o)[0].length)).match(Ce);if(!(s&&null!=s[1]&&s[1].length>0&&"0"===s[1]))return e}}}function Se(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,o,s,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(o=r[1]);else{var l=r[0];a=e.slice(l.length),c&&(o=r[1])}if(c){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(s=t.numberingPlan.nationalPrefix())}else s=r[0];return{nationalNumber:a,nationalPrefix:s,carrierCode:o}}}return{nationalNumber:e}}function be(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t){var n=t.countries,r=t.metadata;r=new R(r);for(var a,o=be(n);!(a=o()).done;){var s=a.value;if(r.selectNumberingPlan(s),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return s}else if(ye({phone:e,country:s},void 0,r.metadata))return s}}var Pe=!1;function Oe(e,t){var n=t.nationalNumber,r=t.metadata;if(Pe&&r.isNonGeographicCallingCode(e))return"001";var a=r.getCountryCodesForCallingCode(e);return a?1===a.length?a[0]:Te(n,{countries:a,metadata:r.metadata}):void 0}function ve(e,t,n){var r=Se(e,n),a=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(he(e,n.nationalNumberPattern())&&!he(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Oe(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(le(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:a}}function De(e,t,n,r,a){var o=t||n?k(t||n,a):r;if(0===e.indexOf(o)){(a=new R(a)).selectNumberingPlan(t||n,o);var s=e.slice(o.length),i=ve(s,t,a).nationalNumber,c=ve(e,t,a).nationalNumber;if(!he(c,a.nationalNumberPattern())&&he(i,a.nationalNumberPattern())||"TOO_LONG"===le(c,t,a))return{countryCallingCode:o,number:s}}return{number:e}}function Re(e,t,n,r,a){if(!e)return{};var o;if("+"!==e[0]){var s=_e(e,t||n,r,a);if(!s||s===e){if(t||n||r){var c=De(e,t,n,r,a),l=c.countryCallingCode,d=c.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:d}}return{number:e}}o=!0,e="+"+s}if("0"===e[1])return{};a=new R(a);for(var u=2;u-1<=i&&u<=e.length;){var p=e.slice(1,u);if(a.hasCallingCode(p))return a.selectNumberingPlan(p),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:p,number:e.slice(u)};u++}return{}}function $e(e){return e.replace(new RegExp("[".concat(d,"]+"),"g")," ").trim()}var xe=/(\$\d)/;function we(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,o=(n.carrierCode,n.metadata,e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(xe,t.nationalPrefixFormattingRule()):t.format()));return r?$e(o):o}var Me=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||Fe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){if(e){if("string"==typeof e)return je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ue(e){for(var t,n,r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Fe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}((e=e.replace(/^tel:/,"tel=")).split(";"));!(r=a()).done;){var o=Le(r.value.split("="),2),s=o[0],i=o[1];switch(s){case"tel":t=i;break;case"ext":n=i;break;case"phone-context":"+"===i[0]&&(t=i+t)}}if(!J(t))return{};var c={number:t};return n&&(c.ext=n),c}function ke(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}var Ve={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Be(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var a in n[e])n[0][a]=n[e][a];e++}return n[0]}({},Ve,n):Ve,r=new R(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,o=r.countryCallingCode(),s=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return s?He(a=Ge(s,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return s?(a=Ge(s,null,"INTERNATIONAL",r,n),He(a="+".concat(o," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(s);case"RFC3966":return ke({number:"+".concat(o).concat(s),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){var o=k(r,a.metadata);if(o===n){var s=Ge(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var i=function(e,t,n){var r=new R(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Me.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,a.metadata);if(i)return"".concat(i," ").concat(n," ").concat(Ge(e,null,"INTERNATIONAL",a))}(s,e.carrierCode,o,n.fromCountry,r);if(!i)return;return He(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Ge(e,t,n,r,a){var o=We(r.formats(),e);return o?we(e,o,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function We(e,t){return function(e,t){var n=0;for(;n<e.length;){if(t(e[n]))return e[n];n++}}(e,(function(e){if(e.leadingDigitsPatterns().length>0){var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(n))return!1}return he(t,e.pattern())}))}function He(e,t,n,r){return t?r(e,t,n):e}function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return(t=Xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xe(r.key),r)}}function Xe(e){var t=function(e,t){if("object"!=qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qe(t)?t:t+""}var Qe=function(){return e=function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(S(n)&&S(n.countries)){r=n;var a=t;if(!et.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Re(a,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");F(r);var s=function(e,t){var n,r,a=new R(t);return Ze(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),i=s.country,c=s.countryCallingCode;this.country=i,this.countryCallingCode=c,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},(t=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Ae(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return ue(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Ee(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new R(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return ye(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Be(this,e,t?Ye(Ye({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&Je(e.prototype,t),n&&Je(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),Ze=function(e){return/^[A-Z]{2}$/.test(e)};var et=/^\+\d+$/,tt="+",nt="(["+c+"]|[\\-\\.\\(\\)]?)",rt=new RegExp("^\\"+tt+nt+"*["+c+"]"+nt+"*$","g"),at=new RegExp("^("+("["+c+"]+((\\-)*["+c+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+c+"])*")+"\\.?$","g"),ot="tel:",st=";phone-context=",it=";isub=";function ct(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(st);if(t<0)return null;var n=t+st.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(rt.test(e)||at.test(e))}(a))throw new A("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="",a.charAt(0)===tt&&(n+=a);var o,s=e.indexOf(ot);o=s>=0?s+ot.length:0;var i=e.indexOf(st);n+=e.substring(o,i)}var c=n.indexOf(it);if(c>0&&(n=n.substring(0,c)),""!==n)return n}var lt=250,dt=new RegExp("[++"+c+"]"),ut=new RegExp("[^"+c+"#]+$"),pt=!1;function ht(e,t,n){if(t=t||{},n=new R(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new A("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=ct(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>lt){if(n)throw new A("TOO_LONG");return}if(!1===t)return e;var r=e.search(dt);if(r<0)return;return e.slice(r).replace(ut,"")}(e,n,t)}});if(!r)return{};if(!J(r))return function(e){return z.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(X);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(X),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);if(a.ext)return a;return{number:r}}(e,t.v2,t.extract),a=r.number,i=r.ext,c=r.error;if(!a){if(t.v2){if("TOO_SHORT"===c)throw new A("TOO_SHORT");throw new A("NOT_A_NUMBER")}return{}}var l=function(e,t,n,r){var a,o=Re(oe(e),void 0,t,n,r.metadata),s=o.countryCallingCodeSource,i=o.countryCallingCode,c=o.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),t?a=t:pt&&r.isNonGeographicCallingCode(n)&&(a="001"),i=n||k(t,r.metadata)}if(!c)return{countryCallingCodeSource:s,countryCallingCode:i};var l=ve(oe(c),a,r),d=l.nationalNumber,u=l.carrierCode,p=Oe(i,{nationalNumber:d,metadata:r});p&&(a=p,"001"===p||r.selectNumberingPlan(a));return{country:a,countryCallingCode:i,countryCallingCodeSource:s,nationalNumber:d,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),d=l.country,u=l.nationalNumber,p=l.countryCallingCode,h=l.countryCallingCodeSource,f=l.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new A("INVALID_COUNTRY");return{}}if(!u||u.length<o){if(t.v2)throw new A("TOO_SHORT");return{}}if(u.length>s){if(t.v2)throw new A("TOO_LONG");return{}}if(t.v2){var g=new Qe(p,u,n.metadata);return d&&(g.country=d),f&&(g.carrierCode=f),i&&(g.ext=i),g.__countryCallingCodeSource=h,g}var m=!!(t.extended?n.hasSelectedNumberingPlan():d)&&he(u,n.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:p,carrierCode:f,valid:m,possible:!!m||!(!0!==t.extended||!n.possibleLengths()||!pe(u,d,n)),phone:u,ext:i}:m?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(d,u,i):{}}function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ft(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function It(e,t,n){return ht(e,mt(mt({},t),{},{v2:!0}),n)}function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ct(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Et(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return St(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?St(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bt(e){var t,n,r,a=_t(Array.prototype.slice.call(e),4),o=a[0],s=a[1],i=a[2],c=a[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,s&&"string"!=typeof s){if(!S(s))throw new Error("Invalid second argument: ".concat(s));i?(n=s,r=i):r=s}else c?(n=i,r=c):(n=void 0,r=i),s&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach((function(t){Ct(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:s},n));return{text:t,options:n,metadata:r}}function Nt(){var e=bt(arguments);return It(e.text,e.options,e.metadata)}function Tt(){return a(Nt,arguments)}function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){Dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e,t,n){t&&t.defaultCountry&&!V(t.defaultCountry,n)&&(t=vt(vt({},t),{},{defaultCountry:void 0}));try{return It(e,t,n)}catch(e){if(!(e instanceof A))throw e}}function $t(){var e=bt(arguments);return Rt(e.text,e.options,e.metadata)}function xt(){return a($t,arguments)}function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=Rt(t,n=Lt(Lt({},n),{},{extract:!1}),r);return a&&a.isValid()||!1}function Ut(){return a(jt,arguments)}function kt(e){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(e)}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){Gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=Rt(t,n=Bt(Bt({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}function Ht(){return a(Wt,arguments)}function qt(e){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(e)}function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata;n=Yt(Yt({},n),{},{extract:!1});try{var a=It(t,n,r);(r=new R(r)).selectNumberingPlan(a.countryCallingCode);var o=le(a.nationalNumber,a.country,r);if("IS_POSSIBLE"!==o)return o}catch(e){if(e instanceof A)return e.message;throw e}}function Xt(){return a(Jt,arguments)}function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function Zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tn(r.key),r)}}function en(e,t,n){return t&&Zt(e.prototype,t),n&&Zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tn(e){var t=function(e,t){if("object"!=Qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qt(t)?t:t+""}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var rn=en((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;nn(this,e),this.key=t,this.value=n,this.next=r,this.prev=a})),an=function(){return en((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;nn(this,e),this.size=0,this.limit=t,this.head=null,this.tail=null,this.cache={}}),[{key:"put",value:function(e,t){if(this.ensureLimit(),this.head){var n=new rn(e,t,this.head);this.head.prev=n,this.head=n}else this.head=this.tail=new rn(e,t);this.cache[e]=this.head,this.size++}},{key:"get",value:function(e){if(this.cache[e]){var t=this.cache[e].value;return this.remove(e),this.put(e,t),t}console.log("Item not available in cache for key ".concat(e))}},{key:"ensureLimit",value:function(){this.size===this.limit&&this.remove(this.tail.key)}},{key:"remove",value:function(e){var t=this.cache[e];null!==t.prev?t.prev.next=t.next:this.head=t.next,null!==t.next?t.next.prev=t.prev:this.tail=t.prev,delete this.cache[e],this.size--}},{key:"clear",value:function(){this.head=null,this.tail=null,this.size=0,this.cache={}}}])}();function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}function sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cn(r.key),r)}}function cn(e){var t=function(e,t){if("object"!=on(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=on(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==on(t)?t:t+""}var ln=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cache=new an(t)},(t=[{key:"getPatternForRegExp",value:function(e){var t=this.cache.get(e);return t||(t=new RegExp("^"+e),this.cache.put(e,t)),t}}])&&sn(e.prototype,t),n&&sn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function dn(e,t){if(e<0||t<=0||t<e)throw new TypeError;return"{".concat(e,",").concat(t,"}")}function un(e,t){var n=t.search(e);return n>=0?t.slice(0,n):t}var pn=" - \u2028\u2029 ",hn="[".concat(pn,"]"),fn="[^".concat(pn,"]"),gn="[".concat("0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9","]"),mn="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",yn="[".concat(mn,"]"),In=new RegExp(yn),En="[".concat("$¢-¥֏؋৲৳৻૱௹฿៛₠-₹꠸﷼﹩$¢£¥₩","]"),An=new RegExp(En),Cn="[".concat("̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ࣾऀ-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣଁ଼ିୁ-ୄ୍ୖୢୣஂீ்ా-ీె-ైొ-్ౕౖౢౣ಼ಿೆೌ್ೢೣു-ൄ്ൢൣ්ි-ුූัิ-ฺ็-๎ັິ-ູົຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᯦᮫ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᷀-ᷦ᷼-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꨩ-ꨮꨱꨲꨵꨶꩃꩌꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︦","]"),_n=new RegExp(Cn),Sn=new RegExp("[\0--ÿĀ-ſḀ-ỿƀ-ɏ̀-ͯ]");function bn(e){return!(!In.test(e)&&!_n.test(e))&&Sn.test(e)}function Nn(e){return"%"===e||An.test(e)}function Tn(e,t,n){var r=!0,a=$t(e,n);if(a||(r=!1,a=$t(e,{defaultCallingCode:t.countryCallingCode},n)),!a)return"INVALID_NUMBER";if(t.ext){if(a.ext!==t.ext)return"NO_MATCH"}else if(a.ext)return"NO_MATCH";return r&&t.countryCallingCode!==a.countryCallingCode?"NO_MATCH":t.number===a.number?r?"EXACT_MATCH":"NSN_MATCH":0===t.nationalNumber.indexOf(a.nationalNumber)||0===a.nationalNumber.indexOf(t.nationalNumber)?"SHORT_NSN_MATCH":"NO_MATCH"}const Pn={POSSIBLE:function(e,t){t.candidate,t.metadata;return!0},VALID:function(e,t){var n=t.candidate,r=(t.defaultCountry,t.metadata);return!(!e.isValid()||!On(e,n,r))},STRICT_GROUPING:function(e,t){var n=t.candidate,r=t.defaultCountry,a=t.metadata,o=t.regExpCache;return!(!e.isValid()||!On(e,n,a)||Dn(e,n)||!vn(e,{defaultCountry:r,metadata:a}))&&Rn(e,n,a,xn,o)},EXACT_GROUPING:function(e,t){var n=t.candidate,r=t.defaultCountry,a=t.metadata,o=t.regExpCache;return!(!e.isValid()||!On(e,n,a)||Dn(e,n)||!vn(e,{defaultCountry:r,metadata:a}))&&Rn(e,n,a,$n,o)}};function On(e,t,n){for(var r=0;r<t.length-1;r++){var a=t.charAt(r);if("x"===a||"X"===a){var o=t.charAt(r+1);if("x"===o||"X"===o){if(r++,"NSN_MATCH"!==Tn(t.substring(r),e,n))return!1}else{var s=ne(t.substring(r));if(s){if(e.ext!==s)return!1}else if(e.ext)return!1}}}return!0}function vn(e,t){t.defaultCountry;var n=t.metadata;if("FROM_DEFAULT_COUNTRY"!==e.__countryCallingCodeSource)return!0;var r=new R(n);r.selectNumberingPlan(e.countryCallingCode);e.country||Oe(e.countryCallingCode,{nationalNumber:e.nationalNumber,metadata:r});var a=e.nationalNumber,o=We(r.numberingPlan.formats(),a);return!o.nationalPrefixFormattingRule()||(!!r.numberingPlan.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||(!o.usesNationalPrefix()||Boolean(e.nationalPrefix)))}function Dn(e,t){var n=t.indexOf("/");if(n<0)return!1;var r=t.indexOf("/",n+1);return!(r<0)&&(!("FROM_NUMBER_WITH_PLUS_SIGN"===e.__countryCallingCodeSource||"FROM_NUMBER_WITHOUT_PLUS_SIGN"===e.__countryCallingCodeSource)||ne(t.substring(0,n))!==e.countryCallingCode||t.slice(r+1).indexOf("/")>=0)}function Rn(e,t,n,r,a){throw new Error("This part of code hasn't been ported")}function $n(e,t,n,r){throw new Error("This part of code hasn't been ported")}function xn(e,t,n,r){throw new Error("This part of code hasn't been ported")}var wn=/[\\/] *x/;function Mn(e){return un(wn,e)}var Ln=/(?:(?:[0-3]?\d\/[01]?\d)|(?:[01]?\d\/[0-3]?\d))\/(?:[12]\d)?\d{2}/,Fn=/[12]\d{3}[-/]?[01]\d[-/]?[0-3]\d +[0-2]\d$/,jn=/^:[0-5]\d/;function Un(e,t,n){if(Ln.test(e))return!1;if(Fn.test(e)){var r=n.slice(t+e.length);if(jn.test(r))return!1}return!0}var kn="(\\[([",Vn=")\\])]",Bn="[^".concat(kn).concat(Vn,"]"),Gn="[".concat(kn).concat(u,"]"),Wn=new RegExp("^"+Gn),Hn=dn(0,3),qn=new RegExp("^(?:[(\\[([])?(?:"+Bn+"+["+Vn+"])?"+Bn+"+(?:["+kn+"]"+Bn+"+["+Vn+"])"+Hn+Bn+"*$"),zn=/\d{1,5}-+\d{1,5}\s{0,4}\(\d{1,4}/;function Yn(e,t,n,r){if(qn.test(e)&&!zn.test(e)){if("POSSIBLE"!==r){if(t>0&&!Wn.test(e)){var a=n[t-1];if(Nn(a)||bn(a))return!1}var o=t+e.length;if(o<n.length){var s=n[o];if(Nn(s)||bn(s))return!1}}return!0}}function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function Jn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zn(r.key),r)}}function Zn(e){var t=function(e,t){if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kn(t)?t:t+""}var er=W(),tr=["/+(.*)","(\\([^(]*)","(?:".concat(hn,"-|-").concat(hn,")").concat(hn,"*(.+)"),"[‒-―-]".concat(hn,"*(.+)"),"\\.+".concat(hn,"*([^.]+)"),"".concat(hn,"+(").concat(fn,"+)")],nr=dn(0,2),rr=dn(0,4),ar=s+i,or=dn(0,ar),sr="[".concat(d,"]")+rr,ir=gn+dn(1,ar),cr="(?:"+Gn+sr+")"+nr+ir+"(?:"+sr+ir+")"+or+"(?:"+er+")?",lr=new RegExp("[^".concat("0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൦-൵๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9").concat(mn,"#]+$")),dr=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ur=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n={v2:n.v2,defaultCallingCode:n.defaultCallingCode,defaultCountry:n.defaultCountry&&V(n.defaultCountry,r)?n.defaultCountry:void 0,leniency:n.leniency||(n.extended?"POSSIBLE":"VALID"),maxTries:n.maxTries||dr},!Pn[n.leniency])throw new TypeError('Unknown leniency: "'.concat(n.leniency,'"'));if("POSSIBLE"!==n.leniency&&"VALID"!==n.leniency)throw new TypeError('Invalid `leniency`: "'.concat(n.leniency,'". Supported values: "POSSIBLE", "VALID".'));if(n.maxTries<0)throw new TypeError("`maxTries` must be `>= 0`");this.text=t,this.options=n,this.metadata=r,this.leniency=Pn[n.leniency],this.maxTries=n.maxTries,this.PATTERN=new RegExp(cr,"ig"),this.INNER_MATCHES=tr.map((function(e){return new RegExp(e,"g")})),this.state="NOT_READY",this.searchIndex=0,this.regExpCache=new ln(32)},t=[{key:"find",value:function(e){var t;for(this.PATTERN.lastIndex=e;this.maxTries>0&&null!==(t=this.PATTERN.exec(this.text));){var n=t[0],r=t.index;if(Un(n=Mn(n),r,this.text)){var a=this.parseAndVerify(n,r,this.text)||this.extractInnerMatch(n,r,this.text);if(a){if(this.options.v2)return{startsAt:a.startsAt,endsAt:a.endsAt,number:a.phoneNumber};var o=a.phoneNumber,s={startsAt:a.startsAt,endsAt:a.endsAt,phone:o.nationalNumber};return o.country?s.country=o.country:s.countryCallingCode=o.countryCallingCode,o.ext&&(s.ext=o.ext),s}}this.maxTries--}}},{key:"extractInnerMatch",value:function(e,t,n){for(var r,a=Jn(this.INNER_MATCHES);!(r=a()).done;){var o=r.value;o.lastIndex=0;for(var s=!0,i=void 0;this.maxTries>0&&null!==(i=o.exec(e));){if(s){var c=un(lr,e.slice(0,i.index)),l=this.parseAndVerify(c,t,n);if(l)return l;this.maxTries--,s=!1}var d=un(lr,i[1]),u=e.indexOf(d,i.index),p=this.parseAndVerify(d,t+u,n);if(p)return p;this.maxTries--}}}},{key:"parseAndVerify",value:function(e,t,n){if(Yn(e,t,n,this.options.leniency)){var r=$t(e,{extended:!0,defaultCountry:this.options.defaultCountry,defaultCallingCode:this.options.defaultCallingCode},this.metadata);if(r&&r.isPossible())return this.leniency(r,{candidate:e,defaultCountry:this.options.defaultCountry,metadata:this.metadata,regExpCache:this.regExpCache})?{startsAt:t,endsAt:t+e.length,phoneNumber:r}:void 0}}},{key:"hasNext",value:function(){return"NOT_READY"===this.state&&(this.lastMatch=this.find(this.searchIndex),this.lastMatch?(this.searchIndex=this.lastMatch.endsAt,this.state="READY"):this.state="DONE"),"READY"===this.state}},{key:"next",value:function(){if(!this.hasNext())throw new Error("No next element");var e=this.lastMatch;return this.lastMatch=null,this.state="NOT_READY",e}}],t&&Qn(e.prototype,t),n&&Qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function pr(){for(var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,n,r),o=[];a.hasNext();)o.push(a.next());return o}function hr(){return a(pr,arguments)}function fr(e){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(e)}function gr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=fr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mr(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,n,r);return gr({},Symbol.iterator,(function(){return{next:function(){return a.hasNext()?{done:!1,value:a.next()}:{done:!0}}}}))}function yr(){return a(mr,arguments)}function Ir(e){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(e)}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){Cr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Ir(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ir(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _r(){for(var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,Ar(Ar({},n),{},{v2:!0}),r),o=[];a.hasNext();)o.push(a.next());return o}function Sr(){return a(_r,arguments)}function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nr(Object(n),!0).forEach((function(t){Pr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=br(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==br(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(){var e=bt(arguments),t=e.text,n=e.options,r=e.metadata,a=new ur(t,Tr(Tr({},n),{},{v2:!0}),r);return Pr({},Symbol.iterator,(function(){return{next:function(){return a.hasNext()?{done:!1,value:a.next()}:{done:!0}}}}))}function vr(){return a(Or,arguments)}function Dr(e,t){return ur.call(this,e,t,r)}function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function $r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xr(r.key),r)}}function xr(e){var t=function(e,t){if("object"!=Rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rr(t)?t:t+""}Dr.prototype=Object.create(ur.prototype,{}),Dr.prototype.constructor=Dr;var wr=function(){return e=function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onCountryChange=n,this.onCallingCodeChange=r},(t=[{key:"reset",value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:"startInternationalNumber",value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])&&$r(e.prototype,t),n&&$r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Mr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Lr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Fr="x",jr=new RegExp(Fr);function Ur(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function kr(e,t){return")"===e[t]&&t++,function(e){var t=[],n=0;for(;n<e.length;)"("===e[n]?t.push(n):")"===e[n]&&t.pop(),n++;var r=0,a="";t.push(e.length);for(var o=0,s=t;o<s.length;o++){var i=s[o];a+=e.slice(r,i),r=i+1}return a}(e.slice(0,t))}function Vr(e,t,n){var r=n.metadata,a=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,n){var r=n.metadata,a=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode;if(a(t)){var s=Br(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:r});if(s)return s}return Br(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:r})}(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:o})}function Br(e,t,n){var r=n.metadata,a=n.useNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix,s=we(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:a,metadata:r});if(a||(e.nationalPrefix?s=e.nationalPrefix+o(t)+s:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(s=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+s)),function(e,t){return ne(e)===t.getNationalDigits()}(s,e))return s}function Gr(e){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gr(e)}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hr(r.key),r)}}function Hr(e){var t=function(e,t){if("object"!=Gr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gr(t)?t:t+""}var qr=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:"|",args:n.concat([Jr(r)])};if(0===r.length)throw new Error("Pattern is required");return 1===r.length?r[0]:r}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(Kr);if(t){var n=t[1],r=e.slice(0,t.index),a=e.slice(t.index+n.length);switch(n){case"(?:":r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(r&&this.parsePattern(r),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var o=this.getContext().branches;o.push(Jr(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:o});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(r&&this.parsePattern(r),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(Jr(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:zr(r)});break;default:throw new Error("Unknown operator: ".concat(n))}a&&this.parsePattern(a)}else{if(Yr.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}])&&Wr(e.prototype,t),n&&Wr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function zr(e){for(var t=[],n=0;n<e.length;){if("-"===e[n]){if(0===n||n===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,a=e[n+1].charCodeAt(0)-1,o=r;o<=a;)t.push(String.fromCharCode(o)),o++}else t.push(e[n]);n++}return t}var Yr=/[\(\)\[\]\?\:\|]/,Kr=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function Jr(e){return 1===e.length?e[0]:e}function Xr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function ea(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ta(r.key),r)}}function ta(e){var t=function(e,t){if("object"!=Zr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zr(t)?t:t+""}var na=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matchTree=(new qr).parse(t)},t=[{key:"match",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!e)throw new Error("String is required");var n=ra(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||t)return n}}],t&&ea(e.prototype,t),n&&ea(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function ra(e,t,n){if("string"==typeof t){var r=e.join("");return 0===t.indexOf(r)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===r.indexOf(t)?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var a=e.slice(),o=0;o<t.length;){var s=ra(a,t[o],n&&o===t.length-1);if(!s)return;if(s.overflow)return s;if(!s.match){if(s.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(s,null,2)))}if(0===(a=a.slice(s.matchedChars.length)).length)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};o++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-a.length)}}switch(t.op){case"|":for(var i,c,l=Xr(t.args);!(c=l()).done;){var d=ra(e,c.value,n);if(d){if(d.overflow)return d;if(d.match)return{match:!0,matchedChars:d.matchedChars};if(!d.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(d,null,2)));i=!0}}return i?{partialMatch:!0}:void 0;case"[]":for(var u,p=Xr(t.args);!(u=p()).done;){var h=u.value;if(e[0]===h)return 1===e.length?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[h]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function aa(e){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(e)}function oa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ca(r.key),r)}}function ca(e){var t=function(e,t){if("object"!=aa(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=aa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==aa(t)?t:t+""}var la=Ur("9",15),da=/[- ]/,ua=function(){return/\[([^\[\]])*\]/g},pa=function(){return/\d(?=[^,}][^,}])/g},ha=new RegExp("["+d+"]*\\$1["+d+"]*(\\$\\d["+d+"]*)*$"),fa=function(){return e=function e(t){t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=n,this.resetFormat()},t=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var n=this;if(function(e,t,n){return"IS_POSSIBLE"===le(e,t,n)}(t.nationalSignificantNumber,t.country,this.metadata))for(var r,a=oa(this.matchingFormats);!(r=a()).done;){var o=r.value,s=Vr(t,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return n.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return n.getSeparatorAfterNationalPrefix(e)}});if(s)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(s.replace(/\d/g,Fr),t),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(Fr),s}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)return r===n?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,a=e.international,o=n,s=o.length-3;s<0&&(s=0),this.matchingFormats=this.matchingFormats.filter((function(e){return t.formatSuits(e,a,r)&&t.formatMatches(e,o,s)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(0===r)return!0;n=Math.min(n,r-1);var a=e.leadingDigitsPatterns()[n];if(t.length<3)try{return void 0!==new na(a).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(a,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){for(var t,n=this,r=function(){var r=t.value;return n.chosenFormat===r?0:ha.test(n.getFormatFormat(r,e.international))?n.createTemplateForFormat(r,e)?(n.chosenFormat=r,0):(n.matchingFormats=n.matchingFormats.filter((function(e){return e!==r})),1):1},a=oa(this.matchingFormats.slice());!(t=a()).done&&0!==r(););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var n=this.getTemplateForFormat(e,t);return n?(this.setNationalNumberTemplate(n,t),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&da.test(e.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&!1===t.spacing?n:n+" ":r?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf(Fr,t+1),n++;return kr(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,Fr)+Ur(Fr,t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var n=t.nationalSignificantNumber,r=t.international,a=t.nationalPrefix,o=t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,s=e.pattern();s=s.replace(ua(),"\\d").replace(pa(),"\\d");var i=la.match(s)[0];if(!(n.length>i.length)){var c=new RegExp("^"+s+"$"),l=n.replace(/\d/g,"9");c.test(l)&&(i=l);var d,u=this.getFormatFormat(e,r);if(this.shouldTryNationalPrefixFormattingRule(e,{international:r,nationalPrefix:a})){var p=u.replace(xe,e.nationalPrefixFormattingRule());if(ne(e.nationalPrefixFormattingRule())===(a||"")+ne("$1")&&(u=p,d=!0,a))for(var h=a.length;h>0;)u=u.replace(/\d/,Fr),h--}var f=i.replace(new RegExp(s),u).replace(new RegExp("9","g"),Fr);return d||(o?f=Ur(Fr,o.length)+" "+f:a&&(f=Ur(Fr,a.length)+this.getSeparatorAfterNationalPrefix(e)+f)),r&&(f=$e(f)),f}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,n){for(var r,a=Mr(n.split(""));!(r=a()).done;){var o=r.value;if(e.slice(t+1).search(jr)<0)return;t=e.search(jr),e=e.replace(jr,o)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],kr(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var a=e.usesNationalPrefix();if(a&&r||!a&&!n)return!0}}}],t&&ia(e.prototype,t),n&&ia(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function ga(e){return ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ga(e)}function ma(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ya(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ya(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ea(r.key),r)}}function Ea(e){var t=function(e,t){if("object"!=ga(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ga(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ga(t)?t:t+""}var Aa=new RegExp("^"+("["+d+c+"]+")+"$","i"),Ca="(?:[++]["+d+c+"]*|["+d+c+"]+)",_a=new RegExp("[^"+d+c+"]+.*$"),Sa=/[^\d\[\]]/,ba=function(){return e=function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,a=t.metadata,o=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=a,this.onNationalSignificantNumberChange=o},(t=[{key:"input",value:function(e,t){var n,r=function(e){var t=function(e){var t=function(e){var t,n=e.search(Ca);if(!(n<0))return"+"===(e=e.slice(n))[0]&&(t=!0,e=e.slice(1)),e=e.replace(_a,""),t&&(e="+"+e),e}(e)||"";return"+"===t[0]?[t.slice(1),!0]:[t]}(e),n=ma(t,2),r=n[0],a=n[1];return Aa.test(r)||(r=""),[r,a]}(e),a=ma(r,2),o=a[0],s=a[1],i=ne(o);return s&&(t.digits||(t.startInternationalNumber(void 0,void 0),i||(n=!0))),i&&this.inputDigits(i,t),{digits:i,justLeadingPlus:n}}},{key:"inputDigits",value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),(function(e){return t.update(e)}))}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:"extractCountryCallingCode",value:function(e){var t=Re("+"+e.getDigitsWithoutInternationalPrefix(),e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&Sa.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var n=Se(e,this.metadata),r=n.nationalPrefix,a=n.nationalNumber,o=n.carrierCode;if(a!==e)return this.onExtractedNationalNumber(r,o,a,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=Se(e,this.metadata),a=r.nationalPrefix,o=r.nationalNumber,s=r.carrierCode;if(o!==t)return this.onExtractedNationalNumber(a,s,o,e,n),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,n,r,a){var o,s=!1,i=r.lastIndexOf(n);if(i<0||i!==r.length-n.length)s=!0;else{var c=r.slice(0,i);c&&c!==e&&(o=c)}a({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberIsModified:s,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,(function(t){return e.update(t)}))||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!t&&!n){var a=_e(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==a&&a!==r?(e.update({IDDPrefix:r.slice(0,r.length-a.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=De(e.digits,e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(t)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:t}),!0}}},{key:"startInternationalNumber",value:function(e,t){var n=t.country,r=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),(function(t){return e.update(t)}))}}])&&Ia(e.prototype,t),n&&Ia(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Na(e){return Na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Na(e)}function Ta(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pa(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,va(r.key),r)}}function va(e){var t=function(e,t){if("object"!=Na(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Na(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Na(t)?t:t+""}var Da=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new R(n);var r=Ta(this.getCountryAndCallingCode(t),2),a=r[0],o=r[1];this.defaultCountry=a,this.defaultCallingCode=o,this.reset()},(t=[{key:"getCountryAndCallingCode",value:function(e){var t,n;return e&&(S(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,n]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(n){var r;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),void 0===r&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var a=this.state.getNationalDigits();a&&(r=this.formatter.format(a,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new wr({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new fa({state:this.state,metadata:this.metadata}),this.parser=new ba({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){var e=this.state.country;return e}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?"".concat(r," ").concat(e):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,r=e.nationalPrefix,a=t,o=n||r;return o&&(a=o+a),a}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(e?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,Fr)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(Oe(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,a=e.nationalSignificantNumber;if(t)return this.isInternational()?n?"+"+n+a:"+"+t:r||n?"+"+(r?this.metadata.countryCallingCode():n)+a:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,a=this._getCountry();if(t&&(a||r)){if(a&&a===this.defaultCountry){var o=new R(this.metadata.metadata);o.selectNumberingPlan(a);var s=o.numberingPlan.callingCode(),i=this.metadata.getCountryCodesForCallingCode(s);if(i.length>1){var c=Te(t,{countries:i,metadata:this.metadata.metadata});c&&(a=c)}}var l=new Qe(a||r,t,this.metadata.metadata);return n&&(l.carrierCode=n),l}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])&&Oa(e.prototype,t),n&&Oa(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Ra(e){return Da.call(this,e,r)}function $a(){return a(V,arguments)}function xa(e){return new R(e).getCountries()}function wa(){return a(xa,arguments)}function Ma(){return a(k,arguments)}function La(){return a(U,arguments)}function Fa(){return R.call(this,r)}function ja(e,t,n){if(t[e])return new Qe(e,t[e],n)}function Ua(){return a(ja,arguments)}function ka(e,t,n){return n||(n=t,t=void 0),new Da(t,n).input(e)}function Va(){return a(ka,arguments)}function Ba(e){return Qe.call(this,e,r)}function Ga(){var e=bt(arguments);return ht(e.text,e.options,e.metadata)}function Wa(){return a(Ga,arguments)}function Ha(){var e=function(e){var t,n,r,a,o=e[0],s=e[1],i=e[2],c=e[3],l=e[4];if("string"==typeof o)if("string"==typeof i)n=i,l?(r=c,a=l):a=c,t=ht(o,{defaultCountry:s,extended:!0},a);else{if("string"!=typeof s)throw new Error("`format` argument not passed to `formatNumber(number, format)`");n=s,c?(r=i,a=c):a=i,t=ht(o,{extended:!0},a)}else{if(!S(o))throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");t=o,n=s,c?(r=i,a=c):a=i}"International"===n?n="INTERNATIONAL":"National"===n&&(n="NATIONAL");return{input:t,format:n,options:r,metadata:a}}(arguments);return Be(e.input,e.format,e.options,e.metadata)}function qa(){return a(Ha,arguments)}function za(){var e=Ya(arguments),t=e.input,n=e.options,r=e.metadata;if(t.phone)return ye(t,n,r)}function Ya(e){var t,n,r=e[0],a=e[1],o=e[2],s=e[3],i={};if("string"==typeof r)S(a)?(o?(i=a,n=o):n=a,t=J(r)?ht(r,void 0,n):{}):(s?(i=o,n=s):n=o,t=J(r)?ht(r,{defaultCountry:a},n):{});else{if(!S(r))throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");t=r,o?(i=a,n=o):n=a}return{input:t,options:i,metadata:n}}function Ka(){return a(za,arguments)}function Ja(){var e=Ya(arguments),t=e.input,n=e.options,r=e.metadata;return!!(t.phone||n&&n.v2)&&ue(t,n,r)}function Xa(){return a(Ja,arguments)}function Qa(){var e=Ya(arguments),t=e.input,n=e.options,r=e.metadata;return!!t.phone&&Ee(t,n,r)}function Za(){return a(Qa,arguments)}function eo(e,t,n){if("string"!=typeof e)throw new TypeError("number must be a string");if("string"!=typeof t)throw new TypeError("country must be a string");return function(e,t,n,r){return n=n||{},e.country===t&&Ee(e,n,r)}(J(e)?ht(e,{defaultCountry:t},n):{},t,void 0,n)}function to(){return a(eo,arguments)}function no(e){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},no(e)}function ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ao(r.key),r)}}function ao(e){var t=function(e,t){if("object"!=no(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=no(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==no(t)?t:t+""}Ra.prototype=Object.create(Da.prototype,{}),Ra.prototype.constructor=Ra,Fa.prototype=Object.create(R.prototype,{}),Fa.prototype.constructor=Fa,Ba.prototype=Qe.prototype,Ba.prototype.constructor=Ba;var oo=new RegExp("^["+l+"]+"),so=new RegExp("["+d+"]+$"),io=function(){return e=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.text=t,this.options=n||{},this.metadata=r,this.state="NOT_READY",this.regexp=new RegExp(Y,"ig")},t=[{key:"find",value:function(){var e=this.regexp.exec(this.text);if(e){var t=e[0],n=e.index;t=t.replace(oo,""),n+=e[0].length-t.length,t=Mn(t=t.replace(so,""));var r=this.parseCandidate(t,n);return r||this.find()}}},{key:"parseCandidate",value:function(e,t){if(Un(e,t,this.text)&&Yn(e,t,this.text,this.options.extended?"POSSIBLE":"VALID")){var n=ht(e,this.options,this.metadata);if(n.phone)return n.startsAt=t,n.endsAt=t+e.length,n}}},{key:"hasNext",value:function(){return"NOT_READY"===this.state&&(this.last_match=this.find(),this.last_match?this.state="READY":this.state="DONE"),"READY"===this.state}},{key:"next",value:function(){if(!this.hasNext())throw new Error("No next element");var e=this.last_match;return this.last_match=null,this.state="NOT_READY",e}}],t&&ro(e.prototype,t),n&&ro(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();W();function co(){var e=bt(arguments);return function(e,t,n){void 0===t&&(t={});for(var r=new io(e,t,n),a=[];r.hasNext();)a.push(r.next());return a}(e.text,e.options,e.metadata)}function lo(){var e=bt(arguments);return function(e,t,n){void 0===t&&(t={});var r=new io(e,t,n),a={};return a[Symbol.iterator]=function(){return{next:function(){return r.hasNext()?{done:!1,value:r.next()}:{done:!0}}}},a}(e.text,e.options,e.metadata)}function uo(){return a(co,arguments)}function po(){return a(lo,arguments)}function ho(e,t){io.call(this,e,t,r)}ho.prototype=Object.create(io.prototype,{}),ho.prototype.constructor=ho}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r](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),(()=>{"use strict";var e={};n.r(e),n.d(e,{buildContextName:()=>H,buildModalContext:()=>K,buildTransientContextName:()=>q,getContainerIdFromContext:()=>X,getParentContext:()=>J,getParentContextName:()=>W,getTargetFromContext:()=>Y,getTransientContext:()=>z});var t={};n.r(t),n.d(t,{getResolvedTargetName:()=>Ot,getRoutingInfo:()=>vt,getSemanticURLFromRoutingInfo:()=>Dt});var r={};n.r(r),n.d(r,{evaluate:()=>cn,handleChange:()=>on,hasDeclareExpression:()=>an,updateDeclareExpressions:()=>sn});var a={};n.r(a),n.d(a,{hasBrowserEnv:()=>_r,hasStandardBrowserEnv:()=>br,hasStandardBrowserWebWorkerEnv:()=>Nr,navigator:()=>Sr,origin:()=>Tr});var o={};n.r(o),n.d(o,{publishExpressions:()=>Ui,publishResponse:()=>ki});var s={};n.r(s),n.d(s,{doesRestApiExist:()=>qi,getCancelTokenSource:()=>zi,getCaseApi:()=>Ji,getHeaderProcessor:()=>Gi,invokeCustomRestApi:()=>Hi,invokeRestApi:()=>Wi,isRequestCanceled:()=>Yi,registerInterceptor:()=>Ki});var i={};n.r(i),n.d(i,{fetchViewResources:()=>Su,updateViewResources:()=>_u});var c={};n.r(c),n.d(c,{CONTAINER_NAMES:()=>yp,CONTAINER_TYPES:()=>mp,addRootContainerItem:()=>Xp,areContainerItemsPresent:()=>bp,clearTransientData:()=>rh,closeContainerItem:()=>Jp,getActiveContainerItemContext:()=>Mp,getActiveContainerItemIDFromRoutingInfo:()=>gh,getActiveContainerItemName:()=>Rp,getActiveContext:()=>uh,getChildContainerItems:()=>Lp,getChildContainers:()=>Fp,getChildContainersContexts:()=>jp,getContainerAPI:()=>sh,getContainerAccessOrder:()=>Sp,getContainerData:()=>Ap,getContainerItemByKey:()=>Op,getContainerItemData:()=>Cp,getContainerItemName:()=>Tp,getContainerItems:()=>_p,getContainerLimit:()=>Gp,getContainerParentContext:()=>fh,getContainerType:()=>Dp,getContextByTargetAndKey:()=>hh,getDataContextName:()=>wp,getFlowContainer:()=>yh,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Yp,getParentContainerItem:()=>mh,getRootContainerName:()=>dh,getSuggestionContexts:()=>Up,getTargetFromContainerItemID:()=>Kp,getTransientItems:()=>eh,hasContainerItems:()=>Bp,isContainerDirty:()=>zp,isContainerInitialized:()=>vp,isContainerItemActive:()=>$p,isContainerItemContextBeingUsedInOtherContainers:()=>Zp,isContainerItemExists:()=>Np,isContainerLimitReached:()=>Hp,isContainerMultipleMode:()=>Vp,isContainerSingleMode:()=>kp,purgeTransientData:()=>ah,removeContainer:()=>ih,replaceTransientData:()=>nh,resetContainersPayload:()=>qp,setContainerLimit:()=>Wp,updateCaseContextEtag:()=>lh,updateParentLastUpdateTime:()=>ph,updateRelatedContextEtag:()=>ch,updateTransientData:()=>th});var l={};n.r(l),n.d(l,{getAIAgent:()=>mf,getAdditionalInfo:()=>Cf,getDataPageKeys:()=>If,getDataPageMetadata:()=>lf,getEmbeddedPropertyMetadata:()=>tf,getFieldParameters:()=>hf,getFieldsByClassName:()=>pf,getGenAICoach:()=>gf,getInsight:()=>uf,getLocaleUtilsForLanguage:()=>Zh,getLocalizationServiceFromStore:()=>ef,getLookUpDataPage:()=>Ef,getLookUpDataPageInfo:()=>Af,getParagraph:()=>ff,getPersonalizationMetadata:()=>df,getPropertyMetadata:()=>Qh,getResolvedFieldMetadata:()=>_f,getSavableDataPage:()=>yf,isViewExists:()=>sf,mergeStore:()=>Xh,resolveNavigation:()=>cf,resolveView:()=>of,updateNavigationStore:()=>rf,updateStores:()=>af,updateViewStore:()=>nf});var d={};n.r(d),n.d(d,{dispatch:()=>vf,doesContextExist:()=>Wf,getActionType:()=>Lf,getContextValue:()=>wf,getDataObject:()=>Df,getReferenceTokens:()=>Tf,getSharedDataObject:()=>Rf,getStore:()=>Of,getValue:()=>xf,isMergeable:()=>jf,lookupContextValue:()=>Mf,mergeDeep:()=>kf,performReplaceAndRearrange:()=>Uf,removeItem:()=>Ff,replaceValue:()=>Bf,resetStore:()=>Gf,setStore:()=>Pf,updateValue:()=>Vf});var u={};n.r(u),n.d(u,{activateContainerItem:()=>Ag,addContainerItem:()=>dg,addMessages:()=>Cg,addSharedData:()=>Rg,addTransientItem:()=>ug,addWork:()=>sg,clearTransientData:()=>hg,createWork:()=>eg,error:()=>Dg,finishAssignment:()=>Tg,initContainers:()=>cg,listAction:()=>xg,loadView:()=>ag,mergeData:()=>ng,openAssignment:()=>Pg,openWorkByHandle:()=>ig,postProcess:()=>vg,purgeTransientData:()=>gg,removeAllTransientItems:()=>Sg,removeContainerItem:()=>_g,removeSharedData:()=>$g,removeTransientItem:()=>bg,replaceContainerItem:()=>Ng,replaceTransientData:()=>fg,resetContainers:()=>lg,resetLoading:()=>Ig,setLoading:()=>yg,setSharedProperty:()=>Mg,setStateProperty:()=>Lg,showCasePreview:()=>wg,showHarness:()=>rg,showHistory:()=>Og,showPage:()=>og,upMergeAndRemoveContainerItem:()=>Eg,updateContainerItem:()=>mg,updateTransientData:()=>pg});var p=n(216),h=n.n(p);let f,g,m;const y=e=>{e&&(f=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},f.BASEURL=e.server,f.ACTIONURL=e["action-end-point"],f.DATAURL=e["data-end-point"],m=e.reAuthUrl)},I=()=>m,E=()=>f.BASEURL,A=e=>fetch(`${f.BASEURL}${f.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),C=e=>{g=e},_=()=>g;var S=n(953),b=n(521),N=n.n(b),T=n(928),P=n.n(T),O=n(188),v=n.n(O),D=n(835),R=n.n(D),$=n(692),x=n.n($),w=n(529),M=n.n(w);const L=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},F={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails",OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:"SubscriptView"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_INFO_CLASSNAME:"caseInfo.className",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"}},j={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_DYNAMIC_WHENS:"summary_of_dynamic_whens__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",CUSTOM_ERROR:"custom error",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_ERROR:"onRefreshError",ON_REFRESH_COMPLETE:"onRefreshComplete",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",PARAGRAPH_ANNOTATION:"@PARAGRAPH",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",PY_CONFIRM:"pyConfirm",LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...F,getProperty:e=>L.map(e)},U="pyRemoteCaseDetails";class k{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Jf.getProperty(".RemoteSystemID",j.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=$h.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const V=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let a=`${t}${j.FORWARD_SLASH_STRING}${e}`;const o=Ap(a);if(o||t!==j.APP.APP&&t!==j.APP.ROOT)if(o){if(n&&B[a])return r=`${a}${j.UNDERSCORE_STRING}${B[a]}`,r;B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}else r=H(e,W(t));else a=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},z=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},Y=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},K=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},J=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},X=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",ae="SHOW_INSIGHT",oe="SHOW_DASHBOARD",se="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",le="CREATE_WORK",de="OPEN_WORK_BY_HANDLE",ue="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",fe="OPEN_ASSIGNMENT",ge="MERGE_DATA",me="REMOVE_ITEM",ye="GET_DATAOBJECT_ACTIONS",Ie="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",Ce="RESET_CONTAINERS",_e="ADD_CONTAINER_ITEM",Se="REMOVE_CONTAINER_ITEM",be="ADD_TRANSIENT_ITEM",Ne="UPDATE_TRANSIENT_DATA",Te="REMOVE_TRANSIENT_ITEM",Pe="REMOVE_ALL_TRANSIENT_ITEMS",Oe="CLEAR_TRANSIENT_DATA",ve="PURGE_TRANSIENT_DATA",De="REPLACE_TRANSIENT_DATA",Re="ACTIVATE_CONTAINER_ITEM",$e="UPDATE_CONTAINER_ITEM",xe="UPMERGE_AND_REMOVE_CONTAINER_ITEM",we="REPLACE_CONTAINER_ITEM",Me="ACTIVATE_MODAL_CONTAINER_ITEM",Le="REMOVE_CONTAINER",Fe="ADD_SUGGESTION_CONTEXT",je="showView",Ue="showData",ke="showInsight",Ve="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="deleteCaseInCreateStage",ze="openLocalAction",Ye="openProcessAction",Ke="caseWideActions",Je="openBulkAction",Xe="performBulkAction",Qe="launchAssignment",Ze="ADD_MESSAGES",et="CLEAR_MESSAGES",tt="RESET_STORE",nt="FETCH_DATAPAGE",rt="ADD_SHARED_DATA",at="REMOVE_SHARED_DATA",ot="LIST_ACTION",st="DELETE_CASE_SUMMARY",it="ALTER_BLOCKING_ACTION_COUNT",ct="CREATE_DATA_OBJECT",lt="DELETE_DATA_OBJECT",dt="VIEW_DATA_OBJECT",ut="UPDATE_DATA_OBJECT",pt="OPEN_DATA_OBJECT_ACTION",ht="SUBMIT_DATA_OBJECT_ACTION",ft="OPEN_EMBEDDED_DATA_MODAL",gt="SUBMIT_EMBEDDED_DATA_MODAL",mt="SUBMIT_SUBSCRIPT",yt="FILL_FORM_WITH_AI",It="createWork",Et="openAssignment",At="openCase",Ct="OPEN_OBJECT_ACTION",_t="EXECUTE_OBJECT_WIDE_ACTION",St="DELETE_WORK",bt="createObject",Nt="getObject",Tt="getObjectWideAction",Pt="createExternalObject",Ot=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=Ap(r),n||t.includes("/")?n||(r=Ot(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},vt=(e,t)=>{const n=Ot(e,t);return n&&Ap(n)?Ap(n):{}},Dt=(e,t)=>Dh.getSemanticURL(je,{page:e},t);class Rt{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=kt[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser?._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes?.[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=Ut[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=kt[this._state];this._subParser=new Rt(this._grammar,e,t)}_endSubExpression(){kt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,Rt._setParent(e,this._position)):this._tree=e,this._position=e}}const $t=Rt,xt="identifier",wt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Mt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Lt=(e,t,n)=>{const r=""===e,a=""===t||null==t;if(r&&a)return n;if("boolean"==typeof t){const a=!!(!r&&"false"!==e&&"0"!==e)&&Boolean(e);return n?a===t:a!==t}return r!==a?!n:n?e===t:e!==t},Ft={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>Lt(e,t,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>Lt(e,t,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":wt,AND:wt,and:wt,"||":Mt,OR:Mt,or:Mt,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},jt={BinaryExpression:function(e){const t=[];let n="";const r=e.right,a=e.operator,o=e.left;if(t[0]=this.evaluateAST(o),o.operationType===xt&&this._context){const e=o.value;n=this._context.getFieldMetadata(e.substring(1))?.type??""}t[1]=r?this.evaluateAST(r,n):"";return(0,this._grammar[a].evaluate)(t[0],t[1])},identifier:function(e){return this._localDataObject?qf.getIn(this._localDataObject,e.value?e.value.substring(1).split("."):[])??"":this._contextTreeNodeContext?Jf.getLitePropertyValue(this._contextTreeNodeContext,e.value)??"":this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;return(0,this._grammar[t].evaluate)(n)}},Ut={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;const r=n?n.operator:null,a=r?this._grammar[r]:null,o=a?a.precedence:null;if(o&&t)for(;n?.operator&&o>=t;)this._position=n,n=n._parent;const s={operationType:"BinaryExpression",operator:e.value,left:this._position};$t._setParent(this._position,s),this._position=n,this.setPositionInAST(s)},identifier:function(e){const t={operationType:xt,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},kt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:xt},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Ut.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Vt=["binaryOperator","unaryOperator","openParenthesis"],Bt=/^\s*$/,Gt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Wt=/\\\\/,Ht=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],qt=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],zt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Yt{constructor(e){this._grammar=e}static _isNegative(e){return Vt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Bt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(Gt)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(Wt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Yt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[Ht.join("|"),e.join("|"),qt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=Yt._unquote(e):e.match(zt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(Gt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Yt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Yt._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const Kt=Yt;const Jt=class{constructor(e,t){this._grammar={...Ft},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new Kt(this._grammar).tokenize(this._expression),t=new $t(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return tn(e.operationType,jt)&&jt[e.operationType].call(this,e,t)}},Xt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new Jt(n,t)},Qt=e=>!e||e.buildAST(),Zt=(e,t,n)=>!e||e.evaluate(t,n),en=(e,t,n)=>{const r=Xt(e,t),a=Qt(r);return Zt(a,n)},tn=(e,t)=>e in t;const nn=class{static handleExpression(e,t,n,r){const a=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:a}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:Jf.getPropertyValue(`${n}.pxObjClass`,null,t)||Jf.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>vf({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},rn={},an=(e,t)=>rn[t]&&Object.hasOwn(rn[t],e),on=e=>{const{context:t}=e;an(e.reference,t)&&nn.handleExpression(e.reference,e.value,rn[t][e.reference],t)},sn=(e={})=>{qf.copy(e,rn)},cn=(e,t,n)=>en(e,t,n?.pConnect.getPConnect());const ln=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const dn=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){qf.copy(e,this.componentMap)}mergeOverrideMap(e={}){qf.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const un=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const pn=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),a=-1===r?e:e.substring(0,r),o=un.getHandler(a);return o?o(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return un.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=dn.getComponent(t.type);if(!r?.mapping)return;const a=r.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:r}=t;if(!r)return;const o=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,o);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];o.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let a=n[r];a&&0===a.indexOf(".")?(a=a.substring(1),t[r]=e[a]):t[r]=a})),r.push(t)}))}}}static getPropertyName(e=""){if(e&&qf.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(qf.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return qf.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}};function hn(e,t){return function(){return e.apply(t,arguments)}}const{toString:fn}=Object.prototype,{getPrototypeOf:gn}=Object,{iterator:mn,toStringTag:yn}=Symbol,In=(En=Object.create(null),e=>{const t=fn.call(e);return En[t]||(En[t]=t.slice(8,-1).toLowerCase())});var En;const An=e=>(e=e.toLowerCase(),t=>In(t)===e),Cn=e=>t=>typeof t===e,{isArray:_n}=Array,Sn=Cn("undefined");function bn(e){return null!==e&&!Sn(e)&&null!==e.constructor&&!Sn(e.constructor)&&Pn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Nn=An("ArrayBuffer");const Tn=Cn("string"),Pn=Cn("function"),On=Cn("number"),vn=e=>null!==e&&"object"==typeof e,Dn=e=>{if("object"!==In(e))return!1;const t=gn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||yn in e||mn in e)},Rn=An("Date"),$n=An("File"),xn=An("Blob"),wn=An("FileList");const Mn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Ln=void 0!==Mn.FormData?Mn.FormData:void 0,Fn=An("URLSearchParams"),[jn,Un,kn,Vn]=["ReadableStream","Request","Response","Headers"].map(An);function Bn(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),_n(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(bn(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function Gn(e,t){if(bn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const Wn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Hn=e=>!Sn(e)&&e!==Wn;const qn=(zn="undefined"!=typeof Uint8Array&&gn(Uint8Array),e=>zn&&e instanceof zn);var zn;const Yn=An("HTMLFormElement"),Kn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jn=An("RegExp"),Xn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Bn(n,((n,a)=>{let o;!1!==(o=t(n,a,e))&&(r[a]=o||n)})),Object.defineProperties(e,r)};const Qn=An("AsyncFunction"),Zn=(er="function"==typeof setImmediate,tr=Pn(Wn.postMessage),er?setImmediate:tr?(nr=`axios@${Math.random()}`,rr=[],Wn.addEventListener("message",(({source:e,data:t})=>{e===Wn&&t===nr&&rr.length&&rr.shift()()}),!1),e=>{rr.push(e),Wn.postMessage(nr,"*")}):e=>setTimeout(e));var er,tr,nr,rr;const ar="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Wn):"undefined"!=typeof process&&process.nextTick||Zn,or={isArray:_n,isArrayBuffer:Nn,isBuffer:bn,isFormData:e=>{if(!e)return!1;if(Ln&&e instanceof Ln)return!0;const t=gn(e);if(!t||t===Object.prototype)return!1;if(!Pn(e.append))return!1;const n=In(e);return"formdata"===n||"object"===n&&Pn(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Nn(e.buffer),t},isString:Tn,isNumber:On,isBoolean:e=>!0===e||!1===e,isObject:vn,isPlainObject:Dn,isEmptyObject:e=>{if(!vn(e)||bn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:jn,isRequest:Un,isResponse:kn,isHeaders:Vn,isUndefined:Sn,isDate:Rn,isFile:$n,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:xn,isRegExp:Jn,isFunction:Pn,isStream:e=>vn(e)&&Pn(e.pipe),isURLSearchParams:Fn,isTypedArray:qn,isFileList:wn,forEach:Bn,merge:function e(){const{caseless:t,skipUndefined:n}=Hn(this)&&this||{},r={},a=(a,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&Gn(r,o)||o;Dn(r[s])&&Dn(a)?r[s]=e(r[s],a):Dn(a)?r[s]=e({},a):_n(a)?r[s]=a.slice():n&&Sn(a)||(r[s]=a)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Bn(arguments[e],a);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Bn(t,((t,r)=>{n&&Pn(t)?Object.defineProperty(e,r,{value:hn(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,o,s;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==n&&gn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:In,kindOfTest:An,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(_n(e))return e;let t=e.length;if(!On(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[mn]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Yn,hasOwnProperty:Kn,hasOwnProp:Kn,reduceDescriptors:Xn,freezeMethods:e=>{Xn(e,((t,n)=>{if(Pn(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Pn(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return _n(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Gn,global:Wn,isContextDefined:Hn,isSpecCompliantForm:function(e){return!!(e&&Pn(e.append)&&"FormData"===e[yn]&&e[mn])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(vn(e)){if(t.indexOf(e)>=0)return;if(bn(e))return e;if(!("toJSON"in e)){t[r]=e;const a=_n(e)?[]:{};return Bn(e,((e,t)=>{const o=n(e,r+1);!Sn(o)&&(a[t]=o)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:Qn,isThenable:e=>e&&(vn(e)||Pn(e))&&Pn(e.then)&&Pn(e.catch),setImmediate:Zn,asap:ar,isIterable:e=>null!=e&&Pn(e[mn])};class sr extends Error{static from(e,t,n,r,a,o){const s=new sr(e.message,t||e.code,n,r,a);return s.cause=e,s.name=e.name,null!=e.status&&null==s.status&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,a){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:or.toJSONObject(this.config),code:this.code,status:this.status}}}sr.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",sr.ERR_BAD_OPTION="ERR_BAD_OPTION",sr.ECONNABORTED="ECONNABORTED",sr.ETIMEDOUT="ETIMEDOUT",sr.ERR_NETWORK="ERR_NETWORK",sr.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",sr.ERR_DEPRECATED="ERR_DEPRECATED",sr.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",sr.ERR_BAD_REQUEST="ERR_BAD_REQUEST",sr.ERR_CANCELED="ERR_CANCELED",sr.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",sr.ERR_INVALID_URL="ERR_INVALID_URL",sr.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const ir=sr;function cr(e){return or.isPlainObject(e)||or.isArray(e)}function lr(e){return or.endsWith(e,"[]")?e.slice(0,-2):e}function dr(e,t,n){return e?e.concat(t).map((function(e,t){return e=lr(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ur=or.toFlatObject(or,{},null,(function(e){return/^is[A-Z]/.test(e)}));const pr=function(e,t,n){if(!or.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=or.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!or.isUndefined(t[e])}))).metaTokens,a=n.visitor||u,o=n.dots,s=n.indexes,i=n.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===n.maxDepth?100:n.maxDepth,l=i&&or.isSpecCompliantForm(t);if(!or.isFunction(a))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(or.isDate(e))return e.toISOString();if(or.isBoolean(e))return e.toString();if(!l&&or.isBlob(e))throw new ir("Blob is not supported. Use a Buffer instead.");return or.isArrayBuffer(e)||or.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,a){let i=e;if(or.isReactNative(t)&&or.isReactNativeBlob(e))return t.append(dr(a,n,o),d(e)),!1;if(e&&!a&&"object"==typeof e)if(or.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(or.isArray(e)&&function(e){return or.isArray(e)&&!e.some(cr)}(e)||(or.isFileList(e)||or.endsWith(n,"[]"))&&(i=or.toArray(e)))return n=lr(n),i.forEach((function(e,r){!or.isUndefined(e)&&null!==e&&t.append(!0===s?dr([n],r,o):null===s?n:n+"[]",d(e))})),!1;return!!cr(e)||(t.append(dr(a,n,o),d(e)),!1)}const p=[],h=Object.assign(ur,{defaultVisitor:u,convertValue:d,isVisitable:cr});if(!or.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o=0){if(!or.isUndefined(n)){if(o>c)throw new ir("Object is too deeply nested ("+o+" levels). Max depth: "+c,ir.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+r.join("."));p.push(n),or.forEach(n,(function(n,s){!0===(!(or.isUndefined(n)||null===n)&&a.call(t,n,or.isString(s)?s.trim():s,r,h))&&e(n,r?r.concat(s):[s],o+1)})),p.pop()}}(e),t};function hr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,(function(e){return t[e]}))}function fr(e,t){this._pairs=[],e&&pr(e,this,t)}const gr=fr.prototype;gr.append=function(e,t){this._pairs.push([e,t])},gr.toString=function(e){const t=e?function(t){return e.call(this,t,hr)}:hr;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const mr=fr;function yr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ir(e,t,n){if(!t)return e;const r=n&&n.encode||yr,a=or.isFunction(n)?{serialize:n}:n,o=a&&a.serialize;let s;if(s=o?o(t,a):or.isURLSearchParams(t)?t.toString():new mr(t,a).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const Er=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){or.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ar={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Cr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_r="undefined"!=typeof window&&"undefined"!=typeof document,Sr="object"==typeof navigator&&navigator||void 0,br=_r&&(!Sr||["ReactNative","NativeScript","NS"].indexOf(Sr.product)<0),Nr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Tr=_r&&window.location.href||"http://localhost",Pr={...a,...Cr};const Or=function(e){function t(e,n,r,a){let o=e[a++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),i=a>=e.length;if(o=!o&&or.isArray(r)?r.length:o,i)return or.hasOwnProp(r,o)?r[o]=or.isArray(r[o])?r[o].concat(n):[r[o],n]:r[o]=n,!s;r[o]&&or.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],a)&&or.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}(r[o])),!s}if(or.isFormData(e)&&or.isFunction(e.entries)){const n={};return or.forEachEntry(e,((e,r)=>{t(function(e){return or.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},vr=(e,t)=>null!=e&&or.hasOwnProp(e,t)?e[t]:void 0;const Dr={transitional:Ar,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=or.isObject(e);a&&or.isHTMLForm(e)&&(e=new FormData(e));if(or.isFormData(e))return r?JSON.stringify(Or(e)):e;if(or.isArrayBuffer(e)||or.isBuffer(e)||or.isStream(e)||or.isFile(e)||or.isBlob(e)||or.isReadableStream(e))return e;if(or.isArrayBufferView(e))return e.buffer;if(or.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){const t=vr(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return pr(e,new Pr.classes.URLSearchParams,{visitor:function(e,t,n,r){return Pr.isNode&&or.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((o=or.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=vr(this,"env"),r=n&&n.FormData;return pr(o?{"files[]":e}:e,r&&new r,t)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(or.isString(e))try{return(t||JSON.parse)(e),or.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=vr(this,"transitional")||Dr.transitional,n=t&&t.forcedJSONParsing,r=vr(this,"responseType"),a="json"===r;if(or.isResponse(e)||or.isReadableStream(e))return e;if(e&&or.isString(e)&&(n&&!r||a)){const n=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e,vr(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw ir.from(e,ir.ERR_BAD_RESPONSE,this,null,vr(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pr.classes.FormData,Blob:Pr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};or.forEach(["delete","get","head","post","put","patch"],(e=>{Dr.headers[e]={}}));const Rr=Dr,$r=or.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xr=Symbol("internals"),wr=/[^\x09\x20-\x7E\x80-\xFF]/g;function Mr(e){return e&&String(e).trim().toLowerCase()}function Lr(e){return!1===e||null==e?e:or.isArray(e)?e.map(Lr):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(wr,""))}function Fr(e,t,n,r,a){return or.isFunction(r)?r.call(this,t,n):(a&&(t=n),or.isString(t)?or.isString(r)?-1!==t.indexOf(r):or.isRegExp(r)?r.test(t):void 0:void 0)}class jr{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=Mr(t);if(!a)throw new Error("header name must be a non-empty string");const o=or.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Lr(e))}const o=(e,t)=>or.forEach(e,((e,n)=>a(e,n,t)));if(or.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(or.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&$r[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(or.isObject(e)&&or.isIterable(e)){let n,r,a={};for(const t of e){if(!or.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(n=a[r])?or.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=Mr(e)){const n=or.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(or.isFunction(t))return t.call(this,e,n);if(or.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Mr(e)){const n=or.findKey(this,e);return!(!n||void 0===this[n]||t&&!Fr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=Mr(e)){const a=or.findKey(n,e);!a||t&&!Fr(0,n[a],a,t)||(delete n[a],r=!0)}}return or.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!Fr(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return or.forEach(this,((r,a)=>{const o=or.findKey(n,a);if(o)return t[o]=Lr(r),void delete t[a];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();s!==a&&delete t[a],t[s]=Lr(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return or.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&or.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[xr]=this[xr]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Mr(e);t[r]||(!function(e,t){const n=or.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[r]=!0)}return or.isArray(e)?e.forEach(r):r(e),this}}jr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),or.reduceDescriptors(jr.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),or.freezeMethods(jr);const Ur=jr;function kr(e,t){const n=this||Rr,r=t||n,a=Ur.from(r.headers);let o=r.data;return or.forEach(e,(function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)})),a.normalize(),o}function Vr(e){return!(!e||!e.__CANCEL__)}const Br=class extends ir{constructor(e,t,n){super(null==e?"canceled":e,ir.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Gr(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ir("Request failed with status code "+n.status,[ir.ERR_BAD_REQUEST,ir.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Wr=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,o=0,s=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[s];a||(a=c),n[o]=i,r[o]=c;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=l&&c-l;return p?Math.round(1e3*u/p):void 0}};const Hr=function(e,t){let n,r,a=0,o=1e3/t;const s=(t,o=Date.now())=>{a=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=o?s(e,t):(n=e,r||(r=setTimeout((()=>{r=null,s(n)}),o-i)))},()=>n&&s(n)]},qr=(e,t,n=3)=>{let r=0;const a=Wr(50,250);return Hr((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,i=null!=s?Math.min(o,s):o,c=Math.max(0,i-r),l=a(c);r=Math.max(r,i);e({loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s?(s-i)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},zr=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Yr=e=>(...t)=>or.asap((()=>e(...t))),Kr=Pr.hasStandardBrowserEnv?(Jr=new URL(Pr.origin),Xr=Pr.navigator&&/(msie|trident)/i.test(Pr.navigator.userAgent),e=>(e=new URL(e,Pr.origin),Jr.protocol===e.protocol&&Jr.host===e.host&&(Xr||Jr.port===e.port))):()=>!0;var Jr,Xr;const Qr=Pr.hasStandardBrowserEnv?{write(e,t,n,r,a,o,s){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];or.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),or.isString(r)&&i.push(`path=${r}`),or.isString(a)&&i.push(`domain=${a}`),!0===o&&i.push("secure"),or.isString(s)&&i.push(`SameSite=${s}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Zr(e,t,n){let r=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ea=e=>e instanceof Ur?{...e}:e;function ta(e,t){t=t||{};const n={};function r(e,t,n,r){return or.isPlainObject(e)&&or.isPlainObject(t)?or.merge.call({caseless:r},e,t):or.isPlainObject(t)?or.merge({},t):or.isArray(t)?t.slice():t}function a(e,t,n,a){return or.isUndefined(t)?or.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function o(e,t){if(!or.isUndefined(t))return r(void 0,t)}function s(e,t){return or.isUndefined(t)?or.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,a,o){return or.hasOwnProp(t,o)?r(n,a):or.hasOwnProp(e,o)?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t,n)=>a(ea(e),ea(t),0,!0)};return or.forEach(Object.keys({...e,...t}),(function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=or.hasOwnProp(c,r)?c[r]:a,s=o(or.hasOwnProp(e,r)?e[r]:void 0,or.hasOwnProp(t,r)?t[r]:void 0,r);or.isUndefined(s)&&o!==i||(n[r]=s)})),n}const na=e=>{const t=ta({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;if(t.headers=s=Ur.from(s),t.url=Ir(Zr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),or.isFormData(n))if(Pr.hasStandardBrowserEnv||Pr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(or.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)}))}if(Pr.hasStandardBrowserEnv){or.isFunction(r)&&(r=r(t));if(!0===r||null==r&&Kr(t.url)){const e=a&&o&&Qr.read(o);e&&s.set(a,e)}}return t},ra="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=na(e);let a=r.data;const o=Ur.from(r.headers).normalize();let s,i,c,l,d,{responseType:u,onUploadProgress:p,onDownloadProgress:h}=r;function f(){l&&l(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=Ur.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Gr((function(e){t(e),f()}),(function(e){n(e),f()}),{data:u&&"text"!==u&&"json"!==u?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new ir("Request aborted",ir.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=t&&t.message?t.message:"Network Error",a=new ir(r,ir.ERR_NETWORK,e,g);a.event=t||null,n(a),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Ar;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ir(t,a.clarifyTimeoutError?ir.ETIMEDOUT:ir.ECONNABORTED,e,g)),g=null},void 0===a&&o.setContentType(null),"setRequestHeader"in g&&or.forEach(o.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),or.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),u&&"json"!==u&&(g.responseType=r.responseType),h&&([c,d]=qr(h,!0),g.addEventListener("progress",c)),p&&g.upload&&([i,l]=qr(p),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{g&&(n(!t||t.type?new Br(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Pr.protocols.indexOf(y)?n(new ir("Unsupported protocol "+y+":",ir.ERR_BAD_REQUEST,e)):g.send(a||null)}))},aa=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const a=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ir?t:new Br(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,a(new ir(`timeout of ${t}ms exceeded`,ir.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>or.asap(s),i}},oa=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,a=0;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},sa=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ia=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of sa(e))yield*oa(n,t)}(e,t);let o,s=0,i=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let o=r.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},{isFunction:ca}=or,la=(({Request:e,Response:t})=>({Request:e,Response:t}))(or.global),{ReadableStream:da,TextEncoder:ua}=or.global,pa=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ha=e=>{e=or.merge.call({skipUndefined:!0},la,e);const{fetch:t,Request:n,Response:r}=e,a=t?ca(t):"function"==typeof fetch,o=ca(n),s=ca(r);if(!a)return!1;const i=a&&ca(da),c=a&&("function"==typeof ua?(l=new ua,e=>l.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var l;const d=o&&i&&pa((()=>{let e=!1;const t=new n(Pr.origin,{body:new da,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r})),u=s&&i&&pa((()=>or.isReadableStream(new r("").body))),p={stream:u&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!p[e]&&(p[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new ir(`Response type '${e}' is not supported`,ir.ERR_NOT_SUPPORT,n)})}));const h=async(e,t)=>{const r=or.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(or.isBlob(e))return e.size;if(or.isSpecCompliantForm(e)){const t=new n(Pr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return or.isArrayBufferView(e)||or.isArrayBuffer(e)?e.byteLength:(or.isURLSearchParams(e)&&(e+=""),or.isString(e)?(await c(e)).byteLength:void 0)})(t):r};return async e=>{let{url:a,method:s,data:i,signal:c,cancelToken:l,timeout:f,onDownloadProgress:g,onUploadProgress:m,responseType:y,headers:I,withCredentials:E="same-origin",fetchOptions:A}=na(e),C=t||fetch;y=y?(y+"").toLowerCase():"text";let _=aa([c,l&&l.toAbortSignal()],f),S=null;const b=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let N;try{if(m&&d&&"get"!==s&&"head"!==s&&0!==(N=await h(I,i))){let e,t=new n(a,{method:"POST",body:i,duplex:"half"});if(or.isFormData(i)&&(e=t.headers.get("content-type"))&&I.setContentType(e),t.body){const[e,n]=zr(N,qr(Yr(m)));i=ia(t.body,65536,e,n)}}or.isString(E)||(E=E?"include":"omit");const t=o&&"credentials"in n.prototype;if(or.isFormData(i)){const e=I.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&I.delete("content-type")}const c={...A,signal:_,method:s.toUpperCase(),headers:I.normalize().toJSON(),body:i,duplex:"half",credentials:t?E:void 0};S=o&&new n(a,c);let l=await(o?C(S,A):C(a,c));const f=u&&("stream"===y||"response"===y);if(u&&(g||f&&b)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=l[t]}));const t=or.toFiniteNumber(l.headers.get("content-length")),[n,a]=g&&zr(t,qr(Yr(g),!0))||[];l=new r(ia(l.body,65536,n,(()=>{a&&a(),b&&b()})),e)}y=y||"text";let T=await p[or.findKey(p,y)||"text"](l,e);return!f&&b&&b(),await new Promise(((t,n)=>{Gr(t,n,{data:T,headers:Ur.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:S})}))}catch(t){if(b&&b(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ir("Network Error",ir.ERR_NETWORK,e,S,t&&t.response),{cause:t.cause||t});throw ir.from(t,t&&t.code,e,S,t&&t.response)}}},fa=new Map,ga=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,o=[r,a,n];let s,i,c=o.length,l=fa;for(;c--;)s=o[c],i=l.get(s),void 0===i&&l.set(s,i=c?new Map:ha(t)),l=i;return i},ma=(ga(),{http:null,xhr:ra,fetch:{get:ga}});or.forEach(ma,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ya=e=>`- ${e}`,Ia=e=>or.isFunction(e)||null===e||!1===e;const Ea={getAdapter:function(e,t){e=or.isArray(e)?e:[e];const{length:n}=e;let r,a;const o={};for(let s=0;s<n;s++){let n;if(r=e[s],a=r,!Ia(r)&&(a=ma[(n=String(r)).toLowerCase()],void 0===a))throw new ir(`Unknown adapter '${n}'`);if(a&&(or.isFunction(a)||(a=a.get(t))))break;o[n||"#"+s]=a}if(!a){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(ya).join("\n"):" "+ya(e[0]):"as no adapter specified";throw new ir("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:ma};function Aa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Br(null,e)}function Ca(e){Aa(e),e.headers=Ur.from(e.headers),e.data=kr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ea.getAdapter(e.adapter||Rr.adapter,e)(e).then((function(t){return Aa(e),t.data=kr.call(e,e.transformResponse,t),t.headers=Ur.from(t.headers),t}),(function(t){return Vr(t)||(Aa(e),t&&t.response&&(t.response.data=kr.call(e,e.transformResponse,t.response),t.response.headers=Ur.from(t.response.headers))),Promise.reject(t)}))}const _a="1.15.1",Sa={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Sa[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const ba={};Sa.transitional=function(e,t,n){function r(e,t){return"[Axios v"+_a+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,o)=>{if(!1===e)throw new ir(r(a," has been removed"+(t?" in "+t:"")),ir.ERR_DEPRECATED);return t&&!ba[a]&&(ba[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,o)}},Sa.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Na={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ir("options must be an object",ir.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new ir("option "+o+" must be "+n,ir.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ir("Unknown option "+o,ir.ERR_BAD_OPTION)}},validators:Sa},Ta=Na.validators;class Pa{constructor(e){this.defaults=e||{},this.interceptors={request:new Er,response:new Er}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),a=-1===r?"":n.slice(r+1);String(e.stack).endsWith(a)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ta(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Na.assertOptions(n,{silentJSONParsing:Ta.transitional(Ta.boolean),forcedJSONParsing:Ta.transitional(Ta.boolean),clarifyTimeoutError:Ta.transitional(Ta.boolean),legacyInterceptorReqResOrdering:Ta.transitional(Ta.boolean)},!1),null!=r&&(or.isFunction(r)?t.paramsSerializer={serialize:r}:Na.assertOptions(r,{encode:Ta.function,serialize:Ta.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Na.assertOptions(t,{baseUrl:Ta.spelling("baseURL"),withXsrfToken:Ta.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&or.merge(a.common,a[t.method]);a&&or.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Ur.concat(o,a);const s=[];let i=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const n=t.transitional||Ar;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!i){const e=[Ca.bind(this),void 0];for(e.unshift(...s),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=s.length;let p=t;for(;u<d;){const e=s[u++],t=s[u++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ca.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return Ir(Zr((e=ta(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}or.forEach(["delete","get","head","options"],(function(e){Pa.prototype[e]=function(t,n){return this.request(ta(n||{},{method:e,url:t,data:(n||{}).data}))}})),or.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(ta(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Pa.prototype[e]=t(),Pa.prototype[e+"Form"]=t(!0)}));const Oa=Pa;class va{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,a){n.reason||(n.reason=new Br(e,r,a),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new va((function(t){e=t})),cancel:e}}}const Da=va;const Ra={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ra).forEach((([e,t])=>{Ra[t]=e}));const $a=Ra;const xa=function e(t){const n=new Oa(t),r=hn(Oa.prototype.request,n);return or.extend(r,Oa.prototype,n,{allOwnKeys:!0}),or.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ta(t,n))},r}(Rr);xa.Axios=Oa,xa.CanceledError=Br,xa.CancelToken=Da,xa.isCancel=Vr,xa.VERSION=_a,xa.toFormData=pr,xa.AxiosError=ir,xa.Cancel=xa.CanceledError,xa.all=function(e){return Promise.all(e)},xa.spread=function(e){return function(t){return e.apply(null,t)}},xa.isAxiosError=function(e){return or.isObject(e)&&!0===e.isAxiosError},xa.mergeConfig=ta,xa.AxiosHeaders=Ur,xa.formToJSON=e=>Or(or.isHTMLForm(e)?new FormData(e):e),xa.getAdapter=Ea.getAdapter,xa.HttpStatusCode=$a,xa.default=xa;const wa=xa;function Ma(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var La=Ma((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var Fa=function(e,t){return Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Fa(e,t)};function ja(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Fa(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ua(e,t,n,r){return new(n||(n=Promise))((function(a,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((r=r.apply(e,t||[])).next())}))}function ka(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=i(0),s.throw=i(1),s.return=i(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Va(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ba(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return s}function Ga(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function Wa(e){return this instanceof Wa?(this.v=e,this):new Wa(e)}function Ha(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||i(e,t)}))},t&&(r[e]=t(r[e])))}function i(e,t){try{(n=a[e](t)).value instanceof Wa?Promise.resolve(n.value.v).then(c,l):d(o[0][2],n)}catch(e){d(o[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function d(e,t){e(t),o.shift(),o.length&&i(o[0][0],o[0][1])}}function qa(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Va(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,a){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,a,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var za=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Ya(e){return"function"==typeof e}function Ka(e){return Ya(null==e?void 0:e.then)}var Ja=Ma((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function Xa(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Qa=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Va(o),i=s.next();!i.done;i=s.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(Ya(c))try{c()}catch(e){a=e instanceof Ja?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=Va(l),u=d.next();!u.done;u=d.next()){var p=u.value;try{to(p)}catch(e){a=null!=a?a:[],e instanceof Ja?a=Ga(Ga([],Ba(a)),Ba(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}if(a)throw new Ja(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)to(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Xa(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Xa(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),Za=Qa.EMPTY;function eo(e){return e instanceof Qa||e&&"closed"in e&&Ya(e.remove)&&Ya(e.add)&&Ya(e.unsubscribe)}function to(e){Ya(e)?e():e.unsubscribe()}var no={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ro={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=ro.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,Ga([e,t],Ba(n))):setTimeout.apply(void 0,Ga([e,t],Ba(n)))},clearTimeout:function(e){var t=ro.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ao(e){ro.setTimeout((function(){var t=no.onUnhandledError;if(!t)throw e;t(e)}))}function oo(){}var so=io("C",void 0,void 0);function io(e,t,n){return{kind:e,value:t,error:n}}var co=null;function lo(e){if(no.useDeprecatedSynchronousErrorHandling){var t=!co;if(t&&(co={errorThrown:!1,error:null}),e(),t){var n=co,r=n.errorThrown,a=n.error;if(co=null,r)throw a}}else e()}var uo=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,eo(t)&&t.add(n)):n.destination=Io,n}return ja(t,e),t.create=function(e,t,n){return new go(e,t,n)},t.prototype.next=function(e){this.isStopped?yo(function(e){return io("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?yo(io("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?yo(so,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Qa),po=Function.prototype.bind;function ho(e,t){return po.call(e,t)}var fo=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){mo(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){mo(e)}else mo(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){mo(e)}},e}(),go=function(e){function t(t,n,r){var a,o,s=e.call(this)||this;Ya(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&no.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},a={next:t.next&&ho(t.next,o),error:t.error&&ho(t.error,o),complete:t.complete&&ho(t.complete,o)}):a=t;return s.destination=new fo(a),s}return ja(t,e),t}(uo);function mo(e){var t;no.useDeprecatedSynchronousErrorHandling?(t=e,no.useDeprecatedSynchronousErrorHandling&&co&&(co.errorThrown=!0,co.error=t)):ao(e)}function yo(e,t){var n=no.onStoppedNotification;n&&ro.setTimeout((function(){return n(e,t)}))}var Io={closed:!0,next:oo,error:function(e){throw e},complete:oo},Eo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ao(e){return e}function Co(e){return 0===e.length?Ao:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var _o=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,a=this,o=(r=e)&&r instanceof uo||function(e){return e&&Ya(e.next)&&Ya(e.error)&&Ya(e.complete)}(r)&&eo(r)?e:new go(e,t,n);return lo((function(){var e=a,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?a._subscribe(o):a._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=So(t))((function(t,r){var a=new go({next:function(t){try{e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Eo]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Co(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=So(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function So(e){var t;return null!==(t=null!=e?e:no.Promise)&&void 0!==t?t:Promise}function bo(e){return Ya(e[Eo])}function No(e){return Symbol.asyncIterator&&Ya(null==e?void 0:e[Symbol.asyncIterator])}function To(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Po="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Oo(e){return Ya(null==e?void 0:e[Po])}function vo(e){return Ha(this,arguments,(function(){var t,n,r;return ka(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Wa(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,Wa(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Wa(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Do(e){return Ya(null==e?void 0:e.getReader)}function Ro(e){if(e instanceof _o)return e;if(null!=e){if(bo(e))return a=e,new _o((function(e){var t=a[Eo]();if(Ya(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(za(e))return r=e,new _o((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Ka(e))return n=e,new _o((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,ao)}));if(No(e))return $o(e);if(Oo(e))return t=e,new _o((function(e){var n,r;try{for(var a=Va(t),o=a.next();!o.done;o=a.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if(Do(e))return $o(vo(e))}var t,n,r,a;throw To(e)}function $o(e){return new _o((function(t){(function(e,t){var n,r,a,o;return Ua(this,void 0,void 0,(function(){var s,i;return ka(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=qa(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function xo(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var o=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(o),!a)return o}function wo(e){return function(t){if(function(e){return Ya(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function Mo(e,t,n,r,a){return new Lo(e,t,n,r,a)}var Lo=function(e){function t(t,n,r,a,o,s){var i=e.call(this,t)||this;return i.onFinalize=o,i.shouldUnsubscribe=s,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return ja(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(uo);function Fo(e,t){return void 0===t&&(t=0),wo((function(n,r){n.subscribe(Mo(r,(function(n){return xo(r,e,(function(){return r.next(n)}),t)}),(function(){return xo(r,e,(function(){return r.complete()}),t)}),(function(n){return xo(r,e,(function(){return r.error(n)}),t)})))}))}function jo(e,t){return void 0===t&&(t=0),wo((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Uo(e,t){if(!e)throw new Error("Iterable cannot be null");return new _o((function(n){xo(n,t,(function(){var r=e[Symbol.asyncIterator]();xo(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function ko(e,t){if(null!=e){if(bo(e))return function(e,t){return Ro(e).pipe(jo(t),Fo(t))}(e,t);if(za(e))return function(e,t){return new _o((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(Ka(e))return function(e,t){return Ro(e).pipe(jo(t),Fo(t))}(e,t);if(No(e))return Uo(e,t);if(Oo(e))return function(e,t){return new _o((function(n){var r;return xo(n,t,(function(){r=e[Po](),xo(n,t,(function(){var e,t,a;try{t=(e=r.next()).value,a=e.done}catch(e){return void n.error(e)}a?n.complete():n.next(t)}),0,!0)})),function(){return Ya(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Do(e))return function(e,t){return Uo(vo(e),t)}(e,t)}throw To(e)}function Vo(e,t){return t?ko(e,t):Ro(e)}function Bo(e,t,n){var r=Ya(e)||t||n?{next:e,error:t,complete:n}:e;return r?wo((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(Mo(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;a=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;a=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;a&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):Ao}function Go(e){return wo((function(t,n){var r,a=null,o=!1;a=t.subscribe(Mo(n,void 0,void 0,(function(s){r=Ro(e(s,Go(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):o=!0}))),o&&(a.unsubscribe(),a=null,r.subscribe(n))}))}class Wo{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Wo(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const Ho=Wo;const qo=class{constructor(e,t,n,r={}){this.type=F.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},zo=/(([^.]+)\[\d+\])/g,Yo=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(zo);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},Ko=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:Jo,WHEN:Xo,DECLARATIVE_TARGET:Qo,PAGELIST:Zo}=j.CONTEXT_TREE_NODE_TYPES;const es=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[Jo,new Map],[Xo,new Map],[Qo,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===Zo){const n=this.references.get(Jo);n.set(e,t),this.references.set(Jo,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=Ko(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(Jo),a=this.references.get(Qo);[...r.keys(),...a.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=Yo(e);return+n>=t})).forEach((e=>{const t=r.get(e),n=t?.parent;n?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Ho(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),a=r?.get(e);a?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,a){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const o=`${e}.${n}.${r}`,s=new qo(t,n,r,a),i=this.references.get("WHEN");i?.set(o,s)}},{VIEW:ts,FIELD:ns,CONTEXT:rs,DECLARATIVE_TARGET:as,WHEN:os}=F.CONTEXT_TREE_NODE_TYPES;const ss=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new es(rs,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const r=this.addContextNode(e).addNode("PAGE",t);let a=r.getReference(n);return a||(a=r.addNode("VIEW",n),r.addReference(n,a)),a}pushChildPageNodeToParentView(e,t,n){const r=e.children;let a=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){a=!0;break}a||r.push(t),t.parent=e}addViewNode(e,t,n,r){const a=this.addContextNode(e).addNode("PAGE",t);let o=null;if(r&&n!==r){o=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else o=a.addNode("VIEW",n);a.addReference(n,o);const s=t.split(".");for(;s.length>0;){s.pop();const n=s.join("."),o=this.getContextNode(e)?.getNode("PAGE",n),i=o?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,a,t);break}}return o}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,a){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const o=this.addContextNode(e),s=o.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,a);return s&&o.addReference(`${t}.${r}`,s),s}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,a){const o=this.getContextNode(e);o?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,a),o?.removeReference(`${t}${r}`,ns,a),o?.removeReference(`${t}${r}`,as,a)}removeViewNode(e,t,n,r){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),s=o?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=s?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&s?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),s=o?.getReference(n);s?.children.forEach((o=>{"PAGE"===o.type?this.removeViewNode(e,o.name,n,r):o.type===ts?this.removeChildViewNodes(e,t,o.name,r):(a.removeReference(o.name,ns,o.props.index),a.removeReference(o.name,as,o.props.index),"PAGELIST"!==o.type&&"Address"!==o.props?.componentName||this.deleteAllListNodes(e,o.name))})),o?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const r=r=>{const a=this.getContextNode(e),o=a?.references?.get(r);if(o)for(const[e]of o)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&a?.references?.get(r)?.delete(e)};r(ns),r(as)}deleteListNode(e,t,n){const r=r=>{const a=this.getContextNode(e),o=a?.references?.get(r);if(o)for(const[e]of o)e.includes(`${t.join(".")}[${n}]`)&&a?.references?.get(r)?.delete(e)};r(ns),r(as)}getPageListNode(e,t,n,r){const a=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return a?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(ns,r)}_findViewNode(e,t,n,r){let a=r.addNode("PAGE",t)?.getReference(n);if(a)return a;const o=t.split(".");for(;o.length>0;){o.pop();const e=o.join(".");if(a=r.addNode("PAGE",e)?.getReference(n),a)return a}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,a,o={}){const s=this.addContextNode(e),i=this._findViewNode(e,t,n,s),c=this.createFieldNode(i,t,r,o);return c&&this.updateFieldNode(s,i,c,e,t,r,a),c}createFieldNode(e,t,n,r){const{isDeclarativeTarget:a}=r;return a?e.addNode(as,`${t}${n}`,r):e.addNode(ns,`${t}${n}`,r)}updateFieldNode(e,t,n,r,a,o,s){const i=`${a}${o}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(r,n.name),e.addReference(i,n),n.value=s,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,r,a,o)}handleFieldInsideList(e,t,n,r,a){const o=Kp(n),s=Cp(o,n)||{},i=`${r}${a}`;let c=null;if(s?.subscriptFieldName||s?.isPageGroup)c=r.substring(0,r.lastIndexOf(`.${s?.index??""}`))||i.substring(0,i.lastIndexOf(`.${s?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=r.substring(0,r.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let r=e.getReference(n,ns);r||(r=t.addNode(ns,n,{}),e.addReference(n,r))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const a=this.getContextNode(e),[o,s,i]=Yo(t);n.startsWith(".")&&(n=n.substring(1)),s&&this.mutatePageList(e,o,s,{...r,rowIndex:i});const c=a?.getReference(`${t}.${n}`,ns);c&&c instanceof Ho&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,a){this.getPageListNode(e,t,n,r)?.addEventListener(a)}mutatePageList(e,t,n,r,a=!1){const o=this.getContextNode(e),s=o?.getReference(`${t}.${n}`,ns);s&&s instanceof Ho&&s.triggerEvent(r,a)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(ns)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(ns)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(as)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(ns)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(as)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(ns)?.get(t);r instanceof Ho&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,ns),n=this.getContextReferencesByType(e,as);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,ns)?.get(t)||!!this.getContextReferencesByType(e,as)?.get(t)}addWhenNode(e,t,n,r,a,o){const s=this.getContextNode(e);s?.addWhen(t,n,r,a,o)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(as)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,a=t.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:a,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(os)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,a=e.name,o=e?.props?.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({name:a,pageReference:o,referenceName:n,type:t})})),r}},is={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},cs=(e="",t="",n,r)=>{let a=[],o=[];null!==e&&(o=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const s=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){a=[j.CONTEXT_DATA,...s.split(".")];for(let e=0;e<o.length-1;e+=1)a.push(o[e]);a.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,o[o.length-1])}else n===F.PAGE?a=[...is.PAGE_MESSAGES_PATH]:n===j.HTTP?a=[...is.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?a=[...is.CASE_MESSAGE_PATH]:r&&(a=[j.CONTEXT_DATA,...s.split(".")]);return a.filter(Boolean)},ls=(e,t,n)=>{const r={content:{}},a=`${t.split(".").slice(2).join(".")}[${n}]`,o=qf.getIn(e?.content,a.split("."));return o&&qf.setIn(r.content,a.split("."),{...o}),r},ds=(e,t,n,r,a,o,s={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,r,a),c=r>a?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),a=`${o}[${r}]`;s[`${o}[${r+("up"===c?1:-1)}]`]=qf.getIn(e[t],[j.CONTEXT_DATA,...a.split(".")]),qf.deleteIn(e[t],[j.CONTEXT_DATA,...a.split(".")])}));const l=Object.keys(s);l.length>0&&l.forEach((n=>{qf.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],s[n])}))},us=(e,t,n,r,a)=>{const o=qf.deepClone(qf.getIn(e,[`${t}`])),s=qf.getIn(o,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!s)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),l=((e,t,n)=>{const r=qf.getIn(e,[j.CONTEXT_DATA,...n.split(".")],{});return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(o,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const d=ls(s,i,r).content;if(d&&Object.keys(d).length>0){const n={},s=`${i}[${r}]`,c=qf.getIn(o,[j.CONTEXT_DATA,...s.split(".")]);n[`${i}[${a}]`]=c,qf.deleteIn(e[t],[j.CONTEXT_DATA,...s.split(".")]),ds(e,t,l,r,a,i,n)}else ds(e,t,l,r,a,i)},ps=e=>{const{type:t,property:n,category:r,context:a,pageReference:o}=e;let s;n&&(s=n.slice(1));const i=Df(a);let c=[];const l=qf.getIn(i,cs(s,o,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===F.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&ss.mutateField(a,o,n,{messages:[...c],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},hs=e=>{const{property:t,pageReference:n,category:r,context:a,type:o,isListEntry:s,clearContextMessages:i,deletingIndex:c}=e,l={context:a,type:o};t&&!s?(ss.mutateField(a,n,t,{type:et,fieldName:t}),l.property=t,l.pageReference=n):s?(l.pageReference=n,l.isListEntry=s,l.deletingIndex=c):l.category=r,vf(i?{type:et,payload:{stateObj:e.stateObj,context:a}}:{type:et,payload:l})},fs=e=>{const{messages:t,property:n,pageReference:r,category:a,context:o}=e,s={messages:t,context:o};n?(s.property=n,s.pageReference=r):s.category=a,vf({type:Ze,payload:s})},gs=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&gs(e[r],t,n)}t.pop()}return n},ms=(e,t)=>{let n=ps({context:j.APP.ROOT,category:"HTTP"});if($h.getRenderingMode()===j.EMBED){const e=ps({context:j.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=ps({context:t,category:"HTTP"});n?e&&(n=n.concat(ps({context:t,category:"HTTP"}))):n=ps({context:t,category:"HTTP"})}return n},ys=e=>{let t=null;t=Fp(e)[0]?Rp(Fp(e)[0]):e,t&&hs({context:t,stateObj:Df(t),clearContextMessages:!0})},Is=e=>(qf.getIn(Df(e),is.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===j.CUSTOM_ERROR)),Es={addMessages:fs,getValidationErrorMessages:(e,t)=>{const n=Df(e),r=(e=>{let t=is.CONTENT_FIELDS_PATH;e?.objectInfo?t=Ml.isObjectCaseType(e?.objectInfo?.objectTypeID)?is.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=is.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),a=qf.getIn(n,[...r])||{},o=[];return gs(a,[],[]).forEach((e=>{const n=qf.getIn(a,[...e,j.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===j.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?o.push({label:`${e.fieldLabel}:`,description:n}):o.push(n)}}))}))})),o},getMessages:ps,clearMessages:hs,getRootContainerHttpMessages:ms,clearContextMessagesInActiveWorkArea:ys,clearContextMessages:e=>{const{context:t}=e;vf({type:et,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:Is};const As=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const Cs=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let a=0,o=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(o=a),a+=1})),-1!==o&&r.splice(o,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let o=!1;if(a&&this.subscribers[e].forEach((e=>{o=e.id===t&&e.contextName===r})),!o){const a=new As(e,t,n,r);this.subscribers[e].push(a)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const _s=class{static subscribe(e,t,n,r=!1,a="app"){Cs.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Cs.publish(e,t)}static unsubscribe(e,t,n="app"){Cs.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Cs.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Cs.clearContext(e)}};const Ss=new class{#e;#t;constructor(){this.#e="true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="true"===localStorage.getItem("inspectorFlag");this.#e=!e,localStorage.setItem("inspectorFlag",this.#e.toString()),_s.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,_s.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class bs{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new bs(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Xs(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Qs()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,o=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,s=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:Dh.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let l="";t?l=`&session_index=${t}`:`${c}`?l=`&UserIdentifier=${c}`:n&&(l=`&Password=${window.atob(n)}`);const d=new Uint8Array(64);window.crypto?.getRandomValues(d),this.config.codeVerifier=this.base64UrlSafeEncode(d),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${o}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${s}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";const t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,o=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:s}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),d=new URLSearchParams;return n&&d.append("client_id",n),r&&d.append("client_secret",r),d.append("grant_type","authorization_code"),d.append("code",l),a&&d.append("redirect_uri",a),s&&d.append("code_verifier",s),this.config?.secureCookie&&d.append("send_token_as_cookie","true"),Ws(o,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:d.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?Ks({pzCTkn:e?.csrf}):(Js({tokenInfo:e}),Ks({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const Ns=bs,Ts=async()=>new Promise((async(e,t)=>{const n=Zs();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:o}=n.endPoints,{client_id:s,client_secret:i,secureCookie:c,serverType:l}=n,d="launchpad"===l,u={"content-type":"application/x-www-form-urlencoded"};i&&!d&&(u.authorization=`Basic ${window.btoa(`${s}:${i}`)}`);const p=new URLSearchParams;i?d&&(p.append("client_id",s),p.append("client_secret",i)):p.append("client_id",s),c&&p.append("send_token_as_cookie","true");const h=a?"refresh_token":"access_token",f="access_token"===h?r:a;!c&&f&&p.append("token",f),p.append("token_type_hint",h),o&&await Ws(o,{method:"POST",headers:new Headers(u),credentials:c?"include":"omit",body:p.toString(),withoutDefaultHeaders:!0}),Ks({Authorization:null}),Js({tokenInfo:null}),e()})),Ps=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Ns(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},Os=(e,t)=>{Ps(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};_s.publish(F.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},vs=e=>{let t="",n={},r={},a=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const o=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(a=!1),o.append("client_id",e.client_id),o.append("grant_type","refresh_token"),e.clientSecret&&o.append("client_secret",e.clientSecret),e.secureCookie&&o.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&o.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};Js({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?Ks({pzCTkn:n?.csrf}):Ks({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:a}=e;a&&"function"==typeof a&&a(n)},failure:t=>{if(e.popupReauth)return Os(t,e);_s.publish(F.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:Os};return{url:t,config:n,callback:r,isRefreshTokenPresent:a}},Ds=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Rs=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},$s=(e,t,n)=>{const{config:r}=e,{url:a,config:o,callback:s,isRefreshTokenPresent:i}=vs(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=Hs(r.url,r,c,t);return i?Ws(a,o).then((e=>new Promise(((n,a)=>{setTimeout((()=>{t.setUpdateSessionStatus(!1),t.latestUpdateSessionTimeStamp=Date.now(),s?.success?.(e,r),_s.publish("updateSession",{updateStatus:"success"}),_s.publish("OnUpdateSession",{}),l.then((e=>{n(e)})).catch((e=>{a(e)}))}),0)})))).catch((e=>e&&e.config&&Ds(e.config.url,n)?(s?.failure?.(r.url,n),l):Promise.reject(e))):(s?.failure?.(r.url,n),l)},xs=(e,t,n,r)=>{if(e.config&&Ds(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&!t.getUpdateSessionStatus()&&e.config.fetchTimeStamp>t.latestUpdateSessionTimeStamp){if(_s.unsubscribeAllWithEventType(Ls),t.setUpdateSessionStatus(!0),"custom"===n?.authType){_s.publish(F.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=Rs(e);return Hs(n,r,a,t)}return $s(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Rs(e);return Ws(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&(400!==e.response.status||"Invalid inputs"!==e.response.data.errorClassification)&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[F.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[F.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=(e=>{if(e&&e.includes("/workarea")&&!e.includes("/modal")){const t=e.lastIndexOf("/workarea");if(-1!==t)return e.slice(0,t)}return e})(e.config.headers.context);return fs({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const ws=class{constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Ms=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:Ss.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Jf.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:Ss.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:Ss.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(j.SKIPCOREHEADERS))return void delete e[j.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&V.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}};const Ls="updateSession",Fs={},js=new ws,Us=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(_s.unsubscribe(F.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{_s.publish(F.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),_s.subscribe(F.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let ks={},Vs={},Bs={},Gs="";const Ws=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:o=n,includeRemoteSystemIdIfPresent:s=!0}=r;Gs=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,responseType:l,adapter:d,withoutDefaultHeaders:u=!1,...p}=t,{Authorization:h,pzCTkn:f,...g}=t.headers||{};u||Ms.injectCoreAdditionalHeaders(g,t.body,n,{includeRemoteSystemIdIfPresent:s}),o&&Fs[o]>=0?Fs[o]+=1:o&&void 0===Fs[o]&&(Fs[o]=1);let m=u?{...g}:{...Ms.getDefaultHeaders(),...Ms.getRegisteredHeaders(),...g,context:n};if(p.isExternalUrl=(e=>!e?.startsWith(E()||""))(e||""),p.fetchTimeStamp=Date.now(),e&&Ds(e,Vs)&&js.getUpdateSessionStatus()||!js.getUpdateSessionStatus()||p.isExternalUrl){Ds(e,Vs)&&"OAuth2.0"===Vs?.authType&&(m={...g});const{restApi:t}=Dh.doesRestApiExist("Logout")&&Dh.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Us.setTimerID(Us.resetInactiveTimeout(Us.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,a){var o,s=!1;e.subscribe({next:function(e){o=e,s=!0},error:a,complete:function(){s?r(o):n?r(t.defaultValue):a(new La)}})}))}(Vo(wa({context:n,...p,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},responseType:l,adapter:d,headers:m,withCredentials:(y=Vs,!("OAuth2.0"!==y?.authType||!y.secureCookie)||!("custom"!==y?.authType||!y.customCookies)||void 0)})).pipe(Bo((()=>{const e=Ms.getCoreHeadersFromContext(m.context);var t;e&&(t={...e},_s.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,t))})),Go((e=>{const t=m,n=!!t?.[j.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:t?.[j.COREHEADER_APP_DEBUG_ID],[j.COREHEADER_APP_DEBUG_LEVELS]:Ss.getDebugLevels()}}:Ms.getCoreHeadersFromContext(m.context);var r;throw n&&(r={...n,error:e},_s.publish(j.PUB_SUB_EVENTS.FETCH_FAILURE,r)),e}))))}var y;return Hs(e,t,n,js)},Hs=(e,t,n,r)=>new Promise(((a,o)=>{_s.subscribe(Ls,(s=>{r.setUpdateSessionStatus(!s.updateStatus),"success"===s.updateStatus?Ws(e,t,n).then((e=>a(e))).catch((e=>o(e))):o(s.updateStatus.error)}),Ls)})),qs=e=>{Fs[e]>0&&(Fs[e]-=1,0===Fs[e]&&delete Fs[e])};wa.interceptors.request.use((e=>(ks.request&&(e=ks.request(e)),e)),(e=>Promise.reject(e))),wa.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),fs({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(ps({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&hs({type:"error",category:"HTTP",context:e.config.headers.context}),ps({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&hs({type:"error",category:"PAGE",context:e.config.headers.context})),qs(e.config.headers.context)),ks.response&&(e=ks.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&qs(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config.isExternalUrl||e.config&&Ds(e.config.url,Vs)||_s.subscribe(Ls,(e=>{js.setUpdateSessionStatus(!e.updateStatus)}),Ls),xs(e,js,Vs,e.response&&e.response.status&&e.response.status===Number(Gs)?Gs:null))));const zs=()=>wa.CancelToken.source(),Ys=e=>wa.isCancel(e),Ks=e=>{Ms.setDefaultHeaders(e)},Js=e=>{Vs={...Vs,...e}},Xs=e=>{Bs={...Bs,...e}},Qs=()=>({...Bs}),Zs=()=>({...Vs});const ei=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),a=Number(r)+1;return`${e.substring(0,t)}(${a})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),r=e.substring(t+1,n),a=Number(r);if(!Number.isNaN(a)){const r=a-1;return`${e.substring(0,t)}[${r}]${e.substring(n+1)}`}}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}};const ti=class{static execute(e,t,n,r){const a={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const o={instruction:"string"==typeof t?"ADD":"INSERT",content:{...qf.unflatten(n)}},s=JSON.parse(JSON.stringify(o));delete s.content.classID;return{instruction:{target:qf.buildInstructionPageReference(r,e),content:{...s.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:o,displayPropertPayload:a}}};const ni=class{static execute(e,t,n,r,a,o,s,i){const c={instruction:"UPDATE",content:{...qf.unflatten(r)},isDefault:i},l={content:{...c.content},target:qf.buildInstructionPageReference(a,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return o||vf(xg({...c,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${a}${t}`,skipDirtyValidation:s})),l}};const ri=class{static execute(e,t,n){return{target:qf.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const ai=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:qf.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||vf(xg({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const oi=class{static execute(e,t,n,r){return{target:qf.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const si=class{static execute(e,t,n){const r={instruction:"REPLACE",content:{...qf.unflatten(t)}};return{instruction:{target:qf.buildInstructionPageReference(n,e),content:{...r.content},instruction:"REPLACE"},actionPayload:r}}};const ii=class{static execute(e,t){return{target:qf.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const ci=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const li=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new ci(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const r=e.getValue(this.target)||[];if(Array.isArray(r)){if(t)return void r.forEach(((e,r)=>{t.forEach((t=>{const a=Sl(t),o={};let s=!0;n&&(o[Sl(n)]=crypto.randomUUID(),s=!1);const i={[a]:qf.getIn(e,a),...o};this.update(i,r+1,s,{isDefault:!0,skipDirtyValidation:!0})}))}));r.forEach(((e,t)=>{if(n&&!e[Sl(n)]){const e={};e[Sl(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&r&&"object"==typeof r&&!Array.isArray(r)&&Object.keys(r).length>0&&this.processObjectRows(r,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((r=>{const a=e[r];t.forEach((e=>{const t=Sl(e),o={};let s=!0;n&&(o[Sl(n)]=crypto.randomUUID(),s=!1);const i={[`${t}`]:qf.getIn(a,t),...o};this.update(i,r,s,{isDefault:!0})}))}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,r){const{isDefault:a=!1,skipPageinstruction:o,skipDirtyValidation:s=!1}=r,i=ni.execute(this.contextName,this.target,t,e,this.pageReference,n,s,a);if(!o){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=kf(qf.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.groupIndex!==t&&this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(i),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=kf(qf.deepClone(t),qf.unflatten(e),r)}}}delete(e,t){const n=ri.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||vf(xg({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:a,actionPayload:o={content:{}},displayPropertPayload:s={}}=ti.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=kf(qf.deepClone(n),e,r)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=a:this.insertNode(a),n||(o.content={...o.content,...s},vf(xg({...o,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:r.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e,t){const{instruction:n,actionPayload:r}=si.execute(this.target,e,this.pageReference);this.insertNode(n),t||vf(xg({...r,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}deletePage(e){const t=ii.execute(this.target,this.pageReference);this.insertNode(t),e||vf(xg({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=oi.execute(this.target,e,t,this.pageReference);this.insertNode(r),vf(xg({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=ai.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),ai.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=kf(qf.deepClone(t),e)}},di={},ui={},pi={},hi=(e,t,n)=>{di[e]||(di[e]={}),di[e][t]||(di[e][t]={content:[]}),ui[e]||(ui[e]=[],pi[e]=[]),Cl.isStateMachineExist(e,n,t)||Cl.setStateMachine(e,t,n,new li(t,n,e))},fi=e=>ei.formatPageReference(e),gi=(e,t)=>{const n=ui[e],r=pi[e],a=Sl(t),o=a?.substring(0,a.indexOf("["));r?.indexOf(o)<0&&pi[e].push(o),n?.indexOf(a)<0&&ui[e].push(a)},mi=e=>{delete ui[e]},yi=e=>Cl.buildPageInstructionsByContext(e),Ii=e=>{Cl.clearStateMachines(e),delete di[e]},Ei=(e,t,n,r)=>{let[,a]=t.split(`${e}[${r}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(n).forEach((e=>{n[`${a}.${e}`]=n[e],delete n[e]})))},Ai=(e,t,n,r,a)=>{const{skipStateUpdate:o=!1,insertIfEmpty:s=!1}=a||{},i=n.getContextName(),c=n.getReferenceList(),l=r||n.getPageReference(),d=fi(c);hi(i,d,l),gi(i,`${c}[${t}]`),Ei(c,l,e,t);const u={instruction:j.LIST_ACTIONS.INSERT,content:{...qf.unflatten(e)}};delete JSON.parse(JSON.stringify(u)).content.classID;const p=Cl.getStateMachine(i,l,d);s&&p?.root||p.insert(e,t+1,o,{c11nEnv:n})},Ci=(e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:o}=r,s=t.getContextName();let i=t.getReferenceList();const c=o||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(F.CONTENT)+F.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=fi(i);hi(s,l,c),gi(s,`${i}[${n}]`),Ei(i,c,e,n);Cl.getStateMachine(s,c,l).update(e,n+1,a,r)},_i=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Si=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(_i(e,n)){const n=qf.getPropertyName(e),a=n.substr(n.indexOf(".")+1).split(".");if(a.length>1){let e=qf.getIn(t,a)??"";if(!e){const n=`!P!${a.join(":")}`;e=qf.getIn(t,n)??""}qf.setIn(r,a,e)}else{const e=qf.getIn(t,a)??"";r[a[a.length-1]]=e}}})),r},bi=(e,t,n,r,a)=>{const o=e.getValue(t)||{};n&&Object.keys(o).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},Ni=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:o,selectionList:s,required:i}=t.getConfigProps(),c=o===j.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let d=t.getPageReference(),u=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,d,s);const p=t.getRawMetadata();let h=null;const f=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);f&&(u=p?.config?.dataRelationshipContext,h=d.concat(".").concat(u),d=h);const g=((e,t,n)=>e?`${t}${n}`:t)(c,d,s),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,u,h),{datasource:{parameters:y={}}}=m,I={...y};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=qf.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,m,c),c){let n=s;n=fi(n);const r=t.getValue(g)||[];hi(t.getContextName(),n,d);const o=[];let i=r.length;e.forEach((e=>{const t=Si(y,e,u),s={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;s[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!a){const r=Cl.getStateMachine(l,d,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}o.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...s}})})),vf(xg({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${d}.${u}`,actions:o}))}else{const n=Si(I,e[0],u);Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],f?{contextPageReference:d}:{}),t.getActionsApi().triggerFieldChange(`.${u}.${e}`,n[e])}))}bi(t,g,i,c,u),r()})),Ti=e=>{if(!e)return!1;const t=(n=e,Cl.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const Pi=(e,t,n={})=>{const{skipStateUpdate:r=!1}=n,a=e.getPageReference(),o=fi(t);hi(e.getContextName(),t,a);Cl.getStateMachine(e.getContextName(),a,o).deleteAll(r)},Oi=e=>({insert:(t,n,r,a)=>Ai(t,n,e,r,a),update:(t,n,r)=>Ci(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r={})=>{const a=n.getPageReference(),{stateMachineTarget:o}=Cl.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),`${a}${e}`.endsWith("]"));if(!o){let e=a.substring(0,a.lastIndexOf("["));e||(e=a.substring(0,a.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&hi(n.getContextName(),t,e)}Cl.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:a=!1}=r||{},o=t.getContextName(),s=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+s}[${e}]`,l=fi(s);hs({type:F.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:o,isListEntry:!0,deletingIndex:e}),hi(o,l,i),gi(o,`${s}[${e}]`);const d=Cl.getStateMachine(o,i,l);"string"==typeof e?d.delete(e,a):d.delete(e+1,a);const u=Cl.getUnConnectedStateMachines(o)||{};Object.keys(u).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(u[e]=null)}))})(t,e,n,r),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),o=n.getPageReference(),s=fi(a);hi(r,s,o),ss.deleteAllListNodes(r,`${o}${s}`,!1),gi(r,`${a}[${t}]`),Cl.getStateMachine(r,o,s).move(e+1,t+1);const i=Cl.getUnConnectedStateMachines(r)||{};Object.keys(i)?.forEach((e=>{e.includes(`${o}${s}`)&&e!==`${o}${s}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Ni(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let o=t.getPageReference();const s=n===j.LIST_SELECTION_MODE.MULTI;let i=s?r.substring(1):o.substring(o.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=o.concat(".").concat(i),o=l);const d=s?`${o}${r}`:o;let u=t.getValue(d)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=s?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return _i(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),a=e.getPageReference(),o=t,s=`${a}${t}`;return new Promise((t=>{let i=o;i=fi(i),hi(r,i,a),Cl.getStateMachine(r,a,i).deleteAll(),bi(e,s,n,!0,o),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:o,referenceList:s}=e.getComponentConfig();let i;if(r===j.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===o&&s&&(i=e.getStateProps().referenceList),i){i=fi(i);const r=Cl.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const a=e.getContextName(),o=e.getPageReference(),s=fi(t);hi(a,s,o),Cl.getStateMachine(a,o,s).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n)=>Pi(e,t,n),replacePage:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:a=!1}=r||{},o=e.getPageReference(),s=e.getContextName();hi(s,t,o),gi(s,qf.buildInstructionPageReference(o,t)),Cl.getStateMachine(s,o,t).replacePage(n,a)})(e,t,n,r),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:r=!1}=n||{},a=e.getPageReference(),o=e.getContextName();hi(o,t,a),gi(o,qf.buildInstructionPageReference(a,t)),Cl.getStateMachine(o,a,t).deletePage(r)})(e,t,n)});const vi=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?qf.mergeDeep(e,this.fieldDefaults):qf.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},Di="downloadAttachment",Ri={},$i=e=>{const t=zs();return Ri[e]=t,t},xi=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},wi=e=>{let t,n,r,a;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,a=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:xi(e.pyMimeFileExtension||e.MimeType),error:e.error||null,thumbnail:e.thumbnail||null},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:a,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null),localAttachment:!!e.localAttachment}}},Mi=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,"pyCount"))n=!0,t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>wi(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(wi)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},Li={uploadAttachment:(e,t,n,r,a)=>{const o=new FormData;o.append("appendUniqueIdToFileName","true"),o.append("file",e),a&&o.append("contextID",a);const{restApi:s,reqType:i}=Yg("uploadAttachment",{});return Ws(s,{method:i,headers:{"Content-Type":"multipart/form-data"},body:o,onUploadProgress:t,signal:$i(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(Ys,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete Ri[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(a.signal=$i(n).token)}const{restApi:o,reqType:s}=Yg("linkCaseAttachment",{caseID:e});return Ws(o,{...a,body:{attachments:t},method:s},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=Yg("getCaseAttachments",{caseID:e,includeThumbnail:n});return Ws(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=Yg("getAttachmentCategories",{caseID:e,type:t});return Ws(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Yg(Di,{attachmentID:e});return Ws(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Yg("editAttachment",{attachmentID:e});return Ws(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Yg("deleteAttachment",{attachmentID:e});return Ws(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Yg("downloadDocument",{documentID:e});return Ws(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=Yg("deleteDocument",{caseID:e,documentID:t});return Ws(r,{method:a},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{Ri[e]&&(Ri[e].cancel(),delete Ri[e])},buildFilePropsFromResponse:wi,getAttachmentURL:e=>{const{restApi:t}=Yg(Di,{attachmentID:e});return t},prepareAttachmentData:Mi,validateAttachments:(e,t)=>{let n=e;if("object"==typeof t&&"attachments"in t){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=Mi(t);0===e.length&&(n="")}return n}};class Fi{constructor(){this.validators={}}static messageDispatcher(e,t,n,r,a){if(r){const o=[];o.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),fs({messages:o,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,a,o){const{required:s,value:i}=o;let c=null;if(!("true"!==s&&!0!==s)){let s=r;switch(e){case"radiobuttons":s=i;break;case"attachment":s=Li.validateAttachments(r,i);break;case"checkbox":s&&"false"!==s||(s="");break;default:"string"==typeof s&&(s=s.trim())}c=this.getValidator("required")(s),Fi.messageDispatcher(t,n,a,c,ei.getFieldLabel(o))}return c}validateType(e,t,n,r,a,o){let s=null;const i={pageReference:n,context:a,property:t,target:o?.target,required:o?.required};let c=vi.getDefaultsforType(o?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(s=this.getValidator(e)(r,i),(""!==r||vi.getDefaultsforType(o?.componentName||"")?.showErrorWhenEmpty)&&Fi.messageDispatcher(t,n,a,s,o?.label));const l=o?.validationType;return c=l&&vi.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(s=this.getValidator(l)(r,i),Fi.messageDispatcher(t,n,a,s,o?.label)),s}validate(e,t,n,r={}){const{context:a,disabled:o,readOnly:s,pageReference:i,skipRequiredValidation:c}=r;let l=null;return o||s||(c||(l=this.validateRequired(e,t,i,n,a,r)),l||(l=this.validateType(e,t,i,n,a,r))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const ji=new Fi,Ui=(e,t)=>{e.DeclareExpressions&&t.context&&sn({[t.context]:e.DeclareExpressions})},ki=(e,t,n=!1)=>{const r=qf.getIn(e,j.RESOURCES);r&&((e=>{e&&af(e)})(r),Ui(r,t)),n||tm({...e,options:t})};class Vi{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:o=Yc.PAGE,pageName:s,context:i=j.APP.APP,debugInfo:c,headers:l,retrieveActionViewForNewObject:d=!1}=t;let u={};n&&n.content&&(u=n.content);const{content:p,pageInstructions:h}=Vi.getExternalObjectContent(e,d,i);let f={[Vi.getKeyBasedOnWorkType(e)]:e,content:{...u,...r,...Ml.isExternalObject(e)&&!d&&{...p}}};f={...f,...Ml.isExternalObject(e)&&!d&&{pageInstructions:h},...!Ml.isObjectCaseType(e)&&{processID:a}};const g=Vi.getObjectTypeViewPayload(d,e);return Wi(Ml.getRouteKeyForCreateWork(e,d),{body:f,queryPayload:{...g,caseClassName:e,viewType:o,params:{pageName:s}},headers:{...l,...c&&{...Ms.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:f,headers:Jc(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?{objectTypeID:t,actionID:"Create"}:{};static getExternalObjectContent=(e,t,n)=>{if(Ml.isExternalObject(e)&&!t){const e=Xc(n,{isExternalObject:!0}),{content:t,pageInstructions:r}=e.content;return{content:t,pageInstructions:r}}return{}};static getKeyBasedOnWorkType=e=>Ml.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const Bi=Vi,Gi=()=>({registerHeader:(...e)=>Ms.registerHeader(...e),unRegisterHeader:(...e)=>Ms.unRegisterHeader(...e),getRegisteredHeaders:()=>Ms.getRegisteredHeaders()}),Wi=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:o,adapter:s},i,c)=>{const{restApi:l,reqType:d}=Yg(e,n),u={method:d,headers:a,body:t,...o&&{responseType:o},...s&&{adapter:s}};return r&&(u.signal=r.token),Ws(l,u,i,c??{})},Hi=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},o)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return Ws(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},o)},qi=e=>Dh.doesRestApiExist(e),zi=()=>zs(),Yi=e=>Ys(e),Ki=e=>{ks=e},Ji=()=>Bi,Xi="getCustomComponent",Qi="text/javascript";const Zi=new class{getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=$h.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r);let o=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(o=this.loadAndCustomerComponentsConfig(t,e));const s=[],i=$h.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([a,o]),[n,r]=t,i=[];for(const t of r)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);s.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([a,o,e]).then((e=>{const t=this.mergeComponentList(e);s.push(...t)}))}if(n.alternateDesignSystemURL&&1===s.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s[0].alternateDesignSystemConfig=r}return{data:{components:s}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,o=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(o).length>0?{...e,alternateDesignSystemConfig:{...o}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let a=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(a=!1):r[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const r=$h.environmentInfoObject?.pyInfinityStaticService;if(r){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync("D_pzGetComponentsConfig","",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(e)))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&a?.data?.components?.length>0&&(a.data.components=a.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===a?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);a.data.components[0].alternateDesignSystemConfig=r}return a}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){const t=$h.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:r,callUrl:a}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[a]||(this.imageBlobUrlCache[a]=this.fetchImage(n,r,a,t)),this.imageBlobUrlCache[a]}buildImageRequest(e,t){let n,r="getBinaryFile",a=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^\s!]+)!.*\/OPERATORIMAGES\//i,o=e.match(t);o&&o[1]?(r="getOperatorImage",n={user_ID:o[1].toLowerCase()}):n={fileID:e},a=Yg(r,n)?.restApi||a}return{callUrlKey:r,queryPayload:n,callUrl:a}}fetchImage(e,t,n,r){return r?Wi(e,{queryPayload:t}).then((e=>{const n=this.decodeBase64ToByteArray(e.data),r=this.getMimeTypeFromKey(t?.fileID||t?.user_ID||""),a=new Blob([n],{type:r});return window.URL.createObjectURL(a)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}getMimeTypeFromKey(e){const t={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"},n=e.toLowerCase().split("!").pop()||"";return t[n]?t[n]:"application/octet-stream"}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e+=1)r[e]=t.charCodeAt(e);return r}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=$h.environmentInfoObject?.pyInfinityStaticService;if(t){const t=$h.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?qf.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`;return(await Wi(Xi,{queryPayload:{componentName:r}})).data}const n=$h.environmentInfoObject?.pyC11nDXCBDevURL,r=n?`${n}/index.js`:`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,a=await fetch(r,n?{}:{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!a.ok)throw new Error(a.statusText);return await a.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e){try{const t=$h.environmentInfoObject?.pyInfinityStaticService,n=$h.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(n){r=`${n.replace(/\/+$/,"")}/index.js`}if(t&&!n){const t=$h.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?qf.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`,a=await Wi(Xi,{queryPayload:{componentName:r}});return void this.appendCustomScriptToHead(a.data)}if(t||n){const e=document.createElement("script");return e.src=r,e.type="text/javascript",e.onerror=()=>console.error("Error while appending custom component map"),void document.head.appendChild(e)}const a=n?{}:{headers:{Authorization:`Bearer ${this.b2sJWT}`}},o=await fetch(r,a);o.ok||console.error("Error while fetching custom component map");const s=await o.text();this.setCCV2LibId(e),this.appendCustomScriptToHead(s)}catch(e){console.error("Exception while appending custom component map:",e)}}async appendCustomScriptToHead(e){try{const t=document.createElement("script");t.src=window.URL.createObjectURL(new Blob([e],{type:Qi})),t.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(t)}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([r],{type:Qi})),a.onload=()=>t(e),a.onerror=()=>n(e),document.head.appendChild(a)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);if("script"===t){const t=a;t.onload=()=>{n(e)},t.onerror=()=>{r(e)},t.type=Qi,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=a;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(a)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=n?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",r=decodeURIComponent(n.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),a=JSON.parse(r),o=a?.tenant_id,{restApi:s,reqType:i}=zg("getAssetsFromIsolations",{isolationID:o,assetPath:e})||{},c=`${this.appStaticUrl}${s}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},ec="component-loader",tc={},nc=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=Zi.getLoader(),r=t||Zi.staticServerURL;if(Zi.getLoader(ec))return Zi.getLoader(ec)(e,r);const a=new Set(Object.keys(tc)),o=e.flatMap((e=>{if(a.has(e))return[];const t=dn.getComponent(e);if(!t){const t=`${Zi.getConstellationServiceUrl()}/v860/${Zi.getAppAlias()}/component/${e}.js`;return a.add(e),[n(t,Zi.getTypes.SCRIPT)]}const o=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${r}${e}`,Zi.getTypes.SCRIPT))),s=(t.styles||[]).map((e=>n(`${r}${e}`,Zi.getTypes.STYLE)));return a.add(e),[...o,...s]}));return Promise.all(o.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))};const rc=new class{#n;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#n=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?qf.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(qi("getUserSettings")){const{restApi:e,reqType:t}=Yg("getUserSettings");Ws(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{$h.getUserSettings()?this.userSettings=$h.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return qf.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let n;if(!qi("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=Yg("updateUserSettings");const{restApi:r,reqType:a}=n;return Ws(r,{method:a,body:qf.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#n){this.#n=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};_s.subscribe(j.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}getURLParam(e,t){let n=new URL(window.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!$h.shouldUseURLParams())return;const r=new URL(window.location.href);if(t=n?btoa(t):t,r.searchParams.get(e)===t)return;r.searchParams.set(e,t);window.history.pushState({type:"ui-navigation"},"",r)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const ac=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&vf({type:se,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>{setTimeout((()=>t(e)),this.pauseDuration)}));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&vf({type:ie,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}};const oc=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",o,s=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:o};return this.actionMgrActions[e]=i,s&&ac.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,r;""===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,a,n,r,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let a=e;return r?(setTimeout((()=>{r.resolve(t)}),0),ac.disableLoadingIndicator(r.actionPayload,n)):a=null,a}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let a=e;return r?(r.reject(n),ac.disableLoadingIndicator(r.actionPayload,t)):a=null,a}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=V.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=U,e.gadgetId=t.gadgetId??Ml.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}};class sc{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const ic=sc,cc=(e,t,n)=>Dh.getResolvedSemanticURL(e,t,n),lc={getResolvedSemanticURL:cc,getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ue,ACTION_SHOWVIEW:je,ACTION_GETOBJECT:Nt,ACTION_SHOWINSIGHT:ke,ACTION_SHOWDASHBOARD:Ve}),updateSemanticURLAndDocumentTitle:e=>Dh.updateSemanticURLAndDocumentTitle(e),getSemanticURLForToaster:(e,t,n=!1)=>cc(n?Nt:Be,{caseClassName:e},{[n?"objectID":"workID"]:t})},dc={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${j.DATA}.${j.CASE_INFO.BUSINESS_ID}`},uc=e=>qf.getIn(e,j.getProperty(dc.CASE_CLASS_NAME),j.EMPTY_STRING),pc=e=>qf.getIn(e,j.getProperty(dc.CASE_INFO_ID),j.EMPTY_STRING),hc=(e,t)=>{const n=pc(t);qf.setIn(e,"key",n)},fc=e=>qf.getIn(e,j.getProperty(dc.CASE_INFO),{}),gc=e=>{const t=Of();if(!e)return!1;const n=W(e),r=Kp(n),a=Kp(e);if(!r||!a)return!1;const o=Cp(r,n),s=Cp(a,e);if(!o||!s)return!1;const{key:i}=o;let{key:c}=s;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},mc=e=>{const t=pc(e),n=qf.getIn(e,j.getProperty(dc.BUSINESS_ID),j.EMPTY_STRING),r=t.toLowerCase().includes(n.toLowerCase())?n:t,a=uc(e);return{businessID:n,caseType:a,resolvedURL:lc.getSemanticURLForToaster(a,r,Ml.isObjectCaseType(a))}},yc=e=>{_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Ic=e=>{_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},Ec=e=>{_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},Ac={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Cc=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||ic.getTargetViewContainerName(e)},_c=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},Sc=e=>e===yp.WORKAREA,bc=e=>e===yp.MODAL,Nc=e=>e===Re,Tc=e=>e===Ee,Pc=e=>e&&e.find((e=>e.type===Ee)),Oc=e=>qf.getIn(e,Ac.CASE_INFO,{}),vc=e=>e?e.split(" ").pop():void 0,Dc=e=>qf.getIn(e,Ac.CASE_CLASS_NAME,j.EMPTY_STRING),Rc=(e,t=!1)=>{const n=t?fc(e):Oc(e);return Fl(n)&&jl($h.getOperatorIdentifier(),n)},$c=e=>qf.getIn(e,Ac.CASE_INFO_ID,j.EMPTY_STRING),xc=e=>qf.getIn(e,Ac.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),wc=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(vg(_g,{containerItemID:t,context:a||wp(t),target:r}))}},Mc=e=>{const t=Of();if(!e)return!1;const n=W(e),r=Kp(n),a=Kp(e);if(!r||!a)return!1;const o=Cp(r,n),s=Cp(a,e);if(!o||!s)return!1;const{key:i}=o||{};let{key:c}=s||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},Lc=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=$c(t);qf.setIn(e,"key",a);const o=Fl(Oc(t));if(!r&&(e=>{const t=qf.getIn(e,Ac.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=xc(t),[,r]=n.split("!");s={assignmentID:n,isInCreateStage:o},_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,s),qf.setIn(e,"flowName",r)}var s},Fc=(e,t)=>{const{attachmentsExist:n}=t;n&&qf.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),qf.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},jc=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return Pc(e)?(r=j.PROMISE_VALUE.REJECT,n?oc.rejectActionByID(t,!0,n):oc.rejectActionByID(t)):oc.resolveActionByID(t),r},Uc=e=>{const t=$h.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},kc=()=>"true"===$h?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,Vc=(e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r){const{caseClassName:o,skipAssignmentsUpdate:s}=n,i=W(r),c=Kp(i),l=c&&Ap(c),d=c&&Rp(c),u=Y(i);d&&l?.items?.[d]?.key===t?.caseID&&e.push(vg(ag,{containerItemID:i,context:i,container:u,containerName:u,caseId:a,viewName:F.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:i},caseClassName:o,...void 0!==s&&{skipAssignmentsUpdate:s}}))}},Bc=(e,t)=>{const n=Dc(e?.response),r=Oc(e?.response),{caseTypeID:a}=r,o=$h.getFeatureMap();(o?.deferUpdateCaseSummaryView??!Object.hasOwn(o,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&sf(j.CASESUMMARY_VIEW_NAME,a)&&Vc(t,e?.actionInPayload,{caseClassName:n,skipAssignmentsUpdate:!e?.actionInPayload?.context?.includes(j.PREVIEW)})},Gc=e=>Df(e)?.context_data?.caseViewMode;class Wc{constructor(e){Wc._instance=this,this.context=`${e}/${j.SUGGESTION}`,Of()?.getState().data?.[this.context]||vf({type:Fe,payload:{context:this.context,data:{}}})}getField(e){return xf(e,"",this.context)}setField(e,t){vf({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){vf({type:me,payload:{reference:e,context:this.context,...t}}),_s.publish(j.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){vf(ng({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Hc=Wc;const qc=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=Rf();return n?qf.getIn(n,t):null}static setSharedState(e,t){e&&vf(Mg({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:o,removePropertyFromChangedList:s=!1,skipDirtyValidation:i=!1}=r;if(!e||!t)return;vf(Lg({context:e,reference:o?`${o}.${t}`:t,value:n,isArrayDeepMerge:a,removePropertyFromChangedList:s,skipDirtyValidation:i}))}static getSuggestionsContext(e){return new Hc(e)}static triggerRefresh(e,t){qu({context:e,pageReference:t})}},{RESOURCE_TYPES:zc}=F,Yc={PAGE:"page",FORM:"form"},Kc={[zc.CASE]:[We,Be,Ge],[zc.OBJECT]:[bt,Nt,Pt],[zc.PAGE]:[je,ke],[zc.DATA]:[Ue],ASSIGNMENT:[Qe]},Jc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a:t&&V.isRemoteCase(t)&&(r.RemoteSystemID=V.getRemoteHeader(t)),r},Xc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:a=!0,isTransientContext:o=!1,includeDisabledFields:s=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=Dl(e,{isTransientContext:o,includeDisabledFields:s,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,o&&(l={}));const d=rp(e,!1);!o&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const a=Df(t),o=v()(a,F.CASE_INFO.CASE_INFO_CLASSID),s=Qh(n,o);("True-False"===s?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(l,e);const u=x()(d,l);let p={};({content:p}=((e,t,n=!1,r=!1)=>{let a={};const o=n||r?t?.objectInfo:t?.caseInfo;return(e||o)&&(a=e?{...t}:{...o}),{content:a}})(o,u,i,c));const h=[...yi(e)];a&&h.forEach((e=>{delete e.content?.EmbedListUUID__})),p.pageInstructions=h;if((ui[e]||[]).forEach((e=>{if(p?.content){const t=e?.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");qf.deleteIn(p.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!o&&u?.dataInfo)return p={...u.dataInfo,pageInstructions:p.pageInstructions},{content:p};const f=xf(".pzAdditionalPayload",j.CASE_INFO.CASE_INFO_CONTENT,e);return p.content&&f&&(p.content.pzAdditionalPayload=f),{content:p}},Qc=(e,t)=>{let n,r,a={};const o=qf.getIn(e,j.UI_RESOURCES),s=qf.getIn(e,"confirmationNote");o?(n=qf.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=qf.getIn(e,j.ROOT),a=qf.getIn(e,j.ACTION_BUTTONS)):s&&(r={});const{data:i={},Errors:c,flowName:l}=e;let{semanticURL:d,key:u}=e;const p=i?.objectInfo?.ID;p&&(u=u||p,d=d||`objects/${p}`);const h=qf.getIn(e,"nextAssignmentInfo",null),f=qf.getIn(e,"nextAssignmentInfo.context",""),g=qf.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:y,debugInfo:I,isExternalObjectCreationFlow:E}=t;return{data:{...i,key:u,flowName:l,coreHeaders:I&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:I.debugId}},[j.getProperty(j.CASE_INFO.CASE_INFO)]:{...i[j.getProperty(j.CASE_INFO.CASE_INFO)],actionButtons:a,headers:t.headers},[j.CONTEXT_DATA]:m?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:y,errors:c,isExternalObjectCreationFlow:E}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:d,nextAssignmentInfo:h,assignmentContext:f,confirmationLinks:g,key:u,root:r,...t}},Zc=async(e,t,n,r=!1,a=!1)=>{const o=qf.getIn(e,j.COMPONENTS);if(o)try{await nc(o)}catch(e){console.error(e)}const s={actionConfig:t,...n};r?tm({...e,options:s,directUrlUpdation:!0}):ki(e,s,a)},el=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},tl=e=>{if(e){const[,t]=e.split("!");return{key:el(e),flowName:t}}return{}},nl=(e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const a=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),o=`${a}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,s=qf.deepClone(e);s[j.ERROR_FIELD_IN_PAGE]=a,t.includes(o.slice(1))||t.includes(o.substring(o.indexOf(".")+1,o.indexOf("[")))||t.includes(o.substring(o.indexOf(".")+1,o.indexOf("(")))?r.push(s):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const a=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):n.push(e);break}default:n.push(e)}},rl=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,o=n&&n.response?n.response.data:"",s=$l(r);return a&&oc.rejectActionByID(a,!0,n),vg(Dg,"Error action triggered",o,r,s)},al=(e,t)=>kp(e)&&Bp(e)?vg(Ng,t):vg(dg,t),ol=(e,t,n=j.APP.APP,r={})=>{let a=null;const{buildNew:o=!0}=r;return kp(e)?a=Bp(e)?Rp(e):H(t,n):Vp(e)&&(Bp(e)&&!o?a=Mp(e):Bp(e)&&!o||(a=H(t,n))),a},sl=e=>e&&e.type===_e,il=e=>{let t=!1;const n=jp(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&lp(r)){t=!0;break}}return t},cl=(e,t={})=>{let n=!1,r=!1,a={},o=!0,s=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:d=!1}=t,u=Fh();if(kp(e)){const t=Rp(e);if(!t)return{continueExecution:o,removeActionPayload:a};const r=wp(t);lp(r)&&(n=!0),d||n||(n=il(t))}else if(Vp(e)&&Hp(e)){let t=Yp(e);t||(t=Rp(e),r=!0),a.containerItemID=t,a.context=wp(t)}if(n){const e=l||tp;s=window.confirm(u.getLocaleValue(e,"Messages"))}if(!s&&n&&(a={},o=!1),r){const e=u.getLocaleValue(np,"Messages");c?i=window.confirm(e):(window.alert(e),o=!1)}return!i&&r&&(a={},o=!1),{continueExecution:o,removeActionPayload:a}},ll=(e,t)=>{let n=!1;const r=$h.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:a,isParallelCall:o,skipFlowNameCheck:s}=t;if(!a)return{};const[,i]=a.split("!")||"",c=s?a:el(a),l=Tp(e,c);let d={},u=!1;if(l&&!r&&((e,t)=>{const n=Cp(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,d=Cp(e,l),!s)){let e=d?.flowName;const t=_c(l),r=Lp(l);if(r.length){const n=Ot(t,r[0]);e=Cp(n,r[0])?.flowName}else n=e===i;(e!==i||o)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:l,semanticURL:d.semanticURL,insKey:a}}},dl=(e,t,n)=>e===zc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=Tp(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===zc.ASSIGNMENT?ll(t,{...n,type:e}):e===zc.CASE||e===zc.OBJECT?ll(t,{...n,skipFlowNameCheck:!0,type:e}):{},ul=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),pl=(e=[])=>{Bp(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(vg(lg,qp({context:F.APP.APP,name:j.PREVIEW})))},hl=e=>{let t;for(const n of Object.keys(Kc))if(Kc[n].includes(e)){t=n;break}return t},fl=(e,t,n="")=>{const{data:r={},context:a,caseViewMode:o}=e,s={data:{...r},caseViewMode:o,context:W(a)};qf.deleteIn(s.data,"shared"),qf.setIn(s.data,["context_data","caseViewMode"],o),t.push({type:st,payload:{context:s.context}});const i=n&&![F.CASE_INFO.CASE_INFO_CONTENT,F.DATA_INFO.DATA_INFO_CONTENT].includes(n);t.push(vg(ng,{...s,...i&&{uiRootReference:n}}))},gl=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=qf.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=qf.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:qf.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:qf.getIn(t,["payload","context"]),context:qf.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),vf(e),e=e.filter((e=>e.type!==he))}const a=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:qf.getIn(t,["payload","target"]),context:qf.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);kp(a.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(a.isMultiDoc=!0,e=[]);const o={type:fe,payload:{...a}};e.push(o),vf(e)}else vf(e)}},ml=(e,t)=>x()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),yl=e=>{let t={},n=fh(e);for(;n;){const e=Xc(n);t=ml(e.content,t),n=fh(n)}return t},Il=e=>{e?.containerItemID&&qc.updateState(e.containerItemID,"traditionalGadgetId",Ml.getUniqueGadgetId(),{skipDirtyValidation:!0})};class El{static getChanges(e){return{...rp(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t||{},{content:a}=Xc(e,{isTransientContext:n,includeDisabledFields:r});return a}static isStateModified(e){return lp(e)}static isFormValid(e,t){return Rl(e,t)}static clearChangedProperties(e){return Ii(e),mi(e),up(e)}static getEditableFields(e){return xl(e)}static setCustomValidator(e,t){ji.register(e,t)}static isPropertyEditable(e,t){return El.getEditableFields(e).some((e=>e.name===t))}}const Al=El;const Cl=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const a=`${n}${t}`,{stateMachine:o}=this.getStateMachineObjByPath(a,e,!0,!0),s=(t,n,r=!1)=>{const a=r?this.states:this.unConnectedStates;a[e]||(a[e]={}),a[e][t]||(a[e][t]={}),a[e][t]=n};if(o&&o.targetPageReference!==r.targetPageReference)return o.addChild(r),void s(a,r);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(a)){const t=e.substring(0,a.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],r.addChild(n),s(t,n)})),this.states[e][a]=r):s(a,r,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((a=>{const o=ss.getContextReferences(e)?.get(a),s=o&&Jf.resolveContextTreeNodeProps(o.props)||{},i=n[a];if(o&&!0!==s.readOnly){const e=i.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),qf.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,""),r=ss.getFieldReferenceForProperty(e,t);if("Multiselect"===r?.props?.componentName&&n?.current?.instruction?.instruction===j.LIST_ACTIONS.DELETE_ALL)return;n.root=null,n.current=null;const a=this.getUnConnectedStateMachines(e)||{};Object.keys(a).forEach((e=>{e.includes(t)&&delete a[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const r=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&r&&hi(t,r,n)}getStateMachineObjByPath(e,t,n,r=!1){const a=/\[\d+\]$/gm,o=e;let s;for(;e&&!this.isStateMachineExist(t,"",e);){const i=Kp(t),c=Cp(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(s=null,n&&e.endsWith("]")){if(s=e.match(a),s=s?.[s.length-1]?.substring(1,s[s.length-1].length-1),[e]=e.split(a),!r&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(o,t);break}}else{if(c?.index&&e.includes(c.index)&&l){const t=e.split(".");s=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:s}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:o,index:s}=this.getStateMachineObjByPath(t,e,r);if(!o)return!1;const i=Kp(e),c=Cp(i,e)||{};let[,l]=t.split(o);if(!l)return!1;const d=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==s&&([,l]=d?l.split(/(?=\.\w+)/):l.split(/^\[\d+\]/gm));const u={[Sl(l)]:n},p=this.getStateMachine(e,"",o);if(null!==s)if(d){const t=yi(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},s,a.skipStateUpdate??!0,a)})),p?.update(u,s,a.skipStateUpdate??!0,a)}else p?.update(u,Number(s)+1,a.skipStateUpdate??!0,a);else p?.updatePage(qf.unflatten(u));return!0}registerForServerChanges(){bf.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){bf.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const r="].";if(!t.includes(".classID")&&Al.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(r)){const a=t.substring(0,t.lastIndexOf("[")),o=Al.getEditableFields(e);if(["multiselect","checkbox"].includes(o.find((e=>e.name===a))?.type)){const o=ss.getContextReferences(e),s=o?.get(a),i=t.substring(t.lastIndexOf(r)+2);s?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){bf.unRegisterForListChanges()}},_l={},Sl=e=>e.startsWith(".")?e.substring(1):e,bl=e=>{delete _l[e]},Nl=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Jf.resolveContextTreeNodeProps(e),a=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),o="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),s=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||s)&&!o&&a},Tl=(e,t,n,r,a)=>(Cl.executeStateMachine(e,r,Jf.getLitePropertyValue(n,t))||a.push(r),a),Pl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:a=!0}=n;return(!r||r&&!a)&&!Array.isArray(Jf.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},Ol=(e,t={})=>{let n=[];const r=[],a=ss.getContextReferences(e);return a?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let a=[];for(const[o,s]of e){const e=Jf.resolveContextTreeNodeProps(s.props),i=e.propertyName;Nl(s.props,{includeDisabledFields:r})&&Pl(o,e,n)&&(a=Tl(t,i,e,o,a))}return{editableFormFieldsReferenceList:a}})(a,e,t)),_l[e]&&r.push(...Object.keys(_l[e].fieldOrder??{})),{formInputs:n,formPageFields:r}):{formInputs:n,formPageFields:r}},vl=e=>{let t=[];const n=ss.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Nl(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},Dl=(e,t={})=>{const n={},r=Df(e),{ignoreFieldsInsideList:a=!0,isTransientContext:o=!1,includeDisabledFields:s=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>e||t?n?.objectInfo:n?.caseInfo)(i,c,r);if(o||l){const{formInputs:t,formPageFields:i}=Ol(e,{ignoreFieldsInsideList:a,includeDisabledFields:s});((e,t,n)=>{e.forEach((e=>{let r=qf.getIn(t,e);"object"==typeof r&&(r=qf.deepClone(r),delete r?.classID),qf.buildObject(e,n,r)}))})(i,r,n),t&&t.length>0?t.forEach((e=>{qf.buildObject(e,n,qf.getIn(r,e))})):o||qf.buildObject(F.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!o&&r?.dataInfo?.content){const{formInputs:t}=Ol(e,{ignoreFieldsInsideList:a});t.forEach((e=>{qf.buildObject(e,n,qf.getIn(r,e))}))}return n},Rl=(e,t)=>{const n=ss.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,a]of n){const n=Jf.resolveContextTreeNodeProps(a.props);if(Nl(a.props)&&(!t||e.includes(t))){const e=ji.validate(n.componentName?.toLowerCase(),n.propertyName,Jf.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},$l=(e,t=!1)=>{const n=ss.getContextReferences(e),r=[];if(n)for(const[e,a]of n){if(!1!==Jf.resolveContextTreeNodeProps(a.props).visibility){const n=8,a=t?e:e.substring(e.indexOf("content")+n);r.push(a)}}return r},xl=e=>{const t=[],n=ss.getContextReferences(e);if(n)for(const[e,r]of n){const n=Jf.resolveContextTreeNodeProps(r.props);Nl(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class wl{static isCaseActive(e,t){if(!e||!t)return!1;const n=Ap(t);if(n){const r=Rp(t),{items:a={}}=n;return!(!r||!a[r]||a[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=Yg("loadView",n);return Ws(r,{method:a},t)};static isExternalCaseType=e=>{const t=$h.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e));return!!t};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=Yg(Ke,n);return Ws(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:o}=Yg(Ke,a),s=t[e];return Ws(`${o}?viewType=form`,{method:"PATCH",body:{content:{...s}},headers:{"if-match":n}},r)};static getCaseMessages=e=>Df(e)?.caseMessages;static getPropertiesToReplace=e=>(vl(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(vl(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>qf.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>V.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>V.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=$h.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=$h.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&t[0].DisplayMandatoryInputsForObject};static getRouteKeyForCreateWork=(e,t=!1)=>wl.isExternalObject(e)&&t?"retrieveActionViewForNewObject":wl.isObjectCaseType(e)?bt:It;static setTraditionalGadgetId=e=>{e.traditionalGadgetId=wl.getUniqueGadgetId()}}const Ml=wl,Ll=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},Fl=e=>{if(Ml.isObjectCaseType(String(e?.objectTypeID))&&!Ll(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},jl=(e,t)=>{if(e&&t){const n=qf.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},Ul=(e,t)=>{const n=Jf.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Jf.getPropertyValue(F.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===F.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=Df(e);a=t?.context_data?.actionType===j.CASE}return a},kl=e=>wf(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),Vl=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Bl=(e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,o=a?.filter((e=>e.ID===j.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&o?.length>0?o[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r},Gl=(e,t,n)=>{let r,a,o,s,i,c,l,d,u;const p=Df(e),h=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID;return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,a=p.caseInfo.ID,o=p.caseInfo.assignments,s=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,d=p.caseInfo.caseTypeID,u=p.caseInfo.caseTypeName):p?.objectInfo&&Ml.isObjectCaseType(h)?(a=p.objectInfo.ID,s=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,l=p.objectInfo.businessID,d=p.objectInfo.objectTypeID,u=p.objectInfo.objectTypeName):(r=t.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID)),a=t.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),o=t.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENTS)),s=t.getValue(j.getProperty(F.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(j.getProperty(F.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(j.getProperty(F.CASE_INFO.CASE_INFO)),l=t.getValue(j.getProperty(F.CASE_INFO.BUSINESS_ID)),d=t.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),u=t.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:r,caseID:a,assignments:o,localActionID:s,caseActions:i,caseInfo:c,businessID:l,caseTypeID:d,caseTypeName:u}},Wl=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),r=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{r.append(t,String(e[t]))})),n.search=r.toString(),n.toString()}return t},Hl=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],r=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===r){n.forEach((e=>{e.isErrorButton=!0}));const r=e.payload.context,a=Df(r),o=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,a?.caseInfo?.actionButtons?.secondary||[]),s={data:{["dataObject"===t?F.DATA_INFO.DATA_INFO:F.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:o}}},target:Kp(r),context:r};vf({type:ge,payload:s})}};const ql=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,a=ss.getContextReferences(e)?.get(`${t}${r}`)?.props;return a?Jf.resolveContextTreeNodeProps(a):a})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:a}=ji.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return a?{status:!1,message:a}:{status:!0}}},zl="OPEN_PROCESS_ACTION",Yl="OPEN_ASSIGNMENT",Kl="DELETE_CASE_IN_CREATE_STAGE",Jl="SAVE_AND_CLOSE",Xl=e=>({type:Jl,payload:e}),Ql="DELETE_WORK",Zl=e=>({type:Ql,payload:e});const ed=class{static getSavableDataPage(e){return yf(e)}static getLookUpDataPage(e){return Ef(e)}static getLookUpDataPageInfo(e){return Af(e)}static getDataPageKeys(e){return If(e)}};const td=class{static getPropertyName(e){return pn.getPropertyName(e)}static isProperty(e){return pn.isProperty(e)}static getLeafPropertyName(e){return pn.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class nd{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:a,items:o}=e;if(a&&o){const e=a[a.length-1];if(o[e]?.view&&Object.keys(o[e].view).length>0){const a=o[e],s=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=a,{viewName:l,viewContext:d}=this.processRootViewDetails(i,a,t);if(!l)return null;return xu({meta:i,options:{context:c,pageReference:d||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===yp.WORKAREA||n===yp.MODAL||l===j.CREATE_DETAILS_VIEW_NAME,target:s}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:a}={}}=e,{context:o}=t;let s=a,i=r;const c=td.isProperty(a),l=td.isProperty(r);if(l){const e=td.getPropertyName(r);i=xf(`.${e}`,e.startsWith(".")?n:"",o)}if(i||(i=n),c){const e=td.getPropertyName(a);s=xf(`.${e}`,i,o)}return c&&l&&""!==s&&(s=a,i=r),{viewName:s,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,a;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=Rp(e),o=Cp(e,t);o&&({key:r,flowName:a}=o)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(j.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),r=t.find((e=>e.ID===n));return r?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(j.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:r})=>{const a=e.map((e=>({...e,caseName:t,caseTypeID:r})));n=n.concat(a)})),n};static hasAssignments=e=>{const t=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=nd.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||nd.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return nd.hasNotificationMessages(t)||!nd.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:r}=t;return r&&(!nd.isCaseWideLocalAction(n)||nd.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],a=nd.getChildCaseAssignments(e)||[];let o=JSON.parse(JSON.stringify(a));o=o.map((e=>(e.isChild=!0,e)));const s=[...r,...o];let i=JSON.parse(JSON.stringify(s));return t&&!nd.showTodo(e)&&(i=i.map((t=>(t.name=nd.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const rd=nd;const ad=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=oc.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return oc.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:o}=this.containerManagerPromise(t),s={...r,...e,actionMgrID:a};return vf(cg(s)),o}addContainerItem(e){const t=_e,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r||{};let o;Array.isArray(a)&&a.length>0&&([o]=a);const s=n.getContextName(),i=n.getContainerName(),c=H(i,s,e?.containerType===j.CONTAINER_TYPE.SINGLE),l=Ot(i,s),d={root:{...o,config:{...o?.config,context:o?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...d,...e,actionMgrID:u};return vf(dg(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=$e,n={context:wp(e.containerItemID),target:Kp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return vf(mg(o)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Re,n={target:Kp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return vf(Ag(o)),a}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Se,n={context:wp(e.containerItemID),target:Kp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return vf(_g(o)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Ce,n=qp(e),{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return vf(lg(o)),a}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=z(t,r),o=eh(r);return a&&o.includes(a)||vf(ug({transientItemID:a,contextName:r,target:Kp(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!eh(r).includes(t))return;vf(pg({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:a}=e;if(a&&r){if(!eh(t).includes(a))return;vf(bg({target:n,containerItemID:r,transientItemID:a}))}}createContainerPConnect(e,t,n,r=!1){rd.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Bp(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return vp(e,t)}};var od=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function sd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,a=e.length;return n=1===a?function(t){return od(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(od(t.type,e[n]))return!0;return!1},wo((function(e,t){var a=0;e.subscribe(Mo(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function id(e,t){return wo((function(n,r){var a=null,o=0,s=!1,i=function(){return s&&!a&&r.complete()};n.subscribe(Mo(r,(function(n){null==a||a.unsubscribe();var s=0,c=o++;Ro(e(n,c)).subscribe(a=Mo(r,(function(e){return r.next(t?t(n,e,c,s++):e)}),(function(){a=null,i()})))}),(function(){s=!0,i()})))}))}function cd(e,t){return wo((function(n,r){var a=0;n.subscribe(Mo(r,(function(n){r.next(e.call(t,n,a++))})))}))}function ld(e,t,n){return void 0===n&&(n=1/0),Ya(t)?ld((function(n,r){return cd((function(e,a){return t(n,e,r,a)}))(Ro(e(n,r)))}),n):("number"==typeof t&&(n=t),wo((function(t,r){return function(e,t,n,r,a,o,s,i){var c=[],l=0,d=0,u=!1,p=function(){!u||c.length||l||t.complete()},h=function(e){return l<r?f(e):c.push(e)},f=function(e){o&&t.next(e),l++;var i=!1;Ro(n(e,d++)).subscribe(Mo(t,(function(e){null==a||a(e),o?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();s?xo(t,s,(function(){return f(e)})):f(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Mo(t,h,(function(){u=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function dd(e){return e&&Ya(e.schedule)}function ud(e){return e[e.length-1]}function pd(e){return dd(ud(e))?e.pop():void 0}function hd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vo(e,pd(e))}var fd=new _o((function(e){return e.complete()}));function gd(e){return e?function(e){return new _o((function(t){return e.schedule((function(){return t.complete()}))}))}(e):fd}const md=(e,t,n)=>Go((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),hd(Dg(e,r,t,null,n))))),yd=(e,t)=>n=>new _o((r=>{let a={},o=0;return n.pipe(ld((n=>{const r=Date.now();let s;return s=t||h(),s&&s(n,a)&&r-o<e?gd():(a=n,o=r,hd(n))}))).subscribe(r)})),Id=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,o={data_view_ID:t},{restApi:s,reqType:i}=Yg("createDataObject",o),{content:c}=Xc(a);return Vo(Ws(s,{method:i,headers:r,body:{data:c.content,pageInstructions:c?.pageInstructions}},a)).pipe(cd((t=>({response:t.data,actionInPayload:e}))),md("Error occurred during ajax call at createDataObject Epic",n))},Ed=e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:o}=e,s={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=Yg("readDataObject",s);return Vo(Ws(i,{method:c,headers:r,body:{dataViewParameters:o}},n)).pipe(cd((t=>({response:t.data,headers:Jc(t.headers),actionInPayload:e}))),md("Error occurred during ajax call at getDataObjectView Epic",n))},Ad=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:o}=e,s={data_view_ID:t},{restApi:i,reqType:c}=Yg("updateDataObject",s),{content:l}=Xc(a);return Vo(Ws(i,{method:c,headers:{...r,"if-match":e?.etag},body:{data:{...l.content,...o},pageInstructions:l.pageInstructions||[]}},a)).pipe(cd((t=>({response:t.data,actionInPayload:e}))),md("Error occurred during ajax call at updateDataObject Epic",n))},Cd=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:a,dataViewParameters:o}=e,s={data_view_ID:t,action_ID:a},{restApi:i,reqType:c}=Yg("openDataObjectAction",s);return Vo(Ws(i,{method:c,headers:r,body:{dataViewParameters:o}},n)).pipe(cd((t=>({response:t.data,headers:Jc(t.headers),actionInPayload:e}))),md("Error occurred during ajax call at getDataObjectView Epic",n))},_d=e=>{const{savableDatapage:t,context:n,headers:r,actionID:a,keys:o,containerItemID:s,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:a};let{restApi:l}=Yg("submitDataObjectAction",c);const{reqType:d}=Yg("submitDataObjectAction",c),{content:u}=Xc(s);return l=Wl(i,l),Vo(Ws(l,{method:d,headers:{...r,"if-match":e?.etag},body:{data:{...u?.content,...o},pageInstructions:u?.pageInstructions||[]}},n)).pipe(cd((t=>({response:t.data,actionInPayload:e}))),md("Error occurred during ajax call at getDataObjectView Epic",n))};const Sd=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const o={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=o}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:a}=n;ju(e,r,t,a,{})}}},bd="postDataViewMetadata",Nd={getData:(e,t,n,r)=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:o,signal:s,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=Yg("getListData",a);return Ws(c,{method:l,body:t,...s&&{signal:s},...o&&{skipClearErrorMessages:o}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:o}=Yg("getListDataCount",r);return Ws(a,{method:o,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const a=!!n,o=!!r,s=Dh.doesRestApiExist(bd),i=(a||o)&&s?bd:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:d}=Yg(i,c);if(s){if(a)return Ws(l,{method:d,body:{associationFilter:n}},t);if(o)return Ws(l,{method:d,body:{propertyFilter:r}},t)}return Ws(l,{method:d},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:o,signal:s,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:d,reqType:u}=Yg("readDataObject",c);return Ws(d,{method:u,body:l,...s&&{signal:s},...o&&{skipClearErrorMessages:o}},r,i)},getCaseEditMetadata:(e,t)=>Ml.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Ml.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Ml.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:o,viewName:s,viewClassName:i}=e,c={viewName:s,viewClassName:i},{restApi:l,reqType:d}=Yg("moveListRecords",c);return Ws(l,{method:d,body:{content:{sourceID:n,destinationID:r,context:a,listClass:o}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Fp("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${Zi.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=$h.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const Td=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const Pd=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),a=this.users[e];if(a)return a.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const o={matcher:"PRESENCE",criteria:{userId:e}};return wd.subscribe(o,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],wd.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};var Od=n(631),vd=n.n(Od);const Dd=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),a=Object.keys(e);0===vd()(r,a).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};wd.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}};const Rd=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Dd("CASE",t)}return this.subscriptions[e]}};const $d=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static publishCaseValuesUpdate(e,t){const n=`${t.actionInContext}/workarea`;Object.entries(e.message).forEach((([e,t])=>{const r=Mp(n)||"",a=this.transformReference(e),{pageReference:o,propertyName:s}=this.extractReferenceParts(a);e.match(/\.\w+\[\d+\]\.\w+/)&&Cl.executeStateMachine(r,a,t,!0,{skipStateUpdate:!0});vf([{type:Q,payload:{reference:a,value:t,context:r}},{type:ee,payload:{reference:a,value:t,context:r,pageReference:o,propertyName:s}}])}))}};class xd{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new Pd;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static isAuthenticated=!1;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=Zi.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.webSocket.close(),this.cleanSocketListeners());const r=t.endsWith("/")?`${t}ws`:`${t}/ws`;try{const e=new WebSocket(`${r}`);this.webSocket=e,this.boundHandleOnOpen=this.handleOnOpen.bind(this),this.boundHandleOnMessage=this.handleOnMessage.bind(this),this.boundHandleOnError=this.handleOnError.bind(this),this.boundHandleOnClose=this.handleOnClose.bind(this),e.addEventListener("open",this.boundHandleOnOpen),e.addEventListener("message",this.boundHandleOnMessage),e.addEventListener("error",this.boundHandleOnError),e.addEventListener("close",this.boundHandleOnClose)}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0,this.isAuthenticated=!1),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),this.isAuthenticated=!1,e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=Zi.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){const t=xd.agentSubscribeIdMap.get(e.assignmentID);xd.unsubscribe(t??""),xd.agentSubscribeIdMap.delete(e.assignmentID)}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=xd.subscribe(t,(t=>{$d.publishCaseValuesUpdate(t,e)}));xd.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(1e4),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket?.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const a=this.subscribers[r];a?.filter&&a.filter.matcher===e&&qf.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.isAuthenticated=!0,_s.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,xd.subscribeAgentMessageCaseValues),_s.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,xd.unsubscribeAgentMessageCaseValues),this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.unsubscribe(e,!0)})),Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5500))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.boundHandleOnOpen),this.webSocket.removeEventListener("message",this.boundHandleOnMessage),this.webSocket.removeEventListener("error",this.boundHandleOnError),this.webSocket.removeEventListener("close",this.boundHandleOnClose))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const a=r||`${Date.now()}_${this.connectionsCount}`,o=new Td(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState&&this.isAuthenticated?(this.subscribeToSocket(o,a),a):(this.inProgressSubscriptions.push({messageSubscriber:o,id:a}),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e,t){if(this.subscribers[e]){t||delete this.subscribers[e];const n={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(n))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>Rd.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:Zi.b2sJWT}};Wi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(Zi.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const wd=xd;const Md=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){const t=[],{pageNumber:n,pageSize:r}=e,a=n*r;let o=a-r;for(;o<a;o+=1){if(!this.records[o])return this.maxRecords===o?t:[];t.push(this.records[o])}return t}return this.records}mergeRecords(e,t){if(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:r}=t,a=n*r;let o=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[o],o+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=kf(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const Ld=new class{SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t,n,r){const a=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][a]){const t=this.dataStore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},r,a,o={}){if(this.subscribeToMessageService(e),o.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,a)||o.invalidateCache){const s=await this.fetchData(e,n,r,a,t,o),i=s?.data?.data??[];return{...s.data,data:i,pageNumber:s?.data?.pageNumber,pageSize:s?.data?.pageSize,queryStats:s?.data?.queryStats,status:s?.status}}const s=this.getData(e,n,r,a);if(s.length>0)return Promise.resolve({data:s});const i=await this.fetchData(e,n,r,a,t,o);return{...i.data,data:this.mergeDataStore(e,n,r,a,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){this.subscribeToMessageService(e);const a=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][a]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][a]);delete this.dataStore[e][a],this._removeDataStoreMetaEntry(e,n,a)}const{restApi:o,reqType:s}=Yg(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:s};if(r.enableStreaming){const e=r.streamOptions||{};Object.assign(i,{responseType:"stream",adapter:"fetch",headers:{Accept:"text/event-stream"},...e})}const c=o&&n&&0===Object.keys(n).length?o.split("?")[0]:o;return Ws(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[a]:t.data},this._addDataStoreMetaEntry(e,n,a)),r.enableStreaming?t:t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const a=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const o=this.dataPageSubscribers[n];o[a]??={};const s=o[a];return!s[e]&&(s[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&qf.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new Md;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const a=this.dataStoreMeta[e];a[r]??=[];const o=a[r];o.includes(n)||o.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,a){const o=this.generateHash(e,t,r),s=a?.data?.data;if(!s||0===s.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][o]||(this.dataStore[e][o]=new Md);const i=this.dataStore[e][o];return i.mergeRecords(s,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,o),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}subscribeToUpdate(e,t,n,r,a,o){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},o&&!this.subscribers[e].callback?.[o]&&(this.subscribers[e].callback[o]=a),this.subscribeToCascadeUpdates(e,t,n,r,o)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback?.[a],t&&t.length>0&&bf.unRegisterFields(n,r,t,a)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:a=""}=n,o=this.subscribers[r];this.markDataInstanceDirty(r,""===a?null:JSON.parse(a)),t&&this._executeDataPageSubscriptions(e),!t&&o?.callback&&Object.keys(o.callback).forEach((t=>{o.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r?.push(this.generateHash(e,null)),r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,a=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(a){const t=[];t.push(this.generateHash(n,a,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=lf(e);return!t||"reloadOncePerInteraction"===t.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const r=lf(e);let a=[];r||(a=Object.keys(t||{}).map((e=>({name:e}))));let o="",s=e;const i=[];return(r?.parameters||a).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(o=qf.getHashedString(i.join(j.HASH_DELIMITER)),s=e+j.UNDERSCORE_STRING+o),s}async fetchData(e,t,n,r,a,o){const{additionalApiParams:{useExtendedTimeout:s=!1,includeTotalCount:i=!1}={},...c}=o,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),s&&(l.useExtendedTimeout=!0),n&&(l.paging=n),r&&(l.query=r),Nd.getData(e,l,a,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&bf.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};wd.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const Fd=class{constructor(e,t,n,r,a=100,o=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=a,this.maxsize=o,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,a=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),a&&!a.dataViewCallMap[t]?(this.combiner(a,e),a.dataViewCallMap[t]={promise:n,resolve:r}):a?n=a.dataViewCallMap[t].promise:(a={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(a.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(a):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const jd=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,a,o,s){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new Fd(t,n,a,r,o,s)),this.bufferedDataQueues[e]}},Ud=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,kd=e=>e.map((e=>e.field)),Vd=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let a=(t.query?.filter).logic;const o=Object.keys(n).length;Ud(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const s=`F${o+t}`;n[s]=r[e],a=a.replace(e,s)})),(e.query?.filter).logic+=` OR ${a}`);const s=kd(e.query?.select);kd(t.query?.select).forEach((t=>{s.includes(t)||(e.query?.select).push({field:t})}))},Bd=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!qf.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Gd=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:a}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:a(e,n)})}))},Wd=e=>({combiner:Vd,comparator:Bd,separator:Gd,...e}),Hd=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class qd{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const a=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),o=qf.getHashedString(a),s=`${e.dataSource}_${o}`,i=Nd.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(`${window.sessionStorage.getItem(i)}`);if(t&&qd.searchResultsCache?.[t]?.[s])n(qd.searchResultsCache[t][s]);else if("form"!==e.cacheLifeSpan&&qd.searchResultsCache?.persisted?.[s])n(qd.searchResultsCache.persisted[s]);else{const o=new qd(e,t);JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(o.dataSourceMetaData=a.dataSourceMetaData,o.isQueryable=a.isQueryable,o.isInitialised=a.isInitialised,o.associationFilter=a.associationFilter,qd.initializeCache(t,e,s,o),n(o)):(o.associationFilter=e.associationFilter,o.propertyFilter=e.propertyFilter,o.fetchMetaData(t).then((r=>{Hd(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),o.isQueryable=r.data.isQueryable,o.dataSourceMetaData=r.data,o.isInitialised=!0,qd.initializeCache(t,e,s,o),n(o)})).catch((e=>{o.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&lf(e.dataSource)){const r=new qd(e,t),a=lf(e.dataSource);r.isQueryable=!!a?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,Hd(i,JSON.stringify({isQueryable:a?.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,qd.initializeCache(t,e,s,r),n(r)}else{const a=new qd(e,t);a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{Hd(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,qd.initializeCache(t,e,s,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new jd;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Wd(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete qd.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===qd.searchResultsCache[e]&&(qd.searchResultsCache[e]={}),qd.searchResultsCache[e][n]=r):(void 0===qd.searchResultsCache.persisted&&(qd.searchResultsCache.persisted={}),qd.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return Nd.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){qd.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>Ld.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return qd.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return Ld.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return Ld.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!Wf(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Ld.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,a)=>(Object.keys(a).every((o=>!(r?.includes(o)&&a[o]&&this.positionMatches(`${a[o]}`,e,n))||(t.push({...a}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,a=r?e.toLowerCase():e,o=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return a.startsWith(o);case"contains":return a.includes(o);case"equals":return a===o;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,a={};let o=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const s=`F${o}`;o+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const d={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};a[s]=d}}));const s=Object.keys(a).join(" OR ");return{filterConditions:a,logic:s}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...Nd.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...Nd.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const zd=qd;class Yd{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,a){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:a}]}registerForRefresh(e,t,n,r,a){n=qf.convertClipboardPageToPageRefNotation(n);const o=r.split("/").join(j.HASH_DELIMITER),s=qf.getHashedString(o);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[a]?.[n]){this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===s))||this.propChangeRefreshMap[a][n].push({uniqueHash:s,callback:t})}else Yd.initializeRefreshCache(this.propChangeRefreshMap,a,n,s,t);else if(this.refreshMap?.[a]?.[`${e}-${n}`]){this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===s))||this.refreshMap[a][`${e}-${n}`].push({uniqueHash:s,callback:t})}else Yd.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,s,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const Kd=new Yd;const Jd=class{static cleanCaches(e){bf.purgeCascadeFields(e),Sd.removeContext(e),zd.clearContextedCache(e),_s.cleanContextSubscribers(e),bl(e),ss.removeContextTreeNode(e),wd.clearContext(e),Kd.deRegisterForRefresh(e)}},Xd="GET_DESCENDANTS",Qd={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData"};const Zd=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};const eu=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let o=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(o)n.push({type:ge,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();o=!o,n.push({type:ge,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:o}}}}),t&&n.push(t)}}vf(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=Df(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let o=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!o&&(r<=0?(n.push(e),o=!o):a.push(e),n.unshift({type:ge,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:o}}}}),vf(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Df(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(vf({type:ge,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return Df(e)?(vf({type:it,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...Df(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(vf({type:it,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=Df(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&qf.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),vf({type:ge,payload:{context:e,data:{...n}}}),ac.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Df(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},tu=(e,t)=>{const n={},r=ed.getLookUpDataPage(e),a=ed.getDataPageKeys(r);if(a)for(const e of a)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:a}},nu=(e,t)=>{const n=ed.getSavableDataPage(e),r=ed.getDataPageKeys(n);return r?.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:r}},ru=e=>{_s.publish(F.PUB_SUB_EVENTS.EVENT_CANCEL,e)},au=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const ou=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),a=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),l=t?void 0:Rl(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Qf.buildActionObject({context:n,containerItemID:e,assignmentID:o,actionID:s,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:d,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,a,o="";o=t&&null!==t.actionMgrID?t.actionMgrID||"":oc.getNextActionMgrId();const s=new Promise(((e,t)=>{r=e,a=t}));if(!r||!a)throw new Error("resolveFn or rejectFn is not defined.");return oc.register(o,s,r,a,e,t,n),{actionMgrID:o,promise:s}};showDataObjectCreateView(e,t=F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Qf.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:a}=this.actionsApiPromise(r,n);return vf({type:r,payload:{...n,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!lp(t)){return new ad(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=Qf.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(j.MODAL);vf({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:o}=this.actionsApiPromise(n,r);return o.then((()=>{ru({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=Of()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));if(of(F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const r=ed.getSavableDataPage(n),a=ct,o=!!e&&e.includes(j.MODAL),s=Qf.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(a,s);return vf({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:o,isFormValid:Rl(e)}}),i}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=lt,r=ed.getSavableDataPage(e),a=ed.getDataPageKeys(r),o={};if(a)for(const e of a)o[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Qf.buildActionObject({dataViewName:r,dataViewParameters:o},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,s);return vf({type:"DELETE_DATA_OBJECT",payload:{...s}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=dt,{dataPageID:a,dataViewParameters:o}=tu(e,t),s=Qf.buildActionObject({dataLookUp:a,keyProperties:t,requestPayload:o,viewName:n.viewName||F.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,s);return vf({type:"VIEW_DATA_OBJECT",payload:{...s}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=Of()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:a,keys:o}=nu(r,t),s=ut,i=e&&e.includes(j.MODAL),c=Qf.buildActionObject({containerItemID:e,dataPageID:a,key:o},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:d}=this.actionsApiPromise(s,c);return vf({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:Rl(e),etag:l}}),d}openDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const a=pt,{dataViewParameters:o,dataPageID:s,dataPageKeys:i}=tu(e,t),c=Qf.buildActionObject({actionID:n,actionName:r,dataViewParameters:o,lookupDatapage:s,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return vf({type:a,payload:{...c}}),l}submitDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:a}=Of()?.getState()||{},o=a[e]?.dataInfo?.content?.classID;if(!o)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const s=r?.jsActionQueryParams,i=mh(e),c=Kp(i),l=Cp(c,i)||{},{resourceType:d="",key:u=""}=l,p=ht,{dataPageID:h,keys:f}=nu(o,t),g=Qf.buildActionObject({containerItemID:e,actionID:n,resourceType:d,key:u,keys:f,savableDatapage:h,containerName:j.MODAL,context:e,jsActionQueryParams:s},this.c11nEnv);g.context=e;const m=a[e]?.caseInfo?.headers?.etag,{promise:y}=this.actionsApiPromise(p,g);return vf({type:p,payload:{...g,isFormValid:Rl(e),etag:m}}),y}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase",t);const{dockable:n=!1}=t?.modalOptions||{};let r=((e,t)=>Ml.isExternalObject(e)&&!t?"CREATE_EXTERNAL_OBJECT":Ml.isObjectCaseType(e)?"CREATE_OBJECT":le)(e,xf(".isExternalObjectCreationFlow","context_data",this.c11nEnv.getContextName()));const a=Qf.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,a);if(a.headers={...a.headers},t.channelName?a.headers[j.X_ORIGIN_CHANNEL]=t.channelName:$h.isWSSPortal()&&(a.headers[j.X_ORIGIN_CHANNEL]="WSS"),V.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:o}=V.getRemoteCase(e);if(a.className=e,a.class=t,oc.setRemoteCaseHeaderByContext(a,n),V.isTraditionalRemoteCase(e)){const n={className:e,name:o,action:It,remoteClassName:t};r=oc.setTraditionalRemoteCaseParams(a,n)}}if(Ss.getPreviewMode()){a.debugInfo={debugId:qf.generateUniqueID()};const e=Ms.getCoreHeadersFromContext(a?.context||""),t=String(e?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]||"");t&&r!==le&&(a.debugInfo={debugId:t})}return vf({type:r,payload:{...a}}),o}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=ye,r=Qf.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return vf({type:n,payload:{...r}}),a}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=Qf.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("GET_DESCENDANTS",r),o=(s={...r,context:n},{type:Xd,payload:s});var s;return vf(o),a}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let a=Ml.isObjectCaseType(t)?"GET_OBJECT":de;const o=Qf.buildActionObject(r,this.c11nEnv),{promise:s}=this.actionsApiPromise(a,o);return o.headers={...o.headers},n.channelName?o.headers[j.X_ORIGIN_CHANNEL]=n.channelName:$h.isWSSPortal()&&(o.headers[j.X_ORIGIN_CHANNEL]="WSS"),o.className=t,V.isRemoteCase(t)&&(a=this.setRemoteCaseParamsForOpenCase(o,t,n.remoteCaseMeta)??a),Ss.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(o.debugInfo={debugId:qf.generateUniqueID()}),vf({type:a,payload:{...n,...o}}),s}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:a,name:o}=V.getRemoteCase(t);if(oc.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,V.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:o,action:At,remoteClassName:a};return oc.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=j.PRIMARY,r.isChild=n.isChild);let a=Yl;const o=Qf.buildActionObject(r,this.c11nEnv),{promise:s}=this.actionsApiPromise(a,o);if(o.headers=o.headers||{},n.channelName?o.headers[j.X_ORIGIN_CHANNEL]=n.channelName:$h.isWSSPortal()&&(o.headers[j.X_ORIGIN_CHANNEL]="WSS"),V.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:s}=V.getRemoteCase(t);if(oc.setRemoteCaseHeaderByContext(o,r),V.isTraditionalRemoteCase(t)){o.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:s,action:Et,remoteClassName:e};a=oc.setTraditionalRemoteCaseParams(o,r)}}o.className=t,o.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Ss.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(o.debugInfo={debugId:qf.generateUniqueID()});const i={context:o.context||n.context,containerName:o.containerName||n.containerName,targetContainerName:o.containerName||n.containerName,viewType:o.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return vf({type:a,payload:{...o,...i}}),s}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=wp(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=ss.getContextReferences(e);if(t)for(const[,e]of t)if(Jf.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return fs({messages:e,context:r,category:F.PAGE}),Promise.reject({type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:s,localActionID:i,caseActions:c,caseInfo:l,businessID:d,caseTypeID:u,caseTypeName:p}=Gl(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),h=Fl(l);let f,g=!1;if(c){const e=c.find((e=>e.ID===i));g="Case"===e?.type}else f=Df(n);let{assignmentID:m}=Gl(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});f?.context_data?.actionType&&(g=f.context_data.actionType===j.CASE,m=m||f.context_data.assignmentID);const y=((e,t,n,r)=>{let a;return a=e?Bl(e,t,n):r||"Create",a})(s,m,i,l?.activeActionID),[I,E]=o.split(" "),A={class:I,actionID:y,assignmentID:m,caseID:o,workID:E,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:g,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:d,caseTypeID:u,caseTypeName:p};e?.includes(j.MODAL)&&(A.containerName=j.MODAL,A.isModalAction=!0),A.outcome=t.outcomeID,A.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(A.viewType=Yc.FORM);const C=((e,t)=>Ml.isObjectCaseType(e)||t?_t:pe)(u,l?.isObjectWideAction),_=Qf.buildActionObject(A,this.c11nEnv),{promise:S}=this.actionsApiPromise(C,_);return _.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||Df(n).context_data.isProcessAction,_.headers??={},$h.isWSSPortal()&&(_.headers[j.X_ORIGIN_CHANNEL]="WSS"),eu.executeOrQueueDeferredAction({type:C,payload:{..._,context:n}}),S}getNextWork(){if("HYBRID"===$h.getRenderingMode())return _s.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:$h.getOperatorIdentifier()}),Promise.resolve();const e=Yl,t=Qf.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return vf({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Yl,n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Qf.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),s={type:t,payload:{...a,caseID:n,headers:r}};return vf(s),o}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(a.containerName=j.MODAL,a.isModalAction=!0);const o=Qf.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o),i=wp(e);return vf({type:t,payload:{...o,context:i,cases:n,actionID:r,isFormValid:Rl(i),classID:this.c11nEnv.getCurrentClassID()}}),s}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},o=Qf.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o),i=wp(e);return vf({type:t,payload:{...o,context:i,cases:n,actionID:r,isFormValid:Rl(i),classID:this.c11nEnv.getCurrentClassID()}}),s}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:r}=t,a=t.type,o={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:a,runningMode:r,...t},s="OPEN_BULK_ACTION",i=Qf.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i);return vf({type:s,payload:{...i}}),c}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));return new ad(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(vf({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(vf({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(F.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return vf([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return vf([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,au(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=t.type,o={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},s=(e=>"Object"===e.type||Ml.isObjectCaseType(e?.caseClassName||"")||window.location.href.includes("/objects/")?Ct:"OPEN_LOCAL_ACTION")(t),i=Qf.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i);if(s===Ct)return vf({type:s,payload:{...i}}),c;const l=this.c11nEnv.getContextName(),d=Fp(l)[0];let u=!1;const p=Rp(d),h=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),f=n!==h&&p&&V.getRemoteHeaderByContext(p)||V.getRemoteHeaderByContext(l);let g;if(oc.setRemoteCaseHeaderByContext(i,f),!d)return g=l,vf({type:s,payload:{...i,contextName:l,continueExecution:u}}),c;g=Rp(d);const m=Ap(d);if(m?.accessedOrder.forEach((e=>{n===m.items[e].key&&(u=!0,g=m.items[e].context)})),!u||g&&"review"===Of()?.getState()?.data[g]?.context_data?.caseViewMode)return vf({type:s,payload:{...i,contextName:l,continueExecution:u}}),c;const y=g,I=y&&y.includes(j.MODAL),E=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),A=Df(g),C=A?.caseInfo?.assignments?A.caseInfo.assignments[0]?.actions[0]?.ID:void 0,_=this.c11nEnv.getContainerName(),S=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),b=this.c11nEnv.getValue("isProcessAction","isProcessAction"),N=Qf.buildActionObject({context:y,containerItemID:g,assignmentID:E,actionID:C,caseID:n,containerName:_,caseType:S,isModalAction:I,isFormValid:!0,isProcessAction:b},this.c11nEnv);N.context=g;const T=wp(g),P=this.c11nEnv.getCaseSummary(),O=Fl(P),v=Qf.buildActionObject({caseID:n,containerItemID:g,cancelContext:T},this.c11nEnv);let D={};return I?(v.acTargetName=j.MODAL,v.isInCreateStage=O,v.isModalAction=I,D={...v}):D={...v,acName:Ot(this.c11nEnv.getContainerName(),v.context)},vf({type:s,payload:{...i,contextName:l,saveActionPayload:N,cancelActionPayload:D,continueExecution:u}}),c}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,au(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,a=t.type,o={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},s=zl,i=Qf.buildActionObject(o,this.c11nEnv),c=this.c11nEnv.getContextName(),l=Fp(c)[0];let d=V.getRemoteHeaderByContext(c);if(!d&&l){const e=Ap(l);e?.accessedOrder.forEach((r=>{(t.caseID||n)===e.items[r].key&&(d=V.getRemoteHeaderByContext(e.items[r].context))}))}oc.setRemoteCaseHeaderByContext(i,d);const{promise:u}=this.actionsApiPromise(s,i);return vf({type:s,payload:{...i}}),u}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=Fl(this.c11nEnv.getCaseSummary()),o=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),s={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a,caseID:o};t&&t.includes(j.MODAL)&&(s.acTargetName=j.MODAL);const i=Qf.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=wp(t);return vf({type:n,payload:{...i,containerItemID:t,context:l}}),c}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:n}=F,r=he,a=wp(e),o=e&&e.includes(j.MODAL),s=this.c11nEnv.getCaseSummary(),i=Fl(s),c=this.c11nEnv.getValue(j.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),d=Qf.buildActionObject({caseID:c,containerItemID:e,context:a},this.c11nEnv);let u={};o?(d.acTargetName=j.MODAL,d.isInCreateStage=i,d.isModalAction=o,u={...d}):u={...d,acName:Ot(this.c11nEnv.getContainerName(),d.context)};const{promise:p}=this.actionsApiPromise(r,d);return vf({type:r,payload:u}),p.then((()=>{t||ru({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=F,n=e,r=He,a=e&&e.includes(j.MODAL),o=this.c11nEnv.getValue(t.CASE_INFO_ID),s=Qf.buildActionObject({caseID:o,containerItemID:e,context:n},this.c11nEnv);if(!lp(n)){return new ad(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{ru({caseID:o,context:this.c11nEnv.getContextName()})}))}vf({type:r,payload:{...s,isModalAction:a}});const{promise:i}=this.actionsApiPromise(r,s);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=F,n=He,r=e,a=r&&r.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),s=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID)),i=Fl(o),c=this.c11nEnv.getValue(j.getProperty(t.CASE_INFO_ID)),l=Qf.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv),d=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=$h.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(l.isProcessAction=d,i&&(a||u)&&!Ll(o)){const t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=lp(r);if(this.shouldDeleteCaseInCreateStage(c,t,u)){const t=!0===Boolean(Ml.isExternalObject(s));return this.deleteCaseInCreateStage(e,t)}vf({type:n,payload:{...l,isModalAction:a,isChildCase:Vl(o),isInCreateStage:i}})}const{promise:p}=this.actionsApiPromise(n,l);return p.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Jl,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return eu.executeOrQueueDeferredAction(Xl(n)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Jl,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return vf(Xl(n)),r}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=Kl,r=e,a=r&&r.includes(j.MODAL),o=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),s=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),i=Qf.buildActionObject({caseID:o,caseType:s,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const d=`${j.APP.APP}/${yp.PRIMARY}`,u=ol(d,yp.PRIMARY);i.parentContext=u,a&&(i.targetName=j.MODAL,i.containerName=yp.MODAL,i.isModalAction=a),vf((e=>({type:Kl,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{ru({caseID:o,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=Dh.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return Ws(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:a}=Dh.getRestEndPoint("updateRecents")||{},o=`${E()}${a}`;return Ws(o,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=Dh.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return Ws(t,{method:"GET",headers:{}}).then((e=>(Object.keys(ss.rootNodes).forEach((e=>{Jd.cleanCaches(e)})),ss.rootNodes={},sessionStorage.clear(),Gf(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Ws(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:yp.PREVIEW,containerName:yp.PREVIEW,context:F.APP.APP,...t})}showDataPreview(e,t,n){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:yp.PREVIEW,containerName:yp.PREVIEW,context:F.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=Qf.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const a=te,{promise:o}=this.actionsApiPromise(a,r,!1);return vf({type:a,payload:{...r}}),o}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=Qf.buildActionObject({viewName:e,className:t},this.c11nEnv),a=ne,{promise:o}=this.actionsApiPromise(a,r);return Ss.getPreviewMode()&&(r.debugInfo={debugId:qf.generateUniqueID()}),vf({type:a,payload:{...r,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),o}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Qf.buildActionObject({},this.c11nEnv),r=ae,{promise:a}=this.actionsApiPromise(r,n);return vf({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Qf.buildActionObject({},this.c11nEnv),r=oe,{promise:a}=this.actionsApiPromise(r,n);return vf({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,n,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=Qf.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),o=re;r?.containerName||(r.containerName="HYBRID"===$h.getRenderingMode()?Zd.getRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME):ic.getTargetViewContainerName(o));const{promise:s}=this.actionsApiPromise(o,a);return vf({type:o,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),s}changeHandler(e,t){Qf.changeHandler(e,t)}eventHandler(e,t){Qf.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,r={skipDirtyValidation:!1}){const a=this.c11nEnv.getContextName(),o=this.c11nEnv.getPageReference(),s=Jf.getContextPath(o,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,r);let i=this.c11nEnv.getValue(j.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=xf(`.${c.join(".")}.classID`,o,a)),e=qf.trimDotForProperty(e),vf({type:ee,payload:{reference:s,value:t,context:a,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:o="",isListEntry:s=!1,skipDirtyValidation:i=!1,associatedProperty:c}=n,l=this.c11nEnv.getContextName();let d=this.c11nEnv.getPageReference();const u=o?.startsWith(d)?o.replace(d,""):o;d=o||d;const p=Jf.getContextPath(d,e);let h=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(u?`${u}${e}`:e,t,{isArrayDeepMerge:a,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),hs({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:l,isListEntry:s}),vf({type:Q,payload:{reference:p,value:t,context:l,isArrayDeepMerge:a,skipDirtyValidation:i,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...c&&{associatedProperty:`${d}${c}`}}})}activateModalContainerItem(e){const t=Me,{context:n}=e,r=n&&n.includes(j.MODAL),a=Qf.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=j.MODAL,a.isModalAction=r),vf({type:t,payload:a});const{promise:o}=this.actionsApiPromise(t,a);return o}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:o}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:s,propertyName:i,preserveClientChanges:c,classID:l,context:d,optionalPayload:u,isArrayDeepMerge:p}=r,h={actionMgrID:o,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:u};r.refreshFor&&(h.refreshFor=r?.refreshFor),r.resetForm&&(h.resetForm=r?.resetForm);const f=d||this.c11nEnv.getContextName(),g=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&s&&(((e,t)=>kl(e)&&!Ul(e,t))(f,g)||Ul(f,g))?Hu(f,n,h):ju(e,t,f,n,h),a}refreshEmbeddedDataWithAction(e,t,n,r,a,o,s,i,c={}){const{promise:l}=this.actionsApiPromise(Qd.REFRESH_DATA),d=this.c11nEnv.getContextName();return Uu(e,t,n,d,r||this.c11nEnv.getPageReference(),a,o,s,i,c),l}openEmbeddedDataModal(e,t,n,r,a,o,s,i){const c=ft;let l=t.getCaseInfo().getKey();const d=t.getValue(F.CASE_INFO.IS_LOCAL_ACTION),u=t.getValue(F.CASE_INFO.ASSIGNMENT_ID),p=((e,t,n)=>n||t!==j.ACTION?e.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID))(t,s,d),h=t.getPageReference();let f="string"==typeof r?`${t.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${r}`:`${t.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${r}]`;h.startsWith(F.OBJECT_INFO.OBJECT_INFO)&&!l&&(l=t.getCaseInfo().getObjectKey(),f=`${t.getPageReference().replace(F.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${r}]`);const g={targetProperty:n,index:r,viewID:e,ID:l,actionType:a,interestPage:qf.convertPageRefToClipboardPageNotation(f),heading:o,editType:s,interestPageActionID:s===j.ACTION?i:void 0,actionID:p,isLocalAction:d,operationFlag:j.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof r,assignmentID:d||s!==j.ACTION?void 0:u},m=Qf.buildActionObject(g,this.c11nEnv);if(s===j.ACTION){const e=qf.getETag(m.context);m.headers={"If-Match":e}}const{promise:y}=this.actionsApiPromise(c,m);if($h.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=pn.trimAnnotation(e.config.value),r=Qh(n.startsWith(".")?n.replace(".",""):n,e.config.classID);r?.isDeclarativeTarget&&ss.addFieldNode(t.getContextName(),h+f,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:h+f})}))}return vf({type:c,payload:{...m,containerName:F.MODAL,skipSemanticUrl:!0}}),y}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=gt;let n=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID));const r=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID));let a=this.c11nEnv.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"");const o=wp(e),s=this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:d,viewName:u,parentContext:p}=s;a.startsWith(F.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(F.OBJECT_INFO.OBJECT_INFO_ID),a=this.c11nEnv.getPageReference().replace(F.OBJECT_INFO.OBJECT_INFO_CONTENT,""));const h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:u,isFormValid:Rl(o),interestPage:qf.convertPageRefToClipboardPageNotation(a),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:d,operationFlag:j.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:r};e&&e.includes(j.MODAL)&&(h.containerName=j.MODAL,h.isModalAction=!0);const f=Qf.buildActionObject(h,this.c11nEnv);if(c===j.ACTION){const e=qf.getETag(f.context);f.headers={"If-Match":e}}const{promise:g}=this.actionsApiPromise(t,f);if(lp(o)){const[e,t,n]=Yo(this.c11nEnv.getPageReference());ss.mutatePageList(p,e,t,{type:et,rowIndex:n}),vf({type:et,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return eu.executeOrQueueDeferredAction({type:t,payload:{...f,context:o}}),g}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=wp(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(yt);return Hu(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,t){if(!of(F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=mt,r=Qf.buildActionObject({containerItemID:e},t);vf({type:n,payload:{...r,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Rl(e),context:e}});const{promise:a}=this.actionsApiPromise(n,r);return a}showSubscriptCreateView(e,t,n,r=F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const a=Qf.buildActionObject({viewName:r,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),o=ne,{promise:s}=this.actionsApiPromise(o,a);return vf({type:o,payload:{...a,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}deleteWork(e,t,n){if(!e)return Promise.reject(new Error("workId is required parameter"));const r=St,a=Ml.isExternalCaseType(t),o=Qf.buildActionObject({workId:e,caseTypeID:t,isExternalCase:a,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,o);return vf(Zl({...o})),s}deleteDataRecord(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=St,r=Qf.buildActionObject({className:e,keys:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return vf(Zl({...r})),a}};const su=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=Yg("getCaseStages",n);return(await Ws(r,{method:a},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return Fl(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return Ll(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=Cp(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===j.VIEW?a?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.VIEW_NAME)))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes("pyViewContext")){const t=e.caseInfo?.content??{},r=t.pyViewContext;if(""===r)return n.caseInfo.content;if("string"==typeof r&&r.includes("(")&&r.includes(")")){const e=r.substring(1,r.indexOf("(")),n=parseInt(r.substring(r.indexOf("(")+1,r.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n]}}const r=t.split(/[.[\]]/).filter((e=>e));for(const e of r)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=Cp(e,t),{config:r}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),a=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO)),o=r?.type===j.VIEW?r.context:null;if(o){const e=this.getValueByPath({caseInfo:a},o);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(j.getProperty(j.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=W(this.c11nEnv.getContextName());let n;t&&(n=Df(t));const r=n?.caseInfo?.availableActions,a=Df(this.c11nEnv.getContextName()),o=a?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:o}return o}return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],r=this.getChildAssignments()||[];let a=JSON.parse(JSON.stringify(r));a=a.map((e=>(e.isChild=!0,e)));const o=[...n,...a];let s=JSON.parse(JSON.stringify(o));return e&&!this.isPerform()&&(s=s.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),s}getActiveCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO);return Ll(e)}},{RESOURCE_TYPES:iu}=F;const cu=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:oc.getNextActionMgrId(),context:t,...r},o=de;r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:$h.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:s}=oc.actionManagerPromise(o,a.actionMgrID);return vf({type:o,payload:a}),s}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:oc.getNextActionMgrId(),context:t,...r},o=fe;r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:$h.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:s}=oc.actionManagerPromise(o,a.actionMgrID);return vf({type:o,payload:{...a}}),s}static createCase(e,t,n,r={}){const a=le,o={class:e,acTargetName:n,actionMgrID:oc.getNextActionMgrId(),context:t,...r};r&&r.channelName?o.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:$h.isWSSPortal()&&(o.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:s}=oc.actionManagerPromise(a,o.actionMgrID);return vf({type:a,payload:{...o}}),s}static getNextWork(e,t,n={}){const r=fe,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:oc.getNextActionMgrId(),context:e,...n},{promise:o}=oc.actionManagerPromise(r,a.actionMgrID);return vf({type:r,payload:{...a}}),o}static getOpenedCaseItems(e){const t=[],n=Ap(e);if(n){const{items:r={}}=n,a=Object.keys(r),o=Rp(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===iu.CASE||r[n].resourceType===iu.ASSIGNMENT||r[n].resourceType===iu.OBJECT)){const{key:a="",context:s}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),l=xf(".caseTypeID",j.CASE_INFO.CASE_INFO,s),d=o===n;t.push({...i,key:a,workID:a,caseID:c,className:l,context:s,containerItemID:n,target:e,active:d})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:r,reqType:a}=Yg(Be,n),o={},s=V.getRemoteHeaderFromSourceClass(t??"");return s&&(o.RemoteSystemID=s),Ws(r,{method:a,headers:o})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=Yg("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,o=a/5,s={},i=[];for(let e=0;e<a;e+=o)s.cases=r.slice(e,e+o),s.cases.length&&i.push(Ws(t,{method:n,body:s}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0===e?l=c[e].data.availableActions:l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=Yg("getCaseBulkActions",t),a=await Ws(n,{method:r});let o=[];return a.data?.availableActions?.length&&(o=a.data.availableActions),o}};class lu{static getParagraphStream(e,t,n){return((e,t,n)=>{if(!e)return e;const r=(new DOMParser).parseFromString(e,"text/html"),a=r.querySelectorAll("pega-reference");for(const e of a){const n=e.getAttribute("data-rule-id");if(n){const a=t.getValue(n),o=r.createTextNode(a??"");e.replaceWith(o),t.registerAdditionalProps({[n]:`@P ${n}`})}else e.replaceWith("")}let o;return o="simple"===n?r?.body?.textContent||"":r?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(o)?null:o})(e,t,n)}static isDecisionParagraph(e,t){const n=ff(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),r=ff(e,n);let a;if(r?.useDecision){const n=r.dynamicContents.length;for(let o=0;o<n-1;o+=1)if(Jf.resolveWhen(r.dynamicContents[o].when,t)){a=r.dynamicContents[o],e=`${e}#${a.when}`;break}a||(a=r.dynamicContents.pop())}else a=r;const o=r?.definedOnClassID,s=Fh().getParagraphLocaleValue(o||n,e);return s?lu.getParagraphStream(s.content,t,s?.category):a?.content?lu.getParagraphStream(a.content,t,a?.category):null}}const du=lu;class uu{constructor(e){this.fieldType=e}applyFallback(e){const t=vi.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class pu{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new uu(e);default:return}}}const hu="DATAPAGE",fu="VIEW",gu="FIELD",mu="PARAGRAPH",yu=(e,t,n,r)=>{const a=[fu,gu,mu],o=[hu,mu];(!t||a.includes(e)&&!n)&&console.warn(`Invalid parameters for locale reference: type=${e}, id=${t}, ruleClass=${n}, path=${r}`);const s=o.includes(e)&&r?`#${r}`:"",i=e===hu?"@BASECLASS":n;return e===hu||a.includes(e)?`${i}!${e}!${t}${s}`.toUpperCase():`${e}!${t}${s}`.toUpperCase()};class Iu{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=Zh(this.locale),r=this.#r(e,this.localeReference?n.localeStore[`${this.localeReference.toUpperCase()}`]:{})||this.#r(e,n.localeStore[Iu.COMMON_LABELS])||this.#r(e,n.localeStore[Iu.COMPONENT_FIELDS])||this.#a(e)||e;return(t?this.#o(r,t):r)||e}getLocalizedMessage(e,t){const n=Zh(this.locale).localeStore[Iu.MESSAGES]??{},r=this.#r(e,n)??e;return(t?this.#o(r,t):r)||e}getLocalizedDataPage(e,t,n,r){if(!t||!n||!e)return e;const a=yu(hu,t,void 0,n),o=Zh(this.locale),s=this.#r(e,o.localeStore[a])??this.#r(e,o.localeStore[Iu.COMMON_LABELS])??this.#a(e)??e;return(r?this.#o(s,r):s)||e}#o(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#a(e){if(0===this.lookupList.length)return;const t=Zh(this.locale);for(const n of this.lookupList){const r=this.#r(e,t.localeStore[n]);if(r)return r}}#r(e,t){if(null==e||!t)return;const n=t[e]??t[e];return"string"==typeof n?n:void 0}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const Eu=e=>L.getNeedsMapping()||e?.info===F.OBJECT_INFO.OBJECT_INFO?F.OBJECT_INFO.OBJECT_INFO:F.CASE_INFO.CASE_INFO,Au=(e,t)=>{const n=Eu(t);e.data=e.data??{};const{assignments:r,availableActions:a=[]}=e.data[n]??{};if(r&&Array.isArray(r)&&r.length>0&&r[0].actions&&Array.isArray(r[0].actions)&&!t?.stopMergeActions){r[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||a.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=a}},Cu=(e,t)=>{const n=Eu(t);if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return Au(t),t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const r=e,{uiResources:{actionButtons:a,navigation:o},nextAssignmentInfo:s}=r;if(r.data&&r.data[n]&&(a&&(r.data[n].actionButtons=a),o&&(r.data[n].navigation=o),t&&t[F.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,Au(r,t),e.confirmationNote)){const{confirmationNote:e}=r,t=[e];r.data.caseMessages=t}return t&&t.isCreateDataObject&&(r.data=r.data??{},r.data.dataInfo={},r.data.dataInfo.content=r.data.pyPortal,r.uiResources.root.config.context="dataInfo.content",r.uiResources.context_data.dataInfo=r.uiResources.context_data.dataInfo??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data.dataInfo.content??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data?.pyPortal,delete r.data.pyPortal,delete r.key),s&&(r.data=r.data??{},r.data.nextAssignmentInfo=s),r},_u=async e=>{const t=Cu(e),n=qf.getIn(t,j.COMPONENTS);ki(t,{},!0),await nc(n)},Su=(e,t,n)=>Jf.resolveView(e,t,n);const bu=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Jf.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Jf.getContextPath(this.datasource,this.index);return this.index+=1,xu({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Nu{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,xu({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Tu=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new bu(e,e.context||"",t);if(n){const n=Mf(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new bu(e.children[0],n||e.context,t)}return e?.children?new Nu(e.children,t):void 0};class Pu{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>td.isProperty(e))).map((e=>td.getPropertyName(e)))}}const Ou=new Pu;let vu;Object.freeze(Ou);const Du=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],o=pn.trimAnnotation(a);if("string"!=typeof o&&"string"!=typeof a||!(qf.isValidAnnotation(a)&&qf.isPropertyRef(o)||a.startsWith("@W ")||a.startsWith("@DW ")||a.startsWith("@E ")||a.startsWith("@ATTACHMENT "))){if(Array.isArray(o))o.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),Du(e,t[r][n],a)}));else if(o&&"object"==typeof o&&"exp"!==o.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},Du(o,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=o}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Ru=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...qf.deepClone(t.inheritedProps)]};class $u{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:a}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=a,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=qf.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Ru(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=ei.formatePageReferenceToArrayIndex(this.meta.config.value)),Du(this._rawConfig,this._stateProps),this._isState=!qf.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=qf.isExpressionExist(this._rawConfig.config),this._isWhenExist=qf.isWhenExist(this._rawConfig.config),this._isValidatorExist=ji.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=F.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let o=this.options.pageReference;this.options.pageReference&&(o=pn.handleAnnotation(this.options.pageReference,this)),this._pageReference=Jf.getContextPath(o||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const s="reference"===this._type&&qf.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=Jf.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=pn.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=qf.isExpressionExist(e),this._isWhenExist=qf.isWhenExist(e),this._isValidatorExist=ji.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=pn.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Gu(this)}(s||i||c)&&ku(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(j.PARAGRAPH_ANNOTATION)){const r=pn.trimAnnotation(t);n=du.isDecisionParagraph(r,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=pn.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=pn.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:a,disabled:o,visibility:s,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const d="Address"===this._type&&this._rawConfig?.config?.associatedView?pn.trimAnnotation(this._rawConfig.config.associatedView):"",u=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:pn.trimAnnotation(t),label:u?.startsWith("@")?pn.handleAnnotation(u,this,void 0):u,required:r,readOnly:a,disabled:o,visibility:s||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};ss.addFieldNode(this._contextName,this._pageReference,(d||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)ss.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",pn.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)ss.removeViewNode(this._contextName,this._pageReference,pn.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;ss.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&ss.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&ss.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&ss.addViewNode(this._contextName,this._pageReference,pn.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&ss.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=qf.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=pn.isProperty(n)?pn.trimAnnotation(n):""}e&&n.forEach((n=>{ss.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,readOnly:r,disabled:a,visibility:o,validationType:s,selectionMode:i,selectionList:c,selectionKey:l,referenceList:d,renderMode:u,caption:p}=this.getRawConfigProps(),h=t||p;let f=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(f=this.getSelfReferencingDatapageKeys()),ss.addPageListNode(this._contextName,this._pageReference,this.viewName??"",pn.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:pn.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?pn.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:a,visibility:o||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:s,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:u,referenceList:d,selectionKey:l,index:this.index,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?f:void 0});const g=this.getValue(pn.trimAnnotation(this.getPropertyName()),this._pageReference)||[];ss.updatePageListNode(this._contextName,this._pageReference,pn.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){qf.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=Su(t,this,e);if(!n)return;const r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let a={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(a=n.config.parameters);const o=qf.generateDataPageHashWithParameters(a,r,this),s=Rf(),i=s?s[r]?.[o]:{};return Array.isArray(i?.pxResults)?i.pxResults:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new su(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID));return Fh().getCaseLocaleReference(e)}getListActions(){return Oi(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Jf.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=yp.PRIMARY,name:r,routingInfo:a}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===a)&&r?r:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=d?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=Jf.getContextPath(this.getPageReference(),n),a=t?qc.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...vi.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=pu.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),qf.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),r=$h.getLocale()??"en-US",a=new Iu(r,n),o=this.getCaseLocaleReference();return o&&a.setLookupList([o]),a}getRawConfigProps(){const e={...vi.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Jf.resolveProps(e,t,this),pn.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Du(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),r=this.getComponentConfig(),a=n===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE){const n=Rp(`${j.APP.APP}/${this.getContainerName()}`),r=ps({context:n,category:F.PAGE});e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||pn.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=ps({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_ERROR}),r=ps({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_INFO});n&&n[0]&&(e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status),r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===j.ROOT_CONTAINER){const n=ms(a,Rp(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const r=qc.getSharedState("isLoggedOut");e.isLoggedOut=r,this._stateProps.isLoggedOut=r;const o=ps({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=t(o),this._stateProps.pageMessages=e.pageMessages}if(n===j.HYBRID_VIEW_CONTAINER){const n=ps({context:j.APP.APP,category:j.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=cu.getOpenedCaseItems(`${F.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===j.APP_SHELL){const n=j.APP.APP,r=Rp(`${n}/${this.getContainerName()}`),a=[...ps({context:n,category:"PAGE"})||[],...ps({context:r,category:"PAGE"})||[]],o=a.length>0?a:void 0;e.pageMessages=o&&t(o),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===j.SCALARLIST&&(this._stateProps.value=e.value),n===j.APP_SHELL||n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE||r.template===j.CASE_PREVIEW){let t=ps({context:j.APP.APP,category:"HTTP"});const n=ps({context:Rp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(ps({context:Rp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=ps({context:Rp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(e.message))):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(n===j.VIEW_CONTAINER||n===j.FLOW_CONTAINER||n===j.MODAL_VIEW_CONTAINER||n===j.PREVIEW_VIEW_CONTAINER||n===j.ROOT_CONTAINER){if(e.routingInfo=vt(this.getContainerName(),this._contextName),n===j.ROOT_CONTAINER&&(e.rootConfig=Pu.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===j.FLOW_CONTAINER){const n=ps({context:this.getContextName(),category:j.CASEMESSAGES}),r=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const a=Fp(r)[0];if(a){const n=Rp(a),r=d?.getStore()?.getState()?.data;r&&n&&(e.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime);const o=ps({context:n,category:F.PAGE}),s=ps({context:n,category:"HTTP"});e.httpMessages=t(s),e.pageMessages=t(o),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,s?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===j.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else r.template===j.CASE_VIEW||r.template===j.SELF_SERVICE_CASE_VIEW||r.template===j.CASE_PREVIEW||r.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const o=this.getInheritedProps()?.shouldAutoRefresh;o&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:a,propertyAnnotation:o}=this.getPropertyDetails(r,n,t);if(a&&"string"==typeof a&&(a.includes(o)||a.includes(j.ATTACHMENT_ANNOTATION))){const t=pn.getPropertyName(a),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Cf(`${this._pageReference}.${t}`,this._contextName);return e?.additionalInformation&&this.setStateProps({additionalInformation:n}),Array.isArray(e)||(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(Qh(e,t),e)}const n=t.pop(),r=t.join(".")?".":"";let a=this.getValue(`${r}${t.join(".")}${j.CLASS_ID}`);return a||(a=qf.resolvePageClass(e,this.getValue(j.CASE_INFO.CASE_INFO_CLASSID))),this.resolvePropertyMetadata(Qh(n,a),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(Qh(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[j.getProperty(F.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Ul(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new ql(this)}isEditable(){return!(!this._rawConfig||!this._rawConfig.config||this._inheritedConfig&&this._inheritedConfig.readOnly||!(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)||"string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST")||Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly)||Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?pn.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||pn.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||pn.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const r=n.getConfigProps(),a={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let o=n._type&&a.includeTypes.includes(n._type)&&!a.excludeTemplates.includes(r.template);if(!!r.highlightedData&&r.highlightedData.length&&r.showHighlightedData&&(o=!1),!o)return!0;const s=n.getChildren();return!!s&&s.some((t=>t.getPConnect().getComputedVisibility(e)))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return Df(e||this.getContextName())}getImagePath(e){return`${Zi.getConstellationServiceUrl()}/v860/${Zi.getAppAlias()}/image/${e}?org=${Dh.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=Tu(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#s(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),a=r&&t?`${r}#${t}`:r,o=this.getLocalizationService(a).getLocalizedText(e);return o===e?this.getLocalizationService().getLocalizedText(e):o}getLocalizedValueForFieldLabel(e){e.startsWith(".")&&(e=e.substring(1));const t=this.getFieldMetadata(e)?.label,n=this.getLocaleRuleName(),r=this?.getMetadata();let a=null;if(r){const n=r?.type,o=["View","Region"];let s=r?.config?.label||r?.config?.caption?`@FL ${e}`:null;const i=Array.isArray(r?.config?.inheritedProps)?r.config.inheritedProps.find((e=>"label"===e.prop)):null;if(!s&&i&&(s=i.value),s?.startsWith(j.FIELD_LABEL_ANNOTATION)){const e=this.#i(s);return Fh().getLocaleValue(t,void 0,e,a)}n&&!o.includes(n)&&(a=n)}return this.getLocalizationService(n).getLocalizedText(t)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?Jf.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):Jf.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),Ru(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Jf.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,a={}){let o,s;const{isArrayDeepMerge:i}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(o=!0,t||(s=!0)),vf({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...o&&{isStrictTracking:o},...s&&{removePropertyFromChangedList:s}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};cp(n)}getContextDataValue(e,t){return wf(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),vf(ng({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;vf({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){vf(Dg(e,t||{},n,t?.formFields))}getComponent(){return vu({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=Mf(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);a=Jf.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=pn.handleAnnotation(e,this),a=Jf.getContextPath(this._pageReference,e)||""}return vu(xu({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:a,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName},useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return Jf.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,xu({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new ad(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new ou(this)),this._actionsApi}getActionManager(){return oc}doesContextExist(e){return Wf(e??this.getContextName())}getGoogleMapsAPIKey(){return _()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=Df(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?hs({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?hs({type:"error",...e}):(hs({type:"error",...e,context:j.APP.APP}),hs({type:"error",...e,context:Rp(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Mf(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Sl(t);_l[e]?_l[e].fieldOrder[r]=n:_l[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,a])=>{if(Array.isArray(a)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Pi(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e+=1)Ai(a[e],e,r,void 0,{})}else"object"==typeof a&&r(a,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=qc.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Jf.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Jf.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,qc.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const r=ln.getDependencies(this._contextName,n);r?.forEach((e=>{qc.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:r={}}={}}=n||{};return Object.values(r).forEach((n=>{const[,r]=n.split("."),a=t?.split(".").pop();r===a&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(e,t){const n=td.isPropertyInternal(t),r=e.datasource,a=this.getComponentConfig().isSearchField,{isClassKey:o,isSpecial:s,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!a&&(i||n||!r&&(o||s)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#s(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===Pu.allowedComponetsForBulkProcessing[t]||!0===Pu.allowedComponetsForBulkProcessing[t]?.[n])}#i(e){const t=e.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),r=n?.pop();let a=`${r}`;const o=this.getFieldMetadata(a),s=o?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),i=o?.definedOnClassID;return a=`${i||s}!FIELD!${a}`,a}}function xu(e){const t=new $u(e);return{getPConnect:()=>t}}function wu(e){vu=e}const Mu=e=>({type:Qd.REFRESH_DATA,payload:e}),Lu={},Fu=(e,t,n,r,a,o,s,i)=>{if(!(e&&r&&t))return;const c=i.actionMgrID||oc.getNextActionMgrId(),l={ID:e,actionID:t,objectTypeID:n,context:r,caseWideAction:a,isObjectType:o,isExternalObject:s,options:{...i,actionMgrID:c}};i.isFillFormWithAI?vf((e=>({type:yt,payload:e}))(l)):vf(Mu(l))},ju=(e,t,n,r,a)=>{if(!(e&&n&&t))return;r&&(r=qf.convertPageRefToClipboardPageNotation(r));vf(Mu({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r}))},Uu=(e,t,n,r,a,o,s,i,c,l={})=>{if(!((e||t)&&r&&n&&a))return;a&&(a=qf.convertPageRefToClipboardPageNotation(a));const d={ID:s||c!==j.ACTION?e:t,actionID:n,context:r,options:l,interestPage:a,interestPageActionID:o,isLocalAction:s,isMultiRecordData:i,editType:c};vf(Mu(d))},ku=(e,t,n)=>{Lu[t]||(Lu[t]={}),e&&!Lu[t][e]&&(Lu[t][e]={pageReference:n})},Vu=(e,t,n)=>{const r={pageName:(a=t.substring(t.lastIndexOf(" ")+1)).substring(0,a.lastIndexOf(".")),propertyName:a.substring(a.lastIndexOf(".")+1)};var a;const o=Qh(r.propertyName,n||e.getValue(j.CLASS_ID,r.pageName));return!!o?.isDeclarativeTarget},Bu=(e,t)=>{const n=e.getRawMetadata()?.config?.value;let r=!1;if(n){const a=Qh(pn.getLeafPropertyName(n),t||Jf.resolveClassID(n,e.getPageReference(),e.getContextName()));if(r=!!a?.isDeclarativeTarget,!r&&a?.additionalInformation){const e=pn.trimAnnotation(a?.additionalInformation);r=du.isDecisionParagraph(e,a.classID)}!r&&a?.datasource?.parameters&&(r=((e,t,n)=>{let r=!1;if(Array.isArray(t)){const a=t=>{const a=t.value;return a.startsWith("@P")&&(r=Vu(e,a,n)),r};t.some(a)}else if("object"==typeof t)for(const a of Object.keys(t))if(t[a].startsWith("@P")&&(r=Vu(e,t[a],n),r))break;return r})(e,a?.datasource?.parameters,t)),r||(r=a?.datasource?.tableType===j.DECISION)}return r},Gu=e=>{(e.isWhenExist()||Bu(e))&&ku(e.getCurrentView(),e.getContextName(),e.getPageReference())},Wu=e=>{if(!e)return!1;const t=Of()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return Ml.isObjectCaseType(n)},Hu=(e,t,n)=>{const r=Ul(e,t),a=Ml.isObjectCaseType(n?.classID)||t.startsWith(j.OBJECT_INFO.OBJECT_INFO);let o,s,i="",c=!1;const l=n=>Jf.getPropertyValue(n,t,e)||"";if(a&&Wu(e))i=l(F.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),c=Ml.isExternalObject(i),n.isObjectWideAction=!0,o=l(F.OBJECT_INFO.ACTIVE_ACTION_ID)||j.VIEW_NAMES.OBJECT_CREATE_VIEW,s=l(j.getProperty(F.CASE_INFO.CASE_INFO_ID))||i;else if(o=l(F.CASE_INFO.ACTIVE_ACTION_ID)||l(F.CASE_INFO.ASSIGNMENTACTION_ID),r)s=l(j.getProperty(F.CASE_INFO.CASE_INFO_ID));else{s=l(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID))||l(j.getProperty(F.CONTEXT_DATA_ASSIGNMENTID))}Fu(s,o,i,e,r,a,c,n)},qu=e=>{const{context:t,pageReference:n}=e,r=(e=>Lu[e]&&Object.keys(Lu[e]).length>0&&kl(e))(t);if(!r)return;const a=Jf.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:o,editType:s}=a||{};if(o){const e=Jf.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,n,t),r=Jf.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:d,viewName:u}=a;s===j.ACTION?Uu(e,r,l,t,i,c,d,o,s):ju(e,u,t,i,{})}else Hu(t,n,{})},zu=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},Yu=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),r=t.url?.includes("/refresh?refreshFor="),a=e.url?.endsWith("/refresh")&&!n,o=t.url?.endsWith("/refresh")&&!r;if(a&&o)return((e,t)=>{const n=e.url===t.url,r=e.interestPage===t.interestPage;return n&&r})(e,t);if(a&&r)return!0;if(n){if(o)return"CANCEL_REFRESH";if(r)return!1}return!1},Ku=e=>{const t=(e=>{const t=[];return ss.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let a=r.join(".");e&&a&&(a=qf.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a}))})),t})(e),n=(e=>{const t=[];return ss.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const a=r.split(".");a.shift();let o=a.join(".");e&&o&&(o=qf.convertPageRefToClipboardPageNotation(o),t.push({name:e,context:o,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const Ju=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:Xu}=j;let Qu={},Zu={},ep={};const tp="You will lose unsaved changes. Do you want to continue?",np="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",rp=(e=Xu.APP,t,n)=>{let r=[],a=[];t||(r=$l(e,!0)),n||(a=(e=>{const t=ss.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Jf.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const o={};((e,t,n)=>{const r=Zu[t]||{};Object.keys(r).forEach((t=>{const a=r[t].associatedProperty;Object.hasOwn(r,t)&&(void 0===a||n.includes(a))&&qf.buildObject(t,e,r[t].value)}))})(o,e,r);const s=Qu[e]||{};return Object.keys(s).forEach((e=>{const n=!t&&r.includes(e)||t;Object.hasOwn(s,e)&&n&&!a.includes(e)&&qf.buildObject(e,o,s[e].value)})),o},ap=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete Qu[t]?.[n],delete Zu[t]?.[n]},op=e=>e&&ep[e],sp=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:a,associatedProperty:o}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[s]?e[s].previousValue=xf(t.reference,null,n):(e[s]={initialValue:r||xf(t.reference,null,n)},e[s].previousValue=e[s].initialValue),e[s].value=t.value,o&&(e[s].associatedProperty=o),a&&e[s].value===e[s].initialValue&&ap(t)},ip=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;ss.isFieldExists(n,r)||(Zu[n]=Zu[n]||{},sp(Zu[n],t)),Qu[n]=Qu[n]||{},sp(Qu[n],t)},cp=({value:e,context:t,reference:n})=>{const r=Kp(t),a=Cp(r,t)||{};if(Ju.isPageInstruction(n)||a?.subscriptFieldName)return;const o=n?.startsWith(".")?n?.substr(1):n;Qu[t]=Qu[t]||{};Qu[t][o]||(Qu[t][o]={initialValue:xf(o,null,t)}),Qu[t][o].value=e},lp=e=>e&&Qu[e]&&Object.keys(Qu[e]).some((t=>Qu[e][t].initialValue!==Qu[e][t].value))||!!op(e),dp=(e,t)=>{if(!e||!t)return!1;const n=Qu[e]&&Qu[e][t];return!!n&&n.previousValue!==n.value},up=e=>{e&&Qu[e]?(Qu[e]={},Zu[e]={}):"all"===e&&(Qu={},Zu={},ep={}),ep[e]&&(ep[e]=!1)},pp=(e,t,n=new Set)=>{if(n.has(t))return;n.add(t);[...ln.getDependencies(e,t),...bf.getResetDependencies(e,t)].forEach((t=>{const r=qf.getPropertyNameFromDependency(t);if("object"==typeof t&&"multiRecord"===t.mode){const t=r.split("."),n=`.${t.pop()}`,a=t.join(".");if(Cl.isStateMachineExist(e,a,n)){Cl.getStateMachine(e,a,n).deleteAll()}}else Ju.isPageInstruction(r)&&Cl.executeStateMachine(e,r,""),vf({type:Q,payload:{reference:r,value:"",context:e,isArrayDeepMerge:!0,isImplicit:!0}});pp(e,r,n)}))},hp={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(on(r),(e=>{const{context:t,pageReference:n,value:r,reference:a}=e;bf.triggerCascade(t,a,r);const o=ln.getDependencies(t,a),s={context:t,datapages:{}};pp(t,a),o.forEach((r=>{let a=n;r.startsWith(n)||(a="");const o=r.replace(`${a}`,"").split(".").filter((e=>!!e));o.pop();const i=o.join("."),c=xf(`.${i}`,a,t)?.classID||e.classID,l=Qh(r.split(".").pop(),c),{datasource:d}=l,u={},p=[];d.parameters.forEach((e=>{e?.value?(u[e.name]=td.isProperty(e.value)?xf(`.${qf.getFullPropertyReference([i,qf.getPropertyName(e.value)])}`,a,t):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(j.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(j.NULL_STRING))}));const h=d.name.concat(j.UNDERSCORE_STRING,qf.getHashedString(p.join(j.HASH_DELIMITER))),{name:f}=d,g=lf(f);s.datapages[h]={mode:d.mode,propertyName:r,name:d.name,dataViewParameters:u,refreshStrategy:g?.refreshStrategy}})),o.length&&vf({type:nt,payload:s})})(r),setTimeout((()=>{(dp(r.context,r.reference)||Ti(r.context))&&qu(r),Kd.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)}),0)),n===ot&&!r?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:a,instruction:o,skipDirtyValidation:s=!1}=r;0===a&&"INSERT"===o&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const r of n){const n=xu({meta:r}).getPConnect();if(n.isWhenExist()||Bu(n,t))return!0;if(r.children&&e(t,r.children))return!0}return!1}(n.contextClass,n.children??[])),t&&ku(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),qu({context:e,pageReference:t}),s||(ep[`${e}`]=!0)}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:o=!1}=r;ss.updateFieldNodeValue(a,e,r.value),Ju.isPageInstruction(e)||o?o||(ep[`${a}`]=!0):ip(t),(r.removePropertyFromChangedList||n)&&ap(r)}if(n===Oe||n===ve){const{transientItemID:e,data:t}=r;qf.iterateLeafNodes(t,(t=>{ap({context:e,value:"",reference:t.join(".")})}))}if(n&&[$e,Se,we,Pe].includes(n)){up(r.context),bf.purgeResetDependencies(r.context),(a=r.context)&&Lu[a]&&delete Lu[a];(r.childContainersContexts||[]).forEach((e=>{up(e)}));(r.transientItems||[]).forEach((e=>{up(e)}))}var a;e(t)},getChanges:rp,recordChange:ip,isDirty:()=>Object.keys(Qu).some((e=>lp(e))),isPropertyDirty:dp,isContextDirty:lp,resetChangedProperties:up,deleteRecordedChange:ap,isComplexObjectMerged:op};const fp=new class{getCoreheaders(e){const t=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=Rp(t),r=wp(n),a=Jf.getProperty(j.COREHEADERS,"",r);if(a&&e in a)return a[e]}},gp={defaultLimit:16},mp={SINGLE:"single",MULTIPLE:"multiple"},yp={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Ip=()=>Of()?.getState()?.containers;function Ep(e){return"string"==typeof e&&""!==e.trim()}const Ap=e=>Ep(e)?Of()?.getState().containers[e]:null,Cp=(e,t)=>{if(!Ep(e)||!Ep(t))return null;const n=Ip(),r=n?.[e];return r&&r.items&&r.items[t]||null},_p=e=>Ep(e)?Of()?.getState().containers[e]?.items:null,Sp=e=>Ep(e)&&Of()?.getState().containers[e]?.accessedOrder||[],bp=e=>Ep(e)&&Sp(e)?.length>0||!1,Np=(e,t,n)=>{if(!Ep(e)||!Ep(t))return!1;const r=Ip(),a=r?.[e],o=a&&a.items||null,s=n||((e,t)=>e===t);if(t&&o)for(const e of Object.keys(o))if(s(t,o[e].key))return!0;return!1},Tp=(e,t,n)=>{if(!Ep(e)||!Ep(t))return null;const r=Ip(),a=r?.[e],o=a&&a.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&o)for(const e of Object.keys(o))if(s(t,o[e].key))return e;return null},Pp=(e,t)=>{if(e&&t)for(const a of Object.keys(t))if(n=e,r=t[a].key,n?.toLowerCase()===r?.toLowerCase())return t[a];var n,r;return null},Op=e=>{if(!Ep(e))return null;const t=Ip()??{};for(const n of Object.keys(t))if(t[n]){const r=t[n].items??null,a=Pp(e,r);if(a)return a}return null},vp=(e,t)=>{if(!Ep(e)||!Ep(t))return!1;const n=Ip();return n&&Object.hasOwn(n,`${e}/${t}`)},Dp=(e,t)=>{if(!Ep(e)||!Ep(t))return null;const n=Ip(),r=n?.[`${e}/${t}`];return r&&r.type},Rp=e=>{if(!Ep(e))return null;let t=null;const n=Ip();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},$p=(e,t,n)=>{if(!Ep(e)||!Ep(t))return!1;const r=Tp(e,t,n);return!!r&&r===Rp(e)},xp=(e,t)=>{let n=null;const r=Ip();if(!r)return null;for(const a of Object.keys(r))if(r[a].items){const o=r[a].items[e];if(n=o?o[t]:null,n)break}return n},wp=e=>Ep(e)?xp(e,"context"):null,Mp=e=>{if(!Ep(e))return null;let t=null;const n=Ip();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,o=a&&a.length>0?a[a.length-1]:null;t=wp(o)}return t},Lp=e=>{if(!Ep(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=Ip();if(!a)return[];const o=n=>{const a=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&a.push(n),n===e&&(r=!0)})),a};for(const e of Object.keys(a))if(a[e].items){const t=o(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Fp=e=>{if(!Ep(e))return[];const t=[],n=Ip();if(!n)return[];for(const r of Object.keys(n))r.startsWith(e)&&r!==e&&t.push(r);return t},jp=e=>{if(!Ep(e))return[];const t=[],n=Ip();if(!n)return[];for(const r of Object.keys(n))if(r.startsWith(e)&&r!==e){(Sp(r)||[]).forEach((n=>{wp(n)!==e&&t.push(wp(n))}))}return t},Up=e=>{const t=[...jp(e),e],n=[],r=Of()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},kp=e=>Ep(e)?e&&Ap(e)&&Ap(e).type===mp.SINGLE:null,Vp=e=>Ep(e)?e&&Ap(e)&&Ap(e).type===mp.MULTIPLE:null,Bp=e=>Ep(e)&&Ap(e)&&Ap(e).items&&Object.keys(Ap(e)?.items).length>0||!1,Gp=e=>e&&gp[e]?gp[e]:gp.defaultLimit,Wp=(e,t=gp.defaultLimit)=>{Ep(e)&&(gp[e]=t)},Hp=e=>{if(!Ep(e))return!1;let t=!1;const n=Ap(e),{items:r={}}=n,a=Object.keys(r),o=Gp(e);return a&&a.length>0&&a.length>=o&&(t=!0),t},qp=e=>{if(!e||!Ep(e.name)||!Ep(e.context))return null;const t=e?.name,n=Ap(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=Fp(`${j.APP.APP}/${j.PREVIEW}`),o=jp(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...o],childContainers:a}},zp=e=>{if(!Ep(e))return!1;const t=wp(e);return lp(t)||il(e)},Yp=e=>{if(!Ep(e))return null;let t;const n=Ap(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!zp(n)){t=n;break}}return t},Kp=e=>{if(!Ep(e))return null;const{containers:t}=Of()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.slice(0,n)},Jp=(e,t={})=>{if(!Ep(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Kp(e),r=wp(e),{skipDirtyCheck:a}=t;let o=!0,s=[];if(zp(e)&&!a&&(o=window.confirm(Fh().getLocaleValue(tp,"Messages"))),o){const{accessedOrder:t=[],items:a={},type:o}=Ap(n);s=t.filter((t=>t!==e));const i=s[s.length-1],c=a[i]||{},{semanticURL:l=j.FORWARD_SLASH_STRING,context:d}=c;s.length>0&&l&&l!==j.FORWARD_SLASH_STRING?tm({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:d}}):tm({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});vf(_g({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:s,containerType:o}}))}return Promise.resolve({newAccessedOrder:s,removeItem:o})},Xp=(e,t,n,r)=>{const a="root",o=H(t,a,!0),s=Ot(t,a),i={data:n,context:r?"app":o},c=[dg({root:e,containerItemID:o,context:r?"app":o,target:s,containerName:t})];c.push(ng(i)),vf(c)},Qp=(e,t,n)=>{let r=Sp(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1){if(wp(r[e])===n){a=!0;break}}return a},Zp=e=>{if(!Ep(e))return!1;const t=Ip(),n=wp(e),r=t?Object.keys(t):[];let a=!1;for(let t=0;t<r.length&&(a=Qp(r[t],e,n),!a);t+=1);return a},eh=e=>{Array.isArray(e)||(e=[e]);const t=Ip()||{};return e.map((e=>{const n=Kp(e);return qf.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},th=e=>{const{transientItemID:t,data:n,options:r}=e,a=qf.deepClone(Of()?.getState().data[t]);r?.reset&&qf.iterateLeafNodes(a,(e=>{"classID"!==e[e.length-1]&&qf.setIn(a,e,"")})),vf(pg({transientItemID:t,data:qf.mergeDeep(n,a)}))},nh=e=>{const{transientItemID:t,data:n}=e;vf(fg({transientItemID:t,data:n}))},rh=e=>{const t=qf.deepClone(Of()?.getState().data[e]);qf.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&qf.setIn(t,e,"")})),vf(hg({transientItemID:e,data:t}))},ah=e=>{const t=qf.deepClone(Of()?.getState().data[e]);qf.iterateLeafNodes(t,(e=>qf.setIn(t,e,""))),vf(gg({transientItemID:e,data:t}))};class oh{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const sh=()=>oh,ih=e=>{const t={containerName:e};t.childContainers=Fp(e),vf({type:Le,payload:t})},ch=(e,t)=>{const n=Lp(e),{key:r}=Cp(Kp(e),e),a=[];n.forEach((e=>{const{key:n}=Cp(Kp(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Kp(e),context:e};a.push({type:ge,payload:n})}})),a.length&&vf(a)},lh=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Kp(e),context:e};n.push({type:ge,payload:r}),n.length&&vf(n)},dh=()=>$h.isPortalLoaded?"app":"root",uh=()=>fp,ph=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Kp(e),context:e};vf({type:ge,payload:n})},hh=(e,t)=>{const n=Tp(e,t),r=Tp(`${n}/workarea`,t);return wp(r)},fh=e=>Ep(e)?xp(e,"parentContext"):null,gh=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},mh=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},yh=()=>rd,Ih=/{(.*?)}/i,Eh=/{(.*?)}/g,Ah=e=>null!==e.match(Ih),Ch=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),_h=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},Sh=()=>Ch(window.location.pathname),bh=()=>Ch(window.location.pathname+window.location.search),Nh=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}},Th=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),a=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&"activeTab"!==e&&a.set(e,t);const o=new URLSearchParams(a).toString();return o?`${t}?${o}`:t}return e},Ph=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),r=n.indexOf("assignments"),a=n.slice(r-2).join("/"),o=n[n.length-1],s=zg(Ge,{assignmentID:o});return{routeEndpoint:s?.restApi,requestType:s?.reqType,payload:{assignmentID:o},options:t,routeKey:Qe,urlPath:a}})(e,t):Dh.getEndPointInfo(e),Oh=()=>{const e=$h.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const vh=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{Ah(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>Ch(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Ch(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return(e=e.replace(n,"")).startsWith("/")&&Oh()&&"PREVIEW"!==$h.getRenderingMode()&&this.setDefaultClassName(""),Ch(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails(e,t){if(!t)return this.appRoutes[e];let n="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.values(this.appRoutes).forEach((t=>{t.payload?.page===e?(n=t.routeKey,r={...t.payload}):this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload})})),{routeKey:n,payload:r}}transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!V.isRemoteCase(t))return e;const{RemoteClassGroup:r,RemoteSystemID:a}=V.getRemoteCase(t);return{...e,caseID:n?.replace(t,r?.toUpperCase()),RemoteSystemID:a}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=Oh();let n=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);r||(n=this.processUrl(this.defaultViewUrlPath,!t),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:a,payload:o}=this.getRouteDetails(r,t);if(!this.appRoutesMeta?.[a]?.restApi)return null;const{reqType:s,endPoint:i,params:c}=this.appRoutesMeta[a].restApi,l={routeKey:a,requestType:s,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(o)}};return this._resolveRoute(l,this.processUrl(e,!1),r)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;if(Ah(r)){const e=r.match(Eh);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}))}const o=em(a),s=new URL(o);return this.isDefaultPortal()||this.getPortalName()&&!s.searchParams.toString().includes("portal=")&&s.searchParams.append("portal",this.getPortalName()),s.toString()}buildDocumentTitle(e,t,n){const r=n??"";return e&&t?`${e} (${t}) - ${r}`:r}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:a,name:o}=e;if(a&&!r)return;const s=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(vc(t))),i=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,c={semanticURL:s,directUrlUpdation:!0,options:{acName:i,context:Mp(i)}},l=Sh();s&&!l.includes(s)&&Zg(c);const d=t.substring(t.lastIndexOf(" ")+1),u=$h.environmentInfoObject?.pxApplication?.pyLabel,p=this.buildDocumentTitle(o,d,u);cm(p)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},a=r?.split("/").length,o=r?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const s=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return o?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===s.length)return this._getQueryParamsResolvedURL(s[0],n);if(0===Object.keys(t).length)return"";const i=s.find((e=>{const r=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const o=r.dataViewKeys||r.dataContextParameters||{},s=Object.keys(t).every((e=>t[e]===r[e]));return!!s&&(qf.isEmpty(o)||qf.isEmpty(a)?s:Object.keys(a).every((e=>Object.hasOwn(o,e))))}));return i?this._getQueryParamsResolvedURL(i,n):s.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,a]=e.includes("?")?e.split("?"):[e];if(a){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const o=new URLSearchParams(a),s={};for(const[r,a]of o.entries())if("string"==typeof a&&Ah(a)){const o=this._getDynamicKeyName(a);s[r]=n?t[o]||e[o.toLowerCase()]:t[o]}else"string"==typeof a&&(s[r]=a);return`${r}?${new URLSearchParams(s).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:a}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const o=a.match(Eh);if(o)for(let e=0;e<o.length;e+=1){const n=o[e].replace("{","").replace("}",""),r=new RegExp(o[e],"g");a=a.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:a,reqType:n,body:e}}return{restApi:a,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[a,o]=t.includes("?")?t.split("?"):[t],[s,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),l=s.split("/"),d={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],Ah(l[e])){d[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(o),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e of Object.keys(u))Ah(u[e])?d[e]=p[e]||h[e.toLowerCase()]:d[e]=u[e];let f;o&&(f=this._getQueryParamsResolvedURL(n,p,!0));const g=this._resolvePayload(e,d,n);return{...this._resolveRouteEndPoint(g,n),urlPath:f||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!Ah(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(Eh);for(let a=0;a<t.length;a+=1){const o=t[a],s=this._getDynamicKeyName(o);if(void 0!==e.payload[s]){const t=e.payload[s];n=n.replace(o,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in routeEndpoint- ${s} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r of Object.keys(e)){let a=e[r];if("string"==typeof a&&Ah(a)){const e=a.match(Eh);for(let n=0;n<e.length;n+=1){const r=e[n],o=this._getDynamicKeyName(r);if(void 0!==t[o]){const e=t[o];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in payload- {${o}} is missing in semantic url construct`)}n[r]=a}else"object"==typeof a&&(n[r]=this._resolvePayloadRecursive(a,t))}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let r=this._findMatchedRouteInStaticList(n,t);return void 0!==r?r:(r=this._findMatchedRouteInDynamicList(e),void 0!==r?r:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),r=t?.toLowerCase();if(Oh()){const e=this._findMatchingRouteByClass(n,r);if(!e)return;const t=Object.values(e)[0],a=t?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,r])=>{if(!r)return!1;const a=r.payload?.page?.toLowerCase(),o=r.payload?.pageClass?.toLowerCase(),s=a===e||n.toLowerCase()===e;return t?s&&o===t:s}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],o=t.split("/");if(o.length!==r.length)return!1;let s=0;for(s=0;s<o.length;s+=1){const e=o[s].toLowerCase();if(!Ah(e)&&e!==r[s]&&_h(e)!==r[s])return!1}if(a){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(a.toLowerCase()),r=new Set,o=new Set,s=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())o.add(e);if(o.size!==r.size)return!1;for(const n of r){if(!o.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!s.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{Nh(e,t,"warning"),Nh("Error in Generated Routing Table",null,"error"),Nh("Back | Forward for this page may NOT work as intended",null,"warning"),Nh("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},Dh=vh;const Rh=new class{constructor(){this.languagePacks=[]}getLocalizationBundles(e=$h.getLocale()){return(this.languagePacks.find((t=>t.pyLangCode===e))?.pyBundles??this.languagePacks.find((e=>e.pyLangCode===j.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}async loadLocaleBundle(e){const t=[];e.forEach((e=>{t.push(Ld.getPageDataAsync("D_pzBundlesForLocalization","",{locale:e,onlyApp:"false"},{invalidateCache:!0}))}));const n=(await Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value.pyLanguagePacks));this.setLanguagePack(n)}setLanguagePack(e){e.forEach((e=>{const t=this.languagePacks.findIndex((t=>t.pyLangCode===e.pyLangCode));-1!==t?this.languagePacks[t]=e:this.languagePacks.push(e)}))}};const $h=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||qf.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1},Rh.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return Dh.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===j.PORTAL_TYPE.WSS}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(j.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Ss.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return Rh.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}},xh=e=>"fulfilled"===e.status,wh=async(e=$h.getLocale())=>{try{await(async e=>{const t=$h.getAvailableLocalePacks(),n=$h.getLocalizationBundles(e);let r;if(e&&t&&t.includes(e)?r=[Wi("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(r=n.map((e=>Wi("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!r||0===r.length)return;const a=200,o=201;(await Promise.allSettled(r)).filter(xh).forEach((({value:t})=>{if([a,o].includes(t.status)&&t.data){const n=t.data,r=Zh(e??"en-US");Object.keys(n).forEach((e=>{r.setLocaleForRule(n[e],e)}))}}))})(e)}catch(e){console.warn(e)}};const Mh=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const a=e.indexOf("}",t),o=e.substring(r,a+1),[s,i]=this.getKeyAndValue(o);this.addKeyToMap(s,i),n+=`${o.split(":")[0]}}`,t=a+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const a=e.indexOf("}",t),o=e.substring(r,a+1);n+=this.keyMap[o],t=a+1}return n}};class Lh{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent,r=t.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${r}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===r?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,r)};updateLocaleStore=(e,t)=>{const n=e.fields||e,r=this.localeStore[t];r?qf.mergeDeep(n,r):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){const a=this.#c(n,t),o=this.#l(e);o&&(e=Mh.formatLocaleKey(e));const s=a?this.localeStore[a.toUpperCase()]??{}:{},i=r?this.localeStore[r.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(s,e)||e:o?Mh.replaceWithValue(s[e]||i[e]||e):s[e]||i[e]||e}#c(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${j.PARAGRAPH}!${t}`,r=this.localeStore[n.toUpperCase()];return r?{category:r.category,content:decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}:null}getPortalLocaleReference(e){return 2!==$h.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${$h.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=$h.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:Zi.getSvcLocale(t,`${e}.json`)}))),a=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(a.map((async(e,t)=>{if("fulfilled"===e.status){const a=r[t];let o;try{o=await e.value.json()}catch{o=null}o&&n.push({localeRuleKey:a.localeRuleKey,jsonData:o})}})))}return n}async loadLocaleResources(e){await Rh.loadLocaleBundle(e),e.forEach((async e=>{await wh(e)}))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const r=[];for(let t=0;t<e.length;){const a=e[t];if(0!==a.length){const e=n.indexOf(a);if(-1===e)return null;if(t>0){const t=n.slice(0,e);r.push(t)}n=n.slice(e+a.length)}t+=1}return n&&r.push(n),r}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const r of Object.keys(e)){const a=r.split(/\{\d+\}/),o=this.matchPatternWithText(a,t);if(o){const t=e[r];if(n=this.replacePlaceHolders(o,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=$h.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Zi.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#l(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const Fh=e=>{const t=e??$h.getLocale()??"en-US";return Zh(t)};un.registerHandler("@L",((e,t)=>t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e))),un.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Jf.getLitePropertyValue(n))),un.registerHandler("@E",((e,t,n)=>{try{const r=Xt(e),a=Qt(r);return Zt(a,t,n)}catch(e){}return!0})),un.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:a}=n??{};r=wf(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,a)}return!0===r||"true"===r})),un.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",o="";const s=t.getPageReference();if(e.startsWith(".")){a=`${s}.${e.substring(1)}`;const r=e.split(".").filter((e=>!!e));r.length>1&&(r.pop(),o=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===j.READONLY,l=n?.datasource?.name||"",d=t.getComponentConfig();if(d&&d.deferDatasource&&(d.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:d.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=pn.getPropertyName(e?.propertyForDisplayText??""),r=pn.getPropertyName(e?.propertyForValue??""),a=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return a?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const u=pn.getPropertyName(n?.datasource?.propertyForDisplayText),p=pn.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],f=t.getContextName(),g=[];if(h.forEach((e=>{if(pn.isProperty(e?.value)){let t=xf(`.${qf.getFullPropertyReference([o,pn.getPropertyName(e.value)])}`,s,f);g.push(qf.getFullPropertyReference([s,o,pn.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),f){const e=ln.getContextObjectByName(f)||{};g.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),ln.addContextName(f,e)}const m=function(e,t,n,r){let a="",o=n;if(t.join(j.HASH_DELIMITER)&&(a=qf.getHashedString(t.join(j.HASH_DELIMITER)),o=n+j.UNDERSCORE_STRING+a),r){const e=Rf(),t=e?e[n]?.[o]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const s=e.getDataObject(),i=(s?.[n]||{})[o]||{};return Array.isArray(i?.pxResults)?i.pxResults:[]}(t,r,l,c),y=t.getLocalizationService();return m.map((e=>{let t=e[u]||e[`.${u}`];var n;return"string"==typeof t&&(n=t,t=y.getLocalizedDataPage(n,l,u)),{key:e[p]||e[`.${p}`],value:t}}))})),un.registerHandler("@ROUTING_INFO",((e,t)=>vt(t.getContainerName(),t.getContextName()))),un.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return $h.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return $h.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return $h.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return $h.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService("APP!APPLICATION").getLocalizedText($h.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return $h.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return $h.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return $h.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return $h.getOperatorWorkGroup();default:return e}})),un.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t,filterDownloadedFields:o}=r[a],s=[];return n.forEach((n=>{const r={};t||o?Object.keys(n).forEach((e=>{const t=pn.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=pn.getPropertyName(e[t]);r[t]=n[a]})),s.push(r)})),s}return[]})),un.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let a="";const o=e.split(".").filter((e=>!!e));if(o.length>1&&(o.pop(),a=`.${o.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:o,value:s}=n;r.name=o,"string"==typeof s&&s.startsWith("@P")?r.value=`@P ${a}${s.substring(3)}`:r.value=s,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),un.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Jf.getLitePropertyValue(n,e),a=t?.getReferencedUser(r)||Jf.getReferencedUser(r,n);return{userId:r,userName:a?a.UserName:null}})),un.registerHandler("@ACTIVE_CASES",((e,t)=>cu.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),un.registerHandler("@LR",(e=>e)),un.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),un.registerHandler("@SHARED",(e=>qc.getSharedState(e))),un.registerHandler("@PARAGRAPH",((e,t)=>du.processParagraph(e,t))),un.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),a=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:o}=t;let s;return qf.isEmpty(o)?s=t.getValue(`.${n}`):(s=o,s=qf.getIn(s,n)),s&&r.length>0?(a&&(s=s.filter((e=>en(a,e)))),s.map((e=>qf.getIn(e,r)))):null})),un.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),un.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),un.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Jf.getLitePropertyValue(n),Li.prepareAttachmentData(r)})),un.registerHandler("@FL",((e,t)=>t.getLocalizedValueForFieldLabel(e))),un.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),un.registerHandler("@GENAICOACH",((e,t)=>gf(e,t.getCurrentClassID()))),un.registerHandler("@AIAGENT",((e,t)=>{const n=mf(e,t.getCurrentClassID());if(n)return n;const r=t.getComponentConfig();if(r){const n=r?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const r={label:n.label};t.resolveConfigProps({label:n.label},r);const a=r.label;return{insName:`${n.ruleNamespace}__${e}`,label:t.getLocalizedValue(a),type:"agent"}}}return null})),un.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),a=t.getPageReference();Kd.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",a,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${a.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${a}${e}`,`${r}/${a}`,r)})),un.registerHandler("@DW",((e,t,n)=>{let r;const a=`${j.CONTEXT_DATA}.${j.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(t)r=t.getValue(a);else{const{context:e}=n??{};r=xf(a,null,e)}return!0===r||"true"===r}));const jh={},Uh={},kh={},Vh={},Bh={},Gh={},Wh={},Hh={},qh={},zh={},Yh={},Kh={},Jh={},Xh=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];a?((e,t,n,r)=>{const a=Array.isArray(n)?n:[n];(Array.isArray(r)?r:[r]).forEach((e=>{const t=a.findIndex((t=>t.classID===e.classID));if(-1===t)a.push(e);else{const n={isDeclarativeTarget:!1},r={...a[t],...n,...e};a[t]=r}})),t[e]=1===a.length?a[0]:a})(n,t,a,r):t[n]=r})):qf.copy(e,t)},Qh=(e,t="")=>{if(!e)return null;const n=Vh[e];if(!n)return null;if(!t)return qf.deepClone(n);let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r?qf.deepClone(r):null},Zh=e=>(Kh[e]||(Kh[e]=new Lh),Kh[e]),ef=(e,t)=>(Jh[e]||(Jh[e]=t()),Jh[e]),tf=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const o=Qh(e,t);return r.length&&(a=r.join(".")),{...o,embeddedType:n,category:a}}const[a,...o]=e.split("."),s=Qh(a,t);return s&&r.push(s.label),tf(o.join("."),s?.pageClass,s?.type,r)},nf=e=>{Xh(e,Uh)},rf=e=>{Xh(e,kh)},af=e=>{(e=>{e.views&&Xh(e.views,Uh),e.navigations&&Xh(e.navigations,kh),e.personalizations&&Xh(e.personalizations,Gh),e.insights&&Xh(e.insights,Wh),e.paragraphs&&Xh(e.paragraphs,jh),e.dataTypes&&Xh(e.dataTypes,Hh),e.datapages&&Xh(e.datapages,qh),e.genAICoaches&&Xh(e.genAICoaches,zh),e.AIAgents&&Xh(e.AIAgents,Yh)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const r=t[n];if(Array.isArray(r)){if(r.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const r=yu(gu,n,t.definedOnClassID??t.classID);t.localeReference=r})),1===r.length){const[e]=r;t[n]=e}}else e.datapages&&r?.datasource&&"DataPage"===r.datasource.tableType&&(r.datasource.mode=e.datapages[r.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{Bh[e]=t[e]})),Xh(e.fields,Vh)},of=e=>Uh[e],sf=(e,t)=>{const n=Uh[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},cf=e=>kh[e],lf=e=>e in Bh?Bh[e]:null,df=e=>e in Gh?Gh[e]:null,uf=e=>e in Wh?Wh[e]:null,pf=e=>{const t={};return Object.keys(Vh).forEach((n=>{const r=Vh[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=qf.deepClone(a))})),t},hf=(e,t)=>{const n=Qh(e,t),r=n?.datasource?.parameters;return r?qf.deepClone(r):null},ff=(e,t)=>{let n=null;const r=jh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?qf.deepClone(n):null},gf=(e,t)=>{let n=null;const r=zh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?qf.deepClone(n):null},mf=(e,t)=>{let n=null;const r=Yh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?qf.deepClone(n):null},yf=e=>{if(e in Hh){const{savableDataPage:t}=Hh[e];return t}return null},If=e=>{const t=qh[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:a}=t;if(r)return a.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const o=Hh[n];return o?o.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},Ef=e=>{if(e in Hh){const{lookupDataPage:t}=Hh[e];return t}return null},Af=e=>{if(Object.hasOwn(Hh,e)){const{lookupDataPageInfo:t}=Hh[e];return t}return null},Cf=(e,t)=>{const n=e.split("."),r=n.pop(),a=new $u({options:{pageReference:`${n.join(".")}`,context:t}}),o=Qh(r,a.getCurrentClassID())?.additionalInformation;if(!o?.includes("@PARAGRAPH"))return o;const s=pn.trimAnnotation(o);return du.processParagraph(s,a)},_f=(e,t)=>{const n=e.split("."),r=n.pop(),a=new $u({options:{pageReference:`${n.join(".")}`,context:t}}),o=Qh(r,a.getCurrentClassID()),s={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(o,s),s};class Sf{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,o="singleRecord"){if(!e||!n||!r?.length)return;const s=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,a);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=qf.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===s))||e.push({propertyName:s,mode:o})}else i[t]=[{propertyName:s,mode:o}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,s=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=qf.getFullPropertyReference([i,t]),t in s){const e=s[t];qf.removeExistingDependentProperty(e,o)}}})),Object.keys(s).length>0&&(this.cascadeResetSubscribers[e]=s)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,r,a){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const o=this.cascadeSubscribers[e][`${t}${n}`];if(!o[a]){o[a]=r;const s=xf(n,t,e);o.previousValue="object"==typeof s?null:s}}))}registerListField(e,t,n,r,a){const o=Sf._getFieldsForList(e,t,n);o.length>0&&(this.registerFields(e,t,o,r,a),Sd.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Sf._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=Qh(n,xf("classID",t,e));return a&&!Array.isArray(a)&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(pn.isProperty(e)){const t=pn.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const a=this.cascadeSubscribers[e][`${t}${n}`];a[r]&&delete a[r]}))}triggerCascade(e,t,n,r){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((o=>{const s=this.cascadeSubscribers[e][t];"previousValue"!==o&&s.previousValue!==n&&(a=!0,r?r.add(s[o]):s[o](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=xf(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=xf(t,"",e);n(e,t,r)}))}))}_updateChangedProperties(e,t,n,r,a,o,s,i){const c=n&&i.some((e=>r.startsWith(e)));if(e!==t||c){const e=r.lastIndexOf("."),t=r.substring(0,e),i=r.substring(e),c=Es.getMessages({type:"error",property:i,context:a,pageReference:t});if(c?.length>0&&s.push(r),!n)return;o.push(r)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&qf.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,r,a,o,s){if("object"!=typeof e){a.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=xf(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,r,o,s)}const i=Object.keys(e??{});for(let c=0,l=i.length;c<l;c+=1){const l=i[c],d=`${n}.${l}`;if(Array.isArray(e[l])){const n=xf(d,"",t);n&&n?.length===e[l].length||s.push(d.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[l],t,d,r,a,o,s)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],a=[],o=[],s=qf.getIn(e,n);return s&&t?(this._getServerProperties(s,t,n,r,o,a,[]),{changedListProperty:r,leafProperty:o,changedPropertyWithError:a}):{changedListProperty:r,leafProperty:o,changedPropertyWithError:a}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const bf=new Sf;let Nf=null;const Tf=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),Pf=e=>{Nf=e},Of=()=>Nf,vf=e=>{if(!e)return;let t=[],n=[],r=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:r}=bf.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),Nf?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(r.length&&!e.payload.skipValidation){r.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{Es.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const r=ss.getFieldReferenceForProperty(e.payload.context,`${n}${t}`);if(r){const e=Jf.resolveContextTreeNodeProps(r.props);ji.validate(e.componentName?.toLowerCase(),e.propertyName,Jf.getLitePropertyValue(e,e.propertyName),e)}}))}bf.handleServerChanges(e.payload.context,t,n)}},Df=e=>Of()?.getState().data?.[e],Rf=()=>Of()?.getState().data?.[j.SHARED],$f=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const a=e?.startsWith(".")?t+e:e,o=Tf(a);return qf.getIn(n,o)},xf=(e,t,n)=>$f(e,t,Df(n)),wf=(e,t,n)=>$f(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,Df(n)),Mf=(e,t,n)=>((e,t,n)=>{const r=Tf(`${t}.${n}`);return qf.getIn(e,r)})(Df(n),`${j.CONTEXT_DATA}.${e}`,t),Lf=e=>{const{context:t}=e,n=Of()?.getState().data[t];if(n)return ue;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?_e:ue},Ff=(e,t)=>{const n=Tf(t);return qf.deleteIn(e,n)},jf=e=>!Array.isArray(e)&&"object"==typeof e,Uf=(e,t=[],n=[])=>{Array.isArray(t)&&t.length>0&&t.forEach((t=>{t.allowMultiple?t.allowMultiple&&!n.includes(t.path)&&qf.setIn(e,t.path,[]):qf.setIn(e,t.path,{})})),n.length>0&&qf.rearrangeProperties(n,e)},kf=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:a=[],propertiesToReArrange:o=[]}=n;Array.isArray(e)&&!t&&(t=[]),Uf(e,a,o);const s=(e,t)=>{if(jf(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return x()(e,t,s);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return x()(e,t,s);{const n=t.length;if(void 0===r&&n===e.length)return x()(e,t,s)}}return""===t&&e&&"object"==typeof e?e:t};return s(e,t)},Vf=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:a}=r,o=Tf(t);if("object"==typeof n){const t=kf(qf.getIn(e,o),n,{isArrayDeepMerge:a});return qf.setIn(e,o,t)}return qf.setIn(e,o,n)},Bf=(e,t,n)=>{const r=Tf(t);return qf.setIn(e,r,n)},Gf=()=>{const e=tt,{promise:t,actionMgrID:n}=oc.actionManagerPromise(e);return vf({type:e,payload:{actionMgrID:n}}),t},Wf=e=>{const t=Of()?.getState();return!!t?.data?.[e]};class Hf{static mergeDeep(e,t){return x()(t,e)}static hasIn(e,t){return P()(e,t)}static getIn(e,t,n){return v()(e,t,n)}static setIn(e,t,n){return R()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return M()(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let t=0;t<e.length;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r of Object.keys(e)){const a=e[r];a&&"object"==typeof a&&!Array.isArray(a)?n=Hf.isWhenExist(a):t.includes(r)&&"string"==typeof a&&a?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;if(e&&Object.keys(e).forEach((a=>{const o=e[a];t.includes(a)&&"string"==typeof o&&o.startsWith("@W ")&&(n=pn.trimAnnotation(o),r.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=pn.trimAnnotation(t[e]),r.add(n))}))}return[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r of Object.keys(e))t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let a=0;for(;a<r.length-1;a+=1){const e=r[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[a]]||(t[r[a]]=Array.isArray(n)?[]:{}),kf(t[r[a]],n,{isArrayDeepMerge:!0})):t[r[a]]=n};static getHashedString(e){return(0,S.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Hf.isEqual(e[n[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):""}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,o])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(o)?o.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof o?n(o,r):t(r.slice(),o),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,o)=>(a=e[t]?e[t]:Number.isNaN(Number(r[o+1]))?r.length-1===o?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Hf.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;Hf.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(j.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(j.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return ei.formatPageReference(n)}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&oc.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];"string"==typeof r?n="true"===r||"false"!==r&&r:"object"==typeof r?(n=r,Hf.convertObjectWithStringToBoolean(r)):n=r,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=Hf.getIn(t,e);if(!n)return;const r=Object.hasOwn(n,"pyCount");if(r&&(n=n.pxResults),!n)return;const a=n.filter((e=>!e.error)),o=n.filter((e=>e.error));Hf.setIn(t,r?`${e}.pxResults`:e,[...a,...o])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],r=n.findIndex((e=>e.startsWith("workarea"))),a=n.findIndex((e=>e.startsWith("modal")));return-1!==r?t=n.slice(0,r+1).join("/"):-1!==a&&(t=n.slice(0,a+1).join("/")),Of()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return Hf.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const r=[];let a="";const o=n.getPageReference(),s=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let a=pn.isProperty(n)?xf(`.${pn.getPropertyName(n)}`,o,s):n;null!=a&&""!==a||(a=j.NULL_STRING),r.push(a)}));let i=t;const c=r.join(j.HASH_DELIMITER);return c&&(a=Hf.getHashedString(c),i=t+j.UNDERSCORE_STRING+a),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t)return null;const[,n,r,a,o,s,i,c]=t.map(Number);return new Date(n,r-1,a,o,s,i,c).getTime()}static containsEncodedPattern=e=>/%[0-9A-Fa-f]{2}/.test(e);static normalizePropertyRef(e){const t="caseInfo.content.";let n=e.startsWith(t)?e.substring(17):e;return n=n.replace(/\[\d+\]/g,""),n.startsWith(".")?n.substring(1):n}static resolvePageClass(e,t){if(!t)return;const n=(e=this.normalizePropertyRef(e)).split(".").slice(0,-1);let r=t;for(const e of n){const t=Qh(e,r);if(!t)return;if(Array.isArray(t)&&t[0]?.pageClass?r=t[0].pageClass:!Array.isArray(t)&&t.pageClass&&(r=t.pageClass),!r)return}return r}}const qf=Hf,zf=j.SUMMARY_OF_LISTS,Yf=j.SUMMARY_OF_WHEN_CONDITIONS;class Kf{static updateData(e){Object.keys(e).forEach((t=>{vf(ng({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{vf(ng({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Yf}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return cf("string"==typeof n?n:"")}static resolveView(e,t,n=""){const r=of(this.resolveName(e,t));let a=[];if(Array.isArray(r)&&r.length>0){if(t&&r.length>1){if(n||(n=t.getValue(j.CLASS_ID)||""),!n)return;a=r.filter((e=>e[j.CLASSID]===n))}return 0===a.length?r[0]:a[0]}return r}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=pn.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=pn.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let r;if(t)r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName(),e.getValue(j.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){const e=["refer","copy"].includes(t.dataRetrievalType),n="Page List"===t.type;r=e&&n?t.pageClass:t.classID}r||(r=n.ruleClass)}return r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,a=n?.type,{ref:o,name:s,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===a?r=this.resolveNavigation(o||s,t):"view"===a?r=this.resolveView(o||s,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:s,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return xf(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=Mf(`${t}.${zf}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getPropertyValue(e,t,n){return e=pn.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Kf.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:a,pageReference:o,context:s}=e;let i=t||r||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):a&&i===r?Kf.getPropertyValue(i,o,s?`${s}/${j.SUGGESTION}`:void 0):Kf.getPropertyValue(i,o,s||void 0)}static _handlePropString(e,t,n,r,a){n.startsWith("@")?e[t]=pn.handleAnnotation(n,r,a):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const a=e[r];"string"==typeof a?this._handlePropString(e,r,a,t,n):Array.isArray(a)?a.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof a&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(qf.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(qf.mergeDeep(e,t),this._resolveProps(t,void 0,e),qf.resolveStringBooleans(t)):t}static resolvePropertyPageClass(e,t,n){const r=qf.resolvePageClass(e,n),a=t.startsWith(".")?t.slice(1):t,o=Qh(a,r);let s;if(o)return s=Array.isArray(o)?o[0]?.pageClass:o.pageClass,s}static resolveClassID(e,t,n,r){const a=pn.trimAnnotation(e);let o=a.startsWith(".")?`${t}${a}`:a;for(;o;){const e=xf(j.CLASS_ID,o,n);if(e)return e;if(r){const e=this.resolvePropertyPageClass(o,a,r);if(e)return e}const t=o.lastIndexOf(".");if(-1===t)break;o=o.substring(0,t)}return null}}const Jf=Kf;const Xf=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Qf=class{static#d=[];static#u=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=Xf.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const a=e[r],o={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#d.push(o)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===$h.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=oc.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};Jf.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#f())};static#f=()=>{if(!this.#u){if(0===this.#d.length)return;const e=this.#d.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#d.length>0&&this.#f()}};static#g=()=>{this.#f()};static#m=(e,t,n)=>{this.#p(e,t,n),this.#g()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Jf.getContextPath(t,n)};static#y(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:o}=n[r];if(o){const n=this.getActionHandlers(o,a,t);n&&n.length>0&&this.#m(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();hs({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===$h.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let n,{target:a}=t;null===a&&t&&t.auxiliaryTarget&&(a=t.auxiliaryTarget),n=void 0===a?t.value:"value"in a?a.value:a.innerText;const o=this.getFullRef(e);vf({type:Q,payload:{reference:o,value:n,context:r}}),void 0!==a&&this.isEditable(a)&&!this.isNonKeyInput(a)||vf({type:ee,payload:{reference:o,pageReference:e.getPageReference(),value:n,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const o=a[e],s=t[e];vf({type:Q,payload:{reference:Jf.getContextPath(n,o),value:s,context:r}}),vf({type:ee,payload:{reference:Jf.getContextPath(n,o),value:s,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,o=this.getFullRef(e),s=e.getContextName();n.clearMessages&&hs({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:s}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),this.isNonKeyInput(n)||vf({type:ee,payload:{reference:o,pageReference:e.getPageReference(),value:r,context:s,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#y(e,n)};static pause=()=>{this.#u=!0};static resume=()=>{this.#u=!1,this.#f()};static isQueueEmpty=()=>0===this.#d.length;static clearQueue=()=>{this.#d=[]};static getActionsQueue=()=>this.#d;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Zf="CREATE_WORK",eg=e=>({type:Zf,payload:e});const tg=(e,t,n,r,a="")=>{const o=[];Object.keys(e).forEach((s=>{"object"==typeof e[s]&&s.includes("[")?function(e,t,n,r,a,o,s){const i=r.substring(0,r.indexOf("[")),c=r.substring(r.indexOf("[")+1,r.indexOf("]"));let l=t[i];const d=`${qf.trimDotForProperty(a)}.${i}`;s.includes(d)&&Object.hasOwn(l,"pyCount")&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[r]),o.push(i),n.add(`${a}.${r}`))}(e,t,n,s,a,o,r):e[s]&&"object"==typeof e[s]?(t[s]||(t[s]=Array.isArray(e[s])?[]:{}),tg(e[s],t[s],n,r,`${a}.${s}`)):t[s]=e[s]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,o)},ng=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[],propertiesToReArrange:a=[]}=t,{context:o,data:s,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=rp(o,!0),d=Df(o);let u={};if(d&&s){u=JSON.parse(JSON.stringify(d));const e=JSON.parse(JSON.stringify(s));a.length>0&&qf.rearrangeProperties(a,u);const t=new Set;tg(l,u,t,a),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=qf.trimDotForProperty(e);const[a,o,s]=Yo(e);if(a&&o&&s&&!r.has(`${a}.${o}`)){const e=qf.getIn(n,`${a}.${o}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+s&&qf.setIn(t,`${a}.${o}[${n}]`,e)})),r.add(`${a}.${o}`)}}))})(t,u,e)}!function(e,t){const n=qf.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=qf.getIn(t,j.REFERENCED_USERS,{}),void qf.setIn(e,j.REFERENCED_USERS,{...r,...n});r=qf.getIn(t,j.REFERENCED_USERS,[]);const a=new Map;for(const e of[...r,...n])if(a.has(e.UserID)){const t=a.get(e.UserID);a.set(e.UserID,{...t,...e})}else a.set(e.UserID,e);n.length=0;for(const e of a.values())n.push(e)}}(s,d);const p=qf.getIn(e?.data,j.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),h=Ml.isExternalObject(p),f=h?{[j.OBJECT_INFO.OBJECT_INFO]:{[j.CONTENT]:{...u[j.OBJECT_INFO.OBJECT_INFO]?.[j.CONTENT]}}}:{[j.CASE_INFO.CASE_INFO]:{[j.CONTENT]:{...u[j.CASE_INFO.CASE_INFO]?.[j.CONTENT]}}},g=h?j.OBJECT_INFO.OBJECT_INFO_CONTENT:j.CASE_INFO.CASE_INFO_CONTENT;let m=s;return c?(n.forEach((e=>{const t=`${g}.${e}`;qf.deleteIn(f,t)})),m=kf(s,f,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=Qu[e]||{};Object.keys(n).forEach((e=>{qf.hasIn(t,e)&&(n[e].value=qf.getIn(t,e))}));let r=Cl.getStateMachinesByContext(e)||{};r={...r,...Cl.getUnConnectedStateMachines(e)||{}},Object.keys(r).forEach((n=>{if(qf.hasIn(t,n)){const r=qf.getIn(t,n);r&&Array.isArray(r)&&0===r.length&&Cl.setStateMachineEmpty(e,n)}}))})(o,s),{type:ge,payload:{...e,data:m,...r.length>0?{propertiesToReplace:r}:null,...a.length>0?{propertiesToReArrange:a}:null}}},rg=e=>({type:"SHOW_HARNESS",payload:e}),ag=e=>({type:te,payload:e}),og=e=>({type:ne,payload:e}),sg=e=>({type:"ADD_WORK",payload:e}),ig=e=>({type:de,payload:e}),cg=e=>({type:Ae,payload:e}),lg=e=>({type:Ce,payload:e}),dg=e=>({type:_e,payload:e}),ug=e=>({type:be,payload:e}),pg=e=>({type:Ne,payload:e}),hg=e=>({type:Oe,payload:e}),fg=e=>({type:De,payload:e}),gg=e=>({type:ve,payload:e}),mg=e=>{const{containerItemID:t}=e;e.suggestionContexts=Up(t);const n=e?.data?.caseInfo?.content,r=Object.keys(n||{}).length>0;return e.propertiesToReplace=r?Ml.getPropertiesToReplace(t):[],{type:$e,payload:e}},yg=e=>{const{context:t}=e;return{type:se,payload:{context:t}}},Ig=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},Eg=e=>({type:xe,payload:e}),Ag=e=>({type:Re,payload:e}),Cg=e=>({type:Ze,payload:e}),_g=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=wp(n)),e.context=r,e.deleteContext=!Zp(n),e.childContainers=Fp(n),e.childContainersContexts=jp(n),e.transientItems=eh([...e.childContainersContexts,n]),e.suggestionContexts=Up(n),n===t&&(e.caseID=xf(j.CASE_INFO.CASE_INFO_ID,"",t)||xf(j.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=xf(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Se,payload:e}},Sg=e=>{const{containerItemID:t}=e;return e.transientItems=eh([...jp(t),t]),{type:Pe,payload:e}},bg=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Te,payload:e}},Ng=e=>{const{context:t,containerItemID:n}=e;let r=t;if(r||(r=wp(n)),e.context=r,e.childContainers=Fp(n),e.childContainersContexts=jp(n),e.transientItems=eh([...e.childContainersContexts,n]),e.suggestionContexts=Up(n),n===t){e.caseID=xf(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=xf(j.CASE_INFO.REMOTESYSTEMID,"",t);const n=xf(j.CASE_INFO.CASE_INFO_CLASSNAME,"",t);V.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:we,payload:e}},Tg=e=>({type:pe,payload:e}),Pg=e=>({type:fe,payload:e}),Og=e=>({type:Ie,payload:e}),vg=(e,...t)=>(Qf.resume(),e(...t)),Dg=(e,t,n,r,a)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),Rg=e=>({type:rt,payload:e}),$g=e=>({type:at,payload:e}),xg=e=>({type:ot,payload:e}),wg=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),Mg=e=>({type:ce,payload:e}),Lg=e=>({type:Q,payload:e}),Fg="add",jg="replace",Ug=["portal","noPortal","preview","debug","devtool","activeTab"];let kg="",Vg="Home",Bg="",Gg=!0;const Wg=e=>(Gg=e,Gg),Hg=()=>Gg,qg=(e,t,n)=>Dh.getSemanticURL(e,t,n),zg=(e,t)=>Dh.getRestEndPoint(e,t),Yg=(e,t)=>{let n=E();const r=zg(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},Kg=(e,t,n)=>{const{root:r,resources:a}=e,{views:o}=a,{config:s}=r,i=Fg;let c="";if(n)c=n;else{const e=o[s.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(Eh);if(l){const e=qf.getIn(t,s.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},Jg=(e,t,n)=>{let r,a;r=Ch(t)?`${e}/${t}`:e;const o=Ch(n?.pxURLPath);o&&(r=`${r}/${o}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const s=r.split("/"),i=s[s.length-1],c=new URLSearchParams(window.location.search);if(Oh()?(r=((e,t,n,r,a)=>{const o=Dh.getStaticRoutePage(),s=Vg?.toLowerCase(),i=o?.toLowerCase(),c=r?.toLowerCase();return i!==s&&c!==s||a.has("noPortal")?e:`${t}/${n}`})(r,e,t,i,c),Dh.setStaticRoutePage("")):i.toLowerCase()!==Vg.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!Dh.isDefaultPortal()){const e=Dh.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return a=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&Ug.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},Xg=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r,queryParam:a},o=!1)=>{let s,i,c;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(o)s=t,i=n,c=r;else{const{uiResources:n,data:r}=e;({options:c}=e),s=t&&t.pxURLPath&&Ah(t.pxURLPath)?Kg(n,r,t.pxURLPath):t||Kg(n,r),i=Dh.getEndPointInfo(s.pxURLPath),s.pxURLPath=i.urlPath}let l=Jg(kg,Dh.getApplicationPath(),s);const{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:Dh.getApplicationName()),n===`${kg}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),a=r.split("/");return/\d/.test(r)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(Bg,Dh.getApplicationPath(),l),u=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(i,{...c,title:d});s?.historyAction===Fg?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(u,d,l):s?.historyAction===jg&&(a&&(l+=`?${a}`),((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(u,d,l))},Qg=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:Fg,pxURLPath:""},t.pxURLPath=e.semanticURL),Xg(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},Zg=e=>{Qg(e)},em=e=>{const t={pxURLPath:e};return Jg(kg,Dh.getApplicationPath(),t)},tm=e=>{const{uiResources:t}=e;Hg()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,o=a.type,s=a.name;if("VIEW"===o.toUpperCase()){const e=r[s];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&Qg(e)},nm=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},rm=(e,t,n)=>{const{caseClassName:r,workID:a}=e.payload,{containerName:o,context:s}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=V.getRemoteCase(r),d={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:At,viewName:U,gadgetId:Ml.getUniqueGadgetId(),context:n??s,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${a}`,containerName:o,name:l};vf(u.showPage(d))},am=e=>{const t=(e=>"ui-navigation"===e.state?.type?(_s.publish(F.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);t&&(V.isTraditionalRemoteCase(t.payload?.caseClassName)?rm({...t},t.options):vf(u.showHistory(nm(t))))},om=()=>Dh.getApplicationPath()!==Sh(),sm=e=>{const{acName:t,context:n,defaultViewLabel:r,ruleName:a,className:o}=e,s=((e,t)=>{const n=Dh.getRoutingInfo();if(Oh()&&Object.values(n?.routes).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const r=e.split(" ").join(""),a=e.split(" ").join("-").toLowerCase(),o=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes[r]?r:n?.routes[a]?a:n?.routes[o]?o:e})(a||r,o);(e=>{Vg=e})(s),Dh.setDefaultRoute(s),Dh.setDefaultClassName(o);const i=H(t,n),c=Ot(t,n),l="true"===$h.getIsExtraCallRequiredForDefaultHome(),d={historyAction:jg,pxURLPath:""};let p,h=null;const f={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&om()){const t=Th(bh());$h.shouldUseURLParams()&&(h=t.includes("?")?t.split("?")[1]:null),p=Ph(t,f),d.pxURLPath=p.urlPath,void 0!==p.payload?.pageClass&&(p.payload.pageClass=Of()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:f,routeKey:p.routeKey};V.isTraditionalRemoteCase(p?.payload?.caseClassName)?rm(r,e,f.context):vf(u[n](nm(r)))}else p=Dh.getEndPointInfo(Vg),d.pxURLPath="";Xg(null,{urlPathObjParam:d,infoParam:p,optionsParam:f,queryParam:h},!0)},im=(e,t=!1)=>{var n;kg=e.domain,!1===t&&Hg()&&(n=am,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),Dh.init(e,Vg)},cm=e=>{(e=>{window.document.title=e})(e)};var lm=Symbol.for("immer-nothing"),dm=Symbol.for("immer-draftable"),um=Symbol.for("immer-state");function pm(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var hm=Object,fm=hm.getPrototypeOf,gm="constructor",mm="prototype",ym="configurable",Im="enumerable",Em="writable",Am="value",Cm=e=>!!e&&!!e[um];function _m(e){return!!e&&(Nm(e)||Rm(e)||!!e[dm]||!!e[gm]?.[dm]||$m(e)||xm(e))}var Sm=hm[mm][gm].toString(),bm=new WeakMap;function Nm(e){if(!e||!wm(e))return!1;const t=fm(e);if(null===t||t===hm[mm])return!0;const n=hm.hasOwnProperty.call(t,gm)&&t[gm];if(n===Object)return!0;if(!Mm(n))return!1;let r=bm.get(n);return void 0===r&&(r=Function.toString.call(n),bm.set(n,r)),r===Sm}function Tm(e,t,n=!0){if(0===Pm(e)){(n?Reflect.ownKeys(e):hm.keys(e)).forEach((n=>{t(n,e[n],e)}))}else e.forEach(((n,r)=>t(r,n,e)))}function Pm(e){const t=e[um];return t?t.type_:Rm(e)?1:$m(e)?2:xm(e)?3:0}var Om=(e,t,n=Pm(e))=>2===n?e.has(t):hm[mm].hasOwnProperty.call(e,t),vm=(e,t,n=Pm(e))=>2===n?e.get(t):e[t],Dm=(e,t,n,r=Pm(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var Rm=Array.isArray,$m=e=>e instanceof Map,xm=e=>e instanceof Set,wm=e=>"object"==typeof e,Mm=e=>"function"==typeof e,Lm=e=>"boolean"==typeof e;var Fm=e=>e.copy_||e.base_,jm=e=>e.modified_?e.copy_:e.base_;function Um(e,t){if($m(e))return new Map(e);if(xm(e))return new Set(e);if(Rm(e))return Array[mm].slice.call(e);const n=Nm(e);if(!0===t||"class_only"===t&&!n){const t=hm.getOwnPropertyDescriptors(e);delete t[um];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const a=n[r],o=t[a];!1===o[Em]&&(o[Em]=!0,o[ym]=!0),(o.get||o.set)&&(t[a]={[ym]:!0,[Em]:!0,[Im]:o[Im],[Am]:e[a]})}return hm.create(fm(e),t)}{const t=fm(e);if(null!==t&&n)return{...e};const r=hm.create(t);return hm.assign(r,e)}}function km(e,t=!1){return Bm(e)||Cm(e)||!_m(e)||(Pm(e)>1&&hm.defineProperties(e,{set:Vm,add:Vm,clear:Vm,delete:Vm}),hm.freeze(e),t&&Tm(e,((e,t)=>{km(t,!0)}),!1)),e}var Vm={[Am]:function(){pm(2)}};function Bm(e){return null===e||!wm(e)||hm.isFrozen(e)}var Gm="MapSet",Wm="Patches",Hm="ArrayMethods",qm={};function zm(e){const t=qm[e];return t||pm(0),t}var Ym,Km=e=>!!qm[e];var Jm=()=>Ym;function Xm(e,t){t&&(e.patchPlugin_=zm(Wm),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qm(e){Zm(e),e.drafts_.forEach(ty),e.drafts_=null}function Zm(e){e===Ym&&(Ym=e.parent_)}var ey=e=>Ym={drafts_:[],parent_:Ym,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Km(Gm)?zm(Gm):void 0,arrayMethodsPlugin_:Km(Hm)?zm(Hm):void 0};function ty(e){const t=e[um];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function ny(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[um].modified_&&(Qm(t),pm(4)),_m(e)&&(e=ry(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[um].base_,e,t)}else e=ry(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&km(t,n)}(t,e,!0),Qm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lm?e:void 0}function ry(e,t){if(Bm(t))return t;const n=t[um];if(!n){return dy(t,e.handledSet_,e)}if(!oy(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}cy(n,e)}return n.copy_}function ay(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var oy=(e,t)=>e.scope_===t,sy=[];function iy(e,t,n,r){const a=Fm(e),o=e.type_;if(void 0!==r){if(vm(a,r,o)===t)return void Dm(a,r,n,o)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;Tm(a,((e,n)=>{if(Cm(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}}))}const s=e.draftLocations_.get(t)??sy;for(const e of s)Dm(a,e,n,o)}function cy(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}ay(e)}}function ly(e,t,n){const{scope_:r}=e;if(Cm(n)){const a=n[um];oy(a,r)&&a.callbacks_.push((function(){my(e);const r=jm(a);iy(e,n,r,t)}))}else _m(n)&&e.callbacks_.push((function(){const a=Fm(e);3===e.type_?a.has(n)&&dy(n,r.handledSet_,r):vm(a,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&dy(vm(e.copy_,t,e.type_),r.handledSet_,r)}))}function dy(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Cm(e)||t.has(e)||!_m(e)||Bm(e)||(t.add(e),Tm(e,((r,a)=>{if(Cm(a)){const t=a[um];if(oy(t,n)){const n=jm(t);Dm(e,r,n,e.type_),ay(t)}}else _m(a)&&dy(a,t,n)}))),e}var uy={get(e,t){if(t===um)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=Fm(e);if(!Om(a,t,e.type_))return function(e,t,n){const r=fy(t,n);return r?Am in r?r[Am]:r.get?.call(e.draft_):void 0}(e,a,t);const o=a[t];if(e.finalized_||!_m(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===hy(e.base_,t)){my(e);const n=1===e.type_?+t:t,r=yy(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in Fm(e),ownKeys:e=>Reflect.ownKeys(Fm(e)),set(e,t,n){const r=fy(Fm(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=hy(Fm(e),t),s=r?.[um];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((a=n)===(o=r)?0!==a||1/a==1/o:a!=a&&o!=o)&&(void 0!==n||Om(e.base_,t,e.type_)))return!0;my(e),gy(e)}var a,o;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),ly(e,t,n)),!0},deleteProperty:(e,t)=>(my(e),void 0!==hy(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),gy(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Fm(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Em]:!0,[ym]:1!==e.type_||"length"!==t,[Im]:r[Im],[Am]:n[t]}:r},defineProperty(){pm(11)},getPrototypeOf:e=>fm(e.base_),setPrototypeOf(){pm(12)}},py={};for(let e in uy){let t=uy[e];py[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function hy(e,t){const n=e[um];return(n?Fm(n):e)[t]}function fy(e,t){if(!(t in e))return;let n=fm(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=fm(n)}}function gy(e){e.modified_||(e.modified_=!0,e.parent_&&gy(e.parent_))}function my(e){e.copy_||(e.assigned_=new Map,e.copy_=Um(e.base_,e.scope_.immer_.useStrictShallowCopy_))}py.deleteProperty=function(e,t){return py.set.call(this,e,t,void 0)},py.set=function(e,t,n){return uy.set.call(this,e[0],t,n,e[0])};function yy(e,t,n,r){const[a,o]=$m(t)?zm(Gm).proxyMap_(t,n):xm(t)?zm(Gm).proxySet_(t,n):function(e,t){const n=Rm(e),r={type_:n?1:0,scope_:t?t.scope_:Jm(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,o=uy;n&&(a=[r],o=py);const{revoke:s,proxy:i}=Proxy.revocable(a,o);return r.draft_=i,r.revoke_=s,[i,r]}(t,n);return(n?.scope_??Jm()).drafts_.push(a),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push((function(r){const a=t;if(!a||!oy(a,r))return;r.mapSetPlugin_?.fixSetContents(a);const o=jm(a);iy(e,a.draft_??a,o,n),cy(a,r)}))}(n,o,r):o.callbacks_.push((function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)})),a}function Iy(e){if(!_m(e)||Bm(e))return e;const t=e[um];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Um(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Um(e,!0);return Tm(n,((e,t)=>{Dm(n,e,Iy(t))}),r),t&&(t.finalized_=!1),n}var Ey=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Mm(e)&&!Mm(t)){const n=t;t=e;const r=this;return function(e=n,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let r;if(Mm(t)||pm(6),void 0===n||Mm(n)||pm(7),_m(e)){const a=ey(this),o=yy(a,e,void 0);let s=!0;try{r=t(o),s=!1}finally{s?Qm(a):Zm(a)}return Xm(a,n),ny(r,a)}if(!e||!wm(e)){if(r=t(e),void 0===r&&(r=e),r===lm&&(r=void 0),this.autoFreeze_&&km(r,!0),n){const t=[],a=[];zm(Wm).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:a}),n(t,a)}return r}pm(1)},this.produceWithPatches=(e,t)=>{if(Mm(e))return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},Lm(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Lm(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Lm(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){_m(e)||pm(8),Cm(e)&&(e=function(e){Cm(e)||pm(10);return Iy(e)}(e));const t=ey(this),n=yy(t,e,void 0);return n[um].isManual_=!0,Zm(t),n}finishDraft(e,t){const n=e&&e[um];n&&n.isManual_||pm(9);const{scope_:r}=n;return Xm(r,t),ny(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=zm(Wm).applyPatches_;return Cm(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},Ay=Ey.produce;function Cy(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var _y=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Sy=()=>Math.random().toString(36).substring(7).split("").join("."),by={INIT:`@@redux/INIT${Sy()}`,REPLACE:`@@redux/REPLACE${Sy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Sy()}`};function Ny(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Ty(e,t,n){if("function"!=typeof e)throw new Error(Cy(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Cy(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Cy(1));return n(Ty)(e,t)}let r=e,a=t,o=new Map,s=o,i=0,c=!1;function l(){s===o&&(s=new Map,o.forEach(((e,t)=>{s.set(t,e)})))}function d(){if(c)throw new Error(Cy(3));return a}function u(e){if("function"!=typeof e)throw new Error(Cy(4));if(c)throw new Error(Cy(5));let t=!0;l();const n=i++;return s.set(n,e),function(){if(t){if(c)throw new Error(Cy(6));t=!1,l(),s.delete(n),o=null}}}function p(e){if(!Ny(e))throw new Error(Cy(7));if(void 0===e.type)throw new Error(Cy(8));if("string"!=typeof e.type)throw new Error(Cy(17));if(c)throw new Error(Cy(9));try{c=!0,a=r(a,e)}finally{c=!1}return(o=s).forEach((e=>{e()})),e}p({type:by.INIT});return{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Cy(10));r=e,p({type:by.REPLACE})},[_y]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Cy(11));function n(){const e=t;e.next&&e.next(d())}n();return{unsubscribe:e(n)}},[_y](){return this}}}}}function Py(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];0,"function"==typeof e[a]&&(n[a]=e[a])}const r=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:by.INIT}))throw new Error(Cy(12));if(void 0===n(void 0,{type:by.PROBE_UNKNOWN_ACTION()}))throw new Error(Cy(13))}))}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const s={};for(let a=0;a<r.length;a++){const i=r[a],c=n[i],l=e[i],d=c(l,t);if(void 0===d){t&&t.type;throw new Error(Cy(14))}s[i]=d,o=o||d!==l}return o=o||r.length!==Object.keys(e).length,o?s:e}}function Oy(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function vy(e){return({dispatch:t,getState:n})=>r=>a=>"function"==typeof a?a(t,n,e):r(a)}var Dy=vy(),Ry=vy,$y="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Oy:Oy.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var xy=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function wy(e){return _m(e)?Ay(e,(()=>{})):e}var My="RTK_autoBatch",Ly=e=>t=>{setTimeout(t,e)},Fy=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new xy(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,o=!1,s=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ly(10):"callback"===e.type?e.queueNotification:Ly(e.timeout),l=()=>{s=!1,o&&(o=!1,i.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>a&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return a=!e?.meta?.[My],o=!a,o&&(s||(s=!0,c(l))),r.dispatch(e)}finally{a=!0}}})})("object"==typeof n?n:void 0)),r};function jy(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let o=new xy;return t&&("boolean"==typeof t?o.push(Dy):o.push(Ry(t.extraArgument))),o},{reducer:n,middleware:r,devTools:a=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!Ny(n))throw new Error(By(1));c=Py(n)}l="function"==typeof r?r(t):t();let d=Oy;a&&(d=$y({trace:!1,..."object"==typeof a&&a}));const u=function(...e){return t=>(n,r)=>{const a=t(n,r);let o=()=>{throw new Error(Cy(15))};const s={getState:a.getState,dispatch:(e,...t)=>o(e,...t)},i=e.map((e=>e(s)));return o=Oy(...i)(a.dispatch),{...a,dispatch:o}}}(...l),p=Fy(u);return Ty(c,s,d(..."function"==typeof i?i(p):p()))}function Uy(e){const t={},n=[];let r;const a={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(By(28));if(r in t)throw new Error(By(29));return t[r]=n,a},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),a),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(r=e,a)};return e(a),[t,n,r]}function ky(e,t){let n,[r,a,o]=Uy(t);if("function"==typeof e)n=()=>wy(e());else{const t=wy(e);n=()=>t}function s(e=n(),t){let s=[r[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===s.filter((e=>!!e)).length&&(s=[o]),s.reduce(((e,n)=>{if(n){if(Cm(e)){const r=n(e,t);return void 0===r?e:r}if(_m(e))return Ay(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return s.getInitialState=n,s}var{assign:Vy}=Object;Symbol.for("rtk-state-proxy-original");function By(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Gy=function(e){function t(t,n){return e.call(this)||this}return ja(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Qa),Wy={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=Wy.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,Ga([e,t],Ba(n))):setInterval.apply(void 0,Ga([e,t],Ba(n)))},clearInterval:function(e){var t=Wy.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Hy=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return ja(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,a=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(a,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Wy.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&Wy.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Xa(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Gy),qy=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return ja(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Hy),zy={now:function(){return(zy.delegate||Date).now()},delegate:void 0},Yy=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=zy.now,e}(),Ky=function(e){function t(t,n){void 0===n&&(n=Yy.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return ja(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Yy),Jy=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ja(t,e),t}(Ky))(qy),Xy=Ma((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Qy=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return ja(t,e),t.prototype.lift=function(e){var t=new Zy(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Xy},t.prototype.next=function(e){var t=this;lo((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=Va(t.currentObservers),o=a.next();!o.done;o=a.next()){o.value.next(e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;lo((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;lo((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,o=n.observers;return r||a?Za:(this.currentObservers=null,o.push(e),new Qa((function(){t.currentObservers=null,Xa(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new _o;return e.source=this,e},t.create=function(e,t){return new Zy(e,t)},t}(_o),Zy=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return ja(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Za},t}(Qy),eI=function(e,t){return eI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},eI(e,t)};Object.create;Object.create;var tI=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new Qy,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}eI(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(_o);const nI=e=>{let t=new Set,n=t;const r=()=>{t===n&&(t=new Set(t))},a=e=>{let n=!0;return r(),t.add(e),()=>{n&&(r(),t.delete(e),n=!1)}},o=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let r=!1,s=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{s?r=!0:o()})),{...n,dispatch:e=>{const t=s;t||(r=!1,s=!0);const n=i(e),a=r&&!t;return t||(r=!1,s=!1),a&&o(),n},subscribe:a}}},rI=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{Ld.updateDataPageStore(t),Object.keys(t).forEach((n=>{qf.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{qf.setIn(e,[j.SHARED,n,r],t[n][r])})):qf.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&qf.deleteIn(e,[r,"shared"])},aI=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:j.PERFORM_MODE),containerName:o}=t;o!==yp.WORKAREA&&a&&qf.setIn(e,[r,"context_data","caseViewMode"],a)},oI=(e,t)=>{const{context:n}=t;qf.setIn(e,[n,"context_data","actionType"],t.actionType),qf.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},sI=(e,t=[])=>{t.forEach((t=>qf.deleteIn(e,t)))},iI=(e,t=[])=>{t.forEach((t=>qf.deleteIn(e,t)))},cI=(e,t=[])=>{t.forEach((t=>{qf.deleteIn(e,t)}))},lI=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;qf.deleteIn(e,[t,"nextAssignmentInfo"]),qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),a&&(qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),qf.deleteIn(e,[t,"caseMessages"])),r&&(qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),qf.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},dI=ky({},(e=>{e.addCase(_e,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&lI(e,t.payload.context);const{target:n}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,aI(e,t.payload),oI(e,t.payload),rI(e,t.payload),((e,t)=>{const{context:n}=t;qf.deleteIn(e,[n,"context_data","blocking_action_counter"]),qf.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase($e,((e,t)=>{t.payload.doDeleteCaseSummary&&lI(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=kf(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=kf(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&oI(e,t.payload),aI(e,t.payload),rI(e,t.payload),iI(e,t.payload.suggestionContexts)})).addCase(Se,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&qf.deleteIn(e,[r]),qf.deleteIn(e,[n])})(e,t.payload),cI(e,n),sI(e,t.payload.transientItems),iI(e,t.payload.suggestionContexts)})).addCase(Ce,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{qf.deleteIn(e,[t])})):qf.deleteIn(e,[n])})).addCase(xe,((e,t)=>{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:o}=t.payload;lI(e,t.payload.context),aI(e,t.payload),e[n]=kf(e[n],e[r]),e[n]=kf(e[n],a),qf.deleteIn(e,[r]),cI(e,o),rI(e,t.payload)})).addCase(we,((e,t)=>{const{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}=t.payload;let{data:o}=t.payload;const s=qf.getIn(e[n],"pulse");let i=qf.getIn(e[n],"OperatorID"),c=qf.getIn(e[n],"pxRequestor");c&&o.pxRequestor&&(c=qf.mergeDeep(c,o.pxRequestor)),i&&o.OperatorID&&(i=qf.mergeDeep(i,o.OperatorID)),!r&&s&&(o=Vf(o,"pulse",s),o=Vf(o,"OperatorID",i),o=Vf(o,"pxRequestor",c)),qf.setIn(e,n,o),aI(e,t.payload),rI(e,t.payload),cI(e,a),sI(e,t.payload.transientItems),iI(e,t.payload.suggestionContexts)})).addCase(st,((e,t)=>{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;lI(e,n,{doDeleteConfirmationDetails:r})})).addCase(be,((e,t)=>{const{transientItemID:n,data:r}=t.payload;qf.setIn(e,n,r)})).addCase(Te,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>qf.deleteIn(e,t)))})).addCase(Pe,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>qf.deleteIn(e,t)))})).addCase(Ne,((e,t)=>{const{transientItemID:n,data:r}=t.payload;kf(qf.getIn(e,n),r)})).addCase(Oe,((e,t)=>{const{transientItemID:n,data:r}=t.payload;kf(qf.getIn(e,n),r)})).addCase(ve,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Object.keys(r??{}).forEach((t=>{qf.deleteIn(e,[n,t])}))})).addCase(De,((e,t)=>{const{transientItemID:n,data:r}=t.payload;qf.deleteIn(e,n),qf.setIn(e,n,r)})).addCase(ce,((e,t)=>{const{key:n,value:r}=t.payload;qf.setIn(e,`${j.SHARED}.${n}`,r)})).addCase(Fe,((e,t)=>{const{context:n,data:r}=t.payload;return qf.setIn(e,n,r)}))})),uI=ky({},(e=>{e.addCase(ge,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:r=[],uiRootReference:a="",interestPath:o}=t.payload,s=a&&"string"==typeof t.payload.context?`${t.payload.context}.${a}`:t.payload.context,i="string"==typeof s?Tf(s):[],c={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...r]};if(a&&i.length)qf.setIn(e,i,kf(qf.getIn(e,i),qf.getIn(t.payload.data,Tf(a)),c));else if(o){const a=qf.getIn(e[t.payload.context],o),s=qf.getIn(t.payload.data,o),i=kf(a,s,{isArrayDeepMerge:!0}),c=qf.getIn(t.payload.data.context_data,o);Uf(e[t.payload.context],[...n],[...r]),qf.setIn(e[t.payload.context],o,i),e[t.payload.context]&&c&&qf.setIn(e[t.payload.context].context_data,o,kf(qf.getIn(e[t.payload.context].context_data,o),c,{isArrayDeepMerge:!0}))}else e[t.payload.context]=kf(e[t.payload.context],t.payload.data,c);aI(e,t.payload,!0),rI(e,t.payload)})).addCase(Q,((e,t)=>{const{context:n,reference:r,value:a,isArrayDeepMerge:o}=t.payload;Vf(e[n],r,a,{isArrayDeepMerge:o})})).addCase(Z,((e,t)=>{const{context:n,reference:r,value:a}=t.payload;Bf(e[n],r,a)})).addCase(me,((e,t)=>{Ff(e[t.payload.context],t.payload.reference)})).addCase(se,((e,t)=>{qf.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(ie,((e,t)=>{qf.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(rt,((e,t)=>{const{data:n}=t.payload;rI(e,{data:{shared:n}})})).addCase(at,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;qf.deleteIn(e.shared,[n,r]);const a=qf.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&qf.deleteIn(e.shared,[n])}))})).addCase(it,((e,t)=>{const n=qf.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?qf.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):qf.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)}))})),pI=/\[(\d+)\]$/gi,hI=/(\d+)/gi,fI=/\[.\]$/gi,gI=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const a=qf.getIn(t,r);if(a){const t=gs(a,[],[]);for(const a of t)qf.setIn(e[n],[...r,...a],{})}},mI=(e,t,n,r)=>{const{property:a,pageReference:o,category:s,type:i}=r.payload,c=qf.getIn(e[t],n);if(c&&s===j.CASEMESSAGES)qf.setIn(e[t],cs(a,o,s),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&qf.setIn(e[t],cs(a,o,s),r)}},yI=(e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:o,deletingIndex:s,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return gI(e,i,c),e;const l=cs(n,r,a,o);if(Number.isInteger(s)){qf.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=qf.getIn(e[c],t)||{};const r=(d=Object.keys(n),[...d].sort(((e,t)=>{const n=e.match(pI),r=t.match(pI);if(!n&&!r)return e.localeCompare(t);if(!n&&r)return-1;if(n?.length&&r?.length){const e=n[0].match(hI),t=r[0].match(hI);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=r.map((e=>n[e])),n.forEach(((n,a)=>{const o=r[a].match(pI);if(o?.length){const i=parseInt(o[0].match(hI)[0],10);i>s&&(qf.deleteIn(e[c],t.concat(r[a])),qf.setIn(e[c],t.concat(r[a].replace(fI,`[${i-1}]`)),n))}}))}else qf.setIn(e[c],l,{});var d;return e};function II(e,t){const n=qf.getIn(e,t);return void 0!==n?.dataInfo?.content}const EI=(e,t)=>{const n=qf.getIn(e,t);return!0===Ml.isObjectCaseType(n?.objectInfo?.objectTypeID)};function AI(e,t){let n=is.FIELD_MESSAGES_PATH;return II(e,t)?n=is.DATA_OBJECT_FIELD_MESSAGES_PATH:EI(e,t)&&(n=is.OBJECT_FIELD_MESSAGES_PATH),n}const CI=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=qf.getIn(n,j.ERROR_FIELD_IN_PAGE).slice(1),a=qf.getIn(n,j.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(a){let o="caseInfo.content";II(e,t)?o="dataInfo.content":EI(e,t)&&(o="objectInfo.content");let s=r?`${o}.${r}`:o;s=s.replace(/\(/g,"[").replace(/\)/g,"]");const i=cs(a,s,j.PROPERTY),c=qf.getIn(e[t],`${s}.classID`),l=Qh(a,c),d=$h.getLocale()??"en-US",u=new Iu(d,l?.localeReference),p={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:u.getLocalizedText(l.label)}},h=qf.getIn(e[t],i,[]);if(qf.isContains(h,p))return;qf.setIn(e[t],i,[...h,p])}})(e,t,n)}))};function _I(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:o,pageErrors:s}=((e,t)=>{const n=new Map(t.map(((e,t)=>[e,t]))),r=e=>n.get((e=>{const t=(e.erroneousInputOutputFieldInPage||"").replace(/^\./,""),n=(e.erroneousInputOutputIdentifier||"").replace(/^\./,"");return t?`${t}.${n}`:n})(e))??Number.MAX_SAFE_INTEGER,a=e.slice().sort(((e,t)=>r(e)-r(t))),o=[],s=[];for(const e of a)nl(e,t,o,s);return{fieldErrors:s,pageErrors:o}})(n.errorDetails,r),i=AI(e,a);if(qf.setIn(e,[a,...i],{}),qf.setIn(e,[a,...is.PAGE_MESSAGES_PATH],[]),o.forEach((t=>{const n=qf.getIn(t,j.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(t);if(!n)return!1;const r=t.substring(t.lastIndexOf(".")+1),o=cs(r,n,j.PROPERTY);qf.setIn(e,[a,...o],[])}}})),o.length>0&&CI(e,a,o),s.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(s);e[a]||(a=j.APP.APP),qf.setIn(e,[a,...is.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(yp.WORKAREA)&&(a=W(a)),qf.deleteIn(e,[a,...is.PAGE_MESSAGES_PATH]);return e}const SI=ky({},(e=>{e.addCase(Ee,((e,t)=>t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||"Invalid inputs"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?_I(e,t):e)).addCase($e,((e,t)=>{const{context:n}=t.payload,r=[n,...AI(e,n)],a=[n,...is.PAGE_MESSAGES_PATH];if(qf.setIn(e,r,{}),qf.setIn(e,a,[]),n&&n.includes(yp.WORKAREA)){const t=[J(n),...is.PAGE_MESSAGES_PATH];qf.setIn(e,t,[])}})).addCase(et,((e,t)=>{const{isListEntry:n,clearAll:r,context:a}=t.payload;return r?(qf.deleteIn(e,[a,j.CONTEXT_DATA]),e):n?yI(e,t):((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:o,stateObj:s}=t.payload,{context:i}=t.payload;let c=i;if(s)return gI(e,s,i),e;const l=cs(n,r,a,o);return a===j.PAGE&&i?.includes(yp.WORKAREA)&&(c=W(i)),mI(e,c,l,t),mI(e,i,l,t),e})(e,t)})).addCase(Ze,((e,t)=>{const{messages:n,property:r,pageReference:a,context:o,category:s}=t.payload,i=cs(r,a,s);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&qf.setIn(e[o],cs(r,a,s),n)}))})),bI=(e,t,n,r,a)=>{qf.setIn(e[t],[...n,r],a)},NI=[uI,dI,SI,ky({},(e=>{e.addCase(ot,((e,t)=>{const{instruction:n,actions:r,context:a,referenceList:o,listIndex:s,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,d=Tf(o);switch(n){case j.LIST_ACTIONS.ADD:bI(e,a,d,i,l);break;case j.LIST_ACTIONS.INSERT:bI(e,a,d,s,l);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const o=kf(qf.getIn(e[t],[...n,r],{}),a);qf.setIn(e[t],[...n,r],o)})(e,a,d,s??i,l);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r,a)=>{const o=qf.getIn(e[t],n,[]);"string"==typeof r?delete o[r]:o.splice(r,1),qf.setIn(e[t],n,o),ss.deleteListNode(t,[a],o.length)})(e,a,d,s??i,o);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const o=qf.getIn(e[t],[...n,r],{}),s=qf.getIn(e[t],n,[]);s.splice(r,1),s.splice(a,0,o),qf.setIn(e[t],n,s),us(e,t,n?.join("."),r,a)})(e,a,d,s,c);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=qf.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:o,listIndex:s}=e;if(r===j.LIST_ACTIONS.SELECT){a[s]=o;const e=n?.join(".");gi(t,e)}else delete a[s]})),qf.setIn(e[t],n,a.filter(Boolean))})(e,a,d,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{qf.setIn(e[t],n,[])})(e,a,d);break;case j.LIST_ACTIONS.REPLACE:((e,t,n,r)=>{qf.setIn(e[t],n,r)})(e,a,d,l);break;case j.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{qf.setIn(e[t],n,{})})(e,a,d)}}))}))],TI=(e,t)=>(e||(e=$I().data),t.type===tt?$I().data:(NI.forEach((n=>{e=n(e,t)})),e)),PI={},OI=(e,t=[])=>{t.forEach((t=>{qf.deleteIn(e,[t])}))},vI=(e,t)=>{const{type:n,payload:r}=t,a=n===$e,{target:o,context:s,semanticURL:i="",root:c,containerItemID:l,childContainers:d,flowName:u,resourceType:p="",key:h="",clearView:f=!1}=r;return c?qf.setIn(e,[o,"items",l,"view"],c):f&&qf.deleteIn(e,[o,"items",l,"view"]),s&&qf.setIn(e,[o,"items",l,"context"],s),u&&qf.setIn(e,[o,"items",l,"flowName"],u),(!a||a&&h)&&qf.setIn(e,[o,"items",l,"key"],h.trim()),((e,t,n,r)=>{""===e&&qf.deleteIn(t,[n,"items",r,"key"])})(h,e,o,l),(!a||a&&i)&&qf.setIn(e,[o,"items",l,"semanticURL"],i),(!a||a&&p)&&qf.setIn(e,[o,"items",l,"resourceType"],p),OI(e,d),e},DI=ky(PI,(e=>{e.addCase(tt,(()=>PI)).addCase(Ae,((e,t)=>{const{context:n,name:r,type:a,actionMgrID:o}=t.payload,s=`${n}/${r}`;if(oc.resolveActionByID(o,null,!1),e[s])return e;qf.setIn(e,[s],{type:a,accessedOrder:[],items:{}})})).addCase(Le,((e,t)=>{const{containerName:n,childContainers:r=[]}=t.payload;qf.deleteIn(e,[n]),r.forEach((t=>{qf.deleteIn(e,[t])}))})).addCase(Ce,((e,t)=>{const{context:n,name:r,actionMgrID:a,childContainers:o}=t.payload,s=`${n}/${r}`;oc.resolveActionByID(a,null,!1),qf.setIn(e,[s,"accessedOrder"],[]),qf.setIn(e,[s,"items"],{}),Array.isArray(o)&&o.forEach((t=>{qf.deleteIn(e,[t])}))})).addCase(_e,((e,t)=>{const{target:n,context:r,isInCreateStage:a,isBulkAction:o,semanticURL:s,root:i,containerItemID:c,actionMgrID:l,key:d,flowName:u,resourceType:p,actionName:h,isMinimizable:f,showProgress:g,progressMessage:m,modalOptions:y,resourceStatus:I,actionID:E,isMultiRecordData:A,acTertiary:C,parentContext:_,heading:S,isTraditionalRemoteCase:b,readOnly:N,referenceList:T,subscriptName:P,subscriptFieldName:O,pageGroupName:v,isPageGroup:D,index:R,isDeleteConfirmation:$,workId:w,caseTypeID:M,className:L,keys:F,enableBackNavigation:j}=t.payload,U=e[n],k=U&&U.type,V=U&&U.accessedOrder||[],B=U&&U.items||{};if(e[n]&&"single"===k&&V.length>0)return vI(e,t);const G={accessedOrder:[...V,c],items:{...B,[c]:{view:i,semanticURL:s,key:d,flowName:u,readOnly:N,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:f,...o&&{isBulkAction:o},showProgress:g,progressMessage:m,modalOptions:y,isTraditionalRemoteCase:b,resourceStatus:I,referenceList:T,subscriptName:P,subscriptFieldName:O,pageGroupName:v,isPageGroup:D,index:R,...E&&{actionID:E},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},..._&&{parentContext:_},...$&&{isDeleteConfirmation:$,workId:w,caseTypeID:M,className:L,keys:F,enableBackNavigation:j},heading:S}}};oc.resolveActionByID(l,null,!1),e[n]=x()(e[n],G)})).addCase($e,((e,t)=>{const{actionMgrID:n,data:r}=t.payload;try{vI(e,t),oc.resolveActionByID(n,r,!1)}catch{oc.rejectActionByID(n,!1)}})).addCase(we,((e,t)=>((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:o}=t.payload;let s=e;try{const i=e&&e[a]?.type;let c=e&&e[a]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,o]:c.includes(o)?c:[...c,o],qf.setIn(e,[a,"items",o,"transientItems"],[]),qf.setIn(e,[a,"accessedOrder"],c),s=vI(e,t),oc.resolveActionByID(n,r,!1)}catch{oc.rejectActionByID(n,!1)}return s})(e,t))).addCase(Re,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=qf.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),qf.setIn(e,[n,"accessedOrder"],t),oc.resolveActionByID(a,null,!1)}catch{oc.rejectActionByID(a,!1)}})).addCase(xe,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a,childContainers:o}=t.payload;try{const t=qf.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));qf.setIn(e,[n,"accessedOrder"],t),qf.deleteIn(e,[n,"items",r]),OI(e,o),oc.resolveActionByID(a,null,!1)}catch{oc.rejectActionByID(a,!1)}})).addCase(Se,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a,childContainers:o}=t.payload;try{const t=qf.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));qf.setIn(e,[n,"accessedOrder"],t),qf.deleteIn(e,[n,"items",r]),OI(e,o),oc.resolveActionByID(a,null,!1)}catch{oc.rejectActionByID(a,!1)}})).addCase(be,((e,t)=>{const{transientItemID:n,target:r,contextName:a}=t.payload,o=qf.getIn(e,[r,"items",a,"transientItems"])??[];qf.setIn(e,[r,"items",a,"transientItems"],[...o,n])})).addCase(Pe,((e,t)=>{const{target:n,containerItemID:r}=t.payload;qf.deleteIn(e,[n,"items",r,"transientItems"])})).addCase(Te,((e,t)=>{const{target:n,transientItemID:r,containerItemID:a}=t.payload,o=(qf.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));qf.setIn(e,[n,"items",a,"transientItems"],o)}))}));let RI={};const $I=()=>RI,xI=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];RI={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),{data:TI,containers:DI});function wI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=pd(e),r=function(e,t){return"number"==typeof ud(e)?e.pop():t}(e,1/0),a=e;return a.length?1===a.length?Ro(a[0]):function(e){return void 0===e&&(e=1/0),ld(Ao,e)}(r)(Vo(a,n)):fd}const MI=(e,t=!1)=>e===j.ACTION?t?Qd.REFRESH_CASE_DATA:Qd.REFRESH_ASSIGNMENT_DATA:Qd.REFRESH_CASE_VIEW,LI=e=>{const{context:t}=e;let n={...Xc(t).content,contextData:!1};const r=yl(t);qf.isEmpty(r)||(n=ml(r,n));const a=MI(e.editType,e.isLocalAction),{restApi:o,reqType:s}=Yg(a,{ID:e.isLocalAction||e.editType!==j.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=o;return e.editType===j.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,Vo(Ws(i,{method:s,body:n,headers:e.headers},t)).pipe(cd((t=>({actionInPayload:e,response:t.data,headers:Jc(t.headers)}))),md(": Error occurred during ajax call : ",t))},FI={},{VIEW:jI,FIELD:UI}=j.CONTEXT_TREE_NODE_TYPES,kI=(e,t,n)=>{const r=t.value.data[n]?.objectInfo?.headers,a=t.value.data[n]?.caseInfo?.headers;return e&&r?r:a},VI=e=>Fs[e]>0&&FI[e],BI=(e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:a,fieldsWithWhen:o,isViewsWithWhen:s,interestPage:i,options:c,isMultiRecordData:l,editType:d,isLocalAction:u,interestPageActionID:p}=e,{optionalPayload:h}=c;h&&(t.content={...h});let f={},g={...t},m=Qd.REFRESH;if(r||l&&d===j.ACTION){const t=MI(d,u);l&&d===j.ACTION&&(g.interestPageActionID=p),f=Yg(t,e),g={...g,interestPage:i}}else s?f=((e,t)=>{const{isObjectType:n,isExternalObject:r,actionID:a,context:o}=e;if(t||n&&Wu(o))return Yg(r&&"Create"===a?Qd.REFRESH_EXTERNAL_OBJECT:Qd.REFRESH_CASE_DATA,e);return Yg(Qd.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(a.length>0||o.length>0)&&({restAPI:f,requestBody:g,requestType:m}=((e,t,n,r,a)=>(a={...a,calculations:{fields:t,whens:n}},{restAPI:Yg(r?Qd.RECALCULATE_CASE_DATA:Qd.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:a,requestType:Qd.RECALCULATE}))(e,a,o,n,g));return{restAPI:f,requestBody:g,requestType:m}},GI=[(e,t)=>e.pipe(sd(Qd.REFRESH_DATA,yt),cd((e=>e.payload)),ld((e=>{const{context:n,contextData:r,options:a,isObjectType:o}=e,{propertyName:s="",classID:i="",isObjectWideAction:c}=a,l=Xc(n,{skipUUID:o,isObjectWideAction:c});let d=[],u=[],p=!1;$h.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:d=[],whens:u=[]}=Ku(n)),p=u.some((e=>e.type===jI))):p=!0;const h=u.filter((e=>e.type===UI)),f=qf.getPropertyName(s),g=f?f.split("."):[],m=g.pop(),y=g.join("."),I=[];y&&((e,t,n,r,a)=>{const o=Qh(e,t);if(!o||"copy"!==o.dataRetrievalType)return;const s=qf.getIn(n,`content.content.${e}`);if(!s||"object"!=typeof s)return;const i=r?Object.keys(s).filter((e=>e!==r)):Object.keys(s);i.length>0&&(i.forEach((e=>delete s[e])),a.push(e))})(y,i,l,m,I),e.serverPrecedenceFields=I;let E={...l.content,contextData:r};const A=yl(n);qf.isEmpty(A)||(E=ml(A,E));const C=BI({...e,fieldsWithDeclarativeTargets:d,fieldsWithWhen:h,isViewsWithWhen:p},E);eu.registerBlockingAction(n).catch((()=>{}));const{restAPI:_,requestBody:S,requestType:b}=C;(e={...e,requestType:b}).requestType=b;const{reqType:N,restApi:T}=_,P={...kI(o,t,n)};P&&!P.etag&&e.isMultiRecordData&&e.editType===j.ACTION&&(P.etag=qf.getETag(e.context));return Vo(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if(t.interestPage&&(e.interestPage=t.interestPage),VI(r)){const t=[];for(let n=0;n<FI[r].length;){const a=FI[r][n],o=Yu(a,e);if("CANCEL_REFRESH"===o){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===o&&(t.push(n),a.cancelConfig?.cancel()),n+=1}t.forEach((e=>{FI[r].splice(e,1)}))}const a=zs();return e.signal=a.token,e.cancelConfig=a,FI[r]?FI[r].push(e):FI[r]=[e],_s.publish(j.ON_REFRESH_START,{context:n}),Ws(e.url,e,n,{cancelContext:r}).then((e=>(delete FI[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete FI[r],e}))})({reqHeaders:P,context:n,method:N,body:S,url:zu(e,T)},e)).pipe(cd((t=>{const r=((e,t,n)=>{if(!Ml.isObjectCaseType(t)&&!n)return e;const r=qf.getIn(e?.data,F.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return Ml.isExternalObject(r)?e:L.transformCaseData(e)})(t?.data,a?.classID,o);return a?.resetForm&&ss.removeContextTreeNode(n),{response:{...r},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:Jc(t.headers)}})),md(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),ld((async e=>{if(e&&e.type===Ee)return _s.publish(j.ON_REFRESH_ERROR,{context:e.payload?.context}),eu.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),rl(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:a,serverPrecedenceFields:o,requestType:s}=t,i=ic.getTargetViewContainerName(je),c=Ot(i,a),l={acName:c,context:a},d=Cu(n,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0});d.directUrlUpdation=!1,s===Qd.REFRESH&&await Zc(d,t,l);const u={target:c,context:a};let p=Cl.getStateMachinesByContext(a)||{};const h=Qc(d,u);t.interestPage&&(h.interestPath=`caseInfo.content${qf.convertClipboardPageToPageRefNotation(t.interestPage)}`),p={...p,...Cl.getUnConnectedStateMachines(a)||{}},Object.keys(p).forEach((e=>{if(qf.hasIn(h.data,e)){const t=qf.getIn(h.data,e),n=xf(e,void 0,a),r=ss.getContextReferences(a)?.get(e);((e,t,n,r,a)=>Array.isArray(e)&&Array.isArray(t)&&t.length!==e.length&&"Multiselect"!==n&&"Attachment"!==n&&(!r.interestPath||a.startsWith(r.interestPath)))(t,n,r?.props?.componentName,h,e)&&Cl.setStateMachineEmpty(a,e)}})),h.isArrayDeepMerge=t.options?.isArrayDeepMerge,h.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const f=Ml.getPropertiesToReArrange(a),g=vg(ng,h,{serverPrecedenceFields:o,propertiesToReArrange:f});return Cl.registerForServerChanges(),vf(g),oc.resolveActionByID(r,h),Cl.unRegisterForServerChanges(),eu.deRegisterBlockingAction(a).catch((()=>{})),_s.publish(j.ON_REFRESH_COMPLETE,{context:a}),[]})))],WI=[e=>e.pipe(sd(nt),ld((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const o=e.payload.datapages[a];if(o.mode===j.READONLY&&o?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=o?.refreshStrategy||{},n=Rf()?.[o.name];if(n&&a in n){const r=n[a],{loadTime:o}=r;if(!Nd.isTimeElapsed(o,e,t))return}}return Nd.getData(o.name,{dataViewParameters:o.dataViewParameters},t).then((e=>{const t=o.mode===j.READONLY?r:n;t[o.name]?t[o.name][a]={pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[o.name]={[a]:{pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const o=[];return Object.keys(n).length&&o.push(ng({context:t,data:n})),Object.keys(r).length&&o.push(Rg({data:r,context:t})),vf(o),[]})))];class HI{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>n.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId())switch(e.data.action){case HI.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case HI.LOAD_PREVIEW:this.loadPreview(e);break;case HI.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case HI.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case HI.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case HI.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case HI.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case HI.CANCEL_CASE:this.handleCaseCancel();break;case HI.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(_s.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=Fp(F.APP.APP),t=e[e.length-1],n=Rp(t),r=Df(n)?.caseInfo?.ID;if(r&&n&&xu({}).getPConnect().getActionsApi().getDescendants(r,n),Mc(n)){const e=mh(n);e&&xu({}).getPConnect().getActionsApi().getDescendants(r,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){xu({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=xu({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",a=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(a,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:a,uniqueId:o}=e.data;if(o!==this.getUniqueId())return;let s=r;r===HI.OPEN_WORK_ITEM&&(s=HI.OPEN_WORK_BY_HANDLE),Dh.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:s,name:a});xu({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),a,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){xu({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:F.PRIMARY,context:F.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;xu({meta:{},options:{context:Mp(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;xu({meta:{},options:{context:Mp(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:r,caseInitProperties:a}=e.data;if(n===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,n=xu({meta:{},options:{context:Mp(e)}}),o=new URLSearchParams((a+r).slice(1)),s=this.setStartingFields(o);n.getPConnect().getActionsApi().createWork(t,{startingFields:s})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),_s.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),_s.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{_s.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),_s.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:HI.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:HI.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:HI.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const qI=new HI,zI="nextAssignmentInfo",YI="nextAssignmentInfo.context",KI=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||ic.getTargetViewContainerName(We)},JI=e=>kp(e)?{continueExecution:!0,removeActionPayload:{}}:cl(e),XI=e=>{const t=qf.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return Fl(t)&&jl($h.getOperatorIdentifier(),t)},QI=(e,t)=>{const{class:n,context:r,viewType:a=Yc.PAGE}=e,{removeActionPayload:o}=t;let s=e?.pageName?e?.pageName:$h.getDefaultCasePage();return e.isTraditionalUICase&&(s="pyDetails"),Vo(Bi.createCase(n,{...e,pageName:s,viewType:a,context:r})).pipe(cd((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),md("Error occurred during ajax call at createWork Epic : ",r))},ZI=e=>{_s.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},eE=e=>{_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},tE=e=>{let t=0,n=[],r={},a=!1;return e.pipe(sd(Zf),yd(100),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{context:n}=e,r=KI(e),o=Ot(r,n),{continueExecution:s,removeActionPayload:i}=JI(o);return a=Uc(e.class),s?(e.isTraditionalUICase=a,QI(e,{removeActionPayload:i})):(oc.rejectActionByID(t),gd())})),ld((async e=>{if(e&&e.type===Ee)return e.payload.context=dh(),n.push(rl(e)),n;const{actionInPayload:o,response:s,headers:i,removeActionPayload:c}=e;let l;l=!(o.renderInline||$h.getDefaultCasePage()||a)&&XI(s),qf.setIn(s.data,F.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const d=KI({...o,isInCreateStage:l}),u=Ot(d,o.context),p=ol(u,d,o.context);if(!bc(d)&&kp(u)){const{continueExecution:e}=cl(u);if(!e)return oc.rejectActionByID(t),gd()}if(!(o?.openCaseViewAfterCreate??!0)&&!l){const e=xc(s),{businessID:t,caseType:a,resolvedURL:o}=mc(s);return r={id:t,label:a,href:o},ZI(r),eE({caseId:t,assignmentId:e,caseType:a}),n}const h=Cu(s),f=String(vc($c(h)));let g=qg("createWork",{caseClassName:Dc(h)});g=g.replace(/{.+?}/,f),h.semanticURL=g,rc.setComponentCache(f,Ms.addDebugHeaders(o.debugInfo)),((e,t)=>{const n=XI(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t,o=a&&!kc();qf.setIn(e,["directUrlUpdation"],(!n||o)&&!r)})(h,o);const m={acName:u,context:p},y=Gc(p);await Zc(h,o,m);const I={target:u,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,currentCaseViewMode:y,assignmentContext:qf.getIn(h,YI),nextAssignmentInfo:qf.getIn(h,zI),resourceType:F.CASE,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};Lc(I,h);const E=Qc(h,I);a&&(E.data.caseInfo.content.coexistenceAction="openAssignment"),Ml.setTraditionalGadgetId(E.data);const A=al(u,E);return sl(A)&&wc(n,{removeActionPayload:c,target:u}),n.push(A),pl(n),n})),cd((()=>{const e=kc(),o=Fl(qf.getIn(n[0]?.payload,"data.caseInfo"));return a&&e&&o?qI.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,gl,n):gl(n),jc(n,t),r={},n=[],n})))},{RESOURCE_TYPES:nE}=F,rE=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:o}=e,s=Oc(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(s)&&e?.stageID===s.stageID?Yc.PAGE:n||(!Sc(r)&&!Sc(a)||o?Yc.PAGE:Yc.FORM)},aE=(e,t,n,r,a)=>{if(wc(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=Rp(t);let r=null;return n&&(r=Cp(t,n)),r?.key===e&&Vp(t)})(r.key,n))r.context=Mp(n),r.containerItemID=r.context,e.push(vg(Ng,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=Kp(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(vg(Ng,r))}else{const t=Kp(r.context),n=Tp(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(vg(Ng,r))):e.push(vg(dg,r))}},oE=(e,t,n,r,a,o,s)=>{kp(t)&&Bp(t)?((e,t,n,r,a)=>{rE(e,t)===Yc.FORM?(n.caseViewMode=r||j.PERFORM_MODE,a.push(vg(mg,n))):a.push(vg(Ng,n))})(r,a,e,o,n):aE(n,s,t,e,r)},sE=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:s})=>Ws(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...Ms.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:o?s:""}),iE=(e,t)=>{const n=rE(e),{headers:r,context:a,assignmentID:o,isGetNextWork:s,debugInfo:i,isOpenStage:c,stageID:l,caseID:d,jsActionQueryParams:u,isLastStepInCreateStage:p}=e;let h,f;({restApi:h,reqType:f}=s?Yg("getNextWork",{viewType:n}):c?Yg("openStage",{caseID:d,stageID:l}):Yg(Ge,{assignmentID:o,viewType:n}));const{removeActionPayload:g}=t,m=$h.getDefaultCasePage();let y="",I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),y=m?`${h}?viewType=${n}&pageName=${m}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{y+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=Jc(t,e.remoteClassName)),t})(e);return Vo(sE({restUrl:y,reqType:f,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:"404"})).pipe(cd((e=>{if($h.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return Fl(e.data.data.caseInfo)?e:(y=I?y.replaceAll(I,"pyDetails"):y,$h.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:y})}return e})),ld((e=>e?.isReloadWithDifferentViewTypeRequired?sE({restUrl:y,reqType:f,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:"404"}):hd(e))),cd((t=>{const{key:a,flowName:s}=tl(o);return L.analyseResponse(t),{response:{...t.data,key:a,flowName:s},actionInPayload:e,viewType:n,removeActionPayload:g,headers:Jc({...r,...t.headers})}})),md("Error occurred during ajax call at openAssignment Epic : ",a))},{RESOURCE_TYPES:cE}=F,lE=e=>{const t="Browser"===$h.getRuntime();let n=0,r=[];const a=[];let o=!1,s=!1;return e.pipe(sd(Yl),cd((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),ld((e=>{o=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Yc.FORM:rE(e),e.viewType=r;const a=Cc(Ge,e),i=Ot(a,t),{activate:c,activateContainerActionPayload:l}=dl(cE.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return hd({type:Re,activateContainerActionPayload:l,actionInPayload:e});const d=Rp(i);let u;u=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:d?cl(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=u;return p?(s=Uc(e.className),e.isTraditionalUICase=s,$h.isWSSPortal()&&(e.headers={...e.headers,[j.X_ORIGIN_CHANNEL]:"WSS"}),iE(e,{removeActionPayload:h})):(oc.rejectActionByID(n),gd())})),ld((async e=>{if(e?.type===Ee){if(o){const{payload:t}=e,{err:n}=t,r=n.response.status;a.push({status:Number(r)})}return r.push(rl(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:d,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Yl,a=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const o={type:t,payload:{...n,caseID:a,headers:l}};return r.push(o),r}const{context:p,caseViewMode:h,debugInfo:f}=n,g=i?.data?.caseInfo?.caseTypeID;s=Uc(g),n.isTraditionalUICase=s;let m=((e,t)=>{const n=Oc(e);let r;r=!$h.getDefaultCasePage()&&Fl(n);const{isChild:a,containerName:o,isTraditionalUICase:s}=t,i=a&&r,c=r&&!t.isActionFromToDoList;return!i&&!c||s?o||Cc(Ge,t):j.MODAL})(i,n);s&&(m=n.containerName??m);const y=Ot(m,p);if(t===Re)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:o,insKey:s}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,d=wp(a);await Zc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:d}),e.push(vg(Ag,{containerItemID:a,target:i,isParallelAssignment:o,insKey:s,resourceType:nE.CASE,context:d,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,u,{actionInPayload:n,target:y}),pl(r),r;const I=i?.data?.caseInfo?.content,E=i?.data?.caseInfo?.ID,A=i?.uiResources?.root?.config?.name,C=i?.uiResources?.root?.config?.context;I&&!I.pyViewName&&A&&"page"!==n.viewType&&(qf.setIn(I,"pyViewName",A),qf.setIn(I,"pyViewContext",C));const _=Cu(i);((e,t)=>{const n=Oc(e),r=$c(e),a=Fl(n),{skipBrowserSemanticUrlUpdate:o=!1,viewType:s,isTraditionalUICase:i}=t,c=i&&!kc(),l=s===Yc.PAGE&&(!a||c)&&!o,{caseTypeID:d}=n;if(l){const t=qg(Be,{caseClassName:d}).replace(/{.+?}/,String(vc(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(_,n);const S=ol(y,m,p),b=n.debugInfo||{};b?.debugId||(b.debugId=Ms.getCoreHeadersFromContext(p)?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]),b&&b.debugId&&rc.setComponentCache(E,Ms.addDebugHeaders(b));const N={acName:y,target:y,context:S};await Zc(_,n,N);const T={target:y,context:S,containerItemID:S,headers:l,parentContext:W(n?.context),isMinimizable:Fl(qf.getIn(_,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:F.ASSIGNMENT,debugInfo:f};Lc(T,_,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const P=Qc(_,T);var O;return n.isProcessAction&&(P.data.isProcessAction=n.isProcessAction),s&&(P.data.caseInfo.content.coexistenceAction="openAssignment"),Ml.setTraditionalGadgetId(P.data),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,P),oE(P,y,r,n,i,h,d),((e,t)=>{if(e=V.getRemoteCaseClassBySourceClass(e)??e,V.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:r,name:a}=V.getRemoteCase(e);if(t.headers?.RemoteSystemID||oc.setRemoteCaseHeaderByContext(t,r),V.isTraditionalRemoteCase(e)){t.assignmentID=t.assignments?.[0]?.ID;const r={className:e,name:a,action:Et,remoteClassName:n};oc.setTraditionalRemoteCaseParams(t,r)}}})(g,P.data.caseInfo),c===Yc.FORM&&Mc(P.containerItemID)&&fl(P,r,C),pl(r),O={actionInContext:p,assignmentID:n.assignmentID,caseKey:P.key},_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,O),r})),cd((()=>{const e=n,t=kc(),o=Fl(qf.getIn(r[0]?.payload,"data.caseInfo"));return s&&t&&o?qI.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,vf,r):vf(r),jc(r,e,a),r[0]?.payload?.isParallelAssignment&&vf({type:Yl,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},dE=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:o,viewType:s}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:$h.getDefaultCasePage(),l=Yg(Be,{caseID:n,params:{pageName:c}});let{restApi:d}=l;const{reqType:u}=l;return"none"===s&&(d=`${d?.split("viewType")[0]}viewType=none`),Vo(Ws(d,{method:u,headers:{...r,...o&&{...Ms.addDebugHeaders(o)}}},a)).pipe(cd((t=>(L.analyseResponse(t),{response:t.data,actionInPayload:e,headers:Jc({...r,...t.headers}),removeActionPayload:i}))),md("Error occurred during ajax call at openWorkByHandle Epic : ",a))},uE="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:pE}=F,hE=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:o,response:s,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:d,debugInfo:u}=r,p=Cc(Be,r),h=Ot(p,l);if(Nc(o))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:o,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:i}}=t,c=Cc(Be,a),l=Ot(c,o),d=wp(r);await Zc({directUrlUpdation:!s,semanticURL:n},a,{acName:l,containerName:c,target:l,context:d}),e.push(vg(Ag,{containerItemID:r,target:l,context:d,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const a=ol(h,p,l,{buildNew:!0}),o=Cu(s),f=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=$c(e),o=n?r:Dc(e);let s=qg(Be,{caseClassName:o},{id:t?.insKey});return s=s?.replace("{workID}",String(vc(a)))?.replace("{id}",t?.insKey),s})(o,r);o.semanticURL=f,o.directUrlUpdation=!d;const g={acName:h,context:a};await Zc(o,r,g);const m=Qc(o,{target:h,context:a,containerItemID:a,semanticURL:f,headers:c,debugInfo:u});m.caseViewMode=j.REVIEW_MODE,m.resourceType=pE.CASE,n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle",m.data.caseID=m.data.caseInfo.ID),Ml.setTraditionalGadgetId(m.data),Lc(m,o,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=Gc(e?.actionInPayload?.context);const y=al(h,m);i.containerItemID&&sl(y)&&t.push(vg(_g,{containerItemID:i.containerItemID,target:h})),t.push(y)}pl(t);const f=r.insKey;Ec({caseKey:f,actionInContext:l})},fE=e=>{let t=0,n=[];return e.pipe(sd(uE),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{context:n,isChild:r,viewType:a}=e,o=Cc(Be,e),s=Ot(o,n);let i,c=!0;if("none"!==a){const e=cl(s);c=e.continueExecution,i=e.removeActionPayload}if(!c)return oc.rejectActionByID(t),gd();const{activate:l,activateContainerActionPayload:d}=dl(pE.CASE,s,e);return l&&!r&&"none"!==a?(Il(d),hd({type:Re,activateContainerActionPayload:d,actionInPayload:e})):dE(e,{removeActionPayload:i})})),ld((async e=>{if(e&&Tc(e.type))return n.push(rl(e)),n;const t=Df(e?.actionInPayload?.context),r=Uc(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Cu(e?.response),a={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:st,payload:{context:a.context,doDeleteConfirmationDetails:!1}}),r&&a.data.caseInfo?.content&&(a.data.caseInfo.content.coexistenceAction="openWorkByHandle",a.data.caseID=a.data.caseInfo.ID),Ml.setTraditionalGadgetId(a.data),n.push(vg(ng,a));const o=Kp(e?.actionInPayload?.context),s=_c(e?.actionInPayload?.context),i=Object.freeze({target:o,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(Mc(e?.actionInPayload?.context)){const t=Qc(e?.response,{...i});fl({...t,isArrayDeepMerge:!0},n)}}}else await hE(e,n,r);return n})),cd((()=>(vf(n),jc(n,t),n=[],n))))},gE="FINISH_ASSIGNMENT",{RESOURCE_TYPES:mE}=F,yE=(e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:o,isModalAction:s}=t;if(o&&s){const t=_c(n),o=Ot(t,r);e.push(vg(Ag,{containerItemID:n,target:o,actionMgrID:a}))}},IE=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:o}=t,s=wp(n),i=`${s?.includes("root")?j.APP.ROOT:j.APP.APP}/${yp.MODAL}`;e.push(vg(_g,{containerItemID:n,context:s,target:i,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:o}))},EE=e=>xf(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,AE=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r,a,o)=>{const{caseID:s}=n,i=(c=t,qf.getIn(c,Ac.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var c;const l=a?uc(t):Dc(t),{caseViewMode:d,headers:u,semanticURL:p,actionMgrID:h,directUrlUpdation:f,key:g,flowName:m,resourceType:y}=r,I=Kp(n?.context),E=Cp(I,n?.context)?.acTertiary;Object.assign(o,{caseId:s,assignmentId:i,caseType:l,isSubmitFromBlendedUI:E}),IE(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${yp.PRIMARY}`,C=ol(A,yp.PRIMARY),_=Ms.getCoreHeadersFromContext(n.context)||!1,S=Qc(t,{target:A,context:C,containerItemID:C,caseViewMode:d,headers:u,semanticURL:p,key:g,flowName:m,resourceType:y,directUrlUpdation:f,debugInfo:_&&_.debugInfo&&{debugId:_.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(kp(A)){const t=Df(C),a=$c({data:t}),[,o]=a?a.split(" "):[],s=`You will lose unsaved changes for ${o}. Do you want to continue?`;if(!EE(n.context))return e;{const{continueExecution:t}=cl(A,{dirtyMessage:s});if(!t)return r.directUrlUpdation=!1,oc.rejectActionByID(h),gd();S.currentCaseViewMode=Gc(S?.context),e.push(vg(Ng,S))}}else e.push(vg(dg,S));return t.directUrlUpdation=f,t.semanticURL=p,await Zc(t,{...S,acName:A},{acName:A,context:C}),e},CE=(e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===we));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=Sg({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)},_E=e=>/^app\/preview_[0-9]*/g.test(e),SE=(e,t)=>{const n=W(e);return!_E(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},bE=e=>{if(!EE(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}},NE=(e,t,n,r)=>{const{data:a,caseViewMode:o}=t,s={data:a,caseViewMode:o,context:n};if(qf.setIn(s.data,["context_data","caseViewMode"],o),e.push({type:st,payload:{context:n}}),r){const t={data:L.transformObjectToCase(a),caseViewMode:o,context:n};e.push(vg(ng,t))}e.push(vg(ng,s))},TE=async(e,t,n,r,a,o,s,i,c,l)=>{const{headers:d}=c,u=l?j.OBJECT_INFO.OBJECT_INFO:j.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=Df(e),r=c?.response?.data?.caseInfo?.assignments??[],a=n?.caseInfo?.assignments??[],o=Gc(e)===j.PERFORM_MODE,s=r[0]?.ID!==a[0]?.ID,i=r.length>0&&a.length>0;o&&s&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(r,a[0]?.ID))}const p=kp(Kp(e));let h=!1;const f=Kp(n),g=Ap(f),m=Rp(f);m&&g?.items?.[m]?.key===c?.actionInPayload?.caseID&&(h=!0),IE(a,{...r,skipReleaseLockRequest:!0});const y=_c(e),I={target:Kp(e),containerItemID:e,context:e,containerName:y};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const E=J(n),A=Df(E),C=Df(r.context),_=A[u]?.ID,S=C[u]?.ID,b=Df(e)?.caseInfo?.ID;if(p&&_===S||!p&&(""===s||I.containerItemID.includes(j.WORKAREA)&&"review"===t.caseViewMode||!o&&t.root&&0===Object.keys(t.root).length&&b===t.data?.caseInfo?.ID))(void 0===t?.data[u]?.content||void 0!==t.data[u].content&&"object"==typeof t.data[u].content&&0===Object.keys(t.data[u].content).length)&&(t.root=void 0,delete t.data?.caseMessages),e.includes(j.WORKAREA)&&t.caseViewMode===j.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,r=t?.data?.caseInfo?.assignments??[],a=r[0]?.ID;return n!==a})(r,i)&&(t.flowName=" ",t.clearView=!0),a.push(vg(mg,{...t,key:s,resourceType:"",...I}));else if(o){const o=Kp(e),i=Tp(o,s);if(i)I.target=o,I.context=i,I.containerItemID=i,a.push(vg(mg,{...t,key:s,resourceType:"",...I}));else{const e=Fp(n)[0];if(r.target=e,r.context=ol(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,a.push(vg(dg,{...r,...t}));const n=r.containerItemID;a.push(vg(Ag,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Kp(e),r.containerName=_c(e),r.context=e,r.containerItemID=e,qf.setIn(t,"acName",I.target),await Zc(i,t),h&&(n.includes(j.WORKAREA)&&Mc(n)&&(n=J(n)),NE(a,t,n,l)),!o&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=Kp(e);return Tp(n,t)})(e,s),n={data:{[u]:{headers:d}},context:t};a.push(vg(ng,n)),a.push(Mu(((e,t=!1,n=!1)=>{const r=oc.getNextActionMgrId();return{ID:Jf.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Jf.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{IE(a,r);let e=!1;const s=Kp(n),i=Ap(s),d=Rp(s);if(d&&i?.items?.[d]?.key===c?.actionInPayload?.caseID&&(e=!0),o){const e=Fp(n)[0];r.target=e,r.context=ol(e,j.WORKAREA,n),r.containerItemID=r.context,a.push(vg(dg,{...r,...t}));const o=r.containerItemID;a.push(vg(Ag,{parentContainerTarget:e,containerItemID:o}))}e&&NE(a,t,n,l)}},PE=async(e,t,n,r,a,o,s)=>{const i=o?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(IE(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${yp.PRIMARY}`,a=ol(r,yp.PRIMARY),o={insKey:e.ID,className:e.content.classID,context:a,acTargetName:j.PRIMARY,isChild:!0},s={type:de,payload:{...o}};n.push(s)}})(e.data[i].parentCaseInfo,t,a);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=Kp(t?.context),r=Cp(n,t?.context)?.parentContext,a=Kp(r);t?.isProcessAction&&Np(a,c)&&ph(r,e?.data[i]?.lastUpdateTime)}n.resourceType=mE.CASE,n.directUrlUpdation=!0,t.isProcessAction||await AE(a,{translatedDXAPIResponse:r,actionInPayload:t},n,o,s)},OE=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:o}=t,s=Ml.getPropertiesToReplace(o);a.push(vg(mg,{...e,...r,propertiesToReplace:s})),qf.setIn(e,"acName",r.target),await Zc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,o=wp(a);if(o&&Mc(a)){const t=J(o),s={data:n,caseViewMode:r,context:t};qf.setIn(s.data,["context_data","caseViewMode"],r),e.push({type:st,payload:{context:t}});const i=Ml.getPropertiesToReplace(a);e.push(vg(ng,s,{propertiesToReplace:i}))}})(a,t,e)},vE=async(e,t,n,r,a,o,s,i,c,l={})=>{const{isCaseWideAction:d,isInCreateStage:u,containerItemID:p}=e,h=W(e.context),f=Rc(a,c),g=c?uc(a):Dc(a),m=u&&!f&&!d,y=Fp(h)[0],I=y?Rp(y):h,E=_c(p),A=wp(p),C=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:E});m&&!_E(e.context)?await PE(i,e,t,a,o,c,l):SE(e.context,I)?await TE(I,t,h,e,o,n,r,a,s,c):!d&&!c||SE(e.context,I)?await OE(t,e,a,C,o):(IE(o,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,o=W(r),s=wp(o);e.push(vg(ag,{containerItemID:o,context:s,container:yp.PREVIEW,containerName:yp.PREVIEW,caseId:a,viewName:F.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(o,e,{caseClassName:g}))},DE=(e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:o}=t,s=SE(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;yc({caseID:o,isModalAction:r,isModalLaunchedFromPrimaryValue:s,isCaseWideAction:a,stages:i,stageID:c})},RE=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER],a=r.startsWith(".")?r.slice(1):r;if(a){let o=t?`caseInfo.content.${t}`:"caseInfo.content";o=j.getProperty(o.replace(/\(/g,"[").replace(/\)/g,"]"));const s=cs(a,o,j.PROPERTY),i={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};ss.mutateField(n,o,s[s.length-1],{messages:[i],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r})}}))},$E=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:o,additionalHeaders:s={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:d}=t,u=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:a}=e;return t&&r&&!a?Yc.PAGE:n||Yc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?"executeCaseWideActions":"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:a,viewType:u};let{restApi:f}=Yg(p,h);const{reqType:g}=Yg(p,h);u&&!f?.includes("viewType=")&&(f=f?.includes("?")?`${f}&viewType=${u}`:`${f}?viewType=${u}`),i&&!f?.includes("outcome")&&(f=f?.includes("?")?`${f}&outcome=${i}`:`${f}?outcome=${i}`),f=Wl(c,f),e.viewType=u;const{content:m}=Xc(o),y=d.value.data[o]?.caseInfo?.headers||{},{etag:I}=y,E={"if-match":I,...l,...s};return Vo(Ws(f,{method:g,body:m,headers:E},o)).pipe(cd((t=>{const{data:n,headers:r}=t;return L.analyseResponse(n),{response:n,actionInPayload:e,headers:Jc({...E,...r})}})),md("Error occurred during ajax call at finishAssignment Epic : ",o))},xE=e=>{_s.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},wE=e=>{_s.publish(j.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:ME}=F,LE=(e,t)=>{let n=0,r=[],a={},o="",s={},i=!1,c=!1;return e.pipe(sd(gE),ld((e=>{const l=$h.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),o=e.payload.context,hs({context:o,stateObj:Df(o),clearContextMessages:!0}),!Rl(o)||Is(o)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,t),eu.handleDeferredActionCompletion(e.payload.context).then((()=>{wE({errorType:F.ERROR_TYPE.CLIENT})})),hd([])}return hd(e.payload).pipe(ld((e=>{yE(r,e);const n={...e};return $E(n,{state$:t})})),ld((async e=>{if(e&&e.type===Ee){Hl(e);const t=rl(e);return r.push(t),r}zd.clearContextedCache(o);const{headers:t,actionInPayload:d,response:u}=e,{containerItemID:p,context:h=wp(p),isModalAction:f,isInCreateStage:g}=d;i=d.isCaseWideAction,c=d.isProcessAction;const m=Kp(p);d.target=m;const y=_c(p),I=Object.freeze({target:d.target,containerItemID:p,context:h,containerName:y});qf.setIn(u.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),qf.setIn(u.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),u?.uiResources?.root?.config?.name&&"page"!==d.viewType&&qf.setIn(u.data,j.CASE_INFO.VIEW_NAME,u?.uiResources?.root?.config?.name),xE({submitResponse:u});let E=Cu(u,{[F.STOPMERGEACTIONS]:!u.nextAssignmentInfo});const A=Dc(E),C=W(d.context),_=Fp(C)[0]?Rp(Fp(C)[0]):C,S=Rc(E),b=g&&!S;!f||g||SE(d.context,_)||(E=ul(E,Df(p)));const N=Qc(E,{headers:t,actionMgrID:n,directUrlUpdation:!1});let T,P;Fc(N.data,d),N.caseClassName=A,N.resourceType=ME.ASSIGNMENT,N.headers=t;const O=E?.data?.caseInfo?.assignments?.some((e=>e.ID===d.assignmentID)),v=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(E,d),D=((e,t,n,r,a)=>{let o;const s=Kp(t);return o=Vp(s)?Tp(s,n.data?.caseInfo?.ID):Rp(s),r&&e&&wf(null,j.CASE_VIEW_MODE_PROP,o)===j.PERFORM_MODE&&a})(O,_,E,f,v),R=d?.actionID===F.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(E?.data?.nextAssignmentInfo&&!R)N.caseViewMode=j.PERFORM_MODE,T=$c(E),P=!0;else if(D&&!R)E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM?N.caseViewMode=j.REVIEW_MODE:N.caseViewMode=j.PERFORM_MODE,T=$c(E),N.flowName=" ",N.deleteAssignmentSpecificResources=!1,P=!1;else{N.caseViewMode=j.REVIEW_MODE;const e=kp(Kp(_));T=E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM&&!e?$c(E):"",P=!1}const $=$c(E);Lc(N,E,{skipFlowNameUpdate:N?.caseViewMode===j.REVIEW_MODE||D});const x=qg("createWork",{caseClassName:A}).replace(/{.+?}/,String(vc($)));if(E.semanticURL=x,N.semanticURL=x,f?(await vE(d,N,P,T,E,r,e,u,!1,s),b&&(a=bE(d))):g&&l&&!S?($h.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:yp.PRIMARY,targetContainerName:yp.PRIMARY,viewType:Yc.PAGE,isLastStepInCreateStage:!0,context:n},a={type:fe,payload:{...r}};t.push(a)})(u,r,W(h))):await OE(N,d,E,I,r),Bc(e,r),eu.handleDeferredActionCompletion(o).catch((()=>{})),DE(N,d,_),!E?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:$c(e),assignmentID:n?null:r,actionID:a||null}})(E,d);Ic({...e,containerItemID:p})}return CE(r,{transientItemID:p,target:m,isModalAction:f}),r})),cd((()=>{const e=r.find((e=>e.type===Ee));var t;return e?(eu.handleDeferredActionCompletion(o).then((()=>{wE({errorType:F.ERROR_TYPE.SERVER})})).catch((()=>{})),RE(e),oc.rejectActionByID(n)):oc.resolveActionByID(n,a),s?.caseId&&(t=s,_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)),gl(r),(i||c)&&(e=>{_s.publish(j.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0}),r=[],a={},s={},r})))})))},FE="CANCEL_ASSIGNMENT",jE=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:o,RemoteSystemID:s}=e;s&&(t.RemoteSystemID=s);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=Yg(i,{ID:a,caseID:a,viewType:Yc.PAGE}),d=rc.getComponentCache(a),u=d&&"object"==typeof d?d:{};return Vo(Ws(c,{method:l,headers:{...t,...u}},o,{includeRemoteSystemIdIfPresent:!!s})).pipe(cd((t=>(rc.resetComponentCache(a),r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:Jc(t.headers)}))),md(": Error occurred during ajax call at release lock request : ",o))},UE=(e,t)=>{const{isModalAction:n}=t;return jE({routeKey:"cancelAssignment",isModalAction:n,...e})},kE=e=>{let t=0,n=[];return e.pipe(sd(FE),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{isModalAction:n}=e;e.context||(e.context=wp(e.containerItemID));const{context:r}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?yp.MODAL:_c(n)})(e),o=Ot(a,r),{continueExecution:s}=cl(o);return s?(e.RemoteSystemID=V.getRemoteHeaderByContext(e.context)??void 0,Vo(UE(e,{isModalAction:n}))):(oc.rejectActionByID(t),gd())})),ld((e=>{if(e&&e.type===Ee)return n.push(rl(e)),Vo([n]);const{actionInPayload:r,response:a}=e,{containerItemID:o,isModalAction:s,isInCreateStage:i}=r;a?.data.caseInfo&&(a.data.caseInfo.availableProcesses=a.data.caseInfo.availableProcesses??[]);const c=Kp(o),l=wp(o),d={target:s?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:o,caseViewMode:s?j.PERFORM_MODE:j.REVIEW_MODE,context:l,actionMgrID:t,key:$c(a),skipReleaseLockRequest:!1};return i&&n.push(vg(mg,d)),!s&&Mc(o)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:a,response:o}=t,s=W(n),i={context:wp(s),data:{...o.data,referencedUsers:a,context_data:{caseViewMode:r}}};o?.data?.caseInfo&&(o.data.caseInfo.assignments??=[]),e.push(vg(ng,i))})(n,{childContainerItemID:o,caseViewMode:j.REVIEW_MODE,referencedUsers:a?.data.referencedUsers,response:a}),d.skipReleaseLockRequest=!0,n.push(vg(_g,d)),Vo([n])})),cd((()=>(vf(n),jc(n,t),n=[],n))))},VE="NAVIGATE_TO_STEP",BE=(e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:o=wp(a),isInCreateStage:s}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:s?Yc.PAGE:Yc.FORM},{restApi:l,reqType:d}=Yg("navigateToStep",c),{content:u}=Xc(o),p=i.value.data[o].caseInfo.headers;return Vo(Ws(`${l}`,{method:d,body:u,headers:{"if-match":p&&p.etag}},o)).pipe(cd((t=>({response:t.data,actionInPayload:e,headers:Jc({...p,...t.headers})}))),md("Error occurred during ajax call at navigateToStep Epic : ",o))},{RESOURCE_TYPES:GE}=F,WE=(e,t)=>{let n=0,r=[];return e.pipe(sd(VE),id((e=>(({actionMgrID:n}=e.payload),hd(e.payload).pipe(ld((e=>(ys(e.context),BE(e,{state$:t})))),ld((async e=>{if(e&&Tc(e.type))return r.push(rl(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:o,context:s=wp(o),isModalAction:i}=t;zd.clearContextedCache(t.context);const c=Kp(o),l=_c(o),d=Object.freeze({target:c,containerItemID:o,context:s,containerName:l}),u=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name,h=n?.uiResources?.root?.config?.context;u&&!u.pyViewName&&p&&"page"!==t.viewType&&(qf.setIn(u,"pyViewName",p),qf.setIn(u,"pyViewContext",h));const f=Cu(n),g={acName:c,...d};await Zc(f,t,g);const m=Qc(f,{...d,headers:a});n?.nextAssignmentInfo||(m.caseViewMode=j.REVIEW_MODE),Bc(e,r),m.doDeleteCaseSummary=t.doDeleteCaseSummary,m.resourceType=GE.ASSIGNMENT,Lc(m,f),Fc(m.data,t);const y=f.data?.caseInfo?.stages,I=f.data?.caseInfo?.stageID;return yc({caseID:$c(f),isModalAction:i,stages:y,stageID:I}),Mc(o)&&fl(m,r),r.push(vg(mg,m)),pl(r),r})),cd((()=>(vf(r),jc(r,n),r=[],r))))))))},HE=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=Yg(qe,{ID:t});return Vo(Ws(r,{method:a},n)).pipe(cd((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Jc(t.headers)}))),md(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},qE=e=>{_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},zE=(e,t)=>{let n,r=0,a=[];return e.pipe(sd(Kl),cd((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),ld((e=>e.ignoreCaseDeletion?hd({actionInPayload:e}):HE(e))),ld((async e=>{if(e&&Tc(e.type)){const{payload:t}=e,n=rl({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:o,isModalAction:s}=n,i=s?yp.MODAL:yp.PRIMARY,c=Ot(i,o);if(!s&&c){const e={acName:c,target:c,context:o},r=t.value.containers[c],{semanticURL:a}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await Zc({directUrlUpdation:!0,semanticURL:a},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:j.PRIMARY,isChild:!0},t={type:de,payload:{...e}};a.push(t)}const l={target:c,containerItemID:o,context:o,caseDeleted:!0};return a.push(vg(_g,l)),a})),cd((()=>(vf(a),jc(a,r)===j.PROMISE_VALUE.RESOLVE&&qE({caseType:n}),a=[],a))))};function YE(e,t){return Ya(t)?ld(e,t,1):ld(e,1)}const KE=(e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:o,reqType:s}=Yg("save",{assignmentID:n,actionID:r}),{content:i}=Xc(a),c=t.value.data[a]?.caseInfo?.headers;return Vo(Ws(o,{method:s,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(cd((t=>({response:t.data,actionInPayload:e,headers:Jc(t.headers)}))),md(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))},JE=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let o=[];return hd(n.payload).pipe(ld((e=>KE(e,r))),YE((e=>{if(e&&Tc(e.type))return hd(e);const{containerItemID:t}=e&&e.actionInPayload,r=W(t),a=Kp(r),s=Ap(a),i=Fp(r)[0];let c=i?Rp(Fp(r)[0]):r;if(!kp(Kp(c))){const t=Ap(i);t?.accessedOrder.forEach((n=>{e.actionInPayload.caseID===t.items[n].key&&(c=t.items[n].context)}))}const l=Rp(a);n.payload.canUpdateAvailableActions&&Au(e.response);if(c&&o.push(vg(ng,{context:c,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}})),s?.items?.[l]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},a=Ml.getPropertiesToReplace(t);o.push(vg(ng,n,{propertiesToReplace:a}))}return o.push(vg(mg,{context:t})),Bc(e,o),jE({...e.actionInPayload,RemoteSystemID:V.getRemoteHeaderByContext(e.actionInPayload.context)??void 0})})),ld((async n=>{if(n&&Tc(n.type)){const{payload:t}=n,r=rl({...n,...t,actionMgrID:a});o.push(r);const s=e.action.payload.modalLoadingContainer;if(s){const e=s.context,{context_data:t}=Df(e)||{};t?.isLoading&&Jp(e)}return o}const{actionInPayload:r}=n,{context:s,containerName:i}=r,c={target:Ot(i,s),containerItemID:s,context:s};return t||o.push(vg(_g,c)),o})),cd((()=>{var e;return vf(o),jc(o,a),e={context:n.payload.context,assignmentID:n.payload.assignmentID},_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e),t||(o=[]),eu.isDeferredActionInProgress(n.payload.context)&&eu.handleDeferredActionCompletion(n.payload.context),o})))},XE=(e,t)=>{let n,r=0;return e.pipe(sd(Jl),id((e=>{const{saveOnly:a}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return JE({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},QE=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",_s.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",_s.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:ZE}=j,{RESOURCE_TYPES:eA}=F,tA=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:o,openActionType:s,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,d=l?Ye:(e=>{const t=e.localActionType.toLowerCase();return t===ZE.CASE_WIDE||t===ZE.EXPRESS?Ke:ze})(e),u=Yc.FORM,{reqType:p}=Yg(d,{caseID:a,ID:r,actionID:n,viewType:u});let{restApi:h}=Yg(d,{caseID:a,ID:r,actionID:n,viewType:u});e.actionType=d===Ke?j.CASE:j.ASSIGNMENT,h&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${u}`:`${h}?viewType=${u}`);const f=i?.context??o;return Vo(Ws(h,{method:p,headers:c},f)).pipe(cd((t=>({response:t.data,actionInPayload:e,headers:Jc(t.headers,"",e.headers)}))),md(`: Error occurred during ajax call at ${s} Epic : `,f))},nA=(e,t)=>{const{isProcessAction:n}=t,r=n?Ye:ze;e.openActionType=r;let a;if("modal"===Cc(r,e)){a=Fp(e.contextName)[0]?Fp(e.contextName)[0]:Kp(e.contextName);const n=a?Rp(a):e.contextName,r=wp(n),o=Cc(e.openActionType,e),s=Ot(o,e.context),i=K(e.context,H(o,e.context));if(vf(dg({target:s,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),vf(yg({context:i})),e.modalLoadingContainer={target:s,context:i},!Fp(e.contextName)[0])return tA(e,t);if(!e.continueExecution)return tA(e,t);if(!lp(r))return tA(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return Vo([Xl(e.saveActionPayload)]).pipe(ld((e=>(e=>{let t,n=0;const r=[],a={value:Of()?.getState()};return hd(e).pipe(sd(Jl),id((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),hd([])}return JE({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),ld((n=>{if(1===n.length&&Tc(n[0].type)){const{continueExecution:n}=cl(a);if(!n)return oc.rejectActionByID(e.actionMgrID),fd.pipe(Bo((()=>gd()))).toPromise();if(n)return tA(e,t)}return tA(e,t)})),cd((e=>e)))}return tA(e,t)},rA=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:o,openActionType:s,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Cu(e),d=Cc(s,r),u=c?.target??Ot(d,a);let p,h,f=!1;!Bp(u)||Vp(u)&&!Np(u,e.data.caseInfo.ID)?(h=H(d,a),bc(d)&&(h=K(a,h)),p=h,f=!0):(p=Vp(u)?Tp(u,e.data.caseInfo.ID):Rp(u),h=wp(p));const g={acName:u,target:u,containerName:d,context:h};await Zc(l,r,g),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let y;y=m?j.PERFORM_MODE:j.REVIEW_MODE;const I=Qc(l,{target:u,context:h,containerItemID:p,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:o,isMinimizable:!1,isInCreateStage:bc(d),resourceType:eA.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});let E;if(m&&Lc(I,l),bc(d)&&delete I.doDeleteCaseSummary,r.openActionType===Je&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList),E=f?dg:r.isProcessAction?Ng:mg,I.data.context_data.isProcessAction=r.isProcessAction,t.push(vg(E,I)),f||t.push(vg(Ig,I)),f){const a=Fp(r.contextName),o=Tp(a,e.data.caseInfo.ID);if(o){const e={data:{caseInfo:{headers:n}},context:o};t.push(vg(ng,e))}}return p!==Rp(u)&&t.push(vg(Ag,{target:u,containerItemID:p})),Mc(p)&&!c?.context&&fl(I,t),I.caseViewMode===j.REVIEW_MODE&&t.push(vg(_g,I)),t},aA="OPEN_LOCAL_ACTION",oA=(e,t)=>nA(e,t),sA=e=>{let t=0,n=[];return e.pipe(sd(aA),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>oA(e,{actionMgrID:t}))),ld((async e=>{if(!e)return fd;if(Tc(e.type)){const t=rl(e);n.push(t);const{context_data:r}=Df(e.payload.context)||{};return r?.isLoading&&n.push(vg(Ig,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return qf.setIn(a,"data.caseInfo.activeActionID",o),qf.setIn(a.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&qf.setIn(a.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await rA(a,n,{headers:r,actionInPayload:t}),QE(t),n})),cd((()=>(vf(n),jc(n,t),n=[],n))))},iA=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:o="",bulkContextType:s=""}=e,i=Je,{reqType:c,restApi:l}=Yg(i,{caseTypeID:a,actionID:t,bulkContextID:o,bulkContextType:s});return Vo(Ws(l,{method:c},n)).pipe(cd((t=>({response:t.data,actionInPayload:e,headers:Jc(t.headers)}))),md(`: Error occurred during ajax call at ${r} Epic : `,n))},cA=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",_s.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",_s.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},lA="OPEN_BULK_ACTION",dA=e=>{let t=0,n=[];return e.pipe(sd(lA),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Je;const a=Cc(Je,e),o=Ot(a,n),{continueExecution:s}=cl(o);return s?iA(e):(oc.rejectActionByID(r),gd())})(e,{actionMgrID:t}))),ld((async e=>{if(e&&Tc(e.type)){const t=rl(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return qf.setIn(a,"data.caseInfo.activeActionID",o),await rA(a,n,{headers:r,actionInPayload:t}),cA(t),n})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))};var uA=Array.isArray,pA=Object.getPrototypeOf,hA=Object.prototype,fA=Object.keys;function gA(e){if(1===e.length){var t=e[0];if(uA(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&pA(r)===hA){var n=fA(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var mA=Array.isArray;function yA(e){return cd((function(t){return function(e,t){return mA(t)?e.apply(void 0,Ga([],Ba(t))):e(t)}(e,t)}))}function IA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return Ya(ud(e))?e.pop():void 0}(e),r=gA(e),a=r.args,o=r.keys,s=new _o((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,s=t,i=function(t){var i=!1;Ro(a[t]).subscribe(Mo(e,(function(e){i||(i=!0,s--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(s||e.next(o?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(o,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?s.pipe(yA(n)):s}const EA=e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:o}=Xc(n,{nonEmptyAndChangedData:!0});let s=5;try{const e=qc.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===a))?.pyList.split(",").includes(t)&&(s=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/s,l=Xe,{reqType:d,restApi:u}=Yg(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)o.cases=i.slice(t,t+c),o.cases.length&&p.push(Vo(Ws(u,{method:d,body:o},n)).pipe(cd((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Jc({...r})}})),md("Error occurred during ajax call at submitbulkaction Epic : ",n)));return IA(p)},AA=e=>{_s.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},CA="SUBMIT_BULK_ACTION",_A=e=>{let t,n=0,r=[],a="";return e.pipe(sd(CA),id((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),hd([])}return hd(e.payload).pipe(ld((e=>(t=e,EA(t)))),ld((e=>{let n=0,o=0;const s=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),o+=Number(t.failureCount),o&&t.results.forEach((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{s.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),a=`${n} record(s) updated`,AA({submitResponse:e}),t.target="HYBRID"===$h.getRenderingMode()?Kp(i):`${j.APP.APP}/${yp.MODAL}`,r.push(vg(_g,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),o&&r.push(vg(Cg,{messages:[{type:"error",message:1===o?"1 record failed to update":`${o} records failed to update`,errorDetails:s,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),cd((()=>(oc.resolveActionByID(n,a),vf(r),r=[],r))))})))},SA=e=>{const{actionID:t,context:n,cases:r}=e,{content:a}=Xc(n,{nonEmptyAndChangedData:!0});a.cases=r.map((e=>({ID:e})));const o=Xe,{reqType:s,restApi:i}=Yg(o,{actionID:t,runningMode:"async"});return Vo(Ws(i,{method:s,body:a},n)).pipe(cd((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Jc({...r})}})),md("Error occurred during ajax call at submitbulkaction Epic : ",n))},bA=e=>{_s.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},NA="SUBMIT_BULK_ACTION_ASYNC",TA=e=>{let t,n=0,r=[],a="";return e.pipe(sd(NA),id((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),hd([])}return hd(e.payload).pipe(id((e=>(t=e,SA(t)))),cd((e=>{const n=[],{containerItemID:o,context:s}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),a="Processing bulk actions, please refresh to check completion",bA({submitResponse:i}),t.target=`${j.APP.APP}/${yp.MODAL}`,r.push(vg(_g,{containerItemID:o,context:s,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(vg(Cg,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(s)||s,category:"HTTP",showHeader:!1})),r})),cd((()=>(oc.resolveActionByID(n,a),vf(r),r=[],r))))})))},PA=(e,t)=>nA(e,t),OA=e=>{let t=0,n=[];return e.pipe(sd(zl),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>(ys(e.context),PA(e,{actionMgrID:t,isProcessAction:!0})))),ld((async e=>{if(e&&Tc(e.type)){const t=rl(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await rA(a,n,{headers:r,actionInPayload:t}),n})),cd((()=>(gl(n),jc(n,t),n=[],n))))},vA=e=>{let t=0,n=[];return e.pipe(sd(Se,we),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:o,currentCaseViewMode:s,isProcessAction:i,isInCreateStage:c,deleteWork:l}=e,d=s===j.PERFORM_MODE,u=n&&d;return l?hd([]):i&&c?jE(e):t!==r||a||o||!u?t?.includes(j.MODAL)&&Gc(mh(t))===j.REVIEW_MODE?jE(e):hd([]):jE(e)})),ld((e=>(e&&Tc(e.type)&&n.push(rl(e)),n))),cd((()=>(vf(n),jc(n,t),n=[],n))))};var DA=new Ky(Hy),RA=DA;function $A(e,t,n){void 0===e&&(e=0),void 0===n&&(n=RA);var r=-1;return null!=t&&(dd(t)?n=t:r=t),new _o((function(t){var a,o=(a=e)instanceof Date&&!isNaN(a)?+e-n.now():e;o<0&&(o=0);var s=0;return n.schedule((function(){t.closed||(t.next(s++),0<=r?this.schedule(void 0,r):t.complete())}),o)}))}function xA(e,t){return void 0===e&&(e=0),void 0===t&&(t=DA),e<0&&(e=0),$A(e,e,t)}function wA(e){return wo((function(t,n){var r=!1,a=null,o=null,s=function(){if(null==o||o.unsubscribe(),o=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe(Mo(n,(function(t){null==o||o.unsubscribe(),r=!0,a=t,o=Mo(n,s,oo),Ro(e(t)).subscribe(o)}),(function(){s(),n.complete()}),void 0,(function(){a=o=null})))}))}const MA=(e,t,n,r,a)=>{if(a!==j.RESOURCE_STATUS.CREATE)return;Cl.isStateMachineExist(e,t,n)||Cl.setStateMachine(e,n,t,new li(n,t,e));Cl.getStateMachine(e,t,n).insert({},"string"==typeof r?r:r+1,!0,{isDefault:!0})},LA=(e,t,n,r,a)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===r||"UPDATE"===r)&&(e.data.caseInfo.content[a][t][n]=t)},FA=e=>{const t=!e.isLocalAction&&e.editType===j.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},jA=e=>{let t=0,n=[],r="";return e.pipe(sd(ft),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>LI(e))),ld((async e=>{if(e&&e.type===Ee)return n.push(rl(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a,headers:o}=e,s=t.containerName,i=Ot(s,t.context);let c=ol(i,s,t.context);c=K(t.context,c);const{pageReference:l,targetProperty:d,index:u,subscriptFieldName:p,pageGroupName:h,actionType:f,isPageGroup:g}=t,m=l?.startsWith(F.OBJECT_INFO.OBJECT_INFO);let y=null;m?(y=L.transformCaseData(a),y.uiResources.root.config.context=`${l}${d}[${u}]`):y=a;const I=Cu(y);I.key=t.ID,I.data?.caseInfo?(I.data.caseInfo.ID=t.ID,LA(I,u,p,f,h)):I.data?.objectInfo&&(I.data.objectInfo.ID=t.ID);const{interestPageActionID:E,editType:A,isLocalAction:C,actionID:_}=t,S={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:E,editType:A,isLocalAction:C,actionID:_};I.uiResources.context_data.modalView=S;const b=Df(t.context)?.context_data?.caseInfo,N=`${t.pageReference}${t.targetProperty}`,T=ls(b,N,t.index);I.uiResources.context_data.caseInfo={...I.uiResources.context_data.caseInfo,content:qf.mergeDeep(I.uiResources.context_data.caseInfo?.content,T?.content)};const P=Jf.getProperty(j.CASE_INFO.REMOTESYSTEMID,"",t.context),O={acName:i,context:c};await Zc(I,t,O);const v={target:i,context:c,containerItemID:c,headers:o,index:u,subscriptFieldName:p,pageGroupName:h,isPageGroup:g};P&&(v.headers={...v.headers,RemoteSystemID:P});const D=qf.deepClone(I.data?.caseInfo?.content);I.data?.caseInfo&&A===j.ACTION&&(R()(I.data,`${l}${d}`,new Array(u+1).fill({})),R()(I.data,`${l}${d}[${u}]`,xf(`${d}[${u}]`,l,t.context)));const $=Qc(I,v);I.data?.caseInfo&&(I.data.caseInfo.content=D);const x=Qc(I,v);$.resourceStatus=t.actionType,$.isMultiRecordData=!0,$.parentContext=t.context,$.heading=t.heading,$.data.caseInfo&&A===j.ACTION&&($.data.caseInfo={...$.data.caseInfo,...FA(t),isLocalAction:t.isLocalAction}),$.clearStateMachine=!1,x.skipValidation=!0;const w=al(i,$);r=c,n.push(w),pl(n);const M=vg(ng,x);return{actionsOut:n,actionInPayload:t,mergeAction:M}})),cd((({actionInPayload:e,mergeAction:a})=>(Pc(n)?oc.rejectActionByID(t):oc.resolveActionByID(t),e.skipPageInstructions||MA(r,e.pageReference,e.targetProperty,e.index,e.actionType),vf(n),n=[],e.editType===j.ACTION&&(Cl.registerForServerChanges(),vf(a),Cl.unRegisterForServerChanges()),n))))},UA=e=>{let t,n="",r=[];return e.pipe(sd(gt),id((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,t),eu.handleDeferredActionCompletion(e.payload.context),hd([])}return hd(e.payload).pipe(ld((e=>(t=e,LI(t)))),ld((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Ee){const{context:n,pageReference:r}=t,a={context:n},{response:o}=e,s=r?.startsWith(F.OBJECT_INFO.OBJECT_INFO);let i=null;s?(i=L.transformCaseData(o),i.uiResources.root.config.context=r):i=o;const c=Cu(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const l=Qc(c,a);l.skipValidation=!0;const d=vg(ng,l);Cl.registerForServerChangesSync(),vf(d),Cl.unRegisterForServerChanges()}return e})(e,t))),ld((async e=>{if(e&&e.type===Ee){const t=rl(e);return r.push(t),r}const{containerItemID:n,context:a,pageReference:o}=t;return((e,t,n,r)=>{yi(e).forEach((e=>{const a=qf.convertClipboardPageToPageRefNotation(e.target);Cl.isStateMachineExist(t,n,a)||Cl.setStateMachine(t,a,n,new li(a,n,t));const o=Cl.getStateMachine(t,n,a);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,r,{});break;case"update":o.update(e.content,e.listIndex??e.groupIndex,r,{});break;case"delete":e.listIndex?o.delete(e.listIndex,r):e.groupIndex?o.delete(e.groupIndex,r):o.deletePage();break;case"replace":o.replacePage(e.content);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"add":o.insert(e.content,e.groupIndex,r,{});break;case"delete all":o.deleteAll()}}))})(a,t.parentContext,o.startsWith(F.OBJECT_INFO.OBJECT_INFO_CONTENT)?j.getProperty(F.OBJECT_INFO.OBJECT_INFO_CONTENT):j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),!1),r.push(vg(_g,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),cd((()=>{if(Pc(r))oc.rejectActionByID(n),eu.handleDeferredActionCompletion(t.context);else{oc.resolveActionByID(n),eu.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Jf.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Jf.getPropertyValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID),r,t.parentContext),n=Jf.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),o=a.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");ju(e,n,t.parentContext,o,{})}else Hu(t.parentContext,j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),{})}return vf(r),r=[],r})))})))},kA=e=>{const{caseID:t,headers:n,debugInfo:r,context:a}=e,o=Yg("getDescendants",{caseID:t}),{restApi:s}=o,{reqType:i}=o;return Vo(Ws(s,{method:i,headers:{...n,...r&&{...Ms.addDebugHeaders(r)}}},a)).pipe(cd((t=>({actionInPayload:e,response:t.data,headers:Jc({...n,...t.headers})}))),md("Error ocurred during ajax call at getDescendants Epic : ",a))},VA=e=>{let t=0,n=[];return e.pipe(sd(Xd),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>kA(e))),ld((async e=>{if(e&&Tc(e.type))return n.push(rl(e)),n;const{actionInPayload:t,response:r}=e,a={};qf.setIn(a,"caseInfo.childCases",r?.childCases??[]);const o={data:a,context:t?.context};return n.push(vg(ng,o)),n})),cd((()=>(vf(n),jc(n,t),n=[],n))))},BA=e=>{let t,n="",r=[],a={};return e.pipe(sd(mt),id((e=>{t=e.payload;const{isFormValid:o}=e.payload;return({actionMgrID:n}=e.payload),o?hd(e.payload).pipe(ld((e=>(t=e,hd({})))),ld((async()=>{const{containerItemID:e}=t,o=Df(e),s=e,i=o?.dataInfo.content;delete i.classID;const c=W(s),l=Fp(c).length,d=Fp(c)[l-1]?Rp(Fp(c)[l-1]):c,u=Kp(e),p=Cp(u,e)||{},h=p?.referenceList?.replaceAll(".",""),f=p?.subscriptName,g=Df(d),m={containerItemID:d,data:{...g,caseInfo:{content:{...i}}}};r.push(vg(mg,m)),((e,t,n)=>{lp(t)&&e.push(vg(_g,{containerItemID:n,skipReleaseLockRequest:!0}))})(r,s,e);const y=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:r,activeWorkArea:a,subscriptFieldName:o,actionMgrID:s,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[o],containerName:F.MODAL,pageReference:F.CASE_INFO.CASE_INFO_CONTENT,viewID:F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:F.RESOURCE_STATUS.CREATE,interestPage:`.${r}.${n[o]??""}`,targetProperty:`.${r??""}`,pageGroupName:r,context:a??"",subscriptFieldName:o};return{type:ft,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:g,subscriptData:i,pageGroupName:h,activeWorkArea:d,subscriptFieldName:f,actionMgrID:n,containerItemID:e});return r.push(y),a=i,r})),cd((()=>(oc.resolveActionByID(n,a),vf(r),r=[],r)))):(((e,t)=>{const n={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};oc.rejectActionByID(e,!0,n),eu.handleDeferredActionCompletion(t)})(n,e.payload.context),hd([]))})))},GA=[tE,lE,fE,sA,dA,_A,TA,OA,LE,WE,kE,vA,XE,zE,e=>e.pipe(sd(He),wA((()=>xA(100))),cd((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:o,skipReleaseLockRequest:s,isInCreateStage:i}=e.payload;return oc.resolveActionByID(t),_s.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:o,skipReleaseLockRequest:s,isInCreateStage:i}),[]}))),e=>e.pipe(sd(Me),wA((()=>xA(100))),cd((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,o=Ot(r,n);return oc.resolveActionByID(t),vf(vg(Ag,{containerItemID:a,target:o,doDeleteCaseSummary:!1})),[]}))),jA,UA,VA,BA];function WA(){return wo((function(e,t){e.subscribe(Mo(t,oo))}))}const{RESOURCE_TYPES:HA}=F,qA=[e=>e.pipe(sd(te),cd((e=>e.payload)),ld((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===yp.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=Ot(yp.PREVIEW,e.context),n=ol(t,yp.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);vf(dg({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(V.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=V.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=Yg("loadView",t);return e.viewContext===HA.PAGE&&({restApi:r,reqType:a}=Yg(je,{page:e.viewName,pageClass:e.pageClass})),Vo(Ws(r,{method:a,headers:n},e.context)).pipe(cd((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:Jc(t.headers),rootView:qf.getIn(r,j.ROOT)}})),md(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),ld((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=rl(e),e?.payload?.context?.includes(yp.PREVIEW)){const n={...Df(e.payload.context),caseInfo:{progress:!1,error:!0}},r=Ot(yp.PREVIEW,e.payload.context);t.actionsOut=vg(mg,{key:n.key,target:r,containerName:yp.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete r?.data?.caseInfo?.assignments,delete r?.data?.caseInfo?.availableActions,delete r?.data?.caseInfo?.availableProcesses);const{containerItemID:o,containerName:s}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,a=t||ic.getTargetViewContainerName(je),o=r?.target??Ot(a,e.context);return{target:o,context:r?.context??(t===yp.PREVIEW&&n?e.context:ol(o,a,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let d={};d=Cu(r),d.directUrlUpdation=!1,await Zc(d,n,l);const u={...n,target:i,context:c,containerItemID:o||c,headers:a},p=Qc(d,u);if(p.resourceType=HA.CASE,s&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=Kp(p?.context);((e,t,n,r,a)=>{e&&a===yp.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=vg(mg,{...n,containerName:a})):e?(r.actionsOut=[],r.actionsOut.push(vg(Ag,{target:t,containerItemID:e}))):r.actionsOut=vg(dg,{...n,containerName:a})})(Tp(e,p.key),e,p,t,s)}else p.preserveClientChanges=!0,t.actionsOut=[],s===yp.PREVIEW&&t.actionsOut.push({type:st,payload:{context:c}}),((e,t)=>{if(e.key){const n=Kp(e?.context);Tp(n,e.key)&&t.actionsOut.push(vg(ng,e))}else t.actionsOut.push(vg(ng,e))})(p,t)}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{_s.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),cd((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(oc.resolveActionByID(n,e),L.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(sd(ne),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{_s.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:a,className:o,skipSemanticUrl:s=!1,containerName:i=ic.getTargetViewContainerName(je)}=e,c=n&&{...Ms.addDebugHeaders(n)},l=Ot(i,r);let d="",u={},p=!0;if(!s){if(d=qg(je,{page:a,pageClass:o}),l&&d){const{activate:t,activateContainerActionPayload:n}=dl(HA.PAGE,l,{semanticURL:d});if(t)return Il(n),hd({type:Re,activateContainerActionPayload:n,actionConfig:e})}if(Rp(l)&&({continueExecution:p,removeActionPayload:u}=cl(l)),!p)return oc.rejectActionByID(t),gd()}const{restApi:h,reqType:f}=Yg(je,{page:a,pageClass:o});return Vo(Ws(h,{method:f,headers:c},r)).pipe(cd((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:d,semanticURL:d},actionConfig:e,headers:Jc(t.headers),removeActionPayload:u,skipSemanticUrl:s}})),md(": Error ocurred during ajax call at showPage Epic : ",e.context))})),ld((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Ee)return n.push(rl(e)),t;let{type:r}=e;const{actionConfig:a,skipSemanticUrl:o}=e,s=a.containerName||ic.getTargetViewContainerName(ne),i=Ot(s,a.context);_s.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,r)=>{let a={},o=e;if(n.isTraditionalRemoteCase){a={...n};const e=Tp(r,a.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},o=Re)}return{remoteCasePayload:a,updatedType:o}})(r,e,a,i);if(r=l??r,a.isDeferLoaded){const{response:r,headers:s={}}=e,{isCreateDataObject:c,context:l}=a,d=Cu(r,{isCreateDataObject:c});d.directUrlUpdation=!o;const u={acName:i,context:l};await Zc(d,a,u);const p=Qc(d,{containerItemID:l,target:i,headers:s,context:l});t.rootView=qf.getIn(d,j.ROOT),n.push(vg(ng,p))}else if(r===Re){const{activateContainerActionPayload:{semanticURL:t,containerItemID:r}}=e,o={acName:i,context:wp(r)};a.isTraditionalRemoteCase||await Zc({directUrlUpdation:!0,semanticURL:t},a,o,!0),n.push(vg(Ag,{target:i,containerItemID:r}))}else{const t=ol(i,s,a.context),{response:r,headers:l={},removeActionPayload:d}=e,u=Cu(r,{isCreateDataObject:a.isCreateDataObject});u.directUrlUpdation=!o;const p={acName:i,context:t},h=Gc(t);await Zc(u,a,p);const f={target:i,context:t,containerItemID:t,headers:l,debugInfo:a.debugInfo,currentCaseViewMode:h,referenceList:a?.referenceListStr,subscriptName:a?.subscriptName},g=Qc(u,f);g.resourceType=F.PAGE,a.isCreateDataObject&&(g.resourceType=F.RESOURCE_TYPES.DATA,g.resourceStatus=F.RESOURCE_STATUS.CREATE,delete g.data.caseInfo,g.referenceList=a.referenceListStr,g.subscriptName=a.subscriptName),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=F.CASE,n.key=Ml.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:vc(Ml.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(a,c,g),g.data??={},g.data.traditionalGadgetId=Ml.getUniqueGadgetId();const m=al(i,g);d.containerItemID&&sl(m)&&n.push(vg(_g,{containerItemID:d.containerItemID,target:i})),n.push(m),pl(n)}return _s.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),cd((({actionManagerID:e=0,rootView:t})=>{oc.resolveActionByID(e,t),vf(n),n=[]})),WA())}],zA=(e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:s,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:l}=t,{restApi:d,reqType:u,body:p}=Yg(Ue,{pageName:r,dataContext:a,dataContextParameters:o}),h={};return h.RemoteSystemID=c,Vo(Ws(d,{method:u,headers:h,body:p},n)).pipe(cd((t=>({response:{...t.data,key:s,semanticURL:s},actionConfig:e,headers:Jc(t.headers),removeActionPayload:l,skipSemanticUrl:i}))),md("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:YA}=F,KA=(e,t)=>{const n=Object.getOwnPropertyDescriptor(e,t);return Object.hasOwn(e,t)&&n&&!0===n.writable&&"string"==typeof e[t]},JA=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:o,reqType:s}=Yg("deleteDataObject",a);return Vo(Ws(o,{method:s},n)).pipe(cd((t=>({response:t.data,actionInPayload:e}))),md("Error occurred during ajax call at deleteDataObject Epic",n))},XA=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,a={data_view_ID:t},{restApi:o,reqType:s}=Yg("getDataObjectActions",a);return Vo(Ws(o,{method:s,body:{dataViewParameters:n}},r)).pipe(cd((e=>({...e.data}))),md("Error occurred during ajax call at GET data object actions : ",e.context))},QA=[e=>{let t,n=0,r=[];return e.pipe(sd(re),YE((e=>(({actionMgrID:n}=e.payload),hd(e.payload).pipe(ld((e=>((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:o,skipSemanticUrl:s=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:d,RemoteSystemID:u}=e;for(let e=0,t=Object.keys(o);e<t.length;e+=1){const n=t[e];KA(o,n)&&(o[n]=decodeURIComponent(o[n]))}const p=Ot(d,n);let h="",f={},g=!1;for(let e=0,t=Object.keys(o);e<t.length;e+=1){const n=t[e],r=o[n];KA(o,n)&&(o[n]=qf.containsEncodedPattern(r)?r:encodeURIComponent(r))}if(!s){h=qg(Ue,{pageName:r,dataViewName:a},o);const{activate:n,activateContainerActionPayload:s}=dl(YA.PAGE,p,{semanticURL:h});if(n)return hd({type:Re,activateContainerActionPayload:s,actionConfig:e});if(({continueExecution:g,removeActionPayload:f}=cl(p)),!g)return oc.rejectActionByID(t),gd()}return zA({context:n,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:h,skipSemanticUrl:s,containerName:d,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:u},{removeActionPayload:f})})(e,n))),ld((async e=>{if(e&&e.type===Ee)return r.push(rl(e)),r;const{type:n,actionConfig:a,headers:o,response:s,skipSemanticUrl:i}=e;t=qf.getIn(s,j.ROOT);const{containerName:c,parentAction:l,resourceType:d}=a,u=Ot(c,a.context);let p;const h=Gc(a?.context);if(a.isDeferLoaded){p=Cu(s),p.directUrlUpdation=!i;const t={acName:u,context:a.context};await Zc(p,a,t);const n={target:u,headers:o,context:a.context,containerItemID:e.containerItemID},c=Qc(p,n);return r=vg(ng,c),r}if(n===Re){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,o={acName:u,context:wp(n)};await Zc({directUrlUpdation:!0,semanticURL:t},a,o,!0),r.push(vg(Ag,{target:u,containerItemID:n,resourceType:YA.DATA}))}else if("DATA"===d&&l===ht){const{context:e}=a,t=s?.data,n={context:e,data:t};r.push(vg(ng,n))}else{const t=ol(u,c,a.context),{removeActionPayload:n}=e;p=Cu(s),p.directUrlUpdation=!i;const l={acName:u,context:t};await Zc(p,a,l);const d=Qc(p,{target:u,context:t,containerItemID:t,headers:o,currentCaseViewMode:h});d.resourceType=YA.DATA;const f=al(u,d);n.containerItemID&&sl(f)&&r.push(vg(_g,{containerItemID:n.containerItemID,target:u})),pl(r),r.push(f)}return r})),cd((()=>(oc.resolveActionByID(n,t),vf(r),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(sd(ct),yd(100),id((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(t,!0,e),hd([])}return hd(e.payload).pipe(ld((e=>Id(e))),ld((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=rl({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:o}=r,s=o?yp.MODAL:yp.PRIMARY,i={target:Ot(s,a),containerItemID:a,context:a};return n.push(vg(_g,i)),n})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(sd(dt),yd(100),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>Ed(e))),ld((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=rl({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,readOnly:i,actionName:c}=r,l=Ot(s,r.context),d=ol(l,s,r.context),u={acName:l,context:d};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=r.dataLookUp,e.dataContextParameters||=r.requestPayload}await Zc(a,r,u);const p=Qc(a,{target:l,context:d,containerItemID:d,headers:o});return p.resourceType=F.RESOURCE_TYPES.DATA,p.resourceStatus=F.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(r.requestPayload),n.push(vg(dg,p)),n})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(sd(ut),yd(100),id((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(t,!0,e),hd([])}return hd(e.payload).pipe(ld((e=>Ad(e))),ld((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=rl({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:o}=r,s=o?yp.MODAL:yp.PRIMARY,i={target:Ot(s,a),containerItemID:a,context:a};return n.push(vg(_g,i)),n})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(sd(lt),yd(100),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>JA(e))),ld((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=rl({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))},e=>{let t=0,n=[];let r={};return e.pipe(sd(ye),yd(100),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>XA(e))),ld((async e=>e&&e.type===Ee?(n.push(rl(e)),n):(r=e,[]))),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t,r),vf(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(sd(pt),yd(100),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>Cd(e))),ld((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=rl({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,actionID:i,context:c,actionName:l}=r,d=Ot(s,r.context);let u=H(s,c);u=K(c,u);const p={target:d,context:u,containerItemID:u,headers:o,resourceType:F.RESOURCE_TYPES.DATA,resourceStatus:F.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=r.lookupDatapage,e.dataContextParameters||=r.dataViewParameters}const h={acName:d,context:c};await Zc(a,r,h);const f=Qc(a,p);return n.push(vg(dg,f)),n})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(sd(ht),yd(100),id((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const a=e.payload.context;if(!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(t,!0,e),hd([])}return hs({context:a,stateObj:Df(a),clearContextMessages:!0}),hd(e.payload).pipe(ld((e=>_d(e))),ld((async e=>{if(e&&e.type===Ee){Hl(e,"dataObject");const{payload:r}=e,a=rl({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,containerItemID:i,resourceType:c,key:l}=r,d=Ot(s,r.context),u={acName:d,context:r.context};await Zc(a,r,u);const p={key:l,target:d,resourceType:c,containerItemID:i,headers:o,context:r.context};return n=((e,t,n,r)=>{const{resourceType:a,key:o,containerItemID:s}=r,i=Qc(n,t);i.resourceType=a||F.RESOURCE_TYPES.DATA;const c=J(s);e.push(vg(_g,i));const l=xf(".dataContext","dataInfo",c),d=xf(".dataContextParameters","dataInfo",c),u={context:c,skipSemanticUrl:!0,resourceType:a,parentAction:ht,dataContext:l,dataContextParameters:d},p=l&&d&&qg(Ue,{pageName:j.PY_DETAILS,dataViewName:l},d)||"";if(s?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...u}};e.push(t)}else if(a!==j.PAGE&&o===p&&s?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...u}};e.push(t)}return e})(n,p,a,{key:l,resourceType:c,containerItemID:i}),n})),cd((()=>(1===n.length&&Tc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),vf(n),n=[],n))))})))}];function ZA(e,t){return void 0===t&&(t=DA),wo((function(n,r){var a=null,o=null,s=null,i=function(){if(a){a.unsubscribe(),a=null;var e=o;o=null,r.next(e)}};function c(){var n=s+e,o=t.now();if(o<n)return a=this.schedule(void 0,n-o),void r.add(a);i()}n.subscribe(Mo(r,(function(n){o=n,s=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){o=a=null})))}))}const{RESOURCE_TYPES:{CASE:eC,DATA:tC,OBJECT:nC}}=F;let rC=[],aC=!1,oC=!1;const sC={},iC=[e=>e.pipe(sd(Ie),ZA(200),cd((e=>e.payload)),ld((e=>{oC=!1,_s.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{oC=!0}));const t=Ss.getPreviewMode()&&Ms.addDebugHeaders({debugId:qf.generateUniqueID()});sC.dataContext=e.payload.dataViewName,sC.dataContextParameters=(e=>{if(!e)return e;const t={};for(let n=0,r=Object.keys(e);n<r.length;n+=1){const a=r[n];if(Object.hasOwn(e,a)){const n=e[a];t[a]=qf.containsEncodedPattern(n)?decodeURIComponent(n):encodeURIComponent(n)}}return t})(e.payload.dataViewKeys);const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:o}=e;o&&(o.indexOf("viewType={viewType}")>0?o=o.replace("{viewType}","page"):o.indexOf('viewType=""')>0&&(o=o.replace('viewType=""','viewType="page"'))),aC=a===Nt,aC&&L.setNeedsMapping(!0);const s=E()+o,i=e.options.context;let c;const l={},d=e?.payload?.caseClassName;if(V.isRemoteCase(d)){const{RemoteSystemID:e}=V.getRemoteCase(d);l.RemoteSystemID=e}if($h.isWSSPortal()&&(l[j.X_ORIGIN_CHANNEL]="WSS"),"POST"===r){c=e.payload,o.indexOf("viewType=")<0&&(o=`${o}?viewType=page`);let i;switch(hl(a)){case eC:case nC:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case tC:i=sC;break;default:i=c}return Vo(Ws(s,{method:r,body:i,headers:{...l,...t}},n)).pipe(cd((t=>({response:{...t.data},payload:e,headers:Jc(t.headers,"",l)}))),md(": Error occurred during ajax call at historyEpic : ",e))}return Vo(Ws(s,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(cd((n=>({response:n.data,payload:e,headers:{...Jc(n.headers),...t}}))),Go((r=>{if(a===Qe){const n={messages:[{type:"error",message:r.response.data.errorDetails[0].localizedValue}],category:"PAGE"};rc.setComponentCache("assignments-launchAssignment-Error",n);const a=Th(bh()),o=Dh.getEndPointInfo(a.split("/assignments")[0]),s=E()+o.routeEndpoint;return e={...e,routeKey:Be,resetSemanticURL:!0},Vo(Ws(s,{method:o.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(cd((n=>({response:n.data,payload:e,headers:{...Jc(n.headers),...t}}))))}return hd(Dg(": Error occurred during ajax call at historyEpic : ",r,n))})))})),ld((async e=>{if(oC)return rC;if(_s.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{oC=!0})),e&&e.type===Ee)return rl(e);const{headers:t={},response:n,payload:r}=e,a=Cu(n,{[F.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),o=r.options.acName,s=kp(o)&&Bp(o)?Rp(o):e.payload.options.context,i=s;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:o,context:s,containerItemID:i,headers:t,debugInfo:{debugId:t[j.COREHEADER_APP_DEBUG_ID]}};let l=r?.payload?.pageClass;const d=r?.payload?.page,u=aC?Nt:Be,p=aC?r.payload.objectID:r.payload.workID,h=aC?"{objectID}":"{workID}";let f=aC?`objects/${p}`:"";r?.payload?.caseName&&p&&(f=qg(u,{caseName:e.payload.payload.caseName}),f=f?.replace(h,p)||"",l=r?.payload?.caseClassName),(r?.routeKey===Qe||r?.resetSemanticURL)&&((e,t)=>{const n=$c(t);let r=qg(Be,{caseClassName:Dc(t)},{id:n});r=r?.replace("{workID}",String(vc(n))).replace("{id}",String(vc(n))),tm({directUrlUpdation:!0,semanticURL:r,options:{}})})(0,a),((e,t)=>{const n=t?.data?.caseInfo;e===Qe&&n?.caseTypeID&&n?.content&&Uc(n.caseTypeID)&&(n.content.coexistenceAction=Ge)})(r?.routeKey,a),_s.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:d,pageClass:l});const g=qf.getIn(a,j.COMPONENTS);g&&await nc(g),ki(a,r.options.actionConfig,!0),_s.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:d,pageClass:l});let m=Qc(a,c);return m=((e,t,n)=>{if(e===zc.CASE||e===zc.OBJECT||e===zc.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=tl(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===zc.ASSIGNMENT?(n.caseViewMode=j.PERFORM_MODE,n.resourceType=zc.CASE):n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(hl(e.payload.routeKey),{...n.data,semanticURL:f,caseViewMode:j.REVIEW_MODE},m),m.data.traditionalGadgetId=Ml.getUniqueGadgetId(),rC.push(al(o,m)),((e,t)=>{let n=rc.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(vg(Cg,n)),rc.resetComponentCache("assignments-launchAssignment-Error"))})(s,rC),pl(rC),rC})),cd((()=>(oC||vf(rC),rC=[],aC=!1,oC=!1,rC))),md("Error occurred"))],cC=[e=>{let t=0;return e.pipe(sd(tt),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),cd((()=>{const e=Of()?.getState(),n=$I();return h()(e,n)&&t>0?oc.resolveActionByID(t,{}):oc.rejectActionByID(t),[]})),WA())}],lC=[e=>{let t=0,n=[];return e.pipe(sd(ae),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a,o="";n||(o=qg(ke,{insightID:"{insightID}"}),o=o.replace("{insightID}",r),a=Dh.getEndPointInfo(o));const{restApi:s,reqType:i}=Yg(ke,{...a?.payload||[],insightID:r});return Vo(Ws(s,{method:i},t)).pipe(cd((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:o,semanticURL:o},actionConfig:e,skipSemanticUrl:n}})),md(": Error occurred during ajax call at showPage Epic : ",e.context))})),ld((async e=>{if(e&&e.type===Ee)return n.push(rl(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=ic.getTargetViewContainerName(ne),o=Ot(a,t.context),s=ol(o,a,t.context),{response:i}=e,c=Cu(i);c.directUrlUpdation=!r;const l={acName:o,context:s},d=!r,u=r;await Zc(c,t,l,d,u);const p=Qc(c,{target:o,context:s,containerItemID:s});p.resourceType=F.PAGE;const h=al(o,p);return n.push(h),pl(n),n})),cd((()=>{oc.resolveActionByID(t),vf(n),n=[]})),WA())}],dC=[e=>{let t=0,n=[];return e.pipe(sd(oe),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=qg(Ve,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:o,reqType:s}=Yg(Ve,{dashboardID:r});return Vo(Ws(o,{method:s},t)).pipe(cd((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),md(": Error occurred during ajax call at showPage Epic : ",e.context))})),ld((async e=>{if(e&&e.type===Ee)return n.push(rl(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=ic.getTargetViewContainerName(ne),o=Ot(a,t.context),s=ol(o,a,t.context),{response:i}=e,c=Cu(i);c.directUrlUpdation=!r;const l={acName:o,context:s},d=!r,u=r;await Zc(c,t,l,d,u);const p=Qc(c,{target:o,context:s,containerItemID:s});p.resourceType=F.PAGE;const h=al(o,p);return n.push(h)})),cd((()=>{oc.resolveActionByID(t),vf(n),n=[]})),WA())}],uC=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||ic.getTargetViewContainerName(bt)},pC=e=>"pzCreateDetails"===e?.uiResources?.root?.config?.name||!1,hC=(e,t)=>{const n=pC(e),{skipBrowserSemanticUrlUpdate:r=!1}=t;qf.setIn(e,["directUrlUpdation"],!n&&!r)},fC=e=>e.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,gC=(e,t)=>{let n;return n=!e.renderInline&&!$h.getDefaultCasePage()&&pC(t),n},mC=(e,t)=>{const{class:n,context:r,viewType:a=Yc.PAGE}=e,{removeActionPayload:o}=t,s=e?.pageName?e?.pageName:$h.getDefaultCasePage();return Vo(Bi.createCase(n,{...e,pageName:s,viewType:a,context:r})).pipe(cd((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),md("Error occurred during ajax call at createObject Epic : ",r))},yC="CREATE_OBJECT",IC=e=>{let t,n=0,r=[],a={};return e.pipe(sd(yC),yd(100),id((e=>{if(({actionMgrID:n}=e.payload),Ml.isExternalObject(e.payload.class)&&!Rl(e.payload.context)){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),hd([])}return hd(e.payload).pipe(ld((e=>{const{context:r}=e;t=e.class;const a=uC(e),o=Ot(a,r),{continueExecution:s,removeActionPayload:i}=JI(o);return s?mC(e,{removeActionPayload:i}):(oc.rejectActionByID(n),gd())})),ld((async e=>{if(e&&e.type===Ee)return e.payload.context=((e,t)=>Ml.isExternalObject(e)&&t?t:dh())(t,e.payload.context),r.push(rl(e)),r;const{actionInPayload:o,response:s,headers:i,removeActionPayload:c}=e,l=gC(o,s);qf.setIn(s.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const d=uC({...o,isInCreateStage:l}),u=Ot(d,o.context),p=ol(u,d,o.context);if(((e,t)=>{Ml.isExternalObject(e.class)&&(e.containerItemID=e.context,IE(t,e))})(o,r),((e,t,n)=>!bc(e)&&kp(t)&&!Ml.isExternalObject(n))(d,u,t)){const{continueExecution:e}=cl(u);if(!e)return oc.rejectActionByID(n),gd()}if(((e,t)=>!e&&!t)(o?.openCaseViewAfterCreate??!0,l)){const{businessID:e,caseType:t,resolvedURL:n}=mc(s);return a={id:e,label:t,href:n},ZI(a),eE({caseId:e,caseType:t}),r}(e=>{Ml.isExternalObject(e.class)&&ZI({content:Fh().getLocaleValue("Successfully submitted!","Assignment")})})(o);const h=Cu(s),f=String(vc(pc(h)));let g=qg(bt,{caseClassName:uc(h)});g=g.replace(/{.+?}/,f),h.semanticURL=g,rc.setComponentCache(f,Ms.addDebugHeaders(o.debugInfo)),hC(h,o);const m={acName:u,context:p};await Zc(h,o,m);const y={target:u,context:p,headers:i,semanticURL:g,caseViewMode:fC(h),containerItemID:p,isInCreateStage:l,isMinimizable:l,assignmentContext:qf.getIn(h,YI),nextAssignmentInfo:qf.getIn(h,zI),resourceType:F.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};hc(y,h);const I=Qc(h,y),E=al(u,I);return((e,t,n)=>{if(sl(e)){const{removeActionPayload:e,target:r}=t;wc(n,{removeActionPayload:e,target:r})}})(E,{removeActionPayload:c,target:u},r),r.push(E),pl(r),r})),cd((()=>(gl(r),jc(r,n),(e=>{Ml.isExternalObject(e)&&L.setNeedsMapping(!1)})(t),a={},r=[],r))))})))},EC=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:o,additionalHeaders:s={},jsActionQueryParams:i}=e,{state$:c}=t,l=Yc.PAGE,d="executeObjectWideAction",u={assignmentID:n,actionID:r,viewType:l,objectID:a};let{restApi:p}=Yg(d,u);const{reqType:h}=Yg(d,u);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=Wl(i,p),e.viewType=l;const{content:f}=Xc(o,{isObjectWideAction:!0}),g=c.value.data[o]?.objectInfo?.headers||{},{etag:m}=g,y={"if-match":m,...s};return Vo(Ws(p,{method:h,body:f,headers:y},o)).pipe(cd((t=>{const{data:n,headers:r}=t;return L.analyseResponse(t.data),{actionInPayload:e,response:n,headers:Jc({...y,...r})}})),md("Error occurred during ajax call at executeObjectWideAction Epic : ",o))},AC=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:pc(e)}},{RESOURCE_TYPES:CC}=F,_C=(e,t)=>{let n=0,r=[],a={},o="";return e.pipe(sd(_t),id((e=>{if(({actionMgrID:n}=e.payload),o=e.payload.context,hs({context:o,stateObj:Df(o),clearContextMessages:!0}),!Rl(o)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,t),eu.handleDeferredActionCompletion(e.payload.context),hd([])}return hd(e.payload).pipe(ld((e=>{yE(r,e);const n={...e};return EC(n,{state$:t})})),ld((async e=>{if(e?.type===Ee){const t=rl(e);return r.push(t),r}zd.clearContextedCache(o);const{headers:t,actionInPayload:s,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:d}=s,u=Kp(c);s.target=u,qf.setIn(i.data,j.OBJECT_INFO_IS_LOCAL_ACTION,!1),xE({submitResponse:i});let p=Cu(i,{[F.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const h=uc(p),f=W(s.context),g=Fp(f)[0]?Rp(Fp(f)[0]):f,m=(e=>{const t=fc(e);return Fl(t)&&jl($h.getOperatorIdentifier(),t)})(p),y=d&&!m;!l||d||SE(s.context,g)||(p=ul(p,Df(c)));const I=Qc(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&qf.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),qf.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(I.data,s),I.caseClassName=h,I.resourceType=CC.ASSIGNMENT,I.headers=t;const E=pc(p);hc(I,p);const A=qg(bt,{caseClassName:h}).replace(/{.+?}/,String(vc(E)));p.semanticURL=A,I.semanticURL=A,await vE(s,I,!1,E,p,r,e,i,!0),y&&(a=bE(s),eE({caseId:s.caseID,caseType:s.caseTypeID,assignmentId:s.assignmentID})),((e,t)=>{const n=uc(e?.response),r=fc(e?.response),{caseTypeID:a}=r,o=$h.getFeatureMap();(o?.deferUpdateCaseSummaryView??!Object.hasOwn(o,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&sf(j.CASESUMMARY_VIEW_NAME,a)&&Vc(t,e?.actionInPayload,{caseClassName:n})})(e,r),eu.handleDeferredActionCompletion(o),DE(I,s,g);const C=AC(p,s);return Ic({...C,containerItemID:c}),CE(r,{transientItemID:c,target:u,isModalAction:l}),r})),cd((()=>{const e=r.find((e=>e.type===Ee));return e?(eu.handleDeferredActionCompletion(o),RE(e),oc.rejectActionByID(n)):oc.resolveActionByID(n,a),gl(r),L.setNeedsMapping(!1),r=[],a={},r})))})))},SC=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:o,viewType:s}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:$h.getDefaultCasePage(),l=Yg(Nt,{objectID:n,params:{pageName:c}});let{restApi:d}=l;const{reqType:u}=l;return"none"===s&&(d=`${d?.split("viewType")[0]}viewType=none`),Vo(Ws(d,{method:u,headers:{...r,...o&&{...Ms.addDebugHeaders(o)}}},a)).pipe(cd((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Jc({...r,...t.headers}),removeActionPayload:i}))),md("Error occurred during ajax call at getObject Epic : ",a))},bC="GET_OBJECT",{RESOURCE_TYPES:NC}=F,TC=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:r,type:a,response:o,removeActionPayload:s,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:d}=n,u=Cc(Nt,n),p=Ot(u,c);if(Nc(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:o,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:i}}=t,c=Cc(Nt,a),l=Ot(c,o),d=wp(r);await Zc({directUrlUpdation:!s,semanticURL:n},a,{acName:l,containerName:c,target:l,context:d}),e.push(vg(Ag,{containerItemID:r,target:l,context:d,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:n});else{const e=ol(p,u,c,{buildNew:!0}),r=Cu(o),a=(e=>{const t=pc(e),n=uc(e);let r=qg(Nt,{objectClassName:n});return r=r?.replace("{objectID}",String(vc(t))),r})(r);r.semanticURL=a,r.directUrlUpdation=!l;const h={acName:p,context:e};await Zc(r,n,h);const f=Qc(r,{target:p,context:e,containerItemID:e,semanticURL:a,headers:i,debugInfo:d});f.caseViewMode=j.REVIEW_MODE,f.resourceType=NC.OBJECT,hc(f,r);const g=al(p,f);s.containerItemID&&sl(g)&&t.push(vg(_g,{containerItemID:s.containerItemID,target:p})),t.push(g)}pl(t);const h=n.insKey;Ec({caseKey:h,actionInContext:c})},PC="OPEN_OBJECT_ACTION",OC=e=>{const{actionID:t,caseID:n,context:r,openActionType:a,modalLoadingContainer:o}=e,s=Yc.FORM,i=Yg(Tt,{objectID:n,actionID:t,viewType:s}),{reqType:c}=i;let{restApi:l}=i;e.actionType=j.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${s}`:`${l}?viewType=${s}`);const d=o?.context??r;return Vo(Ws(l,{method:c,headers:{}},d)).pipe(cd((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Jc(t.headers)}))),md(`: Error occurred during ajax call at ${a} Epic : `,d))},vC=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:o,openActionType:s,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Cu(e,{info:F.OBJECT_INFO.OBJECT_INFO}),d=Cc(s,r),u=c?.target??Ot(d,a),{context:p,containerItemID:h,isNewContainerItem:f}=((e,t,n,r)=>{let a,o,s=!1;const i=Vp(e);return!Bp(e)||i&&!Np(e,r)?(o=H(t,n),bc(t)&&(o=K(n,o)),a=o,s=!0):(a=i?Tp(e,r):Rp(e),o=wp(a)),{context:o,containerItemID:a,isNewContainerItem:s}})(u,d,a,e.data.objectInfo.ID),g={acName:u,target:u,containerName:d,context:p};await Zc(l,r,g);const m=l.uiResources?.root,y=(e=>e?j.PERFORM_MODE:j.REVIEW_MODE)(m),I=Qc(l,{target:u,context:p,containerItemID:h,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:o,isMinimizable:!1,isInCreateStage:bc(d),resourceType:F.RESOURCE_TYPES.OBJECT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,actionType:r.actionType});if(m&&hc(I,l),bc(d)&&delete I.doDeleteCaseSummary,t.push(vg((e=>e?dg:mg)(f),I)),f||t.push(vg(Ig,I)),f){const a=Fp(r.contextName),o=Tp(a,e.data.objectInfo.ID);if(o){const e={data:{objectInfo:{headers:n}},context:o};t.push(vg(ng,e))}}return h!==Rp(u)&&t.push(vg(Ag,{target:u,containerItemID:h})),gc(h)&&!c?.context&&fl(I,t),t},DC=e=>{e.openActionType=Tt;if(Cc(e.openActionType,e)===j.MODAL){const t=Cc(e.openActionType,e),n=Ot(t,e.context),r=K(e.context,H(t,e.context));vf(dg({target:n,context:r,containerItemID:r,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),vf(yg({context:r})),e.modalLoadingContainer={target:n,context:r},OC(e)}return OC(e)},RC=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||ic.getTargetViewContainerName(Pt)},$C=(e,t)=>{const{class:n,context:r,viewType:a=Yc.PAGE}=e,{removeActionPayload:o}=t,s=e?.pageName?e?.pageName:$h.getDefaultCasePage();return Vo(Bi.createCase(n,{...e,pageName:s,viewType:a,context:r,retrieveActionViewForNewObject:!0})).pipe(cd((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),md("Error occurred during ajax call at createObject Epic : ",r))},xC="CREATE_EXTERNAL_OBJECT",wC=e=>{const{workId:t,context:n,isExternalCase:r}=e,a=r?qe:"deleteWork",{restApi:o,reqType:s}=Yg(a,{ID:t});return Vo(Ws(o,{method:s},n)).pipe(cd((t=>({response:t.data,actionInPayload:e,headers:Jc(t.headers)}))),md("Error occurred during ajax call at deleteWork Epic : ",n))},MC=e=>{_s.publish(j.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},LC=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return wI.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...GI,...GA,...qA,...iC,...QA,...WI,...cC,...lC,...dC,...[IC,e=>{let t=0,n=[];return e.pipe(sd(bC),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{context:n,isChild:r,viewType:a}=e,o=Cc(Nt,e),s=Ot(o,n);let i,c=!0;if("none"!==a){const e=cl(s);c=e.continueExecution,i=e.removeActionPayload}if(!c)return oc.rejectActionByID(t),gd();const{activate:l,activateContainerActionPayload:d}=dl(NC.OBJECT,s,e);return l&&!r&&"none"!==a?hd({type:Re,activateContainerActionPayload:d,actionInPayload:e}):SC(e,{removeActionPayload:i})})),ld((async e=>{if(e&&Tc(e.type))return n.push(rl(e)),n;if("none"===e?.actionInPayload?.viewType){const t=Df(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==j.PERFORM_MODE){const t=Cu(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:st,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),n.push(vg(ng,r));const a=Kp(e?.actionInPayload?.context),o=_c(e?.actionInPayload?.context),s=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(gc(e?.actionInPayload?.context)){const t=Qc(e?.response,{...s});fl({...t,isArrayDeepMerge:!0},n)}}}else await TC(e,n);return n})),cd((()=>(vf(n),jc(n,t),n=[],n))))},_C,e=>{let t=0,n=[];return e.pipe(sd(PC),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>DC(e))),ld((async e=>{if(Tc(e.type)){const t=rl(e);n.push(t);const r=Df(e.payload.context);return r?.context_data?.isLoading&&n.push(vg(Ig,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return qf.setIn(a,"data.objectInfo.activeActionID",o),qf.setIn(a.data,j.getProperty(j.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&qf.setIn(a.data,j.getProperty(j.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await vC(a,n,{headers:r,actionInPayload:t}),QE(t),n})),cd((()=>(vf(n),jc(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(sd(xC),yd(100),cd((e=>(({actionMgrID:t}=e.payload),e.payload))),ld((e=>{const{context:n}=e,r=RC(e),a=Ot(r,n),{continueExecution:o,removeActionPayload:s}=JI(a);return o?$C(e,{removeActionPayload:s}):(oc.rejectActionByID(t),gd())})),ld((async e=>{if(e&&e.type===Ee)return e.payload.context=dh(),n.push(rl(e)),n;const{actionInPayload:r,response:a,headers:o,removeActionPayload:s}=e,i=gC(r,a);qf.setIn(a.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const c=RC({...r,isInCreateStage:i}),l=Ot(c,r.context),d=ol(l,c,r.context);if(!bc(c)&&kp(l)){const{continueExecution:e}=cl(l);if(!e)return oc.rejectActionByID(t),gd()}const u=Cu(a);let p=qg(Pt,{caseClassName:uc(u)});p=p.replace(/{.+?}/,String(vc(pc(u)))),u.semanticURL=p,hC(u,r);const h={acName:l,context:d};await Zc(u,r,h);const f={target:l,context:d,headers:o,semanticURL:p,caseViewMode:fC(u),containerItemID:d,isInCreateStage:i,isMinimizable:i,assignmentContext:qf.getIn(u,YI),nextAssignmentInfo:qf.getIn(u,zI),resourceType:F.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};hc(f,u);const g=Qc(u,f),m=al(l,g);return sl(m)&&wc(n,{removeActionPayload:s,target:l}),n.push(m),pl(n),n})),cd((()=>(gl(n),jc(n,t),n=[],n))))},e=>{let t,n=0,r=[];return e.pipe(sd(Ql),cd((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),ld((e=>{if(!e.skipDeleteConfirmation&&!e.ignoreWorkDeletion){const r=yp.MODAL,a=Ot(r,e.context),o=K(e.context,H(r,e.context));return vf([vg(dg,{target:a,context:o,containerItemID:o,containerName:r,isDeleteConfirmation:!0,actionName:"Delete",workId:e.workId,caseTypeID:t,className:e.className,keys:e.keys,...e.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:t}}})]),oc.resolveActionByID(n),fd}return e.ignoreWorkDeletion?hd({actionInPayload:e}):wC(e)})),ld((async e=>{if(e&&Tc(e.type)){const{payload:t}=e;return r.push(rl({...e,...t,actionMgrID:n})),r}const{actionInPayload:t}=e,{context:a}=t;if(ZI({content:Fh().getLocaleValue("Deleted successfully!","Messages")}),a?.includes(j.PREVIEW)&&r.push(vg(lg,qp({context:j.APP.APP,name:j.PREVIEW}))),a?.includes(j.MODAL)){const e=yp.MODAL,t=Ot(e,a),n=Cp(t,a);n?.enableBackNavigation&&window?.history?.back()}return r})),cd((()=>(vf(r),jc(r,n)===j.PROMISE_VALUE.RESOLVE&&MC({caseTypeID:t}),r=[],r))))}]),FC=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,context:o,transientItemID:s}=r;"HTTP"!==a&&[_e,$e,Se,we,Ne,De].includes(n)&&(bl(o||s),ss.removeContextTreeNode(o||s)),e(t)},jC={},UC=e=>{const t=qf.getIn(jC,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=qf.getIn(jC,[r,t],[]),o=a&&a.length>0&&a.indexOf(e);if(o>-1&&a.splice(o,1),!a||a&&0===a.length){qf.deleteIn(jC,[r,t]);const e=qf.getIn(jC,[r]);e&&0===Object.keys(e).length&&qf.deleteIn(jC,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),qf.deleteIn(jC,[j.CONTEXT,e]);const r=qf.getIn(jC,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&qf.deleteIn(jC,[j.CONTEXT]),n.length>0&&vf($g({dataPagesToBeRemoved:n}))},kC=(e={},t)=>{Object.keys(e).forEach((n=>{const r=qf.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=qf.getIn(jC,[j.CONTEXT,n]);if(qf.getIn(jC,[e])){const r=qf.getIn(jC,[e,t],[]);qf.setIn(jC,[e,t],[...new Set([...r,n])])}else qf.setIn(jC,[e,t],[n]);r?qf.setIn(jC,[j.CONTEXT,n],[...new Set([...r,t])]):qf.setIn(jC,[j.CONTEXT,n],[t])})(n,e,t)}))}))},VC=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:r=[]}={},type:a}=e;if(((e,t)=>{t&&t.length>0&&(e===we||e===Se)&&t.forEach((e=>{UC(e)}))})(a,r),a===_e||a===ge||a===rt){const e=a===rt?t:t.shared;kC(e,n)}else a===we?(UC(n),kC(t.shared,n)):a===Se&&UC(n)})),e(t)},BC=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:o,context:s,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:d}=F;if(r===Se){const{resourceType:t,key:n,context:r}=qf.getIn(e.getState(),["containers",a,"items",o])||{},s={resourceType:t,key:n,context:r,containerItemID:o};_s.publish(d.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,s),a===`${F.APP.APP}/${j.PRIMARY}`&&l===j.CONTAINER_TYPE.MULTIPLE&&_s.publish(d.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===we||r===Se)&&i.forEach((e=>{Jd.cleanCaches(e)})),r!==we&&r!==Se||Jd.cleanCaches(s),t(n)},GC=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null,clearStateMachine:a=!0}={},type:o}=t;n&&(o===_e||o===$e||o===we||o===Se)&&a&&(Ii(n),mi(n)),r&&o===Oe&&(Ii(r),mi(r)),e(t)},WC=function(e){void 0===e&&(e={});var t,n=new(0,Jy.constructor)(Jy.schedulerActionCtor),r=new Qy,a=function(a){t=a;var o=new Qy,s=new Qy,i=o.asObservable().pipe(Fo(n)),c=new tI(s.pipe(Fo(n)),t.getState());return r.pipe(cd((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),ld((function(e){return Vo(e).pipe(jo(n),Fo(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return s.next(t.getState()),o.next(n),r}}};return a.run=function(e){r.next(e)},a}(),HC=e=>{if(null!==Of())return void Gf();const t=[hp.propertyChangeMiddleware,FC,VC,GC,WC,BC],n=jy({reducer:xI(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(nI).concat(nI)});WC.run(LC),Pf(n)},qC={publishConstellationLoadedEvent:()=>{_s.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const zC=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Tp(t,e)};xu({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Tp(t,e)};xu({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=xu({meta:{type:"PreviewViewContainer",config:{name:j.PREVIEW}},options:{context:j.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:j.PRIMARY,context:j.APP.APP}),vp(j.APP.APP,j.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:j.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){xu({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=hh(t,e);return Al.isStateModified(n)}getEventUtils(){return qC}getBroadcastUtils(){return qI}isTraditionalUICase(e){return Uc(e)}};const YC=class{static openCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?$h.setDefaultCasePage(n.pageName):($h.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?$h.disableAssignmentHeader(n.disableAssignmentHeader):$h.disableAssignmentHeader(!1),cu.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?$h.setDefaultCasePage(n.pageName):($h.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?$h.disableAssignmentHeader(n.disableAssignmentHeader):$h.disableAssignmentHeader(!1),cu.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=F.APP.APP,t={}){return t.renderInline=!0,t.pageName?$h.setDefaultCasePage(t.pageName):($h.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?$h.disableAssignmentHeader(t.disableAssignmentHeader):$h.disableAssignmentHeader(!1),cu.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?$h.setDefaultCasePage(n.pageName):($h.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?$h.disableAssignmentHeader(n.disableAssignmentHeader):$h.disableAssignmentHeader(!1),cu.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=F.APP.APP,r={}){const a=ne;r?.defaultCasePage?$h.setDefaultCasePage(r.defaultCasePage):$h.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?$h.disableAssignmentHeader(r.disableAssignmentHeader):$h.disableAssignmentHeader(!1);const o={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:oc.getNextActionMgrId(),context:n},{promise:s}=oc.actionManagerPromise(a,o.actionMgrID);return vf({type:a,payload:{...o}}),s}static getCurrentContextAPI(e,t=F.APP.APP){return xu({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const KC=new class{createC11nEnv=e=>xu(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>dn;getStateManager=()=>d;getActionCreators=()=>u;getStreamObservable=()=>o;getActionProcessor=()=>Qf;getActionHandler=()=>Xf;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...qf.getIn(e,j.ROOT),options:n};HC(e),ki(e,n,!0);const a=this.createC11nEnv({meta:r,isRoot:!0});_s.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:r,uiResources:a={}}=e,{root:o}=a,s=qf.getIn(a,j.CONTEXT_DATA),i=Cu(e);await Zc(i,{},{},!1,!0);const c={...r,[j.CONTEXT_DATA]:s};Xp(o,t,c,n)};fetchEndPointResource=(e,t,n)=>{Ws(e,{method:"GET"},j.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await nc(n);const r=this.createC11nEnv({meta:e,isRoot:!0});Of()||HC({}),_s.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{Zi.initServer(e,t,n)};loadView=async(e,t,n=[])=>{y();const r=Cu(e),a=qf.getIn(r,j.VIEWS),o=qf.getIn(r,j.NAVIGATIONS),s=qf.getIn(r,j.COMPONENTS)||[];s.push(...n);const i=qf.getIn(r,j.STATIC_SERVER_URL),c=qf.getIn(r,j.APPLICATION_DATA);a&&nf(a),o&&rf(o),(e=>{e&&(Bg=e.pyLabel)})(c),i&&Zi.initServer(i),await nc(s,i),this.renderApp(r,t)};initAppShell=(e,t,n)=>{im(e),ic.buildActionTargetMap(t),y(n)};initRoutingTable=(e,t)=>{im(e,!0),y(t)};setAppAlias=e=>{Zi.setAppAlias(e)};getHomeRestApi=e=>{const t=E(),{restApi:n}=zg("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(om()&&!t){const t=Sh(),r=Dh.processUrl(t,!0),a=Dh._getMatchedRouteInRoutingTable(r)||"",o=Dh.getRoutingInfo(),s=Dh.processUrl(t,!1).split("/"),i=s[s.length-1];let{caseID:c}=o&&o.routes[a].payload;c=c.replace("{workID}",i).replace("{id}",i),n=Dh.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=Dh.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,a,o)=>{const{config:s}=t||{},i=s?.name;if(Of()||HC({}),o){const e=`${j.APP.ROOT}/${i}`;ih(e),sh().deleteContainerItem(e)}(sh().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&Gf(),vf(ng({data:{},context:j.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${i}`}}),l=c.getPConnect(),d=`${l.getContextName()}/${l.getContainerName()}`;Rp(d)||"noPortal"===s?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const u=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await nc(u),_s.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:a})};loadViewByName=(e,t,n,r)=>{let a=this.getViewRestApi(e,n);a===E()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{sm(e)};checkIfSemanticURL=()=>om();onPCoreReady=e=>{_s.subscribe(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{_s.subscribe(F.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{vi.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{C(e)};setFetchDefaultHeaders=e=>{Ks(e)};setFetchAuthInfo=e=>{Js(e)};getCaseApi=()=>cu;getMashupApi=()=>YC;enableAppRouting=e=>{Wg(e)};initStore=()=>HC({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=xu({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}};const JC=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer||null,this.contextPath=e.contextPath,this.messagingService=e.messagingService||null,this.reAuthUrl=e.reAuthUrl||null}};const XC=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new JC(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1}},QC="@P .viewConfig";let ZC=0;const e_=new class{async init(e){const t=new XC(e),n={...t.environmentInfo,renderingMode:t.renderingMode};Wg(t.enableRouting),HC({}),$h.setTheme(t.theme),$h.setCookieComplianceMethod(t.cookieComplianceMethod),$h.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),vi.updateFieldDefaults(t.fieldDefaults),vi.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),Ms.setDefaultHeaders(t.additionalHeaders),this.#I(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),Zi.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),C(t.serviceConfig.googleMapKey),Zi.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),$h.setEnvironmentInfo(n),$h.setLocale(t.locale||navigator.language||"en-US"),Fh().setTimezone(t.timezone),V.setRemoteCaseMapping(t.remoteCaseMapping),wd.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),rc.init(),t.initBroadcast&&zC.getBroadcastUtils().init(),await wh()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=xu({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};importReactRoot=async()=>{const e=[];return KC.getComponentsRegistry().getComponent("ReactRoot")?.modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.setAttribute("async",t),a.onload=n(),a.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(a)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,a)=>{const o=new URLSearchParams(t);let s=!1;"true"===n&&(s=!0);let i=null,c=null,l=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1]),t.length>1&&"assignments"===t[2]&&t[3]&&(l=t[3])}else s=!1;let d=r;i&&(d=`${d}/${i}`),c&&(d=`${d}/${c}`),l&&(d=`${d}/assignments/${l}`),s&&(o.has("noPortal")||o.append("noPortal","true"),c&&a&&o.append("view",a));const u=o.toString();return d+=u?`?${u}`:"",d};initCoreConfig=async e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:a,noPortal:o,noHistory:s,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:d=!0,dynamicSemanticUrl:u=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:f}=e,{appAlias:g,contextPath:m}=n;let y=window.location.origin;const I={};if(void 0!==l&&(y=l),m&&(y=`${y}${m}`),g&&"LAUNCHPAD"!==h&&(y=`${y}/${g}`),e.restServerConfig=y,!0===u){const e=this.buildSemanticUrl(r,a,o,y,i);!s&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==d&&(I.dynamicLoadComponents=!1);let E=null;if(g){const e=g.indexOf("/app/");E=e>=0?g.substring(e+1):g}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===$h.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),f?.cspNonce&&(window.__webpack_nonce__=f.cspNonce),await this.init(e)};launchViewByName=(e,t,n,r,a,o,s,i)=>{ZC+=1;const c=i||`mashup${ZC}`,l={type:"RootContainer",config:{viewConfig:QC,renderingMode:"view",name:c}};KC.loadRootComponent(e,l,a,o,s).then((()=>KC.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,a,o,s)=>{ZC+=1;const i="hybrid"===s?`hybrid_${ZC}`:s;ZC+=1;const c=i||`mashup${ZC}`,l={type:"RootContainer",config:{viewConfig:QC,renderingMode:"portal",name:c}};s===j.HYBRID&&Zd.setRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME,c),Zd.setRuntimeParams(r),KC.loadRootComponent(e,l,n,a,o).then((()=>KC.updateStoreWithUiRoot(t,c,!1)))};launchPortal=async(e,t,n=`portal${ZC+=1}`,r=[])=>{const a={type:"RootContainer",config:{viewConfig:QC,renderingMode:"portal",skeleton:"LoadingComponent",name:n}},o=[...r,a.config.skeleton];$h.isPortalLoaded=!0;try{return await KC.loadRootComponent(e,a,o),KC.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0)=>{const r={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}KC.loadRootComponent(e,r,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&n(754)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:a,ccLibs:o,isAlternateDesignSystemEnabled:s,alternateDesignSystemName:i}=e;await this.initCoreConfig(e);const c=async()=>{await this.importReactRoot();const e=$h.environmentInfoObject?.pyC11nDXCBDevURL;return e&&await Zi.importCustomComponentMap(""),r&&!e&&await Zi.importCustomComponentMap(r),$h.environmentInfoObject?.pyInfinityStaticService&&o&&o.length>0&&await Promise.all(o.map((e=>Zi.importCustomComponentMap(e)))),"true"===s&&"other"!==i&&await this.importDesignSystemComponentMap(n,a,i),t&&t(),!0};return new Promise(((e,t)=>{(async()=>{try{const t=KC.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await c()):_s.subscribe("component-map-loaded",(async()=>{e(await c())}))}catch(e){t(e)}})()}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&(PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess"),PCore.getPubSubUtils().subscribe("fetchFailure",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchFailure"))};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")};#I(e,t,n){im(e),ic.buildActionTargetMap(t),y(n)}},t_={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Yg("createViewRuleByID");return Ws(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Yg("getViewRuleByID",{ID:e});return Ws(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=Yg("updateViewRuleByID",{ID:e});return Ws(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Yg("deleteViewRuleByID",{ID:e});return Ws(n,{method:r},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:r,reqType:a}=Yg("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Ws(r,{method:a,body:{calculations:{fields:n}}}).then((e=>e.data))}},n_={"Content-Type":"application/json"},r_={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Wi("addCaseFollower",{body:a,queryPayload:r,headers:n_},n)},deleteCaseFollower:(e,t,n)=>Wi("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Wi("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},a_={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Wi("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Wi("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Wi("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},o_="operatorDetails",s_={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Yg(o_,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Wi(o_,{queryPayload:t})}return t?Wi("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Wi(o_,{body:{dataViewParameters:{ID:e}}})}},i_="postCustomFeedMessages",c_={"Content-Type":"application/json"};const l_=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,o,s)=>{const i=o.getLocalizationService();s||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";s&&(l=o.getValue("pulse.pageLastEntry"));const d={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<a.length;e+=1)a[e].cancel();const u=zi();return a.push(u),Wi("getFeedMessages",{queryPayload:d,cancelTokenSource:u},o.getContextName()).then((async t=>{if(200===t.status&&t.data){a.pop();const n=[],c={};let l=!1,d=[];if(t?.data){if(d=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),l||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(l=!0)}))}if(l&&await _u({uiResources:t.data.uiResources}),!r&&(r=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)}));const t=r.find((e=>"All"===e.id));t&&(t.on=n)}}}if(s&&o.getValue("pulse.messageIDs")){let r=o.getValue("pulse.messageIDs"),a=o.getValue("pulse.messages");r=[...r,...n],a={...a,...c},Object.values(a).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),o.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:d,pulseContext:e}})}else o.updateState({pulse:{messages:c,messageIDs:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:d,pulseContext:e}});const u=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:u}}return o.reportError(`getFeeds call failed ${t.status}`,t.data),""})).catch((e=>{Yi(e)||o.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n,r=[],a=!1,o=[])=>{const s={message:t,context:e,parentMessageId:a?e:"",attachments:r,pyRecipients:o.length?o:void 0},i=0===o.length?{body:JSON.stringify(s),headers:c_}:{body:JSON.stringify(s),queryPayload:{type:"PegaSocial-Post-Private"},headers:c_};return Wi(o.length?i_:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const o=t?.data;if(a){o.parentMessageID=e;const{pxResults:t,caseMentions:s}=this.buildMessageObject(o,a,n,r.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),s}const{messages:s,messageIDs:i,caseMentions:c}=this.buildMessageObject(o,a,n,r.length>0);return n.updateState({pulse:{messages:s,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>Wi(i_,{body:t,queryPayload:{type:e},headers:c_},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const r=e.data.data,a={ID:r.ID,pzInsKey:r.ID,classID:r.classID,pyPostType:r.pyPostType,postedByUser:r.postedByUser,pyIsDeleteEnabled:r.pyIsDeleteEnabled,pyMessageViewReference:r.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:r.pyCommentContext,pyPostedOn:r.postedTime,pyFeedTitle:r.postedByUser.name,pyIconReference:r.postedByUser.ID},...r.PostMessage};Su(r.messageViewReference,n,t.context)||await _u({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[a.ID]:a,...n.getValue("pulse.messages")},messageIDs:[a.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:r,isReply:a=!1,recipients:o=[]})=>{const s=JSON.stringify({message:n,...o.length&&{pyRecipients:o}});return Wi("editFeedMessage",{queryPayload:{messageID:e},body:s,headers:c_},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),o}const{messages:o,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:o}}),s}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},o=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(o)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...a},e=n}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const s=n.getValue("pulse.messageIDs");if(s){const e=s.includes(a.ID)?{...o[a.ID],...a}:a,t={...o,[a.ID]:e};return{messages:t,messageIDs:s.includes(a.ID)?s:[a.ID,...s],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,pConnectObj:a})=>{const o=t?"unlikeFeedMessages":"likeFeedMessages",s=JSON.stringify({ContextClass:e});Wi(o,{body:s,queryPayload:{pulseContext:e},headers:c_},a.getContextName()).then((o=>{if(200===o.status)if(r){const r=a.getValue(`pulse.messages.${n}`),o=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const a=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=a-1,r=!1):(e=a+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));a.updateState({pulse:{messages:{[n]:{pxResults:o}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},o=r.pyLikes?r.pyLikes.pxLikeCount:0;let s=0,i=!1;t?(s=o-1,i=!1):(s=o+1,i=!0),r.pyLikes={pxLikeCount:s,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${o.status}`,o)})).catch((e=>{a.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n);Wi("deleteFeedMessage",{queryPayload:{messageID:a}},r.getContextName()).then((a=>{if(200===a.status)if(t){const t=r.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...r.getValue("pulse.messages")};delete a[e],r.updateState({pulse:{messageIDs:n,messages:a}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Wi("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:o=5}=e,s={pulseContext:n,searchFor:r,mentionsType:a,listSize:o};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=zi();return this.mentionsTagsCancelTokenSource.push(i),Wi("getMentionSuggestions",{queryPayload:s,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Yi(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Wi("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t)=>Wi("getViewRuleByMessageType",{queryPayload:{type:e}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,a={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const o=zi();return this.mentionsTagsCancelTokenSource.push(o),Wi("getTagSuggestions",{queryPayload:a,cancelTokenSource:o},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Yi(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},d_={getTaggedCases:(e,t)=>Wi("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Wi("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Wi("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Wi("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>Ld.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},u_=(e,t)=>{ch(t.getContextName(),e.etag),lh(t.getContextName(),e.etag)},p_={getParticipants:(e,t)=>Wi("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Wi("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Wi("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Wi("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r,a)=>{const o={caseID:e},s={...n,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Wi("createParticipant",{body:s,queryPayload:o,headers:i},r.getContextName()).then((t=>{u_(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=$l(a||r.getContextName());r.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},updateParticipant:async(e,t,n,r,a)=>{const o={caseID:e,participantID:t},s={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Wi("updateParticipant",{body:n,queryPayload:o,headers:s},r.getContextName()).then((t=>{u_(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=$l(a||r.getContextName());r.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Wi("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((t=>{u_(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function h_(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const f_="create",g_="update",m_="delete";function y_(e,t,n,r){const a=df(t);if(a){switch(e){case f_:case g_:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case m_:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const I_={},E_=async e=>{const t=df(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=h_(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Yg("getUIListPersonalizations",{listID:e});return Ws(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:h_(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},A_=async(e,t,n)=>{const{restApi:r,reqType:a}=Yg("createListPersonalization",{listID:e});return y_(f_,e,t,n),Ws(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return I_[t]=n,e}))},C_=async(e,t,n)=>{const r=I_[t]||t;y_(g_,e,t,n);const{restApi:a,reqType:o}=Yg("updateListPersonalization",{listID:e,personalizationID:r})||{};return Ws(a,{method:o,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},__=async(e,t)=>{const n=I_[t]||t;y_(m_,e,t);const{restApi:r,reqType:a}=Yg("deleteListPersonalization",{listID:e,personalizationID:n});return Ws(r,{method:a,body:{}}).then((e=>(I_[t]&&delete I_[t],e)))};const S_=function(e){return e?{createPersonalization:A_.bind(null,e),updatePersonalization:C_.bind(null,e),deletePersonalization:__.bind(null,e),fetchPersonalizations:E_.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},b_="getDataObjects",N_="getInsightByID",T_=["LocalList","RemoteList","PromptList","DataPage"];let P_=null;const O_={},v_=e=>Nd.getAppCacheKey(`PrimaryFields-${e}`);function D_(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const R_={getDataObjects:function(){const e=Nd.getAppCacheKey(b_);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(e)}`));const{restApi:t,reqType:n}=Yg(b_,{}),r=Ws(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(P_)return P_;const t=Nd.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Yg("getDataPages",{datapageRequestType:"explorable"});return P_=Ws(n,{method:r,datapageRequestType:"explorable"}),P_.then((e=>{P_=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),P_},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=lf(e);if(t&&t.classID){let e=pf(t.classID);const n=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(n&&!qf.isEmpty(n)){const r=n.reduce(((e,n)=>{const r=tf(n,t.classID);return e[n]=r,e}),{});e={...e,...r}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&T_.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:D_(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return zd.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=Nd.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Yg("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=Ws(n,{method:r,body:{dataViewParameters:e}});return a.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=lf(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=Nd.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(r)}`));const a=Nd.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return a.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),a},getPrimaryFieldsForDataSource:function(e="",t=""){const n=Nd.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(n)}`));const r=Nd.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:a,classesToFetch:o,isTopLevelClassPresent:s,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let a=!1;const o=[],s=[];return e&&s.push(e),t&&t.length>0&&s.push(...t),s.forEach((t=>{const s=v_(t);window.sessionStorage.getItem(s)||(O_[t]?r.push(O_[t]):(n.push(t),t===e?a=!0:o.push(t)))})),{allClasses:s,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:a,joinedClassesToFetch:o}}(e,n);return o.length&&a.push((async(e,t,n,r)=>{const a=Nd.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=v_(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete O_[e]}))}));return e.forEach((e=>{O_[e]=a})),a})(o,s?e:void 0,s?t:void 0,i.length>0?i:void 0)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const n=v_(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(`${window.sessionStorage.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=Yg("getInsightIDs");return Ws(e,{method:t})},getInsightByID:function(e){const t=uf(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=Yg(N_,n);return Ws(r,{method:a})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=Yg(N_,t);return Ws(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=Yg("createInsight");return Ws(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=Yg("updateInsight",n);let o;return"UpdateDateTime"in t&&(o=t.UpdateDateTime),Ws(r,{method:a,body:JSON.stringify(t),headers:{"if-match":o,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Yg("deleteInsight",t);return Ws(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Yg("exportToExcel");return Ws(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=Yg("exportToCSV");return Ws(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=Yg("scheduleInsight",n);return Ws(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:o}=Yg("updateScheduledInsight",r);return Ws(a,{method:o,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=Yg("deleteScheduledInsight",n);return Ws(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=Yg("translateStrings");return Ws(t,{method:n,body:JSON.stringify(e)})}};const $_=new class{addRoutes=e=>{return t=e,void Dh.addRoutes(t);var t}};const x_=class{static registerModule(e,t,n){n[e]=()=>t}};const w_=class{static getCaseEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)};const M_=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},L_={setTokens:e=>{Js({tokenInfo:e}),Ks(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>_s.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Ts(),getAuthInstance:e=>Ns.init(e),setAuthorizationHeader:e=>{Ks({Authorization:e}),setTimeout((()=>_s.publish("updateSession",{updateStatus:"success"})),0)}};const F_=new class{getDebouncedSubject(e){return(new Qy).pipe(ZA(e))}};ji.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,a=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${a}(\\x2e${a})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t="Enter a valid email address"),t})),ji.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),ji.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),ji.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";Promise.resolve().then(n.bind(n,57)).then((({parsePhoneNumberFromString:t})=>{ji.register("phone",(n=>{let r=null;n&&!/^\+?\d+$/.test(n)&&(r=e);const a=n?.startsWith("+");if(n&&a){const a=t(n);a&&a.isPossible()&&n===a.number||(r=e)}return r}))}))}),j.PRIORITY.TRIVIAL);const j_=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};ji.register("datetime",(e=>j_("DateTime",e))),ji.register("date",(e=>j_("Date",e))),ji.register("time",(e=>j_("Time",e)));const U_=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};ji.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=U_(e.pxResults):Array.isArray(e)?t=U_(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const k_="createConversation",V_="sendMessage",B_="getConversations",G_="getMessages",W_=(e,t,n,r,a,o,s)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=zi();return s.push(i),Wi(e,{queryPayload:B_===e?{assistantID:t,contextID:n,pageSize:r,pageIndex:a}:{agentID:t,contextID:n,pageSize:r,pageIndex:a},cancelTokenSource:i},o).then((e=>(s.pop(),e)))},H_=(e,t,n,r,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const o=zi();return a.push(o),Wi(e,{queryPayload:G_===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},r).then((e=>(a.pop(),e)))},q_=(e,t,n,r,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const o=zi();return a.push(o),Wi(e,{body:JSON.stringify({contextID:t,executeStarterQuestion:!1}),cancelTokenSource:o,queryPayload:e===k_?{assistantID:n}:{agentID:n}},r).then((e=>(a.pop(),e)))},z_=(e,t,n,r,a,o,s)=>{const i={...r&&{request:r},...o&&o?.length>0&&{attachments:o},...s&&{capabilities:{stream:{isEnabled:!0}}}};return Wi(e,{body:JSON.stringify(i),queryPayload:e===V_?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},...s&&{headers:{Accept:"text/event-stream"},adapter:"fetch",responseType:"stream"}},a)},Y_={createConversation:(e,t,n,r=[])=>q_(k_,e,t,n,r),sendMessage:(e,t,n,r,a)=>z_(V_,e,t,n,r,void 0,a?.enableStreaming),createConversationForAgent:(e,t,n,r=[])=>q_("createConversationForAgent",e,t,n,r),sendMessageForAgent:(e,t,n,r,a,o)=>z_("sendMessageForAgent",e,t,n,r,a,o?.enableStreaming),likeAgentMessage:(e,t,n,r)=>Wi("likeAgentMessage",{queryPayload:{agentID:e,conversationID:t,messageID:n}},r),unLikeAgentMessage:(e,t,n,r,a="")=>{const o={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:a})};return Wi("dislikeAgentMessage",o,r)},getConversations:(e,t,n,r,a,o=[])=>W_(B_,e,t,n,r,a,o),getConversationsForAgent:(e,t,n,r,a,o=[])=>W_("getConversationsForAgent",e,t,n,r,a,o),getMessages:(e,t,n,r=[])=>H_(G_,e,t,n,r),getMessagesForAgent:(e,t,n,r=[])=>H_("getMessagesForAgent",e,t,n,r)};const K_=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=$h.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class J_{static behaviorOverrides={};getPersonalizationUtils=S_;constructor(){J_.behaviorOverrides={}}getPCoreVersion=()=>"25.1.1";onPCoreReady=e=>KC.onPCoreReady(e);onPCoreCleanup=e=>KC.onPCoreCleanup(e);getComponentsRegistry=()=>KC.getComponentsRegistry();checkIfSemanticURL=()=>KC.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(om()){const e=Dh.processUrl(Sh(),!0);return!!Dh._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>$_;getViewResources=()=>i;configureForBrowserBookmark=e=>KC.configureForBrowserBookmark(e);getStore=()=>Of();resetStore=()=>Gf();getMessageManager=()=>Es;getCoexistenceManager=()=>zC;getStoreValue=(e,t,n)=>xf(e,t,n);getContainerUtils=()=>c;getAnnotationUtils=()=>td;getFieldUtils=()=>ei;getFieldDefaultUtils=()=>vi;getAssetLoader=()=>Zi;getAttachmentUtils=()=>Li;getViewRuleApi=()=>t_;getFeedUtils=()=>l_;getTagUtils=()=>d_;getGenAIAssistantUtils=()=>Y_;getStakeholderUtils=()=>p_;getUserApi=()=>s_;getCaseFollowerApi=()=>r_;getCaseUtils=()=>Ml;getStateUtils=()=>qc;getRelatedCasesApi=()=>a_;getDataApi=()=>zd;getDataApiUtils=()=>Nd;getAnalyticsUtils=()=>R_;getLocaleUtils=e=>{const t=e??$h.getLocale()??"en-US";return Zh(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{J_.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{J_.behaviorOverrides[e]=t};getBehaviorOverrides=()=>J_.behaviorOverrides;getBehaviorOverride=e=>J_.behaviorOverrides[e];getAsynchronousUtils=()=>F_;createPConnect=e=>xu(e);getPubSubUtils=()=>_s;registerComponentCreator=e=>{wu(e)};getConstants=()=>Object.freeze(F);getResolvedConstantValue=e=>j.getProperty(e);getEvents=()=>w_;getRestClient=()=>s;getMashupApi=()=>YC;getEnvironmentInfo=()=>$h;getRuntimeParamsAPI=()=>Zd;getSemanticUrlUtils=()=>lc;getRemoteCaseUtils=()=>V;getNavigationUtils=()=>rc;registerModule=(e,t)=>x_.registerModule(e,t,this);getErrorHandler=()=>M_;getFormUtils=()=>Al;getMessagingServiceManager=()=>wd;getMetadataUtils=()=>l;getDataPageUtils=()=>Ld;getDataTypeUtils=()=>ed;getCascadeManager=()=>bf;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>L_;getDebugger=()=>Ss;getDeferLoadManager=()=>Sd;getExpressionEngine=()=>r;getActionsSequencer=()=>eu;getRefreshManager=()=>Kd;getInitialiser=()=>e_;getBootstrapUtils=()=>KC;getContextTreeManager=()=>ss;getAccessPrivilege=()=>K_.getInstance();getObjectTransformer=()=>L;getAllStateMachines=(e,t,n)=>t&&n?Cl.getAllStateMachines(e,t,n):Cl.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>!1;getQualifiedName=(e,t)=>e;getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform")}const X_=new J_;globalThis.PCore=X_})()})();
|
|
2
2
|
//# sourceMappingURL=constellation-core-react-native.js.map
|