@pega/constellationjs 24.1.1-dev → 24.1.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.
@@ -0,0 +1 @@
1
+ (()=>{var e={933:(e,t,n)=>{"use strict";var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function a(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function s(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:s()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var a=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&s(),a},subscribe:a})}}},923:(e,t,n)=>{e.exports=n(933)},303:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,s[a]))return!1;for(a=r;0!=a--;){var o=s[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},924:(e,t,n)=>{var r="__lodash_hash_undefined__",a=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=s||o||Function("return this")();function c(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var a=e.length,s=-1;++s<a;)if(t(e[s],s,e))return s;return-1}(e,l);for(var r=-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}(e,t)>-1}function d(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function l(e){return e!=e}function u(e,t){return e.has(t)}var p,h=Array.prototype,g=Function.prototype,f=Object.prototype,y=i["__core-js_shared__"],m=(p=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",I=g.toString,E=f.hasOwnProperty,A=f.toString,_=RegExp("^"+I.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=i.Symbol,C=f.propertyIsEnumerable,$=h.splice,b=S?S.isConcatSpreadable:void 0,P=Math.max,O=L(i,"Map"),T=L(Object,"create");function N(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 v(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 R(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 D(e){var t=-1,n=e?e.length:0;for(this.__data__=new R;++t<n;)this.add(e[t])}function x(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 w(e,t,n,r,a){var s=-1,o=e.length;for(n||(n=j),a||(a=[]);++s<o;){var i=e[s];t>0&&n(i)?t>1?w(i,t-1,n,r,a):d(a,i):r||(a[a.length]=i)}return a}function M(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 L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||m&&m in e)return!1;var t=B(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:a;return t.test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e){return V(e)||function(e){return G(e)&&E.call(e,"callee")&&(!C.call(e,"callee")||"[object Arguments]"==A.call(e))}(e)||!!(b&&e&&e[b])}N.prototype.clear=function(){this.__data__=T?T(null):{}},N.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},N.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return n===r?void 0:n}return E.call(t,e)?t[e]:void 0},N.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:E.call(t,e)},N.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?r:t,this},v.prototype.clear=function(){this.__data__=[]},v.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():$.call(t,n,1),0))},v.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},v.prototype.has=function(e){return x(this.__data__,e)>-1},v.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new N,map:new(O||v),string:new N}},R.prototype.delete=function(e){return M(this,e).delete(e)},R.prototype.get=function(e){return M(this,e).get(e)},R.prototype.has=function(e){return M(this,e).has(e)},R.prototype.set=function(e,t){return M(this,e).set(e,t),this},D.prototype.add=D.prototype.push=function(e){return this.__data__.set(e,r),this},D.prototype.has=function(e){return this.__data__.has(e)};var U,F,k=(U=function(e,t){return G(e)?function(e,t,n,r){var a=-1,s=c,o=!0,i=e.length,d=[],l=t.length;if(!i)return d;t.length>=200&&(s=u,o=!1,t=new D(t));e:for(;++a<i;){var p=e[a],h=p;if(p=0!==p?p:0,o&&h==h){for(var g=l;g--;)if(t[g]===h)continue e;d.push(p)}else s(t,h,r)||d.push(p)}return d}(e,w(t,1,G,!0)):[]},F=P(void 0===F?U.length-1:F,0),function(){for(var e=arguments,t=-1,n=P(e.length-F,0),r=Array(n);++t<n;)r[t]=e[F+t];t=-1;for(var a=Array(F+1);++t<F;)a[t]=e[t];return a[F]=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)}(U,this,a)}),V=Array.isArray;function G(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!B(e)}(e)}function B(e){var t=H(e)?A.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=k},174:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=p||h||Function("return this")(),f=Array.prototype,y=Function.prototype,m=Object.prototype,I=g["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,C=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=g.Symbol,b=f.splice,P=M(g,"Map"),O=M(Object,"create"),T=$?$.prototype:void 0,N=T?T.toString:void 0;function v(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 R(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 D(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 x(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 w(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 M(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!k(e)||E&&E in e)return!1;var t=function(e){var t=k(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}v.prototype.clear=function(){this.__data__=O?O(null):{}},v.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},v.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:_.call(t,e)},v.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new v,map:new(P||R),string:new v}},D.prototype.delete=function(e){return w(this,e).delete(e)},D.prototype.get=function(e){return w(this,e).get(e)},D.prototype.has=function(e){return w(this,e).has(e)},D.prototype.set=function(e,t){return w(this,e).set(e,t),this};var L=U((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function U(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],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(U.Cache||D),n}U.Cache=D;var F=Array.isArray;function k(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=function(e,t){if(F(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!V(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:F(n=t)?n:L(n);for(var r=0,a=t.length;null!=e&&r<a;)e=e[j(t[r++])];return r&&r==a?e:void 0}(e,t);return void 0===r?n:r}},207:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=9007199254740991,i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,y=g||f||Function("return this")(),m=Array.prototype,I=Function.prototype,E=Object.prototype,A=y["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,C=E.hasOwnProperty,$=E.toString,b=RegExp("^"+S.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=y.Symbol,O=E.propertyIsEnumerable,T=m.splice,N=F(y,"Map"),v=F(Object,"create"),R=P?P.prototype:void 0,D=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 j(e,t){return null!=e&&C.call(e,t)}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 F(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!q(e)||_&&_ in e)return!1;var t=H(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:p;return t.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}x.prototype.clear=function(){this.__data__=v?v(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===a?void 0:n}return C.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:C.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a: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():T.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(N||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 k=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(l,(function(e,t,r,a){n.push(r?a.replace(u,"$1"):t||e)})),n}));function V(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-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],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(G.Cache||M),n}G.Cache=M;var B=Array.isArray;function H(e){var t=q(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function W(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 Y(e){return"symbol"==typeof e||z(e)&&"[object Symbol]"==$.call(e)}e.exports=function(e,t){return null!=e&&function(e,t,n){var r;t=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||c.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:B(r=t)?r:k(r);for(var a,s=-1,d=t.length;++s<d;){var l=V(t[s]);if(!(a=null!=e&&n(e,l)))break;e=e[l]}return a||!!(d=e?e.length:0)&&W(d)&&function(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}(l,d)&&(B(e)||function(e){return function(e){return z(e)&&function(e){return null!=e&&W(e.length)&&!H(e)}(e)}(e)&&C.call(e,"callee")&&(!O.call(e,"callee")||"[object Arguments]"==$.call(e))}(e))}(e,t,j)}},828:(e,t,n)=>{e=n.nmd(e);var r,a,s,o="[object Map]",i="[object Promise]",c="[object Set]",d="[object WeakMap]",l="[object DataView]",u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=p||h||Function("return this")(),f=t&&!t.nodeType&&t,y=f&&e&&!e.nodeType&&e,m=y&&y.exports===f,I=Function.prototype,E=Object.prototype,A=g["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,C=E.hasOwnProperty,$=E.toString,b=RegExp("^"+S.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m?g.Buffer:void 0,O=E.propertyIsEnumerable,T=P?P.isBuffer:void 0,N=(a=Object.keys,s=Object,function(e){return a(s(e))}),v=V(g,"DataView"),R=V(g,"Map"),D=V(g,"Promise"),x=V(g,"Set"),w=V(g,"WeakMap"),M=!O.call({valueOf:1},"valueOf"),L=B(v),j=B(R),U=B(D),F=B(x),k=B(w);function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!Y(e)||function(e){return!!_&&_ 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)?b:u;return t.test(B(e))}(n)?n:void 0}var G=function(e){return $.call(e)};function B(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(v&&G(new v(new ArrayBuffer(1)))!=l||R&&G(new R)!=o||D&&G(D.resolve())!=i||x&&G(new x)!=c||w&&G(new w)!=d)&&(G=function(e){var t=$.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?B(n):void 0;if(r)switch(r){case L:return l;case j:return o;case U:return i;case F:return c;case k:return d}return t});var H=Array.isArray;function W(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!z(e)}var q=T||function(){return!1};function z(e){var t=Y(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(W(e)&&(H(e)||"string"==typeof e||"function"==typeof e.splice||q(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&W(e)}(e)&&C.call(e,"callee")&&(!O.call(e,"callee")||"[object Arguments]"==$.call(e))}(e)))return!e.length;var t=G(e);if(t==o||t==c)return!e.size;if(M||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)}(e))return!N(e).length;for(var n in e)if(C.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Array]",i="[object Boolean]",c="[object Date]",d="[object Error]",l="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",f="[object RegExp]",y="[object Set]",m="[object String]",I="[object WeakMap]",E="[object ArrayBuffer]",A="[object DataView]",_=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[o]=C[E]=C[i]=C[A]=C[c]=C[d]=C[l]=C[u]=C[p]=C[h]=C[f]=C[y]=C[m]=C[I]=!1;var $="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,P=$||b||Function("return this")(),O=t&&!t.nodeType&&t,T=O&&e&&!e.nodeType&&e,N=T&&T.exports===O,v=N&&$.process,R=function(){try{return v&&v.binding&&v.binding("util")}catch(e){}}(),D=R&&R.isTypedArray;function x(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 w(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function M(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var L,j,U,F=Array.prototype,k=Function.prototype,V=Object.prototype,G=P["__core-js_shared__"],B=k.toString,H=V.hasOwnProperty,W=(L=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",q=V.toString,z=RegExp("^"+B.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=N?P.Buffer:void 0,K=P.Symbol,X=P.Uint8Array,J=V.propertyIsEnumerable,Q=F.splice,Z=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(j=Object.keys,U=Object,function(e){return j(U(e))}),re=Te(P,"DataView"),ae=Te(P,"Map"),se=Te(P,"Promise"),oe=Te(P,"Set"),ie=Te(P,"WeakMap"),ce=Te(Object,"create"),de=De(re),le=De(ae),ue=De(se),pe=De(oe),he=De(ie),ge=K?K.prototype:void 0,fe=ge?ge.valueOf:void 0;function ye(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 me(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 Ie(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 Ee(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new me(e);this.size=t.size}function _e(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=H.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[Z]=n:delete e[Z]),a}(e):function(e){return q.call(e)}(e)}function Ce(e){return ke(e)&&Se(e)==s}function $e(e,t,n,r,a){return e===t||(null==e||null==t||!ke(e)&&!ke(t)?e!=e&&t!=t:function(e,t,n,r,a,l){var g=Me(e),I=Me(t),_=g?o:ve(e),S=I?o:ve(t),C=(_=_==s?h:_)==h,$=(S=S==s?h:S)==h,b=_==S;if(b&&Le(e)){if(!Le(t))return!1;g=!0,C=!1}if(b&&!C)return l||(l=new Ae),g||Ve(e)?be(e,t,n,r,a,l):function(e,t,n,r,a,s,o){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!s(new X(e),new X(t)));case i:case c:case p:return xe(+e,+t);case d:return e.name==t.name&&e.message==t.message;case f:case m:return e==t+"";case u:var l=w;case y:var h=1&r;if(l||(l=M),e.size!=t.size&&!h)return!1;var g=o.get(e);if(g)return g==t;r|=2,o.set(e,t);var I=be(l(e),l(t),r,a,s,o);return o.delete(e),I;case"[object Symbol]":if(fe)return fe.call(e)==fe.call(t)}return!1}(e,t,_,n,r,a,l);if(!(1&n)){var P=C&&H.call(e,"__wrapped__"),O=$&&H.call(t,"__wrapped__");if(P||O){var T=P?e.value():e,N=O?t.value():t;return l||(l=new Ae),a(T,N,n,r,l)}}return!!b&&(l||(l=new Ae),function(e,t,n,r,a,s){var o=1&n,i=Pe(e),c=i.length;if(c!=Pe(t).length&&!o)return!1;for(var d=c;d--;){var l=i[d];if(!(o?l in t:H.call(t,l)))return!1}var u=s.get(e);if(u&&s.get(t))return u==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=o;++d<c;){var g=e[l=i[d]],f=t[l];if(r)var y=o?r(f,g,l,t,e,s):r(g,f,l,e,t,s);if(!(void 0===y?g===f||a(g,f,n,r,s):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var m=e.constructor,I=t.constructor;m==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof I&&I instanceof I||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,a,l))}(e,t,n,r,$e,a))}function be(e,t,n,r,a,s){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var l=-1,u=!0,p=2&n?new Ee:void 0;for(s.set(e,t),s.set(t,e);++l<i;){var h=e[l],g=t[l];if(r)var f=o?r(g,h,l,t,e,s):r(h,g,l,e,t,s);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!x(t,(function(e,t){if(o=t,!p.has(o)&&(h===e||a(h,e,n,r,s)))return p.push(t);var o}))){u=!1;break}}else if(h!==g&&!a(h,g,n,r,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function Pe(e){return function(e,t,n){var r=t(e);return Me(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,Ge,Ne)}function Oe(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 Te(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Fe(e)||function(e){return!!W&&W in e}(e))&&(je(e)?z:_).test(De(e))}(n)?n:void 0}ye.prototype.clear=function(){this.__data__=ce?ce(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(ce){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:H.call(t,e)},ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ce&&void 0===t?r:t,this},me.prototype.clear=function(){this.__data__=[],this.size=0},me.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,0))},me.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},me.prototype.has=function(e){return _e(this.__data__,e)>-1},me.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ye,map:new(ae||me),string:new ye}},Ie.prototype.delete=function(e){var t=Oe(this,e).delete(e);return this.size-=t?1:0,t},Ie.prototype.get=function(e){return Oe(this,e).get(e)},Ie.prototype.has=function(e){return Oe(this,e).has(e)},Ie.prototype.set=function(e,t){var n=Oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,r),this},Ee.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new me,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof me){var r=n.__data__;if(!ae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this};var Ne=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,s=[];++n<r;){var o=e[n];t(o)&&(s[a++]=o)}return s}(ee(e),(function(t){return J.call(e,t)})))}:function(){return[]},ve=Se;function Re(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function De(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function xe(e,t){return e===t||e!=e&&t!=t}(re&&ve(new re(new ArrayBuffer(1)))!=A||ae&&ve(new ae)!=u||se&&ve(se.resolve())!=g||oe&&ve(new oe)!=y||ie&&ve(new ie)!=I)&&(ve=function(e){var t=Se(e),n=t==h?e.constructor:void 0,r=n?De(n):"";if(r)switch(r){case de:return A;case le:return u;case ue:return g;case pe:return y;case he:return I}return t});var we=Ce(function(){return arguments}())?Ce:function(e){return ke(e)&&H.call(e,"callee")&&!J.call(e,"callee")},Me=Array.isArray,Le=te||function(){return!1};function je(e){if(!Fe(e))return!1;var t=Se(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ke(e){return null!=e&&"object"==typeof e}var Ve=D?function(e){return function(t){return e(t)}}(D):function(e){return ke(e)&&Ue(e.length)&&!!C[Se(e)]};function Ge(e){return null!=(t=e)&&Ue(t.length)&&!je(t)?function(e,t){var n=Me(e),r=!n&&we(e),a=!n&&!r&&Le(e),s=!n&&!r&&!a&&Ve(e),o=n||r||a||s,i=o?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 d in e)!H.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Re(d,c))||i.push(d);return i}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||V))return ne(e);var t,n,r=[];for(var a in Object(e))H.call(e,a)&&"constructor"!=a&&r.push(a);return r}(e);var t}e.exports=function(e,t){return $e(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Function]",i="[object Object]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[s]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[o]=l["[object Map]"]=l["[object Number]"]=l[i]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var u,p,h,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,y=g||f||Function("return this")(),m=t&&!t.nodeType&&t,I=m&&e&&!e.nodeType&&e,E=I&&I.exports===m,A=E&&g.process,_=function(){try{return I&&I.require&&I.require("util").types||A&&A.binding&&A.binding("util")}catch(e){}}(),S=_&&_.isTypedArray,C=Array.prototype,$=Function.prototype,b=Object.prototype,P=y["__core-js_shared__"],O=$.toString,T=b.hasOwnProperty,N=(u=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",v=b.toString,R=O.call(Object),D=RegExp("^"+O.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=E?y.Buffer:void 0,w=y.Symbol,M=y.Uint8Array,L=(x&&x.allocUnsafe,p=Object.getPrototypeOf,h=Object,function(e){return p(h(e))}),j=Object.create,U=b.propertyIsEnumerable,F=C.splice,k=w?w.toStringTag:void 0,V=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=x?x.isBuffer:void 0,B=Math.max,H=Date.now,W=ie(y,"Map"),q=ie(Object,"create"),z=function(){function e(){}return function(t){if(!Ee(t))return{};if(j)return j(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Y(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 K(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 X(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 J(e){var t=this.__data__=new K(e);this.size=t.size}function Q(e,t,n){(void 0!==n&&!pe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Z(e,t,n){var r=e[t];T.call(e,t)&&pe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(pe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?function(e){var t=T.call(e,k),n=e[k];try{e[k]=void 0;var r=!0}catch(e){}var a=v.call(e);return r&&(t?e[k]=n:delete e[k]),a}(e):function(e){return v.call(e)}(e)}function re(e){return Ae(e)&&ne(e)==s}function ae(e,t,n,r,a){e!==t&&function(e,t,n){for(var r=-1,a=Object(e),s=n(e),o=s.length;o--;){var i=s[++r];if(!1===t(a[i],i))break}}(t,(function(s,o){if(a||(a=new J),Ee(s))!function(e,t,n,r,a,s,o){var c=le(e,n),d=le(t,n),l=o.get(d);if(l)Q(e,n,l);else{var u,p,h,g,f,y=s?s(c,d,n+"",e,t,o):void 0,m=void 0===y;if(m){var I=ge(d),E=!I&&ye(d),A=!I&&!E&&_e(d);y=d,I||E||A?ge(c)?y=c:Ae(f=c)&&fe(f)?y=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):E?(m=!1,y=function(e,t){return e.slice()}(d)):A?(m=!1,g=new(h=(u=d).buffer).constructor(h.byteLength),new M(g).set(new M(h)),p=g,y=new u.constructor(p,u.byteOffset,u.length)):y=[]:function(e){if(!Ae(e)||ne(e)!=i)return!1;var t=L(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&O.call(n)==R}(d)||he(d)?(y=c,he(c)?y=function(e){return function(e,t,n,r){var a=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var i=t[s],c=void 0;void 0===c&&(c=e[i]),a?te(n,i,c):Z(n,i,c)}return n}(e,Se(e))}(c):Ee(c)&&!me(c)||(y=function(e){return"function"!=typeof e.constructor||de(e)?{}:z(L(e))}(d))):m=!1}m&&(o.set(d,y),a(y,d,r,s,o),o.delete(d)),Q(e,n,y)}}(e,t,o,n,ae,r,a);else{var c=r?r(le(e,o),s,o+"",e,t,a):void 0;void 0===c&&(c=s),Q(e,o,c)}}),Se)}Y.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},Y.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Y.prototype.get=function(e){var t=this.__data__;if(q){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},Y.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:T.call(t,e)},Y.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},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(W||K),string:new Y}},X.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return oe(this,e).get(e)},X.prototype.has=function(e){return oe(this,e).has(e)},X.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},J.prototype.clear=function(){this.__data__=new K,this.size=0},J.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},J.prototype.get=function(e){return this.__data__.get(e)},J.prototype.has=function(e){return this.__data__.has(e)},J.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};var se=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:be;function oe(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 ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ee(e)||function(e){return!!N&&N in e}(e))&&(me(e)?D:c).test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ce(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function le(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=H(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(se);function pe(e,t){return e===t||e!=e&&t!=t}var he=re(function(){return arguments}())?re:function(e){return Ae(e)&&T.call(e,"callee")&&!U.call(e,"callee")},ge=Array.isArray;function fe(e){return null!=e&&Ie(e.length)&&!me(e)}var ye=G||function(){return!1};function me(e){if(!Ee(e))return!1;var t=ne(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ie(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var _e=S?function(e){return function(t){return e(t)}}(S):function(e){return Ae(e)&&Ie(e.length)&&!!l[ne(e)]};function Se(e){return fe(e)?function(e,t){var n=ge(e),r=!n&&he(e),a=!n&&!r&&ye(e),s=!n&&!r&&!a&&_e(e),o=n||r||a||s,i=o?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 d in e)o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ce(d,c))||i.push(d);return i}(e):function(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}(e)}var Ce,$e=(Ce=function(e,t,n,r){ae(e,t,n,r)},function(e,t){return ue(function(e,t,n){return t=B(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=B(r.length-t,0),o=Array(s);++a<s;)o[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(o),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,void 0,be),e+"")}((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(a=Ce.length>3&&"function"==typeof a?(r--,a):void 0,s&&function(e,t,n){if(!Ee(n))return!1;var r=typeof t;return!!("number"==r?fe(n)&&ce(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var o=t[n];o&&Ce(e,o,n,a)}return e})));function be(e){return e}e.exports=$e},8:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),y=Array.prototype,m=Function.prototype,I=Object.prototype,E=f["__core-js_shared__"],A=(r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=m.toString,S=I.hasOwnProperty,C=I.toString,$=RegExp("^"+_.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=f.Symbol,P=y.splice,O=j(f,"Map"),T=j(Object,"create"),N=b?b.prototype:void 0,v=N?N.toString:void 0;function R(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 D(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 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,t,n){var r=e[t];S.call(e,t)&&G(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function M(e,t){for(var n=e.length;n--;)if(G(e[n][0],t))return n;return-1}function L(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 j(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||A&&A in e)return!1;var t=function(e){var t=H(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:u;return t.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function U(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}R.prototype.clear=function(){this.__data__=T?T(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return n===a?void 0:n}return S.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:S.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?a:t,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0||(n==t.length-1?t.pop():P.call(t,n,1),0))},D.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},D.prototype.has=function(e){return M(this.__data__,e)>-1},D.prototype.set=function(e,t){var n=this.__data__,r=M(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new R,map:new(O||D),string:new R}},x.prototype.delete=function(e){return L(this,e).delete(e)},x.prototype.get=function(e){return L(this,e).get(e)},x.prototype.has=function(e){return L(this,e).has(e)},x.prototype.set=function(e,t){return L(this,e).set(e,t),this};var F=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return v?v.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function k(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function V(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],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(V.Cache||x),n}function G(e,t){return e===t||e!=e&&t!=t}V.Cache=x;var B=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==C.call(e)}e.exports=function(e,t,n){return null==e?e:function(e,t,n,r){if(!H(e))return e;t=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!W(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return B(e)?e:F(e)}(t);for(var a=-1,s=t.length,c=s-1,d=e;null!=d&&++a<s;){var l=k(t[a]),u=n;if(a!=c){var p=d[l];void 0===(u=void 0)&&(u=H(p)?p:U(t[a+1])?[]:{})}w(d,l,u),d=d[l]}return e}(e,t,n)}},795:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=p||h||Function("return this")(),f=Array.prototype,y=Function.prototype,m=Object.prototype,I=g["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,C=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=g.Symbol,b=f.splice,P=L(g,"Map"),O=L(Object,"create"),T=$?$.prototype:void 0,N=T?T.toString:void 0;function v(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 R(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 D(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 x(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 w(e){return V(e)?e:U(e)}function M(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 L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!G(e)||E&&E in e)return!1;var t=function(e){var t=G(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e,t){if(V(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!B(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}v.prototype.clear=function(){this.__data__=O?O(null):{}},v.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},v.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:_.call(t,e)},v.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new v,map:new(P||R),string:new v}},D.prototype.delete=function(e){return M(this,e).delete(e)},D.prototype.get=function(e){return M(this,e).get(e)},D.prototype.has=function(e){return M(this,e).has(e)},D.prototype.set=function(e,t){return M(this,e).set(e,t),this};var U=k((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function k(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],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(k.Cache||D),n}k.Cache=D;var V=Array.isArray;function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t){return null==e||function(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=j(t,e)?[t]:w(t)).length;null!=e&&n<r;)e=e[F(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 s=Array(a);++r<a;)s[r]=e[r+t];return s}(t,0,-1))}(e,t=j(t,e)?[t]:w(t));var n,r,a=F((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&_.call(e,a))||delete e[a]}(e,t)}},386: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=d(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 s=this.gen_table();this.table=s,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=s[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:s}=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)&s}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+a^e[o])]<<a^t<<8-a&s<<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=d(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=d(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=d(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=d(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,s="";for(let o=0;o<r;o++){let r="";for(let s=0;s<a;s++){let a=e[o<<n|s];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}s+=" "+r+"\n"}return s="[\n"+s.slice(0,-3)+"\n]",s}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class s{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 o extends s{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 s{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 o;throw Error("either need TypedArrays or Buffer")}function d(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const l={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,s){let o=new t(e,n,r,a,s);return o.calculate.bind(o)},makeBufferConverter:c,models:l,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in l){let n=l[t];e.exports[t]=n.calculate.bind(n)}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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:()=>ge,buildModalContext:()=>Ie,buildTransientContextName:()=>fe,getContainerIdFromContext:()=>Ae,getParentContext:()=>Ee,getParentContextName:()=>he,getTargetFromContext:()=>me,getTransientContext:()=>ye});var t={};n.r(t),n.d(t,{getResolvedTargetName:()=>vt,getRoutingInfo:()=>Rt,getSemanticURLFromRoutingInfo:()=>Dt});var r={};n.r(r),n.d(r,{evaluate:()=>on,handleChange:()=>an,hasDeclareExpression:()=>rn,updateDeclareExpressions:()=>sn});var a={};n.r(a),n.d(a,{publishExpressions:()=>Wr,publishResponse:()=>qr});var s={};n.r(s),n.d(s,{CONTAINER_NAMES:()=>Ya,CONTAINER_TYPES:()=>za,addRootContainerItem:()=>bs,areContainerItemsPresent:()=>es,clearTransientData:()=>Ns,closeContainerItem:()=>$s,getActiveContainerItemContext:()=>ds,getActiveContainerItemIDFromRoutingInfo:()=>Vs,getActiveContainerItemName:()=>ss,getActiveContext:()=>js,getChildContainerItems:()=>ls,getChildContainers:()=>us,getChildContainersContexts:()=>ps,getContainerAPI:()=>Ds,getContainerAccessOrder:()=>Za,getContainerData:()=>Xa,getContainerItemData:()=>Ja,getContainerItemName:()=>ns,getContainerItems:()=>Qa,getContainerLimit:()=>ms,getContainerParentContext:()=>ks,getContainerType:()=>as,getContextByTargetAndKey:()=>Fs,getDataContextName:()=>cs,getFlowContainer:()=>Gs,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Ss,getRootContainerName:()=>Ls,getSuggestionContexts:()=>hs,getTargetFromContainerItemID:()=>Cs,getTransientItems:()=>Ts,hasContainerItems:()=>ys,isContainerDirty:()=>_s,isContainerInitialized:()=>rs,isContainerItemActive:()=>os,isContainerItemContextBeingUsedInOtherContainers:()=>Os,isContainerItemExists:()=>ts,isContainerLimitReached:()=>Es,isContainerMultipleMode:()=>fs,isContainerSingleMode:()=>gs,purgeTransientData:()=>vs,removeContainer:()=>xs,resetContainersPayload:()=>As,setContainerLimit:()=>Is,updateCaseContextEtag:()=>Ms,updateParentLastUpdateTime:()=>Us,updateRelatedContextEtag:()=>ws});var o={};n.r(o),n.d(o,{hasBrowserEnv:()=>Zo,hasStandardBrowserEnv:()=>ti,hasStandardBrowserWebWorkerEnv:()=>ni,navigator:()=>ei,origin:()=>ri});var i={};n.r(i),n.d(i,{getAdditionalInfo:()=>zl,getDataPageKeys:()=>Hl,getDataPageMetadata:()=>jl,getEmbeddedPropertyMetadata:()=>Rl,getFieldParameters:()=>Vl,getFieldsByClassName:()=>kl,getInsight:()=>Fl,getLookUpDataPage:()=>Wl,getLookUpDataPageInfo:()=>ql,getParagraph:()=>Gl,getPersonalizationMetadata:()=>Ul,getPropertyMetadata:()=>vl,getResolvedFieldMetadata:()=>Yl,getSavableDataPage:()=>Bl,mergeStore:()=>Nl,resolveNavigation:()=>Ll,resolveView:()=>Ml,updateNavigationStore:()=>xl,updateStores:()=>wl,updateViewStore:()=>Dl});var c={};n.r(c),n.d(c,{dispatch:()=>nu,getActionType:()=>du,getContextValue:()=>iu,getDataObject:()=>ru,getReferenceTokens:()=>Zl,getSharedDataObject:()=>au,getStore:()=>tu,getValue:()=>ou,isMergeable:()=>uu,lookupContextValue:()=>cu,mergeDeep:()=>pu,removeItem:()=>lu,replaceValue:()=>gu,resetStore:()=>fu,setStore:()=>eu,updateValue:()=>hu});var d={};n.r(d),n.d(d,{activateContainerItem:()=>Vu,addContainerItem:()=>wu,addMessages:()=>Gu,addSharedData:()=>Qu,addTransientItem:()=>Mu,addWork:()=>vu,clearTransientData:()=>ju,createWork:()=>$u,error:()=>Ju,finishAssignment:()=>zu,initContainers:()=>Du,listAction:()=>ep,loadView:()=>Tu,mergeData:()=>Pu,openAssignment:()=>Yu,openWorkByHandle:()=>Ru,postProcess:()=>Xu,purgeTransientData:()=>Uu,removeAllTransientItems:()=>Hu,removeContainerItem:()=>Bu,removeSharedData:()=>Zu,removeTransientItem:()=>Wu,replaceContainerItem:()=>qu,resetContainers:()=>xu,setSharedProperty:()=>np,setStateProperty:()=>rp,showCasePreview:()=>tp,showHarness:()=>Ou,showHistory:()=>Ku,showPage:()=>Nu,upMergeAndRemoveContainerItem:()=>ku,updateContainerItem:()=>Fu,updateTransientData:()=>Lu});var l={};n.r(l),n.d(l,{doesRestApiExist:()=>_g,getCancelTokenSource:()=>Sg,getCaseApi:()=>bg,getHeaderProcessor:()=>Ig,invokeCustomRestApi:()=>Ag,invokeRestApi:()=>Eg,isRequestCanceled:()=>Cg,registerInterceptor:()=>$g});var u={};n.r(u),n.d(u,{fetchViewResources:()=>Kf,updateViewResources:()=>Yf});var p=n(722),h=n.n(p);let g,f,y;const m=e=>{e&&(g=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},g.BASEURL=e.server,g.ACTIONURL=e["action-end-point"],g.DATAURL=e["data-end-point"],y=e.reAuthUrl)},I=()=>y,E=()=>g.BASEURL,A=e=>{f=e};var _=n(386),S=n(795),C=n.n(S),$=n(207),b=n.n($),P=n(174),O=n.n(P),T=n(8),N=n.n(T),v=n(431),R=n.n(v),D=n(828),x=n.n(D);const w={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let M;const L=new Uint8Array(16);function j(){if(!M&&(M="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!M))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return M(L)}const U=[];for(let e=0;e<256;++e)U.push((e+256).toString(16).slice(1));const F=function(e,t,n){if(w.randomUUID&&!t&&!e)return w.randomUUID();const r=(e=e||{}).random||(e.rng||j)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return U[e[t+0]]+U[e[t+1]]+U[e[t+2]]+U[e[t+3]]+"-"+U[e[t+4]]+U[e[t+5]]+"-"+U[e[t+6]]+U[e[t+7]]+"-"+U[e[t+8]]+U[e[t+9]]+"-"+U[e[t+10]]+U[e[t+11]]+U[e[t+12]]+U[e[t+13]]+U[e[t+14]]+U[e[t+15]]}(r)},k={APP:{APP:"app",ROOT:"root",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"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit"},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"}},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",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO_CONTENT:"dataInfo.content"},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_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"},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",ASSIGMENT:"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_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_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone"},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"},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",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"}},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",ASSIGMENT_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"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"}},V={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PRIMARY:"primary",MODAL:"modal",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_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",CONTENT:"content",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",MESSAGES:"messages__",PAGE_ERRORS:"page_level_errors",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",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",UI_RESOURCERS:"uiResources",UI_RESOURCERS_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCERS:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",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",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",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",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},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",CONTEXT_DATA_MODAL_VIEW:{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"},...k},G=class{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Au.getProperty(".RemoteSystemID",V.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))}},B=/{(.*?)}/i,H=/{(.*?)}/g,W=e=>null!==e.match(B),q=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),z=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`}},Y=()=>q(window.location.pathname),K=(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)}},X=new class{constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",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._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.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta},this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{W(e)?this.dynamicRoutesList?.push(e):this.staticRoutesList?.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>q(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>q(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,""),q(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t)||"");const{routeKey:r,payload:a}=this.appRoutes[n],{reqType:s,endPoint:o,params:i}=this.appRoutesMeta[r].restApi,c={...a},{caseClassName:d,caseID:l}=c;if(G.isRemoteCase(d)){const{RemoteClassGroup:e,RemoteSystemID:t}=G.getRemoteCase(d);c.caseID=l?.replace(d,e?.toUpperCase()),c.RemoteSystemID=t}const u={routeKey:r,requestType:s,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(u,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this._buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;W(r)&&r.match(H)?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}));const s=Ep(a),o=new URL(s);return!this.getPortalName()||o.searchParams.toString().indexOf("portal=")>=0||o.searchParams.append("portal",this.getPortalName()),o.toString()}_buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta[e],a=r.split("/").length,s=r.split("/"),o=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return s.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const r=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const s=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(mu.isEmpty(s)||mu.isEmpty(a)?o:Object.keys(a).every((e=>Object.prototype.hasOwnProperty.call(s,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_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 s=new URLSearchParams(a),o={};for(const[r,a]of s.entries())if("string"==typeof a&&W(a)){const s=this._getDynamicKeyName(a);o[r]=n?t[s]||e[s.toLowerCase()]:t[s]}else"string"==typeof a&&(o[r]=a);return`${r}?${new URLSearchParams(o).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&&t.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const s=a.match(H);if(s)for(let e=0;e<s.length;e+=1){const n=s[e].replace("{","").replace("}",""),r=new RegExp(s[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,s]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),d=o.split("/"),l={};for(let e=0;e<d.length;e+=1)r[e]=d[e],W(d[e])&&(l[this._getDynamicKeyName(d[e])]=c[e],r[e]=c[e]);const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(s),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in u)W(u[e])?l[e]=p[e]||h[e.toLowerCase()]:l[e]=u[e];let g;s&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,l,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!W(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(H);for(let a=0;a<t.length;a+=1){const s=t[a],o=this._getDynamicKeyName(s);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(s,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} 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 in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=e[r];if("string"==typeof a&&W(a)){const e=a.match(H);for(let n=0;n<e.length;n+=1){const r=e[n],s=this._getDynamicKeyName(r);if(void 0!==t[s]){const e=t[s];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in payload- {${s}} is missing in semantic url construct`)}n[r]=a}else"object"==typeof a&&(n[r]=this._resolvePayloadRecursive(a,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList?.find((t=>t.toLowerCase()===e.toLowerCase()));_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],s=t.split("/");if(s.length!==r.length)return!1;let o=0;for(o=0;o<s.length;o+=1){const e=s[o].toLowerCase();if(!W(e)&&e!==r[o]&&z(e)!==r[o])return!1}if(a){const e=new URLSearchParams(n),t=new URLSearchParams(a),r=new Set,s=new Set;for(const t of e.keys())r.add(t.toLowerCase());for(const e of t.keys())s.add(e.toLowerCase());if(s.size!==r.size)return!1;for(const e of r)if(!s.has(e))return!1}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{K(e,t,"warning"),K("Error in Generated Routing Table",null,"error"),K("Back | Forward for this page may NOT work as intended",null,"warning"),K("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},J=X,Q=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}}(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels},Z=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"}setEnvironmentInfo(e){this.environmentInfoObject=e}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 J.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}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(V.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}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication.pyBuiltOnApplications}setPreviewMode(){Q.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}},ee="text/javascript",te=new class{constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId=""}getTypes={SCRIPT:"script",STYLE:"link"};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.charAt(this.staticServerURL.length-1)?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=Z.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r),s=this.loadAndCustomerComponentsConfig(t),o=this.fetchSDKComponent(t),i=[];if(await Promise.all([a,s,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=(e=[])=>{const[t=[],n=[],r=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,s=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(s).length>0?{...e,alternateDesignSystemConfig:{...s}}: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((e=>{this.componentsConfig=e})).catch()}else e=Promise.resolve();return e}async loadAndCustomerComponentsConfig(e){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(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(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()}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}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}async importCustomComponentMap(e){fetch(`${this.appStaticUrl}v100/componentlib/componentsmap/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>(e.ok||console.error("Error while fetching custom component map"),e))).then((e=>e.text())).then((t=>{this.setCCV2LibId(e);const n=document.createElement("script");n.src=window.URL.createObjectURL(new Blob([t],{type:ee})),n.onload=()=>console.log("Custom component lib map loaded"),n.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(n)})).catch((e=>{console.error("Exception while appending custom component map : "),console.error(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:ee})),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={};return t=e?this.loaderObj[e]:(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);"script"===t?(a.onload=()=>{n(e)},a.onerror=()=>{r(e)},a.type=ee,a.charset="UTF-8",a.async=!1,a.src=e):(a.type="text/css",a.rel="stylesheet",a.href=e),document.head.appendChild(a)})).catch((e=>{console.log(e)})),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)?.tenant_id,{restApi:s,reqType:o}=hp("getAssetsFromIsolations",{isolationID:a,assetPath:e})||{},i=`${this.appStaticUrl}${s}`;return fetch(i,{method:o,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},ne=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),s=e.substring(r,a+1),[o,i]=this.getKeyAndValue(s);this.addKeyToMap(o,i),n+=`${s.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),s=e.substring(r,a+1);n+=this.keyMap[s],t=a+1}return n}};class re{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";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||e;this.localeStore[t]=n};getLocaleForRule=(e=this.GENERIC_BUNDLE_KEY)=>this.localeStore[e];resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n=this.GENERIC_BUNDLE_KEY){let r=!1;e&&"string"==typeof e&&(r=e.includes("@P ")),r&&(e=ne.formatLocaleKey(e)),t=t?`${t}.fields`:"fields";const a=this.localeStore[n.toUpperCase()],s=a?mu.getIn(a,t,{}):{};return r?ne.replaceWithValue(s[e]||e):s[e]||e}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}static async getLocaleJsons(e){const t=Z.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:te.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 s;try{s=await e.value.json()}catch{s=null}s&&n.push({localeRuleKey:a.localeRuleKey,jsonData:s})}})))}return n}async loadLocaleResources(e){const t=Z.getUseLocale(),n=Z.getBaseLocale();if(Z&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await re.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}}const ae=new re;let se;const oe=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=se.getValue(t);return se.registerAdditionalProps({[t]:`@P ${t}`}),e}}},ie=class{static getParagraphStream(e,t){return((e,t)=>{se=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,oe);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}},ce=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={}){mu.copy(e,this.componentMap)}mergeOverrideMap(e={}){mu.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}},de=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},le=class{static handleAnnotation(e,t){const n=e.indexOf(" "),r=-1===n?e:e.substring(0,n),a=de.getHandler(r);return a?a(e.substring(n+1),t):e}static trimAnnotation(e){if(!mu.isString(e))return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return de.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=ce.getComponent(t.type);if(!r||!r.mapping)return;const a=r.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:r}=t;if(!r)return;const s=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,s);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];s.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&&mu.isString(e)){const t=e.startsWith(V.PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(mu.isString(e)&&e?.startsWith(V.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return mu.isString(e)&&!!e?.startsWith(V.PROPERTY_ANNOTATION)}},ue={},pe=new Map,he=e=>{let t=V.EMPTY_STRING;return t=e&&e.includes(V.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},ge=(e,t,n=!1)=>{let r=V.EMPTY_STRING;if(t&&e){let a=`${t}${V.FORWARD_SLASH_STRING}${e}`;const s=Xa(a);if(s||t!==V.APP.APP&&t!==V.APP.ROOT)if(s){if(n&&ue[a])return r=`${a}${V.UNDERSCORE_STRING}${ue[a]}`,r;ue[a]?ue[a]+=1:ue[a]=1,r=`${a}${V.UNDERSCORE_STRING}${ue[a]}`}else r=ge(e,he(t));else a=`${t}${V.FORWARD_SLASH_STRING}${V.PRIMARY}`,ue[a]?ue[a]+=1:ue[a]=1,r=`${a}${V.UNDERSCORE_STRING}${ue[a]}`}return r},fe=(e,t)=>{if(e&&t){const n=(pe[t]?.[e]??0)+1;return pe[t]||(pe[t]={}),pe[t][e]=n,`${t}${V.FORWARD_SLASH_STRING}${e}_${n}`}return""},ye=(e,t)=>{if(e&&t){const n=pe[t]?.[e];return n?`${t}${V.FORWARD_SLASH_STRING}${e}_${n}`:fe(e,t)}return""},me=e=>{let t=V.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},Ie=(e,t)=>{if(null===e)return t;const[,n]=t.split(V.FORWARD_SLASH_STRING);return e+V.FORWARD_SLASH_STRING+n},Ee=e=>{const t=e.indexOf(V.FORWARD_SLASH_STRING),n=e.lastIndexOf(V.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},Ae=e=>{const t=e.split(V.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+V.FORWARD_SLASH_STRING+t[2]},_e="SET_PROPERTY",Se="REPLACE_PROPERTY",Ce="FIELD_CHANGE",$e="LOAD_VIEW",be="SHOW_PAGE",Pe="SHOW_DATA",Oe="SHOW_INSIGHT",Te="SHOW_DASHBOARD",Ne="SET_LOADING",ve="RESET_LOADING",Re="SET_SHARED_PROPERTY",De="CREATE_WORK",xe="OPEN_WORK_BY_HANDLE",we="UPDATE_DOCUMENT",Me="FINISH_ASSIGNMENT",Le="CANCEL_ASSIGNMENT",je="OPEN_ASSIGNMENT",Ue="MERGE_DATA",Fe="REMOVE_ITEM",ke="GET_DATAOBJECT_ACTIONS",Ve="SHOW_HISTORY",Ge="ERROR",Be="INIT_CONTAINERS",He="RESET_CONTAINERS",We="ADD_CONTAINER_ITEM",qe="REMOVE_CONTAINER_ITEM",ze="ADD_TRANSIENT_ITEM",Ye="UPDATE_TRANSIENT_DATA",Ke="REMOVE_TRANSIENT_ITEM",Xe="REMOVE_ALL_TRANSIENT_ITEMS",Je="CLEAR_TRANSIENT_DATA",Qe="PURGE_TRANSIENT_DATA",Ze="ACTIVATE_CONTAINER_ITEM",et="UPDATE_CONTAINER_ITEM",tt="UPMERGE_AND_REMOVE_CONTAINER_ITEM",nt="REPLACE_CONTAINER_ITEM",rt="ACTIVATE_MODAL_CONTAINER_ITEM",at="REMOVE_CONTAINER",st="ADD_SUGGESTION_CONTEXT",ot="showView",it="showData",ct="showInsight",dt="showDashboard",lt="openWorkByHandle",ut="openAssignment",pt="createNewWork",ht="SHOW_CANCEL_ALERT",gt="openLocalAction",ft="openProcessAction",yt="caseWideActions",mt="openBulkAction",It="ADD_MESSAGES",Et="CLEAR_MESSAGES",At="RESET_STORE",_t="FETCH_DATAPAGE",St="ADD_SHARED_DATA",Ct="REMOVE_SHARED_DATA",$t="LIST_ACTION",bt="DELETE_CASE_SUMMARY",Pt="ALTER_BLOCKING_ACTION_COUNT",Ot="OPEN_EMBEDDED_DATA_MODAL",Tt="SUBMIT_EMBEDDED_DATA_MODAL",Nt="FILL_FORM_WITH_AI",vt=(e,t)=>{if(!e||!t)return null;let n,r=V.EMPTY_STRING;return t&&(r=`${t}${V.FORWARD_SLASH_STRING}${e}`,n=Xa(r),n||t.includes("/")?n||(r=vt(e,he(t))):r=`${t}${V.FORWARD_SLASH_STRING}${e}`),r},Rt=(e,t)=>{const n=vt(e,t);return n&&Xa(n)?Xa(n):{}},Dt=(e,t)=>J.getSemanticURL(ot,{page:e},t),xt=new class{error=e=>{console.error(e)}};class wt{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Gt[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=Vt[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}=Gt[this._state];this._subParser=new wt(this._grammar,e,t)}_endSubExpression(){Gt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,wt._setParent(e,this._position)):this._tree=e,this._position=e}}const Mt=wt,Lt="identifier",jt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Ut={operatorType:"binaryOperator",precedence:1,evaluate:(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)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":jt,AND:jt,and:jt,"||":Ut,OR:Ut,or:Ut,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)}},kt={BinaryExpression:function(e){const t=[];let n="";return t[0]=this.evaluateAST(e.left),e.left.operationType===Lt&&this._context&&(n=this._context.getFieldMetadata(e.left.value.substring(1))?.type??""),t[1]=e.right?this.evaluateAST(e.right,n):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]: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){return this._grammar[e.operator].evaluate(e.right)}},Vt={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;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};Mt._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:Lt,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Gt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:Lt},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Vt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Bt=["binaryOperator","unaryOperator","openParenthesis"],Ht=/^\s*$/,Wt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,qt=/\\\\/,zt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Yt=["[a-zA-Z_.\\$][(0-9)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]+)"],Kt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Xt{constructor(e){this._grammar=e}static _isNegative(e){return Bt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Ht)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(Wt)&&(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(qt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Xt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[zt.join("|"),e.join("|"),Yt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=Xt._unquote(e):e.match(Kt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(Wt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Xt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Xt._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 Jt=Xt,Qt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new class{constructor(e,t){this._grammar={...Ft},this._expression=e,this._ast=null,this._context={},this._localDataObject=t}buildAST(){const e=new Jt(this._grammar).tokenize(this._expression),t=new Mt(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e){return this._context=e,this.evaluateAST(this._ast)}evaluateAST(e,t){return kt[e.operationType].call(this,e,t)}}(n,t)},Zt=e=>!e||e.buildAST(),en=(e,t)=>!e||e.evaluate(t),tn=(e,t,n)=>{const r=Qt(e,t),a=Zt(r);return en(a,n)},nn={},rn=(e,t)=>nn[t]&&Object.prototype.hasOwnProperty.call(nn[t],e),an=e=>{const{context:t}=e;rn(e.reference,t)&&class{static handleExpression(e,t,n,r){(e=>fetch(g.BASEURL+g.ACTIONURL,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:this.getContext(e,r)}}).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:Au.getProperyValue(`${n}.pxObjClass`,null,t)||Au.getProperyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>nu({type:_e,payload:{context:t,reference:n,value:e[n]}})))}}.handleExpression(e.reference,e.value,nn[t][e.reference],t)},sn=(e={})=>{mu.copy(e,nn)},on=(e,t,n)=>tn(e,t,n?.pConnect.getPConnect()),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(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);t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(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]}},dn=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"create"===n[e].transitionType&&"active"===n[e].visited_status}return!1},ln=(e,t)=>{if(e&&t){const n=mu.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},un=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},pn=(e,t)=>{const n=Au.getProperyValue(k.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Au.getProperyValue(k.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===k.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}return e&&!r&&(a=ru(e)?.context_data?.actionType===V.CASE),a},hn=e=>iu(null,V.CASE_VIEW_MODE_PROP,e)===V.PERFORM_MODE&&(e.includes(V.WORKAREA)||e.includes(V.MODAL)),gn=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},fn=(e,t,n)=>{let r,a,s,o,i,c,d;const l=ru(e);return n?.isTriggeredFromDifferentContext?(r=l.caseInfo.assignments[0].ID,a=l.caseInfo.ID,s=l.caseInfo.assignments,o=l.caseInfo.activeActionID,i=l.caseInfo.availableActions,c=l.caseInfo,d=l.caseInfo.businessID):(r=t.getValue(k.CASE_INFO.ASSIGNMENT_ID),a=t.getValue(k.CASE_INFO.CASE_INFO_ID),s=t.getValue(k.CASE_INFO.ASSIGNMENTS),o=t.getValue(k.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(k.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(k.CASE_INFO.CASE_INFO),d=t.getValue(k.CASE_INFO.BUSINESS_ID)),{assignmentID:r,caseID:a,assignments:s,localActionID:o,caseActions:i,caseInfo:c,businessID:d}},yn=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&&nu({type:Ne,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]&&nu({type:ve,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)}},mn=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",s,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:s};return this.actionMgrActions[e]=i,o&&yn.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));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),yn.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),yn.disableLoadingIndicator(r.actionPayload,t)):a=null,a}},In="REFRESH_DATA",En=e=>({type:In,payload:e}),An={},_n=(e,t,n,r,a)=>{e&&n&&t&&(r&&(r=mu.convertPageRefToClipboardPageNotation(r)),nu(En({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r})))},Sn=(e,t,n)=>{An[t]||(An[t]={}),An[t][e]||(An[t][e]={pageReference:n})},Cn=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;return!!vl(n.propertyName,e.getValue(V.CLASS_ID,n.pageName))?.isDeclarativeTarget},$n=(e,t,n)=>{const r=pn(e,t),a=Au.getProperyValue(k.CASE_INFO.ACTIVE_ACTION_ID,t,e)?Au.getProperyValue(k.CASE_INFO.ACTIVE_ACTION_ID,t,e):Au.getProperyValue(k.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let s;s=r?Au.getProperyValue(k.CASE_INFO.CASE_INFO_ID,t,e):Au.getProperyValue(k.CASE_INFO.ASSIGNMENT_ID,t,e)?Au.getProperyValue(k.CASE_INFO.ASSIGNMENT_ID,t,e):Au.getProperyValue(k.CONTEXT_DATA_ASSIGNMENTID,t,e),((e,t,n,r,a)=>{if(!(e&&n&&t))return;const s=a.actionMgrID||mn.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...a,actionMgrID:s}};a.isFillFormWithAI?nu((e=>({type:Nt,payload:e}))(o)):nu(En(o))})(s,a,e,r,n)},bn=e=>{const{context:t,pageReference:n}=e,r=(e=>An[e]&&Object.keys(An[e]).length>0&&hn(e))(t);if(r)if(Au.getProperyValue(V.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=Au.getProperyValue(k.CASE_INFO.CASE_INFO_ID,n,t),r=Au.getProperyValue(V.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),a=Au.getProperyValue(V.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);_n(e,r,t,a,{})}else $n(t,n,{})},Pn=(e,t)=>(e?.options?.refreshFor&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&(t+="?fillFormWithAI=true"),t),On=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 getFieldLabel(e){let t=e.getConfigProps().label;if(!t&&"function"==typeof e.getInheritedProps){const n=e.getInheritedProps();(n.showLabel??1)&&(t=n.label)}return t}};class Tn{constructor(e,t){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return this.references.get(e)}getNode(e,t){return this.children.find((n=>n.type===e&&n.name===t))}addNode(e,t){let n=this.getNode(e,t);return n||(n=new Tn(e,t),n.parent=this,this.children.push(n)),n}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)})),this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}}const Nn=Tn,vn=e=>{if((e?.split(".")??[]).length<3)return[e];let t,n=e?.split("]")[0]?.split(".")?.pop();return n=`${n}]`,e=e?.split(n)[0],e=e?.substring(0,e.length-1),[n,t]=n.split("["),t=t?.split("]")[0],[e,n,t]},Rn=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new Nn("CONTEXT",e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return this.rootNodes[e]}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}addViewNode(e,t,n,r){const a=this.addContextNode(e).addNode("PAGE",t);let s=null;return s=r&&n!==r?this._addParentViewNode(e,t,r).addNode("VIEW",n):a.addNode("VIEW",n),a.addReference(n,s),s}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r){r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),s=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",r);return s&&a.addReference(`${t}.${r}`,s),s}getPageListNode(e,t,n,r){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)?.getNode("PAGELIST",r)}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode("FIELD",r)}addFieldNode(e,t,n,r,a){const s=this.addContextNode(e),[o]=vn(t);let i=s.addNode("PAGE",o)?.getReference(n);i||(i=this.addViewNode(e,t,n));const c=i.addNode("FIELD",`${t}${r}`);if(c){const e=`${o}${r}`,n=`${t}${r}`;s.addReference(e,c),s.addReference(n,c),c.value=a,c.setPreviousDefaultValue()}return c}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),[s,o,i]=vn(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,s,o,{...r,rowIndex:i}),a?.getReference(`${t}.${n}`)?.triggerEvent(r)}onPageListMutate(e,t,n,r,a){this.getPageListNode(e,t,n,r)?.addEventListener(a)}mutatePageList(e,t,n,r){this.getContextNode(e)?.getReference(`${t}.${n}`)?.triggerEvent(r)}getFieldsList(e){return this.getContextNode(e)?.references}getFieldReferencePreviousValue(e,t){return this.getContextNode(e)?.references?.get(t)?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(t);r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}},Dn={CONTENT_FIELDS_PATH:[V.CONTEXT_DATA,V.CASE_INFO.CASE_INFO,V.CONTENT],FIELD_MESSAGES_PATH:[V.CONTEXT_DATA,V.CASE_INFO.CASE_INFO,V.CONTENT,V.SUMMARY_OF_MESSAGES,V.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[V.CONTEXT_DATA,V.SUMMARY_OF_MESSAGES,V.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[V.CONTEXT_DATA,V.SUMMARY_OF_MESSAGES,V.HTTP_MESSAGES],CASE_MESSAGE_PATH:[V.CASEMESSAGES]},xn=(e="",t="",n,r)=>{let a,s=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===V.PROPERTY&&e||e){s=[V.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)s.push(a[e]);s.push(V.SUMMARY_OF_MESSAGES,V.PROPERTY_MESSAGES,a[a.length-1])}else n===k.PAGE?s=[...Dn.PAGE_MESSAGES_PATH]:n===V.HTTP?s=[...Dn.HTTP_MESSAGES_PATH]:n===V.CASEMESSAGES?s=[...Dn.CASE_MESSAGE_PATH]:r&&(s=[V.CONTEXT_DATA,...o.split(".")]);return s.filter(Boolean)},wn=(e,t,n)=>{const r={content:{}},a=`${t}[${n}]`;return e?.content[a]&&(r.content={[a]:e.content[a]}),r},Mn=(e,t,n,r,a,s,o={})=>{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=`${s}[${r}]`;o[`${s}[${r+("up"===c?1:-1)}]`]=mu.getIn(e[t],[V.CONTEXT_DATA,...a.split(".")]),mu.deleteIn(e[t],[V.CONTEXT_DATA,...a.split(".")])}));const d=Object.keys(o);d.length>0&&d.forEach((n=>{mu.setIn(e[t],[V.CONTEXT_DATA,...n.split(".")],o[n])}))},Ln=e=>{const{type:t,property:n,category:r,context:a,pageReference:s}=e;let o;n&&(o=n.slice(1));const i=ru(a);let c=[];const d=mu.getIn(i,xn(o,s,r));return t&&"all"!==t?(d&&Array.isArray(d)&&d.length>0&&(c=d.filter((e=>e.type===t))),t===k.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&Rn.mutateField(a,s,n,{messages:[...c],type:k.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):d},jn=e=>{const{property:t,pageReference:n,category:r,context:a,type:s,isListEntry:o,clearContextMessages:i,deletingIndex:c}=e,d={context:a,type:s};t&&!o?(Rn.mutateField(a,n,t,{type:Et,fieldName:t}),d.property=t,d.pageReference=n):o?(d.pageReference=n,d.isListEntry=o,d.deletingIndex=c):d.category=r,nu(i?{type:Et,payload:{stateObj:e.stateObj,context:a}}:{type:Et,payload:d})},Un=e=>{const{messages:t,property:n,pageReference:r,category:a,context:s}=e,o={messages:t,context:s};n?(o.property=n,o.pageReference=r):o.category=a,nu({type:It,payload:o})},Fn=(e,t,n)=>{for(const r of Object.keys(e))t.push(r),r===V.SUMMARY_OF_MESSAGES?n.push([...t]):"object"==typeof e[r]&&Fn(e[r],t,n),t.pop();return n},kn=(e,t)=>{let n=Ln({context:V.APP.ROOT,category:"HTTP"});if(e){const e=Ln({context:t,category:"HTTP"});n?e&&(n=n.concat(Ln({context:t,category:"HTTP"}))):n=Ln({context:t,category:"HTTP"})}return n},Vn=e=>{let t=null;t=us(e)[0]?ss(us(e)[0]):e,t&&jn({context:t,stateObj:ru(t),clearContextMessages:!0})},Gn={addMessages:Un,getValidationErrorMessages:e=>{const t=ru(e),n=[],r=mu.getIn(t,[...Dn.CONTENT_FIELDS_PATH])||{};return Fn(r,[],[]).forEach((e=>{const t=mu.getIn(r,[...e,V.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].length&&t[e][0].type===V.MESSAGES.MESSAGES_TYPE_ERROR&&(t[e][0].fieldLabel?n.push({label:`${t[e][0].fieldLabel}:`,description:t[e][0].message}):n.push(t[e][0].message))}))})),n},getMessages:Ln,clearMessages:jn,getRootContainerHttpMessages:kn,clearContextMessagesInActiveWorkArea:Vn},Bn=Gn,Hn=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:mu.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||nu(ep({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}},Wn=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 class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}}(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)||[];t?r.forEach(((e,r)=>{t.forEach((t=>{const a=Ir(t),s={};let o=!0;n&&(s[Ir(n)]=F(),o=!1);const i={[a]:e[a],...s};this.update(i,r+1,o,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(n&&!e[Ir(n)]){const e={};e[Ir(n)]=F(),this.update(e,t+1,!1,{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 a=class{static execute(e,t,n,r,a,s){const o={instruction:"UPDATE",content:{...mu.unflatten(r)}},i={content:{...o.content},target:mu.buildInstructionPageReference(a,t),listIndex:n,instruction:"UPDATE"};return s||nu(ep({...o,listIndex:n-1,context:e,referenceList:`${a}${t}`})),i}}.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:s=!1,skipPageinstruction:o}=r;if(!o){if(this.initChangeList(t-1),!s){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=pu(mu.deepClone(n),e,r)}if(this.current?.automatic!==s||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(a),s&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=pu(mu.deepClone(t),mu.unflatten(e),r)}}}delete(e,t){const n=class{static execute(e,t,n){return{target:mu.buildInstructionPageReference(n,e),listIndex:t,instruction:"DELETE"}}}.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||nu(ep({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:a,actionPayload:s={content:{}},displayPropertPayload:o={}}=class{static execute(e,t,n,r){const a={};Object.prototype.hasOwnProperty.call(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const s={instruction:"INSERT",content:{...mu.unflatten(n)}},o=JSON.parse(JSON.stringify(s));return delete o.content.classID,{instruction:{target:mu.buildInstructionPageReference(r,e),content:{...o.content},listIndex:t,instruction:"INSERT"},actionPayload:s,displayPropertPayload:a}}}.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList(t-1),!i){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=pu(mu.deepClone(n),e,r)}this.insertNode(a),n||(s.content={...s.content,...o},nu(ep({...s,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e){const t=class{static execute(e,t,n,r){return{content:{...{...mu.unflatten(n)}},target:mu.buildInstructionPageReference(r,t),instruction:"REPLACE"}}}.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=class{static execute(e,t){return{target:mu.buildInstructionPageReference(t,e),instruction:"DELETE"}}}.execute(this.target,this.pageReference);this.insertNode(e)}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=class{static execute(e,t,n,r){return{target:mu.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}}.execute(this.target,e,t,this.pageReference);this.insertNode(r),nu(ep({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=Hn.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),Hn.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=pu(mu.deepClone(t),e)}},qn={},zn={},Yn={},Kn=(e,t,n)=>{const r=e.getContextName();qn[r]||(qn[r]={}),qn[r][t]||(qn[r][t]={content:[]}),zn[r]||(zn[r]=[],Yn[r]=[]),gr.isStateMachineExist(r,n,t)||gr.setStateMachine(r,t,n,new Wn(t,n,r))},Xn=e=>On.formatPageReference(e),Jn=(e,t)=>{const n=zn[e],r=Yn[e],a=Ir(t),s=a?.substring(0,a.indexOf("["));r?.indexOf(s)<0&&Yn[e].push(s),n?.indexOf(a)<0&&zn[e].push(a)},Qn=e=>{delete zn[e]},Zn=e=>gr.buildPageInstructionsByContext(e),er=e=>gr.buildPageInstructionsByContext(e,!0),tr=e=>{gr.clearStateMachines(e),delete qn[e]},nr=(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]})))},rr=(e,t,n,r,a)=>{const{skipStateUpdate:s=!1}=a,o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),d=Xn(i);Kn(n,d,c),Jn(o,`${i}[${t}]`),nr(i,c,e,t);const l={instruction:V.LIST_ACTIONS.INSERT,content:{...mu.unflatten(e)}};delete JSON.parse(JSON.stringify(l)).content.classID,gr.getStateMachine(o,c,d).insert(e,t+1,s,{})},ar=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},sr=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(ar(e,n)){let n=mu.getPropertyName(e);if(n=n.substr(n.indexOf(".")+1).split("."),n.length>1){let e=mu.getIn(t,n)??"";if(!e){const r=`!P!${n.join(":")}`;e=mu.getIn(t,r)??""}mu.setIn(r,n,e)}else{const e=mu.getIn(t,n)??"";r[n[n.length-1]]=e}}})),r},or=(e,t,n,r,a)=>{const s=e.getValue(t)||{};n&&Object.keys(s).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},ir=e=>{if(!e)return!1;const t=er(e);return Array.isArray(t)&&t.length>0},cr=(e,t,n)=>{const{skipStateUpdate:r=!1}=n,a=e.getPageReference(),s=Xn(t);Kn(e,t,a),gr.getStateMachine(e.getContextName(),a,s).deleteAll(r)},dr=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?mu.mergeDeep(e,this.fieldDefaults):mu.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class lr{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;if("true"===o.required||!0===o.required){let c=r;switch(e){case"radiobuttons":c=o.value;break;case"attachment":{const e=s.getPageReference().replace(k.CASE_INFO.CASE_INFO_CONTENT,"").replace(k.DATA_INFO.DATA_INFO_CONTENT,"");c=(ou(`.attachmentsList${e}.${t.replace(".","")}`,"context_data",a)||[]).filter((e=>!e.delete)),0===c?.length&&(c="");break}case"checkbox":c&&"false"!==c||(c="");break;default:"string"==typeof c&&(c=c.trim())}i=this.getValidator("required")(c),lr.messageDispatcher(t,n,a,i,On.getFieldLabel(s))}return i}validateType(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;const c={pageReference:s.getPageReference(),context:a,property:t,target:s.getTarget()};let d=dr.getDefaultsforType(s.getComponentName())?.["client-validations"];!1!==d&&this.getValidator(e)&&(i=this.getValidator(e)(r,c),""!==r&&lr.messageDispatcher(t,n,a,i,o.label));const l=o.validationType;return d=l&&dr.getDefaultsforType(l)?.["client-validations"],!1!==d&&l&&this.getValidator(l)&&(i=this.getValidator(l)(r,c),lr.messageDispatcher(t,n,a,i,o.label)),i}validate(e,t,n,r){const a=r.getContextName();let s=null;if(!r.getConfigProps().disabled&&!r.getConfigProps().readOnly){const o=r.getPageReference();r.skipRequiredValidation()||(s=this.validateRequired(e,t,o,n,a,r)),s||(s=this.validateType(e,t,o,n,a,r))}return{message:s}}static messageDispatcher(e,t,n,r,a){if(r){const s=[];s.push({type:k.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),Un({messages:s,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const ur=new lr;class pr{static getChanges(e){return{...Fr(e)}}static getPageInstructions(e){return{pageInstructions:Zn(e)}}static isStateModified(e){return Gr(e)||ir(e)||!!Vr(e)}static isFormValid(e){return Nr(e)}static clearChangedProperties(e){return tr(e),Qn(e),Br(e)}static getEditableFields(e){return vr(e)}static setCustomValidator(e,t){ur.register(e,t)}static isPropertyEditable(e,t){return pr.getEditableFields(e).some((e=>e.name===t))}}const hr=pr,gr=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}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:s}=this.getStateMachineObjByPath(a,e,!0);if(s&&s.targetPageReference!==r.targetPageReference)return s.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][a]||(this.unConnectedStates[e][a]={}),void(this.unConnectedStates[e][a]=r);this.states[e]||(this.states[e]={}),this.states[e][a]||(this.states[e][a]={}),this.states[e][a]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((e=>{const a=n[e];if(a.visibility){const e=a.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}})),mu.flatten(n,"",r),r}getStateMachinesByContext(e){return this.states?.[e]}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){this.getStateMachine(e,t,"").root=null;const n=this.getUnConnectedStateMachines(e)||{};Object.keys(n).forEach((e=>{e.includes(t)&&delete n[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let a=null;for(;e&&!this.isStateMachineExist(t,"",e);)a=null,n&&e.endsWith("]")?(a=e.match(r),a=a[a.length-1].substring(1,a[a.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:a}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:s,index:o}=this.getStateMachineObjByPath(t,e,r);if(!s)return!1;let[,i]=t.split(s);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Ir(i)]:n},d=this.getStateMachine(e,"",s);return null!==o?d.update(c,Number(o)+1,a.skipStateUpdate??!0,a):d.updatePage(mu.unflatten(c)),!0}registerForServerChanges(){Jl.registerForListChanges(((e,t,n)=>{t.indexOf(".classID")<0&&hr.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Jl.unRegisterForListChanges()}},fr={},yr={},mr={},Ir=e=>e.startsWith(".")?e.substring(1):e,Er=(e="",t="")=>`${Ir(t)}${e?".":""}${Ir(e)}`,Ar=e=>{delete fr[e],delete yr[e],delete mr[e]},_r=(e,t,n)=>{let r=t;return mr[e]?.[n]&&Object.keys(mr[e][n]).length&&Object.keys(mr[e][n]).forEach((a=>{const s=mr[e][n][a]?.getConfigProps();if(s.visibility||!Object.hasOwn(s,"visibility")){const s=mr[e][n][a];s.isMounted=t.isMounted,r=s}})),r},Sr=(e,t,n)=>{((e,t,n)=>{if(fr[e]){const r=fr[e].fieldOrder[t];((e,t,n,r)=>{n&&r&&n.getStateProps().visibility!==r.getStateProps().visibility&&(mr[e]||(mr[e]={}),mr[e][t]||(mr[e][t]={}),mr[e][t][r.getStateProps().visibility]=r,mr[e][t][n.getStateProps().visibility]||(mr[e][t][n.getStateProps().visibility]=n))})(e,t,r,n),r&&!r.getConfigProps().readOnly&&n.getConfigProps().readOnly||(fr[e].fieldOrder[t]=n,r?.isMounted&&(fr[e].fieldOrder[t].isMounted=r?.isMounted)),fr[e].fieldOrder[t].isError=r?.isError||!1}else fr[e]={fieldOrder:{[t]:n}},fr[e].fieldOrder[t].isError=!1})(e,Ir(t),n)},Cr=(e,t,n)=>{if(fr[e]){const r=Ir(Er(t,n)),a=_r(e,fr[e].fieldOrder[r],r);a&&(a.isError=!1,mr[e]?.[r]&&Object.keys(mr[e][r]).forEach((t=>{mr[e][r][t].isError=!1})))}},$r=()=>fr,br=e=>{const t=e.isExpressionExist(),n=e.getConfigProps().visibility,r=t&&!1!==n,a=!t&&(void 0===n||"true"===n||!0===n);return e.isMounted&&(r||a)},Pr=(e,t)=>{const n=e.isExpressionExist(),r=t.visibility,a=n&&!1!==r,s=!n&&(void 0===r||"true"===r||!0===r);return e.isMounted&&(a||s)},Or=e=>{const t=e.readOnly;return!0===t||"true"===t},Tr=(e,t={})=>{const n=[];let r=[];const a=[],s=$r(),{ignoreFieldsInsideList:o=!0}=t;if(s[e])for(const t in s[e].fieldOrder)if(Object.hasOwn(s[e].fieldOrder,t)){const a=_r(e,s[e].fieldOrder[t],t),i=br(a),c=a.isInsideList(),d=a.getStateProps()?.value||a.getStateProps()?.selectionList;if(i&&a.isEditable()&&!Or(a.getConfigProps())){const{attachmentPageInstructionEnabled:s=!1}=PCore.getEnvironmentInfo().environmentInfoObject?.features?.form||{},i=a.getPageReference().replace(k.CASE_INFO.CASE_INFO_CONTENT,"").replace(k.DATA_INFO.DATA_INFO_CONTENT,""),l="Attachment"===a.getMetadata().type&&s&&""!==i;if("Attachment"!==a.getMetadata().type||l)l||c&&(!c||o)||Array.isArray(a.getValue(t))||gr.executeStateMachine(e,t,a.getValue(d))||n.push(t);else{let n=(PCore.getStoreValue(`.attachmentsList.${d.replace(".","")}`,"context_data",e)||[]).filter((e=>`${a.options.pageReference}.${e.label}`===t));n=mu.buildAttachmentsFormData(n),n.length>0&&(r=[...r,...n])}}}if(yr[e])for(const t in yr[e].fieldOrder)Object.hasOwn(yr[e].fieldOrder,t)&&a.push(t);return{formInputs:n,attachments:r,formPageFields:a}},Nr=e=>{const t=$r();let n,r=!0;if(t[e])for(const a in t[e].fieldOrder)if(Object.hasOwn(t[e].fieldOrder,a)){const s=_r(e,t[e].fieldOrder[a],a);let o="value",i=s.getStateProps()[o];if(!i){const e=s.getComponentConfig();"multi"===e.selectionMode?o="selectionList":"Editable"===e.renderMode&&(o="referenceList"),i=s.getStateProps()[o]}const c=br(s),d=s.getConfigProps();!c||Or(d)||d.disabled||(s.isError=!1,s.getValidationApi().validate(s.getValue(i))),!n&&s.isError&&c&&(n=a),r&&s.isError&&c&&(r=!1)}return r},vr=e=>{const t=[],n=$r();if(n[e])for(const r in n[e].fieldOrder)if(Object.hasOwn(n[e].fieldOrder,r)){const a=_r(e,n[e].fieldOrder[r],r),s=a.getConfigProps();if(Pr(a,s)&&!Or(s)&&!s?.disabled&&"Attachment"!==a.getMetadata()?.type&&"multirecordlist"!==a.getMetadata()?.config?.type){const e=s?.label||s?.caption,n=a.getComponentName().toLowerCase();t.push({name:r,label:e,type:n,fieldC11nEnv:a})}}return t},Rr=class{static getPropertyName(e){return le.getPropertyName(e)}static isProperty(e){return le.isProperty(e)}static getLeafPropertyName(e){return le.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},Dr=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}};class xr{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){const s=r.split("/").join(V.HASH_DELIMITER),o=mu.getHashedString(s);"PROP_CHANGE"===e?this.propChangeRefreshMap?.[a]?.[n]?!this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===o))&&this.propChangeRefreshMap[a][n].push({uniqueHash:o,callback:t}):xr.initializeRefreshCache(this.propChangeRefreshMap,a,n,o,t):this.refreshMap?.[a]?.[`${e}-${n}`]?!this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===o))&&this.refreshMap[a][`${e}-${n}`].push({uniqueHash:o,callback:t}):xr.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,o,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 wr=new xr,{APP:Mr}=V;let Lr={},jr={};const Ur="You will lose unsaved changes. Do you want to continue?",Fr=(e=Mr.APP,t,n)=>{let r=[],a=[];t||(r=(e=>{const t=$r(),n=[];if(t[e])for(const r in t[e].fieldOrder)!Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)||!1!==t[e].fieldOrder[r].getConfigProps().visibility&&!1!==t[e].fieldOrder[r].isMounted||n.push(r);return n})(e)),n||(a=(e=>{const t=$r(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)&&!0===t[e].fieldOrder[r].getConfigProps().readOnly&&n.push(r);return n})(e));const s={},o=Lr[e]||{};return Object.keys(o).forEach((e=>{!Object.prototype.hasOwnProperty.call(o,e)||r.includes(e)||a.includes(e)||mu.buildObject(e,s,o[e].value)})),s},kr=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete Lr[t]?.[n]},Vr=e=>jr[e],Gr=e=>{const t=er(e)||{};return Lr[e]&&Object.keys(Lr[e]).some((t=>Lr[e][t].initialValue!==Lr[e][t].value))||Object.keys(t).length>0},Br=e=>{e&&Lr[e]?Lr[e]={}:"all"===e&&(Lr={},jr={}),jr[e]&&(jr[e]=!1)},Hr=e=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===Ce&&(an(r),(e=>{const t=mu.getPropertyName(e.propertyName),{context:n,pageReference:r,value:a}=e,s=r?`${r}.${t}`:t;Jl.triggerCascade(n,s,a);const o=cn.getDependencies(n,s),i=Jl.getResetDependencies(n,s),c={context:n,datapages:{}};[...o,...i].forEach((e=>{const t=mu.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=t.split("."),r=`.${e.pop()}`,a=e.join(".");gr.getStateMachine(n,a,r).deleteAll(r)}else Dr.isPageInstruction(t)&&gr.executeStateMachine(n,t,""),nu({type:_e,payload:{reference:t,value:"",context:n,isArrayDeepMerge:!0,isImplicit:!0}})})),o.forEach((t=>{let a=r;t.startsWith(r)||(a="");const s=t.replace(`${a}`,"").split(".").filter((e=>!!e));s.pop();const o=s.join("."),i=ou(`.${o}`,a,n)?.classID||e.classID,d=vl(t.split(".").pop(),i),{datasource:l}=d,u={};let p=[];l.parameters.forEach((e=>{e?.value?(u[e.name]=Rr.isProperty(e.value)?ou(`.${mu.getFullPropertyReference([o,mu.getPropertyName(e.value)])}`,a,n):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(V.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(V.NULL_STRING))})),p=l.name.concat(V.UNDERSCORE_STRING,mu.getHashedString(p.join(V.HASH_DELIMITER)));const{name:h}=l,g=jl(h);c.datapages[p]={mode:l.mode,propertyName:t,name:l.name,dataViewParameters:u,refreshStrategy:g?.refreshStrategy}})),o.length&&nu({type:_t,payload:c})})(r),(((e,t)=>{if(!e||!t)return!1;const n=Lr[e]&&Lr[e][t];return!!n&&n.previousValue!==n.value})(r.context,r.reference)||ir(r.context))&&bn(r),wr.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===$t){const{context:e,referenceList:t}=r;bn({context:e,pageReference:t})}if(n===_e||n===Se){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:s=!1}=r;Rn.updateFieldNodeValue(a,e,r.value),Dr.isPageInstruction(e)||s?s||(jr[`${a}`]=!0):(e=>{const{payload:t}=e,{context:n,initialValue:r="",isStrictTracking:a}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;Lr[n]=Lr[n]||{},Lr[n][s]?Lr[n][s].previousValue=ou(t.reference,null,n):(Lr[n][s]={initialValue:r||ou(t.reference,null,n)},Lr[n][s].previousValue=Lr[n][s].initialValue),Lr[n][s].value=t.value,a&&Lr[n][s].value===Lr[n][s].initialValue&&kr(t)})(t),(r.removePropertyFromChangedList||n)&&kr(r)}if(n===Je||n===Qe){const{transientItemID:e,data:t}=r;mu.iterateLeafNodes(t,(t=>{kr({context:e,value:"",reference:t.join(".")})}))}n&&[et,qe,nt,Xe].includes(n)&&(Br(r.context),Jl.purgeResetDependencies(r.context),(e=>{e&&An[e]&&delete An[e]})(r.context),(r.childContainersContexts||[]).forEach((e=>{Br(e)})),(r.transientItems||[]).forEach((e=>{Br(e)}))),e(t)},Wr=(e,t)=>{e.DeclareExpressions&&sn({[t.context]:e.DeclareExpressions})},qr=(e,t,n=!1)=>{const r=mu.getIn(e,V.RESOURCERS);r&&((e=>{e&&wl(e)})(r),Wr(r,t)),n||Ap({...e,options:t})},zr="component-loader",Yr={},Kr=async(e,t)=>{const n=te.getLoader(),r=t||te.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(te.getLoader(zr))return te.getLoader(zr)(e,r);const a=[];return e.forEach((e=>{if(Yr[e])return;const t=ce.getComponent(e);if(t)(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;a.push(n(t,te.getTypes.SCRIPT))})),(t.styles||[]).forEach((e=>{a.push(n(r+e,te.getTypes.STYLE))})),Yr[e]=!0;else{const t=`${te.getConstellationServiceUrl()}/v860/${te.getAppAlias()}/component/${e}.js`;a.push(n(t,te.getTypes.SCRIPT))}})),Promise.all(a)};class Xr{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 Jr=Xr,Qr=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,s=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(s=a),a+=1})),r.splice(s,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let s=!1;if(a&&this.subscribers[e].forEach((e=>{s=e.id===t&&e.contextName===r})),!s){const a=new class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}}(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}))}},Zr=class{static subscribe(e,t,n,r=!1,a="app"){Qr.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Qr.publish(e,t)}static unsubscribe(e,t,n="app"){Qr.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Qr.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Qr.clearContext(e)}},ea=e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},ta={CASE_INFO:`${V.DATA}.${V.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${V.DATA}.${V.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${V.DATA}.${V.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${V.DATA}.${V.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${V.DATA}.${V.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${V.DATA}.${V.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${V.DATA}.${V.CASE_INFO.ASSIGNMENT_ID}`},na=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Jr.getTargetViewContainerName(e)},ra=e=>{const t=e.lastIndexOf(V.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(V.UNDERSCORE_STRING);return e.substring(t,n)},aa=e=>e===Ya.WORKAREA,sa=e=>e===Ya.MODAL,oa=e=>e===Ge,ia=e=>e&&e.find((e=>e.type===Ge)),ca=e=>mu.getIn(e,ta.CASE_INFO,{}),da=e=>e?e.split(" ").pop():void 0,la=e=>mu.getIn(e,ta.CASE_CLASS_NAME,V.EMPTY_STRING),ua=e=>{const t=ca(e);return dn(t)&&ln(Z.getOperatorIdentifier(),t)},pa=e=>mu.getIn(e,ta.CASE_INFO_ID,V.EMPTY_STRING),ha=e=>mu.getIn(e,ta.CASE_FIRST_ASSIGNMENT_ID,V.EMPTY_STRING),ga=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(Xu(Bu,{containerItemID:t,context:a||cs(t),target:r}))}},fa=e=>{const t=tu();if(!e)return!1;const n=he(e),r=Cs(n),a=Cs(e);if(!r||!a)return!1;const s=Ja(r,n),o=Ja(a,e);if(!s||!o)return!1;const{key:i}=s||{};let{key:c}=o||{};return c||(c=t.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},ya=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=pa(t);mu.setIn(e,"key",a);const s=dn(ca(t));if(!r&&(e=>{const t=mu.getIn(e,ta.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=ha(t),[,r]=n.split("!");(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:s}),mu.setIn(e,"flowName",r)}},ma=(e,t)=>{const{attachmentsExist:n}=t;n&&mu.setIn(e,k.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),mu.setIn(e,k.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Ia=(e,t,n)=>{let r=V.PROMISE_VALUE.RESOLVE;return ia(e)?(r=V.PROMISE_VALUE.REJECT,n?mn.rejectActionByID(t,!0,n):mn.rejectActionByID(t)):mn.resolveActionByID(t),r},Ea=e=>"true"===Z.getCaseTypeList().filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase,Aa=()=>"true"===Z?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,{RESOURCE_TYPES:_a}=k,Sa={PAGE:"page",FORM:"form"},Ca={[_a.CASE]:[pt,lt,ut],[_a.PAGE]:[ot,ct],[_a.DATA]:[it]},$a=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[k.REMOTE_SYSTEM_ID]||e[k.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[k.REMOTE_SYSTEM_ID]||e[k.REMOTE_SYSTEM_ID.toLowerCase()]||a:G.isRemoteCase(t)&&(r.RemoteSystemID=G.getRemoteHeader(t)),r},ba=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:a=!0}=t;let s={};s=((e,t={})=>{const n={},r=ru(e),{ignoreFieldsInsideList:a=!0}=t;if(r&&r.caseInfo&&r.caseInfo.content){const{formInputs:t,attachments:s,formPageFields:o}=Tr(e,{ignoreFieldsInsideList:a});s&&s.length>0&&mu.buildObject("caseInfo.attachments",n,s),o&&o.length>0&&o.forEach((e=>{let t=mu.getIn(r,e);"object"==typeof t&&(t=mu.deepClone(t),delete t?.classID),mu.buildObject(e,n,t)})),t&&t.length>0?t.forEach((e=>{mu.buildObject(e,n,mu.getIn(r,e))})):mu.buildObject("caseInfo.content",n,{})}if(r&&r.dataInfo&&r.dataInfo.content){const{formInputs:t}=Tr(e,{ignoreFieldsInsideList:a});t&&t.length>0&&t.forEach((e=>{mu.buildObject(e,n,mu.getIn(r,e))}))}return n})(e),n&&delete s?.caseInfo?.content;const o=Fr(e,!1);r&&Object.entries(s?.caseInfo?.content).forEach((([t,n])=>{const r=ru(e),a=O()(r,k.CASE_INFO.CASE_INFO_CLASSID);("True-False"===vl(t,a)?.type&&!n||""===n)&&delete s.caseInfo.content[t]}));const i=R()(o,s);let c={},d=!1;i&&i.caseInfo&&(c={...i.caseInfo},i.caseInfo.attachments&&(d=!0));const l=[...Zn(e)];return a&&l.forEach((e=>{delete e.content?.EmbedListUUID__})),c.pageInstructions=l,(zn[e]||[]).forEach((e=>{if(c&&c.content){const t=e?.replace(V.CASE_INFO.CASE_INFO_CONTENT,"");mu.deleteIn(c.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))}})),i&&i.dataInfo?{...i.dataInfo,pageInstructions:c.pageInstructions}:{content:c,attachmentsExist:d}},Pa=(e,t)=>{let n,r,a={};const s=mu.getIn(e,V.UI_RESOURCERS),o=mu.getIn(e,"confirmationNote");s?(n=mu.getIn(e,V.UI_RESOURCERS_CONTEXT_DATA),r=mu.getIn(e,V.ROOT),a=mu.getIn(e,V.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:d,key:l,flowName:u}=e,p=mu.getIn(e,"nextAssignmentInfo",null),h=mu.getIn(e,"nextAssignmentInfo.context",""),g=mu.getIn(e,"confirmationLinks",null),{isInCreateStage:f,openCaseViewAfterCreate:y,debugInfo:m}=t;return{data:{...i,key:l,flowName:u,coreHeaders:m&&{debugInfo:{[V.COREHEADER_APP_DEBUG_ID]:m.debugId}},caseInfo:{...i.caseInfo,actionButtons:a,headers:t.headers},[V.CONTEXT_DATA]:f?{...i[V.CONTEXT_DATA],...n,openCaseViewAfterCreate:y,errors:c}:{...i[V.CONTEXT_DATA],...n,errors:c}},semanticURL:d,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:g,key:l,root:r,...t}},Oa=async(e,t,n,r=!1,a=!1)=>{const s=mu.getIn(e,V.LOCALE_REFERENCES);await ae.loadLocaleResources(s);const o=mu.getIn(e,V.COMPONENTS);if(o)try{await Kr(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Ap({...e,options:i,directUrlUpdation:!0}):qr(e,i,a)},Ta=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},Na=e=>{if(e){const[,t]=e.split("!");return{key:Ta(e),flowName:t}}return{}},va=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,s=n&&n.response?n.response.data:"",o=(e=>{const t=$r(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.hasOwn(t[e].fieldOrder,r)&&!1!==t[e].fieldOrder[r].getConfigProps().visibility&&n.push(r.substring(r.indexOf("content")+8));return n})(r);return a&&mn.rejectActionByID(a),Xu(Ju,"Error action triggered",s,r,o)},Ra=(e,t)=>gs(e)&&ys(e)?Xu(qu,t):Xu(wu,t),Da=(e,t,n=V.APP.APP,r={})=>{let a=null;const{buildNew:s=!0}=r;return gs(e)?a=ys(e)?ss(e):ge(t,n):fs(e)&&(ys(e)&&!s?a=ds(e):ys(e)&&!s||(a=ge(t,n))),a},xa=e=>e&&e.type===We,wa=e=>{let t=!1;const n=ps(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Gr(r)){t=!0;break}}return t},Ma=(e,t={})=>{let n=!1,r=!1,a={},s=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:d,skipChildDirtyState:l=!1}=t;if(gs(e)){const t=ss(e),r=cs(t);Gr(r)&&(n=!0),l||n||(n=wa(t))}else if(fs(e)&&Es(e)){let t=Ss(e);t||(t=ss(e),r=!0),a.containerItemID=t,a.context=cs(t)}if(n){const e=d||Ur;o=window.confirm(ae.getLocaleValue(e,"Messages"))}if(!o&&n&&(a={},s=!1),r){const e=ae.getLocaleValue("You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.","Messages");c?i=window.confirm(e):(window.alert(e),s=!1)}return!i&&r&&(a={},s=!1),{continueExecution:s,removeActionPayload:a}},La=(e,t)=>{let n=!1;const r=Z.isCoexistenceAppOfType(V.APP_TYPE.UIKIT),{insKey:a,isParallelCall:s,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:Ta(a),d=ns(e,c);let l={},u=!1;if(d&&!r&&(n=!0,l=Ja(e,d),!o)){let e=l?.flowName;const t=ra(d),r=ls(d);if(r.length){const n=vt(t,r[0]);e=Ja(n,r[0])?.flowName}else n=e===i;(e!==i||s)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:d,semanticURL:l.semanticURL,insKey:a}}},ja=(e,t,n)=>e===_a.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=ns(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===_a.ASSIGNMENT?La(t,n):e===_a.CASE?La(t,{...n,skipFlowNameCheck:!0}):{},Ua=(e=[])=>{ys(`${V.APP.APP}/${V.PREVIEW}`)&&e.push(Xu(xu,As({context:k.APP.APP,name:V.PREVIEW})))},Fa=e=>{let t;for(const n of Object.keys(Ca))if(Ca[n].includes(e)){t=n;break}return t},ka=(e,t)=>{const{data:n={},context:r,caseViewMode:a}=e,s={data:{...n},caseViewMode:a,context:he(r)};mu.deleteIn(s.data,"shared"),mu.setIn(s.data,["context_data","caseViewMode"],a),t.push({type:bt,payload:{context:s.context}}),t.push(Xu(Pu,s))},Va=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=mu.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=mu.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:mu.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:mu.getIn(t,["payload","context"]),context:mu.getIn(t,["payload","context"])},r={type:Le,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),nu(e),e=e.filter((e=>e.type!==Le))}const a=((e,t,n)=>({assignmentID:e,vcName:V.PRIMARY,targetContainerName:mu.getIn(t,["payload","target"]),context:mu.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);gs(a.targetContainerName)||t?.payload?.containerName!==V.WORKAREA||(a.isMultiDoc=!0,e=[]);const s={type:je,payload:{...a}};e.push(s),nu(e)}else nu(e)}},Ga=(e,t)=>R()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Ba=e=>{let t={},n=ks(e);for(;n;){const e=ba(n);t=Ga(e.content,t),n=ks(n)}return t},Ha=new class{getCoreheaders(e){const t=`${k.APP.APP}${V.FORWARD_SLASH_STRING}${V.PRIMARY}`,n=ss(t),r=cs(n),a=Au.getProperty(V.COREHEADERS,"",r);if(a&&e in a)return a[e]}},Wa=class{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:a,items:s}=e;if(a&&s){const e=a[a.length-1];if(s[e]?.view&&Object.keys(s[e].view).length>0){const a=s[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=a,{viewName:d,viewContext:l}=this.processRootViewDetails(i,a,t);return d?hl({meta:i,options:{context:c,pageReference:l||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===Ya.WORKAREA||n===Ya.MODAL||d===V.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect:null}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:a}={}}=e,{context:s}=t;let o=a,i=r;const c=Rr.isProperty(a),d=Rr.isProperty(r);if(d){const e=Rr.getPropertyName(r);i=ou(`.${e}`,e.startsWith(".")?n:"",s)}if(i||(i=n),c){const e=Rr.getPropertyName(a);o=ou(`.${e}`,i,s)}return c&&d&&""!==o&&(o=a,i=r),{viewName:o,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=ss(e),s=Ja(e,t);s&&({key:r,flowName:a}=s)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}},qa={defaultLimit:16},za={SINGLE:"single",MULTIPLE:"multiple"},Ya={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Ka=()=>tu()?.getState()?.containers,Xa=e=>e?tu().getState().containers[e]:(xt.error("getContainerData: target is the required parameter"),null),Ja=(e,t)=>{if(!e||!t)return null;const n=Ka()[e];return n&&n.items&&n.items[t]||null},Qa=e=>e?tu().getState().containers[e]?.items||{}:(xt.error("getContainerItems: target is the required parameter"),null),Za=e=>e?tu().getState().containers[e]?.accessedOrder||[]:(xt.error("getContainerAccessOrder: target is the required parameter"),[]),es=e=>e?Za(e)?.length>0||!1:(xt.error("areContainerItemsPresent: target is the required parameter"),!1),ts=(e,t,n)=>{if(!e||!t)return xt.error("isContainerItemExists: target and key are required parameters"),!1;const r=Ka()[e],a=r&&r.items||null,s=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(s(t,a[e].key))return!0;return!1},ns=(e,t,n)=>{if(!e||!t)return xt.error("getContainerItemName: target and key are required parameters"),null;const r=Ka()[e],a=r&&r.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(s(t,a[e].key))return e;return null},rs=(e,t)=>{if(!e||!t)return xt.error("isContainerInitialized: context and name are required parameters"),!1;const n=Ka();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},as=(e,t)=>{if(!e||!t)return xt.error("getContainerType: context and name are required parameters"),null;const n=Ka()[`${e}/${t}`];return n&&n.type},ss=e=>{if(!e)return xt.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=Ka();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},os=(e,t,n)=>{if(!e||!t)return xt.error("isContainerItemActive: target and key are required parameters"),!1;const r=ns(e,t,n);return!!r&&r===ss(e)},is=(e,t)=>{let n=null;const r=Ka();for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&r[a].items){const s=r[a].items[e];if(n=s?s[t]:null,n)break}return n},cs=e=>e?is(e,"context"):(xt.error("getDataContextName: containerItemName is required parameters"),null),ds=e=>{if(!e)return xt.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=Ka();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,s=a&&a.length>0?a[a.length-1]:null;t=cs(s)}return t},ls=e=>{if(!e)return xt.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=Ka(),s=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 in a)if(Object.prototype.hasOwnProperty.call(a,e)&&a[e].items){const t=s(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},us=e=>{if(!e)return xt.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=Ka();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},ps=e=>{if(!e)return xt.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=Ka();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&(Za(r)||[]).forEach((n=>{cs(n)!==e&&t.push(cs(n))}));return t},hs=e=>{const t=[...ps(e),e],n=[],r=tu().getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${V.SUGGESTION}`)&&n.push(`${e}/${V.SUGGESTION}`)})),n},gs=e=>e?e&&Xa(e)&&Xa(e).type===za.SINGLE:(xt.error("isContainerSingleMode: target is required parameters"),null),fs=e=>e?e&&Xa(e)&&Xa(e).type===za.MULTIPLE:(xt.error("isContainerMultipleMode: target is required parameters"),null),ys=e=>e?Xa(e)&&Xa(e).items&&Object.keys(Xa(e)?.items).length>0||!1:(xt.error("hasContainerItems: target is required parameters"),!1),ms=e=>e&&qa[e]?qa[e]:qa.defaultLimit,Is=(e,t=qa.defaultLimit)=>{e?qa[e]=t:xt.error("setContainerLimit: target is required parameter")},Es=e=>{if(!e)return xt.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=Xa(e),{items:r={}}=n,a=Object.keys(r),s=ms(e);return a&&a.length>0&&a.length>=s&&(t=!0),t},As=e=>{if(!e||!e.name||!e.context)return xt.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=Xa(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=us(`${V.APP.APP}/${V.PREVIEW}`),s=ps(`${V.APP.APP}/${V.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...s],childContainers:a}},_s=e=>{if(!e)return xt.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=cs(e);return Gr(t)||wa(e)},Ss=e=>{if(!e)return xt.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=Xa(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!_s(n)){t=n;break}}return t},Cs=e=>{if(!e)return xt.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=tu().getState();for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(V.UNDERSCORE_STRING);return e.substring(0,n)},$s=(e,t={})=>{if(!e)return xt.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Cs(e),r=cs(e),{skipDirtyCheck:a}=t;let s=!0,o=[];if(_s(e)&&!a&&(s=window.confirm(ae.getLocaleValue(Ur,"Messages"))),s){const{accessedOrder:t=[],items:a={},type:s}=Xa(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=a[i]||{},{semanticURL:d=V.FORWARD_SLASH_STRING,context:l}=c;o.length>0&&d&&d!==V.FORWARD_SLASH_STRING?Ap({directUrlUpdation:!0,semanticURL:d,options:{containerItemID:i,context:l}}):Ap({directUrlUpdation:!0,semanticURL:V.FORWARD_SLASH_STRING,options:{}}),nu(Bu({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:s}}))}return Promise.resolve({newAccessedOrder:o})},bs=(e,t,n,r)=>{const a="root",s=ge(t,a,!0),o=vt(t,a),i={data:n,context:r?"app":s},c=[wu({root:e,containerItemID:s,context:r?"app":s,target:o,containerName:t})];c.push(Pu(i)),nu(c)},Ps=(e,t,n)=>{let r=Za(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1)if(cs(r[e])===n){a=!0;break}return a},Os=e=>{if(!e)return xt.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=Ka(),n=cs(e),r=Object.keys(t);let a=!1;for(let t=0;t<r.length&&(a=Ps(r[t],e,n),!a);t+=1);return a},Ts=e=>{Array.isArray(e)||(e=[e]);const t=Ka()||{};return e.map((e=>{const n=Cs(e);return mu.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},Ns=e=>{const t=mu.deepClone(tu().getState().data[e]);mu.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&mu.setIn(t,e,"")})),nu(ju({transientItemID:e,data:t}))},vs=e=>{const t=mu.deepClone(tu().getState().data[e]);mu.iterateLeafNodes(t,(e=>mu.setIn(t,e,""))),nu(Uu({transientItemID:e,data:t}))};class Rs{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 Ds=()=>Rs,xs=e=>{const t={containerName:e};t.childContainers=us(e),nu({type:at,payload:t})},ws=(e,t)=>{const n=ls(e),{key:r}=Ja(Cs(e),e),a=[];n.forEach((e=>{const{key:n}=Ja(Cs(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Cs(e),context:e};a.push({type:Ue,payload:n})}})),a.length&&nu(a)},Ms=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Cs(e),context:e};n.push({type:Ue,payload:r}),n.length&&nu(n)},Ls=()=>Z.isPortalLoaded?"app":"root",js=()=>Ha,Us=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Cs(e),context:e};nu({type:Ue,payload:n})},Fs=(e,t)=>{const n=ns(e,t),r=ns(`${n}/workarea`,t);return cs(r)},ks=e=>e?is(e,"parentContext"):(xt.error("getContainerParentContext: containerItemName is required parameters"),null),Vs=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Gs=()=>Wa;function Bs(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hs}=Object.prototype,{getPrototypeOf:Ws}=Object,qs=(zs=Object.create(null),e=>{const t=Hs.call(e);return zs[t]||(zs[t]=t.slice(8,-1).toLowerCase())});var zs;const Ys=e=>(e=e.toLowerCase(),t=>qs(t)===e),Ks=e=>t=>typeof t===e,{isArray:Xs}=Array,Js=Ks("undefined"),Qs=Ys("ArrayBuffer"),Zs=Ks("string"),eo=Ks("function"),to=Ks("number"),no=e=>null!==e&&"object"==typeof e,ro=e=>{if("object"!==qs(e))return!1;const t=Ws(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ao=Ys("Date"),so=Ys("File"),oo=Ys("Blob"),io=Ys("FileList"),co=Ys("URLSearchParams"),[lo,uo,po,ho]=["ReadableStream","Request","Response","Headers"].map(Ys);function go(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),Xs(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let o;for(r=0;r<s;r++)o=a[r],t.call(null,e[o],o,e)}}function fo(e,t){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 yo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,mo=e=>!Js(e)&&e!==yo,Io=(Eo="undefined"!=typeof Uint8Array&&Ws(Uint8Array),e=>Eo&&e instanceof Eo);var Eo;const Ao=Ys("HTMLFormElement"),_o=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),So=Ys("RegExp"),Co=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};go(n,((n,a)=>{let s;!1!==(s=t(n,a,e))&&(r[a]=s||n)})),Object.defineProperties(e,r)},$o="abcdefghijklmnopqrstuvwxyz",bo="0123456789",Po={DIGIT:bo,ALPHA:$o,ALPHA_DIGIT:$o+$o.toUpperCase()+bo},Oo=Ys("AsyncFunction"),To=(No="function"==typeof setImmediate,vo=eo(yo.postMessage),No?setImmediate:vo?(Ro=`axios@${Math.random()}`,Do=[],yo.addEventListener("message",(({source:e,data:t})=>{e===yo&&t===Ro&&Do.length&&Do.shift()()}),!1),e=>{Do.push(e),yo.postMessage(Ro,"*")}):e=>setTimeout(e));var No,vo,Ro,Do;const xo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(yo):"undefined"!=typeof process&&process.nextTick||To,wo={isArray:Xs,isArrayBuffer:Qs,isBuffer:function(e){return null!==e&&!Js(e)&&null!==e.constructor&&!Js(e.constructor)&&eo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||eo(e.append)&&("formdata"===(t=qs(e))||"object"===t&&eo(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Qs(e.buffer),t},isString:Zs,isNumber:to,isBoolean:e=>!0===e||!1===e,isObject:no,isPlainObject:ro,isReadableStream:lo,isRequest:uo,isResponse:po,isHeaders:ho,isUndefined:Js,isDate:ao,isFile:so,isBlob:oo,isRegExp:So,isFunction:eo,isStream:e=>no(e)&&eo(e.pipe),isURLSearchParams:co,isTypedArray:Io,isFileList:io,forEach:go,merge:function e(){const{caseless:t}=mo(this)&&this||{},n={},r=(r,a)=>{const s=t&&fo(n,a)||a;ro(n[s])&&ro(r)?n[s]=e(n[s],r):ro(r)?n[s]=e({},r):Xs(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&go(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(go(t,((t,r)=>{n&&eo(t)?e[r]=Bs(t,n):e[r]=t}),{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),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,s,o;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)o=a[s],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&Ws(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:qs,kindOfTest:Ys,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(Xs(e))return e;let t=e.length;if(!to(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).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:Ao,hasOwnProperty:_o,hasOwnProp:_o,reduceDescriptors:Co,freezeMethods:e=>{Co(e,((t,n)=>{if(eo(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];eo(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 Xs(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:fo,global:yo,isContextDefined:mo,ALPHABET:Po,generateString:(e=16,t=Po.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&eo(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(no(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=Xs(e)?[]:{};return go(e,((e,t)=>{const s=n(e,r+1);!Js(s)&&(a[t]=s)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:Oo,isThenable:e=>e&&(no(e)||eo(e))&&eo(e.then)&&eo(e.catch),setImmediate:To,asap:xo};function Mo(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}wo.inherits(Mo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:wo.toJSONObject(this.config),code:this.code,status:this.status}}});const Lo=Mo.prototype,jo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{jo[e]={value:e}})),Object.defineProperties(Mo,jo),Object.defineProperty(Lo,"isAxiosError",{value:!0}),Mo.from=(e,t,n,r,a,s)=>{const o=Object.create(Lo);return wo.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Mo.call(o,e.message,t,n,r,a),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Uo=Mo;function Fo(e){return wo.isPlainObject(e)||wo.isArray(e)}function ko(e){return wo.endsWith(e,"[]")?e.slice(0,-2):e}function Vo(e,t,n){return e?e.concat(t).map((function(e,t){return e=ko(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Go=wo.toFlatObject(wo,{},null,(function(e){return/^is[A-Z]/.test(e)})),Bo=function(e,t,n){if(!wo.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=wo.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!wo.isUndefined(t[e])}))).metaTokens,a=n.visitor||d,s=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&wo.isSpecCompliantForm(t);if(!wo.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(wo.isDate(e))return e.toISOString();if(!i&&wo.isBlob(e))throw new Uo("Blob is not supported. Use a Buffer instead.");return wo.isArrayBuffer(e)||wo.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,a){let i=e;if(e&&!a&&"object"==typeof e)if(wo.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(wo.isArray(e)&&function(e){return wo.isArray(e)&&!e.some(Fo)}(e)||(wo.isFileList(e)||wo.endsWith(n,"[]"))&&(i=wo.toArray(e)))return n=ko(n),i.forEach((function(e,r){!wo.isUndefined(e)&&null!==e&&t.append(!0===o?Vo([n],r,s):null===o?n:n+"[]",c(e))})),!1;return!!Fo(e)||(t.append(Vo(a,n,s),c(e)),!1)}const l=[],u=Object.assign(Go,{defaultVisitor:d,convertValue:c,isVisitable:Fo});if(!wo.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!wo.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),wo.forEach(n,(function(n,s){!0===(!(wo.isUndefined(n)||null===n)&&a.call(t,n,wo.isString(s)?s.trim():s,r,u))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t};function Ho(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Wo(e,t){this._pairs=[],e&&Bo(e,this,t)}const qo=Wo.prototype;qo.append=function(e,t){this._pairs.push([e,t])},qo.toString=function(e){const t=e?function(t){return e.call(this,t,Ho)}:Ho;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const zo=Wo;function Yo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ko(e,t,n){if(!t)return e;const r=n&&n.encode||Yo;wo.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let s;if(s=a?a(t,n):wo.isURLSearchParams(t)?t.toString():new zo(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const Xo=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){wo.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Jo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Zo="undefined"!=typeof window&&"undefined"!=typeof document,ei="object"==typeof navigator&&navigator||void 0,ti=Zo&&(!ei||["ReactNative","NativeScript","NS"].indexOf(ei.product)<0),ni="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ri=Zo&&window.location.href||"http://localhost",ai={...o,...Qo},si=function(e){function t(e,n,r,a){let s=e[a++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),i=a>=e.length;return s=!s&&wo.isArray(r)?r.length:s,i?(wo.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o):(r[s]&&wo.isObject(r[s])||(r[s]=[]),t(e,n,r[s],a)&&wo.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let s;for(r=0;r<a;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o)}if(wo.isFormData(e)&&wo.isFunction(e.entries)){const n={};return wo.forEachEntry(e,((e,r)=>{t(function(e){return wo.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},oi={transitional:Jo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=wo.isObject(e);if(a&&wo.isHTMLForm(e)&&(e=new FormData(e)),wo.isFormData(e))return r?JSON.stringify(si(e)):e;if(wo.isArrayBuffer(e)||wo.isBuffer(e)||wo.isStream(e)||wo.isFile(e)||wo.isBlob(e)||wo.isReadableStream(e))return e;if(wo.isArrayBufferView(e))return e.buffer;if(wo.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Bo(e,new ai.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ai.isNode&&wo.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=wo.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Bo(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(wo.isString(e))try{return(0,JSON.parse)(e),wo.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||oi.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(wo.isResponse(e)||wo.isReadableStream(e))return e;if(e&&wo.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Uo.from(e,Uo.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:ai.classes.FormData,Blob:ai.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};wo.forEach(["delete","get","head","post","put","patch"],(e=>{oi.headers[e]={}}));const ii=oi,ci=wo.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"]),di=Symbol("internals");function li(e){return e&&String(e).trim().toLowerCase()}function ui(e){return!1===e||null==e?e:wo.isArray(e)?e.map(ui):String(e)}function pi(e,t,n,r,a){return wo.isFunction(r)?r.call(this,t,n):(a&&(t=n),wo.isString(t)?wo.isString(r)?-1!==t.indexOf(r):wo.isRegExp(r)?r.test(t):void 0:void 0)}class hi{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=li(t);if(!a)throw new Error("header name must be a non-empty string");const s=wo.findKey(r,a);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ui(e))}const s=(e,t)=>wo.forEach(e,((e,n)=>a(e,n,t)));if(wo.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(wo.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((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]&&ci[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(wo.isHeaders(e))for(const[t,r]of e.entries())a(r,t,n);else null!=e&&a(t,e,n);return this}get(e,t){if(e=li(e)){const n=wo.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(wo.isFunction(t))return t.call(this,e,n);if(wo.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=li(e)){const n=wo.findKey(this,e);return!(!n||void 0===this[n]||t&&!pi(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=li(e)){const a=wo.findKey(n,e);!a||t&&!pi(0,n[a],a,t)||(delete n[a],r=!0)}}return wo.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&&!pi(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return wo.forEach(this,((r,a)=>{const s=wo.findKey(n,a);if(s)return t[s]=ui(r),void delete t[a];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();o!==a&&delete t[a],t[o]=ui(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return wo.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&wo.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")}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[di]=this[di]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=li(e);t[r]||(function(e,t){const n=wo.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 wo.isArray(e)?e.forEach(r):r(e),this}}hi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),wo.reduceDescriptors(hi.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),wo.freezeMethods(hi);const gi=hi;function fi(e,t){const n=this||ii,r=t||n,a=gi.from(r.headers);let s=r.data;return wo.forEach(e,(function(e){s=e.call(n,s,a.normalize(),t?t.status:void 0)})),a.normalize(),s}function yi(e){return!(!e||!e.__CANCEL__)}function mi(e,t,n){Uo.call(this,null==e?"canceled":e,Uo.ERR_CANCELED,t,n),this.name="CanceledError"}wo.inherits(mi,Uo,{__CANCEL__:!0});const Ii=mi;function Ei(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Uo("Request failed with status code "+n.status,[Uo.ERR_BAD_REQUEST,Uo.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ai=(e,t,n=3)=>{let r=0;const a=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,s=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),d=r[o];a||(a=c),n[s]=i,r[s]=c;let l=o,u=0;for(;l!==s;)u+=n[l++],l%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-a<t)return;const p=d&&c-d;return p?Math.round(1e3*u/p):void 0}}(50,250);return function(e,t){let n,r,a=0,s=1e3/t;const o=(t,s=Date.now())=>{a=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=s?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),s-i)))},()=>n&&o(n)]}((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,i=s-r,c=a(i);r=s,e({loaded:s,total:o,progress:o?s/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},_i=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Si=e=>(...t)=>wo.asap((()=>e(...t))),Ci=ai.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ai.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ai.origin),ai.navigator&&/(msie|trident)/i.test(ai.navigator.userAgent)):()=>!0,$i=ai.hasStandardBrowserEnv?{write(e,t,n,r,a,s){const o=[e+"="+encodeURIComponent(t)];wo.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),wo.isString(r)&&o.push("path="+r),wo.isString(a)&&o.push("domain="+a),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function bi(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pi=e=>e instanceof gi?{...e}:e;function Oi(e,t){t=t||{};const n={};function r(e,t,n,r){return wo.isPlainObject(e)&&wo.isPlainObject(t)?wo.merge.call({caseless:r},e,t):wo.isPlainObject(t)?wo.merge({},t):wo.isArray(t)?t.slice():t}function a(e,t,n,a){return wo.isUndefined(t)?wo.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function s(e,t){if(!wo.isUndefined(t))return r(void 0,t)}function o(e,t){return wo.isUndefined(t)?wo.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,a,s){return s in t?r(n,a):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t,n)=>a(Pi(e),Pi(t),0,!0)};return wo.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||a,o=s(e[r],t[r],r);wo.isUndefined(o)&&s!==i||(n[r]=o)})),n}const Ti=e=>{const t=Oi({},e);let n,{data:r,withXSRFToken:a,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=gi.from(i),t.url=Ko(bi(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),wo.isFormData(r))if(ai.hasStandardBrowserEnv||ai.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(ai.hasStandardBrowserEnv&&(a&&wo.isFunction(a)&&(a=a(t)),a||!1!==a&&Ci(t.url))){const e=s&&o&&$i.read(o);e&&i.set(s,e)}return t},Ni="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ti(e);let a=r.data;const s=gi.from(r.headers).normalize();let o,i,c,d,l,{responseType:u,onUploadProgress:p,onDownloadProgress:h}=r;function g(){d&&d(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function y(){if(!f)return;const r=gi.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Ei((function(e){t(e),g()}),(function(e){n(e),g()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(n(new Uo("Request aborted",Uo.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Uo("Network Error",Uo.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Jo;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Uo(t,a.clarifyTimeoutError?Uo.ETIMEDOUT:Uo.ECONNABORTED,e,f)),f=null},void 0===a&&s.setContentType(null),"setRequestHeader"in f&&wo.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),wo.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),h&&([c,l]=Ai(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,d]=Ai(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Ii(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===ai.protocols.indexOf(m)?n(new Uo("Unsupported protocol "+m+":",Uo.ERR_BAD_REQUEST,e)):f.send(a||null)}))},vi=(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,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Uo?t:new Ii(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,a(new Uo(`timeout ${t} of ms exceeded`,Uo.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=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=()=>wo.asap(o),i}},Ri=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},Di=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of 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()}}(e))yield*Ri(n,t)}(e,t);let s,o=0,i=e=>{s||(s=!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 s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},xi="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,wi=xi&&"function"==typeof ReadableStream,Mi=xi&&("function"==typeof TextEncoder?(Li=new TextEncoder,e=>Li.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Li;const ji=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ui=wi&&ji((()=>{let e=!1;const t=new Request(ai.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Fi=wi&&ji((()=>wo.isReadableStream(new Response("").body))),ki={stream:Fi&&(e=>e.body)};var Vi;xi&&(Vi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ki[e]&&(ki[e]=wo.isFunction(Vi[e])?t=>t[e]():(t,n)=>{throw new Uo(`Response type '${e}' is not supported`,Uo.ERR_NOT_SUPPORT,n)})})));const Gi=xi&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:s,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:l,withCredentials:u="same-origin",fetchOptions:p}=Ti(e);d=d?(d+"").toLowerCase():"text";let h,g=vi([a,s&&s.toAbortSignal()],o);const f=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(c&&Ui&&"get"!==n&&"head"!==n&&0!==(y=await(async(e,t)=>{const n=wo.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(wo.isBlob(e))return e.size;if(wo.isSpecCompliantForm(e)){const t=new Request(ai.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return wo.isArrayBufferView(e)||wo.isArrayBuffer(e)?e.byteLength:(wo.isURLSearchParams(e)&&(e+=""),wo.isString(e)?(await Mi(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(wo.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=_i(y,Ai(Si(c)));r=Di(n.body,65536,e,t)}}wo.isString(u)||(u=u?"include":"omit");const a="credentials"in Request.prototype;h=new Request(t,{...p,signal:g,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:a?u:void 0});let s=await fetch(h);const o=Fi&&("stream"===d||"response"===d);if(Fi&&(i||o&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=wo.toFiniteNumber(s.headers.get("content-length")),[n,r]=i&&_i(t,Ai(Si(i),!0))||[];s=new Response(Di(s.body,65536,n,(()=>{r&&r(),f&&f()})),e)}d=d||"text";let m=await ki[wo.findKey(ki,d)||"text"](s,e);return!o&&f&&f(),await new Promise(((t,n)=>{Ei(t,n,{data:m,headers:gi.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:h})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Uo("Network Error",Uo.ERR_NETWORK,e,h),{cause:t.cause||t});throw Uo.from(t,t&&t.code,e,h)}}),Bi={http:null,xhr:Ni,fetch:Gi};wo.forEach(Bi,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Hi=e=>`- ${e}`,Wi=e=>wo.isFunction(e)||null===e||!1===e,qi=e=>{e=wo.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!Wi(n)&&(r=Bi[(t=String(n)).toLowerCase()],void 0===r))throw new Uo(`Unknown adapter '${t}'`);if(r)break;a[t||"#"+s]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Hi).join("\n"):" "+Hi(e[0]):"as no adapter specified";throw new Uo("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function zi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ii(null,e)}function Yi(e){return zi(e),e.headers=gi.from(e.headers),e.data=fi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qi(e.adapter||ii.adapter)(e).then((function(t){return zi(e),t.data=fi.call(e,e.transformResponse,t),t.headers=gi.from(t.headers),t}),(function(t){return yi(t)||(zi(e),t&&t.response&&(t.response.data=fi.call(e,e.transformResponse,t.response),t.response.headers=gi.from(t.response.headers))),Promise.reject(t)}))}const Ki={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ki[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Xi={};Ki.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,s)=>{if(!1===e)throw new Uo(r(a," has been removed"+(t?" in "+t:"")),Uo.ERR_DEPRECATED);return t&&!Xi[a]&&(Xi[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,s)}},Ki.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Ji={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Uo("options must be an object",Uo.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const s=r[a],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new Uo("option "+s+" must be "+n,Uo.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Uo("Unknown option "+s,Uo.ERR_BAD_OPTION)}},validators:Ki},Qi=Ji.validators;class Zi{constructor(e){this.defaults=e,this.interceptors={request:new Xo,response:new Xo}}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=Oi(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Ji.assertOptions(n,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),null!=r&&(wo.isFunction(r)?t.paramsSerializer={serialize:r}:Ji.assertOptions(r,{encode:Qi.function,serialize:Qi.function},!0)),Ji.assertOptions(t,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&wo.merge(a.common,a[t.method]);a&&wo.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=gi.concat(s,a);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let d;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,u=0;if(!i){const e=[Yi.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),l=e.length,d=Promise.resolve(t);u<l;)d=d.then(e[u++],e[u++]);return d}l=o.length;let p=t;for(u=0;u<l;){const t=o[u++],n=o[u++];try{p=t(p)}catch(e){n.call(this,e);break}}try{d=Yi.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,l=c.length;u<l;)d=d.then(c[u++],c[u++]);return d}getUri(e){return Ko(bi((e=Oi(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}wo.forEach(["delete","get","head","options"],(function(e){Zi.prototype[e]=function(t,n){return this.request(Oi(n||{},{method:e,url:t,data:(n||{}).data}))}})),wo.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Oi(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Zi.prototype[e]=t(),Zi.prototype[e+"Form"]=t(!0)}));const ec=Zi;class tc{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 Ii(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 tc((function(t){e=t})),cancel:e}}}const nc=tc,rc={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};Object.entries(rc).forEach((([e,t])=>{rc[t]=e}));const ac=rc,sc=function e(t){const n=new ec(t),r=Bs(ec.prototype.request,n);return wo.extend(r,ec.prototype,n,{allOwnKeys:!0}),wo.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Oi(t,n))},r}(ii);sc.Axios=ec,sc.CanceledError=Ii,sc.CancelToken=nc,sc.isCancel=yi,sc.VERSION="1.7.9",sc.toFormData=Bo,sc.AxiosError=Uo,sc.Cancel=sc.CanceledError,sc.all=function(e){return Promise.all(e)},sc.spread=function(e){return function(t){return e.apply(null,t)}},sc.isAxiosError=function(e){return wo.isObject(e)&&!0===e.isAxiosError},sc.mergeConfig=Oi,sc.AxiosHeaders=gi,sc.formToJSON=e=>si(wo.isHTMLForm(e)?new FormData(e):e),sc.getAdapter=qi,sc.HttpStatusCode=ac,sc.default=sc;const oc=sc;var ic=function(e,t){return ic=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])},ic(e,t)};function cc(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}ic(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function dc(e,t){var n,r,a,s,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),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=(a=o.trys).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])}}}function lc(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 uc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return o}function pc(e,t,n){if(n||2===arguments.length)for(var r,a=0,s=t.length;a<s;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 hc(e){return this instanceof hc?(this.v=e,this):new hc(e)}function gc(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=a[e](t)).value instanceof hc?Promise.resolve(n.value.v).then(c,d):l(s[0][2],n)}catch(e){l(s[0][3],e)}var n}function c(e){i("next",e)}function d(e){i("throw",e)}function l(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var fc=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function yc(e){return"function"==typeof e}function mc(e){return yc(null==e?void 0:e.then)}function Ic(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 Ec=Ic((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 Ac(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var _c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=lc(s),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var c=this.initialTeardown;if(yc(c))try{c()}catch(e){a=e instanceof Ec?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var l=lc(d),u=l.next();!u.done;u=l.next()){var p=u.value;try{$c(p)}catch(e){a=null!=a?a:[],e instanceof Ec?a=pc(pc([],uc(a)),uc(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(a)throw new Ec(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)$c(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)&&Ac(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ac(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Sc=_c.EMPTY;function Cc(e){return e instanceof _c||e&&"closed"in e&&yc(e.remove)&&yc(e.add)&&yc(e.unsubscribe)}function $c(e){yc(e)?e():e.unsubscribe()}var bc={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=bc.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,pc([e,t],uc(n))):setTimeout.apply(void 0,pc([e,t],uc(n)))},clearTimeout:function(e){var t=bc.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Pc(e){bc.setTimeout((function(){throw e}))}function Oc(){}var Tc=Nc("C",void 0,void 0);function Nc(e,t,n){return{kind:e,value:t,error:n}}function vc(e){e()}var Rc=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Cc(t)&&t.add(n)):n.destination=Lc,n}return cc(t,e),t.create=function(e,t,n){return new xc(e,t,n)},t.prototype.next=function(e){this.isStopped?Mc(function(e){return Nc("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Mc(Nc("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Mc(Tc,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}(_c);Function.prototype.bind;var Dc=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){wc(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){wc(e)}else wc(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){wc(e)}},e}(),xc=function(e){function t(t,n,r){var a,s=e.call(this)||this;return a=yc(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,s.destination=new Dc(a),s}return cc(t,e),t}(Rc);function wc(e){Pc(e)}function Mc(e,t){var n=null;n&&bc.setTimeout((function(){return n(e,t)}))}var Lc={closed:!0,next:Oc,error:function(e){throw e},complete:Oc},jc="function"==typeof Symbol&&Symbol.observable||"@@observable";function Uc(e){return e}function Fc(e){return 0===e.length?Uc:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var kc=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,s=(r=e)&&r instanceof Rc||function(e){return e&&yc(e.next)&&yc(e.error)&&yc(e.complete)}(r)&&Cc(r)?e:new xc(e,t,n);return vc((function(){var e=a,t=e.operator,n=e.source;s.add(t?t.call(s,n):n?a._subscribe(s):a._trySubscribe(s))})),s},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=Vc(t))((function(t,r){var a=new xc({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[jc]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Fc(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Vc(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 Vc(e){var t;return null!==(t=null!=e?e:undefined)&&void 0!==t?t:Promise}function Gc(e){return yc(e[jc])}function Bc(e){return Symbol.asyncIterator&&yc(null==e?void 0:e[Symbol.asyncIterator])}function Hc(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 Wc="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function qc(e){return yc(null==e?void 0:e[Wc])}function zc(e){return gc(this,arguments,(function(){var t,n,r;return dc(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,hc(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,hc(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,hc(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 Yc(e){return yc(null==e?void 0:e.getReader)}function Kc(e){if(e instanceof kc)return e;if(null!=e){if(Gc(e))return a=e,new kc((function(e){var t=a[jc]();if(yc(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(fc(e))return r=e,new kc((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(mc(e))return n=e,new kc((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,Pc)}));if(Bc(e))return Xc(e);if(qc(e))return t=e,new kc((function(e){var n,r;try{for(var a=lc(t),s=a.next();!s.done;s=a.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if(Yc(e))return Xc(zc(e))}var t,n,r,a;throw Hc(e)}function Xc(e){return new kc((function(t){(function(e,t){var n,r,a,s;return function(e,t,n,r){return new(n||(n=Promise))((function(t,a){function s(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,o)}i((r=r.apply(e,[])).next())}))}(this,0,void 0,(function(){var o,i;return dc(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=lc(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)}))}}}(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),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&&(s=n.return)?[4,s.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 Jc(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var s=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(s),!a)return s}function Qc(e){return function(t){if(function(e){return yc(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 Zc(e,t,n,r,a){return new ed(e,t,n,r,a)}var ed=function(e){function t(t,n,r,a,s,o){var i=e.call(this,t)||this;return i.onFinalize=s,i.shouldUnsubscribe=o,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 cc(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}(Rc);function td(e,t){return void 0===t&&(t=0),Qc((function(n,r){n.subscribe(Zc(r,(function(n){return Jc(r,e,(function(){return r.next(n)}),t)}),(function(){return Jc(r,e,(function(){return r.complete()}),t)}),(function(n){return Jc(r,e,(function(){return r.error(n)}),t)})))}))}function nd(e,t){return void 0===t&&(t=0),Qc((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function rd(e,t){if(!e)throw new Error("Iterable cannot be null");return new kc((function(n){Jc(n,t,(function(){var r=e[Symbol.asyncIterator]();Jc(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function ad(e,t){return t?function(e,t){if(null!=e){if(Gc(e))return function(e,t){return Kc(e).pipe(nd(t),td(t))}(e,t);if(fc(e))return function(e,t){return new kc((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(mc(e))return function(e,t){return Kc(e).pipe(nd(t),td(t))}(e,t);if(Bc(e))return rd(e,t);if(qc(e))return function(e,t){return new kc((function(n){var r;return Jc(n,t,(function(){r=e[Wc](),Jc(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 yc(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Yc(e))return function(e,t){return rd(zc(e),t)}(e,t)}throw Hc(e)}(e,t):Kc(e)}function sd(e,t,n){var r=yc(e)||t||n?{next:e,error:t,complete:n}:e;return r?Qc((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(Zc(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)})))})):Uc}class od{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new od(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Od(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Td()}async buildAuthorizeUrl(e){e=e||window.btoa(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,s=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:J.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const d=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",l=new Uint8Array(64);window.crypto?.getRandomValues(l),this.config.codeVerifier=this.base64UrlSafeEncode(l),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${s}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${d}`))?.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=-1!==t?e.indexOf("/",t+2):-1;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,s=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),d=e||c.get("code"),l=new URLSearchParams;return l.append("client_id",n),r&&l.append("client_secret",r),l.append("grant_type","authorization_code"),l.append("code",d),l.append("redirect_uri",a),l.append("code_verifier",o),Ad(s,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:l.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),Pd({tokenInfo:e}),bd({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 id=od,cd=(e,t)=>{(async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new id(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})(t).then((t=>{const n={openReauthMessageModal:!0,reAutheticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Zr.publish(k.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},dd=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),ld=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}},ud=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{[V.COREHEADER_APP_DEBUG_ID]:e.debugId,[V.COREHEADER_APP_DEBUG_LEVELS]:Q.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Au.getProperty(V.COREHEADERS,"",e);return t?{...t,debugInfo:Q.getPreviewMode()&&{...t.debugInfo,[V.COREHEADER_APP_DEBUG_LEVELS]:Q.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(V.SKIPCOREHEADERS))return void delete e[V.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&&G.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},pd=ud,hd="updateSession",gd={},fd=new class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};let yd={},md={},Id={},Ed="";const Ad=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:s=n,includeRemoteSystemIdIfPresent:o=!0}=r;Ed=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,withoutDefaultHeaders:d=!1,...l}=t,{Authorization:u,...p}=t.headers||{};d||pd.injectCoreAdditionalHeaders(p,t.body,n,{includeRemoteSystemIdIfPresent:o}),s&&gd[s]>=0?gd[s]+=gd[s]:s&&void 0===gd[s]&&(gd[s]=1);let h=d?{...p}:{...pd.getDefaultHeaders(),...pd.getRegisteredHeaders(),...p,context:n};return e&&dd(e,md)&&fd.getUpdateSessionStatus()||!fd.getUpdateSessionStatus()?(dd(e,md)&&"OAuth2.0"===md?.authType&&(h={...p}),ad(oc({context:n,...l,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:h})).pipe(sd((()=>{const e=pd.getCoreHeadersFromContext(h.context);e&&(e=>{Zr.publish(V.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))).toPromise()):_d(e,t,n,fd)},_d=(e,t,n,r)=>new Promise(((a,s)=>{Zr.subscribe(hd,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?Ad(e,t,n).then((e=>a(e))).catch((e=>s(e))):s(o.updateStatus.error)}),hd)})),Sd=e=>{gd[e]>0&&(gd[e]-=gd[e],0===gd[e]&&delete gd[e])};oc.interceptors.request.use((e=>(yd.request&&(e=yd.request(e)),e)),(e=>Promise.reject(e))),oc.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"))),Un({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(Ln({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&jn({type:"error",category:"HTTP",context:e.config.headers.context}),Ln({type:"error",category:e.config.headers.context===V.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&jn({type:"error",category:"PAGE",context:e.config.headers.context})),Sd(e.config.headers.context)),yd.response&&(e=yd.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Sd(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&dd(e.config.url,md)||Zr.subscribe(hd,(e=>{fd.setUpdateSessionStatus(!e.updateStatus)}),hd),((e,t,n,r)=>{if(e.config&&dd(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(Zr.unsubscribeAllWithEventType(hd),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Zr.publish(k.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=ld(e);return _d(n,r,a,t)}return((e,t,n)=>{const{config:r}=e,{url:a,config:s,callback:o,isRefreshTokenPresent:i}=(e=>{let t="",n={},r={},a=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const s=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(a=!1),s.append("client_id",e.client_id),s.append("grant_type","refresh_token"),s.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:s.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:(t,n)=>{const{data:r}=t,a={access_token:r?.access_token,refresh_token:r?.refresh_token};Pd({tokenInfo:{...e.tokenInfo,...a}}),bd({Authorization:`${r?.token_type} ${r?.access_token}`}),n.headers={...n.headers,Authorization:`${r?.token_type} ${r?.access_token}`};const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(r)},failure:t=>{if(e.popupReauth)return cd(t,e);Zr.publish(k.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:cd};return{url:t,config:n,callback:r,isRefreshTokenPresent:a}})(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const d=_d(r.url,r,c,t);return i?Ad(a,s).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),Zr.publish("updateSession",{updateStatus:"success"}),d.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&dd(e.config.url,n)?(o?.failure?.(r.url,n),d):Promise.reject(e))):(o?.failure?.(r.url,n),d)})(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=ld(e);return Ad(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[k.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[k.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Un({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)})(e,fd,md,e.response&&e.response.status&&e.response.status===Number(Ed)?Ed:null))));const Cd=()=>oc.CancelToken.source(),$d=e=>oc.isCancel(e),bd=e=>{pd.setDefaultHeaders(e)},Pd=e=>{md={...md,...e}},Od=e=>{Id={...Id,...e}},Td=()=>({...Id}),Nd="OPEN_PROCESS_ACTION",vd="OPEN_ASSIGNMENT",Rd="DELETE_CASE_IN_CREATE_STAGE",Dd="SAVE_AND_CLOSE",xd=e=>({type:Dd,payload:e}),wd=class{static getSavableDataPage(e){return Bl(e)}static getLookUpDataPage(e){return Wl(e)}static getLookUpDataPageInfo(e){return ql(e)}static getDataPageKeys(e){return Hl(e)}},Md=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=mn.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));return mn.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=this.c11nEnv,n={context:t.getContextName(),name:t.getContainerName(),type:V.CONTAINER_TYPE.SINGLE},{actionMgrID:r,promise:a}=this.containerManagerPromise("INIT_CONTAINERS"),s={...n,...e,actionMgrID:r};return nu(Du(s)),a}addContainerItem(e){const t=We,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r;let s;a&&([s]=a);const o=n.getContextName(),i=n.getContainerName(),c=ge(i,o,e?.containerType===V.CONTAINER_TYPE.SINGLE),d=vt(i,o),l={root:{...s,config:{...s?.config,context:s?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:d,containerName:i};e=JSON.parse(JSON.stringify(e)),[V.WORKAREA].includes(i)&&delete e.data.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...l,...e,actionMgrID:u};return nu(wu(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=et,n={context:cs(e.containerItemID),target:Cs(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return nu(Fu(s)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t={target:Cs(e.containerItemID)},{actionMgrID:n,promise:r}=this.containerManagerPromise("ACTIVATE_CONTAINER_ITEM"),a={...t,...e,actionMgrID:n};return nu(Vu(a)),r}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=qe,n={context:cs(e.containerItemID),target:Cs(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return nu(Bu(s)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=As(e),{actionMgrID:n,promise:r}=this.containerManagerPromise("RESET_CONTAINERS"),a={...t,...e,actionMgrID:n};return nu(xu(a)),r}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=ye(t,r),s=Ts(r);return a&&s.includes(a)||nu(Mu({transientItemID:a,contextName:r,target:Cs(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Ts(r).includes(t))return;nu(Lu({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(!Ts(t).includes(a))return;nu(Wu({target:n,containerItemID:r,transientItemID:a}))}}createContainerPConnect(e,t,n,r=!1){Wa.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return ys(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return rs(e,t)}};var Ld=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function jd(){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 Ld(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(Ld(t.type,e[n]))return!0;return!1},Qc((function(e,t){var a=0;e.subscribe(Zc(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function Ud(e,t){return Qc((function(n,r){var a=null,s=0,o=!1,i=function(){return o&&!a&&r.complete()};n.subscribe(Zc(r,(function(n){null==a||a.unsubscribe();var o=0,c=s++;Kc(e(n,c)).subscribe(a=Zc(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){a=null,i()})))}),(function(){o=!0,i()})))}))}function Fd(e,t){return Qc((function(n,r){var a=0;n.subscribe(Zc(r,(function(n){r.next(e.call(t,n,a++))})))}))}function kd(e,t,n){return void 0===n&&(n=1/0),yc(t)?kd((function(n,r){return Fd((function(e,a){return t(n,e,r,a)}))(Kc(e(n,r)))}),n):("number"==typeof t&&(n=t),Qc((function(t,r){return function(e,t,n,r,a,s,o,i){var c=[],d=0,l=0,u=!1,p=function(){!u||c.length||d||t.complete()},h=function(e){d++;var a=!1;Kc(n(e,l++)).subscribe(Zc(t,(function(e){t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{d--;for(var e=function(){var e=c.shift();h(e)};c.length&&d<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Zc(t,(function(e){return d<r?h(e):c.push(e)}),(function(){u=!0,p()}))),function(){}}(t,r,e,n)})))}function Vd(e){return e&&yc(e.schedule)}function Gd(e){return e[e.length-1]}function Bd(e){return Vd(Gd(e))?e.pop():void 0}function Hd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ad(e,Bd(e))}function Wd(e){return Qc((function(t,n){var r,a=null,s=!1;a=t.subscribe(Zc(n,void 0,void 0,(function(o){r=Kc(e(o,Wd(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):s=!0}))),s&&(a.unsubscribe(),a=null,r.subscribe(n))}))}var qd=new kc((function(e){return e.complete()}));function zd(e){return e?function(e){return new kc((function(t){return e.schedule((function(){return t.complete()}))}))}(e):qd}var Yd=n(303),Kd=n.n(Yd);const Xd=(e,t,n)=>Wd((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),Hd(Ju(e,r,t,null,n))))),Jd=(e,t)=>n=>new kc((r=>{let a={},s=0;return n.pipe(kd((n=>{const r=Date.now();let o;return o=t||Kd(),o&&o(n,a)&&r-s<e?zd():(a=n,s=r,Hd(n))}))).subscribe(r)})),Qd=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=Xa(t);if(n){const r=ss(t),{items:a={}}=n;return a[r]&&a[r].key===e}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=gp("loadView",n);return Ad(r,{method:a},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=gp(yt,n);return Ad(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:s}=gp(yt,a),o=t[e];return Ad(`${s}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>ru(e)?.caseMessages;static getCaseViewMode=e=>tu().getState()?.data[e]?.context_data?.caseViewMode},Zd=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 s=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(s)n.push({type:Ue,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();s=!s,n.push({type:Ue,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),n.push(t)}}nu(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=ru(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 s=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!s&&(r<=0?(n.push(e),s=!s):a.push(e),n.unshift({type:Ue,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),nu(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=ru(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(nu({type:Ue,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){return e?ru(e)?(nu({type:Pt,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS)):Promise.reject(new Error(this.MISSING_CONTEXT_PARAM))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...ru(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(nu({type:Pt,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=ru(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&mu.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),nu({type:Ue,payload:{context:e,data:{...n}}}),yn.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=ru(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},{RESOURCE_TYPES:el}=k,tl=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:mn.getNextActionMgrId(),context:t,...r},s=xe;r&&r.channelName&&(a.headers={},a.headers[V.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=mn.actionManagerPromise(s,a.actionMgrID);return nu({type:s,payload:a}),o}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:mn.getNextActionMgrId(),context:t,...r},s=je;r&&r.channelName&&(a.headers={},a.headers[V.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=mn.actionManagerPromise(s,a.actionMgrID);return nu({type:s,payload:{...a}}),o}static createCase(e,t,n,r={}){const a=De,s={class:e,acTargetName:n,actionMgrID:mn.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(s.headers={},s.headers[V.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=mn.actionManagerPromise(a,s.actionMgrID);return nu({type:a,payload:{...s}}),o}static getNextWork(e,t,n={}){const r=je,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:mn.getNextActionMgrId(),context:e,...n},{promise:s}=mn.actionManagerPromise(r,a.actionMgrID);return nu({type:r,payload:{...a}}),s}static getOpenedCaseItems(e){const t=[],n=Xa(e);if(n){const{items:r={}}=n,a=Object.keys(r),s=ss(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===el.CASE||r[n].resourceType===el.ASSIGNMENT)){const{key:a="",context:o}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),d=ou(".caseTypeID","caseInfo",o),l=s===n;t.push({...i,key:a,workID:a,caseID:c,className:d,context:o,containerItemID:n,target:e,active:l})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=gp(lt,t);return Ad(n,{method:r})};static getCaseBulkActions=e=>{const{restApi:t,reqType:n}=gp("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,s=a/5,o={},i=[];for(let e=0;e<a;e+=s)o.cases=r.slice(e,e+s),o.cases.length&&i.push(Ad(t,{method:n,body:o}));return Promise.all(i).then((e=>{let t=[];for(let n=0;n<e.length;n+=1)0!==n?t.length&&(t=t.filter((t=>e[n].data.availableActions.some((e=>t.ID===e.ID))))):t=e[n].data.availableActions;return t}))}};class nl{constructor(e){nl._instance=this,this.context=`${e}/${V.SUGGESTION}`,tu().getState().data?.[this.context]||nu({type:st,payload:{context:this.context,data:{}}})}getField(e){return ou(e,"",this.context)}setField(e,t){nu({type:_e,payload:{reference:e,value:t,context:this.context}})}removeField(e){nu({type:Fe,payload:{reference:e,context:this.context}})}setState(e){nu(Pu({context:this.context,data:e,isArrayDeepMerge:!0}))}}const rl=nl,al=class{static getSharedState(e){const t=0===e.indexOf(".")?e.substring(1):e,n=au();return n?mu.getIn(n,t):null}static setSharedState(e,t){e&&nu(np({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:s}=r;e&&t&&nu(rp({context:e,reference:s?`${s}.${t}`:t,value:n,isArrayDeepMerge:a}))}static getSuggestionsContext(e){return new rl(e)}},sl=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Au.getProperyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Au.getContextPath(this.datasource,this.index);return this.index+=1,hl({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class ol{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,hl({meta:e,options:this.options})}resetIndex(){this.index=0}}class il{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=>Rr.isProperty(e))).map((e=>Rr.getPropertyName(e)))}}const cl=new il;let dl;Object.freeze(cl);const ll=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],s=le.trimAnnotation(a);if("string"!=typeof s&&"string"!=typeof a||!(mu.isPropertyRef(s)||a.startsWith("@W ")||a.startsWith("@E ")||a.startsWith("@ATTACHMENT "))){if(Array.isArray(s))s.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),ll(e,t[r][n],a)}));else if(s&&"object"==typeof s&&"exp"!==s.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},ll(s,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=s}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},ul=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...mu.deepClone(t.inheritedProps)]};class pl{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.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,r.inheritedConfig&&(this._inheritedConfig=mu.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&ul(this._inheritedConfig,t?.config),ll(this._rawConfig,this._stateProps),this._isState=!mu.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=mu.isExpressionExist(this._rawConfig.config),this._isWhenExist=mu.isWhenExist(this._rawConfig.config),this._isValidatorExist=ur.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=k.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let s=this.options.pageReference;if(s&&(s=le.handleAnnotation(this.options.pageReference,this)),this._pageReference=Au.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&mu.isWhenExist({visibility:this.meta?.config.visibility})&&Sn(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=Au.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=le.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=mu.isExpressionExist(e),this._isWhenExist=mu.isWhenExist(e),this._isValidatorExist=ur.isValidatorExist(e)),this._children=this._rawConfig.children,this.options.hasForm&&this._rawConfig.config&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&(!this._rawConfig.config.readOnly||"true"!==this._rawConfig.config.readOnly)&&Sr(this._contextName,this.getFullReference(),this),this._rawConfig?.type?.toLowerCase()===V.VIEW&&this._rawConfig.name&&(this.viewName=le.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&(e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata().config?.value;if(n){const r=vl(le.getLeafPropertyName(n),Au.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(t&&Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=Cn(e,r)),n};t.some(r)}else if(t&&"object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=Cn(e,t[r]),n))break;return n})(e,r?.datasource?.parameters))}}t&&Sn(e.getCurrentView(),e.getContextName(),e.getPageReference())})(this)}this.updateContextTree()}updateContextTree(){if(this._rawConfig&&this._rawConfig.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.isEditable()&&!this.isReadOnly()&&this.isVisible()&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode){const e=le.trimAnnotation(this._rawConfig.config.value);Rn.addFieldNode(this._contextName,this._pageReference,this.viewName??"",e,this.getValue(e))}this._rawConfig?.type?.toLowerCase()===V.VIEW&&this._rawConfig.name&&this.viewName&&Rn.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&Rn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.viewName??""),this._rawConfig?.config?.referenceList&&Rn.addPageListNode(this._contextName,this._pageReference,this.viewName??"",le.trimAnnotation(this._rawConfig.config.referenceList))}setXRayInfo(e){mu.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){mu.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new class{constructor(e){this.c11nEnv=e}getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=gp("getCaseStages",n);return Ad(r,{method:a},t).then((e=>e.data.stages))}getCaseTypeName(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(V.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(V.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(V.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${V.CONTEXT_DATA}${V.CASE_VIEW_MODE_PROP}`)===V.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${V.CONTEXT_DATA}${V.CASE_VIEW_MODE_PROP}`)===V.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO);return dn(e)}isLocalAction(){const e=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO);return un(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===V.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=Ja(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===V.VIEW?a?.name:null}(e&&e.startsWith(V.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(V.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID),t=he(this.c11nEnv.getContextName());let n;t&&(n=ru(t));const r=n?.caseInfo?.availableActions,a=ru(this.c11nEnv.getContextName())?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(V.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(V.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ACTIONS);return!(!t||!e)&&"Case"===t.find((t=>t.ID===e))?.type};getAllAssignments(){const e=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_LABEL),n=this.c11nEnv.getValue(V.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 s=[...n,...a];let o=JSON.parse(JSON.stringify(s));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID);return e.find((e=>e.ID===t))?.name||""}getFirstCaseActionName(){return this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(V.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(V.CASE_INFO.GETNEXTWORK)}}(this)),this._caseInfo}getListActions(){return(e=>({insert:(t,n,r,a={})=>rr(t,n,e,r,a),update:(t,n,r)=>((e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:s}=r,o=t.getContextName();let i=t.getReferenceList();const c=s||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(k.CONTENT)+k.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const d=Xn(i);Kn(t,d,c),Jn(o,`${i}[${n}]`),nr(i,c,e,n),gr.getStateMachine(o,c,d).update(e,n+1,a,r)})(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const a=n.getPageReference(),{stateMachineTarget:s}=gr.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),!0);if(!s){let e=a.substring(0,a.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&Kn(n,t,e)}gr.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),a=t.getReferenceList(),s=n||t.getPageReference(),o=`${s+a}[${e}]`,i=Xn(a);jn({type:k.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0,deletingIndex:e}),Kn(t,i,s),Jn(r,`${a}[${e}]`),gr.getStateMachine(r,s,i).delete(e+1);const c=gr.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((t=>{t.includes(`${s}${i}[${e}]`)&&(c[t]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),s=n.getPageReference(),o=Xn(a);Kn(n,o,s),Jn(r,`${a}[${t}]`),gr.getStateMachine(r,s,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={})=>((e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:s,selectionList:o,required:i}=t.getConfigProps(),c=s===V.LIST_SELECTION_MODE.MULTI,d=t.getContextName();let l=t.getPageReference(),u=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,l,o);const p=t.getRawMetadata();let h=null;const g=(e=>e.config.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(u=p.config.dataRelationshipContext,h=l.concat(".").concat(u),l=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,l,o),y=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,u,h),{datasource:{parameters:m={}}}=y,I={...m};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{let n=mu.getPropertyName(t);n=n.substr(n.indexOf(".")+1).split("."),e[n.join(".")]=t}))})(I,y,c),c){let n=o;n=Xn(n);const r=t.getValue(f)||[];Kn(t,n,l);const s=[];let i=r.length;e.forEach((e=>{const t=sr(m,e,u),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[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=gr.getStateMachine(d,l,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}s.push({instruction:e.$selected?V.LIST_ACTIONS.SELECT:V.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),nu(ep({instruction:V.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:d,referenceList:`${l}.${u}`,actions:s}))}else{const n=sr(I,e[0],u),r=(e=>e.length>1?e.pop():"")(l.split(/\[\d+\]/gm));Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[`${e}`],g?{contextPageReference:l}:{})})),t.getActionsApi().triggerFieldChange(r,n)}or(t,f,i,c,u),r()})))(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let s=t.getPageReference();const o=n===V.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):s.substring(s.lastIndexOf(".")+1);const c=t.getRawMetadata();let d=null;c.config.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,d=s.concat(".").concat(i),s=d);const l=o?`${s}${r}`:s;let u=t.getValue(l)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(d);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return ar(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(),s=t,o=`${a}${t}`;return new Promise((t=>{let i=s;i=Xn(i),Kn(e,i,a),gr.getStateMachine(r,a,i).deleteAll(),or(e,o,n,!0,s),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:s,referenceList:o}=e.getComponentConfig();let i;if(r===V.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===s&&o&&(i=e.getStateProps().referenceList),i){i=Xn(i);const r=gr.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const a=e.getContextName(),s=e.getPageReference(),o=Xn(t);Kn(e,o,s),gr.getStateMachine(a,s,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n={})=>cr(e,t,n),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),a=e.getContextName();Kn(e,t,r),Jn(a,mu.buildInstructionPageReference(r,t)),gr.getStateMachine(a,r,t).replacePage(n)})(e,t,n),deletePage:t=>((e,t)=>{const n=e.getPageReference(),r=e.getContextName();Kn(e,t,n),Jn(r,mu.buildInstructionPageReference(n,t)),gr.getStateMachine(r,n,t).deletePage()})(e,t)}))(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}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="value";return"multi"===e.selectionMode?t="selectionList":"Editable"===e.renderMode&&(t="referenceList"),this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Au.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{acTargetName:e="primary",type:t,name:n}=this.getComponentConfig();return"view"!==t?.toLowerCase()&&n?n:this.options.containerName||e}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=c?.getStore()?.getState()?.data[`${this.getContextName()}/${V.SUGGESTION}`],n=this.getStateProps()?.value,r=Au.getContextPath(this.getPageReference(),n),a=t?al.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...dr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),mu.resolveStringBooleans(e)}getRawConfigProps(){const e={...dr.getDefaultsforType(this._type),...this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Au.resolveProps(e,t,this),le.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),ll(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===V.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===V.MODAL_VIEW_CONTAINER||t===V.CASE_CREATE_STAGE){const t=ss(`${V.APP.APP}/${this.getContainerName()}`),n=Ln({context:t,category:k.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}const a=this._rawConfig?.config;if(this.options.hasForm&&a&&(Object.hasOwn(a,"value")||a.selectionList||"Editable"===a.renderMode&&a.referenceList)&&(!a.readOnly||"true"!==a.readOnly)&&Sr(this._contextName,this.getFullReference(),this),this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList:!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=Ln({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:k.MESSAGES.MESSAGES_TYPE_ERROR}),r=Ln({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:k.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>ae.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=V.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=V.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===V.ROOT_CONTAINER){const t=kn(r,ss(`${V.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages}if(t===V.ROOT_CONTAINER){const t=Ln({context:V.APP.ROOT,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(t===V.HYBRID_VIEW_CONTAINER){const t=Ln({context:V.APP.APP,category:V.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===V.APP_SHELL&&e.portalDocMode===V.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=tl.getOpenedCaseItems(`${k.APP.APP}/${V.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===V.APP_SHELL){const t=Ln({context:V.APP.APP,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===V.SCALARLIST&&(this._stateProps.value=e.value),t===V.APP_SHELL||t===V.MODAL_VIEW_CONTAINER||t===V.CASE_CREATE_STAGE||n.template===V.CASE_PREVIEW){let t=Ln({context:V.APP.APP,category:"HTTP"});const n=Ln({context:ss(`${V.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(Ln({context:ss(`${V.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=Ln({context:ss(`${V.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.map((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(t===V.VIEW_CONTAINER||t===V.FLOW_CONTAINER||t===V.MODAL_VIEW_CONTAINER||t===V.PREVIEW_VIEW_CONTAINER||t===V.ROOT_CONTAINER){if(e.routingInfo=Rt(this.getContainerName(),this._contextName),t===V.ROOT_CONTAINER&&(e.rootConfig=il.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===V.FLOW_CONTAINER){const t=Ln({context:this.getContextName(),category:V.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=us(n)[0];if(r){const t=ss(r);e.lastUpdateTime=c?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=c?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime;const n=Ln({context:t,category:k.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}}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)),t===V.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 n.template===V.CASE_VIEW||n.template===V.CASE_PREVIEW||n.template===V.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===V.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e)}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig();let a="",s="";if(r===V.ASSOCIATED?(a=n,s=V.ASSOCIATED_PROPERTY_ANNOTATION):(a=t,s=V.PROPERTY_ANNOTATION),a&&"string"==typeof a&&a.includes(s)){const t=le.getPropertyName(a),n=this.getFieldMetadata(t);n&&(e.fieldMetadata=n,(e.fieldMetadata.isDeclarativeTarget||Rr.isPropertyInternal(t)||!e.datasource&&(e.fieldMetadata.isClassKey||e.fieldMetadata.isSpecial)&&e.listType!==V.ASSOCIATED)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})))}}resolvePropertyMetadata(e,t){if(!e)return e;const n=zl(`${this._pageReference}.${t}`,this._contextName);return(n||null===n)&&(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(V.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(vl(e,t),e)}return this.resolvePropertyMetadata(vl(t.pop(),this.getValue(`.${t.join(".")}${V.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(vl(n,this.getValue(`${t.join(".")}${V.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(V.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[k.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(k.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>pn(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()[k.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[k.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 class{constructor(e){this.c11nEnv=e}validate(e,t){if(!t&&!(t=this.c11nEnv.getStateProps().value)){const e=this.c11nEnv.getComponentConfig();"multi"===e.selectionMode?t=this.c11nEnv.getStateProps().selectionList:"Editable"===e.renderMode&&(t=this.c11nEnv.getStateProps().referenceList)}const n=ur.validate(this.c11nEnv.getComponentName().toLowerCase(),t,e,this.c11nEnv);return n?.message?{status:!1,message:n?.message}:{status:!0}}}(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!Object.hasOwn(this._rawConfig?.config,"visibility")||"string"!=typeof this._rawConfig?.config?.visibility||le.handleAnnotation(this._rawConfig?.config?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||le.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;const t=e.getConfigProps(),n={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const a=e.getChildren();return!!a&&a.some((e=>e.getPConnect().getComputedVisibility()))}getChildrenIterato(){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 ru(e||this.getContextName())}getImagePath(e){return`${te.getConstellationServiceUrl()}/v860/${te.getAppAlias()}/image/${e}?org=${J.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=((e,t)=>{const n=!!e.repeat;if(e["repeat-self"])return new sl(e,e.context||"",t);if(n){const n=cu(`${t.context}.${V.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new sl(e.children[0],n||e.context,t)}return e.children?new ol(e.children,t):void 0})(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}),t=[];for(;e?.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!0!==il.allowedComponetsForBulkProcessing[e]&&!0!==il.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e?.resetIndex(),t}return null}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName();return ae.getLocaleValue(e,t,r)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),V.PARAGRAPH,e);return ae.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e).split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext):this._hasSuggestions&&this.getStateProps()?.value===e?Au.getProperyValue(e,this.getPageReference(),`${this._contextName}/${V.SUGGESTION}`):Au.getProperyValue(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)})),ul(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Au.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,a={}){let s,o;const{isArrayDeepMerge:i}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(s=!0,t||(o=!0)),nu({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...s&&{isStrictTracking:s},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(Dr.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;Lr[t]=Lr[t]||{},Lr[t][r]||(Lr[t][r]={initialValue:ou(r,null,t)}),Lr[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return iu(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(V.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=V.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),nu(Pu({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;nu({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){nu(Ju(e,t||{},n))}getComponent(){return dl({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=cu(`${this.getPageReference()}.${V.SUMMARY_OF_LISTS}`,t,this._contextName);a=Au.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=le.handleAnnotation(e,this),a=Au.getContextPath(this._pageReference,e)||""}return dl(hl({meta:e,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}}),r)}getReferencedView(){if(this.meta)return Au.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,hl({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 Md(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";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.";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(V.MODAL),a=this.c11nEnv.getValue(k.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(k.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(k.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(k.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(k.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(k.CASE_INFO.CASE_TYPE_ID),d=t?void 0:Nr(this.c11nEnv.getContextName()),l=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Su.buildActionObject({context:n,containerItemID:e,assignmentID:s,actionID:o,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:d,isProcessAction:l,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,a,s=null;s=t&&null!==t.actionMgrID?t.actionMgrID:mn.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,a=t}));return mn.register(s,o,r,a,e,t,n),{actionMgrID:s,promise:o}};showDataObjectCreateView(e,t=k.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Su.buildActionObject({viewName:t,className:e},this.c11nEnv),r=be,{promise:a}=this.actionsApiPromise(r,n);return nu({type:r,payload:{...n,containerName:k.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(!Gr(t))return new Md(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});const n=ht,r=Su.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(V.MODAL);nu({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:s}=this.actionsApiPromise(n,r);return s}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=tu().getState(),n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error("Data object class not found"));const r=wd.getSavableDataPage(n),a=e&&e.includes(V.MODAL),s=Su.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:o}=this.actionsApiPromise("CREATE_DATA_OBJECT",s);return nu({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:a,isFormValid:Nr(e)}}),o}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=wd.getSavableDataPage(e),r=wd.getDataPageKeys(n),a={};for(const e of r)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Su.buildActionObject({dataViewName:n,dataViewParameters:a},this.c11nEnv),{promise:o}=this.actionsApiPromise("DELETE_DATA_OBJECT",s);return nu({type:"DELETE_DATA_OBJECT",payload:{...s}}),o}getDataObjectView(e,t,n={viewName:""}){const 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("keyProperties is required parameter"));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const a=wd.getLookUpDataPage(e),s=wd.getDataPageKeys(a);for(const e of s)r[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Su.buildActionObject({dataLookUp:a,requestPayload:r,viewName:n.viewName||k.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:V.MODAL,keyProperties:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("VIEW_DATA_OBJECT",o);return nu({type:"VIEW_DATA_OBJECT",payload:{...o}}),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}=tu().getState(),r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error("Data object class not found"));const a=wd.getSavableDataPage(r);wd.getDataPageKeys(a).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]}));const s=e&&e.includes(V.MODAL),o=Su.buildActionObject({containerItemID:e,dataPageID:a,key:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("UPDATE_DATA_OBJECT",o);return nu({type:"UPDATE_DATA_OBJECT",payload:{...o,isModalAction:s,isFormValid:Nr(e)}}),i}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,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&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{},r=De,a=Su.buildActionObject({class:e,flowType:"pyStartCase",containerName:V.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,a);if(t.channelName&&(a.headers=a.headers||{},a.headers[V.X_ORIGIN_CHANNEL]=t.channelName),G.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n}=G.getRemoteCase(e);a.class=t,a.headers=a.headers||{},a.headers.RemoteSystemID=n}return Q.getPreviewMode()&&(a.debugInfo={debugId:mu.generateUniqueID()}),nu({type:r,payload:{...a}}),s}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=ke,r=Su.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return nu({type:n,payload:{...r}}),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&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||V.PRIMARY,containerName:n.targetContainer||V.PRIMARY},a=xe,s=Su.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[V.X_ORIGIN_CHANNEL]=n.channelName),s.className=t,G.isRemoteCase(t)){const{RemoteSystemID:e}=G.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e,s.isRemoteCase=!0,s.remoteCaseClass=t}return Q.getPreviewMode()&&![V.WORKAREA].includes(n.targetContainer)&&(s.debugInfo={debugId:mu.generateUniqueID()}),nu({type:a,payload:{...n,...s}}),o}openAssignment(e,t,n={containerName:"",channelName:"",isActionFromToDoList:void 0,isChild:void 0,context:void 0,viewType:void 0,skipBrowserSemanticUrlUpdate:void 0}){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&&window.pms.plugins&&window.pms.plugins.c11n&&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=V.PRIMARY,r.isChild=n.isChild);const a=vd,s=Su.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[V.X_ORIGIN_CHANNEL]=n.channelName),G.isRemoteCase(t)){const{RemoteSystemID:e}=G.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e}s.className=t,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Q.getPreviewMode()&&![V.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:mu.generateUniqueID()});const i={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return nu({type:a,payload:{...s,...i}}),o}finishAssignment(e,t={outcomeID:""}){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=cs(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r.lastIndexOf("/workarea"))),(e=>{const t=$r();if(t[e])for(const n in t[e].fieldOrder)if(Object.hasOwn(t[e].fieldOrder,n)&&t[e].fieldOrder[n].getConfigProps().hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:ae.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return Un({messages:e,context:r,category:k.PAGE}),Promise.reject({type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=Me,s=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:d,caseInfo:l,businessID:u}=fn(e,this.c11nEnv,{isTriggeredFromDifferentContext:s}),p=dn(l);let h,g=!1;d?g="Case"===d.find((e=>e.ID===c))?.type:h=ru(n);let{assignmentID:f}=fn(e,this.c11nEnv,{isTriggeredFromDifferentContext:s});h?.context_data?.actionType&&(g=h.context_data.actionType===V.CASE,f=f||h.context_data.assignmentID);const y=((e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,s=a?.filter((e=>e.ID===V.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&s?.length>0?s[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})(i,f,c),[m,I]=o.split(" "),E={class:m,actionID:y,assignmentID:f,caseID:o,workID:I,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:g,doDeleteCaseSummary:!0,isInCreateStage:p,businessID:u};e?.includes(V.MODAL)&&(E.containerName=V.MODAL,E.isModalAction=!0),E.outcome=t.outcomeID,l?.isLocalAction&&(E.viewType=Sa.FORM);const A=Su.buildActionObject(E,this.c11nEnv),{promise:_}=this.actionsApiPromise(a,A),S=this.c11nEnv.getValue("isProcessAction","isProcessAction");return A.isProcessAction=S,Zd.executeOrQueueDeferredAction({type:a,payload:{...A,context:n}}),_}getNextWork(){const e=vd,t=Su.buildActionObject({containerName:V.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return nu({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=vd,n=this.c11nEnv.getValue(k.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Su.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(t,a),o={type:t,payload:{...a,caseID:n,headers:r}};return nu(o),s}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(k.CASE_INFO.CASES),r=this.c11nEnv.getValue(k.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(V.MODAL)&&(a.containerName=V.MODAL,a.isModalAction=!0);const s=Su.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s),i=cs(e);return nu({type:t,payload:{...s,context:i,cases:n,actionID:r,isFormValid:Nr(i),classID:this.c11nEnv.getCurrentClassID()}}),o}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"));const{selectedList:n}=t,r=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},s="OPEN_BULK_ACTION",o=Su.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return nu({type:s,payload:{...o}}),i}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));const t=qe,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${V.APP.APP}/${V.MODAL}`,caseViewMode:V.PERFORM_MODE,deleteContext:!0};nu({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(nu({type:_e,payload:{reference:k.CASE_INFO.APPROVALFLAG,value:V.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)):(nu({type:_e,payload:{reference:k.CASE_INFO.APPROVALFLAG,value:V.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(k.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:_e,payload:{reference:k.CASE_INFO.DUPLICATECASEFLAG,value:V.DUPLICATE,context:e}},r={type:_e,payload:{reference:k.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return nu([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:_e,payload:{reference:k.CASE_INFO.DUPLICATECASEFLAG,value:V.IGNORE,context:e}},n={type:_e,payload:{reference:k.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:_e,payload:{reference:k.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return nu([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=t.assignKey||this.c11nEnv.getValue(k.CASE_INFO.ASSIGNMENT_ID),r=t.caseID||this.c11nEnv.getValue(k.CASE_INFO.CASE_INFO_ID),a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},o="OPEN_LOCAL_ACTION",i=Su.buildActionObject(s,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:d}=this.actionsApiPromise(o,i),l=us(c)[0];let u,p=!1;if(!l)return u=c,nu({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;u=ss(l);const h=Xa(l);if(h?.accessedOrder.forEach((e=>{r===h.items[e].key&&(p=!0,u=h.items[e].context)})),!p||"review"===Qd.getCaseViewMode(u))return nu({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;const g=u,f=g&&-1!==g.indexOf(V.MODAL),y=t.assignKey||this.c11nEnv.getValue(k.CASE_INFO.ASSIGNMENT_ID),m=ru(u),I=m?.caseInfo?.assignments?m.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(k.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Su.buildActionObject({context:g,containerItemID:u,assignmentID:y,actionID:I,caseID:r,containerName:E,caseType:A,isModalAction:f,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=u;const C=cs(u),$=this.c11nEnv.getCaseSummary(),b=dn($),P=Su.buildActionObject({caseID:r,containerItemID:u,cancelContext:C},this.c11nEnv);let O={};return f?(P.acTargetName=V.MODAL,P.isInCreateStage=b,P.isModalAction=f,O={...P}):O={...P,acName:vt(this.c11nEnv.getContainerName(),P.context)},nu({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:O,continueExecution:p}}),d}openProcessAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=this.c11nEnv.getValue(k.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,r=this.c11nEnv.getValue(k.CASE_INFO.CASE_INFO_ID)||t.caseID,a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},o=Nd,i=Su.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return nu({type:o,payload:{...i}}),c}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(k.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(k.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(k.CASE_INFO.ASSIGNMENT_ID),a=dn(this.c11nEnv.getCaseSummary()),s={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a};t&&t.includes(V.MODAL)&&(s.acTargetName=V.MODAL);const o=Su.buildActionObject(s,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=cs(t);return nu({type:n,payload:{...o,containerItemID:t,context:c}}),i}cancelAssignment(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}=k,n=Le,r=cs(e),a=e&&e.includes(V.MODAL),s=this.c11nEnv.getCaseSummary(),o=dn(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Su.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv);let d={};a?(c.acTargetName=V.MODAL,c.isInCreateStage=o,c.isModalAction=a,d={...c}):d={...c,acName:vt(this.c11nEnv.getContainerName(),c.context)};const{promise:l}=this.actionsApiPromise(n,c);return nu({type:n,payload:d}),l}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}=k,n=e,r=ht,a=e&&e.includes(V.MODAL),s=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Su.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!Gr(n))return new Md(this.c11nEnv).removeContainerItem({containerItemID:e});nu({type:r,payload:{...o,isModalAction:a}});const{promise:i}=this.actionsApiPromise(r,o);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}=k,n=ht,r=e,a=r&&r.includes(V.MODAL),s=this.c11nEnv.getCaseSummary(),o=dn(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Su.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),d=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=Z.isCoexistenceAppOfType(V.APP_TYPE.UIKIT);if(c.isProcessAction=d,o&&(a||l)&&!un(s)){const t=this.c11nEnv.getValue("caseInfo.isFirstAssignment"),o=Gr(r);if(this.shouldDeleteCaseInCreateStage(o,t,l))return this.deleteCaseInCreateStage(e);nu({type:n,payload:{...c,isModalAction:a,isChildCase:gn(s)}})}const{promise:u}=this.actionsApiPromise(n,c);return u}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=this.getSaveActionPayload(e,!0),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return nu(xd(t)),n}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=this.getSaveActionPayload(e),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return nu(xd(t)),n}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=e,r=n&&n.includes(V.MODAL),a=this.c11nEnv.getValue(k.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(k.CASE_INFO.CASE_TYPE_ID),o=Su.buildActionObject({caseID:a,caseType:s,containerItemID:e,context:n,ignoreCaseDeletion:t},this.c11nEnv),i=this.c11nEnv.getValue("isProcessAction","isProcessAction"),c=this.c11nEnv.getValue(k.CASE_INFO.PARENTCASEINFO);o.isProcessAction=i,o.parentCaseInfo=c;const d=`${V.APP.APP}/${Ya.PRIMARY}`,l=Da(d,Ya.PRIMARY);o.parentContext=l,r&&(o.targetName=V.MODAL,o.containerName=Ya.MODAL,o.isModalAction=r),nu((e=>({type:Rd,payload:e}))(o));const{promise:u}=this.actionsApiPromise("DELETE_CASE_IN_CREATE_STAGE",o);return u}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}=J.getRestEndPoint("getRecents");t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return Ad(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:a}=J.getRestEndPoint("updateRecents"),s=E()+a;return Ad(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=J.getRestEndPoint("Logout"),t=E()+e;return Ad(t,{method:"GET",headers:{}})}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Ad(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Ya.PREVIEW,containerName:Ya.PREVIEW,context:k.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:Ya.PREVIEW,containerName:Ya.PREVIEW,context:k.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=Su.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(k.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:G.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n&&(r={...r,...n});const a=$e,{promise:s}=this.actionsApiPromise(a,r,!1);return nu({type:a,payload:{...r}}),s}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));const r=Su.buildActionObject({viewName:e,className:t},this.c11nEnv),a=be,{promise:s}=this.actionsApiPromise(a,r);return Q.getPreviewMode()&&(r.debugInfo={debugId:mu.generateUniqueID()}),nu({type:a,payload:{...r,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Su.buildActionObject({},this.c11nEnv),r=Oe,{promise:a}=this.actionsApiPromise(r,n);return nu({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=Su.buildActionObject({},this.c11nEnv),r=Te,{promise:a}=this.actionsApiPromise(r,n);return nu({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=Su.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),s=Pe,{promise:o}=this.actionsApiPromise(s,a);return nu({type:s,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Su.changeHandler(e,t)}eventHandler(e,t){Su.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),s=Au.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(V.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=ou(`.${i.join(".")}.classID`,a,r)),e=mu.trimDotForProperty(e),nu({type:Ce,payload:{reference:s,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:s="",isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName();let d=this.c11nEnv.getPageReference();const l=s?.startsWith(d)?s.replace(d,""):s;d=s||d;const u=Au.getContextPath(d,e);let p=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(l?`${l}${e}`:e,t,{isArrayDeepMerge:a}),this.c11nEnv.isBulkAction()&&(p=!0),e||(e=this.c11nEnv.getStateProps().value),jn({type:k.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:c,isListEntry:o}),nu({type:_e,payload:{reference:u,value:t,context:c,isArrayDeepMerge:a,skipDirtyValidation:i,...p&&{isStrictTracking:p},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=rt,{context:n}=e,r=n&&n.includes(V.MODAL),a=Su.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=V.MODAL,a.isModalAction=r),nu({type:t,payload:a});const{promise:s}=this.actionsApiPromise(t,a);return s}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:d}=r,l={actionMgrID:s,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:d};r.refreshFor&&(l.refreshFor=r?.refreshFor);const u=this.c11nEnv.getContextName(),p=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(V.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>hn(e)&&!pn(e,t))(u,p)||pn(u,p))?$n(u,n,l):_n(e,t,u,n,l),a}openEmbeddedDataModal(e,t,n,r,a){const s=Ot,o=t.getCaseInfo().getKey(),i=`${t.getPageReference().replace(k.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,c={targetProperty:n,index:r,viewID:e,ID:o,actionType:a,interestPage:mu.convertPageRefToClipboardPageNotation(i)},d=Su.buildActionObject(c,this.c11nEnv),{promise:l}=this.actionsApiPromise(s,d);return nu({type:s,payload:{...d,containerName:k.MODAL,skipSemanticUrl:!0}}),l}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=Tt,n=this.c11nEnv.getPageReference().replace(k.CASE_INFO.CASE_INFO_CONTENT,""),r=cs(e),a={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(k.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(V.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:Nr(r),interestPage:mu.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(V.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(V.MODAL)&&(a.containerName=V.MODAL,a.isModalAction=!0);const s=Su.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s);if(Gr(r)){const[e,t,n]=vn(this.c11nEnv.getPageReference());Rn.mutatePageList(this.c11nEnv.getValue(V.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:Et,rowIndex:n}),nu({type:Et,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(V.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return nu({type:t,payload:{...s,context:r}}),o}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=cs(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(Nt);return $n(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}}(this)),this._actionsApi}getActionManager(){return mn}getGoogleMapsAPIKey(){return f}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=ru(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&!!t.isLoading&&t.isLoading}clearErrorMessages(e){e?.property?jn({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?jn({type:"error",...e}):(jn({type:"error",...e,context:V.APP.APP}),jn({type:"error",...e,context:ss(`${V.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return cu(`${this.getPageReference()}.${V.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&(Object.hasOwn(this._rawConfig.config,"value")||Object.hasOwn(this._rawConfig.config,"readonlyContextList")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&((e,t,n)=>{if(fr[e]){const r=Er(t,n);fr[e].fieldOrder[r]&&(fr[e].fieldOrder[r].isMounted=!1)}})(this.getContextName(),le.trimAnnotation(this.getPropertyName()),this.getPageReference())}addFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&this._type!==V.SCALARLIST&&((e,t,n)=>{if(fr[e]){const r=Er(t,n);fr[e].fieldOrder[r]&&(fr[e].fieldOrder[r].isMounted=!0)}})(this.getContextName(),le.trimAnnotation(this.getPropertyName()),this.getPageReference())}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Ir(t);yr[e]?yr[e].fieldOrder[r]=n:yr[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();cr(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e++)rr(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=al.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Au.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Au.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,al.getSuggestionsContext(this.getContextName()).removeField(n)}}}function hl(e){const t=new pl(e);return{getPConnect:()=>t}}de.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),de.registerHandler("@P",((e,t)=>t.getValue(e))),de.registerHandler("@E",((e,t)=>{try{const n=Qt(e),r=Zt(n);return en(r,t)}catch(e){}return!0})),de.registerHandler("@W",((e,t)=>{const n=t.getContextDataValue(`.${V.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===n||"true"===n})),de.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",s="";const o=t.getPageReference();if(e.startsWith(".")){a=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),s=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===V.READONLY,d=n?.datasource?.name||"",l=t.getComponentConfig();if(l&&l.deferDatasource)return l.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:l.datasourceMetadata}),i!==V.DATA_PAGE?n?.datasource?.records:null;if(i!==V.DATA_PAGE)return n?.datasource?.records;const u=le.getPropertyName(n?.datasource?.propertyForDisplayText),p=le.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(le.isProperty(e?.value)){let t=ou(`.${mu.getFullPropertyReference([s,le.getPropertyName(e.value)])}`,o,g);f.push(mu.getFullPropertyReference([o,s,le.getPropertyName(e?.value)])),null!=t&&""!==t||(t=V.NULL_STRING),r.push(t)}else r.push(e?.value||V.NULL_STRING)})),g){const e=cn.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),cn.addContextName(g,e)}const y=function(e,t,n,r){let a="",s=n;if(t.join(V.HASH_DELIMITER)&&(a=mu.getHashedString(t.join(V.HASH_DELIMITER)),s=n+V.UNDERSCORE_STRING+a),r){const e=au(),t=e?e[n]?.[s]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=(e.getDataObject()?.[n]||{})[s]||{};return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,d,c);return y.map((e=>({key:e[p]||e[`.${p}`],value:e[u]||e[`.${u}`]})))})),de.registerHandler("@ROUTING_INFO",((e,t)=>Rt(t.getContainerName(),t.getContextName()))),de.registerHandler("@ENV",((e,t)=>{switch(e){case V.ENV_INFO_KEYS.APPLICATION_NAME:return Z.getApplicationName();case V.ENV_INFO_KEYS.ACCESS_GROUP:return Z.getAccessGroup();case V.ENV_INFO_KEYS.USER_NAME:return Z.getOperatorName();case V.ENV_INFO_KEYS.USER_ID:return Z.getOperatorIdentifier();case V.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(Z.getApplicationLabel()||"");case V.ENV_INFO_KEYS.USER_IMAGE:return Z.getOperatorImageInsKey();case V.ENV_INFO_KEYS.LOCALE:return Z.getUseLocale();case V.ENV_INFO_KEYS.TIMEZONE:return Z.getTimeZone();case V.ENV_INFO_KEYS.WORK_GROUP:return Z.getOperatorWorkGroup();default:return e}})),de.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t}=r[a],s=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=le.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=le.getPropertyName(e[t]);r[t]=n[a]})),s.push(r)})),s}return[]})),de.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 s=e.split(".").filter((e=>!!e));if(s.length>1&&(s.pop(),a=`.${s.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:s,value:o}=n;r.name=s,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${a}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),de.registerHandler("@USER",((e,t)=>{const n=t.getValue(e),r=t.getReferencedUser(n);return{userId:n,userName:r?r.UserName:null}})),de.registerHandler("@ACTIVE_CASES",((e,t)=>tl.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),de.registerHandler("@LR",(e=>e)),de.registerHandler("@CASE",((e,t)=>e===V.ID?t.getCaseInfo().getKey():e)),de.registerHandler("@SHARED",(e=>al.getSharedState(e))),de.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?ie.getParagraphStream(n,t):null})),de.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("]")),{useCustomContext:s}=t;let o;return mu.isEmpty(s)?o=t.getValue(`.${n}`):(o=s,o=mu.getIn(o,n)),o&&r.length>0?(a&&(o=o.filter((e=>tn(a,e)))),o.map((e=>mu.getIn(e,r)))):null})),de.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),de.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const gl="downloadAttachment",fl={},yl=e=>{const t=Cd();return fl[e]=t,t},ml=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},Il=e=>{let t,n;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:ml(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:e.pyFileName?e.pyFileName:e.FileName?.split(".")[0],category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:e.pyAttachName?e.pyAttachName?.split(".").pop():e.FileExtension,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.pxCreatedDateTime?e.pxCreatedDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},El={uploadAttachment:(e,t,n,r)=>{const a=new FormData;a.append("appendUniqueIdToFileName",!0),a.append("file",e);const{restApi:s,reqType:o}=gp("uploadAttachment",{});return Ad(s,{method:o,headers:{"Content-Type":"multipart/form-data"},body:a,onUploadProgress:t,signal:yl(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID}))).catch(n?n($d,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete fl[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,a.signal=yl(n).token}const{restApi:s,reqType:o}=gp("linkCaseAttachment",{caseID:e});return Ad(s,{...a,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=gp("getCaseAttachments",{caseID:e,includeThumbnail:n});return Ad(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=gp("getAttachmentCategories",{caseID:e,type:t});return Ad(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=gp(gl,{attachmentID:e});return Ad(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=gp("editAttachment",{attachmentID:e});return Ad(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=gp("deleteAttachment",{attachmentID:e});return Ad(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=gp("downloadDocument",{documentID:e});return Ad(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=gp("deleteDocument",{caseID:e,documentID:t});return Ad(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 ocurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{fl[e]&&(fl[e].cancel(),delete fl[e])},buildFilePropsFromResponse:Il,getAttachmentURL:e=>{const{restApi:t}=gp(gl,{attachmentID:e});return t},prepareAttachmentData:e=>{let t=[];if(e&&Object.hasOwn(e,"pyCount")&&e.pyCount>0)t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>Il(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>!!e.ID)).map((e=>Il(e)))}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||"",attachments:t}}};de.registerHandler("@ATTACHMENT",((e,t)=>{const n=t.getValue(e);return El.prepareAttachmentData(n)}));const Al={},_l={},Sl={},Cl={},$l={},bl={},Pl={},Ol={},Tl={},Nl=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];if(a){const e=Array.isArray(a)?a:[a];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},a={...e[n],...r,...t};e[n]=a}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):mu.copy(e,t)},vl=(e,t="")=>{if(!e)return null;const n=Cl[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase())):n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass.toLowerCase()===t.toLowerCase()?n:null,r},Rl=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const s=vl(e,t);return r.length&&(a=r.join(".")),{...s,embeddedType:n,category:a}}const[a,...s]=e.split("."),o=vl(a,t);return o&&r.push(o.label),Rl(s.join("."),o?.pageClass,o?.type,r)},Dl=e=>{Nl(e,_l)},xl=e=>{Nl(e,Sl)},wl=e=>{if(e.views&&Nl(e.views,_l),e.navigations&&Nl(e.navigations,Sl),e.personalizations&&Nl(e.personalizations,bl),e.insights&&Nl(e.insights,Pl),e.paragraphs&&Nl(e.paragraphs,Al),e.dataTypes&&Nl(e.dataTypes,Ol),e.datapages&&Nl(e.datapages,Tl),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{$l[e]=t[e]}))}Nl(e.fields,Cl)},Ml=e=>_l[e],Ll=e=>Sl[e],jl=e=>e in $l?$l[e]:null,Ul=e=>e in bl?bl[e]:null,Fl=e=>e in Pl?Pl[e]:null,kl=e=>{const t={};return Object.keys(Cl).forEach((n=>{const r=Cl[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=mu.deepClone(a))})),t},Vl=(e,t)=>{const n=vl(e,t)?.datasource?.parameters;return n?mu.deepClone(n):null},Gl=(e,t)=>{let n=null;const r=Al[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?mu.deepClone(n).content:null},Bl=e=>{if(e in Ol){const{savableDataPage:t}=Ol[e];return t}return null},Hl=e=>{const t=[];let n=[];if(e in Tl){const r=Tl[e].classID,{isAlternateKeyStorage:a}=Tl[e];return a?Tl[e].parameters.forEach((e=>t.push({keyName:e.name,isAlternateKeyStorage:a,linkedField:e.linkedField}))):(n=Ol[r].classKeys,n.forEach((e=>t.push({keyName:e,isAlternateKeyStorage:a})))),t}return null},Wl=e=>{if(e in Ol){const{lookupDataPage:t}=Ol[e];return t}return null},ql=e=>{if(Object.prototype.hasOwnProperty.call(Ol,e)){const{lookupDataPageInfo:t}=Ol[e];return t}return null},zl=(e,t)=>{const n=e.split("."),r=n.pop(),a=new pl({options:{pageReference:`${n.join(".")}`,context:t}}),s=vl(r,a.getCurrentClassID())?.additionalInformation;if(!s?.includes("@PARAGRAPH"))return s;const o=le.trimAnnotation(s),i=a.getCurrentClassID(),c=a.getLocaleRuleNameFromKeys(i,V.PARAGRAPH,o),d=ae.getParagraphLocaleValue(c,i,o);return d?ie.getParagraphStream(d,a):null},Yl=(e,t)=>{const n=e.split("."),r=n.pop(),a=new pl({options:{pageReference:`${n.join(".")}`,context:t}}),s=vl(r,a.getCurrentClassID()),o={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(s,o),o},Kl=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const s={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=s}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;_n(e,r,t,a,{})}}};class Xl{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,s="singleRecord"){if(!e||!n||!r?.length>0)return;const o=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=mu.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:s})}else i[t]=[{propertyName:o,mode:s}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!n||!r?.length>0)return;const s=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=mu.getFullPropertyReference([i,t]),t in o){const e=o[t];mu.removeExistingDependentProperty(e,s)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}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 s=this.cascadeSubscribers[e][`${t}${n}`];if(!s[a]){s[a]=r;const o=ou(n,t,e);s.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,a){const s=Xl._getFieldsForList(e,t,n);s.length>0&&(this.registerFields(e,t,s,r,a),Kl.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Xl._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=vl(n,ou("classID",t,e));return a&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(le.isProperty(e)){const t=le.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((s=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==s&&o.previousValue!==n&&(a=!0,r?r.add(o[s]):o[s](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t,n=V.CASE_INFO.CASE_INFO_CONTENT){if(!e||!t)return;const r=new Set,a=mu.getIn(e,n);a&&0!==Object.keys(a).length&&(this._handleCascadeObject(a,t,n,r),r.forEach((e=>{e()})))}_handleCascadeObject(e,t,n,r){if("object"!=typeof e)return this.triggerCascade(t,n,e,r),void this._triggerListChanges(t,n,e);const a=Object.keys(e);for(let s=0,o=a.length;s<o;s++){const o=a[s],i=`${n}.${o}`;this._handleCascadeObject(e[o],t,i,r)}}_handlePageReference(e,t,n){let r=e;return"Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1&&(r=`${e}${t.substring(0,t.lastIndexOf("."))}`),r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}_triggerListChanges(e,t,n){if(0===this.listChangeSubscribers.length||!/[a-zA-Z]+\.(\d+)\./g.test(t))return;t=t.replace(/\.(\d+)/g,"[$1]");const r=Rn.getFieldReferencePreviousValue(e,t);void 0!==r&&r!==n&&this.listChangeSubscribers.forEach((r=>{r(e,t,n)}))}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Jl=new Xl;let Ql=null;const Zl=e=>e.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),eu=e=>{Ql=e},tu=()=>Ql,nu=e=>{e&&(tu()?.dispatch(e),"MERGE_DATA"===e.type&&Jl.handleServerChanges(e.payload.data,e.payload.context,e.payload.rootPageReference))},ru=e=>tu().getState().data?.[e],au=()=>tu().getState().data[V.SHARED],su=(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,s=Zl(a);return mu.getIn(n,s)},ou=(e,t,n)=>su(e,t,ru(n)),iu=(e,t,n)=>su(t,e?`${V.CONTEXT_DATA}.${e}`:`${V.CONTEXT_DATA}`,ru(n)),cu=(e,t,n)=>((e,t,n)=>{const r=Zl(`${t}.${n}`);return mu.getIn(e,r)})(ru(n),`${V.CONTEXT_DATA}.${e}`,t),du=e=>{const{context:t}=e;if(tu().getState().data[t])return we;const{action:n}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(n)?We:we},lu=(e,t)=>{const n=Zl(t);return mu.deleteIn(e,n)},uu=e=>!Array.isArray(e)&&"object"==typeof e,pu=(e,t,n={})=>{const{isArrayDeepMerge:r}=n;Array.isArray(e)&&!t&&(t=[]);const a=(e,t)=>{if(uu(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return R()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return R()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return R()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},hu=(e,t,n,r={})=>{const{isArrayDeepMerge:a=!0}=r,s=Zl(t);if("object"==typeof n){const t=pu(mu.getIn(e,s),n,{isArrayDeepMerge:a});return mu.setIn(e,s,t)}return mu.setIn(e,s,n)},gu=(e,t,n)=>{const r=Zl(t);return mu.setIn(e,r,n)},fu=()=>{const e=At,{promise:t,actionMgrID:n}=mn.actionManagerPromise(e);return nu({type:e,payload:{actionMgrID:n}}),t};class yu{static mergeDeep(e,t){return R()(t,e)}static hasIn(e,t){return b()(e,t)}static getIn(e,t,n){return O()(e,t,n)}static setIn(e,t,n){return N()(e,t,n)}static deleteIn(e,t){return C()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return x()(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||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;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 in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@W ")&&(n=!0);return n}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in 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;return t.indexOf(".")>0?t.split(".").forEach((e=>{if(-1!==e.indexOf("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]})):(n[t]={},n=n[t]),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)?[]:{}),pu(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++)if(e[n[r]]&&yu.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("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,s])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(s)?s.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof s?n(s,r):t(r.slice(),s),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 F()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,s)=>(a=e[t]?e[t]:Number.isNaN(Number(r[s+1]))?r.length-1===s?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t="",n){Array.isArray(e)?e.forEach(((e,r)=>{yu.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;yu.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(V.CASE_INFO.CASE_INFO_CONTENT,"").replace(V.DATA_INFO.DATA_INFO_CONTENT,"");return On.formatPageReference(n)}static buildAttachmentsFormData(e=[]){return e.map((e=>{if(e.delete){let t="";return t=e.responseProps.ID?e.responseProps.ID:e.responseProps.pzInsKey,{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:t}}return{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}}))}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&&mn.rejectActionByID(e.payload.actionMgrID))),!0}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}}const mu=yu,Iu=V.SUMMARY_OF_LISTS,Eu=V.SUMMARY_OF_WHEN_CONDITIONS,Au=class{static updateData(e){Object.keys(e).forEach((t=>{nu(Pu({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{nu(Pu({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Eu}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return Ll([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=Ml([this.resolveName(e,t)]);let a=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(V.CLASS_ID)),a=r.filter((e=>e[V.CLASSID]===n))),0===a.length?r[0]:a[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=le.handleAnnotation(e,t)),e)}static getContextPath(e,t){return"number"!=typeof t&&!t||"number"!=typeof(t=le.trimAnnotation(t))&&"string"!=typeof t?e:"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:t}static getRuleClass(e,t,n){let r;return t?r=t.startsWith(V.CLASS_ANNOTATION)?t.split(V.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName()):n.authorContext&&(r=n.ruleClass),r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,a=n.type,{ref:s,name:o,context:i}=n,c=this.getRuleClass(t,i,n);return"navigation"===a?r=this.resolveNavigation(s||o,t):"view"===a?r=this.resolveView(s||o,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return ou(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=cu(`${t}.${Iu}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getProperyValue(e,t,n){return e=le.trimAnnotation(e),this.getProperty(e,t,n)}static _handlePropString(e,t,n,r){n.startsWith("@")?e[t]=le.handleAnnotation(n,r):e[t]=n}static _resolveProps(e,t){e&&Object.keys(e).forEach((n=>{const r=e[n];"string"==typeof r?this._handlePropString(e,n,r,t):Array.isArray(r)?r.forEach((n=>{this._resolveProps("object"==typeof n?n:e[n],t)})):"object"==typeof r&&this._resolveProps(e[n],t)}))}static resolveProps(e,t,n){return e&&t?(mu.mergeDeep(e,t),this._resolveProps(t,n),t):t}static resolveClassID(e,t,n){const r=le.trimAnnotation(e);let a;for(a=r.startsWith(".")?`${t}${r}`:`${r}`;a;){const e=ou(V.CLASS_ID,a,n);if(e)return e;a=a.substring(0,a.lastIndexOf("."))}return null}},_u=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},Su=class{static#e=[];static#t=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=_u.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#n=(e,t,n)=>{for(let r=0;r<e.length;r++){const a=e[r],s={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#e.push(s)}};static buildActionObject=(e,t)=>{const n={...e};return n.context=t.getContextName(),n.pageReference=t.getPageReference(),n.actionMgrID=mn.getNextActionMgrId(),n};static#r=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};Au.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#a())};static#a=()=>{if(!this.#t){if(0===this.#e.length)return;const e=this.#e.shift();this.#r(e),e.config&&"true"===e.config.parallel&&this.#e.length>0&&this.#a()}};static#s=()=>{this.#a()};static#o=(e,t,n)=>{this.#n(e,t,n),this.#s()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Au.getContextPath(t,n)};static#i(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:s}=n[r];if(s){const n=this.getActionHandlers(s,a,t);n&&n.length>0&&this.#o(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();if(jn({type:k.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r}),t instanceof Event||t.nativeEvent instanceof Event||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const a=void 0===n?t.value:"value"in n?n.value:n.innerText,s=this.getFullRef(e);nu({type:_e,payload:{reference:s,value:a,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||nu({type:Ce,payload:{reference:s,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(V.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const s=a[e],o=t[e];nu({type:_e,payload:{reference:Au.getContextPath(n,s),value:o,context:r}}),nu({type:Ce,payload:{reference:Au.getContextPath(n,s),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,s=this.getFullRef(e),o=e.getContextName();n.clearMessages&&jn({type:k.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&nu({type:Ce,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(V.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.#i(e,n)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#a()};static isQueueEmpty=()=>0===this.#e.length;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Cu="CREATE_WORK",$u=e=>({type:Cu,payload:e}),bu=(e,t)=>{const n=[];for(const r in e)if("object"==typeof e[r]&&r.includes("[")){const a=r.substring(0,r.indexOf("[")),s=r.substring(r.indexOf("[")+1,r.indexOf("]"));t[a].splice(s,1,e[r]),n.push(a)}else"object"==typeof e[r]?(t[r]||(t[r]=Array.isArray(e[r])?[]:{}),bu(e[r],t[r])):t[r]=e[r];for(const r in t)(Array.isArray(t[r])&&!n.includes(r)||!Array.isArray(t[r])&&!Object.hasOwnProperty.call(e,r))&&delete t[r]},Pu=(e,t={})=>{const{serverPrecedenceFields:n=[]}=t,{context:r,data:a,isArrayDeepMerge:s,preserveClientChanges:o=!1}=e,i=Fr(r,!0);((e,t={})=>{const n=gr.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{mu.buildObject(e,t,n[e])}))})(r,i);const c=ru(r);let d={};c&&void 0!==c&&(d=JSON.parse(JSON.stringify(c)),bu(i,d)),function(e,t){const n=mu.getIn(e,V.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=mu.getIn(t,V.REFERENCED_USERS,{}),void mu.setIn(e,V.REFERENCED_USERS,{...r,...n});r=mu.getIn(t,V.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)}}(a,c);const l={caseInfo:{content:{...d?.caseInfo?.content}}};let u=a;return o?(n.forEach((e=>{mu.deleteIn(l,`caseInfo.content.${e}`)})),u=pu(a,l,{isArrayDeepMerge:!s})):((e,t)=>{const n=Lr[e]||{};Object.keys(n).forEach((e=>{mu.hasIn(t,e)&&(n[e].value=mu.getIn(t,e))}));let r=gr.getStateMachinesByContext(e)||{};r={...r,...gr.getUnConnectedStateMachines(e)||{}},Object.keys(r).forEach((n=>{if(mu.hasIn(t,n)){const r=mu.getIn(t,n);r&&Array.isArray(r)&&0===r.length&&gr.setStateMachineEmpty(e,n)}}))})(r,a),{type:Ue,payload:{...e,data:u}}},Ou=e=>({type:"SHOW_HARNESS",payload:e}),Tu=e=>({type:$e,payload:e}),Nu=e=>({type:be,payload:e}),vu=e=>({type:"ADD_WORK",payload:e}),Ru=e=>({type:xe,payload:e}),Du=e=>({type:Be,payload:e}),xu=e=>({type:He,payload:e}),wu=e=>({type:We,payload:e}),Mu=e=>({type:ze,payload:e}),Lu=e=>({type:Ye,payload:e}),ju=e=>({type:Je,payload:e}),Uu=e=>({type:Qe,payload:e}),Fu=e=>{const{containerItemID:t}=e;return e.suggestionContexts=hs(t),{type:et,payload:e}},ku=e=>({type:tt,payload:e}),Vu=e=>({type:Ze,payload:e}),Gu=e=>({type:It,payload:e}),Bu=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=cs(n)),e.context=r,e.deleteContext=!Os(n),e.childContainers=us(n),e.childContainersContexts=ps(n),e.transientItems=Ts([...e.childContainersContexts,n]),e.suggestionContexts=hs(n),n===t&&(e.caseID=ou(V.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ou(V.CASE_INFO.REMOTESYSTEMID,"",t)),{type:qe,payload:e}},Hu=e=>{const{containerItemID:t}=e;return e.transientItems=Ts([...ps(t),t]),{type:Xe,payload:e}},Wu=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Ke,payload:e}},qu=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=cs(n)),e.context=r,e.childContainers=us(n),e.childContainersContexts=ps(n),e.transientItems=Ts([...e.childContainersContexts,n]),e.suggestionContexts=hs(n),n===t&&(e.caseID=ou(V.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ou(V.CASE_INFO.REMOTESYSTEMID,"",t)),{type:nt,payload:e}},zu=e=>({type:Me,payload:e}),Yu=e=>({type:je,payload:e}),Ku=e=>({type:Ve,payload:e}),Xu=(e,...t)=>(Su.resume(),e(...t)),Ju=(e,t,n,r,a)=>({type:Ge,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),Qu=e=>({type:St,payload:e}),Zu=e=>({type:Ct,payload:e}),ep=e=>({type:$t,payload:e}),tp=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),np=e=>({type:Re,payload:e}),rp=e=>({type:_e,payload:e}),ap="replace",sp=["portal","noPortal","preview","debug","devtool"];let op="",ip="Home",cp="",dp=!0;const lp=e=>(dp=e,dp),up=()=>dp,pp=(e,t,n)=>J.getSemanticURL(e,t,n),hp=(e,t)=>J.getRestEndPoint(e,t),gp=(e,t)=>{let n=E();const r=hp(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):{}},fp=(e,t,n)=>{const{root:r,resources:a}=e,{views:s}=a,{config:o}=r;let i="";if(n)i=n;else{const e=s[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e),i=t.config.urlPath}const c=i.match(H);if(c){const e=mu.getIn(t,o.context);i=i.replace(c[0],e.pyID)}return i.startsWith("/")&&(i=i.substring(1,i.length)),{pxURLPath:i,historyAction:"add"}},yp=(e,t,n)=>{let r,a;r=q(t)?`${e}/${t}`:e;const s=q(n.pxURLPath);s&&(r=`${r}/${s}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==ip.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!J.isDefaultPortal()){const e=J.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)&&sp.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},mp=(e,t=!1,{urlPathObjParam:n,infoParam:r,optionsParam:a})=>{let s,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(t)s=n,o=r,i=a;else{const{uiResources:t,data:r}=e;({options:i}=e),s=n&&n.pxURLPath&&W(n.pxURLPath)?fp(t,r,n.pxURLPath):n||fp(t,r),o=J.getEndPointInfo(s.pxURLPath),s.pxURLPath=o.urlPath}const c=yp(op,J.getApplicationPath(),s),{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:J.getApplicationName()),n===`${op}/${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]}`}})(cp,J.getApplicationPath(),c),l=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:d});"add"===s.historyAction?((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")}})(l,d,c):s.historyAction===ap&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(l,d,c)},Ip=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:"add",pxURLPath:""},t.pxURLPath=e.semanticURL),mp(e,!1,{urlPathObjParam:t,infoParam:null,optionsParam:null})},Ep=e=>{const t={pxURLPath:e};return yp(op,J.getApplicationPath(),t)},Ap=e=>{const{uiResources:t}=e;up()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,s=a.type,o=a.name;if("VIEW"===s.toUpperCase()){const e=r[o];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))&&Ip(e)},_p=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},Sp=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&nu(d.showHistory(_p(t)))},Cp=()=>J.getApplicationPath()!==Y(),$p=(e,t=!1)=>{var n;op=e.domain,!1===t&&up()&&(n=Sp,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),J.init(e,ip)};function bp(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 Pp="function"==typeof Symbol&&Symbol.observable||"@@observable",Op=()=>Math.random().toString(36).substring(7).split("").join("."),Tp={INIT:`@@redux/INIT${Op()}`,REPLACE:`@@redux/REPLACE${Op()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Op()}`};function Np(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 vp(e,t,n){if("function"!=typeof e)throw new Error(bp(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(bp(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(bp(1));return n(vp)(e,t)}let r=e,a=t,s=new Map,o=s,i=0,c=!1;function d(){o===s&&(o=new Map,s.forEach(((e,t)=>{o.set(t,e)})))}function l(){if(c)throw new Error(bp(3));return a}function u(e){if("function"!=typeof e)throw new Error(bp(4));if(c)throw new Error(bp(5));let t=!0;d();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(bp(6));t=!1,d(),o.delete(n),s=null}}}function p(e){if(!Np(e))throw new Error(bp(7));if(void 0===e.type)throw new Error(bp(8));if("string"!=typeof e.type)throw new Error(bp(17));if(c)throw new Error(bp(9));try{c=!0,a=r(a,e)}finally{c=!1}return(s=o).forEach((e=>{e()})),e}return p({type:Tp.INIT}),{dispatch:p,subscribe:u,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(bp(10));r=e,p({type:Tp.REPLACE})},[Pp]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(bp(11));function n(){const e=t;e.next&&e.next(l())}return n(),{unsubscribe:e(n)}},[Pp](){return this}}}}}function Rp(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var Dp=function(e){function t(t,n){return e.call(this)||this}return cc(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(_c),xp={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=xp.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,pc([e,t],uc(n))):setInterval.apply(void 0,pc([e,t],uc(n)))},clearInterval:function(e){var t=xp.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},wp=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 cc(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),xp.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&&xp.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,Ac(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Dp),Mp=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return cc(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}(wp),Lp={now:function(){return(Lp.delegate||Date).now()},delegate:void 0},jp=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=Lp.now,e}(),Up=function(e){function t(t,n){void 0===n&&(n=jp.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return cc(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}(jp),Fp=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cc(t,e),t}(Up))(Mp),kp=Ic((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Vp=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 cc(t,e),t.prototype.lift=function(e){var t=new Gp(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new kp},t.prototype.next=function(e){var t=this;vc((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=lc(t.currentObservers),s=a.next();!s.done;s=a.next())s.value.next(e)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;vc((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;vc((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,s=n.observers;return r||a?Sc:(this.currentObservers=null,s.push(e),new _c((function(){t.currentObservers=null,Ac(s,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 kc;return e.source=this,e},t.create=function(e,t){return new Gp(e,t)},t}(kc),Gp=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return cc(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:Sc},t}(Vp),Bp=function(e,t){return Bp=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])},Bp(e,t)};Object.create,Object.create;var Hp=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 Vp,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}Bp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(kc),Wp=n(923),qp=Symbol.for("immer-nothing"),zp=Symbol.for("immer-draftable"),Yp=Symbol.for("immer-state");function Kp(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xp=Object.getPrototypeOf;function Jp(e){return!!e&&!!e[Yp]}function Qp(e){return!!e&&(eh(e)||Array.isArray(e)||!!e[zp]||!!e.constructor?.[zp]||sh(e)||oh(e))}var Zp=Object.prototype.constructor.toString();function eh(e){if(!e||"object"!=typeof e)return!1;const t=Xp(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Zp}function th(e,t){0===nh(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function nh(e){const t=e[Yp];return t?t.type_:Array.isArray(e)?1:sh(e)?2:oh(e)?3:0}function rh(e,t){return 2===nh(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ah(e,t,n){const r=nh(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function sh(e){return e instanceof Map}function oh(e){return e instanceof Set}function ih(e){return e.copy_||e.base_}function ch(e,t){if(sh(e))return new Map(e);if(oh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&eh(e)){if(!Xp(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[Yp];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const a=r[t],s=n[a];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Xp(e),n)}function dh(e,t=!1){return uh(e)||Jp(e)||!Qp(e)||(nh(e)>1&&(e.set=e.add=e.clear=e.delete=lh),Object.freeze(e),t&&th(e,((e,t)=>dh(t,!0)))),e}function lh(){Kp(2)}function uh(e){return Object.isFrozen(e)}var ph,hh={};function gh(e){const t=hh[e];return t||Kp(0),t}function fh(){return ph}function yh(e,t){t&&(gh("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function mh(e){Ih(e),e.drafts_.forEach(Ah),e.drafts_=null}function Ih(e){e===ph&&(ph=e.parent_)}function Eh(e){return ph={drafts_:[],parent_:ph,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ah(e){const t=e[Yp];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function _h(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Yp].modified_&&(mh(t),Kp(4)),Qp(e)&&(e=Sh(t,e),t.parent_||$h(t,e)),t.patches_&&gh("Patches").generateReplacementPatches_(n[Yp].base_,e,t.patches_,t.inversePatches_)):e=Sh(t,n,[]),mh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qp?e:void 0}function Sh(e,t,n){if(uh(t))return t;const r=t[Yp];if(!r)return th(t,((a,s)=>Ch(e,r,t,a,s,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return $h(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,s=!1;3===r.type_&&(a=new Set(t),t.clear(),s=!0),th(a,((a,o)=>Ch(e,r,t,a,o,n,s))),$h(e,t,!1),n&&e.patches_&&gh("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ch(e,t,n,r,a,s,o){if(Jp(a)){const o=Sh(e,a,s&&t&&3!==t.type_&&!rh(t.assigned_,r)?s.concat(r):void 0);if(ah(n,r,o),!Jp(o))return;e.canAutoFreeze_=!1}else o&&n.add(a);if(Qp(a)&&!uh(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Sh(e,a),t&&t.scope_.parent_||$h(e,a)}}function $h(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dh(t,n)}var bh={get(e,t){if(t===Yp)return e;const n=ih(e);if(!rh(n,t))return function(e,t,n){const r=Th(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Qp(r)?r:r===Oh(e.base_,t)?(vh(e),e.copy_[t]=Rh(r,e)):r},has:(e,t)=>t in ih(e),ownKeys:e=>Reflect.ownKeys(ih(e)),set(e,t,n){const r=Th(ih(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Oh(ih(e),t),o=r?.[Yp];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((a=n)===(s=r)?0!==a||1/a==1/s:a!=a&&s!=s)&&(void 0!==n||rh(e.base_,t)))return!0;vh(e),Nh(e)}var a,s;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_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Oh(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,vh(e),Nh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=ih(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Kp(11)},getPrototypeOf:e=>Xp(e.base_),setPrototypeOf(){Kp(12)}},Ph={};function Oh(e,t){const n=e[Yp];return(n?ih(n):e)[t]}function Th(e,t){if(!(t in e))return;let n=Xp(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Xp(n)}}function Nh(e){e.modified_||(e.modified_=!0,e.parent_&&Nh(e.parent_))}function vh(e){e.copy_||(e.copy_=ch(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Rh(e,t){const n=sh(e)?gh("MapSet").proxyMap_(e,t):oh(e)?gh("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fh(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=bh;n&&(a=[r],s=Ph);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:fh()).drafts_.push(n),n}function Dh(e){if(!Qp(e)||uh(e))return e;const t=e[Yp];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ch(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ch(e,!0);return th(n,((e,t)=>{ah(n,e,Dh(t))})),t&&(t.finalized_=!1),n}th(bh,((e,t)=>{Ph[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ph.deleteProperty=function(e,t){return Ph.set.call(this,e,t,void 0)},Ph.set=function(e,t,n){return bh.set.call(this,e[0],t,n,e[0])};var xh=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof 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("function"!=typeof t&&Kp(6),void 0!==n&&"function"!=typeof n&&Kp(7),Qp(e)){const a=Eh(this),s=Rh(e,void 0);let o=!0;try{r=t(s),o=!1}finally{o?mh(a):Ih(a)}return yh(a,n),_h(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===qp&&(r=void 0),this.autoFreeze_&&dh(r,!0),n){const t=[],a=[];gh("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}Kp(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof 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]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Qp(e)||Kp(8),Jp(e)&&(e=function(e){return Jp(e)||Kp(10),Dh(e)}(e));const t=Eh(this),n=Rh(e,void 0);return n[Yp].isManual_=!0,Ih(t),n}finishDraft(e,t){const n=e&&e[Yp];n&&n.isManual_||Kp(9);const{scope_:r}=n;return yh(r,t),_h(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}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=gh("Patches").applyPatches_;return Jp(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},wh=xh.produce;xh.produceWithPatches.bind(xh),xh.setAutoFreeze.bind(xh),xh.setUseStrictShallowCopy.bind(xh),xh.applyPatches.bind(xh),xh.createDraft.bind(xh),xh.finishDraft.bind(xh);const Mh={getData:(e,t,n,r={})=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:d}=gp("getListData",a);return Ad(c,{method:d,body:t,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:s}=gp("getListDataCount",r);return Ad(a,{method:s,body:t},n)},getDataViewMetadata:(e,t,n)=>{const r={dataViewName:e},a=!!n,s=a?"postDataViewMetadata":"getDataViewMetadata",{restApi:o,reqType:i}=gp(s,r);return Ad(o,a?{method:i,body:{associationFilter:n}}:{method:i},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},d={dataViewParameters:n},{restApi:l,reqType:u}=gp("readDataObject",c);return Ad(l,{method:u,body:d,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},r,i)},getCaseEditMetadata:(e,t)=>Qd.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Qd.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Qd.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:s,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:d,reqType:l}=gp("moveListRecords",c);return Ad(d,{method:l,body:{content:{sourceID:n,destinationID:r,context:a,listClass:s}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===V.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===V.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==us("root").find((e=>e.includes("authoring-preview")))?`${V.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${te.getAppAlias()}-${e}`};var Lh=n(924),jh=n.n(Lh);const Uh=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new 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===jh()(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};kh.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]}}("CASE",t)}return this.subscriptions[e]}};class Fh{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new 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 s={matcher:"PRESENCE",criteria:{userId:e}};return kh.subscribe(s,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],kh.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)}))}))}};static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=te.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{console.log(`MS : ${Date.now()}`);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(`MS catch : ${Date.now()}`),console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=null),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=null,null!==this.webSocket&&1===this.webSocket.readyState){const e=te.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}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 recieved 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.matcher===e&&mu.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){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 recieved 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}`,s=new class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}}(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(s,a),a):(this.inProgressSubscriptions.push({messageSubscriber:s,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=>Uh.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:te.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(te.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 occured 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 kh=Fh,Vh=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,a=n*r;let s=a-r;for(;s<a;s+=1){if(!this.records[s])return this.maxRecords===s?t:[];t.push(this.records[s])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:n,pageSize:r}=t,a=n*r;let s=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[s],s+=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=pu(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}},Gh=new class{isCacheDisabled=!1;constructor(){this.datastore={},this.subscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t={},n,r){const a=this._generateHash(e,t,r);if(null===a)return[];if(this.datastore[e]&&this.datastore[e][a]){const t=this.datastore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}_generateHash(e,t,n){const r=jl(e);if(!r)return null;const a=r.parameters||[];let s="",o=e;const i=[];return a.forEach((e=>{t[e.name]?i.push(t[e.name]):i.push(e.defaultValue||V.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(V.HASH_DELIMITER)&&(s=mu.getHashedString(i.join(V.HASH_DELIMITER)),o=e+V.UNDERSCORE_STRING+s),o}async getDataAsync(e,t,n={},r,a,s={}){if(this._subscribeToMessageService(e),s.purgeDataPageCache&&(this.datastore[e]={}),!this._isCacheable(e,a)||s.invalidateCache){const o=await this._fetchData(e,n,r,a,t,s),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,a);if(o.length>0)return{data:o};const i=await this._fetchData(e,n,r,a,t,s);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={}){const{restApi:a,reqType:s}=gp(V.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),o={method:s};if(r&&r.invalidateCache&&delete this.datastore[e],r&&!r.invalidateCache&&this.datastore[e])return this.datastore[e];const i=a&&0===Object.keys(n).length?a.split("?")[0]:a;return Ad(i,o,t).then((t=>(this._isPerInteraction(e)||(this.datastore[e]=t.data||{}),t.data)))}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 Vh;this.datastore[t][n]=r,r.mergeRecords(e[t][n].pxResults)}}))}))}_mergeDataStore(e,t,n,r,a){const s=this._generateHash(e,t,r),o=a?.data?.data;if(!o||0===o.length)return[];if(null===s)return o;this.datastore[e]||(this.datastore[e]={}),this.datastore[e][s]||(this.datastore[e][s]=new Vh);const i=this.datastore[e][s];return i.mergeRecords(o,n),i.isDirty=!1,i.getRecords(n)}async _fetchData(e,t,n,r,a,s){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=s,d={dataViewParameters:t};return i&&(d.includeTotalCount=!0),o&&(d.useExtendedTimeout=!0),n&&(d.paging=n),r&&(d.query=r),Mh.getData(e,d,a,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}_handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t._handleMessage({message:{datapage:e}})}subscribeToUpdate(e,t,n,r,a,s){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},this.subscribers[e].callback[s]||(this.subscribers[e].callback[s]=a),this._subscribeToCascadeUpdates(e,t,n,r,s)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback[a],t&&t.length>0&&Jl.unRegisterFields(n,r,t,a)}_subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&Jl.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}};kh.subscribe(t,this._handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}_handleMessage(e){const{msgId:t,message:n}=e,{datapage:r}=n,a=this.subscribers[r];this._markDataInstancsDirty(r),a&&a.callback&&Object.keys(a.callback).forEach((n=>{a.callback[n](e.message,!!t)}))}_markDataInstancsDirty(e){this.datastore[e]&&Object.keys(this.datastore[e]).forEach((t=>{this.datastore[e][t].isDirty=!0}))}_isPerInteraction(e){const t=jl(e);return t&&t.refreshStrategy&&"reloadOncePerInteraction"===t.refreshStrategy.type}_isCacheable(e,t){return!(this._isPerInteraction(e)||!this.isCacheEnabled||t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}},Bh=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{Gh.updateDataPageStore(t),Object.keys(t).forEach((n=>{mu.getIn(e,[V.SHARED,n])?Object.keys(t[n]).forEach((r=>{mu.setIn(e,[V.SHARED,n,r],t[n][r])})):mu.setIn(e,[V.SHARED,n],t[n])}))})(e,n),r&&mu.deleteIn(e,[r,"shared"])},Hh=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:V.PERFORM_MODE),containerName:s}=t;s!==Ya.WORKAREA&&a&&mu.setIn(e,[r,"context_data","caseViewMode"],a)},Wh=(e,t=[])=>{t.forEach((t=>mu.deleteIn(e,t)))},qh=(e,t=[])=>{t.forEach((t=>mu.deleteIn(e,t)))},zh=(e,t=[])=>{t.forEach((t=>{mu.deleteIn(e,t)}))},Yh=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;mu.deleteIn(e,[t,"nextAssignmentInfo"]),mu.deleteIn(e,[t,"caseInfo","availableActions"]),mu.deleteIn(e,[t,"caseInfo","availableProcesses"]),mu.deleteIn(e,[t,"caseInfo","activeActionID"]),mu.deleteIn(e,[t,"caseInfo","assignments"]),mu.deleteIn(e,[t,"caseInfo","childCases"]),a&&(mu.deleteIn(e,[t,"caseInfo","confirmationLinks"]),mu.deleteIn(e,[t,"caseMessages"])),r&&(mu.deleteIn(e,[t,"caseInfo","actionButtons"]),mu.deleteIn(e,[t,"caseInfo","navigation"]))},Kh=/\[(\d+)\]$/gi,Xh=/(\d+)/gi,Jh=/\[.\]$/gi,Qh=(e,t,n,r=[V.CONTEXT_DATA,V.CASE_INFO.CASE_INFO,V.CONTENT])=>{const a=mu.getIn(t,r);if(a){const t=Fn(a,[],[]);for(const a of t)mu.setIn(e[n],[...r,...a],{})}},Zh=(e,t,n,r)=>{const{property:a,pageReference:s,category:o,type:i}=r.payload,c=mu.getIn(e[t],n);if(c&&o===V.CASEMESSAGES)mu.setIn(e[t],xn(a,s,o),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&mu.setIn(e[t],xn(a,s,o),r)}};const eg=[(e,t)=>wh(e,(e=>{switch(t.type){case Ue:return e[t.payload.context]=pu(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge}),Hh(e,t.payload,!0),Bh(e,t.payload),e;case _e:{const{context:n,reference:r,value:a,isArrayDeepMerge:s}=t.payload;return hu(e[n],r,a,{isArrayDeepMerge:s}),e}case Se:{const{context:n,reference:r,value:a}=t.payload;return gu(e[n],r,a),e}case Fe:return lu(e[t.payload.context],t.payload.reference),e;case Ne:return mu.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case ve:return mu.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case St:{const{data:n}=t.payload;return Bh(e,{data:{shared:n}}),e}case Ct:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;mu.deleteIn(e.shared,[n,r]);const a=mu.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&mu.deleteIn(e.shared,[n])})),e}case Pt:{const n=mu.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?mu.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):mu.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),(e={},t)=>wh(e,(e=>{switch(t.type){case We:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&Yh(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(V.WORKAREA)&&-1===n.indexOf(V.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,Hh(e,t.payload),((e,t)=>{const{context:n}=t;mu.setIn(e,[n,"context_data","actionType"],t.actionType),mu.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)})(e,t.payload),Bh(e,t.payload),((e,t)=>{const{context:n}=t;mu.deleteIn(e,[n,"context_data","blocking_action_counter"]),mu.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload),e}case et:{t.payload.doDeleteCaseSummary&&Yh(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n}=t.payload;return!n||-1===n.indexOf(V.WORKAREA)&&-1===n.indexOf(V.MODAL)?e[t.payload.containerItemID]=pu(e[t.payload.containerItemID],t.payload.data):e[t.payload.context]=pu(e[t.payload.context],t.payload.data),Hh(e,t.payload),Bh(e,t.payload),qh(e,t.payload.suggestionContexts),e}case qe:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&mu.deleteIn(e,[r]),mu.deleteIn(e,[n])})(e,t.payload),zh(e,n),Wh(e,t.payload.transientItems),qh(e,t.payload.suggestionContexts),e}case He:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{mu.deleteIn(e,[t])})):mu.deleteIn(e,[n]),e}case tt:{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:s}=t.payload;return Yh(e,t.payload.context),Hh(e,t.payload),e[n]=pu(e[n],e[r]),e[n]=pu(e[n],a),mu.deleteIn(e,[r]),zh(e,s),Bh(e,t.payload),e}case nt:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}}=t;let{payload:{data:s}}=t;const o=mu.getIn(e[n],"pulse");let i=mu.getIn(e[n],"OperatorID"),c=mu.getIn(e[n],"pxRequestor");return c&&s.pxRequestor&&(c=mu.mergeDeep(c,s.pxRequestor)),i&&s.OperatorID&&(i=mu.mergeDeep(i,s.OperatorID)),!r&&o&&(s=hu(s,"pulse",o),s=hu(s,"OperatorID",i),s=hu(s,"pxRequestor",c)),mu.setIn(e,n,s),Hh(e,t.payload),Bh(e,t.payload),zh(e,a),Wh(e,t.payload.transientItems),qh(e,t.payload.suggestionContexts),e}case bt:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return Yh(e,n,{doDeleteConfirmationDetails:r}),e}case ze:{const{transientItemID:n,data:r}=t.payload;return mu.setIn(e,n,r)}case Ke:case Xe:{const{transientItems:n}=t.payload;return n.forEach((t=>mu.deleteIn(e,t))),e}case Ye:case Je:{const{transientItemID:n,data:r}=t.payload;return pu(mu.getIn(e,n),r),e}case Qe:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&mu.deleteIn(e,[n,t]);return e}case Re:{const{key:n,value:r}=t.payload;return mu.setIn(e,`${V.SHARED}.${n}`,r),e}case st:{const{context:n,data:r}=t.payload;return mu.setIn(e,n,r)}default:return e}})),(e=og().data,t)=>wh(e,(e=>{switch(t.type){case Ge:return t.payload.err.errorDetails&&"Validation fail"===t.payload.err.errorClassification?function(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:s,pageErrors:o}=((e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[V.ERROR_IN_PAGE_IDENTIFIER]&&e[V.ERROR_FIELD_IN_PAGE]):{const a=`${e[V.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),s=`${a}${e[V.ERROR_IN_PAGE_IDENTIFIER]}`,o=mu.deepClone(e);o[V.ERROR_FIELD_IN_PAGE]=a,t.includes(s.slice(1))||t.includes(s.substring(s.indexOf(".")+1,s.indexOf("[")))?r.push(o):n.push(e);break}case Boolean(e[V.ERROR_IN_PAGE_IDENTIFIER]&&!e[V.ERROR_FIELD_IN_PAGE]):{const a=e[V.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}})(n.errorDetails,r);if(mu.setIn(e,[a,...Dn.FIELD_MESSAGES_PATH],{}),mu.setIn(e,[a,...Dn.PAGE_MESSAGES_PATH],[]),s.forEach((t=>{if(t[V.ERROR_FIELD_IN_PAGE]){const n=t[V.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=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)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),s=xn(r,t,V.PROPERTY);mu.setIn(e,[a,...s],[])}}})),s.length>0&&((e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[V.ERROR_FIELD_IN_PAGE].slice(1),a=n[V.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(a){let s=r?`caseInfo.content.${r}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const o=xn(a,s,V.PROPERTY),i=mu.getIn(e[t],`${s}.classID`),c=vl(a,i),d={type:k.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,fieldLabel:c?.label},l=mu.getIn(e[t],o,[]);if(mu.isContains(l,d))return;mu.setIn(e[t],o,[...l,d])}})(e,t,n)}))})(e,a,s),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:k.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[a]||(a=V.APP.APP),mu.setIn(e,[a,...Dn.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(Ya.WORKAREA)&&(a=he(a)),mu.deleteIn(e,[a,...Dn.PAGE_MESSAGES_PATH]);return e}(e,t):e;case et:{const{context:n}=t.payload,r=[n,...Dn.FIELD_MESSAGES_PATH],a=[n,...Dn.PAGE_MESSAGES_PATH];if(mu.setIn(e,r,{}),mu.setIn(e,a,[]),n&&n.includes(Ya.WORKAREA)){const t=[Ee(n),...Dn.PAGE_MESSAGES_PATH];mu.setIn(e,t,[])}return e}case Et:{const{isListEntry:n}=t.payload;return n?((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:s,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return Qh(e,i,c),e;const d=xn(n,r,a,s);if(Number.isInteger(o)){mu.deleteIn(e[c],d);const t=d.slice(0,d.length-1);let n=mu.getIn(e[c],t)||{};const r=Object.keys(n);n=r.map((e=>n[e])),n.forEach(((n,a)=>{const s=r[a].match(Kh);if(s?.length){const i=parseInt(s[0].match(Xh)[0],10);i>o&&(mu.deleteIn(e[c],t.concat(r[a])),mu.setIn(e[c],t.concat(r[a].replace(Jh,`[${i-1}]`)),n))}}))}else mu.setIn(e[c],d,{});return e})(e,t):((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:s,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return Qh(e,o,i),e;const d=xn(n,r,a,s);return a===V.PAGE&&i?.includes(Ya.WORKAREA)&&(c=he(i)),Zh(e,c,d,t),Zh(e,i,d,t),e})(e,t)}case It:{const{messages:n,property:r,pageReference:a,context:s,category:o}=t.payload,i=xn(r,a,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&mu.setIn(e[s],xn(r,a,o),n),e}default:return e}})),(e,t)=>wh(e,(e=>{if(t.type===$t){const{instruction:n,actions:r,context:a,referenceList:s,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,d=Zl(s);switch(n){case V.LIST_ACTIONS.INSERT:((e,t,n,r,a)=>{mu.setIn(e[t],[...n,r],a)})(e,a,d,o,c);break;case V.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const s=pu(mu.getIn(e[t],[...n,r],{}),a);mu.setIn(e[t],[...n,r],s)})(e,a,d,o,c);break;case V.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const a=mu.getIn(e[t],n,[]);a.splice(r,1),mu.setIn(e[t],n,a)})(e,a,d,o);break;case V.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const s=mu.getIn(e[t],[...n,r],{}),o=mu.getIn(e[t],n,[]);o.splice(r,1),o.splice(a,0,s),mu.setIn(e[t],n,o),((e,t,n,r,a)=>{const s=mu.deepClone(mu.getIn(e,[`${t}`])),o=mu.getIn(s,[V.CONTEXT_DATA,V.CASE_INFO.CASE_INFO]);if(!o)return;const i=n.substring(0,n.lastIndexOf(".")),c=n.substring(n.lastIndexOf(".")+1),d=((e,t,n)=>{const r=mu.getIn(e,[V.CONTEXT_DATA,...n.split(".")]);return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(s,c,i);if(0!==d.length)if(wn(o,c,r).content[`${c}[${r}]`]){const o={},i=`${n}[${r}]`,c=mu.getIn(s,[V.CONTEXT_DATA,...i.split(".")]);o[`${n}[${a}]`]=c,mu.deleteIn(e[t],[V.CONTEXT_DATA,...i.split(".")]),Mn(e,t,d,r,a,n,o)}else Mn(e,t,d,r,a,n)})(e,t,n?.join("."),r,a)})(e,a,d,o,i);break;case V.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=mu.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:s,listIndex:o}=e;if(r===V.LIST_ACTIONS.SELECT){a[o]=s;const e=n?.join(".");Jn(t,e)}else delete a[o]})),mu.setIn(e[t],n,a.filter(Boolean))})(e,a,d,r);break;case V.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{mu.setIn(e[t],n,[])})(e,a,d)}}return e}))],tg=(e=og().data,t)=>t.type===At?og().data:(eg.forEach((n=>{e=n(e,t)})),e),ng=(e,t=[])=>{t.forEach((t=>{mu.deleteIn(e,[t])}))},rg=(e,t)=>{const{type:n,payload:r}=t,a=n===et,{target:s,context:o,semanticURL:i="",root:c,containerItemID:d,childContainers:l,flowName:u,resourceType:p="",key:h="",clearView:g=!1}=r;return c?mu.setIn(e,[s,"items",d,"view"],c):g&&mu.deleteIn(e,[s,"items",d,"view"]),o&&mu.setIn(e,[s,"items",d,"context"],o),u&&mu.setIn(e,[s,"items",d,"flowName"],u),(!a||a&&h)&&mu.setIn(e,[s,"items",d,"key"],h.trim()),(!a||a&&i)&&mu.setIn(e,[s,"items",d,"semanticURL"],i),(!a||a&&p)&&mu.setIn(e,[s,"items",d,"resourceType"],p),ng(e,l),e},ag=(e=og().containers,t)=>t.type===At?og().containers:wh(e,(e=>{switch(t.type){case Be:{const{context:n,name:r,type:a,actionMgrID:s}=t.payload,o=`${n}/${r}`;let i=null;return mn.resolveActionByID(s,null,!1),e[o]||(i={type:a,accessedOrder:[],items:{}},mu.setIn(e,[o],i)),e}case at:{const{containerName:n,childContainers:r=[]}=t.payload;return mu.deleteIn(e,[n]),r.forEach((t=>{mu.deleteIn(e,[t])})),e}case He:{const{context:n,name:r,actionMgrID:a,childContainers:s}=t.payload,o=`${n}/${r}`;return mn.resolveActionByID(a,null,!1),mu.setIn(e,[o,"accessedOrder"],[]),mu.setIn(e,[o,"items"],{}),Array.isArray(s)&&s.forEach((t=>{mu.deleteIn(e,[t])})),e}case We:{const{target:n,context:r,isInCreateStage:a,isBulkAction:s,semanticURL:o,root:i,containerItemID:c,actionMgrID:d,key:l,flowName:u,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:y,modalOptions:m,resourceStatus:I,isMultiRecordData:E,acTertiary:A,parentContext:_}=t.payload,S=e[n],C=S&&S.type,$=S&&S.accessedOrder||[],b=S&&S.items||{};let P=null;return e[n]&&"single"===C&&$.length>0?rg(e,t):(P={accessedOrder:[...$,c],items:{...b,[c]:{view:i,semanticURL:o,key:l,flowName:u,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:g,...s&&{isBulkAction:s},showProgress:f,progressMessage:y,modalOptions:m,resourceStatus:I,...A&&{acTertiary:A},...E&&{isMultiRecordData:E},..._&&{parentContext:_}}}},mn.resolveActionByID(d,null,!1),e[n]=R()(e[n],P),e)}case et:{const{actionMgrID:n,data:r}=t.payload;let a=e;try{a=rg(e,t),mn.resolveActionByID(n,r,!1)}catch{mn.rejectActionByID(n,!1)}return a}case nt:return((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:s}=t.payload;let o=e;try{mu.setIn(e,[a,"items",s,"transientItems"],[]),o=rg(e,t),mn.resolveActionByID(n,r,!1)}catch{mn.rejectActionByID(n,!1)}return o})(e,t);case Ze:{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=mu.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),mu.setIn(e,[n,"accessedOrder"],t),mn.resolveActionByID(a,null,!1)}catch{mn.rejectActionByID(a,!1)}return e}case tt:case qe:{const{target:n,containerItemID:r,actionMgrID:a,childContainers:s}=t.payload;try{const t=mu.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));mu.setIn(e,[n,"accessedOrder"],t),mu.deleteIn(e,[n,"items",r]),ng(e,s),mn.resolveActionByID(a,null,!1)}catch{mn.rejectActionByID(a,!1)}return e}case ze:{const{transientItemID:n,target:r,contextName:a}=t.payload,s=mu.getIn(e,[r,"items",a,"transientItems"])??[];return mu.setIn(e,[r,"items",a,"transientItems"],[...s,n])}case Xe:{const{target:n,containerItemID:r}=t.payload;return mu.deleteIn(e,[n,"items",r,"transientItems"]),e}case Ke:{const{target:n,transientItemID:r,containerItemID:a}=t.payload,s=(mu.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));return mu.setIn(e,[n,"items",a,"transientItems"],s)}default:return e}}));let sg={};const og=()=>sg;function ig(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Bd(e),r=function(e,t){return"number"==typeof Gd(e)?e.pop():1/0}(e),a=e;return a.length?1===a.length?Kc(a[0]):function(e){return void 0===e&&(e=1/0),kd(Uc,e)}(r)(ad(a,n)):qd}const cg=(e,t)=>{if(e.confirmationLinks&&(e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return t=((e,t)=>{const n=[e];return t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const n=e,{uiResources:{actionButtons:r,navigation:a},nextAssignmentInfo:s}=n;if(n.data&&n.data.caseInfo){r&&(n.data.caseInfo.actionButtons=r),a&&(n.data.caseInfo.navigation=a),t&&t[k.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions;const{assignments:s,availableActions:o=[]}=n.data.caseInfo;if(!(s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions))||t&&t[k.STOPMERGEACTIONS]||(s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||o.push(e)})),n.data.caseInfo.availableActions=o),e.confirmationNote){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}}return t&&t.isCreateDataObject&&(n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),s&&(n.data.nextAssignmentInfo=s),n},dg={},lg=[(e,t)=>e.pipe(jd(In,Nt),Fd((e=>e.payload)),kd((e=>{const{context:n,caseWideAction:r,contextData:a,caseViewAction:s,interestPage:o,options:i}=e;let c={};const{propertyName:d="",classID:l=""}=i,u=ba(n,{skipUUID:!1}),p=mu.getPropertyName(d),h=p?p.split("."):[],g=h.pop(),f=h.join("."),y=[];if(f){const e=vl(f,l);if(e&&"copy"===e.dataRetrievalType){const e=mu.getIn(u,`content.content.${f}`)||{};Object.keys(e).length>0&&Object.keys(e).filter((e=>e!==g)).forEach((t=>{delete e[t],y.push(`${f}`)}))}}e.serverPrecedenceFields=y;let m={...u.content,contextData:a};const I=Ba(n);mu.isEmpty(I)||(m=Ga(I,m)),r?c=gp("refreshCaseData",e):s?(c=gp("refreshCaseView",e),m.interestPage=o):c=gp("refreshAssignmentData",e),Zd.registerBlockingAction(n).catch((()=>{}));const{restApi:E}=c,{reqType:A}=c,_=t.value.data[n]?.caseInfo?.headers;return ad(((e,t)=>{const{context:n}=e;e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag});const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if((e=>gd[e])(r)>0&&dg[r]){const t=[];dg[r].forEach(((n,r)=>{n.url===e.url&&(t.push(r),n.cancelConfig.cancel())})),t.forEach((e=>{dg[r].splice(e,1)}))}const a=Cd();return e.signal=a.token,e.cancelConfig=a,dg[r]?dg[r].push(e):dg[r]=[e],Ad(e.url,e,n,{cancelContext:r}).then((e=>(delete dg[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete dg[r],e}))})({body:m,reqHeaders:_,context:n,method:A,url:Pn(e,E)},e)).pipe(Fd((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:$a(t.headers)}))),Xd(": Error ocurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),kd((async e=>{if(e&&e.type===Ge)return Zd.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),va(e);const{actionConfig:t,response:n,headers:r,actionMgrID:a}=e,{context:s,serverPrecedenceFields:o}=t,i=Jr.getTargetViewContainerName(ot),c=vt(i,s),d={acName:c,context:s},l=cg(n,{[k.STOPMERGEACTIONS]:!0,[k.ACTIONS.DELETEAVIALACTIONS]:!0});l.directUrlUpdation=!1,await Oa(l,t,d);const u=Pa(l,{target:c,context:s});u.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=Xu(Pu,u,{serverPrecedenceFields:o});return gr.registerForServerChanges(),nu(p),mn.resolveActionByID(a,u),gr.unRegisterForServerChanges(),Zd.deRegisterBlockingAction(s).catch((()=>{})),[]})))],ug=lg,pg=[e=>e.pipe(jd(_t),kd((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const s=e.payload.datapages[a];if(s.mode===V.READONLY&&s?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=s?.refreshStrategy||{},n=au()[s.name];if(n&&a in n){const r=n[a],{loadTime:s}=r;if(!Mh.isTimeElapsed(s,e,t))return}}return Mh.getData(s.name,{dataViewParameters:s.dataViewParameters},t).then((e=>{const t=s.mode===V.READONLY?r:n;t[s.name]?t[s.name][a]={pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[s.name]={[a]:{pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const s=[];return Object.keys(n).length&&s.push(Pu({context:t,data:n})),Object.keys(r).length&&s.push(Qu({data:r,context:t})),nu(s),[]})))],hg=pg;class gg{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";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=>{switch(e.data.action){case gg.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Zr.publish(V.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case gg.LOAD_PREVIEW:this.loadPreview(e);break;case gg.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case gg.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case gg.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case gg.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case gg.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;r===this.getUniqueId()&&hl({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})};closeContainer=e=>{const{uniqueId:t}=e.data;if(t!==this.getUniqueId())return;const n=hl({isRoot:!0}),r=PCore.getStore().getState().data.app?.pyPortal?.pyPrimaryNavPages;let a;Array.isArray(r)&&r[0]&&(a=r[0]);const s=a?.pyClassName||"Data-Portal",o=a?.pyRuleName||"pyHome";n.getPConnect().getActionsApi().showPage(o,s)};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:a}=e.data;let s=r;r===gg.OPEN_WORK_ITEM&&(s=gg.OPEN_WORK_BY_HANDLE);const o=pp(s,{caseClassName:n},void 0).replace(/{.+?}/,da(t)),i=`${k.APP.APP}${V.FORWARD_SLASH_STRING}${k.PRIMARY}`;(e=>{Ip(e)})({semanticURL:o,directUrlUpdation:!0,options:{acName:i,context:ds(i)}});const c=n.substring(n.lastIndexOf("-")+1),d=t.substring(t.lastIndexOf(" ")+1);(e=>{(e=>{window.document.title=e})(e)})(`${c} (${d}) - ${PCore.getEnvironmentInfo().environmentInfoObject.pxApplication.pyLabel}`),hl({}).getPConnect().getActionsApi().updateRecents(n,d,a,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:n}=e.data;n===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle",this.onCreateCallback.call(this,this.openAssignmentParams)),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${k.APP.APP}${V.FORWARD_SLASH_STRING}${k.PRIMARY}`;hl({meta:{},options:{context:ds(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${k.APP.APP}${V.FORWARD_SLASH_STRING}${k.PRIMARY}`;hl({meta:{},options:{context:ds(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Zr.subscribe(k.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Zr.subscribe(k.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Zr.unsubscribeAllWithEventType(k.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Zr.unsubscribeAllWithEventType(k.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:gg.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:gg.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:gg.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const fg=new gg,yg=e=>{const{containerName:t,isInCreateStage:n}=e;return n?V.MODAL:t||Jr.getTargetViewContainerName(pt)},mg=e=>{const t=mu.getIn(e,[V.DATA,V.CASE_INFO.CASE_INFO]);return dn(t)&&ln(Z.getOperatorIdentifier(),t)},Ig=()=>({registerHeader:(...e)=>pd.registerHeader(...e),unRegisterHeader:(...e)=>pd.unRegisterHeader(...e),getRegisteredHeaders:()=>pd.getRegisteredHeaders()}),Eg=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:s},o)=>{const{restApi:i,reqType:c}=gp(e,n),d={method:c,headers:a,body:t,...s&&{responseType:s}};return r&&(d.signal=r.token),Ad(i,d,o)},Ag=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},s)=>(e.startsWith("http:")||e.startsWith("https:")||(e=E()+e),Ad(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},s)),_g=e=>J.doesRestApiExist(e),Sg=()=>Cd(),Cg=e=>$d(e),$g=e=>{(e=>{yd=e})(e)},bg=()=>Pg,Pg=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:s=Sa.PAGE,pageName:o,context:i=V.APP.APP,debugInfo:c,headers:d}=t;let l={};n&&n.content&&(l=n.content);const u={caseTypeID:e,content:{...l,...r},processID:a};return Eg("createWork",{body:u,queryPayload:{caseClassName:e,viewType:s,params:{pageName:o}},headers:{...d,...c&&{...pd.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:u,headers:$a(t.headers,e,d)})))}},{RESOURCE_TYPES:Og}=k,Tg=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:s}=e,o=ca(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})(o)&&e?.stageID===o.stageID?Sa.PAGE:n||(!aa(r)&&!aa(a)||s?Sa.PAGE:Sa.FORM)},Ng=(e,t,n,r,a,s,o)=>Ad(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...pd.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:s?o:""}),{RESOURCE_TYPES:vg}=k,{RESOURCE_TYPES:Rg}=k;class Dg{constructor(){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}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}`))].join(V.HASH_DELIMITER),s=mu.getHashedString(a),o=`${e.dataSource}_${s}`,i=Mh.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(window.sessionStorage.getItem(i));if(t&&Dg._searchResultsCache?.[t]?.[o])n(Dg._searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Dg._searchResultsCache?.persisted?.[o])n(Dg._searchResultsCache.persisted[o]);else{const s=new Dg;s.listType=e.listType,s.dataSource=e.dataSource,e.enablePagination?(s.enablePagination=e.enablePagination,s.pageSize=e.pageSize):s.maxResultsDisplay=e.maxResultsDisplay,s.parameters=e.parameters,s.columns=e.columns,s.matchPosition=e.matchPosition,s.context=t,JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(s.dataSourceMetaData=a.dataSourceMetaData,s.isQueryable=a.isQueryable,s.isInitialised=a.isInitialised,s.associationFilter=a.associationFilter,Dg.initializeCache(t,e,o,s),n(s)):(s.associationFilter=e.associationFilter,s.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Dg.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)})))}}else if(e.deferDatasource){const r=new Dg;r.listType=e.listType,r.dataSource=e.dataSource,e.enablePagination?(r.enablePagination=e.enablePagination,r.pageSize=e.pageSize):r.maxResultsDisplay=e.maxResultsDisplay,r.dataSourceMetaData=e.dataSourceMetaData,r.parameters=e.parameters,r.columns=e.columns,r.matchPosition=e.matchPosition;const a=PCore.getMetadataUtils().getDataPageMetadata(e.dataSource);r.isQueryable=a.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,window.sessionStorage.setItem(i,JSON.stringify({isQueryable:a.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,Dg.initializeCache(t,e,o,r),n(r)}else{const a=new Dg;a.listType=e.listType,a.dataSource=e.dataSource,e.enablePagination?(a.enablePagination=e.enablePagination,a.pageSize=e.pageSize):a.maxResultsDisplay=e.maxResultsDisplay,a.dataSourceMetaData=e.dataSourceMetaData,a.parameters=e.parameters,a.columns=e.columns,a.matchPosition=e.matchPosition,a.context=t,a.associationFilter=e.associationFilter,a.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(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,Dg.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static clearContextedCache(e){delete Dg._searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Dg._searchResultsCache[e]&&(Dg._searchResultsCache[e]={}),Dg._searchResultsCache[e][n]=r):(void 0===Dg._searchResultsCache.persisted&&(Dg._searchResultsCache.persisted={}),Dg._searchResultsCache.persisted[n]=r)}fetchMetaData(e){return Mh.getDataViewMetadata(this.dataSource,e,this.associationFilter)}getData(e){if(this.isQueryable){const t=this.buildSchemaForQueryableDP(e);return Gh.getDataAsync(this.dataSource,this.context,t.dataViewParameters,t.paging,t.query)}return this.fetchNonQueryableResults(e)}memoizedGetData(e){const t=e?.toLowerCase();if(this.enablePagination?t in this.cache&&this.pageNumber in this.cache[t]:t in this.cache)return this.enablePagination?this.cache[t][this.pageNumber]:this.cache[t];const n=this.getData(e);return this.enablePagination?(this.cache[t]=this.cache[t]||{},this.cache[t][this.pageNumber]=n):this.cache[t]=n,n}fetchData(e,t){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e)):Promise.reject()}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e){return this.fetchedNQData?new Promise((t=>t({data:this.filterNonQueryableData(e)}))):this.dataSourceMetaData.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()?new Promise(((t,n)=>{const r=this.buildSchemaForNonQueryableDP();Gh.getDataAsync(this.dataSource,this.context,r.dataViewParameters).then((n=>(this.nonQueryableData=n.data?[...n.data]:[],this.fetchedNQData=!0,t({data:this.filterNonQueryableData(e)})))).catch((e=>n(e)))})):null}filterNonQueryableData(e){const t=this.columns.filter((e=>e.useForSearch)).map((e=>e.value));return this.nonQueryableData.reduce(((n,r)=>(Object.keys(r).every((a=>!(t.includes(a)&&r[a]&&this.positionMatches(r[a],e)&&(n.push({...r}),1)))),n)),[])}positionMatches(e,t){switch(this.matchPosition){case"start":return e.toLowerCase().startsWith(t.toLowerCase());case"contains":return e.toLowerCase().includes(t.toLowerCase());case"equals":return e.toLowerCase()===t.toLowerCase();default:return!1}}buildSelect(){const e=[],t=[];return this.columns.forEach((n=>{if(!t.includes(n.value)){t.push(n.value);const r={field:n.value};e.push(r)}})),e}buildFilters(e){let t={};const n={};this.columns.forEach(((t,r)=>{if(t.useForSearch){const a=`F${r}`,s={field:t.value},o={value:e};let i="CONTAINS";"start"===this.matchPosition?i="STARTS_WITH":"equals"===this.matchPosition&&(i="EQ");const c={...!0===Number.isNaN(parseFloat(e))&&{ignoreCase:"true"},lhs:s,rhs:o,comparator:i};n[a]=c}}));const r=Object.keys(n).join(" OR ");return t={filterConditions:n,logic:r},t}buildQuery(e){return e?{select:this.buildSelect(),filter:this.buildFilters(e),distinctResultsOnly:"true"}:{select:this.buildSelect(),distinctResultsOnly:"true"}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e){return{dataViewParameters:this.parameters,query:this.buildQuery(e),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const xg=Dg,{RESOURCE_TYPES:wg}=k,Mg=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,a=cs(n),s=`${a.includes("root")?V.APP.ROOT:V.APP.APP}/${Ya.MODAL}`;e.push(Xu(Bu,{containerItemID:n,context:a,target:s,skipReleaseLockRequest:r}))},Lg=e=>ou(".openCaseViewAfterCreate",V.CONTEXT_DATA,e)??!0,jg=e=>/^app\/preview_[0-9]*/g.test(e),Ug=(e,t)=>{const n=he(e);return!jg(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},Fg=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===V.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0),a.push(Xu(Fu,{...e,...r})),mu.setIn(e,"acName",r.target),await Oa(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,s=cs(a);if(fa(a)){const t=Ee(s),a={data:n,caseViewMode:r,context:t};mu.setIn(a.data,["context_data","caseViewMode"],r),e.push({type:bt,payload:{context:t}}),e.push(Xu(Pu,a))}})(a,t,e)},kg=async(e,t,n,r,a,s,o,i)=>{const{isCaseWideAction:c,isInCreateStage:d,containerItemID:l}=e,u=he(e.context),p=ua(a),h=la(a),g=d&&!p,f=us(u)[0],y=f?ss(f):u,m=ra(l),I=cs(l),E=Object.freeze({target:e.target,containerItemID:l,context:I,containerName:m});g&&!jg(e.context)?await(async(e,t,n,r,a)=>{((e,t,n)=>{if(t.isProcessAction&&(Mg(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?V.APP.ROOT:V.APP.APP}/${Ya.PRIMARY}`,a=Da(r,Ya.PRIMARY),s={insKey:e.ID,className:e.content.classID,context:a,acTargetName:V.PRIMARY,isChild:!0},o={type:xe,payload:{...s}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,a),n.resourceType=wg.CASE,n.directUrlUpdation=!0,t.isProcessAction||await(async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:a}=n,s=(o=t,mu.getIn(o,ta.NEXT_ASSIGNMENT_INFO_ID,V.EMPTY_STRING));var o;const i=la(t),{caseViewMode:c,headers:d,semanticURL:l,actionMgrID:u,directUrlUpdation:p,key:h,flowName:g,resourceType:f}=r;(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:a,assignmentId:s,caseType:i}),Mg(e,{...n,skipReleaseLockRequest:!0});const y=`${n?.containerItemID.includes("root")?V.APP.ROOT:V.APP.APP}/${Ya.PRIMARY}`,m=Da(y,Ya.PRIMARY),I=pd.getCoreHeadersFromContext(n.context)||!1,E=Pa(t,{target:y,context:m,containerItemID:m,caseViewMode:c,headers:d,semanticURL:l,key:h,flowName:g,resourceType:f,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[V.COREHEADER_APP_DEBUG_ID]}});if(gs(y)){const t=ru(m),a=pa({data:t}),[,s]=a?a.split(" "):[],o=`You will lose unsaved changes for ${s}. Do you want to continue?`;if(!Lg(n.context))return e;{const{continueExecution:t}=Ma(y,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,mn.rejectActionByID(u),zd();e.push(Xu(qu,E))}}else e.push(Xu(wu,E));return t.directUrlUpdation=p,t.semanticURL=l,await Oa(t,{...E,acName:y},{acName:y,context:m}),e})(a,{translatedDXAPIResponse:r,actionInPayload:t},n)})(i,e,t,a,s):Ug(e.context,y)?await(async(e,t,n,r,a,s,o,i,c)=>{const{headers:d}=c;if(e){const l=gs(Cs(e));let u=!1;const p=Cs(n),h=Xa(p),g=ss(p);h?.items?.[g]?.key===c?.actionInPayload?.caseID&&(u=!0),Mg(a,{...r,skipReleaseLockRequest:!0});const f=ra(e),y={target:Cs(e),containerItemID:e,context:e,containerName:f};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const m=Ee(n),I=ru(m),E=ru(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(l&&A===_||!l&&""===o)a.push(Xu(Fu,{...t,key:o,resourceType:"",...y}));else if(s){const s=Cs(e),i=ns(s,o);if(i)y.target=s,y.context=i,y.containerItemID=i,a.push(Xu(Fu,{...t,key:o,resourceType:"",...y}));else{const e=us(n)[0];r.target=e,r.context=Da(e,V.WORKAREA,n),r.containerItemID=r.context,a.push(Xu(wu,{...r,...t}));const s=r.containerItemID;a.push(Xu(Vu,{parentContainerTarget:e,containerItemID:s}))}}if(r.target=Cs(e),r.containerName=ra(e),r.context=e,r.containerItemID=e,mu.setIn(t,"acName",y.target),await Oa(i,t),u){const{data:e,caseViewMode:r}=t;n.includes(V.WORKAREA)&&fa(n)&&(n=Ee(n));const s={data:e,caseViewMode:r,context:n};mu.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:bt,payload:{context:n}}),a.push(Xu(Pu,s))}if(!s&&t.caseViewMode===V.PERFORM_MODE){const t=((e,t)=>{const n=Cs(e);return ns(n,t)})(e,o),n={data:{caseInfo:{headers:d}},context:t};a.push(Xu(Pu,n)),a.push(En(((e,t=!1,n=!1)=>{const r=mn.getNextActionMgrId();return{ID:Au.getProperyValue(k.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Au.getProperyValue(k.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{Mg(a,r);let e=!1;const o=Cs(n),i=Xa(o),d=ss(o);if(i?.items?.[d]?.key===c?.actionInPayload?.caseID&&(e=!0),s){const e=us(n)[0];r.target=e,r.context=Da(e,V.WORKAREA,n),r.containerItemID=r.context,a.push(Xu(wu,{...r,...t}));const s=r.containerItemID;a.push(Xu(Vu,{parentContainerTarget:e,containerItemID:s}))}if(e){const{data:e,caseViewMode:r}=t,s={data:e,caseViewMode:r,context:n};mu.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:bt,payload:{context:n}}),a.push(Xu(Pu,s))}}})(y,t,u,e,s,n,r,a,o):c&&!Ug(e.context,y)?(Mg(s,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,s=he(r),o=cs(s);e.push(Xu(Tu,{containerItemID:s,context:o,container:Ya.PREVIEW,containerName:Ya.PREVIEW,caseId:a,viewName:k.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(s,e,{caseClassName:h})):await Fg(t,e,a,E,s)},{RESOURCE_TYPES:Vg}=k,Gg=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:s,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:d}=gp(i,{ID:a,caseID:a,viewType:Sa.PAGE});return Q.getPreviewMode()&&(t[V.SKIPCOREHEADERS]=!0),ad(Ad(c,{method:d,headers:t},s,{includeRemoteSystemIdIfPresent:!!o})).pipe(Fd((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:$a(t.headers)})),Xd(": Error ocurred during ajax call at release lock request : ",s))},{RESOURCE_TYPES:Bg}=k,Hg=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let s=[];return Hd(n.payload).pipe(kd((e=>((e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:s,reqType:o}=gp("save",{assignmentID:n,actionID:r}),{content:i}=ba(a),c=t.value.data[a]?.caseInfo?.headers;return ad(Ad(s,{method:o,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(Fd((t=>({response:t.data,actionInPayload:e,headers:$a(t.headers)}))),Xd(": Error ocurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))})(e,r))),kd((e=>{if(e&&oa(e.type))return Hd(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?V.APP.ROOT:V.APP.APP}/${Ya.PRIMARY}`,n=Da(t,Ya.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:V.PRIMARY,isChild:!0},a={type:xe,payload:{...r}};s.push(a)}let t=!1;const{containerItemID:n}=e&&e.actionInPayload,r=he(n),a=Cs(r),o=Xa(a),i=ss(a);if(o?.items?.[i]?.key===e?.actionInPayload?.caseID&&(t=!0),t){const t={context:r,data:{...e.response.data}};s.push(Xu(Pu,t)),s.push(Xu(Fu,{context:n}));const a={context:n,data:{caseInfo:{headers:e.headers}}};s.push(Xu(Pu,a))}return e.actionInPayload.RemoteSystemID=G.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Gg(e.actionInPayload)})),kd((async e=>{if(e&&oa(e.type)){const{payload:t}=e,n=va({...e,...t,actionMgrID:a});return s.push(n),s}const{actionInPayload:n}=e,{context:r,containerName:o}=n,i={target:vt(o,r),containerItemID:r,context:r};return t||s.push(Xu(Bu,i)),s})),Fd((()=>(nu(s),Ia(s,a),t||(s=[]),s))))},{LOCAL_ACTION_TYPE:Wg}=V,{RESOURCE_TYPES:qg}=k,zg=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:s,openActionType:o}=e,{isProcessAction:i}=t,c=i?ft:(e=>{const t=e.localActionType.toLowerCase();return t===Wg.CASE_WIDE||t===Wg.EXPRESS?yt:gt})(e),d=Sa.FORM,{reqType:l}=gp(c,{caseID:a,ID:r,actionID:n,viewType:d});let{restApi:u}=gp(c,{caseID:a,ID:r,actionID:n,viewType:d});return e.actionType=c===yt?V.CASE:V.ASSIGNMENT,u.includes("viewType=")||(u=u.includes("?")?`${u}&viewType=${d}`:`${u}?viewType=${d}`),ad(Ad(u,{method:l,headers:{}},s)).pipe(Fd((t=>({response:t.data,actionInPayload:e,headers:$a(t.headers)}))),Xd(`: Error ocurred during ajax call at ${o} Epic : `,s))},Yg=(e,t)=>{const{isProcessAction:n}=t,r=n?ft:gt;let a;if(e.openActionType=r,"modal"===na(r,e)){a=us(e.contextName)[0]?us(e.contextName):Cs(e.contextName);const n=a?ss(a):e.contextName,r=cs(n);return us(e.contextName)[0]&&e.continueExecution&&Gr(r)?ad([xd(e.saveActionPayload)]).pipe(kd((e=>(e=>{let t,n=0;const r=[],a={value:tu().getState()};return Hd(e).pipe(jd(Dd),Ud((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!s){const e={type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return mn.rejectActionByID(n,!0,e),Hd([])}return Hg({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),kd((n=>{if(1===n.length&&oa(n[0].type)){const{continueExecution:n}=Ma(a);if(!n)return mn.rejectActionByID(e.actionMgrID),qd.pipe(sd((()=>zd()))).toPromise();if(n)return zg(e,t)}return zg(e,t)})),Fd((e=>e))):zg(e,t)}return zg(e,t)},Kg=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:s,openActionType:o,doDeleteCaseSummary:i}=r,c=cg(e),d=na(o,r),l=vt(d,a);let u,p,h=!1;!ys(l)||fs(l)&&!ts(l,e.data.caseInfo.ID)||sa(d)?(p=ge(d,a),sa(d)&&(p=Ie(a,p)),u=p,h=!0):(u=fs(l)?ns(l,e.data.caseInfo.ID):ss(l),p=cs(u));const g={acName:l,target:l,containerName:d,context:p};await Oa(c,r,g);const f=c.uiResources?.root;let y;y=f?V.PERFORM_MODE:V.REVIEW_MODE;const m=Pa(c,{target:l,context:p,containerItemID:u,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:s,isMinimizable:!1,isInCreateStage:sa(d),resourceType:qg.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});f&&ya(m,c),sa(d)&&delete m.doDeleteCaseSummary,r.openActionType===mt&&(m.isBulkAction=!0,m.data.caseInfo.actionButtons.main[0].jsAction="submitBulkAction",m.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",m.data.caseInfo.cases=r.selectedList);const I=h?wu:Fu;if(t.push(Xu(I,m)),h){const a=us(r.contextName),s=ns(a,e.data.caseInfo.ID);if(s){const e={data:{caseInfo:{headers:n}},context:s};t.push(Xu(Pu,e))}}return u!==ss(l)&&t.push(Xu(Vu,{target:l,containerItemID:u})),fa(u)&&ka(m,t),m.caseViewMode===V.REVIEW_MODE&&t.push(Xu(Bu,m)),t};var Xg=Array.isArray,Jg=Object.getPrototypeOf,Qg=Object.prototype,Zg=Object.keys;function ef(e){if(1===e.length){var t=e[0];if(Xg(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Jg(r)===Qg){var n=Zg(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var tf=Array.isArray;function nf(e){return Fd((function(t){return function(e,t){return tf(t)?e.apply(void 0,pc([],uc(t))):e(t)}(e,t)}))}var rf=new Up(wp),af=rf;function sf(e,t){return void 0===e&&(e=0),void 0===t&&(t=rf),e<0&&(e=0),function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=af);var r=-1;return null!=t&&(Vd(t)?n=t:r=t),new kc((function(t){var a,s=(a=e)instanceof Date&&!isNaN(a)?+e-n.now():e;s<0&&(s=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),s)}))}(e,e,t)}function of(e){return Qc((function(t,n){var r=!1,a=null,s=null,o=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe(Zc(n,(function(t){null==s||s.unsubscribe(),r=!0,a=t,s=Zc(n,o,Oc),Kc(e(t)).subscribe(s)}),(function(){o(),n.complete()}),void 0,(function(){a=s=null})))}))}const cf=e=>{const{context:t}=e;let n={...ba(t).content,contextData:!1};const r=Ba(t);mu.isEmpty(r)||(n=Ga(r,n));const{restApi:a,reqType:s}=gp("refreshCaseView",e);return n.interestPage=e.interestPage,ad(Ad(a,{method:s,body:n},t)).pipe(Fd((t=>({actionInPayload:e,response:t.data,headers:$a(t.headers)}))),Xd(": Error ocurred during ajax call : ",t))},df=[e=>{let t=0,n=[],r="",a=!1;return e.pipe(jd(Cu),Jd(100),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{context:n}=e,r=yg(e),s=vt(r,n),{continueExecution:o,removeActionPayload:i}=(e=>gs(e)?{continueExecution:!0,removeActionPayload:{}}:Ma(e))(s);return a=Ea(e.class),o?(e.isTraditionalUICase=a,((e,t)=>{const{class:n,context:r,viewType:a=Sa.PAGE}=e,{removeActionPayload:s}=t;let o=e?.pageName?e?.pageName:Z.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),ad(Pg.createCase(n,{...e,pageName:o,viewType:a,context:r})).pipe(Fd((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),Xd("Error ocurred during ajax call at createWork Epic : ",r))})(e,{removeActionPayload:i})):(mn.rejectActionByID(t),zd())})),kd((async e=>{if(e&&e.type===Ge)return e.payload.context=Ls(),n.push(va(e)),n;const{actionInPayload:s,response:o,headers:i,removeActionPayload:c}=e;let d;d=!(s.renderInline||Z.getDefaultCasePage()||a)&&mg(o),mu.setIn(o.data,"caseInfo.isFirstAssignment",!0);const l=yg({...s,isInCreateStage:d}),u=vt(l,s.context),p=Da(u,l,s.context);if(!sa(l)&&gs(u)){const{continueExecution:e}=Ma(u);if(!e)return mn.rejectActionByID(t),zd()}if(!(s?.openCaseViewAfterCreate??1)&&!d){const e=mu.getIn(o.data,"caseInfo.content");r=`${e.pyID} ${ae.getLocaleValue("has been created.","Assignment")}`;const t=ha(o),a=la(o);return(e=>{Zr.publish(V.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)})({toastMessage:r}),(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:`${e.pyID}`,assignmentId:t,caseType:a}),n}const h=cg(o);let g=pp("createWork",{caseClassName:la(h)});g=g.replace(/{.+?}/,da(pa(h))),h.semanticURL=g,((e,t)=>{const n=mg(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t;mu.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,s);const f={acName:u,context:p};await Oa(h,s,f);const y={target:u,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:d,isMinimizable:d,caseViewMode:h.confirmationNote?V.REVIEW_MODE:V.PERFORM_MODE,assignmentContext:mu.getIn(h,"nextAssignmentInfo.context"),nextAssignmentInfo:mu.getIn(h,"nextAssignmentInfo"),resourceType:k.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo};ya(y,h);const m=Pa(h,y);a&&(m.data.caseInfo.content.coexistenceAction="openAssignment");const I=Ra(u,m);return xa(I)&&ga(n,{removeActionPayload:c,target:u}),n.push(I),Ua(n),n})),Fd((()=>{const e=Aa(),s=dn(mu.getIn(n[0]?.payload,"data.caseInfo"));return a&&e&&s?fg.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Va,n):Va(n),Ia(n,t),r="",n=[],n})))},e=>{let t=0,n=[];const r=[];let a=!1,s=!1;return e.pipe(jd(vd),Fd((e=>(({actionMgrID:t}=e.payload),{...e.payload,insKey:e.payload.assignmentID}))),kd((e=>{a=e.isGetNextWork;const{context:n}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Sa.FORM:Tg(e),e.viewType=r;const o=na(ut,e),i=vt(o,n),{activate:c,activateContainerActionPayload:d}=ja(vg.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Hd({type:Ze,activateContainerActionPayload:d,actionInPayload:e});const{continueExecution:l,removeActionPayload:u}=d?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:Ma(i);return l?(s=Ea(e.className),e.isTraditionalUICase=s,((e,t)=>{const n=Tg(e),{headers:r,context:a,assignmentID:s,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:d,caseID:l,jsActionQueryParams:u,isLastStepInCreateStage:p}=e,{restApi:h,reqType:g}=o?gp("getNextWork",{viewType:n}):c?gp("openStage",{caseID:l,stageID:d}):gp(ut,{assignmentID:s,viewType:n}),{removeActionPayload:f}=t,y=Z.getDefaultCasePage();let m,I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),m=y?`${h}?viewType=${n}&pageName=${y}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{m+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=$a(t,e.remoteClassName)),t})(e);return ad(Ng(m,g,E,i,a,o,"404")).pipe(Fd((e=>Z.isCoexistenceAppOfType(V.APP_TYPE.UIKIT)&&!p?dn(e.data.data.caseInfo)?e:(m=m.replaceAll(I,"pyDetails"),Z.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:m}):e)),kd((e=>e?.isReloadWithDifferentViewTypeRequired?Ng(m,g,E,i,a,o,"404"):Hd(e))),Fd((t=>{const{key:a,flowName:o}=Na(s);return{response:{...t.data,key:a,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:$a({...r,...t.headers})}})),Xd("Error ocurred during ajax call at openAssignment Epic : ",a))})(e,{removeActionPayload:u})):(mn.rejectActionByID(t),zd())})),kd((async e=>{if(e?.type===Ge){if(a){const{payload:t}=e,{err:n}=t,a=n.response.status;r.push({status:Number(a)})}return n.push(va(e)),n}const{type:t,actionInPayload:o,response:i,viewType:c,headers:d,removeActionPayload:l,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=vd,r=i?.data?.caseInfo?.ID;o.isOpenStage=!0,o.stageID=e,o.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...o,caseID:r,headers:d}};return n.push(a),n}const{context:p,caseViewMode:h,debugInfo:g}=o;let f=((e,t)=>{const n=ca(e);let r;r=!Z.getDefaultCasePage()&&dn(n);const{isChild:a,containerName:s}=t,o=a&&r,i=r&&!t.isActionFromToDoList;return o||i?V.MODAL:s||na(ut,t)})(i,o);s=Ea(i?.data?.caseInfo?.caseTypeID),o.isTraditionalUICase=s,s&&(f=o.containerName);const y=vt(f,p);if(t===Ze)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:s,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:d=!1}=c,l=cs(a);await Oa({directUrlUpdation:!d,semanticURL:r},c,{acName:i,target:i,context:l}),e.push(Xu(Vu,{containerItemID:a,target:i,isParallelAssignment:s,insKey:o,resourceType:Og.CASE,context:l,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(n,u,{actionInPayload:o,target:y}),Ua(n),n;const m=cg(i);((e,t)=>{const n=ca(e),r=pa(e),a=dn(n),{skipBrowserSemanticUrlUpdate:s=!1,viewType:o,isTraditionalUICase:i}=t,c=o===Sa.PAGE&&(!a||i)&&!s,{caseTypeID:d}=n;if(c){const t=pp(lt,{caseClassName:d}).replace(/{.+?}/,da(r));e.semanticURL=t,e.directUrlUpdation=!0}})(m,o);const I=Da(y,f,p),E={acName:y,target:y,context:I};await Oa(m,o,E);const A={target:y,context:I,containerItemID:I,headers:d,isMinimizable:dn(mu.getIn(m,"data.caseInfo")),doDeleteCaseSummary:o.doDeleteCaseSummary,acTertiary:o.acTertiary,resourceType:k.CASE,debugInfo:g};ya(A,m,{skipFlowNameUpdate:o?.caseViewMode===V.REVIEW_MODE});const _=Pa(m,A);return o.isProcessAction&&(_.data.isProcessAction=o.isProcessAction),s&&(_.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(o,_),((e,t,n,r,a,s,o)=>{gs(t)&&ys(t)?((e,t,n,r,a)=>{Tg(e,t)===Sa.FORM?(n.caseViewMode=r||V.PERFORM_MODE,a.push(Xu(Fu,n))):a.push(Xu(qu,n))})(r,a,e,s,n):((e,t,n,r,a)=>{if(ga(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=ss(t);let r=null;return n&&(r=Ja(t,n)),r?.key===e&&fs(t)})(r.key,n))r.context=ds(n),r.containerItemID=r.context,e.push(Xu(qu,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=Cs(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(Xu(qu,r))}else{const t=Cs(r.context),n=ns(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(Xu(qu,r))):e.push(Xu(wu,r))}})(n,o,t,e,r)})(_,y,n,o,i,h,l),c===Sa.FORM&&fa(_.containerItemID)&&ka(_,n),Ua(n),(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:o.assignmentID,caseKey:_.key}),n})),Fd((()=>{const e=t,a=Aa(),o=dn(mu.getIn(n[0]?.payload,"data.caseInfo"));return s&&a&&o?fg.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,nu,n):nu(n),Ia(n,e,r),n[0]?.payload?.isParallelAssignment&&nu({type:vd,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n})))},e=>{let t=0,n=[];return e.pipe(jd("OPEN_WORK_BY_HANDLE"),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{context:n,isChild:r,viewType:a}=e,s=na(lt,e),o=vt(s,n);let i,c=!0;if("none"!==a){const e=Ma(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return mn.rejectActionByID(t),zd();const{activate:d,activateContainerActionPayload:l}=ja(Rg.CASE,o,e);return d&&!r&&"none"!==a?Hd({type:Ze,activateContainerActionPayload:l,actionInPayload:e}):((e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:s,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Z.getDefaultCasePage(),d=gp(lt,{caseID:n,params:{pageName:c}});let{restApi:l}=d;const{reqType:u}=d;return"none"===o&&(l=`${l.split("viewType")[0]}viewType=none`),ad(Ad(l,{method:u,headers:{...r,...s&&{...pd.addDebugHeaders(s)}}},a)).pipe(Fd((t=>({response:t.data,actionInPayload:e,headers:$a({...r,...t.headers}),removeActionPayload:i}))),Xd("Error ocurred during ajax call at openWorkByHandle Epic : ",a))})(e,{removeActionPayload:i})})),kd((async e=>{if(e&&oa(e.type))return n.push(va(e)),n;const t=ru(e?.actionInPayload?.context),r=Ea(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t={data:{...cg(e?.response)?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:bt,payload:{context:t.context,doDeleteConfirmationDetails:!1}}),r&&(t.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(Xu(Pu,t));const a=Cs(e?.actionInPayload?.context),s=ra(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(fa(e?.actionInPayload?.context)){const t=Pa(e?.response,{...o});ka({...t,isArrayDeepMerge:!0},n)}}}else await(async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:s,response:o,removeActionPayload:i,headers:c}=e,{context:d,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=na(lt,r),h=vt(p,d);if(s===Ze)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:s,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=na(lt,a),d=vt(c,s),l=cs(r);await Oa({directUrlUpdation:!o,semanticURL:n},a,{acName:d,containerName:c,target:d,context:l}),e.push(Xu(Vu,{containerItemID:r,target:d,context:l,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const e=Da(h,p,d,{buildNew:!0}),a=cg(o),s=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=pa(e),s=n?r:la(e);let o=pp(lt,{caseClassName:s});return o=o&&o.replace("{workID}",da(a)),o})(a,r);a.semanticURL=s,a.directUrlUpdation=!l;const g={acName:h,context:e};await Oa(a,r,g);const f=Pa(a,{target:h,context:e,containerItemID:e,semanticURL:s,headers:c,debugInfo:u});f.caseViewMode=V.REVIEW_MODE,f.resourceType=Rg.CASE,n&&(f.data.caseInfo.content.coexistenceAction="openWorkByHandle"),ya(f,a,{skipFlowNameUpdate:!0});const y=Ra(h,f);i.containerItemID&&xa(y)&&t.push(Xu(Bu,{containerItemID:i.containerItemID,target:h})),t.push(y)}Ua(t),(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:d})})(e,n,r);return n})),Fd((()=>(nu(n),Ia(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(jd("OPEN_LOCAL_ACTION"),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>((e,t)=>Yg(e,t))(e,{actionMgrID:t}))),kd((async e=>{if(!e)return qd;if(oa(e.type)){const t=va(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return mu.setIn(a,"data.caseInfo.activeActionID",s),mu.setIn(a.data,V.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&mu.setIn(a.data,V.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await Kg(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),Zr.unsubscribe(V.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,"expressLocalActionSubmit")},Zr.subscribe(V.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,"expressLocalActionSubmit"))})(t),n})),Fd((()=>(nu(n),Ia(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(jd("OPEN_BULK_ACTION"),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=mt;const a=na(mt,e),s=vt(a,n),{continueExecution:o}=Ma(s);return o?(e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:s="",bulkContextType:o=""}=e,{reqType:i,restApi:c}=gp("openBulkAction",{caseTypeID:a,actionID:t,bulkContextID:s,bulkContextType:o});return ad(Ad(c,{method:i},n)).pipe(Fd((t=>({response:t.data,actionInPayload:e,headers:$a(t.headers)}))),Xd(`: Error ocurred during ajax call at ${r} Epic : `,n))})(e):(mn.rejectActionByID(r),zd())})(e,{actionMgrID:t}))),kd((async e=>{if(e&&oa(e.type)){const t=va(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return mu.setIn(a,"data.caseInfo.activeActionID",s),await Kg(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),Zr.unsubscribe(V.PUB_SUB_EVENTS.EVENT_BULKACTION,"bulkActionSubmit")},Zr.subscribe(V.PUB_SUB_EVENTS.EVENT_BULKACTION,n,"bulkActionSubmit"))})(t),n})),Fd((()=>(1===n.length&&oa(n[0].type)?mn.rejectActionByID(t):mn.resolveActionByID(t),nu(n),n=[],n))))},e=>{let t,n=0,r=[],a="";return e.pipe(jd("SUBMIT_BULK_ACTION"),Ud((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const e={type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return mn.rejectActionByID(n,!0,e),Hd([])}return Hd(e.payload).pipe(kd((e=>(t=e,(e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:s}=ba(n,{nonEmptyAndChangedData:!0});let o=5;try{al.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults")?.find((e=>e.pyClassName===a))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,{reqType:d,restApi:l}=gp("performBulkAction",{actionID:t}),u=[],p=i.length;for(let t=0;t<p;t+=c)s.cases=i.slice(t,t+c),s.cases.length&&u.push(ad(Ad(l,{method:d,body:s},n)).pipe(Fd((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:$a({...r})}})),Xd("Error ocurred during ajax call at submitbulkaction Epic : ",n)));return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return yc(Gd(e))?e.pop():void 0}(e),r=ef(e),a=r.args,s=r.keys,o=new kc((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Kc(a[t]).subscribe(Zc(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(s?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(s,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(nf(n)):o}(u)})(t)))),kd((e=>{let n=0,s=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),s+=Number(t.failureCount),s&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),a=`${n} record(s) updated`,(e=>{Zr.publish(V.PUB_SUB_EVENTS.EVENT_BULKACTION,e)})({submitResponse:e}),t.target=`${V.APP.APP}/${Ya.MODAL}`,r.push(Xu(Bu,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),s&&r.push(Xu(Gu,{messages:[{type:"error",message:`${s} records failed to update`,errorDetails:o,showHeader:!1}],context:he(c)||c,category:"HTTP",showHeader:!1})),r})),Fd((()=>(mn.resolveActionByID(n,a),nu(r),r=[],r))))})))},e=>{let t=0,n=[];return e.pipe(jd(Nd),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>(Vn(e.context),((e,t)=>Yg(e,t))(e,{actionMgrID:t,isProcessAction:!0})))),kd((async e=>{if(e&&oa(e.type)){const t=va(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await Kg(a,n,{headers:r,actionInPayload:t}),n})),Fd((()=>(Va(n),Ia(n,t),n=[],n))))},(e,t)=>{let n=0,r=[],a="",s="";return e.pipe(jd("FINISH_ASSIGNMENT"),Ud((e=>{const o=Z.isCoexistenceAppOfType(V.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),s=e.payload.context,jn({context:s,stateObj:ru(s),clearContextMessages:!0}),!Nr(s)){const t={type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return mn.rejectActionByID(n,!0,t),Zd.handleDeferredActionCompletion(e.payload.context),Hd([])}return Hd(e.payload).pipe(kd((e=>(((e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:s,isModalAction:o}=t;if(s&&o){const t=ra(n),s=vt(t,r);e.push(Xu(Vu,{containerItemID:n,target:s,actionMgrID:a}))}})(r,e),((e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:s,additionalHeaders:o={},isCaseWideAction:i,outcome:c}=e,{state$:d}=t,l=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r}=e;return t&&r?Sa.PAGE:n||Sa.FORM})(e),u=(e=>{const{isCaseWideAction:t}=e;return t?yt:"finishAssignment"})(e),p={assignmentID:n,actionID:r,caseID:a,viewType:l};let{restApi:h}=gp(u,p),{reqType:g}=gp(u,p);l&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${l}`:`${h}?viewType=${l}`),c&&!h.includes("outcome")&&(h=h.includes("?")?`${h}&outcome=${c}`:`${h}?outcome=${c}`),i&&(g="PATCH"),e.viewType=l;const{content:f,attachmentsExist:y}=ba(s);e.attachmentsExist=y;const m=d.value.data[s]?.caseInfo?.headers||{},{etag:I}=m,E={"if-match":I,...o};return ad(Ad(h,{method:g,body:f,headers:E},s)).pipe(Fd((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:$a({...E,...r})}})),Xd("Error ocurred during ajax call at finishAssignment Epic : ",s))})({...e},{state$:t})))),kd((async e=>{if(e&&e.type===Ge){const t=va(e);return r.push(t),r}xg.clearContextedCache(s);const{headers:t,actionInPayload:i,response:c}=e,{containerItemID:d,context:l=cs(d),isModalAction:u,isInCreateStage:p}=i,h=Cs(d);i.target=h;const g=ra(d),f=Object.freeze({target:i.target,containerItemID:d,context:l,containerName:g});mu.setIn(c.data,"caseInfo.isFirstAssignment",!1),mu.setIn(c.data,V.CASE_INFO_IS_LOCAL_ACTION,!1),c?.uiResources?.root?.config?.name&&"page"!==i.viewType&&mu.setIn(c.data,"caseInfo.content.pyViewName",c?.uiResources?.root?.config?.name),(e=>{Zr.publish(V.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:c});let y=cg(c,{[k.STOPMERGEACTIONS]:!c.nextAssignmentInfo});const m=la(y),I=he(i.context),E=us(I)[0]?ss(us(I)[0]):I,A=ua(y),_=p&&!A;!u||p||Ug(i.context,E)||(y=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(y,ru(d)));const S=Pa(y,{headers:t,actionMgrID:n,directUrlUpdation:!1});let C,$;ma(S.data,i),S.caseClassName=m,S.resourceType=Vg.ASSIGNMENT,S.headers=t;const b=y?.data?.caseInfo?.assignments?.some((e=>e.ID===i.assignmentID)),P=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(y,i),O=((e,t,n,r,a)=>{let s;const o=Cs(t);return s=fs(o)?ns(o,n.data.caseInfo.ID):ss(o),r&&e&&iu(null,V.CASE_VIEW_MODE_PROP,s)===V.PERFORM_MODE&&a})(b,E,y,u,P),T=i?.actionID===k.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;y?.data?.nextAssignmentInfo&&!T?(S.caseViewMode=V.PERFORM_MODE,C=pa(y),$=!0):O&&!T?(S.caseViewMode=V.PERFORM_MODE,C=pa(y),S.flowName=" ",S.deleteAssignmentSpecificResources=!1,$=!1):(S.caseViewMode=V.REVIEW_MODE,C="",$=!1);const N=pa(y);ya(S,y,{skipFlowNameUpdate:S?.caseViewMode===V.REVIEW_MODE||O});const v=pp("createWork",{caseClassName:m}).replace(/{.+?}/,da(N));var R;if(y.semanticURL=v,S.semanticURL=v,u?(await kg(i,S,$,C,y,r,e,c),_&&(a=Lg((R=i).context)?"":R.businessID?`${R.businessID} ${ae.getLocaleValue("has been created.","Assignment")}`:`${R.workID} ${ae.getLocaleValue("has been created.","Assignment")}`)):p&&o&&!A?(Z.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Ya.PRIMARY,targetContainerName:Ya.PRIMARY,viewType:Sa.PAGE,isLastStepInCreateStage:!0,context:n},a={type:je,payload:{...r}};t.push(a)})(c,r,he(l))):await Fg(S,i,y,f,r),Zd.handleDeferredActionCompletion(s),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:s}=t,o=Ug(t.context,n);ea({caseID:s,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:e?.data?.caseInfo?.stages||[]})})(S,i,E),!y?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:pa(e),assignmentID:n?null:r,actionID:n?a:null}})(y,i);(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:d})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===nt));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=Hu({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)})(r,{transientItemID:d,target:h,isModalAction:u}),r})),Fd((()=>{const e=r.find((e=>e.type===Ge));return e?(Zd.handleDeferredActionCompletion(s),(e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[V.ERROR_FIELD_IN_PAGE]=e[V.ERROR_FIELD_IN_PAGE].replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[V.ERROR_FIELD_IN_PAGE].slice(1),r=e[V.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(r){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=a.replace(/\(/g,"[").replace(/\)/g,"]");const s=xn(r,a,V.PROPERTY),o={type:k.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};Rn.mutateField(n,a,s[s.length-1],{messages:[o],type:k.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:s[s.length-1]})}}))})(e),mn.rejectActionByID(n)):mn.resolveActionByID(n,a),Va(r),r=[],a="",r})))})))},(e,t)=>{let n=0,r=[];return e.pipe(jd("NAVIGATE_TO_STEP"),Ud((e=>(({actionMgrID:n}=e.payload),Hd(e.payload).pipe(kd((e=>(Vn(e.context),((e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:s=cs(a),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Sa.PAGE:Sa.FORM},{restApi:d,reqType:l}=gp("navigateToStep",c),{content:u}=ba(s),p=i.value.data[s].caseInfo.headers;return ad(Ad(`${d}`,{method:l,body:u,headers:{"if-match":p&&p.etag}},s)).pipe(Fd((t=>({response:t.data,actionInPayload:e,headers:$a({...p,...t.headers})}))),Xd("Error ocurred during ajax call at navigateToStep Epic : ",s))})(e,{state$:t})))),kd((async e=>{if(e&&oa(e.type))return r.push(va(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:s,context:o=cs(s),isModalAction:i}=t;xg.clearContextedCache(t.context);const c=Cs(s),d=ra(s),l=Object.freeze({target:c,containerItemID:s,context:o,containerName:d}),u=cg(n),p={acName:c,...l};await Oa(u,t,p);const h=Pa(u,{...l,headers:a});h.doDeleteCaseSummary=t.doDeleteCaseSummary,h.resourceType=Bg.ASSIGNMENT,ya(h,u),ma(h.data,t);const g=u.data.caseInfo.stages;return ea({caseID:pa(u),isModalAction:i,stages:g}),fa(s)&&ka(h,r),r.push(Xu(Fu,h)),Ua(r),r})),Fd((()=>(nu(r),Ia(r,n),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(jd("CANCEL_ASSIGNMENT"),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{isModalAction:n}=e;e.context||(e.context=cs(e.containerItemID));const{context:r}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Ya.MODAL:ra(n)})(e),s=vt(a,r),{continueExecution:o}=Ma(s);return o?(e.RemoteSystemID=G.getRemoteHeaderByContext(e.context)??void 0,((e,t)=>{const{isModalAction:n}=t;return Gg({routeKey:"cancelAssignment",isModalAction:n,...e})})(e,{isModalAction:n})):(mn.rejectActionByID(t),zd())})),kd((async e=>{if(e&&e.type===Ge)return n.push(va(e)),n;const{actionInPayload:r,response:a}=e,{containerItemID:s,isModalAction:o,isInCreateStage:i}=r,c=Cs(s),d=cs(s),l={target:o?`${V.APP.APP}/${V.MODAL}`:c,containerItemID:s,caseViewMode:o?V.PERFORM_MODE:V.REVIEW_MODE,context:d,actionMgrID:t,key:pa(a)};return i&&n.push(Xu(Fu,l)),!o&&fa(s)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:a}=t,s=he(n),o={context:cs(s),data:{referencedUsers:a,context_data:{caseViewMode:r}}};o.data={...t?.response?.data,...o.data},e.push(Xu(Pu,o))})(n,{childContainerItemID:s,caseViewMode:V.REVIEW_MODE,referencedUsers:a?.data.referencedUsers,response:a}),l.skipReleaseLockRequest=!0,n.push(Xu(Bu,l)),n})),Fd((()=>(nu(n),Ia(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(jd(qe,nt),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:s}=e;return t!==r||!n||a||s?Hd([]):Gg(e)})),kd((e=>(e&&oa(e.type)&&n.push(va(e)),n))),Fd((()=>(nu(n),Ia(n,t),n=[],n))))},(e,t)=>{let n,r=0;return e.pipe(jd(Dd),Ud((e=>{const{saveOnly:a}=e.payload;return({actionMgrID:r,caseType:n}=e.payload),Hg({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},(e,t)=>{let n,r=0,a=[];return e.pipe(jd(Rd),Fd((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),kd((e=>e.ignoreCaseDeletion?Hd({actionInPayload:e}):(e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=gp("deleteCaseInCreateStage",{ID:t});return ad(Ad(r,{method:a},n)).pipe(Fd((t=>({response:t.data,actionInPayload:e,headers:$a(t.headers)}))),Xd(": Error ocurred during ajax call at deleteCaseInCreateStage Epic : ",n))})(e))),kd((async e=>{if(e&&oa(e.type)){const{payload:t}=e,n=va({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:s,isModalAction:o}=n,i=o?Ya.MODAL:Ya.PRIMARY,c=vt(i,s);if(!o){const e={acName:c,target:c,context:s},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 Oa({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:V.PRIMARY,isChild:!0},t={type:xe,payload:{...e}};a.push(t)}const d={target:c,containerItemID:s,context:s,caseDeleted:!0};return a.push(Xu(Bu,d)),a})),Fd((()=>(nu(a),Ia(a,r)===V.PROMISE_VALUE.RESOLVE&&(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)})({caseType:n}),a=[],a))))},e=>e.pipe(jd(ht),of((()=>sf(100))),Fd((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:s,skipReleaseLockRequest:o}=e.payload;return mn.resolveActionByID(t),Zr.publish(V.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:s,skipReleaseLockRequest:o}),[]}))),e=>e.pipe(jd(rt),of((()=>sf(100))),Fd((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,s=vt(r,n);return mn.resolveActionByID(t),nu(Xu(Vu,{containerItemID:a,target:s,doDeleteCaseSummary:!1})),[]}))),e=>{let t=0,n=[],r="";return e.pipe(jd(Ot),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>cf(e))),kd((async e=>{if(e&&e.type===Ge)return n.push(va(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a}=e,s=t.containerName,o=vt(s,t.context);let i=Da(o,s,t.context);i=Ie(t.context,i);const c=cg(a);c.key=t.ID,c.data.caseInfo.ID=t.ID;const d={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=d;const l=ru(t.context)?.context_data?.caseInfo,u=wn(l,t.targetProperty.slice(1),t.index);c.uiResources.context_data.caseInfo=u;const p={acName:o,context:i};await Oa(c,t,p);const h=Pa(c,{target:o,context:i,containerItemID:i});h.resourceStatus=t.actionType,h.isMultiRecordData=!0,h.parentContext=t.context;const g=Ra(o,h);return r=i,n.push(g),Ua(n),{actionsOut:n,actionInPayload:t}})),Fd((({actionInPayload:e})=>(ia(n)?mn.rejectActionByID(t):mn.resolveActionByID(t),nu(n),n=[],e.skipPageInstructions||((e,t,n,r,a)=>{a===V.RESOURCE_STATUS.CREATE&&(gr.isStateMachineExist(e,t,n)||gr.setStateMachine(e,n,t,new Wn(n,t,e)),gr.getStateMachine(e,t,n).insert({},r+1,!0,{isDefault:!0}))})(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},e=>{let t,n="",r=[];return e.pipe(jd(Tt),Ud((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return mn.rejectActionByID(n,!0,e),Hd([])}return Hd(e.payload).pipe(kd((e=>(t=e,cf(t)))),kd((async e=>{if(e&&e.type===Ge){const t=va(e);return r.push(t),r}const{containerItemID:n,context:a}=t;var s,o,i,c;return s=a,o=t.parentContext,i=k.CASE_INFO.CASE_INFO_CONTENT,c=!1,Zn(s).forEach((e=>{const t=mu.convertClipboardPageToPageRefNotation(e.target);gr.isStateMachineExist(o,i,t)||gr.setStateMachine(o,t,i,new Wn(t,i,o));const n=gr.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c,{});break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":e.listIndex?n.delete(e.listIndex,c):n.deletePage();break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":n.deleteAll()}})),r.push(Xu(Bu,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),Fd((()=>{if(ia(r))mn.rejectActionByID(n);else{mn.resolveActionByID(n);const{pageReference:r}=e.payload;if(Au.getProperyValue(V.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Au.getProperyValue(k.CASE_INFO.CASE_INFO_ID,r,t.parentContext),n=Au.getProperyValue(V.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),s=a.replace(V.CASE_INFO.CASE_INFO_CONTENT,"");_n(e,n,t.parentContext,s,{})}else $n(t.parentContext,"caseInfo.content",{})}return nu(r),r=[],r})))})))}],lf=df;function uf(){return Qc((function(e,t){e.subscribe(Zc(t,Oc))}))}const{RESOURCE_TYPES:pf}=k,hf=[e=>e.pipe(jd($e),Fd((e=>e.payload)),kd((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID},n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(G.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=G.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=gp("loadView",t);return e.viewContext===pf.PAGE&&({restApi:r,reqType:a}=gp(ot,{page:e.viewName,pageClass:e.pageClass})),ad(Ad(r,{method:a,headers:n},e.context)).pipe(Fd((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:$a(t.headers),rootView:mu.getIn(r,V.ROOT)}})),Xd(": Error ocurred during ajax call at loadView Epic : ",e.context))})),kd((async e=>{const t={};if(e?.type===Ge)return t.actionsOut=va(e),t;try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e,{containerItemID:s,container:o,updateData:i}=n,c=o||Jr.getTargetViewContainerName(ot),d=vt(c,n.context),l=o===Ya.PREVIEW&&i?n.context:Da(d,c,n.context,{buildNew:!!o});n.context=l;const u={acName:d,context:l};let p={};p=o===Ya.PREVIEW?cg(r):cg(r,{[k.STOPMERGEACTIONS]:!0,[k.ACTIONS.DELETEAVIALACTIONS]:!0}),p.directUrlUpdation=!1,await Oa(p,n,u);const h={...n,target:d,context:l,containerItemID:s||l,headers:a},g=Pa(p,h);if(g.resourceType=pf.CASE,o&&!i){g.caseViewMode=V.REVIEW_MODE,g.caseViewMode=V.REVIEW_MODE;const e=Cs(g?.context);((e,t,n,r,a)=>{e?(r.actionsOut=[],r.actionsOut.push(Xu(Vu,{target:t,containerItemID:e}))):r.actionsOut=Xu(wu,{...n,container:a})})(ns(e,g.key),e,g,t,o)}else g.preserveClientChanges=!0,t.actionsOut=[],t.actionsOut.push({type:bt,payload:{context:l}}),t.actionsOut.push(Xu(Pu,g))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{Zr.publish(V.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),Fd((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(mn.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(jd(be),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{debugInfo:n,context:r,viewName:a,className:s,skipSemanticUrl:o=!1,containerName:i=Jr.getTargetViewContainerName(ot)}=e,c=n&&{...pd.addDebugHeaders(n)},d=vt(i,r);let l="",u={},p=!0;if(!o){if(l=pp(ot,{page:a}),d&&l){const{activate:t,activateContainerActionPayload:n}=ja(pf.PAGE,d,{semanticURL:l});if(t)return Hd({type:Ze,activateContainerActionPayload:n,actionConfig:e})}if(ss(d)&&({continueExecution:p,removeActionPayload:u}=Ma(d)),!p)return mn.rejectActionByID(t),zd()}const{restApi:h,reqType:g}=gp(ot,{page:a,pageClass:s});return ad(Ad(h,{method:g,headers:c},r)).pipe(Fd((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:l,semanticURL:l},actionConfig:e,headers:$a(t.headers),removeActionPayload:u,skipSemanticUrl:o}})),Xd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),kd((async e=>{if(e&&e.type===Ge)return n.push(va(e)),n;const{type:t,actionConfig:r,skipSemanticUrl:a}=e,s=r.containerName||Jr.getTargetViewContainerName(be),o=vt(s,r.context);if(Zr.publish(k.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t===Ze){const{activateContainerActionPayload:{semanticURL:t,containerItemID:a}}=e,s={acName:o,context:cs(a)};await Oa({directUrlUpdation:!0,semanticURL:t},r,s,!0),n.push(Xu(Vu,{target:o,containerItemID:a}))}else{const t=Da(o,s,r.context),{response:i,headers:c={},removeActionPayload:d}=e,l=cg(i,{isCreateDataObject:r.isCreateDataObject});l.directUrlUpdation=!a;const u={acName:o,context:t};await Oa(l,r,u);const p={target:o,context:t,containerItemID:t,headers:c,debugInfo:r.debugInfo},h=Pa(l,p);h.resourceType=k.PAGE,r.isCreateDataObject&&(h.resourceType=k.RESOURCE_TYPES.DATA,h.resourceStatus=k.RESOURCE_STATUS.CREATE,delete h.data.caseInfo);const g=Ra(o,h);d.containerItemID&&xa(g)&&n.push(Xu(Bu,{containerItemID:d.containerItemID,target:o})),n.push(g),Ua(n)}return Zr.publish(k.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),Fd((()=>{mn.resolveActionByID(t),nu(n),n=[]})),uf())}],gf=hf,{RESOURCE_TYPES:ff}=k,yf=[e=>{let t,n=0,r=[];return e.pipe(jd(Pe),Ud((e=>(({actionMgrID:n}=e.payload),Hd(e.payload).pipe(kd((e=>((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,skipSemanticUrl:o=!1,isDeferLoaded:i=!1}=e;let{containerName:c}=e;c||(c=Jr.getTargetViewContainerName(be));const d=vt(c,n);let l="",u={},p=!1;if(!o){l=pp(it,{pageName:r,dataViewName:a},s);const{activate:n,activateContainerActionPayload:o}=ja(ff.PAGE,d,{semanticURL:l});if(n)return Hd({type:Ze,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:p,removeActionPayload:u}=Ma(d)),!p)return mn.rejectActionByID(t),zd()}return((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:d,reqType:l,body:u}=gp(it,{pageName:r,dataContext:a,dataContextParameters:s});return ad(Ad(d,{method:l,body:u},n)).pipe(Fd((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:$a(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),Xd("Error ocurred during ajax call at showData Epic : ",e.context))})({context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:l,skipSemanticUrl:o,containerName:c,isDeferLoaded:i},{removeActionPayload:u})})(e,n))),kd((async e=>{if(e&&e.type===Ge)return r.push(va(e)),r;const{type:n,actionConfig:a,headers:s,response:o,skipSemanticUrl:i}=e;t=mu.getIn(o,V.ROOT);const{containerName:c}=a,d=vt(c,a.context);let l;if(a.isDeferLoaded){l=cg(o),l.directUrlUpdation=!i;const t={acName:d,context:a.context};await Oa(l,a,t);const n={target:d,headers:s,context:a.context,containerItemID:e.containerItemID},c=Pa(l,n);return r=Xu(Pu,c),r}if(n===Ze){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,s={acName:d,context:cs(n)};await Oa({directUrlUpdation:!0,semanticURL:t},a,s,!0),r.push(Xu(Vu,{target:d,containerItemID:n,resourceType:ff.DATA}))}else{const t=Da(d,c,a.context),{removeActionPayload:n}=e;l=cg(o),l.directUrlUpdation=!i;const u={acName:d,context:t};await Oa(l,a,u);const p=Pa(l,{target:d,context:t,containerItemID:t,headers:s});p.resourceType=ff.DATA;const h=Ra(d,p);n.containerItemID&&xa(h)&&r.push(Xu(Bu,{containerItemID:n.containerItemID,target:d})),r.push(h),Ua(r)}return r})),Fd((()=>(mn.resolveActionByID(n,t),nu(r),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(jd("CREATE_DATA_OBJECT"),Jd(100),Ud((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return mn.rejectActionByID(t,!0,e),Hd([])}return Hd(e.payload).pipe(kd((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,s={data_view_ID:t},{restApi:o,reqType:i}=gp("createDataObject",s),c=ba(a);return ad(Ad(o,{method:i,headers:r,body:{data:c.content}},a)).pipe(Fd((t=>({response:t.data,actionInPayload:e}))),Xd("Error ocurred during ajax call at createDataObject Epic",n))})(e))),kd((async e=>{if(e&&e.type===Ge){const{payload:r}=e,a=va({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?Ya.MODAL:Ya.PRIMARY,i={target:vt(o,a),containerItemID:a,context:a};return n.push(Xu(Bu,i)),n})),Fd((()=>(1===n.length&&oa(n[0].type)?mn.rejectActionByID(t):mn.resolveActionByID(t),nu(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(jd("VIEW_DATA_OBJECT"),Jd(100),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>(e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:s}=e,o={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=gp("readDataObject",o);return ad(Ad(i,{method:c,headers:r,body:{dataViewParameters:s}},n)).pipe(Fd((t=>({response:t.data,actionInPayload:e}))),Xd("Error ocurred during ajax call at getDataObjectView Epic",n))})(e))),kd((async e=>{if(e&&e.type===Ge){const{payload:r}=e,a=va({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o}=r,i=vt(o,r.context),c=Da(i,o,r.context),d={acName:i,context:c};await Oa(a,r,d);const l=Pa(a,{target:i,context:c,containerItemID:c,headers:s});return l.resourceType=k.RESOURCE_TYPES.DATA,l.resourceStatus=k.RESOURCE_STATUS.UPDATE,l.key=JSON.stringify(r.requestPayload),n.push(Xu(wu,l)),n})),Fd((()=>(1===n.length&&oa(n[0].type)?mn.rejectActionByID(t):mn.resolveActionByID(t),nu(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(jd("UPDATE_DATA_OBJECT"),Jd(100),Ud((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:k.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return mn.rejectActionByID(t,!0,e),Hd([])}return Hd(e.payload).pipe(kd((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:s}=e,o={data_view_ID:t},{restApi:i,reqType:c}=gp("updateDataObject",o),d=ba(a);return ad(Ad(i,{method:c,headers:r,body:{data:{...d.content,...s},pageInstructions:d.pageInstructions||[]}},a)).pipe(Fd((t=>({response:t.data,actionInPayload:e}))),Xd("Error ocurred during ajax call at updateDataObject Epic",n))})(e))),kd((async e=>{if(e&&e.type===Ge){const{payload:r}=e,a=va({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?Ya.MODAL:Ya.PRIMARY,i={target:vt(o,a),containerItemID:a,context:a};return n.push(Xu(Bu,i)),n})),Fd((()=>(1===n.length&&oa(n[0].type)?mn.rejectActionByID(t):mn.resolveActionByID(t),nu(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(jd("DELETE_DATA_OBJECT"),Jd(100),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>(e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:s,reqType:o}=gp("deleteDataObject",a);return ad(Ad(s,{method:o},n)).pipe(Fd((t=>({response:t.data,actionInPayload:e}))),Xd("Error ocurred during ajax call at deleteDataObject Epic",n))})(e))),kd((async e=>{if(e&&e.type===Ge){const{payload:r}=e,a=va({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),Fd((()=>(1===n.length&&oa(n[0].type)?mn.rejectActionByID(t):mn.resolveActionByID(t),nu(n),n=[],n))))},e=>{let t=0,n=[],r={};return e.pipe(jd(ke),Jd(100),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>(e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,a={data_view_ID:t},{restApi:s,reqType:o}=gp("getDataObjectActions",a);return ad(Ad(s,{method:o,body:{dataViewParameters:n}},r)).pipe(Fd((e=>({...e.data}))),Xd("Error ocurred during ajax call at GET data object actions : ",e.context))})(e))),kd((async e=>e&&e.type===Ge?(n.push(va(e)),n):(r=e,[]))),Fd((()=>(1===n.length&&oa(n[0].type)?mn.rejectActionByID(t):mn.resolveActionByID(t,r),nu(n),n=[],n))))}],mf=yf;function If(e,t){return void 0===t&&(t=rf),Qc((function(n,r){var a=null,s=null,o=null,i=function(){if(a){a.unsubscribe(),a=null;var e=s;s=null,r.next(e)}};function c(){var n=o+e,s=t.now();if(s<n)return a=this.schedule(void 0,n-s),void r.add(a);i()}n.subscribe(Zc(r,(function(n){s=n,o=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){s=a=null})))}))}const{RESOURCE_TYPES:{CASE:Ef,DATA:Af}}=k;let _f=[];const Sf={},Cf=[e=>e.pipe(jd(Ve),If(200),Fd((e=>e.payload)),kd((e=>{const t=Q.getPreviewMode()&&pd.addDebugHeaders({debugId:mu.generateUniqueID()});Sf.dataContext=e.payload.dataViewName,Sf.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:s}=e;s=s&&s.indexOf("viewType={viewType}")>0?s.replace("{viewType}","page"):s&&s.indexOf('viewType=""')>0?s.replace('viewType=""','viewType="page"'):s;const o=E()+s,i=e.options.context;let c;const d={},l=e?.payload?.caseClassName;if(G.isRemoteCase(l)){const{RemoteSystemID:e}=G.getRemoteCase(l);d.RemoteSystemID=e}if("POST"===r){let i;switch(c=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`),Fa(a)){case Ef:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case Af:i=Sf;break;default:i=c}return ad(Ad(o,{method:r,body:i,headers:{...d,...t}},n)).pipe(Fd((t=>({response:{...t.data},payload:e,headers:$a(t.headers)}))),Xd(": Error ocurred during ajax call at historyEpic : ",e))}return ad(Ad(o,{method:"GET",headers:{...d,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(Fd((n=>({response:n.data,payload:e,headers:{...$a(n.headers),...t}}))))})),kd((async e=>{if(e&&e.type===Ge)return va(e);const{headers:t={},response:n,payload:r}=e,a=cg(n,{[k.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=r.options.acName,o=gs(s)&&ys(s)?ss(s):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:s,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[V.COREHEADER_APP_DEBUG_ID]}};let d="";const l=r?.payload?.page;let u=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(d=pp(lt,{caseName:e.payload.payload.caseName}),d=d&&d.replace("{workID}",e.payload.payload.workID)||"",u=r?.payload?.caseClassName),Zr.publish(k.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:l,pageClass:u});const p=mu.getIn(a,V.LOCALE_REFERENCES);await ae.loadLocaleResources(p);const h=mu.getIn(a,V.COMPONENTS);h&&await Kr(h),qr(a,r.options.actionConfig,!0),Zr.publish(k.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:l,pageClass:u});let g=Pa(a,c);return g=((e,t,n)=>{if(e===_a.CASE){if(t?.caseInfo?.assignments){const{key:e,flowName:r}=Na(t.caseInfo.assignments[0].ID);n.key=e,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=V.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(Fa(e.payload.routeKey),{...n.data,semanticURL:d,caseViewMode:V.REVIEW_MODE},g),_f.push(Ra(s,g)),Ua(_f),_f})),Fd((()=>(nu(_f),_f=[],_f))),Xd("Error occured"))],$f=[e=>{let t=0,n=[];return e.pipe(jd(Oe),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a="";n||(a=pp(ct,{insightID:"{insightID}"}),a=a.replace("{insightID}",r));const{restApi:s,reqType:o}=gp(ct,{insightID:r});return ad(Ad(s,{method:o},t)).pipe(Fd((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}})),Xd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),kd((async e=>{if(e&&e.type===Ge)return n.push(va(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Jr.getTargetViewContainerName(be),s=vt(a,t.context),o=Da(s,a,t.context),{response:i}=e,c=cg(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await Oa(c,t,d,l,u);const p=Pa(c,{target:s,context:o,containerItemID:o});p.resourceType=k.PAGE;const h=Ra(s,p);return n.push(h),Ua(n),n})),Fd((()=>{mn.resolveActionByID(t),nu(n),n=[]})),uf())}],bf=[e=>{let t=0,n=[];return e.pipe(jd(Te),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=pp(dt,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:s,reqType:o}=gp(dt,{dashboardID:r});return ad(Ad(s,{method:o},t)).pipe(Fd((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}})),Xd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),kd((async e=>{if(e&&e.type===Ge)return n.push(va(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Jr.getTargetViewContainerName(be),s=vt(a,t.context),o=Da(s,a,t.context),{response:i}=e,c=cg(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await Oa(c,t,d,l,u);const p=Pa(c,{target:s,context:o,containerItemID:o});p.resourceType=k.PAGE;const h=Ra(s,p);return n.push(h)})),Fd((()=>{mn.resolveActionByID(t),nu(n),n=[]})),uf())}],Pf=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 ig.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}(...ug,...lf,...gf,...Cf,...mf,...hg,(e=>{let t=0;return e.pipe(jd(At),Fd((e=>(({actionMgrID:t}=e.payload),e.payload))),Fd((e=>{const n=tu().getState(),r=og();return Kd()(n,r)&&t>0?mn.resolveActionByID(t,{}):mn.rejectActionByID(t),[]})),uf())}),...$f,...bf),Of=e=>e.type||(e.messages&&e.messages[0].type)===k.MESSAGES.MESSAGES_TYPE_ERROR,Tf=e=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,property:s,pageReference:o,context:i,referenceList:c}=r;"HTTP"!==a&&n===It&&Of(r)?((e,t,n)=>{if(fr[e]){const r=Ir(Er(t,n)),a=_r(e,fr[e].fieldOrder[r],r);a&&(a.isError=!0)}})(i,s,o):"HTTP"!==a&&n===Et&&Of(r)&&void 0!==s?Cr(i,s,o):"HTTP"!==a&&[We,et,qe,nt].includes(n)?Ar(i):n===$t&&Cr(i,s,c),e(t)},Nf={},vf=e=>{const t=mu.getIn(Nf,[V.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=mu.getIn(Nf,[r,t],[]),s=a&&a.length>0&&a.indexOf(e);if(s>-1&&a.splice(s,1),!a||a&&0===a.length){mu.deleteIn(Nf,[r,t]);const e=mu.getIn(Nf,[r]);e&&0===Object.keys(e).length&&mu.deleteIn(Nf,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),mu.deleteIn(Nf,[V.CONTEXT,e]);const r=mu.getIn(Nf,[V.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&mu.deleteIn(Nf,[V.CONTEXT]),n.length>0&&nu(Zu({dataPagesToBeRemoved:n}))},Rf=(e={},t)=>{Object.keys(e).forEach((n=>{const r=mu.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=mu.getIn(Nf,[V.CONTEXT,n]);if(mu.getIn(Nf,[e])){const r=mu.getIn(Nf,[e,t],[]);mu.setIn(Nf,[e,t],[...new Set([...r,n])])}else mu.setIn(Nf,[e,t],[n]);r?mu.setIn(Nf,[V.CONTEXT,n],[...new Set([...r,t])]):mu.setIn(Nf,[V.CONTEXT,n],[t])})(n,e,t)}))}))},Df=e=>e=>t=>{const{payload:{data:n={},context:r=null,childContainersContexts:a=[]}={},type:s}=t;if(a&&a.length>0&&(s===nt||s===qe)&&a.forEach((e=>{vf(e)})),s===We||s===Ue||s===St){const e=s===St?n:n.shared;Rf(e,r)}else s===nt?(vf(r),Rf(n.shared,r)):s===qe&&vf(r);e(t)},xf=class{static cleanCaches(e){Jl.purgeCascadeFields(e),Kl.removeContext(e),xg.clearContextedCache(e),Zr.cleanContextSubscribers(e),Ar(e),Rn.removeContextTreeNode(e),kh.clearContext(e),wr.deRegisterForRefresh(e)}},wf=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:s,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:d}={}}={}}=n,{PUB_SUB_EVENTS:l}=k;if(r===qe){const{resourceType:t,key:n,context:r}=mu.getIn(e.getState(),["containers",a,"items",s])||{},o={resourceType:t,key:n,context:r,containerItemID:s};Zr.publish(l.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),a===`${k.APP.APP}/${V.PRIMARY}`&&d===V.CONTAINER_TYPE.MULTIPLE&&Zr.publish(l.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===nt||r===qe)&&i.forEach((e=>{xf.cleanCaches(e)})),r!==nt&&r!==qe||xf.cleanCaches(o),t(n)},Mf=e=>e=>t=>{const{payload:{context:n,transientItemID:r=null}={},type:a}=t;!n||a!==We&&a!==et&&a!==nt&&a!==qe||(tr(n),Qn(n)),r&&a===Je&&(tr(r),Qn(r)),e(t)},Lf=function(e){void 0===e&&(e={});var t,n=new(0,Fp.constructor)(Fp.schedulerActionCtor),r=new Vp,a=function(a){t=a;var s=new Vp,o=new Vp,i=s.asObservable().pipe(td(n)),c=new Hp(o.pipe(td(n)),t.getState());return r.pipe(Fd((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})),kd((function(e){return ad(e).pipe(nd(n),td(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),s.next(n),r}}};return a.run=function(e){r.next(e)},a}(),jf=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Rp;if(null!==tu())fu();else{const n=vp((e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[V.CONTEXT_DATA]||e[V.CONTEXT_DATA];sg={data:{[V.APP.APP]:{...t,[V.CONTEXT_DATA]:r}},containers:{}}})(e),function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];"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:Tp.INIT}))throw new Error(bp(12));if(void 0===n(void 0,{type:Tp.PROBE_UNKNOWN_ACTION()}))throw new Error(bp(13))}))}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let s=!1;const o={};for(let a=0;a<r.length;a++){const i=r[a],c=n[i],d=e[i],l=c(d,t);if(void 0===l)throw t&&t.type,new Error(bp(14));o[i]=l,s=s||l!==d}return s=s||r.length!==Object.keys(e).length,s?o:e}}({data:tg,containers:ag})))(e),t(Wp.reduxBatch,function(...e){return t=>(n,r)=>{const a=t(n,r);let s=()=>{throw new Error(bp(15))};const o={getState:a.getState,dispatch:(e,...t)=>s(e,...t)},i=e.map((e=>e(o)));return s=Rp(...i)(a.dispatch),{...a,dispatch:s}}}(Hr,Tf,Df,Mf,Lf,wf),Wp.reduxBatch));Lf.run(Pf),eu(n)}},Uf=new class{constructor(){this.userSettings={}}getNormalizedKey(e){return e?.toString().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));return mu.isValidJson(t)||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{const{restApi:e,reqType:t}=gp("getUserSettings");Ad(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=()=>{Z.getUserSettings()?this.userSettings=Z.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 mu.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"));const n=gp("updateUserSettings");if(!n)return Promise.reject(new Error("updateUserSettings route is not available"));const{restApi:r,reqType:a}=n;return Ad(r,{method:a,body:mu.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)}))}},Ff={publishConstellationLoadedEvent:()=>{Zr.publish(V.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}},kf=new class{activateContainerItemOnSwitch(e){const t=`${V.APP.APP}/${V.PRIMARY}`,n={target:t,containerItemID:ns(t,e)};hl({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${V.APP.APP}/${V.PRIMARY}`,n={target:t,containerItemID:ns(t,e)};hl({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){hl({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){hl({}).getPConnect().getContainerManager().resetContainers({name:V.PREVIEW,context:V.APP.APP})}isFormDirty(e){const t=`${V.APP.APP}/${V.PRIMARY}`,n=Fs(t,e);return hr.isStateModified(n)}getEventUtils(){return Ff}getBroadcastUtils(){return fg}isTraditionalUICase(e){return Ea(e)}},Vf=new class{#c(e,t,n){$p(e),Jr.buildActionTargetMap(t),m(n)}init(e){const t=new 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 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}}(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none"}}(e),n={...t.environmentInfo,renderingMode:t.renderingMode};lp(t.enableRouting),jf({}),Z.setTheme(t.theme),Z.setCookieComplianceMethod(t.cookieComplianceMethod),dr.updateFieldDefaults(t.fieldDefaults),pd.setDefaultHeaders(t.additionalHeaders),this.#c(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),te.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),A(t.serviceConfig.googleMapKey),te.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),ae.setTimezone(t.timezone),Z.setEnvironmentInfo(n),Z.setLocale(t.locale),G.setRemoteCaseMapping(t.remoteCaseMapping),kh.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),Uf.init(),t.initBroadcast&&kf.getBroadcastUtils().init()}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=hl({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}}}},Gf={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=gp("createViewRuleByID");return Ad(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=gp("getViewRuleByID",{ID:e});return Ad(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=gp("updateViewRuleByID",{ID:e});return Ad(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=gp("deleteViewRuleByID",{ID:e});return Ad(n,{method:r},t).then((e=>e.data))}},Bf={"Content-Type":"application/json"},Hf={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Eg("addCaseFollower",{body:a,queryPayload:r,headers:Bf},n)},deleteCaseFollower:(e,t,n)=>Eg("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Eg("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},Wf={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Eg("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Eg("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Eg("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},qf="operatorDetails",zf={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=gp(qf,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Eg(qf,{queryPayload:t})}return t?Eg("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Eg(qf,{body:{dataViewParameters:{ID:e}}})}},Yf=async e=>{const t=cg(e),n=mu.getIn(t,V.COMPONENTS);qr(t,{},!0),await Kr(n)},Kf=(e,t,n)=>Au.resolveView(e,t,n),Xf={"Content-Type":"application/json"},Jf=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,s,o)=>{const{getLocaleValue:i}=ae;o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let d="";o&&(d=s.getValue("pulse.nextPageFirstEntry"));const l={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:9,olderThan:d};for(let e=0;e<a.length;e+=1)a[e].cancel();const u=Sg();return a.push(u),Eg("getFeedMessages",{queryPayload:l,cancelTokenSource:u},s.getContextName()).then((async e=>{if(200===e.status&&e.data){a.pop();const t=[],n={};let c=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[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)})),c||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(c=!0)}))}if(c&&await Yf({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:i("All","Pulse"),on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i(e.pyLabel,"Pulse"),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&s.getValue("pulse.messageIDs")){let r=s.getValue("pulse.messageIDs"),a=s.getValue("pulse.messages");r=[...r,...t],a={...a,...n},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)}))})),s.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else s.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const d=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:d}}return s.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{Cg(e)||s.reportError(": Error ocurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,a)=>{const s=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return Eg("postFeedMessages",{body:s,headers:Xf},a.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const s=t?.data;if(r){s.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:o,messageIDs:i}}),c}return a.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{a.reportError(": Error ocurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:a=!1})=>{const s=JSON.stringify({message:n});return Eg("editFeedMessage",{queryPayload:{messageID:e},body:s,headers:Xf},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),s}const{messages:s,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:s}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error ocurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",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||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},s=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(s)?.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 o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(a.ID)?{...s[a.ID],...a}:a,t={...s,[a.ID]:e};return{messages:t,messageIDs:o.includes(a.ID)?o:[a.ID,...o],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.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:a})=>{const s=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Eg(s,{body:o,queryPayload:{pulseContext:e},headers:Xf},a.getContextName()).then((s=>{if(200===s.status)if(r){const r=a.getValue(`pulse.messages.${n}`),s=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:s}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},s=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=s-1,i=!1):(o=s+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${s.status}`,s)})).catch((e=>{a.reportError(": Error ocurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n),Eg("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 ocurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Eg("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error ocurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:s=5}=e,o={pulseContext:n,searchFor:r,mentionsType:a,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Sg();return this.mentionsTagsCancelTokenSource.push(i),Eg("getMentionSuggestions",{queryPayload:o,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=>{Cg(e)||t.reportError(": Error ocurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Eg("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error ocurred during ajax call at getMentionTypes API : ",t.response.data)}));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 s=Sg();return this.mentionsTagsCancelTokenSource.push(s),Eg("getTagSuggestions",{queryPayload:a,cancelTokenSource:s},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=>{Cg(e)||t.reportError(": Error ocurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},Qf={getTaggedCases:(e,t)=>Eg("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Eg("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Eg("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error ocurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Eg("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error ocurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>Gh.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getTagsLandingPageURL API : ",t.response)}))},Zf=(e,t)=>{ws(t.getContextName(),e.etag),Ms(t.getContextName(),e.etag)},ey={getParticipants:(e,t)=>Eg("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Eg("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Eg("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Eg("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at getParticipant API : ",e.response)})),createParticipant:(e,t,n,r)=>{const a={caseID:e},s={...n,participantRoleID:t},o={"if-match":r.getCaseSummary().headers.etag};return Eg("createParticipant",{body:s,queryPayload:a,headers:o},r.getContextName()).then((e=>{Zf(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at createParticipant API : ",e.response)}))},updateParticipant:(e,t,n,r)=>{const a={caseID:e,participantID:t},s={"if-match":r.getCaseSummary().headers.etag};return Eg("updateParticipant",{body:n,queryPayload:a,headers:s},r.getContextName()).then((e=>{Zf(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at updateParticipant API : ",e.response)}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return Eg("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((e=>{Zf(e.headers,n)})).catch((e=>{n.reportError(": Error ocurred during ajax call at deleteParticipant API : ",e.response)}))}},ty=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]}};function ny(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const ry="create",ay="update",sy="delete";function oy(e,t,n,r){const a=Ul(t);if(a){switch(e){case ry:case ay:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case sy:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const iy={},cy=e=>{const t=Ul(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=ny(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=gp("getUIListPersonalizations",{listID:e});return Ad(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:ny(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},dy=(e,t,n)=>{const{restApi:r,reqType:a}=gp("createListPersonalization",{listID:e});return oy(ry,e,t,n),Ad(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return iy[t]=n,e}))},ly=(e,t,n)=>{const r=iy[t]||t;oy(ay,e,t,n);const{restApi:a,reqType:s}=gp("updateListPersonalization",{listID:e,personalizationID:r})||{};return Ad(a,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},uy=(e,t)=>{const n=iy[t]||t;oy(sy,e,t);const{restApi:r,reqType:a}=gp("deleteListPersonalization",{listID:e,personalizationID:n});return Ad(r,{method:a,body:{}}).then((e=>(iy[t]&&delete iy[t],e)))},py=function(e){return e?{createPersonalization:dy.bind(null,e),updatePersonalization:ly.bind(null,e),deletePersonalization:uy.bind(null,e),fetchPersonalizations:cy.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},hy="getDataObjects",gy=["LocalList","RemoteList","PromptList","DataPage"];let fy=null;function yy(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 my={getDataObjects:function(){const e=Mh.getAppCacheKey(hy);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=gp(hy,{}),r=Ad(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(fy)return fy;const t=Mh.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=gp("getDataPages",{datapageRequestType:"explorable"});return fy=Ad(n,{method:r,datapageRequestType:"explorable"}),fy.then((e=>{fy=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),fy},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=jl(e);if(t&&t.classID){let e=kl(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!mu.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=Rl(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(t.rdFields?.fields??t.rdFields),a=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||a&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&gy.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].fieldType:e[1].isUserReference?"User reference":void 0,category:yy(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n};return xg.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=Mh.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}=gp("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=Ad(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=jl(e),n=t?.rdFields?.fields??t?.rdFields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=Mh.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const a=Mh.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=Mh.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=Mh.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getInsightIDs:function(){const{restApi:e,reqType:t}=gp("getInsightIDs");return Ad(e,{method:t})},getInsightByID:function(e){const t=Fl(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=gp("getInsightByID",n);return Ad(r,{method:a})},createInsight:function(e){const{restApi:t,reqType:n}=gp("createInsight");return Ad(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=gp("updateInsight",n);return Ad(r,{method:a,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=gp("deleteInsight",t);return Ad(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=gp("exportToExcel");return Ad(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=gp("scheduleInsight",n);return Ad(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:s}=gp("updateScheduledInsight",r);return Ad(a,{method:s,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=gp("deleteScheduledInsight",n);return Ad(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=gp("translateStrings");return Ad(t,{method:n,body:JSON.stringify(e)})}},Iy=new class{addRoutes=e=>{return t=e,void J.addRoutes(t);var t}},Ey=class{static openCase(e,t=k.APP.APP,n={}){return n.renderInline=!0,n.pageName?Z.setDefaultCasePage(n.pageName):(Z.setDefaultCasePage(V.PY_DETAILS),n.pageName=V.PY_DETAILS),n?.disableAssignmentHeader?Z.disableAssignmentHeader(n.disableAssignmentHeader):Z.disableAssignmentHeader(!1),tl.openCase(e,t,V.PRIMARY,n)}static createCase(e,t=k.APP.APP,n={}){return n.renderInline=!0,n.pageName?Z.setDefaultCasePage(n.pageName):(Z.setDefaultCasePage(V.PY_DETAILS),n.pageName=V.PY_DETAILS),n?.disableAssignmentHeader?Z.disableAssignmentHeader(n.disableAssignmentHeader):Z.disableAssignmentHeader(!1),tl.createCase(e,t,V.PRIMARY,n)}static getNextWork(e=k.APP.APP,t={}){return t.renderInline=!0,t.pageName?Z.setDefaultCasePage(t.pageName):(Z.setDefaultCasePage(V.PY_DETAILS),t.pageName=V.PY_DETAILS),t?.disableAssignmentHeader?Z.disableAssignmentHeader(t.disableAssignmentHeader):Z.disableAssignmentHeader(!1),tl.getNextWork(e,V.PRIMARY,t)}static openAssignment(e,t=k.APP.APP,n={}){return n.renderInline=!0,n.pageName?Z.setDefaultCasePage(n.pageName):(Z.setDefaultCasePage(V.PY_DETAILS),n.pageName=V.PY_DETAILS),n?.disableAssignmentHeader?Z.disableAssignmentHeader(n.disableAssignmentHeader):Z.disableAssignmentHeader(!1),tl.openAssignment(e,t,V.PRIMARY,n)}static openPage(e,t,n=k.APP.APP,r={}){const a=be;r?.defaultCasePage?Z.setDefaultCasePage(r.defaultCasePage):Z.setDefaultCasePage(V.PY_DETAILS),r?.disableAssignmentHeader?Z.disableAssignmentHeader(r.disableAssignmentHeader):Z.disableAssignmentHeader(!1);const s={viewName:e,className:t,acTargetName:V.PRIMARY,actionMgrID:mn.getNextActionMgrId(),context:n},{promise:o}=mn.actionManagerPromise(a,s.actionMgrID);return nu({type:a,payload:{...s}}),o}static getCurrentContextAPI(e,t=k.APP.APP){return hl({meta:{config:{}},options:{context:t,pageReference:e,containerName:V.PRIMARY}}).getPConnect()}},Ay={getResolvedSemanticURL:(e,t,n)=>J.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:lt,ACTION_SHOWDATA:it,ACTION_SHOWVIEW:ot})},_y=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},Sy={setTokens:e=>{Pd({tokenInfo:e}),bd({Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Zr.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>(async()=>new Promise(((e,t)=>{const n={...md};if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:s}=n.endPoints,{client_id:o,client_secret:i}=n,c={"content-type":"application/x-www-form-urlencoded"};i&&(c.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const d=["access_token"];a&&d.push("refresh_token"),d.forEach((async e=>{const t=new URLSearchParams;i||t.append("client_id",o),t.append("token","access_token"===e?r:a),t.append("token_type_hint",e),await fetch(s,{method:"POST",headers:new Headers(c),body:t.toString()})})),bd({Authorization:null}),Pd({tokenInfo:null}),e()})))(),getAuthInstance:e=>id.init(e),setAuthorizationHeader:e=>{bd({Authorization:e}),setTimeout((()=>Zr.publish("updateSession",{updateStatus:"success"})),0)}},Cy=new class{getDebouncedSubject(e){return(new Vp).pipe(If(e))}};ur.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=ae.getLocaleValue("Enter a valid email address","Messages")),t})),ur.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=ae.getLocaleValue("Invalid number","Messages")),t})),ur.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?ae.getLocaleValue("Cannot be blank","Messages"):null)),ur.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=ae.getLocaleValue("Enter a valid url","Messages")),t}));const $y={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(?: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,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\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])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[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}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-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|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\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}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\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","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],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|50|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]|33|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-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],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{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[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[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]|91"]],["(\\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-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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]|31)"],"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,"528[89]"],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,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\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","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|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","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{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"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","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\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}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,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-489]\\d|55)\\d{6}",[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","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|83)|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]|8[124-6])\\d|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",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[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,10}|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",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|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[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",[6,7,8,9,10,11]],["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","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|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",["7"],"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[259]\\d{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","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|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",["30[0135-9]"],"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-7]|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","(?:[245]\\d|33|77|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",["2(?:[0367]|4[3-8])"]],["(\\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",["2(?:[0367]|4[3-8])"]],["(\\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]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|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{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-467]|5[0-3]|8[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}"]]],MC:["377","00","(?:[3489]|6\\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",["6"],"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","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\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}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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","(?:596\\d|7091)\\d{5}|(?:69|[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","38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}",[8,10,11,12,13,14],[["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["3"],"0$1"],["(\\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","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],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",["(?: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","(?: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","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"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","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,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",["[26]1|3[289]|4[1246-8]|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[16]|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[013]|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-5]|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,"3[04-689]|[489]",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","92\\d{7}|(?:[15]|8\\d)\\d{8}",[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{3,4})","$1 $2 $3",["81"],"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]|68|[78]\\d)\\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-8]"]]]],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","[267]\\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",["[267]"]],["(\\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|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-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{8}",[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",["[0-57-9]"]]],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-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|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,[["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468]))\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|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-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|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-47-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-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|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-389]|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]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\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|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"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|51"]],["(\\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})|50\\d{3})\\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}"]]]}};var by={}.constructor;function Py(e){return null!=e&&e.constructor===by}function Oy(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 Ty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ny(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vy(e){var t,n,r,a=function(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,s=[],o=!0,i=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(s.push(r.value),4!==s.length);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(i)throw a}}return s}}(e)||function(e,t){if(e){if("string"==typeof e)return Ny(e,4);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ny(e,4):void 0}}(e)||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.")}()}(Array.prototype.slice.call(e)),s=a[0],o=a[1],i=a[2],c=a[3];if("string"!=typeof s)throw new TypeError("A text for parsing must be a string.");if(t=s,o&&"string"!=typeof o){if(!Py(o))throw new Error("Invalid second argument: ".concat(o));i?(n=o,r=i):r=o}else c?(n=i,r=c):(n=void 0,r=i),o&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oy(Object(n),!0).forEach((function(t){Ty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:o},n));return{text:t,options:n,metadata:r}}var Ry="0-90-9٠-٩۰-۹",Dy="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function xy(e){return xy="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},xy(e)}function wy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function My(e){var t="function"==typeof Map?new Map:void 0;return My=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,r)}function r(){return Ly(e,arguments,Fy(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Uy(r,e)},My(e)}function Ly(e,t,n){return Ly=jy()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&Uy(a,n.prototype),a},Ly.apply(null,arguments)}function jy(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Uy(e,t){return Uy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Uy(e,t)}function Fy(e){return Fy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fy(e)}var ky=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uy(e,t)}(r,e);var t,n=function(e){var t=jy();return function(){var n,r=Fy(e);if(t){var a=Fy(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===xy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wy(e)}(this,n)}}(r);function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),t=n.call(this,e),Object.setPrototypeOf(wy(t),r.prototype),t.name=t.constructor.name,t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(My(Error));function Vy(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var s=Number(n[a]),o=Number(r[a]);if(s>o)return 1;if(o>s)return-1;if(!isNaN(s)&&isNaN(o))return 1;if(isNaN(s)&&!isNaN(o))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}function Gy(e){return Gy="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},Gy(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wy(e,t,n){return t&&Hy(e.prototype,t),n&&Hy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var qy=" ext. ",zy=/^\d+$/,Yy=function(){function e(t){By(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Py(e)||!Py(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(Py(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+em(e)+": "+e,"."))}(t),this.metadata=t,nm.call(this,t)}return Wy(e,[{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&&zy.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Ky(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Ky(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}}]),e}(),Ky=function(){function e(t,n){By(this,e),this.globalMetadataObject=n,this.metadata=t,nm.call(this,n.metadata)}return Wy(e,[{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;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map((function(t){return new Xy(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()&&Zy(this.types(),e))return new Qy(Zy(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?qy:this.metadata[13]||qy}}]),e}(),Xy=function(){function e(t,n){By(this,e),this._format=t,this.metadata=n}return Wy(e,[{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()||Jy.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),Jy=/^\(?\$1\)?$/,Qy=function(){function e(t,n){By(this,e),this.type=t,this.metadata=n}return Wy(e,[{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()}}]),e}();function Zy(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]}}var em=function(e){return Gy(e)};function tm(e,t){if((t=new Yy(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function nm(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===Vy(t,"1.2.0")?this.v2=!0:-1===Vy(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var rm=function(e){return"([".concat(Ry,"]{1,").concat(e,"})")};function am(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="[  \\t]*";return";ext="+rm("20")+"|"+t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+rm("20")+"#?|"+t+"(?:[xx##~~]|int|int)"+n+rm("9")+"#?|[- ]+"+rm("6")+"#|"+r+"(?:,{2}|;)"+n+rm("15")+"#?|"+r+"(?:,)+"+n+rm("9")+"#?"}var sm="[++]{0,1}(?:["+Dy+"]*["+Ry+"]){3,}["+Dy+Ry+"]*",om=new RegExp("^[++]{0,1}(?:["+Dy+"]*["+Ry+"]){1,2}$","i"),im=sm+"(?:"+am()+")?",cm=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+im+"$","i"),dm=new RegExp("(?:"+am()+")$","i"),lm={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 um(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pm(e){for(var t,n="",r=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=function(e,t){if(e){if("string"==typeof e)return um(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?um(e,t):void 0}}(e))){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.split(""));!(t=r()).done;)n+=hm(t.value,n)||"";return n}function hm(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":function(e){return lm[e]}(e)}function gm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fm(e,t){return ym(e,void 0,t)}function ym(e,t,n){var r=n.type(t),a=r&&r.possibleLengths()||n.possibleLengths();if(!a)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!n.type("FIXED_LINE"))return ym(e,"MOBILE",n);var s=n.type("MOBILE");s&&(a=function(e,t){for(var n,r=e.slice(),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=function(e,t){if(e){if("string"==typeof e)return gm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gm(e,t):void 0}}(e))){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.")}(t);!(n=a()).done;){var s=n.value;e.indexOf(s)<0&&r.push(s)}return r.sort((function(e,t){return e-t}))}(a,s.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var o=e.length,i=a[0];return i===o?"IS_POSSIBLE":i>o?"TOO_SHORT":a[a.length-1]<o?"TOO_LONG":a.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function mm(e,t){return"IS_POSSIBLE"===fm(e,t)}function Im(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Em(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Am=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function _m(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Yy(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Im(r,n.nationalNumberPattern())){if(Sm(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Sm(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,s=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=function(e,t){if(e){if("string"==typeof e)return Em(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Em(e,t):void 0}}(e))){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.")}(Am);!(a=s()).done;){var o=a.value;if(Sm(r,o,n))return o}}}}function Sm(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Im(e,t.pattern())}var Cm=/(\$\d)/,$m=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function bm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pm(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 Om(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pm(Object(n),!0).forEach((function(t){Tm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nm={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function vm(e,t,n,r,a){var s=function(e,t){for(var n,r=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=function(e,t){if(e){if("string"==typeof e)return bm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bm(e,t):void 0}}(e))){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);!(n=r()).done;){var a=n.value;if(a.leadingDigitsPatterns().length>0){var s=a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length-1];if(0!==t.search(s))continue}if(Im(t,a.pattern()))return a}}(r.formats(),e);return s?function(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,s=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(Cm,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Dy,"]+"),"g")," ").trim()}(s):s}(e,s,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function Rm(e,t,n,r){return t?r(e,t,n):e}function Dm(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 xm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dm(Object(n),!0).forEach((function(t){wm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mm=function(){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("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var a=function(e,t){var n,r,a=new Yy(t);return Lm(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),s=a.country,o=a.countryCallingCode;this.country=s,this.countryCallingCode=o,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n;return t=e,(n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,n){var r=new Yy(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new Yy(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,n)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Yy(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.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return mm(e.phone||e.nationalNumber,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.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return e=this,t={v2:!0},n=this.getMetadata(),t=t||{},(n=new Yy(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==_m(e,t,n.metadata):Im(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new Yy(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return _m(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,n,r){if(n=n?Om(Om({},Nm),n):Nm,r=new Yy(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,s=r.countryCallingCode(),o=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return o?Rm(a=vm(o,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return o?(a=vm(o,null,"INTERNATIONAL",r,n),Rm(a="+".concat(s," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(s);case"E.164":return"+".concat(s).concat(o);case"RFC3966":return function(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:"")}({number:"+".concat(s).concat(o),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){if(tm(r,a.metadata)===n){var s=vm(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var o=function(e,t,n){var r=new Yy(n);return r.selectNumberingPlan(e,void 0),r.defaultIDDPrefix()?r.defaultIDDPrefix():$m.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,0,a.metadata);if(o)return"".concat(o," ").concat(n," ").concat(vm(e,null,"INTERNATIONAL",a))}(o,e.carrierCode,s,n.fromCountry,r);return Rm(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}(this,e,t?xm(xm({},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)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Lm=function(e){return/^[A-Z]{2}$/.test(e)},jm=new RegExp("(["+Ry+"])");function Um(e,t){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,s,o,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(s=r[1]);else{var d=r[0];a=e.slice(d.length),c&&(s=r[1])}if(c){var l=e.indexOf(r[1]);e.slice(0,l)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:a,nationalPrefix:o,carrierCode:s}}}return{nationalNumber:e}}(e,t),r=n.carrierCode,a=n.nationalNumber;if(a!==e){if(!function(e,t,n){return!(Im(e,n.nationalNumberPattern())&&!Im(t,n.nationalNumberPattern()))}(e,a,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch(fm(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,t))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:r}}function Fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var km="(["+Ry+"]|[\\-\\.\\(\\)]?)",Vm=new RegExp("^\\+"+km+"*["+Ry+"]"+km+"*$","g"),Gm=new RegExp("^(["+Ry+"]+((\\-)*["+Ry+"])*\\.)*[a-zA-Z]+((\\-)*["+Ry+"])*\\.?$","g"),Bm="tel:",Hm=";phone-context=",Wm=new RegExp("[++"+Ry+"]"),qm=new RegExp("[^"+Ry+"#]+$");function zm(e,t,n){if(t=t||{},n=new Yy(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new ky("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=function(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(Hm);if(t<0)return null;var n=t+Hm.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&&(Vm.test(e)||Gm.test(e))}(a))throw new ky("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="","+"===a.charAt(0)&&(n+=a);var s,o=e.indexOf(Bm);s=o>=0?o+Bm.length:0;var i=e.indexOf(Hm);n+=e.substring(s,i)}var c=n.indexOf(";isub=");if(c>0&&(n=n.substring(0,c)),""!==n)return n}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(e)if(e.length>250){if(n)throw new ky("TOO_LONG")}else{if(!1===t)return e;var r=e.search(Wm);if(!(r<0))return e.slice(r).replace(qm,"")}}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&cm.test(e)}(r))return function(e){return om.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(dm);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(dm),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);return a.ext?a:{number:r}}(e,t.v2,t.extract),a=r.number,s=r.ext,o=r.error;if(!a){if(t.v2){if("TOO_SHORT"===o)throw new ky("TOO_SHORT");throw new ky("NOT_A_NUMBER")}return{}}var i=function(e,t,n,r){var a,s=function(e,t,n,r){if(!e)return{};var a;if("+"!==e[0]){var s=function(e,t,n,r){if(t){var a=new Yy(r);a.selectNumberingPlan(t,n);var s=new RegExp(a.IDDPrefix());if(0===e.search(s)){var o=(e=e.slice(e.match(s)[0].length)).match(jm);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t,n,r);if(!s||s===e){if(t||n){var o=function(e,t,n,r){var a=t?tm(t,r):n;if(0===e.indexOf(a)){(r=new Yy(r)).selectNumberingPlan(t,n);var s=e.slice(a.length),o=Um(s,r).nationalNumber,i=Um(e,r).nationalNumber;if(!Im(i,r.nationalNumberPattern())&&Im(o,r.nationalNumberPattern())||"TOO_LONG"===fm(i,r))return{countryCallingCode:a,number:s}}return{number:e}}(e,t,n,r),i=o.countryCallingCode,c=o.number;if(i)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:i,number:c}}return{number:e}}a=!0,e="+"+s}if("0"===e[1])return{};r=new Yy(r);for(var d=2;d-1<=3&&d<=e.length;){var l=e.slice(1,d);if(r.hasCallingCode(l))return r.selectNumberingPlan(l),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:l,number:e.slice(d)};d++}return{}}(pm(e),t,n,r.metadata),o=s.countryCallingCodeSource,i=s.countryCallingCode,c=s.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),!!t&&(a=t),i=n||tm(t,r.metadata)}if(!c)return{countryCallingCodeSource:o,countryCallingCode:i};var d=Um(pm(c),r),l=d.nationalNumber,u=d.carrierCode,p=function(e,t){var n=t.nationalNumber,r=t.defaultCountry,a=t.metadata,s=a.getCountryCodesForCallingCode(e);return s?1===s.length?s[0]:function(e,t){var n=t.countries,r=t.metadata;r=new Yy(r);for(var a,s=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=function(e,t){if(e){if("string"==typeof e)return Fm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fm(e,t):void 0}}(e))){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.")}(n);!(a=s()).done;){var o=a.value;if(r.country(o),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return o}else if(_m({phone:e,country:o},void 0,r.metadata))return o}}(n,{countries:s,defaultCountry:r,metadata:a.metadata}):void 0}(i,{nationalNumber:l,defaultCountry:t,metadata:r});return p&&(a=p,"001"===p||r.country(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:l,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),c=i.country,d=i.nationalNumber,l=i.countryCallingCode,u=i.countryCallingCodeSource,p=i.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new ky("INVALID_COUNTRY");return{}}if(!d||d.length<2){if(t.v2)throw new ky("TOO_SHORT");return{}}if(d.length>17){if(t.v2)throw new ky("TOO_LONG");return{}}if(t.v2){var h=new Mm(l,d,n.metadata);return c&&(h.country=c),p&&(h.carrierCode=p),s&&(h.ext=s),h.__countryCallingCodeSource=u,h}var g=!!(t.extended?n.hasSelectedNumberingPlan():c)&&Im(d,n.nationalNumberPattern());return t.extended?{country:c,countryCallingCode:l,carrierCode:p,valid:g,possible:!!g||!(!0!==t.extended||!n.possibleLengths()||!mm(d,n)),phone:d,ext:s}:g?function(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}(c,d,s):{}}function Ym(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 Km(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ym(Object(n),!0).forEach((function(t){Xm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ym(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jm(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 Qm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jm(Object(n),!0).forEach((function(t){Zm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eI(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=Qm(Qm({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return zm(e,Km(Km({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof ky))throw e}}function tI(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 nI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tI(Object(n),!0).forEach((function(t){rI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aI(){var e=vy(arguments),t=e.text,n=e.options,r=e.metadata,a=eI(t,n=nI(nI({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}ur.register("phone",(e=>{let t=null;e&&!/^\+?\d+$/.test(e)&&(t=ae.getLocaleValue("Enter a valid phone number","Messages"));const n=e?.startsWith("+");return e&&n&&(function(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push($y),e.apply(this,n)}(aI,arguments)}(e)||(t=ae.getLocaleValue("Enter a valid phone number","Messages"))),t}));const sI=(e,t)=>{switch(t){case"invalid":return ae.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return ae.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};ur.register("datetime",(e=>sI("DateTime",e))),ur.register("date",(e=>sI("Date",e))),ur.register("time",(e=>sI("Time",e)));const oI=new class{createC11nEnv=e=>hl(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>ce;getStateManager=()=>c;getActionCreators=()=>d;getStreamObservable=()=>a;getActionProcessor=()=>Su;getActionHandler=()=>_u;renderApp=(e,t)=>{const n={context:V.APP.APP},r={...mu.getIn(e,V.ROOT),options:n};jf(e),qr(e,n,!0);const a=this.createC11nEnv({meta:r,isRoot:!0});Zr.publish(k.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const r=cg(e),{data:a,uiResources:s={}}=e,o=mu.getIn(s,V.CONTEXT_DATA);await Oa(r,{},{},!1,!0);const i={...a,[V.CONTEXT_DATA]:o},{root:c}=s;bs(c,t,i,n)};fetchEndPointResource=(e,t,n)=>{Ad(e,{method:"GET"},V.APP.ROOT).then((async e=>{const{data:r,status:a}=e;200===a&&this.updateStoreWithUiRoot(r,t,n)}))};loadComponent=async(e,t,n)=>Kr(n).then((()=>{const n=this.createC11nEnv({meta:e,isRoot:!0});tu()||jf({}),Zr.publish(k.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})}));setStaticServerUrl=(e,t,n)=>{te.initServer(e,t,n)};loadView=async(e,t,n=[])=>{m();const r=cg(e),a=mu.getIn(r,V.VIEWS),s=mu.getIn(r,V.NAVIGATIONS),o=mu.getIn(r,V.COMPONENTS)||[];o.push(...n);const i=mu.getIn(r,V.STATIC_SERVER_URL),c=mu.getIn(r,V.APPLICATION_DATA);a&&Dl(a),s&&xl(s),(e=>{e&&(cp=e.pyLabel)})(c),i&&te.initServer(i),await Kr(o,i).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,n)=>{$p(e),Jr.buildActionTargetMap(t),m(n)};initRoutingTable=(e,t)=>{$p(e,!0),m(t)};setAppAlias=e=>{te.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=hp("home",{portalName:e});return E()+t};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(Cp()&&!t){const t=Y(),r=J.processUrl(t,!0),a=J._getMatchedRouteInRoutingTable(r)||"",s=J.getRoutingInfo(),o=J.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=s.routes[a].payload;c=c.replace("{workID}",i),n=J.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=J.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,a,s)=>{const{config:{name:o}={}}=t;tu()||jf({}),s&&(xs(`${V.APP.ROOT}/${o}`),Ds().deleteContainerItem(`${V.APP.ROOT}/${o}`)),Ds().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&fu(),nu(Pu({data:{},context:V.APP.ROOT}));const i=this.createC11nEnv({meta:t,options:{context:V.APP.ROOT,pageReference:"",target:`${V.APP.ROOT}/${o}`}}),c=i.getPConnect(),d=c.getContextName(),l=c.getContainerName(),u=c.getContainerManager();ss(`${d}/${l}`)||"noPortal"===t.config?.renderingMode||u.initializeContainers({type:"single"});const p=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Kr(p).then((()=>{Zr.publish(k.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,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=>{(e=>{const{acName:t,context:n,defaultViewLabel:r}=e,a=(e=>{const t=J.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),a=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return t.routes[n]?n:t.routes[r]?r:t.routes[a]?a:e})(r);(e=>{ip=e})(a),J.setDefaultRoute(a);const s=ge(t,n),o=vt(t,n),i={historyAction:ap,pxURLPath:""};let c;const l={acName:o,context:s,actionConfig:{context:s}};if(Cp()){const e=(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&&a.set(e,t);const s=new URLSearchParams(a).toString();return s?`${t}?${s}`:t}return e})(q(window.location.pathname+window.location.search));c=J.getEndPointInfo(e),i.pxURLPath=c.urlPath,void 0!==c.payload?.pageClass&&(c.payload.pageClass=tu()?.getState()?.data?.app?.pyPortal?.classID);const t="showHistory",n={routeEndpoint:c.routeEndpoint,requestType:c.requestType,payload:c.payload,options:l,routeKey:c.routeKey};nu(d[t](_p(n)))}else c=J.getEndPointInfo(ip),i.pxURLPath="";mp(null,!0,{urlPathObjParam:i,infoParam:c,optionsParam:l})})(e)};checkIfSemanticURL=()=>Cp();onPCoreReady=e=>{Zr.subscribe(k.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};setFieldsDefaultConfigs=e=>{dr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{A(e)};setFetchDefaultHeaders=e=>{bd(e)};setFetchAuthInfo=e=>{Pd(e)};getCaseApi=()=>tl;getMashupApi=()=>Ey;enableAppRouting=e=>{lp(e)};initStore=()=>jf({});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=hl({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}}}};class iI{constructor(){iI.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"24.1.2";onPCoreReady=e=>oI.onPCoreReady(e);getComponentsRegistry=()=>oI.getComponentsRegistry();checkIfSemanticURL=()=>oI.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(Cp()){const e=J.processUrl(Y(),!0);return!!J._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>Iy;getViewResources=()=>u;configureForBrowserBookmark=e=>oI.configureForBrowserBookmark(e);getStore=()=>tu();resetStore=()=>fu();getMessageManager=()=>Bn;getCoexistenceManager=()=>kf;getStoreValue=(e,t,n)=>ou(e,t,n);getContainerUtils=()=>s;getAnnotationUtils=()=>Rr;getFieldUtils=()=>On;getFieldDefaultUtils=()=>dr;getAssetLoader=()=>te;getAttachmentUtils=()=>El;getViewRuleApi=()=>Gf;getFeedUtils=()=>Jf;getTagUtils=()=>Qf;getStakeholderUtils=()=>ey;getUserApi=()=>zf;getCaseFollowerApi=()=>Hf;getCaseUtils=()=>Qd;getStateUtils=()=>al;getRelatedCasesApi=()=>Wf;getPersonalizationUtils=py;getDataApi=()=>xg;getDataApiUtils=()=>Mh;getAnalyticsUtils=()=>my;getLocaleUtils=()=>ae;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{iI.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{iI.behaviorOverrides[e]=t};getBehaviorOverrides=()=>iI.behaviorOverrides;getBehaviorOverride=e=>iI.behaviorOverrides[e];getAsynchronousUtils=()=>Cy;createPConnect=e=>hl(e);getPubSubUtils=()=>Zr;registerComponentCreator=e=>{!function(e){dl=e}(e)};getConstants=()=>Object.freeze(k);getEvents=()=>class{static getCaseEvent=()=>Object.freeze(k.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(k.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(k.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(k.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)};getRestClient=()=>l;getMashupApi=()=>Ey;getEnvironmentInfo=()=>Z;getRuntimeParamsAPI=()=>ty;getSemanticUrlUtils=()=>Ay;getRemoteCaseUtils=()=>G;getNavigationUtils=()=>Uf;registerModule=(e,t)=>class{static registerModule(e,t,n){n[e]=()=>t}}.registerModule(e,t,this);getErrorHandler=()=>_y;getFormUtils=()=>hr;getMessagingServiceManager=()=>kh;getMetadataUtils=()=>i;getDataPageUtils=()=>Gh;getDataTypeUtils=()=>wd;getCascadeManager=()=>Jl;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>Sy;getDebugger=()=>Q;getDeferLoadManager=()=>Kl;getExpressionEngine=()=>r;getActionsSequencer=()=>Zd;getRefreshManager=()=>wr;getInitialiser=()=>Vf;getBootstrapUtils=()=>oI;getContextTreeManager=()=>Rn}const cI=new iI;n.g.PCore=cI})()})();